From 4706417997f3b3d453d9c5668397d3306a8b036e Mon Sep 17 00:00:00 2001 From: theresa Date: Tue, 5 Dec 2023 11:20:51 +0100 Subject: [PATCH 01/49] Rebase on dev-2024-2-1 --- .../i18n/configuration/translations-de.js | 1 + .../i18n/configuration/translations-en.js | 3 ++- ...sition-project-navbar-module.controller.js | 12 ++++++++++ ...cquisition-project-navbar-module.html.tmpl | 8 ++++++- .../project-cockpit-config.directive.js | 13 ++++++++++ .../project-cockpit-config.html.tmpl | 24 +++++++++++++++++++ .../project-cockpit-status.directive.js | 12 ++++++++++ .../project-cockpit-status.html.tmpl | 11 ++++++++- .../domain/DataAcquisitionProject.java | 6 +++++ 9 files changed, 87 insertions(+), 3 deletions(-) diff --git a/mdm-frontend/src/app/legacy/common/i18n/configuration/translations-de.js b/mdm-frontend/src/app/legacy/common/i18n/configuration/translations-de.js index 3b89354b874..c7d2805b333 100644 --- a/mdm-frontend/src/app/legacy/common/i18n/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/common/i18n/configuration/translations-de.js @@ -103,6 +103,7 @@ angular.module('metadatamanagementApp').config([ 'create-project': 'Klicken, um ein neues Datenaufnahmeprojekt zu erzeugen.', 'delete-project': 'Klicken, um das ausgewählte Datenaufnahmeprojekt mit allen verknüpften Daten zu löschen.', 'release-project': 'Klicken, um das ausgewählte Projekt für alle Benutzer:innen freizugeben.', + 'prerelease-project': 'Klicken, um das ausgewählte Projekt vorläufig freizugeben.', 'unrelease-project': 'Klicken, um die Freigabe des ausgewählten Projektes zurückzunehmen.', 'cockpit-project': 'Klicken, um zum Projektcockpit zu gehen.', 'post-validation': 'Klicken, um das ausgewählte Datenaufnahmeprojekt zu validieren.', diff --git a/mdm-frontend/src/app/legacy/common/i18n/configuration/translations-en.js b/mdm-frontend/src/app/legacy/common/i18n/configuration/translations-en.js index e692ef031fe..013f1fdddc1 100644 --- a/mdm-frontend/src/app/legacy/common/i18n/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/common/i18n/configuration/translations-en.js @@ -102,7 +102,8 @@ angular.module('metadatamanagementApp').config([ 'tooltips': { 'create-project': 'Click to create a new Data Acquisition Project.', 'delete-project': 'Click to delete the selected Data Acquisition Project with all related data.', - 'release-project': 'Click to release the selected project for all users.', + 'release-project': 'Click to release the selected project preliminary.', + 'prerelease-project': 'Click to preliminarily release the selected project.', 'unrelease-project': 'Click to unrelease the selected project.', 'cockpit-project': 'Click to go to the Project Cockpit.', 'post-validation': 'Click to validate the selected Data Acquisition Project.', diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.controller.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.controller.js index 8039decd63e..9d194d5d2b5 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.controller.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.controller.js @@ -173,5 +173,17 @@ angular.module('metadatamanagementApp') } }); } + + /** + * Method to check wether there is an embargo date + * and wether this date has expired. + */ + ctrl.isEmbargoDateExpired = function() { + if (ctrl.selectedProject.embargoDate) { + var current = new Date(); + return new Date(ctrl.selectedProject.embargoDate) < current; + } + return true; + } } ]); diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.html.tmpl index 19303f89cbc..9994fa9ebd3 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.html.tmpl @@ -35,7 +35,13 @@ playlist_add_check - + + + {{ctrl.selectedProject.release?'global.tooltips.unrelease-project':'global.tooltips.prerelease-project' | translate}} + + {{'more_time'}} + + {{ctrl.selectedProject.release?'global.tooltips.unrelease-project':'global.tooltips.release-project' | translate}} diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js index 9422602096a..5ec51ea41c7 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js @@ -55,6 +55,19 @@ angular.module('metadatamanagementApp') req.dataPackagesRequired = true; req.publicationsRequired = false; }; + + ctrl.removeEmbargoDate = function() { + ctrl.project.embargoDate = null; + } + + /** + * Adds 12 hours to the date object toto prevent time zone changes from changing the date + */ + ctrl.onEmbargoDateChanged = function() { + var embargoDate = new Date(ctrl.project.embargoDate); + embargoDate.setHours(12) + ctrl.project.embargoDate = embargoDate; + } } }; }]); diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl index 78fad589980..8effbea87f2 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl @@ -10,6 +10,30 @@ + + + + + Release Einstellungen + + + + + + +
+ + + delete_forever + + "Embargo-Date löschen" + + +
+
+
+
+ diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js index a89b56c3e06..b64a0cdd94a 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js @@ -161,6 +161,18 @@ angular.module('metadatamanagementApp') } }; + /** + * Method to check wether there is an embargo date + * and wether this date has expired. + */ + ctrl.isEmbargoDateExpired = function() { + if (ctrl.project.embargoDate) { + var current = new Date(); + return new Date(ctrl.project.embargoDate) < current; + } + return true; + } + } }; }]); diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.html.tmpl index 30bf624a6de..b01af6b324c 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.html.tmpl @@ -4,7 +4,16 @@
- + + + {{ctrl.project.release?'global.tooltips.unrelease-project':'global.tooltips.prerelease-project' | translate}} + + + {{'data-acquisition-project-management.error.project-update-access.member-of-assigned-group' | translate}} + + {{'more_time'}} + + {{ctrl.project.release?'global.tooltips.unrelease-project':'global.tooltips.release-project' | translate}} diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/DataAcquisitionProject.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/DataAcquisitionProject.java index 5363a6afe1e..da9311048e2 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/DataAcquisitionProject.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/DataAcquisitionProject.java @@ -31,6 +31,7 @@ import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; import java.io.Serializable; +import java.util.Date; /** * The data acquisition project collects the metadata for the data products which are published by @@ -92,6 +93,11 @@ public class DataAcquisitionProject extends AbstractShadowableRdcDomainObject + "has-been-released-before.not-null") private Boolean hasBeenReleasedBefore; + /** + * Attribute which holds information on the planned release date. + */ + private Date embargoDate; + /** * Flag indicating whether this project has remarks for the user service. Can only be true * for data packages. From 4e9e348df0215fedb5f4cf78bea9ea464479fc19 Mon Sep 17 00:00:00 2001 From: theresa Date: Mon, 11 Dec 2023 08:38:48 +0100 Subject: [PATCH 02/49] #3216: added pre-release attribute and adjusted tests --- .../metadatamanagement/projectmanagement/domain/Release.java | 5 +++++ .../rest/AnalysisPackageResourceControllerTest.java | 4 ++-- .../AnalysisPackageAttachmentShadowCopyServiceTest.java | 2 +- .../service/AnalysisPackageShadowCopyServiceTest.java | 2 +- .../service/ScriptAttachmentShadowCopyServiceTest.java | 2 +- .../rest/DataPackageResourceControllerTest.java | 4 ++-- .../service/DataPackageAttachmentShadowCopyServiceTest.java | 2 +- .../service/DataPackageShadowCopyServiceTest.java | 2 +- .../service/DataSetAttachmentShadowCopyServiceTest.java | 2 +- .../service/DataSetShadowCopyServiceTest.java | 2 +- .../service/InstrumentAttachmentShadowCopyServiceTest.java | 2 +- .../service/InstrumentShadowCopyServiceTest.java | 2 +- .../service/DataAcquisitionProjectShadowCopyServiceTest.java | 2 +- .../service/QuestionImageShadowCopyServiceTest.java | 2 +- .../service/QuestionShadowCopyServiceTest.java | 2 +- .../service/SurveyAttachmentShadowCopyServiceTest.java | 2 +- .../SurveyResponseRateImageShadowCopyServiceTest.java | 2 +- .../service/SurveyShadowCopyServiceTest.java | 2 +- .../service/VariableShadowCopyServiceTest.java | 2 +- 19 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/Release.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/Release.java index 305bc266a84..87bd1e4f308 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/Release.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/Release.java @@ -68,4 +68,9 @@ public class Release implements Serializable { * A string indicating the language ("de" or "en") of the DOI landing page. */ private String doiPageLanguage; + + /** + * Boolean which indicates whether this is a pre-release or not. + */ + private Boolean isPreRelease; } diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/rest/AnalysisPackageResourceControllerTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/rest/AnalysisPackageResourceControllerTest.java index ab50197b82d..c83b36c9ca1 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/rest/AnalysisPackageResourceControllerTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/rest/AnalysisPackageResourceControllerTest.java @@ -337,7 +337,7 @@ public void getLatestShadow() throws Exception { // now fake a shadow project.setId(project.getId() + "-1.0.0"); project.setVersion(null); - project.setRelease(new Release("1.0.0", LocalDateTime.now(), null, false, null)); + project.setRelease(new Release("1.0.0", LocalDateTime.now(), null, false, null, false)); project = dataAcquisitionProjectRepository.save(project); analysisPackage.setId(analysisPackage.getId() + "-1.0.0"); analysisPackage.setDataAcquisitionProjectId(project.getId()); @@ -371,7 +371,7 @@ public void getLatestShadow() throws Exception { project.setId(project.getMasterId() + "-2.0.0"); project.setSuccessorId(null); project.setVersion(null); - project.setRelease(new Release("2.0.0", LocalDateTime.now(), null, false, null)); + project.setRelease(new Release("2.0.0", LocalDateTime.now(), null, false, null, false)); project = dataAcquisitionProjectRepository.save(project); analysisPackage.setId(analysisPackage.getMasterId() + "-2.0.0"); analysisPackage.setSuccessorId(null); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/service/AnalysisPackageAttachmentShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/service/AnalysisPackageAttachmentShadowCopyServiceTest.java index 137c3811fc6..c2c002b3e9c 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/service/AnalysisPackageAttachmentShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/service/AnalysisPackageAttachmentShadowCopyServiceTest.java @@ -60,7 +60,7 @@ public class AnalysisPackageAttachmentShadowCopyServiceTest extends AbstractTest @BeforeEach public void setup() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); dataAcquisitionProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProjectForAnalysisPackages(); dataAcquisitionProject.setId(PROJECT_ID); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/service/AnalysisPackageShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/service/AnalysisPackageShadowCopyServiceTest.java index fd873ecd3a3..f9c57130850 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/service/AnalysisPackageShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/service/AnalysisPackageShadowCopyServiceTest.java @@ -53,7 +53,7 @@ public class AnalysisPackageShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setUp() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); DataAcquisitionProject releasedProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject(); releasedProject.setRelease(release); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/service/ScriptAttachmentShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/service/ScriptAttachmentShadowCopyServiceTest.java index ca4a204b9a7..519a8ba122a 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/service/ScriptAttachmentShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/analysispackagemanagement/service/ScriptAttachmentShadowCopyServiceTest.java @@ -61,7 +61,7 @@ public class ScriptAttachmentShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setup() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); dataAcquisitionProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProjectForAnalysisPackages(); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/rest/DataPackageResourceControllerTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/rest/DataPackageResourceControllerTest.java index 8692181e48f..cc2ae707950 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/rest/DataPackageResourceControllerTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/rest/DataPackageResourceControllerTest.java @@ -308,7 +308,7 @@ public void getLatestShadow() throws Exception { // now fake a shadow project.setId(project.getId() + "-1.0.0"); project.setVersion(null); - project.setRelease(new Release("1.0.0", LocalDateTime.now(), null, false, null)); + project.setRelease(new Release("1.0.0", LocalDateTime.now(), null, false, null, false)); project = dataAcquisitionProjectRepository.save(project); dataPackage.setId(dataPackage.getId() + "-1.0.0"); dataPackage.setDataAcquisitionProjectId(project.getId()); @@ -342,7 +342,7 @@ public void getLatestShadow() throws Exception { project.setId(project.getMasterId() + "-2.0.0"); project.setSuccessorId(null); project.setVersion(null); - project.setRelease(new Release("2.0.0", LocalDateTime.now(), null, false, null)); + project.setRelease(new Release("2.0.0", LocalDateTime.now(), null, false, null, false)); project = dataAcquisitionProjectRepository.save(project); dataPackage.setId(dataPackage.getMasterId() + "-2.0.0"); dataPackage.setSuccessorId(null); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/service/DataPackageAttachmentShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/service/DataPackageAttachmentShadowCopyServiceTest.java index 7512fd6e176..f8ddacba1a0 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/service/DataPackageAttachmentShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/service/DataPackageAttachmentShadowCopyServiceTest.java @@ -60,7 +60,7 @@ public class DataPackageAttachmentShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setup() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); dataAcquisitionProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject(); dataAcquisitionProject.setId(PROJECT_ID); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/service/DataPackageShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/service/DataPackageShadowCopyServiceTest.java index da17d027327..81c6cc70853 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/service/DataPackageShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/service/DataPackageShadowCopyServiceTest.java @@ -53,7 +53,7 @@ public class DataPackageShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setUp() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); DataAcquisitionProject releasedProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject(); releasedProject.setRelease(release); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/datasetmanagement/service/DataSetAttachmentShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/datasetmanagement/service/DataSetAttachmentShadowCopyServiceTest.java index 291a2324075..61ef201c5a8 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/datasetmanagement/service/DataSetAttachmentShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/datasetmanagement/service/DataSetAttachmentShadowCopyServiceTest.java @@ -60,7 +60,7 @@ public class DataSetAttachmentShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setup() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); dataAcquisitionProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject(); dataAcquisitionProject.setId(PROJECT_ID); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/datasetmanagement/service/DataSetShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/datasetmanagement/service/DataSetShadowCopyServiceTest.java index 41f14003341..f4fe4e337cc 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/datasetmanagement/service/DataSetShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/datasetmanagement/service/DataSetShadowCopyServiceTest.java @@ -57,7 +57,7 @@ public class DataSetShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setUp() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); DataAcquisitionProject releasedProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject(); releasedProject.setRelease(release); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/instrumentmanagement/service/InstrumentAttachmentShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/instrumentmanagement/service/InstrumentAttachmentShadowCopyServiceTest.java index d741b6c1e9b..7bd4c71675e 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/instrumentmanagement/service/InstrumentAttachmentShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/instrumentmanagement/service/InstrumentAttachmentShadowCopyServiceTest.java @@ -60,7 +60,7 @@ public class InstrumentAttachmentShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setup() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); dataAcquisitionProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject(); dataAcquisitionProject.setId(PROJECT_ID); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/instrumentmanagement/service/InstrumentShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/instrumentmanagement/service/InstrumentShadowCopyServiceTest.java index 3bf3dfe3d29..d7ef84e4618 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/instrumentmanagement/service/InstrumentShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/instrumentmanagement/service/InstrumentShadowCopyServiceTest.java @@ -53,7 +53,7 @@ public class InstrumentShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setUp() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); DataAcquisitionProject releasedProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject(); releasedProject.setRelease(release); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectShadowCopyServiceTest.java index 6ebb06d858c..5f50c8fb9e2 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectShadowCopyServiceTest.java @@ -44,7 +44,7 @@ public class DataAcquisitionProjectShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setUp() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); DataAcquisitionProject releasedProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject(); releasedProject.setRelease(release); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/questionmanagement/service/QuestionImageShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/questionmanagement/service/QuestionImageShadowCopyServiceTest.java index e52b083e072..8b4738772ce 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/questionmanagement/service/QuestionImageShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/questionmanagement/service/QuestionImageShadowCopyServiceTest.java @@ -61,7 +61,7 @@ public class QuestionImageShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setup() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); dataAcquisitionProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject(); dataAcquisitionProject.setId(PROJECT_ID); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/questionmanagement/service/QuestionShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/questionmanagement/service/QuestionShadowCopyServiceTest.java index 6ab22182cd9..3835ed29dff 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/questionmanagement/service/QuestionShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/questionmanagement/service/QuestionShadowCopyServiceTest.java @@ -58,7 +58,7 @@ public class QuestionShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setUp() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); DataAcquisitionProject releasedProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject(); releasedProject.setRelease(release); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/surveymanagement/service/SurveyAttachmentShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/surveymanagement/service/SurveyAttachmentShadowCopyServiceTest.java index 21b616dfe8f..4a8893394de 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/surveymanagement/service/SurveyAttachmentShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/surveymanagement/service/SurveyAttachmentShadowCopyServiceTest.java @@ -56,7 +56,7 @@ public class SurveyAttachmentShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setup() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); dataAcquisitionProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject(); dataAcquisitionProject.setId(PROJECT_ID); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/surveymanagement/service/SurveyResponseRateImageShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/surveymanagement/service/SurveyResponseRateImageShadowCopyServiceTest.java index 8f2a7d7e1f2..b835daac657 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/surveymanagement/service/SurveyResponseRateImageShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/surveymanagement/service/SurveyResponseRateImageShadowCopyServiceTest.java @@ -56,7 +56,7 @@ public class SurveyResponseRateImageShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setup() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); } @AfterEach diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/surveymanagement/service/SurveyShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/surveymanagement/service/SurveyShadowCopyServiceTest.java index ca1fdca2fd9..f9b88653c86 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/surveymanagement/service/SurveyShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/surveymanagement/service/SurveyShadowCopyServiceTest.java @@ -53,7 +53,7 @@ public class SurveyShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setUp() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); DataAcquisitionProject unreleasedProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject(); unreleasedProject.setRelease(null); diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/variablemanagement/service/VariableShadowCopyServiceTest.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/variablemanagement/service/VariableShadowCopyServiceTest.java index 4caba693c2e..df7421717d1 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/variablemanagement/service/VariableShadowCopyServiceTest.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/variablemanagement/service/VariableShadowCopyServiceTest.java @@ -54,7 +54,7 @@ public class VariableShadowCopyServiceTest extends AbstractTest { @BeforeEach public void setUp() { - release = new Release("1.0.0", LocalDateTime.now(), null, false, null); + release = new Release("1.0.0", LocalDateTime.now(), null, false, null, false); DataAcquisitionProject releasedProject = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject(); releasedProject.setRelease(release); From f48251caa173bb31d480f4acbe5989e619ee1c46 Mon Sep 17 00:00:00 2001 From: theresa Date: Mon, 11 Dec 2023 08:42:40 +0100 Subject: [PATCH 03/49] Another rebase step for dev-2024-2-1 --- .../rest/DaraReleaseResource.java | 17 +++ ...uisitionProjectPostValidationResource.java | 15 ++- .../service/DaraService.java | 119 ++++++++++++++++++ .../service/PostValidationService.java | 78 +++++++++++- .../service/helper/DoiBuilder.java | 3 +- ...ster_analysis_package_pre_release.xml.tmpl | 82 ++++++++++++ ...register_data_package_pre_release.xml.tmpl | 88 +++++++++++++ 7 files changed, 398 insertions(+), 4 deletions(-) create mode 100644 src/main/resources/templates/dara/register_analysis_package_pre_release.xml.tmpl create mode 100644 src/main/resources/templates/dara/register_data_package_pre_release.xml.tmpl diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DaraReleaseResource.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DaraReleaseResource.java index 6dd730b5110..c6199a27886 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DaraReleaseResource.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DaraReleaseResource.java @@ -85,6 +85,23 @@ public List flagQualityData() { return templateExceptionMessages; } + /** + * Pre-Release a project to dara (or update it). + * @throws TemplateException Template Errors of the XML Freemarker Process. + * @throws IOException IO Exception for the XML Freemarker Process. + */ + @RequestMapping(value = "/data-acquisition-projects/{id}/pre-release", + method = RequestMethod.POST) + @Secured(value = {AuthoritiesConstants.PUBLISHER}) + public ResponseEntity preRelease(@PathVariable String id, + @RequestBody @Valid DataAcquisitionProject project) throws IOException, TemplateException { + if (project.isShadow()) { + throw new ShadowCopyReleaseToDaraNotAllowed(); + } + HttpStatus status = this.daraService.registerPreReleaseProjectToDara(project); + return ResponseEntity.status(status).build(); + } + @ExceptionHandler(ShadowCopyReleaseToDaraNotAllowed.class) @ResponseBody @ResponseStatus(HttpStatus.BAD_REQUEST) diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectPostValidationResource.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectPostValidationResource.java index affeb231591..886f6fb3318 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectPostValidationResource.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectPostValidationResource.java @@ -30,7 +30,7 @@ @Slf4j @RequiredArgsConstructor public class DataAcquisitionProjectPostValidationResource { - + private final PostValidationService postValidationService; /** @@ -46,4 +46,17 @@ public ResponseEntity postValidate(@PathVariable String new PostValidationErrorsDto(this.postValidationService.postValidate(id, version)), HttpStatus.OK); } + + /** + * Validate project by id. + */ + @RequestMapping(value = "/data-acquisition-projects/{id}/post-validate-pre-release", + method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) + @Secured(value = {AuthoritiesConstants.PUBLISHER, AuthoritiesConstants.DATA_PROVIDER}) + public ResponseEntity postValidatePreRelease(@PathVariable String id) { + log.debug("REST request for post validation : {}", id); + return new ResponseEntity<>( + new PostValidationErrorsDto(this.postValidationService.postValidatePreRelease(id)), + HttpStatus.OK); + } } diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java index b50b68493bf..a4605f666a2 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java @@ -6,6 +6,8 @@ import java.io.Writer; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; +import java.text.DateFormat; +import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; @@ -118,6 +120,12 @@ public class DaraService { @Value(value = "classpath:templates/dara/register_analysis_package.xml.tmpl") private Resource registerAnalysisPackageXml; + @Value(value = "classpath:templates/dara/register_data_package_pre_release.xml.tmpl") + private Resource registerPreReleaseDataPackageXml; + + @Value(value = "classpath:templates/dara/register_analysis_package_pre_release.xml.tmpl") + private Resource registerPreReleaseAnalysisPackageXml; + @Autowired private DoiBuilder doiBuilder; @@ -197,6 +205,39 @@ public HttpStatus registerOrUpdateProjectToDara(DataAcquisitionProject project) return httpStatusFromDara; } + /** + * Registers or updates a data acquistion project as a pre-release with a given doi to dara. + * + * @param project The Project. + * @return The HttpStatus from Dara Returns a false, if something gone wrong. + * @throws IOException the io exception for non readable xml file. + * @throws TemplateException Exception for filling the template. + */ + public HttpStatus registerPreReleaseProjectToDara(DataAcquisitionProject project) + throws IOException, TemplateException { + String filledTemplate = null; + if (project.getConfiguration().getRequirements().isDataPackagesRequired()) { + // Read data package xml template + String registerXmlStr = + IOUtils.toString(this.registerPreReleaseDataPackageXml.getInputStream(), Charsets.UTF_8); + + // Fill template + filledTemplate = this.fillTemplate(registerXmlStr, this.getTemplateConfiguration(), + this.getDataForPreReleaseDataPackageTemplate(project), KEY_REGISTER_XML_TMPL); + } else if (project.getConfiguration().getRequirements().isAnalysisPackagesRequired()) { + // Read analysis package xml template + String registerXmlStr = + IOUtils.toString(this.registerPreReleaseAnalysisPackageXml.getInputStream(), Charsets.UTF_8); + + // Fill template + filledTemplate = this.fillTemplate(registerXmlStr, this.getTemplateConfiguration(), + this.getDataForPreReleaseAnalysisPackageTemplate(project), KEY_REGISTER_XML_TMPL); + } + // Send Rest Call for Registration + HttpStatus httpStatusFromDara = this.postToDaraImportXml(filledTemplate); + return httpStatusFromDara; + } + /** * Registers or updates a dataset with a given doi to dara. * @@ -357,6 +398,46 @@ private Map getDataForDataPackageTemplate(DataAcquisitionProject return dataForTemplate; } + /** + * Load all needed data for the XML Templates fpr pre release. + * + * @param project The project to find the dataPackage. + * @return Returns a Map of names and the depending objects. If the key is 'dataPackage' so the + * dataPackage object is the value. DataPackage is the name for the object use in + * freemarker. + */ + private Map getDataForPreReleaseDataPackageTemplate(DataAcquisitionProject project) { + + Map dataForTemplate = new HashMap<>(); + + dataForTemplate.put("removeMarkdown", markdownHelper.createRemoveMarkdownMethod()); + + // Get Project Information + dataForTemplate.put("dataAcquisitionProject", project); + + // Get DataPackage Information + DataPackage dataPackage = + this.dataPackageRepository.findOneByDataAcquisitionProjectId(project.getId()); + dataForTemplate.put("dataPackage", dataPackage); + + // Add Availability Controlled + dataForTemplate.put("availabilityControlled", AVAILABILITY_CONTROLLED_DELIVERY); + + if (project.getRelease().getDoiPageLanguage() != null) { + dataForTemplate.put("projectURLLanguage", project.getRelease().getDoiPageLanguage()); + } else { + dataForTemplate.put("projectURLLanguage", "en"); + } + + addDoiAndReleaseInfoToTemplateModel(project, dataForTemplate); // ??? + + DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + String dateSting = formatter.format(project.getEmbargoDate()); + dataForTemplate.put("embargoDate", dateSting); + + return dataForTemplate; + } + private void addDoiAndReleaseInfoToTemplateModel(DataAcquisitionProject project, Map dataForTemplate) { Release release = project.getRelease(); @@ -429,6 +510,44 @@ private Map getDataForAnalysisPackageTemplate(DataAcquisitionPro return dataForTemplate; } + /** + * Load all needed data for the XML Templates for pre release. + * + * @param project The project to find the analysisPackage. + * @return Returns a Map of names and the depending objects. + */ + private Map getDataForPreReleaseAnalysisPackageTemplate(DataAcquisitionProject project) { + + Map dataForTemplate = new HashMap<>(); + + dataForTemplate.put("removeMarkdown", markdownHelper.createRemoveMarkdownMethod()); + + // Get Project Information + dataForTemplate.put("dataAcquisitionProject", project); + + // Get DataPackage Information + AnalysisPackage analysisPackage = + this.analysisPackageRepository.findOneByDataAcquisitionProjectId(project.getId()); + dataForTemplate.put("analysisPackage", analysisPackage); + + // Add Availability Controlled + dataForTemplate.put("availabilityControlled", AVAILABILITY_CONTROLLED_DELIVERY); + + if (project.getRelease().getDoiPageLanguage() != null) { + dataForTemplate.put("projectURLLanguage", project.getRelease().getDoiPageLanguage()); + } else { + dataForTemplate.put("projectURLLanguage", "en"); + } + + addDoiAndReleaseInfoToTemplateModel(project, dataForTemplate); + + DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + String dateSting = formatter.format(project.getEmbargoDate()); + dataForTemplate.put("embargoDate", dateSting); + + return dataForTemplate; + } + private String concatenateUnits(List surveys) { return String.join("; ", surveys.stream() diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/PostValidationService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/PostValidationService.java index 1602f202815..510bbd84014 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/PostValidationService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/PostValidationService.java @@ -119,6 +119,38 @@ public List postValidate(String dataAcquisitionProject return errors; } + /** + * This method handles a reduced post validation of a project. Validation includes checks whether the + * project is defined and whether it includes a data package or an analysis packages. + * + * @param dataAcquisitionProjectId The id of the data acquisition project id. + * @return a list of all post validation errors. + */ + public List postValidatePreRelease(String dataAcquisitionProjectId) { + List errors = new ArrayList<>(); + + Optional project = projectRepository.findById(dataAcquisitionProjectId); + if (!project.isPresent()) { + PostValidationMessageDto error = new PostValidationMessageDto( + "data-acquisition-project" + "-management.error.post-validation.no-project", + Collections.singletonList(dataAcquisitionProjectId)); + return Collections.singletonList(error); + } + + if (SecurityUtils.isUserInRole(AuthoritiesConstants.PUBLISHER)) { + errors = postValidatePreReleaseProject(project.get(), errors); + } + + if (project.get().getConfiguration().getRequirements().isDataPackagesRequired()) { + errors = this.postValidateDataPackages(errors, dataAcquisitionProjectId); + } else if (project.get().getConfiguration().getRequirements().isAnalysisPackagesRequired()) { + errors = this.postValidateAnalysisPackages(errors, dataAcquisitionProjectId, + false); + } + + return errors; + } + private List postValidateSurveys(List errors, String dataAcquisitionProjectId, boolean activateFullReleaseChecks) { try (Stream surveys = @@ -194,13 +226,55 @@ private List postValidateProject(DataAcquisitionProjec return errors; } + /** + * This method handles a reduces validation of a data acquisition project for pre-releases. + * Checks include whether the project has an embargo date, and valid data for data packages or + * analysis packages. + * @param project + * @param errors + * @return + */ + private List postValidatePreReleaseProject(DataAcquisitionProject project, + List errors) { + + Configuration configuration = project.getConfiguration(); + Requirements requirements = configuration.getRequirements(); + List information = new ArrayList<>(); + + if (project.getEmbargoDate() == null) { + PostValidationMessageDto message = new PostValidationMessageDto( + "data-acquisition-project-management.error.post-validation.no-embargo-date", + Collections.singletonList(project.getId())); + errors.add(message); + } + + if (isProjectStateInvalid(requirements.isDataPackagesRequired(), + configuration.getDataPackagesState())) { + information.add("dataPackages"); + } + + if (isProjectStateInvalid(requirements.isAnalysisPackagesRequired(), + configuration.getAnalysisPackagesState())) { + information.add("analysisPackages"); + } + + if (!information.isEmpty()) { + PostValidationMessageDto message = new PostValidationMessageDto( + "data-acquisition-project-management.error.post-validation.requirements-not-met", + information); + errors.add(message); + } + + return errors; + } + private boolean isProjectStateInvalid(boolean required, ProjectState projectState) { return required && (projectState == null || !projectState.isPublisherReady()); } /** * This method checks all potential issues for dataPackage by post-validation. - * + * * @param errors The list of known errors. * @param dataAcquisitionProjectId The project id. * @return The updated list of errors. @@ -221,7 +295,7 @@ private List postValidateDataPackages( /** * This method checks all potential issues for analysis package by post-validation. - * + * * @param errors The list of known errors. * @param dataAcquisitionProjectId The project id. * @return The updated list of errors. diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/helper/DoiBuilder.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/helper/DoiBuilder.java index 71815fc735b..bcf937b5a94 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/helper/DoiBuilder.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/helper/DoiBuilder.java @@ -36,7 +36,8 @@ public class DoiBuilder { */ public String buildDataOrAnalysisPackageDoi(String dataAcquisitionProjectId, Release release) { if (release != null && StringUtils.hasText(dataAcquisitionProjectId) - && Version.valueOf(release.getVersion()).greaterThanOrEqualTo(Version.valueOf("1.0.0"))) { + // && Version.valueOf(release.getVersion()).greaterThanOrEqualTo(Version.valueOf("1.0.0")) + ) { if (environment.acceptsProfiles(Profiles.of(Constants.SPRING_PROFILE_PROD))) { return "10.21249/DZHW:" + stripVersionSuffix(dataAcquisitionProjectId) + ":" + release.getVersion(); diff --git a/src/main/resources/templates/dara/register_analysis_package_pre_release.xml.tmpl b/src/main/resources/templates/dara/register_analysis_package_pre_release.xml.tmpl new file mode 100644 index 00000000000..ea08eebff64 --- /dev/null +++ b/src/main/resources/templates/dara/register_analysis_package_pre_release.xml.tmpl @@ -0,0 +1,82 @@ + + + Collection + + dzhw:${dataAcquisitionProject.masterId}:1.0.0 + ${dataAcquisitionProject.release.version} + + + + <language>de</language> + <titleName>${analysisPackage.title.de}</titleName> + + + <language>en</language> + <titleName>${analysisPackage.title.en}</titleName> + + + + <#list analysisPackage.authors as author> + + + ${author.firstName} + <#if author.middleName??> + ${author.middleName} + + ${author.lastName} + <#if author.orcid??> + + + https://orcid.org/${author.orcid} + ORCID + + + + + + + <#if analysisPackage.institutions??> + <#list analysisPackage.institutions as institution> + + + <#if institution.de??> + ${institution.de} + <#else> + ${institution.en} + + + + + + + + + https://metadata.fdz.dzhw.eu/${projectURLLanguage}/analysis-packages/${analysisPackage.masterId}?version=${dataAcquisitionProject.release.version} + + + ${doi} + + ${releaseDate} + + + ${availabilityControlled} + + de + Download oder Beantragung notwendig unter https://metadata.fdz.dzhw.eu/de/analysis-packages/${analysisPackage.masterId}?version=${dataAcquisitionProject.release.version} + + + en + Download or application necessary under https://metadata.fdz.dzhw.eu/en/analysis-packages/${analysisPackage.masterId}?version=${dataAcquisitionProject.release.version} + + ${embargoDate} + + <#if previousDoi??> + + + ${previousDoi} + DOI + IsNewVersionOf + + + + diff --git a/src/main/resources/templates/dara/register_data_package_pre_release.xml.tmpl b/src/main/resources/templates/dara/register_data_package_pre_release.xml.tmpl new file mode 100644 index 00000000000..8157f82b786 --- /dev/null +++ b/src/main/resources/templates/dara/register_data_package_pre_release.xml.tmpl @@ -0,0 +1,88 @@ + + + Dataset + + dzhw:${dataAcquisitionProject.masterId}:${dataAcquisitionProject.release.version} + ${dataAcquisitionProject.release.version} + + + + <language>de</language> + <titleName>${dataPackage.title.de}</titleName> + + + <language>en</language> + <titleName>${dataPackage.title.en}</titleName> + + + + <#list dataPackage.projectContributors as contributor> + + + ${contributor.firstName} + <#if contributor.middleName??> + ${contributor.middleName} + + ${contributor.lastName} + <#if contributor.orcid??> + + + https://orcid.org/${contributor.orcid} + ORCID + + + + + + + <#if dataPackage.institutions??> + <#list dataPackage.institutions as institution> + + + <#if institution.de??> + ${institution.de} + <#else> + ${institution.en} + + + + + + + + + https://metadata.fdz.dzhw.eu/${projectURLLanguage}/data-packages/${dataPackage.masterId}?version=${dataAcquisitionProject.release.version} + + + ${doi} + + ${releaseDate} + + + ${availabilityControlled} + + de + Beantragung notwendig unter https://metadata.fdz.dzhw.eu/de/data-packages/${dataPackage.masterId}?version=${dataAcquisitionProject.release.version} + + + en + Application necessary under https://metadata.fdz.dzhw.eu/en/data-packages/${dataPackage.masterId}?version=${dataAcquisitionProject.release.version} + + ${embargoDate} + + + + 1 + VerbundFDB + + + <#if previousDoi??> + + + ${previousDoi} + DOI + IsNewVersionOf + + + + From 05b573e88413631d57ca4791386185aa56031a42 Mon Sep 17 00:00:00 2001 From: theresa Date: Mon, 11 Dec 2023 08:44:47 +0100 Subject: [PATCH 04/49] And another rebase step for dev-2024-2-1 --- .../configuration/translations-de.js | 8 + .../configuration/translations-en.js | 8 + ...sition-project-navbar-module.controller.js | 2 +- .../project-cockpit-config.directive.js | 4 +- .../valid-project-version.directive.js | 19 ++- .../resources/daraRelease.resource.js | 7 +- ...quisitionProjectPostValidation.resource.js | 7 +- .../services/postValidation.service.js | 46 +++++- .../release-project-dialog.controller.js | 141 ++++++++++++++++-- .../views/release-project-dialog.html.tmpl | 34 ++++- 10 files changed, 251 insertions(+), 25 deletions(-) diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js index d23b2eca35f..866316aca00 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js @@ -22,6 +22,9 @@ angular.module('metadatamanagementApp').config([ 'prod': 'ACHTUNG: Dies ist das PRODUKTIV-System! Sind Sie sicher?', }, 'confirm-hint': 'Markieren Sie dieses Kästchen, wenn Sie das Projekt wirklich auf diesem System freigeben wollen!', + 'pre-release-hint': 'Das Projekt "{{id}}" ist mit dem Embargo-Datum {{date}} versehen und kann nur vorläufig freigegeben werden. Vorläufig freigegebene Projekte sind nicht in MDM such- oder bestellbar. Die vorläufige Freigabe kann bis zur endgültigen Freigabe nicht zurückgenommen werden. Die Bearbeitung des Projektes ist in der vorläufigen Freigabe weiterhin möglich. Nach Ablauf des Embargo-Datums kann das Projekt in der im Folgenden gewählten Version endgültig freigegeben werden.', + 'release-action': 'Freigeben', + 'pre-release-action': 'Vorläufig freigeben', 'toTweet': "Auf X (ehemals Twitter) veröffentlichen. Der DOI-Link und die Version des Datenaufnahmeprojektes werden automatisch hinzugefügt.", 'tweetTextLabel': "Tweet", 'imagePath1': 'assets/images/thumb_twitter_fdz_1_de.jpg', @@ -32,10 +35,12 @@ angular.module('metadatamanagementApp').config([ 'title': 'Datenaufnahmeprojekte', 'createLabel': 'Neues Datenaufnahmeprojekt anlegen', 'releaseLabel': 'Das Datenaufnahmeprojekt "{{ id }}" freigeben', + 'prereleaseLabel': 'Das Datenaufnahmeprojekt "{{ id }}" vorläufig freigeben', 'dialog-tooltip': { 'create-ok': 'Klicken, um das Datenaufnahmeprojekt zu erzeugen', 'create-cancel': 'Klicken, um den Dialog zu schließen ohne ein Projekt anzulegen', 'release-ok': 'Klicken, um das Projekt freizugeben', + 'pre-release-ok': 'Klicken, um das Projekt vorläufig freizugeben', 'release-cancel': 'Klicken, um den Dialog zu schließen ohne das Projekt freizugeben' } }, @@ -104,6 +109,8 @@ angular.module('metadatamanagementApp').config([ 'not-empty': 'Die Version darf nicht leer sein.', 'pattern': 'Die Version muss von der Form "major.minor.patch" (z.B. "1.0.0") sein.', 'not-parsable-or-not-incremented': 'Die Versionsnummer muss mindestens so hoch sein wie die letzte Version. Die letzte Version war "{{lastVersion}}".', + 'no-major-version-change': 'Die Versionsnummer muss mindestens so hoch sein wie die letzte Version ("{{lastVersion}}"). Sie muss kleiner sein als die nächste Major-Version ("{{nextMajorVersion}}").', + 'no-major-version-change-from-zero': 'Die Versionsnummer muss kleiner sein als die nächste Major-Version ("{{nextMajorVersion}}").', 'size': 'Die Version darf nicht länger als 32 Zeichen sein.' }, 'tweet': { @@ -116,6 +123,7 @@ angular.module('metadatamanagementApp').config([ 'project-has-no-analysisPackage': 'Das Projekt mit der FDZ-ID {{ id }} enthält kein Analysepaket.', 'project-must-have-exactly-one-publication': 'Das Projekt mit der FDZ-ID {{ id }} muss genau eine Publikation enthalten.', 'requirements-not-met': 'Es gibt noch Metadaten die nicht von den Publishern als "fertig" markiert wurden.', + 'no-embargo-date': 'Für das Projekt {{ id }} ist kein Embargo-Datum angegeben.', 'project-has-no-survey': 'Das Projekt mit der FDZ-ID {{ id }} muss mindestens eine Erhebung enthalten.', 'project-has-no-data-set': 'Das Projekt mit der FDZ-ID {{ id }} muss mindestens einen Datensatz enthalten.' }, diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js index ff766bcb128..f6e867cc344 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js @@ -22,6 +22,9 @@ angular.module('metadatamanagementApp').config([ 'prod': 'WARNING: This is the PRODUCTION stage! Are you sure?', }, 'confirm-hint': 'Check this box if you really want to release this project on this system!', + 'pre-release-hint': 'The project "{{id}}" has the embargo date {{date}} and can only be released preliminarily. Preliminarily released projects cannot be searched for or ordered in MDM. The preliminary release cannot be withdrawn until the final release. It is still possible to edit the project during preliminary release. After the embargo date has expired, the project can be released definitively in the version selected below.', + 'release-action': 'Release', + 'pre-release-action': 'Preliminarily release', 'toTweet': "Publish on X (formerly Twitter). The DOI Link and the Version of the Data Acquisition Project will automatically be added.", 'tweetTextLabel': "Tweet", 'imagePath1': 'assets/images/thumb_twitter_fdz_1_en.jpg', @@ -32,10 +35,12 @@ angular.module('metadatamanagementApp').config([ 'title': 'Data Acquisition Projects', 'createLabel': 'Create a new Data Acquisition Project', 'releaseLabel': 'Release Data Acquisition Project "{{ id }}"', + 'prereleaseLabel': 'Preliminarily Release Data Acquisition Project "{{ id }}"', 'dialog-tooltip': { 'create-ok': 'Click to create the Data Acquisition Project', 'create-cancel': 'Click to close the dialog without creating a project', 'release-ok': 'Click to release the project', + 'pre-release-ok': 'Click to preliminarily release the project', 'release-cancel': 'Click to close the dialog without releasing the project' } }, @@ -104,6 +109,8 @@ angular.module('metadatamanagementApp').config([ 'not-empty': 'The version must not be empty.', 'pattern': 'The version must match the pattern "major.minor.patch" (e.g. "1.0.0").', 'not-parsable-or-not-incremented': 'The version number must be at least as high as the last version. The previous version was "{{lastVersion}}".', + 'no-major-version-change': 'The version number must be at least as high as the last version ("{{lastVersion}}"). It must be lower than the next major version ("{{nextMajorVersion}}").', + 'no-major-version-change-from-zero': 'The version number must be lower than the next major version ("{{nextMajorVersion}}").', 'size': 'The version must not contain more than 32 characters.' }, 'tweet': { @@ -116,6 +123,7 @@ angular.module('metadatamanagementApp').config([ 'project-has-no-analysisPackage': 'The Project with the RDC-ID {{ id }} has no analysis package.', 'project-must-have-exactly-one-publication': 'The Project with the RDC-ID {{ id }} must contain exactly one publication.', 'requirements-not-met': 'There are still metadata that have not been marked as "ready" by the publishers.', + 'no-embargo-date': 'Embargo date for project {{ id }} is missing.', 'project-has-no-survey': 'The Project with the RDC-ID {{ id }} must contain at least one survey.', 'project-has-no-data-set': 'The Project with the RDC-ID {{ id }} must contain at least one data set.' }, diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.controller.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.controller.js index 9d194d5d2b5..c3719f9b575 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.controller.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.controller.js @@ -179,7 +179,7 @@ angular.module('metadatamanagementApp') * and wether this date has expired. */ ctrl.isEmbargoDateExpired = function() { - if (ctrl.selectedProject.embargoDate) { + if (ctrl.selectedProject && ctrl.selectedProject.embargoDate) { var current = new Date(); return new Date(ctrl.selectedProject.embargoDate) < current; } diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js index 5ec51ea41c7..14cb750232b 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js @@ -61,11 +61,11 @@ angular.module('metadatamanagementApp') } /** - * Adds 12 hours to the date object toto prevent time zone changes from changing the date + * Adds 3 hours to the date object to prevent daylight saving time changes from changing the date */ ctrl.onEmbargoDateChanged = function() { var embargoDate = new Date(ctrl.project.embargoDate); - embargoDate.setHours(12) + embargoDate.setHours(3) ctrl.project.embargoDate = embargoDate; } } diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/valid-project-version.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/valid-project-version.directive.js index 7f92df903d9..37a82b44fe3 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/valid-project-version.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/valid-project-version.directive.js @@ -6,7 +6,8 @@ angular.module('metadatamanagementApp') restrict: 'A', require: 'ngModel', scope: { - validProjectVersion: '=' + validProjectVersion: '=', + isPreRelease: '=' }, /* jshint -W098 */ link: function(scope, element, attributes, ctrl) { @@ -16,6 +17,22 @@ angular.module('metadatamanagementApp') // consider empty models to be valid return true; } + // in case of pre-releases only allow minor and patch version changes + if (scope.isPreRelease) { + if (!scope.validProjectVersion) { + return $rootScope.bowser + .compareVersions(['1.0.0', modelValue]) === 1; + } else { + var major = scope.validProjectVersion.split(".")[0]; + var highestMajorVersion = +major + 1; + var highestVersion = highestMajorVersion + ".0.0"; + return $rootScope.bowser + .compareVersions([scope.validProjectVersion, modelValue]) <= 0 + && $rootScope.bowser + .compareVersions([highestVersion, modelValue]) > 0; + } + } + if (!scope.validProjectVersion) { // valid if there is no version yet return true; diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/resources/daraRelease.resource.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/resources/daraRelease.resource.js index 5e7911e02fc..1eb92012a7f 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/resources/daraRelease.resource.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/resources/daraRelease.resource.js @@ -10,7 +10,12 @@ angular.module('metadatamanagementApp') id: '@id' }, { 'release': { - method: 'POST' + method: 'POST', + url: '/api/data-acquisition-projects/:id/release' + }, + 'preRelease': { + method: 'POST', + url: '/api/data-acquisition-projects/:id/pre-release' } }); }]); diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/resources/dataAcquisitionProjectPostValidation.resource.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/resources/dataAcquisitionProjectPostValidation.resource.js index 77f95eed315..3241c160b6c 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/resources/dataAcquisitionProjectPostValidation.resource.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/resources/dataAcquisitionProjectPostValidation.resource.js @@ -11,7 +11,12 @@ angular.module('metadatamanagementApp') version: '@version' }, { 'postValidate': { - method: 'POST' + method: 'POST', + url: '/api/data-acquisition-projects/:id/post-validate' + }, + 'postValidatePreRelease': { + method: 'POST', + url: '/api/data-acquisition-projects/:id/post-validate-pre-release' } }); }]); diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/postValidation.service.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/postValidation.service.js index 87cb35b3918..59290001cb4 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/postValidation.service.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/postValidation.service.js @@ -64,9 +64,53 @@ angular.module('metadatamanagementApp').service('DataAcquisitionProjectPostValid }); return deferred.promise; }; + + var postValidatePreRelease = function(id, version) { + var deferred = $q.defer(); + JobLoggingService.start('postValidation'); + DataAcquisitionProjectPostValidationResource.postValidatePreRelease({ + id: id, + version: version + }, function(result) { + // got errors by post validation + if (result.errors.length > 0) { + for (var i = 0; i < result.errors.length; i++) { + var messageParameter = { + id: result.errors[i].messageParameter[0], + toBereferenzedId: result.errors[i].messageParameter[1], + additionalId: result.errors[i].messageParameter[2] + }; + JobLoggingService.error({ + message: result.errors[i].messageId, + messageParams: messageParameter + }); + } + deferred.reject(result); + //no errors by post validation + } else { + JobLoggingService + .success(); + deferred.resolve(); + } + + // After sending errors or success, the process is finished. + JobLoggingService.finish( + 'global.log-messages.post-validation-terminated', { + successes: JobLoggingService.getCurrentJob().successes, + errors: JobLoggingService.getCurrentJob().errors + }); + }, function(error) { + // something went wrong + JobLoggingService.cancel(error.data.error); + deferred.reject(error); + }); + return deferred.promise; + }; + //public, global methods definitions. return { - postValidate: postValidate + postValidate: postValidate, + postValidatePreRelease: postValidatePreRelease }; }]); diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js index 69a0376ec19..8195e44e420 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js @@ -33,6 +33,8 @@ angular.module('metadatamanagementApp') $scope.project = project; $scope.ENV = ENV; $scope.isBetaRelease = false; + $scope.embargoString = $scope.project.embargoDate ? new Date($scope.project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; + var i18nPrefix = 'data-acquisition-project-management.log-messages.' + 'data-acquisition-project.'; $scope.cancel = function() { @@ -139,24 +141,37 @@ angular.module('metadatamanagementApp') }); $scope.ok = function(release) { - DataAcquisitionProjectPostValidationService - .postValidate(project.id, release.version).then(function() { - var compareForBeta = $scope.bowser - .compareVersions(['1.0.0', release.version]); + console.log("releasing", release) + if ($scope.isPreRelease()) { + DataAcquisitionProjectPostValidationService + .postValidatePreRelease(project.id).then(function() { + console.log("Hier:", ) release.lastDate = new Date().toISOString(); + release.isPreRelease = true; project.release = release; project.hasBeenReleasedBefore = true; - - if (compareForBeta === 1) { - //BETA RELEASE - DataAcquisitionProjectResource.save(project).$promise - .then(function() { - SimpleMessageToastService.openSimpleMessageToast( - i18nPrefix + 'released-beta-successfully', { + console.log("Pre-RELEASE") + //Pre RELEASE + DaraReleaseResource.preRelease(project) + .$promise.then(function() { + DataAcquisitionProjectResource.save(project).$promise + .then(function() { + SimpleMessageToastService.openSimpleMessageToast( + i18nPrefix + 'released-successfully', { + id: project.id + }); + CurrentProjectService.setCurrentProject(project); + $mdDialog.hide(); + $state.forceReload(); + }); + }).catch(function() { + delete project.release; + SimpleMessageToastService.openAlertMessageToast( + i18nPrefix + 'dara-released-not-successfully', { id: project.id }); - CurrentProjectService.setCurrentProject(project); $mdDialog.hide(); +<<<<<<< HEAD $state.forceReload(); }).catch(function() { delete project.release; @@ -192,6 +207,11 @@ angular.module('metadatamanagementApp') }); } }).catch(function() { +======= + }); + }).catch(function(error) { + console.log(error) +>>>>>>> 4f0e4b4a97 (#3216: configured release dialog and postvalidation for pre release) $mdDialog.show($mdDialog.alert() .title($translate.instant( i18nPrefix + 'release-not-possible-title', { @@ -207,6 +227,103 @@ angular.module('metadatamanagementApp') })) .ok($translate.instant('global.buttons.ok'))); }); + } else { + DataAcquisitionProjectPostValidationService + .postValidate(project.id, release.version).then(function() { + // var compareForBeta = $scope.bowser + // .compareVersions(['1.0.0', release.version]); + release.lastDate = new Date().toISOString(); + release.isPreRelease = false; + project.release = release; + project.hasBeenReleasedBefore = true; + + // if (compareForBeta === 1) { + // console.log("This is a Beta") + //BETA RELEASE + // DataAcquisitionProjectResource.save(project).$promise + // .then(function() { + // SimpleMessageToastService.openSimpleMessageToast( + // i18nPrefix + 'released-beta-successfully', { + // id: project.id + // }); + // CurrentProjectService.setCurrentProject(project); + // $mdDialog.hide(); + // $state.forceReload(); + // }).catch(function() { + // delete project.release; + // SimpleMessageToastService.openAlertMessageToast( + // i18nPrefix + 'dara-released-not-successfully', { + // id: project.id + // }); + // $mdDialog.hide(); + // }); + // } else { + console.log("Regular") + //REGULAR RELEASE + DaraReleaseResource.release(project) + .$promise.then(function() { + DataAcquisitionProjectResource.save(project).$promise + .then(function() { + SimpleMessageToastService.openSimpleMessageToast( + i18nPrefix + 'released-successfully', { + id: project.id + }); + CurrentProjectService.setCurrentProject(project); + $mdDialog.hide(); + $state.forceReload(); + }); + }).catch(function() { + delete project.release; + SimpleMessageToastService.openAlertMessageToast( + i18nPrefix + 'dara-released-not-successfully', { + id: project.id + }); + $mdDialog.hide(); + }); + // } + }).catch(function() { + $mdDialog.show($mdDialog.alert() + .title($translate.instant( + i18nPrefix + 'release-not-possible-title', { + id: project.id + })) + .textContent($translate.instant( + i18nPrefix + 'release-not-possible', { + id: project.id + })) + .ariaLabel($translate.instant( + i18nPrefix + 'release-not-possible-title', { + id: project.id + })) + .ok($translate.instant('global.buttons.ok'))); + }) + }; + }; + + /** + * Method to check wether the release is going to be a pre-release. If an embargo date is set + * and has not expired it is a pre-release. Otherwise it is a regular release. + */ + $scope.isPreRelease = function() { + if ($scope.project.embargoDate) { + var current = new Date(); + return new Date($scope.project.embargoDate) > current; + } + return false; + }; + + /** + * Method to retrieve the next major version from the current version. + * @returns the next major version as a string + */ + $scope.getNextMajorVersion = function() { + if ($scope.lastVersion != undefined) { + var major = $scope.lastVersion.split(".")[0]; + var highestMajorVersion = +major + 1; + return highestMajorVersion + ".0.0"; + } + return '1.0.0'; + }; }]); diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl index 8b8777b4db2..a1cd7f81e4d 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl @@ -5,7 +5,8 @@

- {{'data-acquisition-project-management.home.releaseLabel' | translate:'{id:"' + project.id + '"}'}} + {{'data-acquisition-project-management.home.prereleaseLabel' | translate:'{id:"' + project.id + '"}'}} + {{'data-acquisition-project-management.home.releaseLabel' | translate:'{id:"' + project.id + '"}'}}

@@ -17,6 +18,13 @@
+ +
+ + info + + {{'data-acquisition-project-management.release.pre-release-hint' | translate:{id: project.id, date: embargoString} }} +
@@ -24,7 +32,7 @@
{{'data-acquisition-project-management.error.release.version.not-empty' | @@ -36,10 +44,18 @@
{{'data-acquisition-project-management.error.release.version.pattern' | translate }}
-
+
{{'data-acquisition-project-management.error.release.version.not-parsable-or-not-incremented' | translate:'{lastVersion: "' + lastVersion + '"}' }}
+
+ {{'data-acquisition-project-management.error.release.version.no-major-version-change-from-zero' | + translate:{nextMajorVersion: getNextMajorVersion()} }} +
+
+ {{'data-acquisition-project-management.error.release.version.no-major-version-change' | + translate:{lastVersion: lastVersion, nextMajorVersion: getNextMajorVersion()} }} +
@@ -55,7 +71,7 @@ - + {{'data-acquisition-project-management.release.pin-to-start-page' | translate }} @@ -128,8 +144,14 @@ {{'data-acquisition-project-management.home.dialog-tooltip.release-cancel' | translate }} - - {{'global.entity.action.ok' | translate}} + + {{'data-acquisition-project-management.release.release-action' | translate}} + + {{'data-acquisition-project-management.home.dialog-tooltip.release-ok' | translate }} + + + + {{'data-acquisition-project-management.release.pre-release-action' | translate}} {{'data-acquisition-project-management.home.dialog-tooltip.release-ok' | translate }} From 95a855d21cf90f1b3b60db3672bf29c42a138d73 Mon Sep 17 00:00:00 2001 From: theresa Date: Mon, 11 Dec 2023 12:12:13 +0100 Subject: [PATCH 05/49] #3216 disabled embargo date input if project is released/pre-released --- .../directives/project-cockpit-config.directive.js | 5 +++++ .../directives/project-cockpit-config.html.tmpl | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js index 14cb750232b..f73a6759a66 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js @@ -27,9 +27,14 @@ angular.module('metadatamanagementApp') }; var isProjectReleased = function() { + console.log("is released", $scope.project.release) return $scope.project.release; }; + ctrl.isEmbargoDateDisabled = function() { + return $scope.project.release ? true : false; + } + ctrl.isProjectRequirementsDisabled = function() { return isNotAssignedPublisher() || isProjectReleased(); }; diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl index 8effbea87f2..f2727a7a319 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl @@ -22,8 +22,8 @@
- - + + delete_forever "Embargo-Date löschen" From c67824517c5ce302a15e7c8a06b60f21e7593e65 Mon Sep 17 00:00:00 2001 From: theresa Date: Tue, 19 Dec 2023 12:57:13 +0100 Subject: [PATCH 06/49] And yet another rebase step for dev-2024-2-1 --- .../analysis-package-detail.controller.js | 2 +- ...lysis-package-edit-or-create.controller.js | 4 +- .../configuration/translations-de.js | 15 ++- .../configuration/translations-en.js | 15 ++- .../metadata-type-state-card.directive.js | 6 +- .../project-cockpit-config.directive.js | 55 +++++++- .../project-cockpit-config.html.tmpl | 6 +- .../project-cockpit-status.directive.js | 121 +++++++++++++++++- .../project-cockpit-status.html.tmpl | 32 +++-- .../project-cockpit-versions.directive.js | 1 + .../project-cockpit-versions.html.tmpl | 16 ++- .../releaseStatusBadge.directive.html.tmpl | 10 +- .../releaseStatusBadge.directive.js | 18 +++ .../valid-project-version.directive.js | 10 +- .../services/projectUpdateAccessService.js | 2 +- .../release-project-dialog.controller.js | 77 ++++++----- .../views/release-project-dialog.html.tmpl | 14 +- .../configuration/translations-de.js | 9 ++ .../configuration/translations-en.js | 8 ++ .../views/data-package-detail.controller.js | 62 ++++++++- .../views/data-package-detail.html.tmpl | 12 +- .../data-package-edit-or-create.controller.js | 4 +- .../data-set-edit-or-create.controller.js | 4 +- .../views/dataSet-detail.controller.js | 2 +- .../views/instrument-detail.controller.js | 2 +- .../instrument-edit-or-create.controller.js | 4 +- ...nalysis-package-search-result.directive.js | 2 +- .../data-package-search-result.directive.js | 2 +- .../data-set-search-result.directive.js | 2 +- .../instrument-search-result.directive.js | 2 +- .../survey-search-result.directive.js | 2 +- .../views/survey-detail.controller.js | 2 +- .../views/survey-edit-or-create.controller.js | 4 +- .../components/fdz/detail-theme.scss | 4 + mdm-frontend/src/scss/main.scss | 5 + 35 files changed, 435 insertions(+), 101 deletions(-) diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js index 581dc79c3d8..55d2c6ff846 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js @@ -175,7 +175,7 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: result.dataAcquisitionProjectId }).$promise.then(function(project) { - ctrl.projectIsCurrentlyReleased = (project.release != null); + ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; ctrl.hasBeenReleasedBefore = project.hasBeenReleasedBefore; diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-edit-or-create.controller.js b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-edit-or-create.controller.js index 60f31214d2d..64b106db6c4 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-edit-or-create.controller.js +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-edit-or-create.controller.js @@ -154,7 +154,7 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: analysisPackage.dataAcquisitionProjectId }).$promise.then(function(project) { - if (project.release != null) { + if (project.release != null && !project.release.isPreRelease) { handleReleasedProject(); } else if (!ProjectUpdateAccessService .isUpdateAllowed(project, 'analysisPackages', true)) { @@ -182,7 +182,7 @@ angular.module('metadatamanagementApp') }); } else { if (CurrentProjectService.getCurrentProject() && - !CurrentProjectService.getCurrentProject().release) { + (!CurrentProjectService.getCurrentProject().release || CurrentProjectService.getCurrentProject().release.isPreRelease)) { if (!ProjectUpdateAccessService .isUpdateAllowed(CurrentProjectService.getCurrentProject(), 'analysisPackages', true)) { diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js index 866316aca00..125b451017f 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js @@ -110,7 +110,7 @@ angular.module('metadatamanagementApp').config([ 'pattern': 'Die Version muss von der Form "major.minor.patch" (z.B. "1.0.0") sein.', 'not-parsable-or-not-incremented': 'Die Versionsnummer muss mindestens so hoch sein wie die letzte Version. Die letzte Version war "{{lastVersion}}".', 'no-major-version-change': 'Die Versionsnummer muss mindestens so hoch sein wie die letzte Version ("{{lastVersion}}"). Sie muss kleiner sein als die nächste Major-Version ("{{nextMajorVersion}}").', - 'no-major-version-change-from-zero': 'Die Versionsnummer muss kleiner sein als die nächste Major-Version ("{{nextMajorVersion}}").', + 'no-beta-version': 'Für das Projekt ist ein Embargo-Datum angegeben. Die Versionsnummer muss daher mindestens "1.0.0" sein.', 'size': 'Die Version darf nicht länger als 32 Zeichen sein.' }, 'tweet': { @@ -133,6 +133,7 @@ angular.module('metadatamanagementApp').config([ 'update-for-data-providers-allowed': 'Die Aktion ist nicht möglich, weil die Metadaten bereits durch die Publisher oder Datengeber:innen als "fertig" markiert wurden', 'project-released': 'Die Aktion ist nicht möglich, weil das Projekt momentan für alle öffentlichen Nutzer:innen freigegeben ist.', 'member-of-assigned-group': 'Die Aktion ist nicht möglich, weil das Projekt momentan der anderen Projektgruppe zugewiesen ist.', + 'embargo-date-not-expired': 'Die Aktion ist nicht möglich, da das Embargo-Datum noch nicht abgelaufen ist.', 'assigned-to-project': 'Die Aktion ist nicht möglich, weil Sie dem Projekt nicht als Publisher oder Datengeber:in zugewiesen sind.', 'not-required': 'Die Aktion ist nicht möglich, weil diese Metadaten in den Projekteinstellungen nicht als "erwartet" markiert wurden.', 'prerequisite-missing-surveys': 'Die Aktion ist nicht möglich, weil das Projekt noch keine Erhebung enthält.', @@ -146,7 +147,8 @@ angular.module('metadatamanagementApp').config([ }, 'releasestatusbadge': { 'released': 'Freigegeben', - 'unreleased': 'Nicht freigegeben' + 'unreleased': 'Nicht freigegeben', + 'pre-released': 'Vorläufig freigegeben' }, 'project-cockpit': { 'title': 'Projekt-Cockpit ({{projectId}})', @@ -240,7 +242,8 @@ angular.module('metadatamanagementApp').config([ 'unhiding-toast': 'Die Version {{version}} des Projektes {{id}} wird in ca. 10 Minuten wieder für alle Benutzer:innen sichtbar sein!', 'button': { 'hide-shadow': 'Diese Version ist aktuell für alle Benutzer:innen sichtbar. Klicken Sie hier, um die Version zu verstecken!', - 'unhide-shadow': 'Diese Version ist aktuell nicht für alle Benutzer:innen sichtbar. Klicken Sie hier, um die Version wieder sichtbar zu machen!' + 'unhide-shadow': 'Diese Version ist aktuell nicht für alle Benutzer:innen sichtbar. Klicken Sie hier, um die Version wieder sichtbar zu machen!', + 'pre-released': 'Diese Version unterliegt bis zum {{date}} einem Embargo durch die Datengeber:innen. Die Veröffentlichung kann erst nach diesem Datum erfolgen.' } } }, @@ -307,7 +310,11 @@ angular.module('metadatamanagementApp').config([ 'version-not-found-alert': 'Ihr Link verweist auf eine Version ({{oldVersion}}) dieser Seite, die es nicht gibt. Hier wird die aktuelle Version ({{newVersion}}) dargestellt.', 'not-master-alert': 'Sie betrachten eine {{hidden?"versteckte":""}} Schattenkopie ({{version}}). ', 'no-order-allowed-alert': 'Sie betrachten eine {{hidden?"versteckte":""}} Schattenkopie ({{version}}), die nicht bestellbar ist. Wählen Sie eine bestellbare Version im Seitenmenü.', - 'current-version':'Hier geht es zur aktuellen Version!' + 'current-version':'Hier geht es zur aktuellen Version!', + 'embargo-alert-provider': 'Dieses Datenpaket unterliegt bis zum [Datum] einem Embargo. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'embargo-alert-order': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es bis zum [Datum] einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'expired-embargo-alert-provider': 'Dieses Datenpaket unterliegt bis zum [Datum] einem Embargo. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'expired-embargo-alert-order': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es sich noch in der Aufbereitung befindet. Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.' } //jscs:enable }; diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js index f6e867cc344..51618fb8583 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js @@ -110,7 +110,7 @@ angular.module('metadatamanagementApp').config([ 'pattern': 'The version must match the pattern "major.minor.patch" (e.g. "1.0.0").', 'not-parsable-or-not-incremented': 'The version number must be at least as high as the last version. The previous version was "{{lastVersion}}".', 'no-major-version-change': 'The version number must be at least as high as the last version ("{{lastVersion}}"). It must be lower than the next major version ("{{nextMajorVersion}}").', - 'no-major-version-change-from-zero': 'The version number must be lower than the next major version ("{{nextMajorVersion}}").', + 'no-beta-version': 'An embargo date is enabled for this project. Therefore, the version number must be at least equal to "1.0.0".', 'size': 'The version must not contain more than 32 characters.' }, 'tweet': { @@ -134,6 +134,7 @@ angular.module('metadatamanagementApp').config([ 'update-for-data-providers-allowed': 'The action is not possible because the metadata has already been marked as "ready" by the publishers or data providers.', 'project-released': 'The action is not possible because the projects metadata is currently open to all public users.', 'member-of-assigned-group': 'The action is not possible because the project is currently assigned to the other project group.', + 'embargo-date-not-expired': 'The action is not possible because the embargo date has not expired yet.', 'assigned-to-project': 'The action is not possible because you are not assigned to the project as a publisher or data provider.', 'not-required': 'The action is not possible because this metadata was not marked as "expected" in the project settings.', 'prerequisite-missing-surveys': 'The action is not possible because the project does not contain any survey.', @@ -147,7 +148,8 @@ angular.module('metadatamanagementApp').config([ }, 'releasestatusbadge': { 'released': 'Released', - 'unreleased': 'Unreleased' + 'unreleased': 'Unreleased', + 'pre-released': 'Preliminarily released' }, 'project-cockpit': { 'title': 'Project-Cockpit ({{projectId}})', @@ -241,7 +243,8 @@ angular.module('metadatamanagementApp').config([ 'unhiding-toast': 'The version {{version}} of the project {{id}} will be visible again for all users in about 10 minutes!', 'button': { 'hide-shadow': 'This version is currently visible for all users. Click here to hide this version!', - 'unhide-shadow': 'This version is currently not visible for all users. Click here to make it available for all users!' + 'unhide-shadow': 'This version is currently not visible for all users. Click here to make it available for all users!', + 'pre-released': 'This version is subject to an embargo until {{ date }}. The final release can only take place after this date.' } } }, @@ -314,7 +317,11 @@ angular.module('metadatamanagementApp').config([ 'version-not-found-alert': 'Your link refers to a version ({{oldVersion}}) of this page which does not exist. This is the current version ({{newVersion}}).', 'not-master-alert': 'This is a {{hidden?"hidden":""}} shadow copy ({{version}}). ', 'no-order-allowed-alert': 'This is a {{hidden?"hidden":""}} shadow copy ({{version}}) which is not orderable. Choose an available version in the side menu. ', - 'current-version': 'Click here to open the current version!' + 'current-version': 'Click here to open the current version!', + 'embargo-alert-provider': 'Dieses Datenpaket unterliegt bis zum [Datum] einem Embargo. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'embargo-alert-order': 'This data package is currently not yet available for order as it is subject to an embargo until [date]. Publication can only take place after this date. Please note that the embargo date does not necessarily correspond to the expected release date, please contact userservice@dzhw.eu if you wish to receive information regarding the release date of the data package.', + 'expired-embargo-alert-provider': 'Dieses Datenpaket unterliegt bis zum [Datum] einem Embargo. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'expired-embargo-alert-order': 'This data package is currently not yet available for order as it is still being prepared. Contact userservice@dzhw.eu if you wish to receive information regarding the release date of the data package.' } //jscs:enable }; diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/metadata-type-state-card.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/metadata-type-state-card.directive.js index d304a60bede..a2f59d5823a 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/metadata-type-state-card.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/metadata-type-state-card.directive.js @@ -201,8 +201,12 @@ angular.module('metadatamanagementApp') } }; + /** + * Whether the project is fully released. + * @returns true if the project is fully released else false + */ ctrl.isProjectReleased = function() { - return ctrl.project.release; + return ctrl.project.release && !ctrl.project.release.isPreRelease; }; if (ctrl.type !== 'publications' && ctrl.type !== 'concepts') { diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js index f73a6759a66..9178e07e1d3 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js @@ -3,7 +3,7 @@ 'use strict'; angular.module('metadatamanagementApp') - .directive('projectCockpitConfig', ['Principal', function(Principal) { + .directive('projectCockpitConfig', ['Principal', 'DataAcquisitionProjectLastReleaseResource', function(Principal, DataAcquisitionProjectLastReleaseResource) { return { restrict: 'E', templateUrl: 'scripts/dataacquisitionprojectmanagement/directives/' + @@ -13,30 +13,75 @@ angular.module('metadatamanagementApp') }, replace: true, controllerAs: 'ctrl', - controller: ['$scope', function($scope) { + controller: ['$scope', '$rootScope', function($scope, $rootScope) { this.project = $scope.project; + this.bowser = $rootScope.bowser; }], /* jshint -W098 */ link: function($scope, elem, attrs, ctrl) { var req = ctrl.project.configuration.requirements; + // Gathering the last release to determine of the embargo date field should be disabled + DataAcquisitionProjectLastReleaseResource.get({id: $scope.project.id}) + .$promise.then(function(lastRelease) { + if (lastRelease && lastRelease.version) { + $scope.lastVersion = lastRelease.version; + if ($scope.lastVersion) { + ctrl.disableEmbargoDate = ctrl.bowser + .compareVersions([$scope.lastVersion, "1.0.0"]) === 1; + } + if (!$scope.lastVersion){ + ctrl.disableEmbargoDate = true; + } + + ctrl.disableEmbargoDate = $scope.project.release ? true : false; + } else { + ctrl.disableEmbargoDate = true; + } + }) + + /** + * Whether the current user is an assigned publisher of the project. + * @returns true if the user is an assigned publisher else false + */ var isNotAssignedPublisher = function() { var loginName = Principal.loginName(); var publishers = _.get(ctrl.project, 'configuration.publishers', []); return publishers.indexOf(loginName) === -1; }; + /** + * Whether the current user is an assigned data provider of the project. + * @returns true if the user is an assigned data provider else false + */ + var isNotAssignedDataprovider = function() { + var loginName = Principal.loginName(); + var publishers = _.get(ctrl.project, 'configuration.dataproviders', []); + return publishers.indexOf(loginName) === -1; + }; + + /** + * Whether the project is released including pre-releases. + * @returns true if the project is released + */ var isProjectReleased = function() { - console.log("is released", $scope.project.release) return $scope.project.release; }; + /** + * Whether the embargo date field should be disabled or not. + * @returns true if user is not assigned to the project or the project is released + */ ctrl.isEmbargoDateDisabled = function() { - return $scope.project.release ? true : false; + return (isNotAssignedPublisher() && isNotAssignedDataprovider()) || isProjectReleased(); } + /** + * Whether the project requirements are disabled + * @returns true if the user is not an assigned publisher or the project is fully released + */ ctrl.isProjectRequirementsDisabled = function() { - return isNotAssignedPublisher() || isProjectReleased(); + return isNotAssignedPublisher() || (isProjectReleased() && !$scope.project.release.isPreRelease); }; ctrl.isUserPublisher = function() { diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl index f2727a7a319..2a469069bdd 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl @@ -23,10 +23,10 @@
- + delete_forever - - "Embargo-Date löschen" + + "Embargo-Date entfernen"
diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js index b64a0cdd94a..5a6ea910f87 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js @@ -153,9 +153,19 @@ angular.module('metadatamanagementApp') setTypeCounts(ctrl.project.id); }); + /** + * Method to toggle the release status of a project. + * If the project is not released yet it will release it. + * If the project is currently released but as a pre-release it will fully release it. + * If the project already is released it will unrelease it. + */ ctrl.toggleReleaseProject = function() { if (ctrl.project.release) { - ProjectReleaseService.unreleaseProject(ctrl.project); + if (ctrl.isPreReleased()) { + ProjectReleaseService.releaseProject(ctrl.project); + } else { + ProjectReleaseService.unreleaseProject(ctrl.project); + } } else { ProjectReleaseService.releaseProject(ctrl.project); } @@ -173,6 +183,115 @@ angular.module('metadatamanagementApp') return true; } + /** + * Checks whether a project is fully released. Full releases are indicated + * with a release object being present but the 'isPreRelease' attribute being set to false. + * @returns true if the project is fully released else false + */ + ctrl.isFullyReleased = function() { + return ctrl.project.release && !ctrl.project.release.isPreRelease ? true : false; + } + + /** + * Checks whether a project is pre-released. Pre-releases are indicated + * with a release object being present but the 'isPreRelease' attribute being set to true. + * @returns true if the project is pre-released else false + */ + ctrl.isPreReleased = function() { + return ctrl.project.release && ctrl.project.release.isPreRelease ? true : false; + } + + // Methods for displaying buttons and tooltips /////////////////// + + /** + * Checks whether the tooltip for disallowed user actions should be shown. + * Only assigned publishers are allowed to release projects. Releases are only allowed if + * the project is assigned to the publisher group. + * @returns true if the user is allowed else false + */ + ctrl.shouldDisplayUserNotAllowedTooltip = function() { + return !ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER' + }; + + /** + * Checks whether the tooltip for regular releases should be shown. + * Regular releases are allowed if the the project is currently not released and there is no embargo date or the + * embargo date has expired. It is also allowed if the project is currently released but in a pre-release and the + * embargo date has expired. + * @returns + */ + ctrl.shouldDisplayReleaseTooltip = function() { + if (!ctrl.project.release && ctrl.isEmbargoDateExpired()) { + return true; + } + if (ctrl.project.release && ctrl.project.release.isPreRelease && ctrl.isEmbargoDateExpired()) { + return true; + } + return false; + }; + + /** + * Checks whether the tooltip for pre-releases should be shown. + * Pre-Releases are allowed if the project is currently not released and there is an unexpired embargo date. + * @returns + */ + ctrl.shouldDisplayPreReleaseTooltip = function() { + return !ctrl.project.release && !ctrl.isEmbargoDateExpired(); + }; + + /** + * Checks whether the tooltip for disallowed release should be shown. + * Releases are not allowed if the project is currenlty pre-released and the mebargo date has not expired yet. + * @returns + */ + ctrl.shouldDisplayReleaseNotAllowedTooltip = function() { + return ctrl.project.release && ctrl.project.release.isPreRelease && !ctrl.isEmbargoDateExpired(); + }; + + /** + * Checks whether the tooltip for unrelease action should be shown. + * Unreleases can only be triggert if the project is fully released. + * @returns + */ + ctrl.shouldDisplayUnreleaseTooltip = function() { + return ctrl.project.release && !ctrl.project.release.isPreRelease; + }; + + /** + * Checks whether the pre-release icon should be shown. + * Pre-Releases are only possible if the project is currently not released and the embargo date is set and has not expired. + */ + ctrl.shouldDisplayPreReleaseIcon = function() { + return !ctrl.project.release && !ctrl.isEmbargoDateExpired(); + } + + /** + * Checks whether the regular release icon should be shown. + * Regular releases are possible if the project is currently not released and there is no embargo date or the embargo date has expired. + * Regular releases are also possible if the project is currently pre-released. + * @returns + */ + ctrl.shouldDisplayRegularReleaseIcon = function() { + if (!ctrl.project.release && ctrl.isEmbargoDateExpired()) { + return true; + } + // is pre-released and embargo date has expired + if (ctrl.project.release && ctrl.project.release.isPreRelease) { + return true; + } + return false; + } + + /** + * Checks whether the unrelease icon should be shown. + * Unreleases are possible if the project is currently fully released. + * @returns + */ + ctrl.shouldDisplayUnreleaseIcon = function() { + return ctrl.project.release && !ctrl.project.release.isPreRelease; + } + + } }; }]); diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.html.tmpl index b01af6b324c..d222ce709ff 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.html.tmpl @@ -4,30 +4,34 @@
- - - {{ctrl.project.release?'global.tooltips.unrelease-project':'global.tooltips.prerelease-project' | translate}} - - + + + {{'data-acquisition-project-management.error.project-update-access.member-of-assigned-group' | translate}} - {{'more_time'}} - - - - {{ctrl.project.release?'global.tooltips.unrelease-project':'global.tooltips.release-project' | translate}} + + {{'global.tooltips.release-project' | translate}} - - {{'data-acquisition-project-management.error.project-update-access.member-of-assigned-group' | translate}} + + {{'global.tooltips.prerelease-project' | translate}} + + + Diese Aktion ist nicht möglich, solange das Embargo-Datum nicht abgelaufen ist. + + + {{'global.tooltips.unrelease-project' | translate}} - {{ctrl.project.release?'stop_screen_share':'screen_share'}} + + {{'more_time'}} + {{'screen_share'}} > + {{'stop_screen_share'}}
- + {{'data-acquisition-project-management.project-cockpit.button.save-assign' | translate}} diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.directive.js index 965f82e782e..be259247e5d 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.directive.js @@ -61,6 +61,7 @@ angular.module('metadatamanagementApp') ctrl.page = page; ctrl.page.number++; ctrl.shadows.forEach(function(shadow) { + shadow.embargoString = shadow.embargoDate ? new Date(shadow.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; DataAcquisitionProjectShadowsActionResource.get({ id: shadow.masterId, version: shadow.release.version diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.html.tmpl index f8e58d58166..e725d657efe 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.html.tmpl @@ -6,28 +6,36 @@ {{('analysis-package-management.detail.label.version' | translate) + ' ' + shadow.release.version}} - {{'(' + ('analysis-package-management.detail.label.published-at' | translate) + ' ' + (shadow.release.lastDate + 'Z' | date:'mediumDate') + ')'}} + {{'(' + ('analysis-package-management.detail.label.published-at' | translate) + ' ' + (shadow.release.lastDate + 'Z' | date:'mediumDate') + ')'}} + {{'(' + ('analysis-package-management.detail.label.pre-published-at' | translate) + ' ' + (shadow.release.lastDate + 'Z' | date:'mediumDate') + ')'}} {{('data-package-management.detail.label.version' | translate) + ' ' + shadow.release.version}} - {{'(' + ('data-package-management.detail.label.published-at' | translate) + ' ' + (shadow.release.lastDate + 'Z' | date:'mediumDate') + ')'}} + {{'(' + ('data-package-management.detail.label.published-at' | translate) + ' ' + (shadow.release.lastDate + 'Z' | date:'mediumDate') + ')'}} + {{'(' + ('data-package-management.detail.label.pre-published-at' | translate) + ' ' + (shadow.release.lastDate + 'Z' | date:'mediumDate') + ')'}} - + visibility_on {{'data-acquisition-project-management.project-cockpit.versions.button.hide-shadow' | translate}} - + visibility_off {{'data-acquisition-project-management.project-cockpit.versions.button.unhide-shadow' | translate}} + + schedule + + {{'data-acquisition-project-management.project-cockpit.versions.button.pre-released' | translate: {date: shadow.embargoString} }} + +
diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseStatusBadge.directive.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseStatusBadge.directive.html.tmpl index 79056e60a43..5a0a85f2297 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseStatusBadge.directive.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseStatusBadge.directive.html.tmpl @@ -1,3 +1,9 @@ - -{{(released ? 'data-acquisition-project-management.releasestatusbadge.released' : 'data-acquisition-project-management.releasestatusbadge.unreleased') | translate}} + + {{'data-acquisition-project-management.releasestatusbadge.unreleased' | translate}} + + {{'data-acquisition-project-management.releasestatusbadge.released' | translate}} + + + {{'data-acquisition-project-management.releasestatusbadge.pre-released'| translate}} + \ No newline at end of file diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseStatusBadge.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseStatusBadge.directive.js index db59e8f6204..af3aa50ce97 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseStatusBadge.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseStatusBadge.directive.js @@ -6,6 +6,24 @@ angular.module('metadatamanagementApp') 'directives/releaseStatusBadge.directive.html.tmpl', scope: { released: '=' + }, + controllerAs: 'ctrl', + controller: ['$scope', function($scope) { + this.project = $scope.project; + }], + /* jshint -W098 */ + link: function($scope, elem, attrs, ctrl) { + ctrl.isPreReleased = function() { + return $scope.released && $scope.released.isPreRelease; + }; + + ctrl.isFullyReleased = function() { + return $scope.released && !$scope.released.isPreRelease; + } + + ctrl.isUnreleased = function() { + return !$scope.released; + } } }; }); diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/valid-project-version.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/valid-project-version.directive.js index 37a82b44fe3..f4dd90e9a47 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/valid-project-version.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/valid-project-version.directive.js @@ -1,5 +1,8 @@ 'use strict'; +/** + * Validator for project versions + */ angular.module('metadatamanagementApp') .directive('validProjectVersion', ['$rootScope', function($rootScope) { return { @@ -7,7 +10,7 @@ angular.module('metadatamanagementApp') require: 'ngModel', scope: { validProjectVersion: '=', - isPreRelease: '=' + hasEmbargoDate: '=' }, /* jshint -W098 */ link: function(scope, element, attributes, ctrl) { @@ -18,10 +21,11 @@ angular.module('metadatamanagementApp') return true; } // in case of pre-releases only allow minor and patch version changes - if (scope.isPreRelease) { + if (scope.hasEmbargoDate) { if (!scope.validProjectVersion) { + // do not allow versions < 1.0.0 return $rootScope.bowser - .compareVersions(['1.0.0', modelValue]) === 1; + .compareVersions(['1.0.0', modelValue]) <= 0; } else { var major = scope.validProjectVersion.split(".")[0]; var highestMajorVersion = +major + 1; diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectUpdateAccessService.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectUpdateAccessService.js index 43140aa6119..65e5f3bfc35 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectUpdateAccessService.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectUpdateAccessService.js @@ -27,7 +27,7 @@ angular.module('metadatamanagementApp').service('ProjectUpdateAccessService', [' }; var isProjectUnreleased = function(project) { - return !project.release; + return !project.release || project.release.isPreRelease; }; var isTypeRequired = function(project, type) { diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js index 8195e44e420..e82400ac5a3 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js @@ -1,5 +1,8 @@ 'use strict'; +/** + * Controller handling project releases + */ angular.module('metadatamanagementApp') .controller('ReleaseProjectDialogController', [ '$scope', @@ -126,6 +129,8 @@ angular.module('metadatamanagementApp') if (lastRelease.version) { $scope.lastVersion = lastRelease.version; $scope.release.version = lastRelease.version; + $scope.release.isPreRelease = lastRelease.isPreRelease; + $scope.release.doiPageLanguage = lastRelease.doiPageLanguage; PinnedDataPackagesService.getPinnedDataPackage().then( function(response) { if (response.data && response.data.id === @@ -140,18 +145,30 @@ angular.module('metadatamanagementApp') $scope.getTweetData(); }); + /** + * Method handling releases. + * In case of a pre-release the project is validated and released + * with the 'isPreRelease' attribute set to true. The metadata is sent to DA|RA. + * If it is not a pre-release the project is validated. If it is a beta release + * with a version < 1.0.0 the project is saved with the release object but no data is send to DA|RA. + * If it is a regular release the project is saved and the metadata is sent to DA|RA. + * @param {*} release + */ $scope.ok = function(release) { - console.log("releasing", release) if ($scope.isPreRelease()) { + // Handling for pre-releases DataAcquisitionProjectPostValidationService .postValidatePreRelease(project.id).then(function() { - console.log("Hier:", ) + var compareForBeta = $scope.bowser + .compareVersions(['1.0.0', release.version]); + // early return in case of beta release + if (compareForBeta === 1) { + return; + } release.lastDate = new Date().toISOString(); release.isPreRelease = true; project.release = release; project.hasBeenReleasedBefore = true; - console.log("Pre-RELEASE") - //Pre RELEASE DaraReleaseResource.preRelease(project) .$promise.then(function() { DataAcquisitionProjectResource.save(project).$promise @@ -230,36 +247,34 @@ angular.module('metadatamanagementApp') } else { DataAcquisitionProjectPostValidationService .postValidate(project.id, release.version).then(function() { - // var compareForBeta = $scope.bowser - // .compareVersions(['1.0.0', release.version]); + var compareForBeta = $scope.bowser + .compareVersions(['1.0.0', release.version]); release.lastDate = new Date().toISOString(); release.isPreRelease = false; project.release = release; project.hasBeenReleasedBefore = true; - - // if (compareForBeta === 1) { - // console.log("This is a Beta") - //BETA RELEASE - // DataAcquisitionProjectResource.save(project).$promise - // .then(function() { - // SimpleMessageToastService.openSimpleMessageToast( - // i18nPrefix + 'released-beta-successfully', { - // id: project.id - // }); - // CurrentProjectService.setCurrentProject(project); - // $mdDialog.hide(); - // $state.forceReload(); - // }).catch(function() { - // delete project.release; - // SimpleMessageToastService.openAlertMessageToast( - // i18nPrefix + 'dara-released-not-successfully', { - // id: project.id - // }); - // $mdDialog.hide(); - // }); - // } else { - console.log("Regular") - //REGULAR RELEASE + project.embargoDate = null; + // handling for beta releases + if (compareForBeta === 1) { + DataAcquisitionProjectResource.save(project).$promise + .then(function() { + SimpleMessageToastService.openSimpleMessageToast( + i18nPrefix + 'released-beta-successfully', { + id: project.id + }); + CurrentProjectService.setCurrentProject(project); + $mdDialog.hide(); + $state.forceReload(); + }).catch(function() { + delete project.release; + SimpleMessageToastService.openAlertMessageToast( + i18nPrefix + 'dara-released-not-successfully', { + id: project.id + }); + $mdDialog.hide(); + }); + } else { + // handling for regular releases DaraReleaseResource.release(project) .$promise.then(function() { DataAcquisitionProjectResource.save(project).$promise @@ -280,7 +295,7 @@ angular.module('metadatamanagementApp') }); $mdDialog.hide(); }); - // } + } }).catch(function() { $mdDialog.show($mdDialog.alert() .title($translate.instant( diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl index a1cd7f81e4d..966f0a2fd3b 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl @@ -32,8 +32,8 @@ + required translate-attr="{'title':'global.entity.validation.required'}" has-embargo-date="project.embargoDate ? true : false" + valid-project-version="lastVersion" ng-disabled="release.isPreRelease">
{{'data-acquisition-project-management.error.release.version.not-empty' | translate}} @@ -44,13 +44,13 @@
{{'data-acquisition-project-management.error.release.version.pattern' | translate }}
-
+
{{'data-acquisition-project-management.error.release.version.not-parsable-or-not-incremented' | translate:'{lastVersion: "' + lastVersion + '"}' }}
-
- {{'data-acquisition-project-management.error.release.version.no-major-version-change-from-zero' | - translate:{nextMajorVersion: getNextMajorVersion()} }} +
+ {{'data-acquisition-project-management.error.release.version.no-beta-version' | + translate }}
{{'data-acquisition-project-management.error.release.version.no-major-version-change' | @@ -62,7 +62,7 @@
{{'data-acquisition-project-management.release.landing-page-hint' | translate}}
- + {{'data-acquisition-project-management.release.landing-page-de-title' | translate }} diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js index 3d0db32c129..30c259d9d2a 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js @@ -64,6 +64,15 @@ angular.module('metadatamanagementApp').config([ 'published-at': 'veröffentlicht am', 'published': 'Veröffentlicht am' }, + 'embargo-warning': { + 'title-order-view': 'Datenpaket unterliegt einem Embargo durch die Datengeber:innen', + 'title-provider-view': 'Datenpaket unterliegt einem Embargo durch die Datengeber:innen', + 'content-order-view': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es bis zum {{ date }} einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'contnet-order-view-expired': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es sich noch in der Aufbereitung befindet. Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'content-provider-view': 'Dieses Datenpaket unterliegt bis zum {{ date }} einem Embargo. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Sie können das Datenpaket weiterhin bearbeiten.', + 'content-provider-view-expired': 'Dieses Datenpaket ist aktuell vorläufig freigegeben. Sie können das Datenpaket bis zur finalen Veröffentlichung bearbeiten.' + + }, 'attachments': { 'table-title': 'Materialien zu diesem Datenpaket', 'attachment-deleted-toast': 'Datei "{{ filename }}" wurde gelöscht!', diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-en.js b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-en.js index 1abff73eb8b..1fbf33aca4e 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-en.js @@ -63,6 +63,14 @@ angular.module('metadatamanagementApp').config([ 'published-at': 'published at', 'published': 'Published at' }, + 'embargo-warning': { + 'title-order-view': 'Datenpaket unterliegt einem Embargo durch die Datengeber:innen', + 'title-provider-view': 'Datenpaket unterliegt einem Embargo durch die Datengeber:innen', + 'content-order-view': 'This data package is currently not yet available for order as it is subject to an embargo until {{ date }}. Publication can only take place after this date. Please note that the embargo date does not necessarily correspond to the expected release date, please contact userservice@dzhw.eu if you wish to receive information regarding the release date of the data package.', + 'contnet-order-view-expired': 'This data package is currently not yet available for order as it is still being prepared. Contact userservice@dzhw.eu if you wish to receive information regarding the release date of the data package.', + 'content-provider-view': 'This data package is subject to an embargo until {{ date }}. The final release can only take place after this date. You can still edit the data package.', + 'content-provider-view-expired': 'This data package is currently preliminarily released. You can still edit the data package.' + }, 'attachments': { 'table-title': 'Documents related to this Data Package', 'attachment-deleted-toast': 'Document "{{ filename }}" has been deleted!', diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js index 27bba188d36..5fbff91e1e8 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js @@ -1,5 +1,12 @@ 'use strict'; +/** + * View implementing the detail page of a data package. The detail page + * displays basic information about the data package and links to its components. + * The view is accessible for all users but provides options to switch to + * editing mode for PUBLISHERS and DATAPROVIDERS. It also offers the + * opportunity to generate the overview of the data package as a PDF file. + */ angular.module('metadatamanagementApp') .controller('DataPackageDetailController', [ 'entity', @@ -86,6 +93,9 @@ angular.module('metadatamanagementApp') var bowser = $rootScope.bowser; + /** + * Method for loading attachments + */ ctrl.loadAttachments = function() { DataAcquisitionProjectAttachmentsResource.get({ id: ctrl.dataPackage.dataAcquisitionProjectId @@ -97,6 +107,11 @@ angular.module('metadatamanagementApp') }); }; + /** + * Whether the data package is beta released (version < 1.0.0) or not. + * @param {*} dataPackage + * @returns true if it is a beta release else false + */ ctrl.isBetaRelease = function(dataPackage) { if (dataPackage.release) { return bowser.compareVersions(['1.0.0', dataPackage @@ -105,12 +120,18 @@ angular.module('metadatamanagementApp') return false; }; + /** + * Listener for deletion event + */ $scope.$on('deletion-completed', function() { //wait for 2 seconds until refresh //in order to wait for elasticsearch reindex $timeout($state.reload, 2000); }); + /** + * init + */ entity.promise.then(function(result) { var fetchFn = DataPackageSearchService.findShadowByIdAndVersion .bind(null, result.masterId, null, ['nested*','variables','questions', @@ -123,7 +144,10 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: result.dataAcquisitionProjectId }).$promise.then(function(project) { - ctrl.projectIsCurrentlyReleased = (project.release != null); + ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); + ctrl.shouldDisplayEditButton = !(project.release != null); + ctrl.embargoDate = project.embargoDate; + ctrl.embargoString = project.embargoDate ? new Date(project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; ctrl.hasBeenReleasedBefore = project.hasBeenReleasedBefore; @@ -189,6 +213,9 @@ angular.module('metadatamanagementApp') }, $log.error).finally(blockUI.stop); + /** + * Scrolling handler + */ ctrl.scroll = function() { var element = $document[0].getElementById('related-objects'); if ($rootScope.bowser.msie) { @@ -197,6 +224,11 @@ angular.module('metadatamanagementApp') element.scrollIntoView({behavior: 'smooth', inline: 'nearest'}); } }; + + /** + * Method to check if edits are allowed and switch to editing page of the + * current data package if so. + */ ctrl.dataPackageEdit = function() { if (ProjectUpdateAccessService .isUpdateAllowed(activeProject, 'dataPackages', true)) { @@ -204,10 +236,17 @@ angular.module('metadatamanagementApp') } }; + /** + * Method to toggle the side nav menu. + */ ctrl.toggleSidenav = function() { $mdSidenav('SideNavBar').toggle(); }; + /** + * Method to generate the data package overview as a PDF. + * @param {*} event + */ ctrl.generateDataPackageOverview = function(event) { $mdDialog.show({ controller: 'CreateOverviewDialogController', @@ -248,5 +287,26 @@ angular.module('metadatamanagementApp') ctrl.isPublisher = function() { return Principal.isPublisher(); }; + + /** + * Whether a warning about the embargo date of the project should be + * displayed. + * @returns true if embargo date is applied else false + */ + ctrl.shouldDisplayEmbargoWarning = function() { + return ctrl.dataPackage.release.isPreRelease; + } + + /** + * Whether the embargo date has expired or not. + * @returns true if it has expired else false + */ + ctrl.isEmbargoDateExpired = function() { + if (ctrl.dataPackage.embargoDate) { + var current = new Date(); + return new Date(ctrl.project.embargoDate) < current; + } + return true; + } }]); diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl index f5978339a38..dd8e98d683e 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl @@ -3,6 +3,16 @@
+ + +

{{ 'data-package-management.detail.embargo-warning.title-order-view' | translate }}

+

{{ 'data-package-management.detail.embargo-warning.title-provider-view' | translate }}

+
+ {{ 'data-package-management.detail.embargo-warning.content-order-view' | translate:{date: ctrl.embargoString} }} + {{ 'data-package-management.detail.embargo-warning.content-order-view-expired' | translate }} + {{ 'data-package-management.detail.embargo-warning.content-provider-view' | translate:{date: ctrl.embargoString} }} + {{ 'data-package-management.detail.embargo-warning.content-provider-view-expired' | translate }} +
@@ -90,7 +100,7 @@ picture_as_pdf + ng-click="ctrl.dataPackageEdit()" ng-if="ctrl.shouldDisplayEditButton"> {{'search-management.buttons.edit-data-package-tooltip' | translate}} diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-edit-or-create.controller.js b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-edit-or-create.controller.js index 833e24e39e3..a61ec069d0b 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-edit-or-create.controller.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-edit-or-create.controller.js @@ -171,7 +171,7 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: dataPackage.dataAcquisitionProjectId }).$promise.then(function(project) { - if (project.release != null) { + if (project.release != null && !project.release.isPreRelease) { handleReleasedProject(); } else if (!ProjectUpdateAccessService .isUpdateAllowed(project, 'dataPackages', true)) { @@ -207,7 +207,7 @@ angular.module('metadatamanagementApp') }); } else { if (CurrentProjectService.getCurrentProject() && - !CurrentProjectService.getCurrentProject().release) { + (!CurrentProjectService.getCurrentProject().release || CurrentProjectService.getCurrentProject().release.isPreRelease)) { if (!ProjectUpdateAccessService .isUpdateAllowed(CurrentProjectService.getCurrentProject(), 'dataPackages', true)) { diff --git a/mdm-frontend/src/app/legacy/datasetmanagement/views/data-set-edit-or-create.controller.js b/mdm-frontend/src/app/legacy/datasetmanagement/views/data-set-edit-or-create.controller.js index 93c32287f15..bb92427535f 100644 --- a/mdm-frontend/src/app/legacy/datasetmanagement/views/data-set-edit-or-create.controller.js +++ b/mdm-frontend/src/app/legacy/datasetmanagement/views/data-set-edit-or-create.controller.js @@ -134,7 +134,7 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: dataSet.dataAcquisitionProjectId }).$promise.then(function(project) { - if (project.release != null) { + if (project.release != null && !project.release.isPreRelease) { handleReleasedProject(); } else if (!ProjectUpdateAccessService .isUpdateAllowed(project, 'data_sets', true)) { @@ -154,7 +154,7 @@ angular.module('metadatamanagementApp') }); } else { if (CurrentProjectService.getCurrentProject() && - !CurrentProjectService.getCurrentProject().release) { + (!CurrentProjectService.getCurrentProject().release || CurrentProjectService.getCurrentProject().release.isPreRelease)) { if (!ProjectUpdateAccessService .isUpdateAllowed(CurrentProjectService.getCurrentProject(), 'data_sets', true)) { diff --git a/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.controller.js b/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.controller.js index ccd380f54fa..199171f3245 100644 --- a/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.controller.js +++ b/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.controller.js @@ -60,7 +60,7 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: result.dataAcquisitionProjectId }).$promise.then(function(project) { - ctrl.projectIsCurrentlyReleased = (project.release != null); + ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; }); diff --git a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js index 6f0a2cfbefe..c4525ac52f0 100644 --- a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js +++ b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js @@ -65,7 +65,7 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: result.dataAcquisitionProjectId }).$promise.then(function(project) { - ctrl.projectIsCurrentlyReleased = (project.release != null); + ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; }); diff --git a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-edit-or-create.controller.js b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-edit-or-create.controller.js index ddc3a3b1bbc..1f41e23f2cc 100644 --- a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-edit-or-create.controller.js +++ b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-edit-or-create.controller.js @@ -167,7 +167,7 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: instrument.dataAcquisitionProjectId }).$promise.then(function(project) { - if (project.release != null) { + if (project.release != null && !project.release.isPreRelease) { handleReleasedProject(); } else if (!ProjectUpdateAccessService .isUpdateAllowed(project, 'instruments', true)) { @@ -188,7 +188,7 @@ angular.module('metadatamanagementApp') }); } else { if (CurrentProjectService.getCurrentProject() && - !CurrentProjectService.getCurrentProject().release) { + (!CurrentProjectService.getCurrentProject().release || CurrentProjectService.getCurrentProject().release.isPreRelease)) { if (!ProjectUpdateAccessService .isUpdateAllowed(CurrentProjectService.getCurrentProject(), 'instruments', true)) { diff --git a/mdm-frontend/src/app/legacy/searchmanagement/directives/analysis-package-search-result.directive.js b/mdm-frontend/src/app/legacy/searchmanagement/directives/analysis-package-search-result.directive.js index 30072150a95..6b56b93ca77 100644 --- a/mdm-frontend/src/app/legacy/searchmanagement/directives/analysis-package-search-result.directive.js +++ b/mdm-frontend/src/app/legacy/searchmanagement/directives/analysis-package-search-result.directive.js @@ -40,7 +40,7 @@ angular.module('metadatamanagementApp').directive('analysispackageSearchResult', id: ctrl.searchResult.dataAcquisitionProjectId }).$promise.then(function(project) { ctrl.project = project; - ctrl.projectIsCurrentlyReleased = (project.release != null); + ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); }); } } diff --git a/mdm-frontend/src/app/legacy/searchmanagement/directives/data-package-search-result.directive.js b/mdm-frontend/src/app/legacy/searchmanagement/directives/data-package-search-result.directive.js index e32afa595f9..8f8c8a9fbe5 100644 --- a/mdm-frontend/src/app/legacy/searchmanagement/directives/data-package-search-result.directive.js +++ b/mdm-frontend/src/app/legacy/searchmanagement/directives/data-package-search-result.directive.js @@ -40,7 +40,7 @@ angular.module('metadatamanagementApp').directive('datapackageSearchResult', id: ctrl.searchResult.dataAcquisitionProjectId }).$promise.then(function(project) { ctrl.project = project; - ctrl.projectIsCurrentlyReleased = (project.release != null); + ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); }); } } diff --git a/mdm-frontend/src/app/legacy/searchmanagement/directives/data-set-search-result.directive.js b/mdm-frontend/src/app/legacy/searchmanagement/directives/data-set-search-result.directive.js index 4c16a99eeb7..4adad12edd1 100644 --- a/mdm-frontend/src/app/legacy/searchmanagement/directives/data-set-search-result.directive.js +++ b/mdm-frontend/src/app/legacy/searchmanagement/directives/data-set-search-result.directive.js @@ -35,7 +35,7 @@ angular.module('metadatamanagementApp').directive('datasetSearchResult', id: $scope.searchResult.dataAcquisitionProjectId }).$promise.then(function(project) { $scope.project = project; - $scope.projectIsCurrentlyReleased = (project.release != null); + $scope.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); }); } $scope.deleteDataSet = function(dataSetId) { diff --git a/mdm-frontend/src/app/legacy/searchmanagement/directives/instrument-search-result.directive.js b/mdm-frontend/src/app/legacy/searchmanagement/directives/instrument-search-result.directive.js index 07a8e9270ba..713cee054e8 100644 --- a/mdm-frontend/src/app/legacy/searchmanagement/directives/instrument-search-result.directive.js +++ b/mdm-frontend/src/app/legacy/searchmanagement/directives/instrument-search-result.directive.js @@ -34,7 +34,7 @@ angular.module('metadatamanagementApp').directive('instrumentSearchResult', id: $scope.searchResult.dataAcquisitionProjectId }).$promise.then(function(project) { $scope.project = project; - $scope.projectIsCurrentlyReleased = (project.release != null); + $scope.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); }); } $scope.deleteInstrument = function(instrumentId) { diff --git a/mdm-frontend/src/app/legacy/searchmanagement/directives/survey-search-result.directive.js b/mdm-frontend/src/app/legacy/searchmanagement/directives/survey-search-result.directive.js index e4f6c1a2c7f..c6000ea7136 100644 --- a/mdm-frontend/src/app/legacy/searchmanagement/directives/survey-search-result.directive.js +++ b/mdm-frontend/src/app/legacy/searchmanagement/directives/survey-search-result.directive.js @@ -35,7 +35,7 @@ angular.module('metadatamanagementApp').directive('surveySearchResult', id: $scope.searchResult.dataAcquisitionProjectId }).$promise.then(function(project) { $scope.project = project; - $scope.projectIsCurrentlyReleased = (project.release != null); + $scope.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); }); } diff --git a/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.controller.js b/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.controller.js index 933000082ad..d4654c7ff76 100644 --- a/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.controller.js +++ b/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.controller.js @@ -65,7 +65,7 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: survey.dataAcquisitionProjectId }).$promise.then(function(project) { - ctrl.projectIsCurrentlyReleased = (project.release != null); + ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; }); diff --git a/mdm-frontend/src/app/legacy/surveymanagement/views/survey-edit-or-create.controller.js b/mdm-frontend/src/app/legacy/surveymanagement/views/survey-edit-or-create.controller.js index 03455e8fc58..fa5d128aad8 100644 --- a/mdm-frontend/src/app/legacy/surveymanagement/views/survey-edit-or-create.controller.js +++ b/mdm-frontend/src/app/legacy/surveymanagement/views/survey-edit-or-create.controller.js @@ -119,7 +119,7 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: survey.dataAcquisitionProjectId }).$promise.then(function(project) { - if (project.release != null) { + if (project.release != null && !project.release.isPreRelease) { handleReleasedProject(); } else if (!ProjectUpdateAccessService .isUpdateAllowed(project, 'surveys', true)) { @@ -147,7 +147,7 @@ angular.module('metadatamanagementApp') }); } else { if (CurrentProjectService.getCurrentProject() && - !CurrentProjectService.getCurrentProject().release) { + (!CurrentProjectService.getCurrentProject().release || CurrentProjectService.getCurrentProject().release.isPreRelease)) { if (!ProjectUpdateAccessService .isUpdateAllowed(CurrentProjectService.getCurrentProject(), 'surveys', true)) { diff --git a/mdm-frontend/src/scss/fdz-theme/components/fdz/detail-theme.scss b/mdm-frontend/src/scss/fdz-theme/components/fdz/detail-theme.scss index 8103cabb212..9d385878d38 100644 --- a/mdm-frontend/src/scss/fdz-theme/components/fdz/detail-theme.scss +++ b/mdm-frontend/src/scss/fdz-theme/components/fdz/detail-theme.scss @@ -31,6 +31,10 @@ $card-border-radius: 2px !default; word-break: break-word; } + .fdz-embargo-warning { + background-color: $brand-warning; + } + .fdz-tag-link-container { display: inline; align-items: baseline; diff --git a/mdm-frontend/src/scss/main.scss b/mdm-frontend/src/scss/main.scss index 419b992cabc..43735819108 100644 --- a/mdm-frontend/src/scss/main.scss +++ b/mdm-frontend/src/scss/main.scss @@ -345,6 +345,11 @@ md-backdrop.md-dialog-backdrop { background-color: #00CC66; } +.fdz-prereleased { + color: #FFFFFF; + background-color: $brand-warning; +} + .fdz-unreleased { background-color: $brand-danger; } From 8954e1aa27a207762f5abb05fa6bea23d184601b Mon Sep 17 00:00:00 2001 From: theresa Date: Tue, 19 Dec 2023 14:28:35 +0100 Subject: [PATCH 07/49] #3216: added translation --- .../datapackagemanagement/configuration/translations-de.js | 1 + .../datapackagemanagement/configuration/translations-en.js | 1 + 2 files changed, 2 insertions(+) diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js index 30c259d9d2a..c29235a6837 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js @@ -62,6 +62,7 @@ angular.module('metadatamanagementApp').config([ }, 'doi': 'DOI', 'published-at': 'veröffentlicht am', + 'pre-published-at': 'vorläufig veröffentlicht am', 'published': 'Veröffentlicht am' }, 'embargo-warning': { diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-en.js b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-en.js index 1fbf33aca4e..e91626e1cf5 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-en.js @@ -61,6 +61,7 @@ angular.module('metadatamanagementApp').config([ }, 'doi': 'DOI', 'published-at': 'published at', + 'pre-published-at': 'preliminarily published at', 'published': 'Published at' }, 'embargo-warning': { From 7d1b1ac770b0bd6c154ca9f02a1ea211b910c801 Mon Sep 17 00:00:00 2001 From: theresa Date: Tue, 19 Dec 2023 15:05:44 +0100 Subject: [PATCH 08/49] #3216: styling of embargo warning --- .../project-cockpit-status.directive.js | 12 +++++++++++ .../configuration/translations-de.js | 2 +- .../views/data-package-detail.controller.js | 3 +++ .../views/data-package-detail.html.tmpl | 20 +++++++++++++++---- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js index 5a6ea910f87..cd03362d1eb 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js @@ -221,6 +221,9 @@ angular.module('metadatamanagementApp') * @returns */ ctrl.shouldDisplayReleaseTooltip = function() { + if (!ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER') { + return false; + } if (!ctrl.project.release && ctrl.isEmbargoDateExpired()) { return true; } @@ -236,6 +239,9 @@ angular.module('metadatamanagementApp') * @returns */ ctrl.shouldDisplayPreReleaseTooltip = function() { + if (!ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER') { + return false; + } return !ctrl.project.release && !ctrl.isEmbargoDateExpired(); }; @@ -245,6 +251,9 @@ angular.module('metadatamanagementApp') * @returns */ ctrl.shouldDisplayReleaseNotAllowedTooltip = function() { + if (!ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER') { + return false; + } return ctrl.project.release && ctrl.project.release.isPreRelease && !ctrl.isEmbargoDateExpired(); }; @@ -254,6 +263,9 @@ angular.module('metadatamanagementApp') * @returns */ ctrl.shouldDisplayUnreleaseTooltip = function() { + if (!ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER') { + return false; + } return ctrl.project.release && !ctrl.project.release.isPreRelease; }; diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js index c29235a6837..005e24c3d40 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js @@ -68,7 +68,7 @@ angular.module('metadatamanagementApp').config([ 'embargo-warning': { 'title-order-view': 'Datenpaket unterliegt einem Embargo durch die Datengeber:innen', 'title-provider-view': 'Datenpaket unterliegt einem Embargo durch die Datengeber:innen', - 'content-order-view': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es bis zum {{ date }} einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'content-order-view': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es bis zum {{ date }} einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie {{link}} userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', 'contnet-order-view-expired': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es sich noch in der Aufbereitung befindet. Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', 'content-provider-view': 'Dieses Datenpaket unterliegt bis zum {{ date }} einem Embargo. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Sie können das Datenpaket weiterhin bearbeiten.', 'content-provider-view-expired': 'Dieses Datenpaket ist aktuell vorläufig freigegeben. Sie können das Datenpaket bis zur finalen Veröffentlichung bearbeiten.' diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js index 5fbff91e1e8..4449081137a 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js @@ -86,10 +86,13 @@ angular.module('metadatamanagementApp') publicationsCount: 0, conceptsCount: 0 }; + + console.log(localStorage.getItem('currentView')) ctrl.enableJsonView = Principal .hasAnyAuthority(['ROLE_PUBLISHER', 'ROLE_ADMIN']); ctrl.showRemarks = Principal .hasAnyAuthority(['ROLE_PUBLISHER']); + ctrl.isOrderView = localStorage.getItem('currentView') === 'orderView'; var bowser = $rootScope.bowser; diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl index dd8e98d683e..db1e23acb5a 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl @@ -8,10 +8,22 @@

{{ 'data-package-management.detail.embargo-warning.title-order-view' | translate }}

{{ 'data-package-management.detail.embargo-warning.title-provider-view' | translate }}

- {{ 'data-package-management.detail.embargo-warning.content-order-view' | translate:{date: ctrl.embargoString} }} - {{ 'data-package-management.detail.embargo-warning.content-order-view-expired' | translate }} - {{ 'data-package-management.detail.embargo-warning.content-provider-view' | translate:{date: ctrl.embargoString} }} - {{ 'data-package-management.detail.embargo-warning.content-provider-view-expired' | translate }} + + + + + + + + + + + + + + + +
From fe939d152b2065f4c3c2ac04e27a9dff6c7b8201 Mon Sep 17 00:00:00 2001 From: theresa Date: Tue, 19 Dec 2023 15:16:26 +0100 Subject: [PATCH 09/49] #3216: disbaled ordering for pre-released projects --- .../components/analysis-package-configurator.controller.js | 4 ++++ .../components/data-package-configurator.controller.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js b/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js index 2177dae5048..1da5fa7b9d8 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js @@ -117,6 +117,10 @@ if ($rootScope.bowser.compareVersions(['1.0.0', version]) === 1) { $ctrl.noFinalRelease = true; } + if ($ctrl.analysisPackage.release && $ctrl.analysisPackage.release.isPreRelease) { + // disable ordering on case of pre-release + $ctrl.noFinalRelease = true; + } loadVersion($ctrl.analysisPackage.dataAcquisitionProjectId, id); $ctrl.dataPackages.length = 0; _.forEach($ctrl.analysisPackage.analysisDataPackages, diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js index 3a12650b732..c67ab4670a9 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js @@ -118,6 +118,10 @@ if ($rootScope.bowser.compareVersions(['1.0.0', version]) === 1) { $ctrl.noFinalRelease = true; } + if ($ctrl.dataPackage.release && $ctrl.dataPackage.release.isPreRelease) { + // disable ordering on case of pre-release + $ctrl.noFinalRelease = true; + } loadVersion($ctrl.dataPackage.dataAcquisitionProjectId, id); } }, function() { From d465a71180a822f39d886c8355d6ef13f28dafcc Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 21 Dec 2023 15:19:54 +0100 Subject: [PATCH 10/49] #3216: updated dara template, implemented pre-release handling for shadow copies --- .../projectmanagement/service/DaraService.java | 4 ++-- .../DataAcquisitionProjectManagementService.java | 9 +++++++++ .../DataAcquisitionProjectVersionsService.java | 4 +++- .../service/ShadowCopyQueueItemService.java | 12 +++++++----- .../service/ShadowCopyingEndedEvent.java | 13 ++++++++----- .../dara/register_data_package_pre_release.xml.tmpl | 8 +------- 6 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java index a4605f666a2..eb60e298525 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java @@ -421,7 +421,7 @@ private Map getDataForPreReleaseDataPackageTemplate(DataAcquisit dataForTemplate.put("dataPackage", dataPackage); // Add Availability Controlled - dataForTemplate.put("availabilityControlled", AVAILABILITY_CONTROLLED_DELIVERY); + dataForTemplate.put("availabilityControlled", AVAILABILITY_CONTROLLED_NOT_AVAILABLE); if (project.getRelease().getDoiPageLanguage() != null) { dataForTemplate.put("projectURLLanguage", project.getRelease().getDoiPageLanguage()); @@ -531,7 +531,7 @@ private Map getDataForPreReleaseAnalysisPackageTemplate(DataAcqu dataForTemplate.put("analysisPackage", analysisPackage); // Add Availability Controlled - dataForTemplate.put("availabilityControlled", AVAILABILITY_CONTROLLED_DELIVERY); + dataForTemplate.put("availabilityControlled", AVAILABILITY_CONTROLLED_NOT_AVAILABLE); if (project.getRelease().getDoiPageLanguage() != null) { dataForTemplate.put("projectURLLanguage", project.getRelease().getDoiPageLanguage()); diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java index ed632655413..20fb4d69ea8 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java @@ -230,6 +230,8 @@ private boolean isProjectBeingReleased(DataAcquisitionProject oldProject, if (oldRelease == null && newRelease != null) { return true; + } else if (oldRelease != null && oldRelease.getIsPreRelease() && newRelease != null) { + return true; } else { return false; } @@ -314,8 +316,15 @@ public void onShadowCopyingEnded(ShadowCopyingEndedEvent shadowCopyingEndedEvent throws IOException, TemplateException { switch (shadowCopyingEndedEvent.getAction()) { case CREATE: + // hint: releases after pre-releases do not count as rereleases at this point if (shadowCopyingEndedEvent.isRerelease()) { // do not send mails for rereleases + if (shadowCopyingEndedEvent.isReleaseAfterPreRelease()) { + // in case of a release after a pre-release update info on Dara + daraService + .registerOrUpdateProjectToDara(shadowCopyingEndedEvent.getDataAcquisitionProjectId() + + "-" + shadowCopyingEndedEvent.getRelease().getVersion()); + } return; } Version currentVersion = Version.valueOf(shadowCopyingEndedEvent.getRelease().getVersion()); diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java index b8fd76cd2c2..5de06c9a7d8 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java @@ -82,7 +82,9 @@ public Release findLastRelease(String id) { public Release findPreviousRelease(String id, Release currentRelease) { try (Stream> shadows = javers.findShadowsAndStream( QueryBuilder.byValueObjectId(id, DataAcquisitionProject.class, "release") - .withChangedProperty("version").build());) { + .withChangedProperty("version") + .withChangedProperty("isPreRelease") + .build());) { if (currentRelease == null) { Optional> optional = shadows.findFirst(); if (optional.isPresent()) { diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyQueueItemService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyQueueItemService.java index c130a47dde1..ef7c05e8dd2 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyQueueItemService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyQueueItemService.java @@ -137,21 +137,23 @@ public void executeShadowCopyActions() { getPreviousReleaseVersion(dataAcquisitionProject, release); emitShadowCopyingStartedEvent(dataAcquisitionProject, release, previousReleaseVersion, task.getAction()); + // check if its a real re-release or a release after a pre-release + boolean isReleaseAfterPreRelease = existingShadow.isPresent() && existingShadow.get().getRelease().getIsPreRelease(); emitShadowCopyingEndedEvent(dataAcquisitionProject, release, previousReleaseVersion, - existingShadow.isPresent(), task.getAction()); + existingShadow.isPresent(), task.getAction(), isReleaseAfterPreRelease); break; case HIDE: case UNHIDE: emitShadowCopyingStartedEvent(dataAcquisitionProject, release, null, task.getAction()); emitShadowCopyingEndedEvent(dataAcquisitionProject, release, null, true, - task.getAction()); + task.getAction(), false); break; case DELETE: emitShadowCopyingStartedEvent(dataAcquisitionProject, release, null, task.getAction()); emitShadowCopyingEndedEvent(dataAcquisitionProject, release, null, false, - task.getAction()); + task.getAction(), false); break; default: throw new IllegalArgumentException( @@ -172,10 +174,10 @@ public void executeShadowCopyActions() { } private void emitShadowCopyingEndedEvent(DataAcquisitionProject dataAcquisitionProject, - Release release, String previousReleaseVersion, boolean isRerelease, Action action) { + Release release, String previousReleaseVersion, boolean isRerelease, Action action, boolean isReleaseAfterPreRelease) { this.applicationEventPublisher .publishEvent(new ShadowCopyingEndedEvent(this, dataAcquisitionProject.getMasterId(), - release, previousReleaseVersion, isRerelease, action)); + release, previousReleaseVersion, isRerelease, action, isReleaseAfterPreRelease)); } private void setupSecurityContext(ShadowCopyQueueItem shadowCopyQueueItem) { diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyingEndedEvent.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyingEndedEvent.java index 7ecb9311309..0253519ef08 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyingEndedEvent.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyingEndedEvent.java @@ -13,7 +13,7 @@ */ @Getter public class ShadowCopyingEndedEvent extends ApplicationEvent { - + private static final long serialVersionUID = 549634157200620526L; private String dataAcquisitionProjectId; @@ -21,14 +21,16 @@ public class ShadowCopyingEndedEvent extends ApplicationEvent { private String previousReleaseVersion; private Release release; - + private boolean isRerelease; - + + private boolean isReleaseAfterPreRelease; + private Action action; /** * Create a new event instance. - * + * * @param source Event emitter reference * @param dataAcquisitionProjectId master id of the released project * @param release the version which has been released @@ -36,12 +38,13 @@ public class ShadowCopyingEndedEvent extends ApplicationEvent { * @param isRerelease true if the project has been released with this version before */ public ShadowCopyingEndedEvent(Object source, String dataAcquisitionProjectId, - Release release, String previousReleaseVersion, boolean isRerelease, Action action) { + Release release, String previousReleaseVersion, boolean isRerelease, Action action, boolean isReleaseAfterPreRelease) { super(source); this.dataAcquisitionProjectId = dataAcquisitionProjectId; this.previousReleaseVersion = previousReleaseVersion; this.release = release; this.isRerelease = isRerelease; + this.isReleaseAfterPreRelease = isReleaseAfterPreRelease; this.action = action; } } diff --git a/src/main/resources/templates/dara/register_data_package_pre_release.xml.tmpl b/src/main/resources/templates/dara/register_data_package_pre_release.xml.tmpl index 8157f82b786..bfda4cf9603 100644 --- a/src/main/resources/templates/dara/register_data_package_pre_release.xml.tmpl +++ b/src/main/resources/templates/dara/register_data_package_pre_release.xml.tmpl @@ -2,7 +2,7 @@ Dataset - dzhw:${dataAcquisitionProject.masterId}:${dataAcquisitionProject.release.version} + dzhw:${dataAcquisitionProject.masterId}:1.0.0 ${dataAcquisitionProject.release.version} @@ -70,12 +70,6 @@ ${embargoDate} - - - 1 - VerbundFDB - - <#if previousDoi??> From e554507f1a412e452f6b2cb9dda521b0a950aa2e Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 21 Dec 2023 15:25:09 +0100 Subject: [PATCH 11/49] #3216: outsourced release button, added directive for embargo warning --- .../analysis-package-detail.controller.js | 1 + .../views/analysis-package-detail.html.tmpl | 2 +- .../configuration/translations-de.js | 19 ++ .../configuration/translations-en.js | 21 ++ .../embargo-warning.directive.js | 48 +++++ .../embargo-warning/embargo-warning.html.tmpl | 28 +++ ...sition-project-navbar-module.controller.js | 10 +- ...cquisition-project-navbar-module.html.tmpl | 13 +- .../project-cockpit-status.directive.js | 152 -------------- .../project-cockpit-status.html.tmpl | 25 +-- .../directives/releaseButton.directive.js | 198 ++++++++++++++++++ .../directives/releaseButton.html.tmpl | 32 +++ .../configuration/translations-de.js | 9 - .../configuration/translations-en.js | 8 - .../views/data-package-detail.controller.js | 10 +- .../views/data-package-detail.html.tmpl | 24 +-- .../views/dataSet-detail.controller.js | 3 + .../views/dataSet-detail.html.tmpl | 3 +- .../views/instrument-detail.controller.js | 3 + .../views/instrument-detail.html.tmpl | 3 +- .../data-package-configurator.controller.js | 126 ++++++----- .../data-package-configurator.html.tmpl | 7 +- .../views/survey-detail.controller.js | 3 + .../views/survey-detail.html.tmpl | 3 +- .../components/fdz/detail-theme.scss | 1 + 25 files changed, 461 insertions(+), 291 deletions(-) create mode 100644 mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js create mode 100644 mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-en.js create mode 100644 mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js create mode 100644 mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.html.tmpl create mode 100644 mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js create mode 100644 mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.html.tmpl diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js index 55d2c6ff846..efe6df3a31b 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js @@ -176,6 +176,7 @@ angular.module('metadatamanagementApp') id: result.dataAcquisitionProjectId }).$promise.then(function(project) { ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); + ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; ctrl.hasBeenReleasedBefore = project.hasBeenReleasedBefore; diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.html.tmpl b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.html.tmpl index 653a755945d..c27eb990b79 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.html.tmpl +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.html.tmpl @@ -104,7 +104,7 @@
+ ng-click="ctrl.analysisPackageEdit()" ng-if="ctrl.shouldDisplayEditButton"> {{'search-management.buttons.edit-analysis-package-tooltip' | translate}} diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js new file mode 100644 index 00000000000..fd84789d6e2 --- /dev/null +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js @@ -0,0 +1,19 @@ +'use strict'; + +angular.module('metadatamanagementApp').config([ + '$translateProvider', + + function ($translateProvider) { + var translations = { + //jscs:disable + 'embargo-warning': { + 'title-order-view': 'Datenpaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', + 'title-provider-view': 'Datenpaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', + 'content-order-view': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es bis zum {{ dateString }} einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie {{link}} userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'content-order-view-expired': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es sich noch in der Aufbereitung befindet. Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'content-provider-view': 'Dieses Datenpaket unterliegt bis zum {{ dateString }} einem Embargo. Die finale Veröffentlichung kann erst nach diesem Datum erfolgen. Das Datenpaket kann weiterhin bearbeitet werden.', + 'content-provider-view-expired': 'Dieses Datenpaket ist aktuell noch nicht final freigegeben. Das Datenpaket kann bis zur finalen Veröffentlichung bearbeitet werden.' + } + } + $translateProvider.translations('de', translations); + }]) \ No newline at end of file diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-en.js b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-en.js new file mode 100644 index 00000000000..edc7602e458 --- /dev/null +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-en.js @@ -0,0 +1,21 @@ +'use strict'; + +angular.module('metadatamanagementApp').config([ + '$translateProvider', + + function ($translateProvider) { + var translations = { + //jscs:disable + 'embargo-warning': { + 'data-package': { + 'title-order-view': 'Datenpaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', + 'title-provider-view': 'Datenpaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', + 'content-order-view': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es bis zum {{ date }} einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie {{link}} userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'content-order-view-expired': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es sich noch in der Aufbereitung befindet. Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'content-provider-view': 'Dieses Datenpaket unterliegt bis zum {{ date }} einem Embargo. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Sie können das Datenpaket weiterhin bearbeiten.', + 'content-provider-view-expired': 'Dieses Datenpaket ist aktuell vorläufig freigegeben. Sie können das Datenpaket bis zur finalen Veröffentlichung bearbeiten.' + } + } + } + $translateProvider.translations('en', translations); + }]) \ No newline at end of file diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js new file mode 100644 index 00000000000..4536a0f6c9a --- /dev/null +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js @@ -0,0 +1,48 @@ +/* global _, bowser */ + +'use strict'; + +angular.module('metadatamanagementApp') + .directive('embargoWarning', ['$state', + function ($state) { + return { + restrict: 'E', + templateUrl: 'scripts/common/embargo-warning/' + + 'embargo-warning.html.tmpl', + scope: { + //isEmbargoDateExpired: '&', + // dateString: '&', + project: '=' + }, + replace: true, + controllerAs: 'ctrl', + + controller: [ + '$scope', '$rootScope', + function ($scope, $rootScope) { + $scope.isOrderView = localStorage.getItem('currentView') === 'orderView'; + console.log($scope.project) + this.project = $scope.project; + this.dateString = this.project.embargoDate ? new Date(this.project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; + }], + + /* jshint -W098 */ + link: function ($scope, elem, attrs, ctrl) { + /* jshint +W098 */ + + /** + * Whether the embargo date has expired or not. + * @returns true if it has expired else false + */ + ctrl.isEmbargoDateExpired = function () { + if (ctrl.project.embargoDate) { + var current = new Date(); + return new Date(ctrl.project.embargoDate) < current; + } + return true; + } + + } + }; + }]); + diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.html.tmpl b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.html.tmpl new file mode 100644 index 00000000000..aa337fccd11 --- /dev/null +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.html.tmpl @@ -0,0 +1,28 @@ + + + + + {{ + 'embargo-warning.title-order-view' | translate: {projectId: project.masterId} }} + {{ + 'embargo-warning.title-provider-view' | translate: {projectId: project.id} }} + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.controller.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.controller.js index c3719f9b575..443d764d20c 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.controller.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.controller.js @@ -7,20 +7,26 @@ angular.module('metadatamanagementApp') 'DataAcquisitionProjectRepositoryClient', 'DataAcquisitionProjectResource', '$mdDialog', 'SimpleMessageToastService', '$translate', 'ElasticSearchAdminService', '$scope', 'Principal', 'ProjectReleaseService', - '$state', 'LanguageService', + '$state', 'LanguageService', 'ProjectUpdateAccessService', function(CurrentProjectService, DataAcquisitionProjectPostValidationService, DataAcquisitionProjectRepositoryClient, DataAcquisitionProjectResource, $mdDialog, SimpleMessageToastService, $translate, ElasticSearchAdminService, $scope, Principal, ProjectReleaseService, $state, - LanguageService) { + LanguageService, ProjectUpdateAccessService) { var ctrl = this; ctrl.hasAuthority = Principal.hasAuthority; var i18nPrefix = 'data-acquisition-project-management.log-messages.' + 'data-acquisition-project.'; ctrl.searchText = ''; ctrl.selectedProject = CurrentProjectService.getCurrentProject(); + ctrl.isAssignedDataProvider = + ProjectUpdateAccessService.isAssignedToProject.bind(null, + ctrl.selectedProject, 'dataProviders'); + ctrl.isAssignedPublisher = + ProjectUpdateAccessService.isAssignedToProject.bind(null, + ctrl.selectedProject, 'publishers'); function showErrorAlert(errorMsg) { SimpleMessageToastService diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.html.tmpl index 9994fa9ebd3..3e92fe6d768 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.html.tmpl @@ -35,18 +35,7 @@ playlist_add_check - - - {{ctrl.selectedProject.release?'global.tooltips.unrelease-project':'global.tooltips.prerelease-project' | translate}} - - {{'more_time'}} - - - - {{ctrl.selectedProject.release?'global.tooltips.unrelease-project':'global.tooltips.release-project' | translate}} - - {{ctrl.selectedProject.release?'stop_screen_share':'screen_share'}} - + diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js index cd03362d1eb..dd95a57053e 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js @@ -152,158 +152,6 @@ angular.module('metadatamanagementApp') $scope.$on('deletion-completed', function() { setTypeCounts(ctrl.project.id); }); - - /** - * Method to toggle the release status of a project. - * If the project is not released yet it will release it. - * If the project is currently released but as a pre-release it will fully release it. - * If the project already is released it will unrelease it. - */ - ctrl.toggleReleaseProject = function() { - if (ctrl.project.release) { - if (ctrl.isPreReleased()) { - ProjectReleaseService.releaseProject(ctrl.project); - } else { - ProjectReleaseService.unreleaseProject(ctrl.project); - } - } else { - ProjectReleaseService.releaseProject(ctrl.project); - } - }; - - /** - * Method to check wether there is an embargo date - * and wether this date has expired. - */ - ctrl.isEmbargoDateExpired = function() { - if (ctrl.project.embargoDate) { - var current = new Date(); - return new Date(ctrl.project.embargoDate) < current; - } - return true; - } - - /** - * Checks whether a project is fully released. Full releases are indicated - * with a release object being present but the 'isPreRelease' attribute being set to false. - * @returns true if the project is fully released else false - */ - ctrl.isFullyReleased = function() { - return ctrl.project.release && !ctrl.project.release.isPreRelease ? true : false; - } - - /** - * Checks whether a project is pre-released. Pre-releases are indicated - * with a release object being present but the 'isPreRelease' attribute being set to true. - * @returns true if the project is pre-released else false - */ - ctrl.isPreReleased = function() { - return ctrl.project.release && ctrl.project.release.isPreRelease ? true : false; - } - - // Methods for displaying buttons and tooltips /////////////////// - - /** - * Checks whether the tooltip for disallowed user actions should be shown. - * Only assigned publishers are allowed to release projects. Releases are only allowed if - * the project is assigned to the publisher group. - * @returns true if the user is allowed else false - */ - ctrl.shouldDisplayUserNotAllowedTooltip = function() { - return !ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER' - }; - - /** - * Checks whether the tooltip for regular releases should be shown. - * Regular releases are allowed if the the project is currently not released and there is no embargo date or the - * embargo date has expired. It is also allowed if the project is currently released but in a pre-release and the - * embargo date has expired. - * @returns - */ - ctrl.shouldDisplayReleaseTooltip = function() { - if (!ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER') { - return false; - } - if (!ctrl.project.release && ctrl.isEmbargoDateExpired()) { - return true; - } - if (ctrl.project.release && ctrl.project.release.isPreRelease && ctrl.isEmbargoDateExpired()) { - return true; - } - return false; - }; - - /** - * Checks whether the tooltip for pre-releases should be shown. - * Pre-Releases are allowed if the project is currently not released and there is an unexpired embargo date. - * @returns - */ - ctrl.shouldDisplayPreReleaseTooltip = function() { - if (!ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER') { - return false; - } - return !ctrl.project.release && !ctrl.isEmbargoDateExpired(); - }; - - /** - * Checks whether the tooltip for disallowed release should be shown. - * Releases are not allowed if the project is currenlty pre-released and the mebargo date has not expired yet. - * @returns - */ - ctrl.shouldDisplayReleaseNotAllowedTooltip = function() { - if (!ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER') { - return false; - } - return ctrl.project.release && ctrl.project.release.isPreRelease && !ctrl.isEmbargoDateExpired(); - }; - - /** - * Checks whether the tooltip for unrelease action should be shown. - * Unreleases can only be triggert if the project is fully released. - * @returns - */ - ctrl.shouldDisplayUnreleaseTooltip = function() { - if (!ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER') { - return false; - } - return ctrl.project.release && !ctrl.project.release.isPreRelease; - }; - - /** - * Checks whether the pre-release icon should be shown. - * Pre-Releases are only possible if the project is currently not released and the embargo date is set and has not expired. - */ - ctrl.shouldDisplayPreReleaseIcon = function() { - return !ctrl.project.release && !ctrl.isEmbargoDateExpired(); - } - - /** - * Checks whether the regular release icon should be shown. - * Regular releases are possible if the project is currently not released and there is no embargo date or the embargo date has expired. - * Regular releases are also possible if the project is currently pre-released. - * @returns - */ - ctrl.shouldDisplayRegularReleaseIcon = function() { - if (!ctrl.project.release && ctrl.isEmbargoDateExpired()) { - return true; - } - // is pre-released and embargo date has expired - if (ctrl.project.release && ctrl.project.release.isPreRelease) { - return true; - } - return false; - } - - /** - * Checks whether the unrelease icon should be shown. - * Unreleases are possible if the project is currently fully released. - * @returns - */ - ctrl.shouldDisplayUnreleaseIcon = function() { - return ctrl.project.release && !ctrl.project.release.isPreRelease; - } - - } }; }]); diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.html.tmpl index d222ce709ff..a537eac03b8 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.html.tmpl @@ -3,30 +3,7 @@
-
- - - - {{'data-acquisition-project-management.error.project-update-access.member-of-assigned-group' | translate}} - - - {{'global.tooltips.release-project' | translate}} - - - {{'global.tooltips.prerelease-project' | translate}} - - - Diese Aktion ist nicht möglich, solange das Embargo-Datum nicht abgelaufen ist. - - - {{'global.tooltips.unrelease-project' | translate}} - - - {{'more_time'}} - {{'screen_share'}} > - {{'stop_screen_share'}} - -
+
diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js new file mode 100644 index 00000000000..0dfde7e7858 --- /dev/null +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js @@ -0,0 +1,198 @@ +/* global _, bowser */ + +'use strict'; + +/** + * Directive for handling the display of the release button within the project management. + */ +angular.module('metadatamanagementApp') + .directive('releaseButton', ['$state', 'ProjectReleaseService', 'ProjectUpdateAccessService', 'CurrentProjectService', + function ($state, ProjectReleaseService, ProjectUpdateAccessService, CurrentProjectService) { + return { + restrict: 'E', + templateUrl: 'scripts/dataacquisitionprojectmanagement/directives/' + + 'releaseButton.html.tmpl', + scope: { + // project: '=', + // isAssignedDataProvider: '=', + // isAssignedPublisher: '=' + }, + replace: true, + controllerAs: 'ctrl', + controller: [ + '$scope', '$rootScope', 'ProjectUpdateAccessService', 'CurrentProjectService', + function ($scope, $rootScope, ProjectUpdateAccessService, CurrentProjectService ) { + }], + + /* jshint -W098 */ + link: function ($scope, elem, attrs, ctrl) { + /* jshint +W098 */ + + ctrl.project = CurrentProjectService.getCurrentProject(); + + /** + * Method to check if the current user is assigned to the project as a publisher + * @returns true if the user is assigned to the project as a publisher else false + */ + ctrl.isAssignedPublisher = function() { + return ProjectUpdateAccessService.isAssignedToProject(ctrl.project, "publishers"); + } + + /** + * Method to check if the current user is assigned to the project as a dataprovider + * @returns true if the user is assigned to the project as a dataprovider else false + */ + ctrl.isAssignedDataProvider = function() { + return ProjectUpdateAccessService.isAssignedToProject(ctrl.project, "dataproviders"); + } + + /** + * Listener for project changed event + */ + $scope.$on('current-project-changed', + function(event, project) { // jshint ignore:line + ctrl.project = CurrentProjectService.getCurrentProject(); + }); + /** + * Method to check wether there is an embargo date + * and wether this date has expired. + */ + ctrl.isEmbargoDateExpired = function () { + if (ctrl.project.embargoDate) { + var current = new Date(); + return new Date(ctrl.project.embargoDate) < current; + } + return true; + } + + /** + * Checks whether a project is pre-released. Pre-releases are indicated + * with a release object being present but the 'isPreRelease' attribute being set to true. + * @returns true if the project is pre-released else false + */ + ctrl.isPreReleased = function () { + return ctrl.project.release && ctrl.project.release.isPreRelease ? true : false; + } + + /** + * Checks whether the tooltip for disallowed user actions should be shown. + * Only assigned publishers are allowed to release projects. Releases are only allowed if + * the project is assigned to the publisher group. + * @returns true if the user is allowed else false + */ + ctrl.shouldDisplayUserNotAllowedTooltip = function () { + return !ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER' + }; + + /** + * Checks whether the tooltip for regular releases should be shown. + * Regular releases are allowed if the the project is currently not released and there is no embargo date or the + * embargo date has expired. It is also allowed if the project is currently released but in a pre-release and the + * embargo date has expired. + * @returns + */ + ctrl.shouldDisplayReleaseTooltip = function () { + if (!ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER') { + return false; + } + if (!ctrl.project.release && ctrl.isEmbargoDateExpired()) { + return true; + } + if (ctrl.project.release && ctrl.project.release.isPreRelease && ctrl.isEmbargoDateExpired()) { + return true; + } + return false; + }; + + /** + * Checks whether the tooltip for pre-releases should be shown. + * Pre-Releases are allowed if the project is currently not released and there is an unexpired embargo date. + * @returns + */ + ctrl.shouldDisplayPreReleaseTooltip = function () { + if (!ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER') { + return false; + } + return !ctrl.project.release && !ctrl.isEmbargoDateExpired(); + }; + + /** + * Checks whether the tooltip for disallowed release should be shown. + * Releases are not allowed if the project is currenlty pre-released and the mebargo date has not expired yet. + * @returns + */ + ctrl.shouldDisplayReleaseNotAllowedTooltip = function () { + if (!ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER') { + return false; + } + return ctrl.project.release && ctrl.project.release.isPreRelease && !ctrl.isEmbargoDateExpired(); + }; + + /** + * Checks whether the tooltip for unrelease action should be shown. + * Unreleases can only be triggert if the project is fully released. + * @returns + */ + ctrl.shouldDisplayUnreleaseTooltip = function () { + if (!ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER') { + return false; + } + return ctrl.project.release && !ctrl.project.release.isPreRelease; + }; + + /** + * Checks whether the pre-release icon should be shown. + * Pre-Releases are only possible if the project is currently not released and the embargo date is set and has not expired. + */ + ctrl.shouldDisplayPreReleaseIcon = function () { + return !ctrl.project.release && !ctrl.isEmbargoDateExpired(); + } + + /** + * Checks whether the regular release icon should be shown. + * Regular releases are possible if the project is currently not released and there is no embargo date or the embargo date has expired. + * Regular releases are also possible if the project is currently pre-released. + * @returns + */ + ctrl.shouldDisplayRegularReleaseIcon = function () { + if (!ctrl.project.release && ctrl.isEmbargoDateExpired()) { + return true; + } + // is pre-released and embargo date has expired + if (ctrl.project.release && ctrl.project.release.isPreRelease) { + return true; + } + return false; + } + + /** + * Checks whether the unrelease icon should be shown. + * Unreleases are possible if the project is currently fully released. + * @returns + */ + ctrl.shouldDisplayUnreleaseIcon = function () { + return ctrl.project.release && !ctrl.project.release.isPreRelease; + } + + /** + * Method to toggle the release status of a project. + * If the project is not released yet it will release it. + * If the project is currently released but as a pre-release it will fully release it. + * If the project already is released it will unrelease it. + */ + ctrl.toggleReleaseProject = function() { + if (ctrl.project.release) { + if (ctrl.isPreReleased()) { + ProjectReleaseService.releaseProject(ctrl.project); + } else { + ProjectReleaseService.unreleaseProject(ctrl.project); + } + } else { + ProjectReleaseService.releaseProject(ctrl.project); + } + }; + + } + }; + }]); + diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.html.tmpl new file mode 100644 index 00000000000..27fbb126e95 --- /dev/null +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.html.tmpl @@ -0,0 +1,32 @@ +
+ + + + {{'data-acquisition-project-management.error.project-update-access.member-of-assigned-group' | translate}} + + + {{'global.tooltips.release-project' | translate}} + + + {{'global.tooltips.prerelease-project' | translate}} + + + Diese Aktion ist nicht möglich, solange das Embargo-Datum nicht abgelaufen ist. + + + {{'global.tooltips.unrelease-project' | translate}} + + + {{'more_time'}} + {{'screen_share'}} + + {{'stop_screen_share'}} + +
\ No newline at end of file diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js index 005e24c3d40..ddb252858e6 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-de.js @@ -65,15 +65,6 @@ angular.module('metadatamanagementApp').config([ 'pre-published-at': 'vorläufig veröffentlicht am', 'published': 'Veröffentlicht am' }, - 'embargo-warning': { - 'title-order-view': 'Datenpaket unterliegt einem Embargo durch die Datengeber:innen', - 'title-provider-view': 'Datenpaket unterliegt einem Embargo durch die Datengeber:innen', - 'content-order-view': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es bis zum {{ date }} einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie {{link}} userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', - 'contnet-order-view-expired': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es sich noch in der Aufbereitung befindet. Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', - 'content-provider-view': 'Dieses Datenpaket unterliegt bis zum {{ date }} einem Embargo. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Sie können das Datenpaket weiterhin bearbeiten.', - 'content-provider-view-expired': 'Dieses Datenpaket ist aktuell vorläufig freigegeben. Sie können das Datenpaket bis zur finalen Veröffentlichung bearbeiten.' - - }, 'attachments': { 'table-title': 'Materialien zu diesem Datenpaket', 'attachment-deleted-toast': 'Datei "{{ filename }}" wurde gelöscht!', diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-en.js b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-en.js index e91626e1cf5..12e61360d94 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/configuration/translations-en.js @@ -64,14 +64,6 @@ angular.module('metadatamanagementApp').config([ 'pre-published-at': 'preliminarily published at', 'published': 'Published at' }, - 'embargo-warning': { - 'title-order-view': 'Datenpaket unterliegt einem Embargo durch die Datengeber:innen', - 'title-provider-view': 'Datenpaket unterliegt einem Embargo durch die Datengeber:innen', - 'content-order-view': 'This data package is currently not yet available for order as it is subject to an embargo until {{ date }}. Publication can only take place after this date. Please note that the embargo date does not necessarily correspond to the expected release date, please contact userservice@dzhw.eu if you wish to receive information regarding the release date of the data package.', - 'contnet-order-view-expired': 'This data package is currently not yet available for order as it is still being prepared. Contact userservice@dzhw.eu if you wish to receive information regarding the release date of the data package.', - 'content-provider-view': 'This data package is subject to an embargo until {{ date }}. The final release can only take place after this date. You can still edit the data package.', - 'content-provider-view-expired': 'This data package is currently preliminarily released. You can still edit the data package.' - }, 'attachments': { 'table-title': 'Documents related to this Data Package', 'attachment-deleted-toast': 'Document "{{ filename }}" has been deleted!', diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js index 4449081137a..7d0ffead5da 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js @@ -87,12 +87,10 @@ angular.module('metadatamanagementApp') conceptsCount: 0 }; - console.log(localStorage.getItem('currentView')) ctrl.enableJsonView = Principal .hasAnyAuthority(['ROLE_PUBLISHER', 'ROLE_ADMIN']); ctrl.showRemarks = Principal .hasAnyAuthority(['ROLE_PUBLISHER']); - ctrl.isOrderView = localStorage.getItem('currentView') === 'orderView'; var bowser = $rootScope.bowser; @@ -148,12 +146,16 @@ angular.module('metadatamanagementApp') id: result.dataAcquisitionProjectId }).$promise.then(function(project) { ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); - ctrl.shouldDisplayEditButton = !(project.release != null); + ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); + ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; ctrl.embargoDate = project.embargoDate; + ctrl.project = project; ctrl.embargoString = project.embargoDate ? new Date(project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; ctrl.hasBeenReleasedBefore = project.hasBeenReleasedBefore; + console.log("provider?", ctrl.projectId) + ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; }); } ctrl.onlyQualitativeData = ContainsOnlyQualitativeDataChecker @@ -307,7 +309,7 @@ angular.module('metadatamanagementApp') ctrl.isEmbargoDateExpired = function() { if (ctrl.dataPackage.embargoDate) { var current = new Date(); - return new Date(ctrl.project.embargoDate) < current; + return new Date(ctrl.dataPackage.embargoDate) < current; } return true; } diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl index db1e23acb5a..4a2ce49d0cd 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl @@ -3,28 +3,8 @@
- - -

{{ 'data-package-management.detail.embargo-warning.title-order-view' | translate }}

-

{{ 'data-package-management.detail.embargo-warning.title-provider-view' | translate }}

-
- - - - - - - - - - - - - - - - -
+ {{ctrl.projectId}} +
diff --git a/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.controller.js b/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.controller.js index 199171f3245..19eb2acebae 100644 --- a/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.controller.js +++ b/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.controller.js @@ -60,9 +60,12 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: result.dataAcquisitionProjectId }).$promise.then(function(project) { + ctrl.project = project; ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); + ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; + ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; }); } ctrl.onlyQualitativeData = ContainsOnlyQualitativeDataChecker diff --git a/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.html.tmpl b/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.html.tmpl index 91296c5be59..db137eafad4 100644 --- a/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.html.tmpl +++ b/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.html.tmpl @@ -3,6 +3,7 @@
+
@@ -51,7 +52,7 @@ picture_as_pdf + ng-click="ctrl.dataSetEdit()" ng-if="ctrl.shouldDisplayEditButton"> {{'search-management.buttons.edit-data-set-tooltip' | translate}} diff --git a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js index c4525ac52f0..b704738a81c 100644 --- a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js +++ b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js @@ -65,9 +65,12 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: result.dataAcquisitionProjectId }).$promise.then(function(project) { + ctrl.project = project; ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); + ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; + ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; }); } ctrl.onlyQualitativeData = ContainsOnlyQualitativeDataChecker diff --git a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.html.tmpl b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.html.tmpl index ef696d17a3a..1d30c9c172b 100644 --- a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.html.tmpl +++ b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.html.tmpl @@ -3,6 +3,7 @@
+
@@ -38,7 +39,7 @@
+ ng-click="ctrl.instrumentEdit()" ng-if="ctrl.shouldDisplayEditButton"> {{'search-management.buttons.edit-instrument-tooltip' | translate}} diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js index c67ab4670a9..8670f2202a0 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js @@ -1,23 +1,42 @@ -/* global _ */ -(function() { +/* globals _ */ +'use strict'; - 'use strict'; - - function DataPackageConfiguratorController($scope, - $rootScope, - $location, - DataAcquisitionProjectReleasesResource, - $state, - $transitions, - LanguageService, - ProjectReleaseService, - ShoppingCartService, - MessageBus, $translate, - DataPackageSearchService, - DataPackageAccessWaysResource, $mdDialog, - DataPackageCitationDialogService, - CurrentDataPackageService, - Principal) { + angular + .module('metadatamanagementApp') + .controller('DataPackageConfiguratorController', [ + '$scope', + '$rootScope', + '$location', + 'DataAcquisitionProjectReleasesResource', + '$state', + '$transitions', + 'LanguageService', + 'ProjectReleaseService', + 'ShoppingCartService', + 'MessageBus', + '$translate', + 'DataPackageSearchService', + 'DataPackageAccessWaysResource', + '$mdDialog', + 'DataPackageCitationDialogService', + 'CurrentDataPackageService', + 'DataAcquisitionProjectResource', + '$q', + function ($scope, + $rootScope, + $location, + DataAcquisitionProjectReleasesResource, + $state, + $transitions, + LanguageService, + ProjectReleaseService, + ShoppingCartService, + MessageBus, $translate, + DataPackageSearchService, + DataPackageAccessWaysResource, $mdDialog, + DataPackageCitationDialogService, + CurrentDataPackageService, + DataAcquisitionProjectResource, $q) { var $ctrl = this; var initReady = false; $ctrl.dataPackageIdVersion = {}; @@ -25,6 +44,7 @@ $ctrl.lang = LanguageService.getCurrentInstantly(); $ctrl.onDataPackageChange = MessageBus; $ctrl.noFinalRelease = false; + $ctrl.isPreReleased = false; $ctrl.variableNotAccessible = false; $ctrl.disabled = false; $scope.bowser = $rootScope.bowser; @@ -80,8 +100,15 @@ .$promise .then( function(releases) { - $ctrl.releases = releases; - if (releases.length === 0) { + var releaseList = []; + console.log(releases) + for (var release of releases) { + if (!release.isPreRelease) { + releaseList.push(release); + } + } + $ctrl.releases = releaseList; + if (releases.length === 0 || rel.length === 0) { $ctrl.noFinalRelease = true; } loadAccessWays(id); @@ -120,8 +147,18 @@ } if ($ctrl.dataPackage.release && $ctrl.dataPackage.release.isPreRelease) { // disable ordering on case of pre-release - $ctrl.noFinalRelease = true; + //$ctrl.noFinalRelease = true; + $ctrl.isPreReleased = true; + console.log("is pre-releases",$ctrl.dataPackage.dataAcquisitionProjectId) + } + DataAcquisitionProjectResource.get({ + id: $ctrl.dataPackage.dataAcquisitionProjectId + }).$promise.then(function(project) { + console.log(project) + $ctrl.project = project + //$ctrl.embargoString = project.embargoDate ? new Date(project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; + }); loadVersion($ctrl.dataPackage.dataAcquisitionProjectId, id); } }, function() { @@ -158,10 +195,10 @@ return _.uniq(dataFormats); }; - $ctrl.showBackToEditButton = function() { - return $ctrl.selectedVersion && Principal.hasAuthority( - 'ROLE_DATA_PROVIDER'); - }; + // $ctrl.showBackToEditButton = function() { + // return $ctrl.selectedVersion && Principal.hasAuthority( + // 'ROLE_DATA_PROVIDER'); + // }; // triggers MessageBus to close the order menu in the parent component $ctrl.closeOrderMenu = function() { @@ -305,29 +342,16 @@ $ctrl.dataPackage, $event); } }; - } - angular - .module('metadatamanagementApp') - .controller('DataPackageConfiguratorController', [ - '$scope', - '$rootScope', - '$location', - 'DataAcquisitionProjectReleasesResource', - '$state', - '$transitions', - 'LanguageService', - 'ProjectReleaseService', - 'ShoppingCartService', - 'MessageBus', - '$translate', - 'DataPackageSearchService', - 'DataPackageAccessWaysResource', - '$mdDialog', - 'DataPackageCitationDialogService', - 'CurrentDataPackageService', - 'Principal', - DataPackageConfiguratorController - ]); - -})(); + /** + * Whether the embargo date has expired or not. + * @returns true if it has expired else false + */ + $ctrl.isEmbargoDateExpired = function() { + if ($ctrl.dataPackage.embargoDate) { + var current = new Date(); + return new Date($ctrl.dataPackage.embargoDate) < current; + } + return true; + } +}]); diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl index 9d1a8f53995..d47a0a0bdd6 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl @@ -76,7 +76,7 @@ {{'shopping-cart.buttons.add-data-package-tooltip' | translate}} @@ -93,7 +93,7 @@ + ng-disabled="!$ctrl.selectedVersion || $ctrl.noFinalRelease || $ctrl.variableNotAccessible || $ctrl.isPreReleased" style="margin-right: 12px; margin-top: 0px;"> {{'shopping-cart.buttons.open-citation-tooltip' | translate}} @@ -119,11 +119,12 @@ {{'shopping-cart.detail.no-final-release' | translate}} +
{{'shopping-cart.detail.maintenance-hint' | translate}}
- + diff --git a/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.controller.js b/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.controller.js index d4654c7ff76..577b9348241 100644 --- a/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.controller.js +++ b/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.controller.js @@ -65,9 +65,12 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: survey.dataAcquisitionProjectId }).$promise.then(function(project) { + ctrl.project = project; ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); + ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; + ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; }); } if (survey.dataType.en !== 'Qualitative Data') { diff --git a/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.html.tmpl b/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.html.tmpl index 5f7a900d929..a60b86e6504 100644 --- a/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.html.tmpl +++ b/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.html.tmpl @@ -3,6 +3,7 @@
+
@@ -52,7 +53,7 @@
+ ng-click="ctrl.surveyEdit()" ng-if="ctrl.shouldDisplayEditButton"> {{'search-management.buttons.edit-survey-tooltip' | translate}} diff --git a/mdm-frontend/src/scss/fdz-theme/components/fdz/detail-theme.scss b/mdm-frontend/src/scss/fdz-theme/components/fdz/detail-theme.scss index 9d385878d38..67610f805aa 100644 --- a/mdm-frontend/src/scss/fdz-theme/components/fdz/detail-theme.scss +++ b/mdm-frontend/src/scss/fdz-theme/components/fdz/detail-theme.scss @@ -33,6 +33,7 @@ $card-border-radius: 2px !default; .fdz-embargo-warning { background-color: $brand-warning; + margin: 0px; } .fdz-tag-link-container { From 2f9c1dbec82f97fc400a68e4fdca2e6a655ebf4d Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 21 Dec 2023 15:29:08 +0100 Subject: [PATCH 12/49] #3216: updated with embargo warning directive --- mdm-frontend/angular.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mdm-frontend/angular.json b/mdm-frontend/angular.json index 3f460ee9668..f14ce23a9d9 100644 --- a/mdm-frontend/angular.json +++ b/mdm-frontend/angular.json @@ -270,6 +270,9 @@ "src/app/legacy/common/datasource/data-source.component.js", "src/app/legacy/common/datasource/data-source.controller.js", "src/app/legacy/common/session-storage/session-storage.service.js", + "src/app/legacy/common/embargo-warning/embargo-warning.directive.js", + "src/app/legacy/common/embargo-warning/configuration/translations-de.js", + "src/app/legacy/common/embargo-warning/configuration/translations-en.js", "src/app/legacy/filemanagement/resources/file.resource.js", "src/app/legacy/filemanagement/services/excelReader.service.js", @@ -456,6 +459,7 @@ "src/app/legacy/dataacquisitionprojectmanagement/directives/releaseStatusBadge.directive.js", "src/app/legacy/dataacquisitionprojectmanagement/directives/metadata-status.js", "src/app/legacy/dataacquisitionprojectmanagement/services/outdatedVersionNotifierService.js", + "src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js", "src/app/legacy/searchmanagement/services/elasticSearch.client.service.js", "src/app/legacy/searchmanagement/services/search.dao.js", From 0ba01582d062cc499fcd07d33241a0e0d3080fa0 Mon Sep 17 00:00:00 2001 From: theresa Date: Wed, 10 Jan 2024 09:09:57 +0100 Subject: [PATCH 13/49] #3216 updated embargo translations --- .../embargo-warning/configuration/translations-de.js | 4 ++-- .../embargo-warning/configuration/translations-en.js | 12 ++++++------ .../embargo-warning/embargo-warning.directive.js | 3 --- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js index fd84789d6e2..d85b9a53235 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js @@ -9,9 +9,9 @@ angular.module('metadatamanagementApp').config([ 'embargo-warning': { 'title-order-view': 'Datenpaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', 'title-provider-view': 'Datenpaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', - 'content-order-view': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es bis zum {{ dateString }} einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie {{link}} userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'content-order-view': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es bis zum {{ date }} einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie {{link}} userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', 'content-order-view-expired': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es sich noch in der Aufbereitung befindet. Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', - 'content-provider-view': 'Dieses Datenpaket unterliegt bis zum {{ dateString }} einem Embargo. Die finale Veröffentlichung kann erst nach diesem Datum erfolgen. Das Datenpaket kann weiterhin bearbeitet werden.', + 'content-provider-view': 'Dieses Datenpaket unterliegt bis zum {{ date }} einem Embargo. Die finale Veröffentlichung kann erst nach diesem Datum erfolgen. Das Datenpaket kann weiterhin bearbeitet werden.', 'content-provider-view-expired': 'Dieses Datenpaket ist aktuell noch nicht final freigegeben. Das Datenpaket kann bis zur finalen Veröffentlichung bearbeitet werden.' } } diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-en.js b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-en.js index edc7602e458..579ac2079f1 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-en.js @@ -8,12 +8,12 @@ angular.module('metadatamanagementApp').config([ //jscs:disable 'embargo-warning': { 'data-package': { - 'title-order-view': 'Datenpaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', - 'title-provider-view': 'Datenpaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', - 'content-order-view': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es bis zum {{ date }} einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie {{link}} userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', - 'content-order-view-expired': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es sich noch in der Aufbereitung befindet. Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', - 'content-provider-view': 'Dieses Datenpaket unterliegt bis zum {{ date }} einem Embargo. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Sie können das Datenpaket weiterhin bearbeiten.', - 'content-provider-view-expired': 'Dieses Datenpaket ist aktuell vorläufig freigegeben. Sie können das Datenpaket bis zur finalen Veröffentlichung bearbeiten.' + 'title-order-view': 'Data package "{{projectId}}" is subject to an embargo set by the data providers', + 'title-provider-view': 'Data package "{{projectId}}" is subject to an embargo set by the data providers', + 'content-order-view': 'This data package is currently not yet available for order as it is subject to an embargo until {{ date }}. Publication can only take place after this date. Please note that the embargo date does not necessarily correspond to the expected release date, please contact userservice@dzhw.eu if you wish to receive information regarding the release date of the data package.', + 'content-order-view-expired': 'This data package is currently not yet available for order as it is still being prepared. Contact userservice@dzhw.eu if you wish to receive information regarding the release date of the data package.', + 'content-provider-view': 'This data package is subject to an embargo until {{ date }}. Publication can only take place after this date. You can still edit the data package', + 'content-provider-view-expired': 'This data package is currently preliminarily released. You can edit the data package until the final release.' } } } diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js index 4536a0f6c9a..054fc9f5152 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js @@ -10,8 +10,6 @@ angular.module('metadatamanagementApp') templateUrl: 'scripts/common/embargo-warning/' + 'embargo-warning.html.tmpl', scope: { - //isEmbargoDateExpired: '&', - // dateString: '&', project: '=' }, replace: true, @@ -21,7 +19,6 @@ angular.module('metadatamanagementApp') '$scope', '$rootScope', function ($scope, $rootScope) { $scope.isOrderView = localStorage.getItem('currentView') === 'orderView'; - console.log($scope.project) this.project = $scope.project; this.dateString = this.project.embargoDate ? new Date(this.project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; }], From 3bcc3a1afb91043a56232140cd4c7d6bb5acf430 Mon Sep 17 00:00:00 2001 From: theresa Date: Wed, 10 Jan 2024 09:11:09 +0100 Subject: [PATCH 14/49] #3216 prevented notification for pre-released projects --- .../services/outdatedVersionNotifierService.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/outdatedVersionNotifierService.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/outdatedVersionNotifierService.js index e4116b1adb7..8d25fb3057a 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/outdatedVersionNotifierService.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/outdatedVersionNotifierService.js @@ -42,7 +42,8 @@ angular.module('metadatamanagementApp').service('OutdatedVersionNotifier', ['Sim var version = _.get(item, 'release.version'); // prevent notification when in order view (data will always be an older version than the current, unreleased version) // but allow notifications for hidden datasets - if (Principal.isProviderActive()) { + // prevent notification for pre-released projects (data will always be an older version than the current, unreleased version in provider view) + if (Principal.isProviderActive() && !item.release.isPreRelease) { showLoggedInUserMessage(item.masterId, version, item.hidden); } else { if (item.hidden) { From 659902c2ca48cb9b953f5749d14af9653baadaf0 Mon Sep 17 00:00:00 2001 From: theresa Date: Wed, 10 Jan 2024 09:11:40 +0100 Subject: [PATCH 15/49] #3216 removed duplicate line --- .../views/project-cockpit.controller.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-cockpit.controller.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-cockpit.controller.js index 1d464351223..c4776188ca8 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-cockpit.controller.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-cockpit.controller.js @@ -92,8 +92,6 @@ angular.module('metadatamanagementApp').controller('ProjectCockpitController', [ $scope.changed = false; - $scope.isPublisher = Principal.hasAnyAuthority(['ROLE_PUBLISHER', - 'ROLE_ADMIN']); $scope.isPublisher = Principal.hasAnyAuthority(['ROLE_PUBLISHER']); $scope.isDataProvider = Principal.hasAnyAuthority(['ROLE_DATA_PROVIDER']); $scope.isAssignedToProject = false; From 38d617048f7c07c72884114868cd8c557db0ce1c Mon Sep 17 00:00:00 2001 From: theresa Date: Wed, 10 Jan 2024 09:27:57 +0100 Subject: [PATCH 16/49] #3216: added pre release info to release object in index, added pre release handling to VersionsService --- .../projectmanagement/domain/Release.java | 2 +- ...ataAcquisitionProjectReleasesResource.java | 3 +- ...DataAcquisitionProjectVersionsService.java | 32 ++++++++++++++++--- .../analysis_packages/mapping.json | 5 ++- .../elasticsearch/data_packages/mapping.json | 6 +++- 5 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/Release.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/Release.java index 87bd1e4f308..8c10f980dd9 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/Release.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/Release.java @@ -72,5 +72,5 @@ public class Release implements Serializable { /** * Boolean which indicates whether this is a pre-release or not. */ - private Boolean isPreRelease; + private Boolean isPreRelease = false; } diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectReleasesResource.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectReleasesResource.java index d3f3f88a2ee..9a1a7777f18 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectReleasesResource.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectReleasesResource.java @@ -36,9 +36,10 @@ public class DataAcquisitionProjectReleasesResource { */ @GetMapping("/data-acquisition-projects/{id}/releases") public ResponseEntity findPreviousDataAcquisitionVersions(@PathVariable String id, + @RequestParam(name = "excludePreReleased", defaultValue = "false") Boolean excludePreReleased, @RequestParam(name = "noBeta", defaultValue = "true") Boolean noBetaReleases, @RequestParam(name = "onlyNotHidden", defaultValue = "false") Boolean onlyNotHiddenVersions) { - List releases = this.projectVersionsService.findAllReleases(id, noBetaReleases, onlyNotHiddenVersions); + List releases = this.projectVersionsService.findAllReleases(id, excludePreReleased, noBetaReleases, onlyNotHiddenVersions); return ResponseEntity.ok().cacheControl(CacheControl.noStore()).body(releases); } diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java index 5de06c9a7d8..a329f768904 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java @@ -41,6 +41,11 @@ public class DataAcquisitionProjectVersionsService extends QDataAcquisitionProject.dataAcquisitionProject.hidden.isNull() .or(QDataAcquisitionProject.dataAcquisitionProject.hidden.isFalse()); + private static final Predicate projectNotPreReleased = + QDataAcquisitionProject.dataAcquisitionProject.release.isNotNull() + .and(QDataAcquisitionProject.dataAcquisitionProject.release.isPreRelease.isFalse()); + + /** * Construct the service. */ @@ -110,10 +115,11 @@ public Release findPreviousRelease(String id, Release currentRelease) { * Find all release stamps (limited to 100 results) for the given project id. * * @param id the project id + * @param excludePreReleased boolean indicating if pre-released version shall be skipped * @param noBeta boolean indicating if beta release shall be skipped or not * @return List of all releases (max 100 entries). */ - public List findAllReleases(String id, boolean noBeta, boolean onlyNotHiddenVersions) { + public List findAllReleases(String id, boolean excludePreReleased, boolean noBeta, boolean onlyNotHiddenVersions) { // Find all version changes List> shadows = javers.findShadows(QueryBuilder.byValueObjectId(id, DataAcquisitionProject.class, "release") @@ -126,7 +132,9 @@ public List findAllReleases(String id, boolean noBeta, boolean onlyNotH // return only not-hidden versions (for all users) return shadows.stream().map(shadow -> shadow.get()) .filter(release -> checkNotHidden(id, release) && (!noBeta || Version - .valueOf(release.getVersion()).greaterThanOrEqualTo(Version.valueOf("1.0.0")))) + .valueOf(release.getVersion()).greaterThanOrEqualTo(Version.valueOf("1.0.0"))) && ( + !excludePreReleased || checkNotPreReleased(id, release) + )) .collect(Collectors.toList()); } @@ -134,7 +142,9 @@ public List findAllReleases(String id, boolean noBeta, boolean onlyNotH // only not-hidden versions for public users return shadows.stream().map(shadow -> shadow.get()) .filter(release -> isAvailable(id, release) && (!noBeta || Version - .valueOf(release.getVersion()).greaterThanOrEqualTo(Version.valueOf("1.0.0")))) + .valueOf(release.getVersion()).greaterThanOrEqualTo(Version.valueOf("1.0.0"))) && ( + !excludePreReleased || checkNotPreReleased(id, release) + )) .collect(Collectors.toList()); } @@ -150,7 +160,9 @@ public List findAllReleases(String id, boolean noBeta, boolean onlyNotH private boolean isAvailable(String id, Release release) { if (userInformationProvider.isUserAnonymous()) { return super.repository.exists(QDataAcquisitionProject.dataAcquisitionProject.id - .eq(id + "-" + release.getVersion()).and(projectNotHidden)); + .eq(id + "-" + release.getVersion()) + .and(projectNotHidden) + .and(projectNotPreReleased)); } return true; } @@ -166,4 +178,16 @@ private boolean checkNotHidden(String id, Release release) { return super.repository.exists(QDataAcquisitionProject.dataAcquisitionProject.id .eq(id + "-" + release.getVersion()).and(projectNotHidden)); } + + /** + * Check if the released shadow is pre-released. Only return not pre-released shadows. + * + * @param id masterId of the project + * @param release the release containing the version of the shadow + * @return false if the shadow is pre-released + */ + private boolean checkNotPreReleased(String id, Release release) { + return super.repository.exists(QDataAcquisitionProject.dataAcquisitionProject.id + .eq(id + "-" + release.getVersion()).and(projectNotPreReleased)); + } } diff --git a/src/main/resources/elasticsearch/analysis_packages/mapping.json b/src/main/resources/elasticsearch/analysis_packages/mapping.json index 90bcc71896b..71f0d009671 100644 --- a/src/main/resources/elasticsearch/analysis_packages/mapping.json +++ b/src/main/resources/elasticsearch/analysis_packages/mapping.json @@ -172,7 +172,10 @@ }, "pinToStartPage": { "type": "boolean" - } + }, + "isPreRelease": { + "type": "boolean" + } } }, "tags": { diff --git a/src/main/resources/elasticsearch/data_packages/mapping.json b/src/main/resources/elasticsearch/data_packages/mapping.json index ac560cfc2bd..5272b81a8c3 100644 --- a/src/main/resources/elasticsearch/data_packages/mapping.json +++ b/src/main/resources/elasticsearch/data_packages/mapping.json @@ -1062,9 +1062,13 @@ }, "pinToStartPage": { "type": "boolean" - } + }, + "isPreRelease": { + "type": "boolean" + } } }, + "tags": { "type": "object", "properties": { From 2228c97123433badee767cdaef2ca441475dad9d Mon Sep 17 00:00:00 2001 From: theresa Date: Wed, 10 Jan 2024 15:04:34 +0100 Subject: [PATCH 17/49] #3216: updated index mapping, added implementation draft for switching to search solution for embargo warning display --- .../dataacquisitionproject.search.service.ts | 2 +- .../views/data-package-detail.html.tmpl | 1 - .../data-package-configurator.controller.js | 41 +++++++++++++------ .../data_acquisition_projects/mapping.json | 6 +++ 4 files changed, 35 insertions(+), 15 deletions(-) diff --git a/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionproject.search.service.ts b/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionproject.search.service.ts index ddeb98cb9db..be8c6053bc0 100644 --- a/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionproject.search.service.ts +++ b/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionproject.search.service.ts @@ -196,7 +196,7 @@ export class DataacquisitionprojectSearchService { projectType: String | null, assignedProjectsOnly: boolean, searchTerm: String | null, - loginName?: String) : Query { + loginName?: String | null) : Query { let boolQuery = this.createBoolQuery(); diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl index 4a2ce49d0cd..45cbdf04657 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.html.tmpl @@ -3,7 +3,6 @@
- {{ctrl.projectId}}
diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js index 8670f2202a0..8a7bd5ffc87 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js @@ -22,6 +22,8 @@ 'CurrentDataPackageService', 'DataAcquisitionProjectResource', '$q', + 'dataAcquisitionProjectSearchService', + 'ElasticSearchClient', function ($scope, $rootScope, $location, @@ -36,7 +38,7 @@ DataPackageAccessWaysResource, $mdDialog, DataPackageCitationDialogService, CurrentDataPackageService, - DataAcquisitionProjectResource, $q) { + DataAcquisitionProjectResource, $q, dataAcquisitionProjectSearchService, ElasticSearchClient) { var $ctrl = this; var initReady = false; $ctrl.dataPackageIdVersion = {}; @@ -90,6 +92,12 @@ initReady = true; } + /** + * Method to load the list of available versions of the datapackage. + * + * @param {*} dataAcquisitionProjectId the id of the data acquisition project + * @param {*} id the id of the data package + */ function loadVersion(dataAcquisitionProjectId, id) { DataAcquisitionProjectReleasesResource.get( { @@ -103,9 +111,7 @@ var releaseList = []; console.log(releases) for (var release of releases) { - if (!release.isPreRelease) { releaseList.push(release); - } } $ctrl.releases = releaseList; if (releases.length === 0 || rel.length === 0) { @@ -146,19 +152,32 @@ $ctrl.noFinalRelease = true; } if ($ctrl.dataPackage.release && $ctrl.dataPackage.release.isPreRelease) { - // disable ordering on case of pre-release - //$ctrl.noFinalRelease = true; + // disable ordering in case of pre-release $ctrl.isPreReleased = true; - console.log("is pre-releases",$ctrl.dataPackage.dataAcquisitionProjectId) - } + + // get project for embargo warning display (ToDo) + // var id = ProjectReleaseService.stripVersionSuffix( + // $ctrl.dataPackage.dataAcquisitionProjectId + // ); + // var projectQuery = dataAcquisitionProjectSearchService.createSearchQueryForProjectsById( + // "dataPackages", + // false, //all projects + // id, + // null); + // ElasticSearchClient.search(projectQuery).then(function(results) { + // //todo + // }); + + // temporary solution, doesn't work for public users -------------------- DataAcquisitionProjectResource.get({ id: $ctrl.dataPackage.dataAcquisitionProjectId }).$promise.then(function(project) { console.log(project) $ctrl.project = project - //$ctrl.embargoString = project.embargoDate ? new Date(project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; }); + // end temporary ---------------------- + loadVersion($ctrl.dataPackage.dataAcquisitionProjectId, id); } }, function() { @@ -195,11 +214,6 @@ return _.uniq(dataFormats); }; - // $ctrl.showBackToEditButton = function() { - // return $ctrl.selectedVersion && Principal.hasAuthority( - // 'ROLE_DATA_PROVIDER'); - // }; - // triggers MessageBus to close the order menu in the parent component $ctrl.closeOrderMenu = function() { MessageBus.set('onCloseOrderMenu', {open: false}); @@ -257,6 +271,7 @@ var search = $location.search(); if (!newVal) { return; } if (newVal !== search.version) { + $ctrl.isPreReleased = false; search.version = $ctrl.selectedVersion; search.lang = $rootScope.currentLanguage; $state.go($state.current, search, {reload: true}); diff --git a/src/main/resources/elasticsearch/data_acquisition_projects/mapping.json b/src/main/resources/elasticsearch/data_acquisition_projects/mapping.json index 715ec566779..89d9aa47a85 100644 --- a/src/main/resources/elasticsearch/data_acquisition_projects/mapping.json +++ b/src/main/resources/elasticsearch/data_acquisition_projects/mapping.json @@ -69,6 +69,9 @@ "type": "boolean", "copy_to": "all" }, + "embargoDate": { + "type": "date" + }, "release": { "type": "object", "properties": { @@ -83,6 +86,9 @@ }, "pinToStartPage": { "type": "boolean" + }, + "isPreRelease":{ + "type": "boolean" } } }, From cfac6aa761ded1cf90f7efa08eff928d3e601715 Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 11 Jan 2024 08:50:47 +0100 Subject: [PATCH 18/49] #3216: removed api solution --- .../data-package-configurator.controller.js | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js index 8a7bd5ffc87..f0d50af088b 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js @@ -157,26 +157,23 @@ } // get project for embargo warning display (ToDo) - // var id = ProjectReleaseService.stripVersionSuffix( - // $ctrl.dataPackage.dataAcquisitionProjectId - // ); - // var projectQuery = dataAcquisitionProjectSearchService.createSearchQueryForProjectsById( - // "dataPackages", - // false, //all projects - // id, - // null); - // ElasticSearchClient.search(projectQuery).then(function(results) { - // //todo - // }); - - // temporary solution, doesn't work for public users -------------------- - DataAcquisitionProjectResource.get({ - id: $ctrl.dataPackage.dataAcquisitionProjectId - }).$promise.then(function(project) { - console.log(project) - $ctrl.project = project + var id = ProjectReleaseService.stripVersionSuffix( + $ctrl.dataPackage.dataAcquisitionProjectId + ); + var projectQuery = dataAcquisitionProjectSearchService.createSearchQueryForProjectsById( + "dataPackages", + false, //all projects + id, + null); + ElasticSearchClient.search(projectQuery).then(function(results) { + //todo + console.log(results.hits.hits) + if (results.hits.hits.length === 1) { + $ctrl.project = results.hits.hits.source; + } else { + results.hits.hits.length < 1 ? console.error("No projects found") : console.error("Search resulted in more than one project being found.") + } }); - // end temporary ---------------------- loadVersion($ctrl.dataPackage.dataAcquisitionProjectId, id); } From e21d8e6013d194c63c7dd66280141b282549b36a Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 4 Apr 2024 13:58:23 +0200 Subject: [PATCH 19/49] Yep. Another rebase step for dev-2024-2-1. --- .../domain/DataAcquisitionProject.java | 7 ++- .../rest/DaraReleaseResource.java | 4 +- ...uisitionProjectPostValidationResource.java | 4 +- ...ataAcquisitionProjectReleasesResource.java | 3 +- .../service/DaraService.java | 48 ++++++++++--------- ...taAcquisitionProjectManagementService.java | 2 +- ...DataAcquisitionProjectVersionsService.java | 5 +- .../service/PostValidationService.java | 26 ++++++---- .../service/ShadowCopyQueueItemService.java | 8 ++-- .../service/ShadowCopyingEndedEvent.java | 3 +- .../DataAcquisitionProjectCrudHelper.java | 4 +- .../service/helper/DoiBuilder.java | 2 - 12 files changed, 66 insertions(+), 50 deletions(-) diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/DataAcquisitionProject.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/DataAcquisitionProject.java index da9311048e2..f944deebf27 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/DataAcquisitionProject.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/DataAcquisitionProject.java @@ -31,7 +31,7 @@ import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; import java.io.Serializable; -import java.util.Date; +import java.time.LocalDate; /** * The data acquisition project collects the metadata for the data products which are published by @@ -106,6 +106,11 @@ public class DataAcquisitionProject extends AbstractShadowableRdcDomainObject + ".has-user-service-remarks.not-null") private Boolean hasUserServiceRemarks = false; + /** + * Attribute which holds information on the planned release date. + */ + private LocalDate embargoDate; + /** * A valid {@link Release} object. * diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DaraReleaseResource.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DaraReleaseResource.java index c6199a27886..49dbd563a06 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DaraReleaseResource.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DaraReleaseResource.java @@ -91,10 +91,10 @@ public List flagQualityData() { * @throws IOException IO Exception for the XML Freemarker Process. */ @RequestMapping(value = "/data-acquisition-projects/{id}/pre-release", - method = RequestMethod.POST) + method = RequestMethod.POST) @Secured(value = {AuthoritiesConstants.PUBLISHER}) public ResponseEntity preRelease(@PathVariable String id, - @RequestBody @Valid DataAcquisitionProject project) throws IOException, TemplateException { + @RequestBody @Valid DataAcquisitionProject project) throws IOException, TemplateException { if (project.isShadow()) { throw new ShadowCopyReleaseToDaraNotAllowed(); } diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectPostValidationResource.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectPostValidationResource.java index 886f6fb3318..1938c79a4ec 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectPostValidationResource.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectPostValidationResource.java @@ -48,10 +48,10 @@ public ResponseEntity postValidate(@PathVariable String } /** - * Validate project by id. + * Validate project by id in case of pre-release. */ @RequestMapping(value = "/data-acquisition-projects/{id}/post-validate-pre-release", - method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) + method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) @Secured(value = {AuthoritiesConstants.PUBLISHER, AuthoritiesConstants.DATA_PROVIDER}) public ResponseEntity postValidatePreRelease(@PathVariable String id) { log.debug("REST request for post validation : {}", id); diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectReleasesResource.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectReleasesResource.java index 9a1a7777f18..45a3d86b92a 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectReleasesResource.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/rest/DataAcquisitionProjectReleasesResource.java @@ -39,7 +39,8 @@ public ResponseEntity findPreviousDataAcquisitionVersions(@PathVariable Strin @RequestParam(name = "excludePreReleased", defaultValue = "false") Boolean excludePreReleased, @RequestParam(name = "noBeta", defaultValue = "true") Boolean noBetaReleases, @RequestParam(name = "onlyNotHidden", defaultValue = "false") Boolean onlyNotHiddenVersions) { - List releases = this.projectVersionsService.findAllReleases(id, excludePreReleased, noBetaReleases, onlyNotHiddenVersions); + List releases = this.projectVersionsService.findAllReleases( + id, excludePreReleased, noBetaReleases, onlyNotHiddenVersions); return ResponseEntity.ok().cacheControl(CacheControl.noStore()).body(releases); } diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java index eb60e298525..90ce67ab268 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java @@ -13,6 +13,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Optional; import java.util.Set; @@ -205,6 +206,22 @@ public HttpStatus registerOrUpdateProjectToDara(DataAcquisitionProject project) return httpStatusFromDara; } + /** + * Registers or updates a dataset with a given doi to dara. + * + * @param projectId The id of the Project. + * @return The HttpStatus from Dara Returns a false, if something gone wrong. + * @throws IOException the io exception for non readable xml file. + * @throws TemplateException Exception for filling the template. + */ + public HttpStatus registerOrUpdateProjectToDara(String projectId) + throws IOException, TemplateException { + + // Load Project + DataAcquisitionProject project = this.projectRepository.findById(projectId).get(); + return this.registerOrUpdateProjectToDara(project); + } + /** * Registers or updates a data acquistion project as a pre-release with a given doi to dara. * @@ -219,7 +236,7 @@ public HttpStatus registerPreReleaseProjectToDara(DataAcquisitionProject project if (project.getConfiguration().getRequirements().isDataPackagesRequired()) { // Read data package xml template String registerXmlStr = - IOUtils.toString(this.registerPreReleaseDataPackageXml.getInputStream(), Charsets.UTF_8); + IOUtils.toString(this.registerPreReleaseDataPackageXml.getInputStream(), Charsets.UTF_8); // Fill template filledTemplate = this.fillTemplate(registerXmlStr, this.getTemplateConfiguration(), @@ -227,7 +244,7 @@ public HttpStatus registerPreReleaseProjectToDara(DataAcquisitionProject project } else if (project.getConfiguration().getRequirements().isAnalysisPackagesRequired()) { // Read analysis package xml template String registerXmlStr = - IOUtils.toString(this.registerPreReleaseAnalysisPackageXml.getInputStream(), Charsets.UTF_8); + IOUtils.toString(this.registerPreReleaseAnalysisPackageXml.getInputStream(), Charsets.UTF_8); // Fill template filledTemplate = this.fillTemplate(registerXmlStr, this.getTemplateConfiguration(), @@ -238,22 +255,6 @@ public HttpStatus registerPreReleaseProjectToDara(DataAcquisitionProject project return httpStatusFromDara; } - /** - * Registers or updates a dataset with a given doi to dara. - * - * @param projectId The id of the Project. - * @return The HttpStatus from Dara Returns a false, if something gone wrong. - * @throws IOException the io exception for non readable xml file. - * @throws TemplateException Exception for filling the template. - */ - public HttpStatus registerOrUpdateProjectToDara(String projectId) - throws IOException, TemplateException { - - // Load Project - DataAcquisitionProject project = this.projectRepository.findById(projectId).get(); - return this.registerOrUpdateProjectToDara(project); - } - /** * This is the kernel method for registration, update and unregister of a doi element. * @@ -417,7 +418,7 @@ private Map getDataForPreReleaseDataPackageTemplate(DataAcquisit // Get DataPackage Information DataPackage dataPackage = - this.dataPackageRepository.findOneByDataAcquisitionProjectId(project.getId()); + this.dataPackageRepository.findOneByDataAcquisitionProjectId(project.getId()); dataForTemplate.put("dataPackage", dataPackage); // Add Availability Controlled @@ -431,9 +432,10 @@ private Map getDataForPreReleaseDataPackageTemplate(DataAcquisit addDoiAndReleaseInfoToTemplateModel(project, dataForTemplate); // ??? - DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); - String dateSting = formatter.format(project.getEmbargoDate()); - dataForTemplate.put("embargoDate", dateSting); + //DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + //String dateSting = formatter.format(project.getEmbargoDate()); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + dataForTemplate.put("embargoDate", project.getEmbargoDate().format(formatter)); return dataForTemplate; } @@ -527,7 +529,7 @@ private Map getDataForPreReleaseAnalysisPackageTemplate(DataAcqu // Get DataPackage Information AnalysisPackage analysisPackage = - this.analysisPackageRepository.findOneByDataAcquisitionProjectId(project.getId()); + this.analysisPackageRepository.findOneByDataAcquisitionProjectId(project.getId()); dataForTemplate.put("analysisPackage", analysisPackage); // Add Availability Controlled diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java index 20fb4d69ea8..e28953925c3 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java @@ -322,7 +322,7 @@ public void onShadowCopyingEnded(ShadowCopyingEndedEvent shadowCopyingEndedEvent if (shadowCopyingEndedEvent.isReleaseAfterPreRelease()) { // in case of a release after a pre-release update info on Dara daraService - .registerOrUpdateProjectToDara(shadowCopyingEndedEvent.getDataAcquisitionProjectId() + .registerOrUpdateProjectToDara(shadowCopyingEndedEvent.getDataAcquisitionProjectId() + "-" + shadowCopyingEndedEvent.getRelease().getVersion()); } return; diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java index a329f768904..13db62bb0a4 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java @@ -42,7 +42,7 @@ public class DataAcquisitionProjectVersionsService extends .or(QDataAcquisitionProject.dataAcquisitionProject.hidden.isFalse()); private static final Predicate projectNotPreReleased = - QDataAcquisitionProject.dataAcquisitionProject.release.isNotNull() + QDataAcquisitionProject.dataAcquisitionProject.release.isNotNull() .and(QDataAcquisitionProject.dataAcquisitionProject.release.isPreRelease.isFalse()); @@ -119,7 +119,8 @@ public Release findPreviousRelease(String id, Release currentRelease) { * @param noBeta boolean indicating if beta release shall be skipped or not * @return List of all releases (max 100 entries). */ - public List findAllReleases(String id, boolean excludePreReleased, boolean noBeta, boolean onlyNotHiddenVersions) { + public List findAllReleases(String id, boolean excludePreReleased, + boolean noBeta, boolean onlyNotHiddenVersions) { // Find all version changes List> shadows = javers.findShadows(QueryBuilder.byValueObjectId(id, DataAcquisitionProject.class, "release") diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/PostValidationService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/PostValidationService.java index 510bbd84014..24b5df673dd 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/PostValidationService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/PostValidationService.java @@ -132,8 +132,8 @@ public List postValidatePreRelease(String dataAcquisit Optional project = projectRepository.findById(dataAcquisitionProjectId); if (!project.isPresent()) { PostValidationMessageDto error = new PostValidationMessageDto( - "data-acquisition-project" + "-management.error.post-validation.no-project", - Collections.singletonList(dataAcquisitionProjectId)); + "data-acquisition-project" + "-management.error.post-validation.no-project", + Collections.singletonList(dataAcquisitionProjectId)); return Collections.singletonList(error); } @@ -227,12 +227,12 @@ private List postValidateProject(DataAcquisitionProjec } /** - * This method handles a reduces validation of a data acquisition project for pre-releases. + * This method handles a reduced validation of a data acquisition project for pre-releases. * Checks include whether the project has an embargo date, and valid data for data packages or * analysis packages. - * @param project - * @param errors - * @return + * @param project the project to be validated + * @param errors the list of validation errors + * @return the complete list of validation errors */ private List postValidatePreReleaseProject(DataAcquisitionProject project, List errors) { @@ -243,8 +243,8 @@ private List postValidatePreReleaseProject(DataAcquisi if (project.getEmbargoDate() == null) { PostValidationMessageDto message = new PostValidationMessageDto( - "data-acquisition-project-management.error.post-validation.no-embargo-date", - Collections.singletonList(project.getId())); + "data-acquisition-project-management.error.post-validation.no-embargo-date", + Collections.singletonList(project.getId())); errors.add(message); } @@ -260,14 +260,20 @@ private List postValidatePreReleaseProject(DataAcquisi if (!information.isEmpty()) { PostValidationMessageDto message = new PostValidationMessageDto( - "data-acquisition-project-management.error.post-validation.requirements-not-met", - information); + "data-acquisition-project-management.error.post-validation.requirements-not-met", + information); errors.add(message); } return errors; } + /** + * Checks if the required project part is marked as ready by publisher. + * @param required if the part of the project is required (e.g. data package) + * @param projectState the state of the project part + * @return true if the part is required but not marked as ready, else false + */ private boolean isProjectStateInvalid(boolean required, ProjectState projectState) { return required && (projectState == null || !projectState.isPublisherReady()); } diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyQueueItemService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyQueueItemService.java index ef7c05e8dd2..e5ba5733a17 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyQueueItemService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyQueueItemService.java @@ -138,9 +138,10 @@ public void executeShadowCopyActions() { emitShadowCopyingStartedEvent(dataAcquisitionProject, release, previousReleaseVersion, task.getAction()); // check if its a real re-release or a release after a pre-release - boolean isReleaseAfterPreRelease = existingShadow.isPresent() && existingShadow.get().getRelease().getIsPreRelease(); + boolean isReleaseAfterPreRelease = existingShadow.isPresent() + && existingShadow.get().getRelease().getIsPreRelease(); emitShadowCopyingEndedEvent(dataAcquisitionProject, release, previousReleaseVersion, - existingShadow.isPresent(), task.getAction(), isReleaseAfterPreRelease); + existingShadow.isPresent(), task.getAction(), isReleaseAfterPreRelease); break; case HIDE: case UNHIDE: @@ -174,7 +175,8 @@ public void executeShadowCopyActions() { } private void emitShadowCopyingEndedEvent(DataAcquisitionProject dataAcquisitionProject, - Release release, String previousReleaseVersion, boolean isRerelease, Action action, boolean isReleaseAfterPreRelease) { + Release release, String previousReleaseVersion, boolean isRerelease, + Action action, boolean isReleaseAfterPreRelease) { this.applicationEventPublisher .publishEvent(new ShadowCopyingEndedEvent(this, dataAcquisitionProject.getMasterId(), release, previousReleaseVersion, isRerelease, action, isReleaseAfterPreRelease)); diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyingEndedEvent.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyingEndedEvent.java index 0253519ef08..afda4d87e65 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyingEndedEvent.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/ShadowCopyingEndedEvent.java @@ -38,7 +38,8 @@ public class ShadowCopyingEndedEvent extends ApplicationEvent { * @param isRerelease true if the project has been released with this version before */ public ShadowCopyingEndedEvent(Object source, String dataAcquisitionProjectId, - Release release, String previousReleaseVersion, boolean isRerelease, Action action, boolean isReleaseAfterPreRelease) { + Release release, String previousReleaseVersion, boolean isRerelease, + Action action, boolean isReleaseAfterPreRelease) { super(source); this.dataAcquisitionProjectId = dataAcquisitionProjectId; this.previousReleaseVersion = previousReleaseVersion; diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/helper/DataAcquisitionProjectCrudHelper.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/helper/DataAcquisitionProjectCrudHelper.java index 5b039a3828d..4d8bf1fb6ef 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/helper/DataAcquisitionProjectCrudHelper.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/helper/DataAcquisitionProjectCrudHelper.java @@ -12,12 +12,12 @@ /** * Component which implements CRUD functions for all {@link DataAcquisitionProjectCrudHelper}s. - * + * * @author René Reitmann */ @Component public class DataAcquisitionProjectCrudHelper extends - GenericShadowableDomainObjectCrudHelper { public DataAcquisitionProjectCrudHelper(DataAcquisitionProjectRepository repository, ApplicationEventPublisher applicationEventPublisher, diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/helper/DoiBuilder.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/helper/DoiBuilder.java index bcf937b5a94..0457c1f12d5 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/helper/DoiBuilder.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/helper/DoiBuilder.java @@ -7,8 +7,6 @@ import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; -import com.github.zafarkhaja.semver.Version; - import eu.dzhw.fdz.metadatamanagement.common.config.Constants; import eu.dzhw.fdz.metadatamanagement.projectmanagement.domain.DataAcquisitionProject; import eu.dzhw.fdz.metadatamanagement.projectmanagement.domain.Release; From 149aeb814a4927d91fb14042a2b487eff5f1bdee Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 4 Apr 2024 14:37:34 +0200 Subject: [PATCH 20/49] #3216: adjusted order menu and embargo warning according to view and authentication status --- .../embargo-warning/embargo-warning.directive.js | 16 +++++++++------- .../data-package-configurator.controller.js | 4 +--- .../data-package-configurator.html.tmpl | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js index 054fc9f5152..ac45be97f50 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js @@ -3,8 +3,8 @@ 'use strict'; angular.module('metadatamanagementApp') - .directive('embargoWarning', ['$state', - function ($state) { + .directive('embargoWarning', ['$state', 'Principal', + function ($state, Principal) { return { restrict: 'E', templateUrl: 'scripts/common/embargo-warning/' + @@ -16,11 +16,14 @@ angular.module('metadatamanagementApp') controllerAs: 'ctrl', controller: [ - '$scope', '$rootScope', - function ($scope, $rootScope) { - $scope.isOrderView = localStorage.getItem('currentView') === 'orderView'; + '$scope', '$rootScope', 'Principal', + function ($scope, $rootScope, Principal) { + if (localStorage.getItem('currentView') === 'orderView' || !Principal.isAuthenticated()) { + $scope.isOrderView = true; + } + //$scope.isOrderView = localStorage.getItem('currentView') === 'orderView'; this.project = $scope.project; - this.dateString = this.project.embargoDate ? new Date(this.project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; + this.dateString = this.project && this.project.embargoDate ? new Date(this.project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; }], /* jshint -W098 */ @@ -38,7 +41,6 @@ angular.module('metadatamanagementApp') } return true; } - } }; }]); diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js index f0d50af088b..91aa87c7783 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js @@ -166,10 +166,8 @@ id, null); ElasticSearchClient.search(projectQuery).then(function(results) { - //todo - console.log(results.hits.hits) if (results.hits.hits.length === 1) { - $ctrl.project = results.hits.hits.source; + $ctrl.project = results.hits.hits[0]._source; } else { results.hits.hits.length < 1 ? console.error("No projects found") : console.error("Search resulted in more than one project being found.") } diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl index d47a0a0bdd6..47a54e28943 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl @@ -74,9 +74,9 @@
- + {{'shopping-cart.buttons.add-data-package-tooltip' | translate}} @@ -91,9 +91,9 @@ {{'shopping-cart.buttons.open-cart' | translate}} - + + ng-disabled="!$ctrl.selectedVersion || $ctrl.noFinalRelease || $ctrl.variableNotAccessible || $ctrl.isPreReleased || ($ctrl.accessWays && $ctrl.accessWays.length > 0)" style="margin-right: 12px; margin-top: 0px;"> {{'shopping-cart.buttons.open-citation-tooltip' | translate}} From a192ca842ff6c7bf237702d4f9b8144d89fad469 Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 4 Apr 2024 14:43:56 +0200 Subject: [PATCH 21/49] #3216: fixed undefined project warning --- .../legacy/common/embargo-warning/embargo-warning.directive.js | 2 +- .../components/data-package-configurator.controller.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js index ac45be97f50..9cab4400a0a 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js @@ -35,7 +35,7 @@ angular.module('metadatamanagementApp') * @returns true if it has expired else false */ ctrl.isEmbargoDateExpired = function () { - if (ctrl.project.embargoDate) { + if (ctrl.project && ctrl.project.embargoDate) { var current = new Date(); return new Date(ctrl.project.embargoDate) < current; } diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js index 91aa87c7783..548cd0ad513 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js @@ -109,7 +109,6 @@ .then( function(releases) { var releaseList = []; - console.log(releases) for (var release of releases) { releaseList.push(release); } From 7793396680171b0ed4b077722c7d128ff938f69a Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 4 Apr 2024 14:50:16 +0200 Subject: [PATCH 22/49] #3216: disabled option to switch project type in pre-release state --- .../directives/project-cockpit-config.html.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl index 2a469069bdd..382a3363b1f 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl @@ -50,7 +50,7 @@ - + {{'data-acquisition-project-management.project-cockpit.requirements.dataPackages' | translate}} @@ -108,7 +108,7 @@ - + {{'data-acquisition-project-management.project-cockpit.requirements.analysisPackages' | translate}} From 81318fac6be7abde10ce2bb8b4b4c2003403315d Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 4 Apr 2024 15:27:31 +0200 Subject: [PATCH 23/49] So many more rebase steps for dev-2024-2-1 --- .../configuration/translations-de.js | 4 +++- .../configuration/translations-en.js | 4 +++- .../views/project-overview.html.tmpl | 12 ++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js index 125b451017f..aa8c94e29e9 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js @@ -252,6 +252,7 @@ angular.module('metadatamanagementApp').config([ 'table': { 'project-name': 'Projekt', 'release-version': 'Aktuelle Version', + 'embargo-date': 'Embargo-Datum', 'assigned-group': 'Zugewiesene Gruppe', 'user-service-remarks': 'Bemerkungen User Service', 'data-package-status': 'Datenpaket', @@ -304,7 +305,8 @@ angular.module('metadatamanagementApp').config([ } }, 'no-project-msg': 'Ihrem Konto ist kein Projekt zugewiesen.', - 'no-search-results-msg': 'Keine Ergebnisse zu Ihrer Suchanfrage gefunden.' + 'no-search-results-msg': 'Keine Ergebnisse zu Ihrer Suchanfrage gefunden.', + 'pre-release-hint': '* Gekennzeichnete Projekte sind vorläufig freigegeben und unterliegen einem Embargo-Datum.' }, 'outdated-version-alert': 'Sie betrachten eine veraltete Version ({{oldVersion}}) dieser Seite. Wählen Sie die aktuelle Version ({{newVersion}}) im Seitenmenü.', 'version-not-found-alert': 'Ihr Link verweist auf eine Version ({{oldVersion}}) dieser Seite, die es nicht gibt. Hier wird die aktuelle Version ({{newVersion}}) dargestellt.', diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js index 51618fb8583..508926165d9 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js @@ -253,6 +253,7 @@ angular.module('metadatamanagementApp').config([ 'table': { 'project-name': 'Project', 'release-version': 'Current Version', + 'embargo-date': 'Embargo Date', 'assigned-group': 'Assigned Group', 'user-service-remarks': 'Remarks for User Service', 'data-package-status': 'Data Package', @@ -311,7 +312,8 @@ angular.module('metadatamanagementApp').config([ } }, 'no-project-msg': 'There is no project assigned to your account.', - 'no-search-results-msg': 'No results found for your search request.' + 'no-search-results-msg': 'No results found for your search request.', + 'pre-release-hint': '* Labeled projects are preliminarily released and are subject to an embargo date.' }, 'outdated-version-alert': 'This is an outdated page version ({{oldVersion}}). Choose the current version ({{newVersion}}) in the side menu.', 'version-not-found-alert': 'Your link refers to a version ({{oldVersion}}) of this page which does not exist. This is the current version ({{newVersion}}).', diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.html.tmpl index 212f93ea9c8..150730e2eaa 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.html.tmpl @@ -109,11 +109,12 @@
- +
+ +
{{'data-acquisition-project-management.project-overview.table.project-name' | translate}} {{'data-acquisition-project-management.project-overview.table.release-version' | translate}}{{'data-acquisition-project-management.project-overview.table.embargo-date' | translate}} {{'data-acquisition-project-management.project-overview.table.assigned-group' | translate}} {{'data-acquisition-project-management.project-overview.table.user-service-remarks' | translate}} {{::dataAcquisitionProject.release.version ? dataAcquisitionProject.release.version : - ('data-acquisition-project-management.project-overview.table.unreleased' | translate)}}  + ('data-acquisition-project-management.project-overview.table.unreleased' | translate)}} + {{::dataAcquisitionProject.release.isPreRelease ? '*' : ''}} + {{::dataAcquisitionProject.embargoDate ? + (dataAcquisitionProject.embargoDate | date:'dd.MM.yyyy') : + ''}}  {{'data-acquisition-project-management.project-overview.table.publisher' | translate}} @@ -198,6 +204,7 @@
+
+
From f3eca696570d50f7d2940fdf6f7e3ed5589ddad3 Mon Sep 17 00:00:00 2001 From: theresa Date: Fri, 5 Apr 2024 13:10:58 +0200 Subject: [PATCH 24/49] #3216: excluded pre-released datasets from search for public users and order view --- .../services/searchHelper.service.js | 43 +++++++++++++++++++ .../elasticsearch/concepts/mapping.json | 10 ++++- .../elasticsearch/data_sets/mapping.json | 5 ++- .../elasticsearch/instruments/mapping.json | 5 ++- .../elasticsearch/questions/mapping.json | 5 ++- .../related_publications/mapping.json | 10 ++++- .../elasticsearch/surveys/mapping.json | 5 ++- .../elasticsearch/variables/mapping.json | 5 ++- 8 files changed, 81 insertions(+), 7 deletions(-) diff --git a/mdm-frontend/src/app/legacy/searchmanagement/services/searchHelper.service.js b/mdm-frontend/src/app/legacy/searchmanagement/services/searchHelper.service.js index 056757ef9dc..740ba68c935 100644 --- a/mdm-frontend/src/app/legacy/searchmanagement/services/searchHelper.service.js +++ b/mdm-frontend/src/app/legacy/searchmanagement/services/searchHelper.service.js @@ -652,6 +652,11 @@ angular.module('metadatamanagementApp').factory('SearchHelperService', ['CleanJS } }; + /** + * Adds a must term filter reducing results to non-shadow copies only. + * @param {*} query the query this filter should be added to + * @param {*} filter the filter parameter + */ var applyOnlyMasterDataFilter = function(query, filter) { var masterFilter = { 'bool': { @@ -665,6 +670,12 @@ angular.module('metadatamanagementApp').factory('SearchHelperService', ['CleanJS } }; + /** + * Adds a must term filter reducing results to shadow copies only, that are not hidden + * and not pre-released. + * @param {*} query the query this filter should be added to + * @param {*} filter the filter parameter + */ var applyShadowCopyFilter = function(query, filter) { var shadowCopyFilter = { 'bool': { @@ -673,6 +684,9 @@ angular.module('metadatamanagementApp').factory('SearchHelperService', ['CleanJS }, { 'term': {'hidden': false} + }, + { + 'term': {'release.isPreRelease': false} }] } }; @@ -684,6 +698,18 @@ angular.module('metadatamanagementApp').factory('SearchHelperService', ['CleanJS pushToFilterArray(query, shadowCopyFilter); }; + /** + * Distiguishes between szenarios of showing only master data or showing only + * shadow copies. + * If the user is logged in and the provider view is active the search will be + * limited to master data only so show project based search results. + * If the user is not logged in (public user) or is in the order view + * the search will be limited to shadow copies only which represent released + * versions of data packages and can therefore be ordered. + * @param {*} query the query this filter should be added to + * @param {*} filter the filter parameter + * @param {boolean} enforceReleased true if search should be limited to released versions + */ var addShadowCopyFilter = function(query, filter, enforceReleased) { if (!enforceReleased && Principal.loginName() && Principal.isProviderActive()) { @@ -723,6 +749,12 @@ angular.module('metadatamanagementApp').factory('SearchHelperService', ['CleanJS } }; + /** + * Creates a query to search an object by id and version. + * @param {*} id the id to search by + * @param {*} version the version to search by + * @returns the query object + */ var createShadowByIdAndVersionQuery = function(id, version) { var query = { 'body': { @@ -827,6 +859,12 @@ angular.module('metadatamanagementApp').factory('SearchHelperService', ['CleanJS } }; + /** + * Adds aggregation queries to the existing query object. + * @param {*} query the query the aggregations should be added to + * @param {*} elasticsearchType the elastic search type + * @param {*} aggregations the aggregations queries need to be added for + */ var addAggregations = function(query, elasticsearchType, aggregations) { var currentLanguage = LanguageService.getCurrentInstantly(); if (aggregations && aggregations.length > 0) { @@ -842,12 +880,17 @@ angular.module('metadatamanagementApp').factory('SearchHelperService', ['CleanJS }; if (!Principal.loginName() || !Principal.isProviderActive()) { + // as public users and users in order view are only able to find not hidden, + // not pre-released shadow object, aggregations need to account for that, too var shadowCopyFilter = { 'bool': { 'must': [{ 'term': {'shadow': true} },{ 'term': {'hidden': false} + }, + { + 'term': {'release.isPreRelease': false} }] } }; diff --git a/src/main/resources/elasticsearch/concepts/mapping.json b/src/main/resources/elasticsearch/concepts/mapping.json index 7e46012f9f4..b6193e3bbb9 100644 --- a/src/main/resources/elasticsearch/concepts/mapping.json +++ b/src/main/resources/elasticsearch/concepts/mapping.json @@ -221,7 +221,15 @@ } }, "release": { - "type": "keyword" + "type": "object", + "properties": { + "version": { + "type": "keyword" + }, + "isPreRelease": { + "type": "boolean" + } + } }, "shadow": { "type": "keyword" diff --git a/src/main/resources/elasticsearch/data_sets/mapping.json b/src/main/resources/elasticsearch/data_sets/mapping.json index f3275076ceb..8a7b6fb9f82 100644 --- a/src/main/resources/elasticsearch/data_sets/mapping.json +++ b/src/main/resources/elasticsearch/data_sets/mapping.json @@ -722,7 +722,10 @@ "properties": { "version": { "type": "keyword" - } + }, + "isPreRelease": { + "type": "boolean" + } } } } diff --git a/src/main/resources/elasticsearch/instruments/mapping.json b/src/main/resources/elasticsearch/instruments/mapping.json index caae369e390..ab2131608fe 100644 --- a/src/main/resources/elasticsearch/instruments/mapping.json +++ b/src/main/resources/elasticsearch/instruments/mapping.json @@ -763,7 +763,10 @@ "properties": { "version": { "type": "keyword" - } + }, + "isPreRelease": { + "type": "boolean" + } } } } diff --git a/src/main/resources/elasticsearch/questions/mapping.json b/src/main/resources/elasticsearch/questions/mapping.json index 8a9f8aa62a0..e492ecbe05f 100644 --- a/src/main/resources/elasticsearch/questions/mapping.json +++ b/src/main/resources/elasticsearch/questions/mapping.json @@ -759,7 +759,10 @@ "properties": { "version": { "type": "keyword" - } + }, + "isPreRelease": { + "type": "boolean" + } } } } diff --git a/src/main/resources/elasticsearch/related_publications/mapping.json b/src/main/resources/elasticsearch/related_publications/mapping.json index 604e97f15a6..89c30bd85ce 100644 --- a/src/main/resources/elasticsearch/related_publications/mapping.json +++ b/src/main/resources/elasticsearch/related_publications/mapping.json @@ -130,7 +130,15 @@ "copy_to": "all" }, "release": { - "type": "keyword" + "type": "object", + "properties": { + "version": { + "type": "keyword" + }, + "isPreRelease": { + "type": "boolean" + } + } }, "shadow": { "type": "keyword" diff --git a/src/main/resources/elasticsearch/surveys/mapping.json b/src/main/resources/elasticsearch/surveys/mapping.json index aa0b7f0c775..3089e029941 100644 --- a/src/main/resources/elasticsearch/surveys/mapping.json +++ b/src/main/resources/elasticsearch/surveys/mapping.json @@ -732,7 +732,10 @@ "properties": { "version": { "type": "keyword" - } + }, + "isPreRelease": { + "type": "boolean" + } } } } diff --git a/src/main/resources/elasticsearch/variables/mapping.json b/src/main/resources/elasticsearch/variables/mapping.json index cbbedd039e3..e97bc1310a3 100644 --- a/src/main/resources/elasticsearch/variables/mapping.json +++ b/src/main/resources/elasticsearch/variables/mapping.json @@ -761,7 +761,10 @@ "properties": { "version": { "type": "keyword" - } + }, + "isPreRelease": { + "type": "boolean" + } } } } From 3e6e36892d4b1eded473dd1d6461b839296e4f1b Mon Sep 17 00:00:00 2001 From: theresa Date: Fri, 5 Apr 2024 13:53:03 +0200 Subject: [PATCH 25/49] #3216: added pre-released as filter option on project overview --- .../dataacquisitionproject.search.service.ts | 20 ++++++++++++++++--- .../configuration/translations-de.js | 3 ++- .../configuration/translations-en.js | 3 ++- .../views/project-overview.html.tmpl | 7 ++++--- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionproject.search.service.ts b/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionproject.search.service.ts index be8c6053bc0..5e09a218e56 100644 --- a/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionproject.search.service.ts +++ b/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionproject.search.service.ts @@ -91,7 +91,7 @@ export class DataacquisitionprojectSearchService { * @param assignedProjectsOnly if only projects assigned to the given user should be returned * @param projectId the ID of a project * @param assigneeGroup the user group the project must be assigned to (DATA_PROVIDER or PUBLISHER) - * @param releaseState the release state (released or unreleased) + * @param releaseState the release state (released, unreleased or pre-released) * @param filterDataPackages a list of data package parts required in the project * @param additionalInfo if additional remarks for the user service are given * @param loginName the login name of the user @@ -144,11 +144,25 @@ export class DataacquisitionprojectSearchService { if (releaseState) { let releaseStateBase = {'field': 'release'}; let releaseStateFilter = this.createFilterFragment(QueryFragmentType.exists, releaseStateBase) - if (releaseState === "true") { + if (releaseState === "released") { boolQuery.bool.must?.push(releaseStateFilter); - } else { + boolQuery.bool.must?.push({ + "term": { + "release.isPreRelease": false + } + }); + } + if (releaseState === "unreleased") { boolQuery.bool.must_not?.push(releaseStateFilter); } + if (releaseState === "pre-released") { + boolQuery.bool.must?.push(releaseStateFilter); + boolQuery.bool.must?.push({ + "term": { + "release.isPreRelease": true + } + }); + } } if (filterDataPackages && filterDataPackages.length > 0) { diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js index aa8c94e29e9..0a89f5943cb 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js @@ -290,7 +290,8 @@ angular.module('metadatamanagementApp').config([ }, 'release-state': { 'released': 'Freigegeben', - 'unreleased': 'Nicht freigegeben' + 'unreleased': 'Nicht freigegeben', + 'pre-released': 'Vorläufig Freigegeben' }, 'datapackage-filter': { 'variables': 'Variablen', diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js index 508926165d9..d698c436539 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js @@ -297,7 +297,8 @@ angular.module('metadatamanagementApp').config([ }, 'release-state': { 'released': 'Released', - 'unreleased': 'Unreleased' + 'unreleased': 'Unreleased', + 'pre-released': 'Pre-released' }, 'datapackage-filter': { 'variables': 'Variables', diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.html.tmpl index 150730e2eaa..c8f6dcd21a5 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.html.tmpl @@ -74,8 +74,9 @@ - {{'data-acquisition-project-management.project-overview.filter.options.release-state.released' | translate}} - {{'data-acquisition-project-management.project-overview.filter.options.release-state.unreleased' | translate}} + {{'data-acquisition-project-management.project-overview.filter.options.release-state.released' | translate}} + {{'data-acquisition-project-management.project-overview.filter.options.release-state.unreleased' | translate}} + {{'data-acquisition-project-management.project-overview.filter.options.release-state.pre-released' | translate}} @@ -204,7 +205,7 @@ - +
    Date: Fri, 5 Apr 2024 14:03:35 +0200 Subject: [PATCH 26/49] #3216: removed pre-released versions from selectable version for ordering (data packages) --- .../components/data-package-configurator.controller.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js index 548cd0ad513..138af0cec44 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js @@ -110,7 +110,10 @@ function(releases) { var releaseList = []; for (var release of releases) { - releaseList.push(release); + // only allow fully released versions to be listed for ordering + if (!release.isPreRelease) { + releaseList.push(release); + } } $ctrl.releases = releaseList; if (releases.length === 0 || rel.length === 0) { From 27566a44f799d32f34aefb880eccaa3a0478204f Mon Sep 17 00:00:00 2001 From: theresa Date: Fri, 5 Apr 2024 14:16:10 +0200 Subject: [PATCH 27/49] '3216: fixed embargo warning translation --- .../configuration/translations-de.js | 14 ++++++++------ .../embargo-warning/embargo-warning.html.tmpl | 12 ++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js index d85b9a53235..877ce1d8fb8 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js @@ -7,12 +7,14 @@ angular.module('metadatamanagementApp').config([ var translations = { //jscs:disable 'embargo-warning': { - 'title-order-view': 'Datenpaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', - 'title-provider-view': 'Datenpaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', - 'content-order-view': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es bis zum {{ date }} einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie {{link}} userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', - 'content-order-view-expired': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es sich noch in der Aufbereitung befindet. Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', - 'content-provider-view': 'Dieses Datenpaket unterliegt bis zum {{ date }} einem Embargo. Die finale Veröffentlichung kann erst nach diesem Datum erfolgen. Das Datenpaket kann weiterhin bearbeitet werden.', - 'content-provider-view-expired': 'Dieses Datenpaket ist aktuell noch nicht final freigegeben. Das Datenpaket kann bis zur finalen Veröffentlichung bearbeitet werden.' + 'data-package': { + 'title-order-view': 'Datenpaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', + 'title-provider-view': 'Datenpaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', + 'content-order-view': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es bis zum {{ date }} einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie {{link}} userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'content-order-view-expired': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es sich noch in der Aufbereitung befindet. Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', + 'content-provider-view': 'Dieses Datenpaket unterliegt bis zum {{ date }} einem Embargo. Die finale Veröffentlichung kann erst nach diesem Datum erfolgen. Das Datenpaket kann weiterhin bearbeitet werden.', + 'content-provider-view-expired': 'Dieses Datenpaket ist aktuell noch nicht final freigegeben. Das Datenpaket kann bis zur finalen Veröffentlichung bearbeitet werden.' + } } } $translateProvider.translations('de', translations); diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.html.tmpl b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.html.tmpl index aa337fccd11..df4502344b5 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.html.tmpl +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.html.tmpl @@ -3,26 +3,26 @@ {{ - 'embargo-warning.title-order-view' | translate: {projectId: project.masterId} }} + 'embargo-warning.data-package.title-order-view' | translate: {projectId: project.masterId} }} {{ - 'embargo-warning.title-provider-view' | translate: {projectId: project.id} }} + 'embargo-warning.data-package.title-provider-view' | translate: {projectId: project.id} }} - + - + - + - + \ No newline at end of file From 30d4b633ed7f509322f74315370f70148f49c081 Mon Sep 17 00:00:00 2001 From: theresa Date: Fri, 5 Apr 2024 14:36:11 +0200 Subject: [PATCH 28/49] #3216: adjusted version hint according to version list in cockpit --- .../datapackagemanagement/templates/common-details.html.tmpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/templates/common-details.html.tmpl b/mdm-frontend/src/app/legacy/datapackagemanagement/templates/common-details.html.tmpl index beb6a247240..db5886abf61 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/templates/common-details.html.tmpl +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/templates/common-details.html.tmpl @@ -99,8 +99,9 @@
    {{'data-package-management.detail.label.version' | translate }}:
    - {{$ctrl.options.dataPackage.release?$ctrl.options.dataPackage.release.version + ' (' + ('data-package-management.detail.label.published-at' | translate) + ' ' + ($ctrl.options.dataPackage.release.firstDate + 'Z' | date:'mediumDate') + ')': ('data-package-management.detail.not-yet-released' | translate)}} + {{$ctrl.options.dataPackage.release.version + ' (' + ('data-package-management.detail.label.published-at' | translate) + ' ' + ($ctrl.options.dataPackage.release.firstDate + 'Z' | date:'mediumDate') + ')'}} + {{$ctrl.options.dataPackage.release.version + ' (' + ('data-package-management.detail.label.pre-published-at' | translate) + ' ' + ($ctrl.options.dataPackage.release.firstDate + 'Z' | date:'mediumDate') + ')'}} + {{'data-package-management.detail.not-yet-released' | translate}}
    {{'data-package-management.detail.label.remarksUserService' | translate }}:
    From 5b23939f284ed8ff1d17879a88c299db12ece761 Mon Sep 17 00:00:00 2001 From: theresa Date: Fri, 5 Apr 2024 15:10:56 +0200 Subject: [PATCH 29/49] #3216: updated date formatting for analysis packages --- .../projectmanagement/service/DaraService.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java index 90ce67ab268..05e3ffa183b 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DaraService.java @@ -6,14 +6,11 @@ import java.io.Writer; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; -import java.text.DateFormat; -import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.Locale; import java.util.Map; import java.util.Optional; import java.util.Set; @@ -432,8 +429,6 @@ private Map getDataForPreReleaseDataPackageTemplate(DataAcquisit addDoiAndReleaseInfoToTemplateModel(project, dataForTemplate); // ??? - //DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); - //String dateSting = formatter.format(project.getEmbargoDate()); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); dataForTemplate.put("embargoDate", project.getEmbargoDate().format(formatter)); @@ -543,9 +538,8 @@ private Map getDataForPreReleaseAnalysisPackageTemplate(DataAcqu addDoiAndReleaseInfoToTemplateModel(project, dataForTemplate); - DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); - String dateSting = formatter.format(project.getEmbargoDate()); - dataForTemplate.put("embargoDate", dateSting); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + dataForTemplate.put("embargoDate", project.getEmbargoDate().format(formatter)); return dataForTemplate; } From d84fddb5a37d0ea865189dcf54ce2c00bcda7d37 Mon Sep 17 00:00:00 2001 From: theresa Date: Mon, 8 Apr 2024 08:48:04 +0200 Subject: [PATCH 30/49] #3216: added translation for pre-published analysiis packages --- .../analysispackagemanagement/configuration/translations-de.js | 1 + .../analysispackagemanagement/configuration/translations-en.js | 1 + 2 files changed, 2 insertions(+) diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-de.js b/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-de.js index 195d4cc35d5..eb4aa46b076 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-de.js @@ -77,6 +77,7 @@ angular.module('metadatamanagementApp').config([ 'version': 'Version', 'published-at': 'veröffentlicht am', 'published': 'Veröffentlicht am', + 'pre-published-at': 'vorläufig veröffentlicht am', 'generate-analysis-package-overview-tooltip': 'Klicken, um eine Übersicht über dieses Analysepaket als PDF zu erstellen.', 'overview-generation-started-toast': 'Die Analysepaketübersicht wird jetzt erzeugt. Sie werden per E-Mail benachrichtigt, sobald der Vorgang abgeschlossen ist.', 'tags': 'Schlagwörter', diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-en.js b/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-en.js index ac77f7cab32..37682a28755 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-en.js @@ -77,6 +77,7 @@ angular.module('metadatamanagementApp').config([ 'version': 'Version', 'published-at': 'published at', 'published': 'Published at', + 'pre-published-at': 'preliminarily published at', 'generate-analysis-package-overview-tooltip': 'Click to generate an overview of this analysis package as a PDF.', 'overview-generation-started-toast': 'The analysis package overview is now being generated. You will be notified by e-mail as soon as the process is completed.', 'tags': 'Tags', From f9be9482a04274a7a3ec108c86b8b9aba41ca5f1 Mon Sep 17 00:00:00 2001 From: theresa Date: Mon, 8 Apr 2024 08:59:13 +0200 Subject: [PATCH 31/49] #3216: added pre-release hint for version on detail page --- .../templates/common-details.html.tmpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/templates/common-details.html.tmpl b/mdm-frontend/src/app/legacy/analysispackagemanagement/templates/common-details.html.tmpl index 3088c3e7421..d30fbb13062 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/templates/common-details.html.tmpl +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/templates/common-details.html.tmpl @@ -65,8 +65,9 @@
    {{'analysis-package-management.detail.label.version' | translate }}:
    - {{$ctrl.options.analysisPackage.release?$ctrl.options.analysisPackage.release.version + ' (' + ('analysis-package-management.detail.label.published-at' | translate) + ' ' + ($ctrl.options.analysisPackage.release.firstDate + 'Z' | date:'mediumDate') + ')': ('analysis-package-management.detail.not-yet-released' | translate)}} + {{$ctrl.options.analysisPackage.release.version + ' (' + ('analysis-package-management.detail.label.published-at' | translate) + ' ' + ($ctrl.options.analysisPackage.release.firstDate + 'Z' | date:'mediumDate') + ')'}} + {{$ctrl.options.analysisPackage.release.version + ' (' + ('analysis-package-management.detail.label.pre-published-at' | translate) + ' ' + ($ctrl.options.analysisPackage.release.firstDate + 'Z' | date:'mediumDate') + ')'}} + {{'analysis-package-management.detail.not-yet-released' | translate}}
    {{'analysis-package-management.detail.label.annotations' | translate }}:
    From fa8db1db23c5b4cfb442575c11fecda16b4b7e9a Mon Sep 17 00:00:00 2001 From: theresa Date: Mon, 8 Apr 2024 12:26:47 +0200 Subject: [PATCH 32/49] #3216: added embargo warning for analysis packages, minor fixes on date formats --- .../analysis-package-detail.controller.js | 59 +++++- .../views/analysis-package-detail.html.tmpl | 1 + .../configuration/translations-de.js | 8 + .../configuration/translations-en.js | 8 + .../embargo-warning.directive.js | 3 +- .../embargo-warning/embargo-warning.html.tmpl | 18 +- .../views/project-overview.html.tmpl | 2 +- ...nalysis-package-configurator.controller.js | 176 +++++++++++++----- .../analysis-package-configurator.html.tmpl | 16 +- .../data-package-configurator.controller.js | 23 ++- .../data-package-configurator.html.tmpl | 11 +- 11 files changed, 251 insertions(+), 74 deletions(-) diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js index efe6df3a31b..6e162a2911a 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js @@ -1,6 +1,13 @@ /* globals _ */ 'use strict'; +/** + * View implementing the detail page of an analysis package. The detail page + * displays basic information about the analysis package and links to its components. + * The view is accessible for all users but provides options to switch to + * editing mode for PUBLISHERS and DATAPROVIDERS. It also offers the + * opportunity to generate the overview of the analysis package as a PDF file. + */ angular.module('metadatamanagementApp') .controller('AnalysisPackageDetailController', [ 'entity', @@ -74,7 +81,7 @@ angular.module('metadatamanagementApp') } }; var ctrl = this; - var activeProject; + //var activeProject; var bowser = $rootScope.bowser; ctrl.hasBeenReleasedBefore = false; @@ -104,6 +111,9 @@ angular.module('metadatamanagementApp') ctrl.enableJsonView = Principal .hasAnyAuthority(['ROLE_PUBLISHER', 'ROLE_ADMIN']); + /** + * Method for loading attachments + */ ctrl.loadAttachments = function() { AnalysisPackageAttachmentResource.findByAnalysisPackageId({ analysisPackageId: ctrl.analysisPackage.id @@ -113,6 +123,9 @@ angular.module('metadatamanagementApp') }); }; + /** + * Method for loading data packages + */ ctrl.loadDataPackages = function(packages) { var excludes = ['nested*', 'variables', 'questions', 'surveys', 'instruments', 'relatedPublications', @@ -130,6 +143,11 @@ angular.module('metadatamanagementApp') }); }; + /** + * Whether the analysis package is beta released (version < 1.0.0) or not. + * @param {*} analysisPackage + * @returns true if it is a beta release else false + */ ctrl.isBetaRelease = function(analysisPackage) { if (analysisPackage.release) { return bowser.compareVersions(['1.0.0', analysisPackage @@ -138,6 +156,9 @@ angular.module('metadatamanagementApp') return false; }; + /** + * Method for loading script attachments + */ ctrl.loadScriptAttachments = function() { ScriptAttachmentResource.findByAnalysisPackageId({ analysisPackageId: ctrl.analysisPackage.id @@ -158,12 +179,19 @@ angular.module('metadatamanagementApp') } }); }; + + /** + * Listener for deletion event + */ $scope.$on('deletion-completed', function() { //wait for 2 seconds until refresh //in order to wait for elasticsearch reindex $timeout($state.reload, 2000); }); + /** + * init + */ entity.promise.then(function(result) { var fetchFn = AnalysisPackageSearchService.findShadowByIdAndVersion .bind(null, result.masterId, null, ['nested*', @@ -177,8 +205,12 @@ angular.module('metadatamanagementApp') }).$promise.then(function(project) { ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); + ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; + ctrl.project = project; + ctrl.embargoDate = project.embargoDate; + ctrl.embargoString = project.embargoDate ? new Date(project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; ctrl.assigneeGroup = project.assigneeGroup; - activeProject = project; + //activeProject = project; ctrl.hasBeenReleasedBefore = project.hasBeenReleasedBefore; }); } @@ -247,7 +279,7 @@ angular.module('metadatamanagementApp') }; ctrl.analysisPackageEdit = function() { if (ProjectUpdateAccessService - .isUpdateAllowed(activeProject, 'analysisPackages', true)) { + .isUpdateAllowed(ctrl.project, 'analysisPackages', true)) { $state.go('analysisPackageEdit', {id: ctrl.analysisPackage.id}); } }; @@ -260,5 +292,26 @@ angular.module('metadatamanagementApp') return ctrl.hasBeenReleasedBefore && ctrl.analysisPackage.release !== undefined; }; + + /** + * Whether a warning about the embargo date of the project should be + * displayed. + * @returns true if embargo date is applied else false + */ + ctrl.shouldDisplayEmbargoWarning = function() { + return ctrl.analysisPackage.release.isPreRelease; + } + + /** + * Whether the embargo date has expired or not. + * @returns true if it has expired else false + */ + ctrl.isEmbargoDateExpired = function() { + if (ctrl.analysisPackage.embargoDate) { + var current = new Date(); + return new Date(ctrl.analysisPackage.embargoDate) < current; + } + return true; + }; }]); diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.html.tmpl b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.html.tmpl index c27eb990b79..3c1f55ae4b0 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.html.tmpl +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.html.tmpl @@ -3,6 +3,7 @@
    +
    diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js index 877ce1d8fb8..87d8fdd3ae5 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-de.js @@ -14,6 +14,14 @@ angular.module('metadatamanagementApp').config([ 'content-order-view-expired': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es sich noch in der Aufbereitung befindet. Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', 'content-provider-view': 'Dieses Datenpaket unterliegt bis zum {{ date }} einem Embargo. Die finale Veröffentlichung kann erst nach diesem Datum erfolgen. Das Datenpaket kann weiterhin bearbeitet werden.', 'content-provider-view-expired': 'Dieses Datenpaket ist aktuell noch nicht final freigegeben. Das Datenpaket kann bis zur finalen Veröffentlichung bearbeitet werden.' + }, + 'analysis-package': { + 'title-order-view': 'Analysepaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', + 'title-provider-view': 'Analysepaket "{{projectId}}" unterliegt einem Embargo durch die Datengeber:innen', + 'content-order-view': 'Dieses Analysepaket ist derzeit noch nicht bestellbar, da es bis zum {{ date }} einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie {{link}} userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Analysepakets erhalten wollen.', + 'content-order-view-expired': 'Dieses Analysepaket ist derzeit noch nicht bestellbar, da es sich noch in der Aufbereitung befindet. Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Analysepakets erhalten wollen.', + 'content-provider-view': 'Dieses Analysepaket unterliegt bis zum {{ date }} einem Embargo. Die finale Veröffentlichung kann erst nach diesem Datum erfolgen. Das Analysepaket kann weiterhin bearbeitet werden.', + 'content-provider-view-expired': 'Dieses Analysepaket ist aktuell noch nicht final freigegeben. Das Analysepaket kann bis zur finalen Veröffentlichung bearbeitet werden.' } } } diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-en.js b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-en.js index 579ac2079f1..c487a12a415 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/configuration/translations-en.js @@ -14,6 +14,14 @@ angular.module('metadatamanagementApp').config([ 'content-order-view-expired': 'This data package is currently not yet available for order as it is still being prepared. Contact userservice@dzhw.eu if you wish to receive information regarding the release date of the data package.', 'content-provider-view': 'This data package is subject to an embargo until {{ date }}. Publication can only take place after this date. You can still edit the data package', 'content-provider-view-expired': 'This data package is currently preliminarily released. You can edit the data package until the final release.' + }, + 'analysis-package': { + 'title-order-view': 'Analysis package "{{projectId}}" is subject to an embargo set by the data providers', + 'title-provider-view': 'Analysis package "{{projectId}}" is subject to an embargo set by the data providers', + 'content-order-view': 'This analysis package is currently not yet available for order as it is subject to an embargo until {{ date }}. Publication can only take place after this date. Please note that the embargo date does not necessarily correspond to the expected release date, please contact userservice@dzhw.eu if you wish to receive information regarding the release date of the analysis package.', + 'content-order-view-expired': 'This analysis package is currently not yet available for order as it is still being prepared. Contact userservice@dzhw.eu if you wish to receive information regarding the release date of the analysis package.', + 'content-provider-view': 'This analysis package is subject to an embargo until {{ date }}. Publication can only take place after this date. You can still edit the analysis package', + 'content-provider-view-expired': 'This analysis package is currently preliminarily released. You can edit the analysis package until the final release.' } } } diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js index 9cab4400a0a..146d7617684 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js @@ -21,9 +21,8 @@ angular.module('metadatamanagementApp') if (localStorage.getItem('currentView') === 'orderView' || !Principal.isAuthenticated()) { $scope.isOrderView = true; } - //$scope.isOrderView = localStorage.getItem('currentView') === 'orderView'; this.project = $scope.project; - this.dateString = this.project && this.project.embargoDate ? new Date(this.project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; + this.type = this.project && this.project.configuration.requirements.dataPackageRequired ? 'data-package' : 'analysis-package'; }], /* jshint -W098 */ diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.html.tmpl b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.html.tmpl index df4502344b5..193588de00c 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.html.tmpl +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.html.tmpl @@ -2,27 +2,31 @@ - {{ + {{ 'embargo-warning.data-package.title-order-view' | translate: {projectId: project.masterId} }} - {{ - 'embargo-warning.data-package.title-provider-view' | translate: {projectId: project.id} }} + {{ + 'embargo-warning.data-package.title-provider-view' | translate: {projectId: project.masterId} }} + {{ + 'embargo-warning.analysis-package.title-order-view' | translate: {projectId: project.masterId} }} + {{ + 'embargo-warning.analysis-package.title-provider-view' | translate: {projectId: project.masterId} }} - + - + - + - + \ No newline at end of file diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.html.tmpl index c8f6dcd21a5..d5110e5ec34 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.html.tmpl @@ -163,7 +163,7 @@ {{::dataAcquisitionProject.release.isPreRelease ? '*' : ''}} {{::dataAcquisitionProject.embargoDate ? - (dataAcquisitionProject.embargoDate | date:'dd.MM.yyyy') : + (dataAcquisitionProject.embargoDate | date:'mediumDate') : ''}}  diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js b/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js index 1da5fa7b9d8..b2a70cf9395 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js @@ -1,24 +1,48 @@ /* global _ */ -(function() { +// (function() { - 'use strict'; + /* globals _ */ +'use strict'; - function Controller($scope, - $rootScope, - $location, - DataAcquisitionProjectReleasesResource, - $state, - $mdDialog, - $transitions, - LanguageService, - ProjectReleaseService, - ShoppingCartService, - MessageBus, - AnalysisPackageSearchService, - CurrentAnalysisPackageService, - AnalysisPackageCitationDialogService, - DataPackageSearchService, - Principal + angular + .module('metadatamanagementApp') + .controller('AnalysisPackageConfiguratorController', [ + '$scope', + '$rootScope', + '$location', + 'DataAcquisitionProjectReleasesResource', + '$state', + '$mdDialog', + '$transitions', + 'LanguageService', + 'ProjectReleaseService', + 'ShoppingCartService', + 'MessageBus', + 'AnalysisPackageSearchService', + 'CurrentAnalysisPackageService', + 'AnalysisPackageCitationDialogService', + 'DataPackageSearchService', + 'Principal', + 'dataAcquisitionProjectSearchService', + 'ElasticSearchClient', + function ($scope, + $rootScope, + $location, + DataAcquisitionProjectReleasesResource, + $state, + $mdDialog, + $transitions, + LanguageService, + ProjectReleaseService, + ShoppingCartService, + MessageBus, + AnalysisPackageSearchService, + CurrentAnalysisPackageService, + AnalysisPackageCitationDialogService, + DataPackageSearchService, + Principal, + dataAcquisitionProjectSearchService, + ElasticSearchClient ) { var $ctrl = this; var initReady = false; @@ -27,6 +51,7 @@ $ctrl.lang = LanguageService.getCurrentInstantly(); $ctrl.onAnalysisPackageChange = MessageBus; $ctrl.noFinalRelease = false; + $ctrl.isPreReleased = false; $ctrl.disabled = false; $scope.bowser = $rootScope.bowser; $ctrl.numberOfShoppingCartProducts = ShoppingCartService.count(); @@ -51,8 +76,15 @@ .$promise .then( function(releases) { - $ctrl.releases = releases; - if (releases.length === 0) { + var releaseList = []; + for (var release of releases) { + // only allow fully released versions to be listed for ordering + if (!release.isPreRelease) { + releaseList.push(release); + } + } + $ctrl.releases = releaseList; + if (releases.length === 0 || rel.length === 0) { $ctrl.noFinalRelease = true; } }); @@ -98,6 +130,26 @@ $ctrl.analysisPackage = res; $rootScope.selectedDataPackage = res; if ($ctrl.analysisPackage) { + if ($ctrl.analysisPackage.release && $ctrl.analysisPackage.release.isPreRelease) { + // disable ordering on case of pre-release + $ctrl.isPreReleased = true; + } + // get project for embargo warning display + var id = ProjectReleaseService.stripVersionSuffix( + $ctrl.analysisPackage.dataAcquisitionProjectId + ); + var projectQuery = dataAcquisitionProjectSearchService.createSearchQueryForProjectsById( + "analysisPackages", + false, //all projects + id, + null); + ElasticSearchClient.search(projectQuery).then(function(results) { + if (results.hits.hits.length === 1) { + $ctrl.project = results.hits.hits[0]._source; + } else { + results.hits.hits.length < 1 ? console.error("No projects found") : console.error("Search resulted in more than one project being found.") + } + }); loadVersion($ctrl.analysisPackageIdVersion.projectId, id); } }, function() { @@ -119,8 +171,24 @@ } if ($ctrl.analysisPackage.release && $ctrl.analysisPackage.release.isPreRelease) { // disable ordering on case of pre-release - $ctrl.noFinalRelease = true; + $ctrl.isPreReleased = true; } + // get project for embargo warning display + var id = ProjectReleaseService.stripVersionSuffix( + $ctrl.analysisPackage.dataAcquisitionProjectId + ); + var projectQuery = dataAcquisitionProjectSearchService.createSearchQueryForProjectsById( + "analysisPackages", + false, //all projects + id, + null); + ElasticSearchClient.search(projectQuery).then(function(results) { + if (results.hits.hits.length === 1) { + $ctrl.project = results.hits.hits[0]._source; + } else { + results.hits.hits.length < 1 ? console.error("No projects found") : console.error("Search resulted in more than one project being found.") + } + }); loadVersion($ctrl.analysisPackage.dataAcquisitionProjectId, id); $ctrl.dataPackages.length = 0; _.forEach($ctrl.analysisPackage.analysisDataPackages, @@ -182,10 +250,10 @@ trans.$to().name === 'conceptDetail'; }); - $ctrl.showBackToEditButton = function() { - return $ctrl.selectedVersion && Principal.hasAuthority( - 'ROLE_DATA_PROVIDER'); - }; + // $ctrl.showBackToEditButton = function() { + // return $ctrl.selectedVersion && Principal.hasAuthority( + // 'ROLE_DATA_PROVIDER'); + // }; // closes the order menu in the parent component $ctrl.closeOrderMenu = function() { @@ -207,6 +275,7 @@ var search = $location.search(); if (!newVal) { return; } if (newVal !== search.version) { + $ctrl.isPreReleased = false; search.version = $ctrl.selectedVersion; search.lang = $rootScope.currentLanguage; $state.go($state.current, search, {reload: true}); @@ -254,28 +323,39 @@ $ctrl.analysisPackage, $event ); }; - } - angular - .module('metadatamanagementApp') - .controller('AnalysisPackageConfiguratorController', [ - '$scope', - '$rootScope', - '$location', - 'DataAcquisitionProjectReleasesResource', - '$state', - '$mdDialog', - '$transitions', - 'LanguageService', - 'ProjectReleaseService', - 'ShoppingCartService', - 'MessageBus', - 'AnalysisPackageSearchService', - 'CurrentAnalysisPackageService', - 'AnalysisPackageCitationDialogService', - 'DataPackageSearchService', - 'Principal', - Controller - ]); + /** + * Whether the embargo date has expired or not. + * @returns true if it has expired else false + */ + $ctrl.isEmbargoDateExpired = function() { + if ($ctrl.dataPackage.embargoDate) { + var current = new Date(); + return new Date($ctrl.dataPackage.embargoDate) < current; + } + return true; + }; + + // angular + // .module('metadatamanagementApp') + // .controller('AnalysisPackageConfiguratorController', [ + // '$scope', + // '$rootScope', + // '$location', + // 'DataAcquisitionProjectReleasesResource', + // '$state', + // '$mdDialog', + // '$transitions', + // 'LanguageService', + // 'ProjectReleaseService', + // 'ShoppingCartService', + // 'MessageBus', + // 'AnalysisPackageSearchService', + // 'CurrentAnalysisPackageService', + // 'AnalysisPackageCitationDialogService', + // 'DataPackageSearchService', + // 'Principal', + // Controller + // ]); -})(); +}]); diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.html.tmpl b/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.html.tmpl index e6c27736fe0..af5379abc72 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.html.tmpl +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.html.tmpl @@ -10,11 +10,11 @@ -
    {{'data-package-management.detail.label.doi' | translate }}:
    +
    {{'analysis-package-management.detail.label.doi' | translate }}:
    {{$ctrl.analysisPackage.doi}}
    -
    {{'data-package-management.detail.label.published' | translate }}:
    +
    {{'analysis-package-management.detail.label.published' | translate }}:
    {{$ctrl.analysisPackage.release.firstDate + 'Z' | date:'mediumDate'}}
    @@ -50,9 +50,9 @@
    - + {{'shopping-cart.buttons.add-analysis-package-tooltip' | translate}} @@ -67,9 +67,9 @@ {{'shopping-cart.buttons.open-cart' | translate}} - + + ng-disabled="!$ctrl.selectedVersion || $ctrl.noFinalRelease || $ctrl.isPreReleased || $ctrl.releases.length === 0" style="margin-right: 12px; margin-top: 0px;"> {{'shopping-cart.buttons.open-citation-tooltip' | translate}} @@ -82,11 +82,13 @@ {{'shopping-cart.detail.no-final-release' | translate}} + +
    {{'shopping-cart.detail.maintenance-hint' | translate}}
    - + diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js index 138af0cec44..4e5bb70befc 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js @@ -135,6 +135,27 @@ $ctrl.dataPackage = res; $rootScope.selectedDataPackage = res; if ($ctrl.dataPackage) { + if ($ctrl.dataPackage.release && $ctrl.dataPackage.release.isPreRelease) { + // disable ordering in case of pre-release + $ctrl.isPreReleased = true; + } + + // get project for embargo warning display + var id = ProjectReleaseService.stripVersionSuffix( + $ctrl.dataPackage.dataAcquisitionProjectId + ); + var projectQuery = dataAcquisitionProjectSearchService.createSearchQueryForProjectsById( + "dataPackages", + false, //all projects + id, + null); + ElasticSearchClient.search(projectQuery).then(function(results) { + if (results.hits.hits.length === 1) { + $ctrl.project = results.hits.hits[0]._source; + } else { + results.hits.hits.length < 1 ? console.error("No projects found") : console.error("Search resulted in more than one project being found.") + } + }); loadVersion($ctrl.dataPackageIdVersion.projectId, id); } }, function() { @@ -158,7 +179,7 @@ $ctrl.isPreReleased = true; } - // get project for embargo warning display (ToDo) + // get project for embargo warning display var id = ProjectReleaseService.stripVersionSuffix( $ctrl.dataPackage.dataAcquisitionProjectId ); diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl index 47a54e28943..541b8babcb6 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl @@ -74,9 +74,9 @@
    - + {{'shopping-cart.buttons.add-data-package-tooltip' | translate}} @@ -91,16 +91,16 @@ {{'shopping-cart.buttons.open-cart' | translate}} - + + ng-disabled="!$ctrl.selectedVersion || $ctrl.noFinalRelease || $ctrl.isPreReleased || $ctrl.releases.length === 0 || ($ctrl.accessWays && $ctrl.accessWays.length > 0)" style="margin-right: 12px; margin-top: 0px;"> {{'shopping-cart.buttons.open-citation-tooltip' | translate}} {{'shopping-cart.buttons.open-citation' | translate}} - + {{'shopping-cart.buttons.open-export-tooltip' | translate}} @@ -119,6 +119,7 @@ {{'shopping-cart.detail.no-final-release' | translate}} +
    From dd42b085430c617484f9859d8e006853f65e3ac3 Mon Sep 17 00:00:00 2001 From: theresa Date: Mon, 8 Apr 2024 15:02:10 +0200 Subject: [PATCH 33/49] #3216: adjusted version errors in release dialog --- .../views/release-project-dialog.html.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl index 966f0a2fd3b..9f6cb1fd22f 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl @@ -48,11 +48,11 @@ {{'data-acquisition-project-management.error.release.version.not-parsable-or-not-incremented' | translate:'{lastVersion: "' + lastVersion + '"}' }}
    -
    +
    {{'data-acquisition-project-management.error.release.version.no-beta-version' | translate }}
    -
    +
    {{'data-acquisition-project-management.error.release.version.no-major-version-change' | translate:{lastVersion: lastVersion, nextMajorVersion: getNextMajorVersion()} }}
    From 88abc8746c22af7360bddc3c12e4c554b7c37da5 Mon Sep 17 00:00:00 2001 From: theresa Date: Tue, 9 Apr 2024 11:12:10 +0200 Subject: [PATCH 34/49] Another round of rebase steps for dev-2024-2-1 --- .../analysis-package-detail.controller.js | 25 +++++----- .../embargo-warning.directive.js | 8 ++-- .../i18n/configuration/translations-en.js | 2 +- .../configuration/translations-de.js | 6 +-- .../configuration/translations-en.js | 6 +-- .../project-cockpit-config.directive.js | 23 +++++++-- .../project-cockpit-versions.directive.js | 1 - .../project-cockpit-versions.html.tmpl | 2 +- .../directives/releaseButton.directive.js | 4 +- .../directives/releaseButton.html.tmpl | 3 +- .../releaseStatusBadge.directive.js | 16 +++++++ .../services/postValidation.service.js | 12 +++++ .../release-project-dialog.controller.js | 48 ++----------------- .../views/release-project-dialog.html.tmpl | 2 +- .../views/data-package-detail.controller.js | 10 +--- .../views/instrument-detail.controller.js | 2 - ...taAcquisitionProjectManagementService.java | 2 +- 17 files changed, 76 insertions(+), 96 deletions(-) diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js index 6e162a2911a..83c693e48cd 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js @@ -81,9 +81,7 @@ angular.module('metadatamanagementApp') } }; var ctrl = this; - //var activeProject; var bowser = $rootScope.bowser; - ctrl.hasBeenReleasedBefore = false; ctrl.dataPackageList = { dataPackage: { @@ -103,7 +101,6 @@ angular.module('metadatamanagementApp') ctrl.scriptAttachments = []; ctrl.isAuthenticated = Principal.isAuthenticated; ctrl.hasAuthority = Principal.hasAuthority; - ctrl.projectIsCurrentlyReleased = true; ctrl.searchResultIndex = SearchResultNavigatorService.getSearchIndex(); ctrl.counts = { publicationsCount: 0 @@ -203,15 +200,9 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: result.dataAcquisitionProjectId }).$promise.then(function(project) { - ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; ctrl.project = project; - ctrl.embargoDate = project.embargoDate; - ctrl.embargoString = project.embargoDate ? new Date(project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; - ctrl.assigneeGroup = project.assigneeGroup; - //activeProject = project; - ctrl.hasBeenReleasedBefore = project.hasBeenReleasedBefore; }); } ctrl.onlyQualitativeData = ContainsOnlyQualitativeDataChecker @@ -269,6 +260,9 @@ angular.module('metadatamanagementApp') }, $log.error) .finally(blockUI.stop); + /** + * Scrolling handler. + */ ctrl.scroll = function() { var element = $document[0].getElementById('related-objects'); if ($rootScope.bowser.msie) { @@ -277,6 +271,11 @@ angular.module('metadatamanagementApp') element.scrollIntoView({behavior: 'smooth', inline: 'nearest'}); } }; + + /** + * Method to check if edits are allowed and switch to editing page of the + * current analysis package if so. + */ ctrl.analysisPackageEdit = function() { if (ProjectUpdateAccessService .isUpdateAllowed(ctrl.project, 'analysisPackages', true)) { @@ -284,15 +283,13 @@ angular.module('metadatamanagementApp') } }; + /** + * Method to toggle the side nav menu. + */ ctrl.toggleSidenav = function() { $mdSidenav('SideNavBar').toggle(); }; - ctrl.showOrderButton = function() { - return ctrl.hasBeenReleasedBefore && - ctrl.analysisPackage.release !== undefined; - }; - /** * Whether a warning about the embargo date of the project should be * displayed. diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js index 146d7617684..6734f186e9e 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js @@ -2,6 +2,10 @@ 'use strict'; +/** + * Directive rendering a warning hint on the embargo date in place. + * Displayed messages depend on user role and current view. + */ angular.module('metadatamanagementApp') .directive('embargoWarning', ['$state', 'Principal', function ($state, Principal) { @@ -25,9 +29,7 @@ angular.module('metadatamanagementApp') this.type = this.project && this.project.configuration.requirements.dataPackageRequired ? 'data-package' : 'analysis-package'; }], - /* jshint -W098 */ - link: function ($scope, elem, attrs, ctrl) { - /* jshint +W098 */ + link: function (ctrl) { /** * Whether the embargo date has expired or not. diff --git a/mdm-frontend/src/app/legacy/common/i18n/configuration/translations-en.js b/mdm-frontend/src/app/legacy/common/i18n/configuration/translations-en.js index 013f1fdddc1..ae1e4fd6acb 100644 --- a/mdm-frontend/src/app/legacy/common/i18n/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/common/i18n/configuration/translations-en.js @@ -102,7 +102,7 @@ angular.module('metadatamanagementApp').config([ 'tooltips': { 'create-project': 'Click to create a new Data Acquisition Project.', 'delete-project': 'Click to delete the selected Data Acquisition Project with all related data.', - 'release-project': 'Click to release the selected project preliminary.', + 'release-project': 'Click to release the selected project.', 'prerelease-project': 'Click to preliminarily release the selected project.', 'unrelease-project': 'Click to unrelease the selected project.', 'cockpit-project': 'Click to go to the Project Cockpit.', diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js index 0a89f5943cb..e6864c3c6ab 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js @@ -313,11 +313,7 @@ angular.module('metadatamanagementApp').config([ 'version-not-found-alert': 'Ihr Link verweist auf eine Version ({{oldVersion}}) dieser Seite, die es nicht gibt. Hier wird die aktuelle Version ({{newVersion}}) dargestellt.', 'not-master-alert': 'Sie betrachten eine {{hidden?"versteckte":""}} Schattenkopie ({{version}}). ', 'no-order-allowed-alert': 'Sie betrachten eine {{hidden?"versteckte":""}} Schattenkopie ({{version}}), die nicht bestellbar ist. Wählen Sie eine bestellbare Version im Seitenmenü.', - 'current-version':'Hier geht es zur aktuellen Version!', - 'embargo-alert-provider': 'Dieses Datenpaket unterliegt bis zum [Datum] einem Embargo. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', - 'embargo-alert-order': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es bis zum [Datum] einem Embargo unterliegt. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', - 'expired-embargo-alert-provider': 'Dieses Datenpaket unterliegt bis zum [Datum] einem Embargo. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', - 'expired-embargo-alert-order': 'Dieses Datenpaket ist derzeit noch nicht bestellbar, da es sich noch in der Aufbereitung befindet. Kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.' + 'current-version':'Hier geht es zur aktuellen Version!' } //jscs:enable }; diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js index d698c436539..9563839a2ce 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js @@ -320,11 +320,7 @@ angular.module('metadatamanagementApp').config([ 'version-not-found-alert': 'Your link refers to a version ({{oldVersion}}) of this page which does not exist. This is the current version ({{newVersion}}).', 'not-master-alert': 'This is a {{hidden?"hidden":""}} shadow copy ({{version}}). ', 'no-order-allowed-alert': 'This is a {{hidden?"hidden":""}} shadow copy ({{version}}) which is not orderable. Choose an available version in the side menu. ', - 'current-version': 'Click here to open the current version!', - 'embargo-alert-provider': 'Dieses Datenpaket unterliegt bis zum [Datum] einem Embargo. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', - 'embargo-alert-order': 'This data package is currently not yet available for order as it is subject to an embargo until [date]. Publication can only take place after this date. Please note that the embargo date does not necessarily correspond to the expected release date, please contact userservice@dzhw.eu if you wish to receive information regarding the release date of the data package.', - 'expired-embargo-alert-provider': 'Dieses Datenpaket unterliegt bis zum [Datum] einem Embargo. Die Veröffentlichung kann erst nach diesem Datum erfolgen. Bitte beachten Sie, dass das Embargodatum nicht dem erwarteten Veröffentlichungszeitpunkt entsprechen muss, bitte kontaktieren Sie userservice@dzhw.eu, wenn Sie Informationen bezüglich des Veröffentlichungsdatums des Datenpakets erhalten wollen.', - 'expired-embargo-alert-order': 'This data package is currently not yet available for order as it is still being prepared. Contact userservice@dzhw.eu if you wish to receive information regarding the release date of the data package.' + 'current-version': 'Click here to open the current version!' } //jscs:enable }; diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js index 9178e07e1d3..9884e626d51 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js @@ -41,8 +41,8 @@ angular.module('metadatamanagementApp') }) /** - * Whether the current user is an assigned publisher of the project. - * @returns true if the user is an assigned publisher else false + * Whether the current user is not an assigned publisher of the project. + * @returns true if the user is not an assigned publisher else false */ var isNotAssignedPublisher = function() { var loginName = Principal.loginName(); @@ -51,8 +51,8 @@ angular.module('metadatamanagementApp') }; /** - * Whether the current user is an assigned data provider of the project. - * @returns true if the user is an assigned data provider else false + * Whether the current user is not an assigned data provider of the project. + * @returns true if the user is not an assigned data provider else false */ var isNotAssignedDataprovider = function() { var loginName = Principal.loginName(); @@ -62,7 +62,7 @@ angular.module('metadatamanagementApp') /** * Whether the project is released including pre-releases. - * @returns true if the project is released + * @returns true if the project is released or pre-released */ var isProjectReleased = function() { return $scope.project.release; @@ -84,10 +84,17 @@ angular.module('metadatamanagementApp') return isNotAssignedPublisher() || (isProjectReleased() && !$scope.project.release.isPreRelease); }; + /** + * Whether the user has the PUBLISHER role. + * @returns + */ ctrl.isUserPublisher = function() { return Principal.hasAuthority('ROLE_PUBLISHER'); }; + /** + * Sets basic requirements in case of analysis packages being selected as the project type. + */ ctrl.isAnalysisPackageChecked = function() { req.analysisPackagesRequired = true; req.dataPackagesRequired = false; @@ -100,12 +107,18 @@ angular.module('metadatamanagementApp') req.conceptsRequired = false; }; + /** + * Sets basic requirements in case of data packages being selected as the project type. + */ ctrl.isDataPackageChecked = function() { req.analysisPackagesRequired = false; req.dataPackagesRequired = true; req.publicationsRequired = false; }; + /** + * Resets embargo date, e.g. on final release. + */ ctrl.removeEmbargoDate = function() { ctrl.project.embargoDate = null; } diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.directive.js index be259247e5d..965f82e782e 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.directive.js @@ -61,7 +61,6 @@ angular.module('metadatamanagementApp') ctrl.page = page; ctrl.page.number++; ctrl.shadows.forEach(function(shadow) { - shadow.embargoString = shadow.embargoDate ? new Date(shadow.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; DataAcquisitionProjectShadowsActionResource.get({ id: shadow.masterId, version: shadow.release.version diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.html.tmpl index e725d657efe..d446f2f3e60 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.html.tmpl @@ -33,7 +33,7 @@ schedule - {{'data-acquisition-project-management.project-cockpit.versions.button.pre-released' | translate: {date: shadow.embargoString} }} + {{'data-acquisition-project-management.project-cockpit.versions.button.pre-released' | translate: {date: (shadow.embargoDate | date:'mediumDate')} }} diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js index 0dfde7e7858..6458cd4c2fe 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js @@ -13,9 +13,6 @@ angular.module('metadatamanagementApp') templateUrl: 'scripts/dataacquisitionprojectmanagement/directives/' + 'releaseButton.html.tmpl', scope: { - // project: '=', - // isAssignedDataProvider: '=', - // isAssignedPublisher: '=' }, replace: true, controllerAs: 'ctrl', @@ -53,6 +50,7 @@ angular.module('metadatamanagementApp') function(event, project) { // jshint ignore:line ctrl.project = CurrentProjectService.getCurrentProject(); }); + /** * Method to check wether there is an embargo date * and wether this date has expired. diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.html.tmpl index 27fbb126e95..156196694b5 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.html.tmpl @@ -1,6 +1,7 @@
    + ng-disabled="!ctrl.isAssignedPublisher() || ctrl.project.assigneeGroup !== 'PUBLISHER' || (ctrl.project.release && ctrl.project.release.isPreRelease && !ctrl.isEmbargoDateExpired())" + aria-label="Toggle release state of project"> diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseStatusBadge.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseStatusBadge.directive.js index af3aa50ce97..58208a7e4fd 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseStatusBadge.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseStatusBadge.directive.js @@ -1,4 +1,7 @@ 'use strict'; +/** + * Directive rendering the release status badge für projects + */ angular.module('metadatamanagementApp') .directive('releaseStatusBadge', function() { return { @@ -13,14 +16,27 @@ angular.module('metadatamanagementApp') }], /* jshint -W098 */ link: function($scope, elem, attrs, ctrl) { + /** + * Whether the release state indicates a pre-release state. + * @returns true if the release is a pre-release, else false + */ ctrl.isPreReleased = function() { return $scope.released && $scope.released.isPreRelease; }; + /** + * Checks whether the release state indicates a full release. + * @returns true if the release is fully released, else false + */ ctrl.isFullyReleased = function() { return $scope.released && !$scope.released.isPreRelease; } + /** + * Checks whether there is a release state. If projects have + * no release information they are assumed to be unreleased. + * @returns true if release exists, else false. + */ ctrl.isUnreleased = function() { return !$scope.released; } diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/postValidation.service.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/postValidation.service.js index 59290001cb4..a77634083e0 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/postValidation.service.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/postValidation.service.js @@ -23,6 +23,12 @@ angular.module('metadatamanagementApp').service('DataAcquisitionProjectPostValid return objectElement; }; + /** + * Method triggering post validation of a project on full release and handling results. + * @param {*} id the ID of the project + * @param {*} version the version of the project to be validated + * @returns the validation promise + */ var postValidate = function(id, version) { var deferred = $q.defer(); JobLoggingService.start('postValidation'); @@ -65,6 +71,12 @@ angular.module('metadatamanagementApp').service('DataAcquisitionProjectPostValid return deferred.promise; }; + /** + * Method triggering post validation of a project on pre-release and handling results. + * @param {*} id the ID of the project + * @param {*} version the version of the project to be validated + * @returns the validation promise + */ var postValidatePreRelease = function(id, version) { var deferred = $q.defer(); JobLoggingService.start('postValidation'); diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js index e82400ac5a3..abb44926b77 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js @@ -35,8 +35,6 @@ angular.module('metadatamanagementApp') $scope.bowser = $rootScope.bowser; $scope.project = project; $scope.ENV = ENV; - $scope.isBetaRelease = false; - $scope.embargoString = $scope.project.embargoDate ? new Date($scope.project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; var i18nPrefix = 'data-acquisition-project-management.log-messages.' + 'data-acquisition-project.'; @@ -149,10 +147,10 @@ angular.module('metadatamanagementApp') * Method handling releases. * In case of a pre-release the project is validated and released * with the 'isPreRelease' attribute set to true. The metadata is sent to DA|RA. - * If it is not a pre-release the project is validated. If it is a beta release - * with a version < 1.0.0 the project is saved with the release object but no data is send to DA|RA. - * If it is a regular release the project is saved and the metadata is sent to DA|RA. - * @param {*} release + * If it is a beta release (version < 1.0.0) the project is not validated, saved with + * the release object but no data is send to DA|RA. + * If it is a regular release the project is validated, saved and the metadata is sent to DA|RA. + * @param {*} release the release object */ $scope.ok = function(release) { if ($scope.isPreRelease()) { @@ -188,47 +186,9 @@ angular.module('metadatamanagementApp') id: project.id }); $mdDialog.hide(); -<<<<<<< HEAD - $state.forceReload(); - }).catch(function() { - delete project.release; - SimpleMessageToastService.openAlertMessageToast( - i18nPrefix + 'dara-released-not-successfully', { - id: project.id - }); - $mdDialog.hide(); - }); - } else { - //REGULAR RELEASE - DaraReleaseResource.release(project) - .$promise.then(function() { - DataAcquisitionProjectResource.save(project).$promise - .then(function() { - SimpleMessageToastService.openSimpleMessageToast( - i18nPrefix + 'released-successfully', { - id: project.id - }); - CurrentProjectService.setCurrentProject(project); - $mdDialog.hide(); - $state.forceReload(); - - $scope.postTweet(release); - }); - }).catch(function() { - delete project.release; - SimpleMessageToastService.openAlertMessageToast( - i18nPrefix + 'dara-released-not-successfully', { - id: project.id - }); - $mdDialog.hide(); - }); - } - }).catch(function() { -======= }); }).catch(function(error) { console.log(error) ->>>>>>> 4f0e4b4a97 (#3216: configured release dialog and postvalidation for pre release) $mdDialog.show($mdDialog.alert() .title($translate.instant( i18nPrefix + 'release-not-possible-title', { diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl index 9f6cb1fd22f..b07578674a3 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.html.tmpl @@ -23,7 +23,7 @@ info - {{'data-acquisition-project-management.release.pre-release-hint' | translate:{id: project.id, date: embargoString} }} + {{'data-acquisition-project-management.release.pre-release-hint' | translate:{id: project.id, date: (project.embargoDate | date:'mediumDate')} }}
    diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js index 7d0ffead5da..580cecf83bb 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js @@ -72,11 +72,9 @@ angular.module('metadatamanagementApp') } }; var ctrl = this; - var activeProject; ctrl.isAuthenticated = Principal.isAuthenticated; ctrl.hasAuthority = Principal.hasAuthority; ctrl.projectIsCurrentlyReleased = true; - ctrl.hasBeenReleasedBefore = false; ctrl.searchResultIndex = SearchResultNavigatorService.getSearchIndex(); ctrl.counts = { surveysCount: 0, @@ -148,13 +146,7 @@ angular.module('metadatamanagementApp') ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; - ctrl.embargoDate = project.embargoDate; ctrl.project = project; - ctrl.embargoString = project.embargoDate ? new Date(project.embargoDate).toLocaleDateString('de-DE', {day:'2-digit', month:'2-digit', year:'numeric'}) : ''; - ctrl.assigneeGroup = project.assigneeGroup; - activeProject = project; - ctrl.hasBeenReleasedBefore = project.hasBeenReleasedBefore; - console.log("provider?", ctrl.projectId) ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; }); } @@ -236,7 +228,7 @@ angular.module('metadatamanagementApp') */ ctrl.dataPackageEdit = function() { if (ProjectUpdateAccessService - .isUpdateAllowed(activeProject, 'dataPackages', true)) { + .isUpdateAllowed(ctrl.project, 'dataPackages', true)) { $state.go('dataPackageEdit', {id: ctrl.dataPackage.id}); } }; diff --git a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js index b704738a81c..6817b35d4d8 100644 --- a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js +++ b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js @@ -49,7 +49,6 @@ angular.module('metadatamanagementApp') ctrl.survey = null; ctrl.attachments = null; ctrl.dataPackage = null; - ctrl.projectIsCurrentlyReleased = true; ctrl.enableJsonView = Principal .hasAnyAuthority(['ROLE_PUBLISHER', 'ROLE_ADMIN']); @@ -66,7 +65,6 @@ angular.module('metadatamanagementApp') id: result.dataAcquisitionProjectId }).$promise.then(function(project) { ctrl.project = project; - ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java index e28953925c3..5dd1095cabb 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java @@ -319,7 +319,7 @@ public void onShadowCopyingEnded(ShadowCopyingEndedEvent shadowCopyingEndedEvent // hint: releases after pre-releases do not count as rereleases at this point if (shadowCopyingEndedEvent.isRerelease()) { // do not send mails for rereleases - if (shadowCopyingEndedEvent.isReleaseAfterPreRelease()) { + if (shadowCopyingEndedEvent.isReleaseAfterPreRelease() && !shadowCopyingEndedEvent.getRelease().getIsPreRelease()) { // in case of a release after a pre-release update info on Dara daraService .registerOrUpdateProjectToDara(shadowCopyingEndedEvent.getDataAcquisitionProjectId() From 412731e6b5ef409200c35a572885a8aebf183bf2 Mon Sep 17 00:00:00 2001 From: theresa Date: Wed, 10 Apr 2024 10:54:39 +0200 Subject: [PATCH 35/49] #3216: fixed disabled buttons --- .../components/data-package-configurator.html.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl index 541b8babcb6..9aad9c82615 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.html.tmpl @@ -76,7 +76,7 @@ {{'shopping-cart.buttons.add-data-package-tooltip' | translate}} From 9a908de969efbdce2f1bd04d51be1e89a3f051ed Mon Sep 17 00:00:00 2001 From: theresa Date: Wed, 10 Apr 2024 10:58:53 +0200 Subject: [PATCH 36/49] #3216: fixed code style and tests --- .../DataAcquisitionProjectManagementService.java | 3 ++- .../service/PostValidationService.java | 4 ++-- src/main/resources/elasticsearch/concepts/mapping.json | 10 +--------- .../elasticsearch/related_publications/mapping.json | 10 +--------- .../util/UnitTestCreateDomainObjectUtils.java | 2 +- 5 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java index 5dd1095cabb..c9f052645bf 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectManagementService.java @@ -319,7 +319,8 @@ public void onShadowCopyingEnded(ShadowCopyingEndedEvent shadowCopyingEndedEvent // hint: releases after pre-releases do not count as rereleases at this point if (shadowCopyingEndedEvent.isRerelease()) { // do not send mails for rereleases - if (shadowCopyingEndedEvent.isReleaseAfterPreRelease() && !shadowCopyingEndedEvent.getRelease().getIsPreRelease()) { + if (shadowCopyingEndedEvent.isReleaseAfterPreRelease() + && !shadowCopyingEndedEvent.getRelease().getIsPreRelease()) { // in case of a release after a pre-release update info on Dara daraService .registerOrUpdateProjectToDara(shadowCopyingEndedEvent.getDataAcquisitionProjectId() diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/PostValidationService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/PostValidationService.java index 24b5df673dd..dcdb88f82df 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/PostValidationService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/PostValidationService.java @@ -249,12 +249,12 @@ private List postValidatePreReleaseProject(DataAcquisi } if (isProjectStateInvalid(requirements.isDataPackagesRequired(), - configuration.getDataPackagesState())) { + configuration.getDataPackagesState())) { information.add("dataPackages"); } if (isProjectStateInvalid(requirements.isAnalysisPackagesRequired(), - configuration.getAnalysisPackagesState())) { + configuration.getAnalysisPackagesState())) { information.add("analysisPackages"); } diff --git a/src/main/resources/elasticsearch/concepts/mapping.json b/src/main/resources/elasticsearch/concepts/mapping.json index b6193e3bbb9..e3574ec4923 100644 --- a/src/main/resources/elasticsearch/concepts/mapping.json +++ b/src/main/resources/elasticsearch/concepts/mapping.json @@ -221,15 +221,7 @@ } }, "release": { - "type": "object", - "properties": { - "version": { - "type": "keyword" - }, - "isPreRelease": { - "type": "boolean" - } - } + "type": "keyword" }, "shadow": { "type": "keyword" diff --git a/src/main/resources/elasticsearch/related_publications/mapping.json b/src/main/resources/elasticsearch/related_publications/mapping.json index 89c30bd85ce..c492c882ea6 100644 --- a/src/main/resources/elasticsearch/related_publications/mapping.json +++ b/src/main/resources/elasticsearch/related_publications/mapping.json @@ -130,15 +130,7 @@ "copy_to": "all" }, "release": { - "type": "object", - "properties": { - "version": { - "type": "keyword" - }, - "isPreRelease": { - "type": "boolean" - } - } + "type": "keyword" }, "shadow": { "type": "keyword" diff --git a/src/test/java/eu/dzhw/fdz/metadatamanagement/common/unittesthelper/util/UnitTestCreateDomainObjectUtils.java b/src/test/java/eu/dzhw/fdz/metadatamanagement/common/unittesthelper/util/UnitTestCreateDomainObjectUtils.java index b76a17c7081..c85c25eacce 100644 --- a/src/test/java/eu/dzhw/fdz/metadatamanagement/common/unittesthelper/util/UnitTestCreateDomainObjectUtils.java +++ b/src/test/java/eu/dzhw/fdz/metadatamanagement/common/unittesthelper/util/UnitTestCreateDomainObjectUtils.java @@ -397,7 +397,7 @@ public static Distribution buildDistribution() { } public static Release buildRelease() { - return Release.builder().version("1.0.0").lastDate(LocalDateTime.now()).build(); + return Release.builder().version("1.0.0").lastDate(LocalDateTime.now()).isPreRelease(false).build(); } public static FilterDetails buildFilterDetails() { From b0ff7c6184820c9544b89c02ce49835d6fc9a811 Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 11 Apr 2024 09:00:13 +0200 Subject: [PATCH 37/49] And yet another rebase step for dev-2024-2-1 --- mdm-frontend/.eslintrc.json | 74 + mdm-frontend/angular.json | 88 +- mdm-frontend/package-lock.json | 2692 +++++++++++++++-- mdm-frontend/package.json | 13 +- mdm-frontend/src/app/app.module.ts | 3 +- .../dataacquisitionproject.search.service.ts | 101 +- ...dataacquisitionprojectmanagement.module.ts | 1 - .../search.interfaces.ts | 10 +- .../services/analysisPackageSearch.service.js | 9 +- .../analysis-package-detail.controller.js | 3 +- ...lysis-package-edit-or-create.controller.js | 3 +- .../legacy/common/details/detail.component.js | 8 +- .../embargo-warning.directive.js | 3 +- .../common/i18n/services/language.service.js | 11 +- .../migration/services/migrationService.js | 3 +- .../pagemetadata/pageMetadata.service.js | 3 +- .../session-storage.service.js | 5 +- .../common/websocket/websocket.service.js | 3 +- .../services/conceptSearch.service.js | 3 +- .../metadata-type-state-card.directive.js | 10 +- .../project-cockpit-config.directive.js | 5 +- .../project-cockpit-status.directive.js | 12 +- .../project-cockpit-versions.directive.js | 11 +- ...ject-does-not-exist-validator.directive.js | 4 +- .../directives/releaseButton.directive.js | 11 +- .../services/currentProject.service.js | 3 +- .../services/deleteMetadata.service.js | 8 +- .../outdatedVersionNotifierService.js | 9 +- .../services/postValidation.service.js | 3 +- .../services/projectReleaseService.js | 8 +- .../services/projectSaveService.js | 3 +- .../services/projectUpdateAccessService.js | 3 +- .../views/project-overview.controller.js | 3 +- .../release-project-dialog.controller.js | 12 +- .../services/dataPackageSearch.service.js | 9 +- .../views/data-package-detail.controller.js | 3 +- .../data-package-edit-or-create.controller.js | 3 +- .../services/dataSetSearch.service.js | 3 +- .../data-set-edit-or-create.controller.js | 3 +- .../views/dataSet-detail.controller.js | 3 +- .../services/instrumentSearch.service.js | 3 +- .../views/instrument-detail.controller.js | 3 +- .../instrument-edit-or-create.controller.js | 3 +- ...nalysis-package-configurator.controller.js | 8 +- .../data-package-configurator.controller.js | 8 +- .../services/citationHintGenerator.service.js | 3 +- .../services/shoppingCart.service.js | 9 +- .../services/questionSearch.service.js | 7 +- .../services/questionUpload.service.js | 19 +- .../relatedPublicationSearch.service.js | 3 +- .../relatedPublicationUpload.service.js | 13 +- .../next-search-result.directive.js | 3 +- .../previous-search-result.directive.js | 6 +- .../services/elasticSearch.client.service.js | 5 +- .../genericFilterOptionsSearch.service.js | 7 +- .../searchmanagement/services/search.dao.js | 19 +- .../services/searchHelper.service.js | 24 +- .../services/searchResultNavigator.service.js | 5 +- .../surveyResponseRateImageUpload.service.js | 6 +- .../services/surveySearch.service.js | 9 +- .../views/survey-detail.controller.js | 3 +- .../views/survey-edit-or-create.controller.js | 3 +- .../usermanagement/auth/auth.service.js | 11 +- .../usermanagement/auth/principal.service.js | 7 +- .../create-variable-links.directive.js | 6 +- .../services/variableBuilder.service.js | 11 +- .../services/variableSearch.service.js | 9 +- .../services/variableUpload.service.js | 15 +- mdm-frontend/src/systemjs.config.js | 3 +- 69 files changed, 2930 insertions(+), 466 deletions(-) create mode 100644 mdm-frontend/.eslintrc.json diff --git a/mdm-frontend/.eslintrc.json b/mdm-frontend/.eslintrc.json new file mode 100644 index 00000000000..fbb3febaf69 --- /dev/null +++ b/mdm-frontend/.eslintrc.json @@ -0,0 +1,74 @@ +{ + "root": true, + "ignorePatterns": [ + "projects/**/*", + "**/configuration/*", + "**/legacy/variablemanagement/directives/create-variable-links.directive.js" + ], + "overrides": [ + { + "files": [ + "*.ts" + ], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@angular-eslint/recommended", + "plugin:@angular-eslint/template/process-inline-templates" + ], + "rules": { + "@angular-eslint/directive-selector": [ + "error", + { + "type": "attribute", + "prefix": "app", + "style": "camelCase" + } + ], + "@angular-eslint/component-selector": [ + "error", + { + "type": "element", + "prefix": "app", + "style": "kebab-case" + } + ], + "max-len": [ + "error", + { + "code": 120 + } + ], + "semi": ["error", "always"] + } + }, + { + "files": [ + "*.html" + ], + "extends": [ + "plugin:@angular-eslint/template/recommended", + "plugin:@angular-eslint/template/accessibility" + ], + "rules": {} + }, + { + "files": [ + "*.js" + ], + "extends": [ + "plugin:@angular-eslint/template/recommended", + "plugin:@angular-eslint/template/accessibility" + ], + "rules": { + "max-len": [ + "error", + { + "code": 120 + } + ], + "semi": ["error", "always"] + } + } + ] +} diff --git a/mdm-frontend/angular.json b/mdm-frontend/angular.json index f14ce23a9d9..d0aeb25b287 100644 --- a/mdm-frontend/angular.json +++ b/mdm-frontend/angular.json @@ -24,9 +24,9 @@ "src/manifest.json", "src/assets", { - "glob": "**/*.html.tmpl", - "input": "src/app/legacy", - "output": "scripts/" + "glob": "**/*.html.tmpl", + "input": "src/app/legacy", + "output": "scripts/" }, { "glob": "**/*", @@ -38,12 +38,30 @@ "./node_modules/bootstrap/dist/css/bootstrap.min.css", "src/scss/main.scss", "src/scss/fdz.scss", - { "input": "./node_modules/angular-material/angular-material.css", "bundleName": "vendor-styles"}, - { "input": "./node_modules/angular-block-ui/dist/angular-block-ui.css", "bundleName": "vendor-styles"}, - { "input": "./node_modules/highlightjs/styles/default.css", "bundleName": "vendor-styles"}, - { "input": "./node_modules/angular-jk-carousel/dist/jk-carousel.css", "bundleName": "vendor-styles"}, - { "input": "./node_modules/jsonformatter/dist/json-formatter.css", "bundleName": "vendor-styles"}, - { "input": "./node_modules/fdz-paginator/dest/fdz-paginator.css", "bundleName": "vendor-styles"} + { + "input": "./node_modules/angular-material/angular-material.css", + "bundleName": "vendor-styles" + }, + { + "input": "./node_modules/angular-block-ui/dist/angular-block-ui.css", + "bundleName": "vendor-styles" + }, + { + "input": "./node_modules/highlightjs/styles/default.css", + "bundleName": "vendor-styles" + }, + { + "input": "./node_modules/angular-jk-carousel/dist/jk-carousel.css", + "bundleName": "vendor-styles" + }, + { + "input": "./node_modules/jsonformatter/dist/json-formatter.css", + "bundleName": "vendor-styles" + }, + { + "input": "./node_modules/fdz-paginator/dest/fdz-paginator.css", + "bundleName": "vendor-styles" + } ], "scripts": [ "./node_modules/jquery/dist/jquery.js", @@ -108,15 +126,12 @@ "./node_modules/angulartics-piwik/src/angulartics-piwik.js", "./node_modules/angular-uuid/angular-uuid.js", "./node_modules/citation-js/build/citation.js", - "src/app/legacy/app.js", "src/app/legacy/app.constants.js", - "src/app/legacy/start/configuration/start.js", "src/app/legacy/start/configuration/translations-de.js", "src/app/legacy/start/configuration/translations-en.js", "src/app/legacy/start/views/start.controller.js", - "src/app/legacy/administration/admin.js", "src/app/legacy/administration/configuration/translations-de.js", "src/app/legacy/administration/configuration/translations-en.js", @@ -133,7 +148,6 @@ "src/app/legacy/administration/usermanagement/user.resource.js", "src/app/legacy/administration/usermanagement/user-message-dialog.controller.js", "src/app/legacy/administration/usermanagement/edit-user.controller.js", - "src/app/legacy/usermanagement/configuration/translations-de.js", "src/app/legacy/usermanagement/configuration/translations-en.js", "src/app/legacy/usermanagement/account/account.js", @@ -163,7 +177,6 @@ "src/app/legacy/usermanagement/auth/auth.interceptor.js", "src/app/legacy/usermanagement/welcome/services/welcome-dialog.service.js", "src/app/legacy/usermanagement/welcome/views/welcome-dialog.controller.js", - "src/app/legacy/common/easteregg/egg.js", "src/app/legacy/common/easteregg/thankyou.js", "src/app/legacy/common/easteregg/confused.js", @@ -273,16 +286,13 @@ "src/app/legacy/common/embargo-warning/embargo-warning.directive.js", "src/app/legacy/common/embargo-warning/configuration/translations-de.js", "src/app/legacy/common/embargo-warning/configuration/translations-en.js", - "src/app/legacy/filemanagement/resources/file.resource.js", "src/app/legacy/filemanagement/services/excelReader.service.js", "src/app/legacy/filemanagement/services/fileReader.service.js", - "src/app/legacy/disclosure/configuration/disclosure.js", "src/app/legacy/disclosure/configuration/translations-de.js", "src/app/legacy/disclosure/configuration/translations-en.js", "src/app/legacy/disclosure/views/disclosure.controller.js", - "src/app/legacy/variablemanagement/configuration/variable.js", "src/app/legacy/variablemanagement/configuration/translations-de.js", "src/app/legacy/variablemanagement/configuration/translations-en.js", @@ -297,7 +307,6 @@ "src/app/legacy/variablemanagement/views/variable-detail.controller.js", "src/app/legacy/variablemanagement/directives/diagram.directive.js", "src/app/legacy/variablemanagement/directives/create-variable-links.directive.js", - "src/app/legacy/surveymanagement/configuration/survey.js", "src/app/legacy/surveymanagement/configuration/translations-de.js", "src/app/legacy/surveymanagement/configuration/translations-en.js", @@ -326,7 +335,6 @@ "src/app/legacy/surveymanagement/directives/geographic-coverage.controller.js", "src/app/legacy/surveymanagement/directives/unitValuePicker.controller.js", "src/app/legacy/surveymanagement/directives/unitValuePicker.directive.js", - "src/app/legacy/datasetmanagement/configuration/dataSet.js", "src/app/legacy/datasetmanagement/configuration/translations-de.js", "src/app/legacy/datasetmanagement/configuration/translations-en.js", @@ -346,7 +354,6 @@ "src/app/legacy/datasetmanagement/views/data-set-edit-or-create.controller.js", "src/app/legacy/datasetmanagement/views/choose-data-set-number.controller.js", "src/app/legacy/datasetmanagement/views/create-report-dialog.controller.js", - "src/app/legacy/questionmanagement/configuration/question.js", "src/app/legacy/questionmanagement/configuration/translations-de.js", "src/app/legacy/questionmanagement/configuration/translations-en.js", @@ -359,7 +366,6 @@ "src/app/legacy/questionmanagement/services/questionImageUpload.service.js", "src/app/legacy/questionmanagement/services/questionRepositoryClient.service.js", "src/app/legacy/questionmanagement/views/question-detail.controller.js", - "src/app/legacy/datapackagemanagement/configuration/data-package.js", "src/app/legacy/datapackagemanagement/configuration/translations-de.js", "src/app/legacy/datapackagemanagement/configuration/translations-en.js", @@ -387,7 +393,6 @@ "src/app/legacy/common/details/related-objects.controller.js", "src/app/legacy/common/details/search.detail.component.js", "src/app/legacy/common/details/search.detail.controller.js", - "src/app/legacy/instrumentmanagement/configuration/instrument.js", "src/app/legacy/instrumentmanagement/configuration/translations-de.js", "src/app/legacy/instrumentmanagement/configuration/translations-en.js", @@ -404,7 +409,6 @@ "src/app/legacy/instrumentmanagement/resources/instrumentVersions.resource.js", "src/app/legacy/instrumentmanagement/resources/instrumentAttachmentVersions.resource.js", "src/app/legacy/instrumentmanagement/resources/availableInstrumentNumbers.resource.js", - "src/app/legacy/relatedpublicationmanagement/configuration/relatedPublication.js", "src/app/legacy/relatedpublicationmanagement/configuration/translations-de.js", "src/app/legacy/relatedpublicationmanagement/configuration/translations-en.js", @@ -417,7 +421,6 @@ "src/app/legacy/relatedpublicationmanagement/services/relatedPublicationRepositoryClient.service.js", "src/app/legacy/relatedpublicationmanagement/views/relatedPublicationDetail.controller.js", "src/app/legacy/relatedpublicationmanagement/services/relatedPublicationSearch.service.js", - "src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js", "src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js", "src/app/legacy/dataacquisitionprojectmanagement/directives/data-acquisition-project-navbar-module.controller.js", @@ -460,7 +463,6 @@ "src/app/legacy/dataacquisitionprojectmanagement/directives/metadata-status.js", "src/app/legacy/dataacquisitionprojectmanagement/services/outdatedVersionNotifierService.js", "src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js", - "src/app/legacy/searchmanagement/services/elasticSearch.client.service.js", "src/app/legacy/searchmanagement/services/search.dao.js", "src/app/legacy/searchmanagement/services/elasticSearchAdmin.service.js", @@ -528,7 +530,6 @@ "src/app/legacy/searchmanagement/components/menu-toggle.component.js", "src/app/legacy/searchmanagement/components/menu-toggle.controller.js", "src/app/legacy/searchmanagement/components/package-info.controller.js", - "src/app/legacy/ordermanagement/configuration/shoppingCart.js", "src/app/legacy/ordermanagement/configuration/translations-de.js", "src/app/legacy/ordermanagement/configuration/translations-en.js", @@ -550,7 +551,6 @@ "src/app/legacy/ordermanagement/components/data-package-configurator.controller.js", "src/app/legacy/ordermanagement/components/analysis-package-configurator.component.js", "src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js", - "src/app/legacy/conceptmanagement/configuration/concept.js", "src/app/legacy/conceptmanagement/configuration/translations-de.js", "src/app/legacy/conceptmanagement/configuration/translations-en.js", @@ -564,7 +564,6 @@ "src/app/legacy/conceptmanagement/views/concept-edit-or-create.controller.js", "src/app/legacy/conceptmanagement/directives/uniqueConceptIdValidator.directive.js", "src/app/legacy/conceptmanagement/directives/composeConceptId.directive.js", - "src/app/legacy/analysispackagemanagement/configuration/analysis-package.js", "src/app/legacy/analysispackagemanagement/configuration/translations-de.js", "src/app/legacy/analysispackagemanagement/configuration/translations-en.js", @@ -617,9 +616,9 @@ "src/manifest.json", "src/assets", { - "glob": "**/*.html.tmpl", - "input": "src/app/legacy", - "output": "scripts/" + "glob": "**/*.html.tmpl", + "input": "src/app/legacy", + "output": "scripts/" }, { "glob": "**/*", @@ -644,9 +643,9 @@ "src/manifest.json", "src/assets", { - "glob": "**/*.html.tmpl", - "input": "src/app/legacy", - "output": "scripts/" + "glob": "**/*.html.tmpl", + "input": "src/app/legacy", + "output": "scripts/" }, { "glob": "**/*", @@ -677,9 +676,9 @@ "src/manifest.json", "src/assets", { - "glob": "**/*.html.tmpl", - "input": "src/app/legacy", - "output": "scripts/" + "glob": "**/*.html.tmpl", + "input": "src/app/legacy", + "output": "scripts/" }, { "glob": "**/*", @@ -732,8 +731,23 @@ ], "scripts": [] } + }, + "lint": { + "builder": "@angular-eslint/builder:lint", + "options": { + "lintFilePatterns": [ + "src/**/*.ts", + "src/**/*.js", + "src/**/*.html" + ] + } } } } + }, + "cli": { + "schematicCollections": [ + "@angular-eslint/schematics" + ] } } diff --git a/mdm-frontend/package-lock.json b/mdm-frontend/package-lock.json index a42737556d5..e4d1e0cea31 100644 --- a/mdm-frontend/package-lock.json +++ b/mdm-frontend/package-lock.json @@ -74,10 +74,18 @@ }, "devDependencies": { "@angular-devkit/build-angular": "^16.1.4", + "@angular-eslint/builder": "16.3.1", + "@angular-eslint/eslint-plugin": "16.3.1", + "@angular-eslint/eslint-plugin-template": "16.3.1", + "@angular-eslint/schematics": "16.3.1", + "@angular-eslint/template-parser": "16.3.1", "@angular/cli": "~16.1.4", "@angular/compiler-cli": "^16.1.5", "@types/jasmine": "~4.3.0", + "@typescript-eslint/eslint-plugin": "5.62.0", + "@typescript-eslint/parser": "5.62.0", "bootstrap": "3.4.1", + "eslint": "^8.51.0", "jasmine-core": "~4.5.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.1.0", @@ -87,6 +95,15 @@ "typescript": "~5.1.6" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -351,6 +368,150 @@ "tslib": "^2.1.0" } }, + "node_modules/@angular-eslint/builder": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-16.3.1.tgz", + "integrity": "sha512-PmIOnRwqdOW1bvZtpTGBTDcOq/Czm3D+IPC/k90yIMs1VsAtcxqUmUtELje+ylJeb2LPeEZavekSnEpcatM4HQ==", + "dev": true, + "dependencies": { + "@nx/devkit": "16.5.1", + "nx": "16.5.1" + }, + "peerDependencies": { + "eslint": "^7.20.0 || ^8.0.0", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/bundled-angular-compiler": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-16.3.1.tgz", + "integrity": "sha512-m4WP1xwS9XLcC/3n6lIcG5HZoai/5eb5W3xm48GVcv//0qE2p7S96RSgKPgGHvif5pF8O9xAqEWs3gDEG45+7A==", + "dev": true + }, + "node_modules/@angular-eslint/eslint-plugin": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-16.3.1.tgz", + "integrity": "sha512-kSc8ESfoy8TUSthbq0Lpq9e17I+3Smy4rHoNpKCFEGuJgPs0+OssZMxB6a5EawGbv2EKTPEtrxzFm1WsLR0U9Q==", + "dev": true, + "dependencies": { + "@angular-eslint/utils": "16.3.1", + "@typescript-eslint/utils": "5.62.0" + }, + "peerDependencies": { + "eslint": "^7.20.0 || ^8.0.0", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/eslint-plugin-template": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-16.3.1.tgz", + "integrity": "sha512-+RcFEWqNiRt3+5jXvmlIDlXtP9+vjdmgmVL6tt8yDbqdjBOewtyMu4pE4YaR4sFboyxgME9PbO2WrOyPXh6xjg==", + "dev": true, + "dependencies": { + "@angular-eslint/bundled-angular-compiler": "16.3.1", + "@angular-eslint/utils": "16.3.1", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "aria-query": "5.3.0", + "axobject-query": "4.0.0" + }, + "peerDependencies": { + "eslint": "^7.20.0 || ^8.0.0", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/schematics": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-16.3.1.tgz", + "integrity": "sha512-cqrdobdtRY2XjLa6PhuGOQ7UhTRk2AvWS01sKeGjZ94nQJm5NUtEUyf6u3deIPYllW7gSAWjYzKUObKcTW/R+g==", + "dev": true, + "dependencies": { + "@angular-eslint/eslint-plugin": "16.3.1", + "@angular-eslint/eslint-plugin-template": "16.3.1", + "@nx/devkit": "16.5.1", + "ignore": "5.2.4", + "nx": "16.5.1", + "strip-json-comments": "3.1.1", + "tmp": "0.2.1" + }, + "peerDependencies": { + "@angular/cli": ">= 16.0.0 < 17.0.0" + } + }, + "node_modules/@angular-eslint/schematics/node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/@angular-eslint/schematics/node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" + } + }, + "node_modules/@angular-eslint/template-parser": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-16.3.1.tgz", + "integrity": "sha512-9+SxUtxB2iOnm0ldS2ow0stMxe02rB/TxeMIe8fxsLFHZdw8RQvs/p3HLvVHXzv6gUblMHebIb/ubUmwEVb2SA==", + "dev": true, + "dependencies": { + "@angular-eslint/bundled-angular-compiler": "16.3.1", + "eslint-scope": "^7.0.0" + }, + "peerDependencies": { + "eslint": "^7.20.0 || ^8.0.0", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/template-parser/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@angular-eslint/template-parser/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/@angular-eslint/utils": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-16.3.1.tgz", + "integrity": "sha512-tEBcce0rG+DmcPO8jhRffUFDioGw3G4cUAE15XlRctY1J3QzOBH9HdUOTDt0mMjBgpWCzh0YVT1Moh2bPXU9Xg==", + "dev": true, + "dependencies": { + "@angular-eslint/bundled-angular-compiler": "16.3.1", + "@typescript-eslint/utils": "5.62.0" + }, + "peerDependencies": { + "eslint": "^7.20.0 || ^8.0.0", + "typescript": "*" + } + }, "node_modules/@angular/animations": { "version": "16.1.5", "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-16.1.5.tgz", @@ -1506,6 +1667,15 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/plugin-transform-classes/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/plugin-transform-computed-properties": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz", @@ -2355,6 +2525,15 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/types": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", @@ -2897,6 +3076,179 @@ "node": ">=12" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "dev": true + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -3350,47 +3702,272 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "node_modules/@nrwl/devkit": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-16.5.1.tgz", + "integrity": "sha512-NB+DE/+AFJ7lKH/WBFyatJEhcZGj25F24ncDkwjZ6MzEiSOGOJS0LaV/R+VUsmS5EHTPXYOpn3zHWWAcJhyOmA==", "dev": true, - "optional": true, - "engines": { - "node": ">=14" + "dependencies": { + "@nx/devkit": "16.5.1" } }, - "node_modules/@plotly/d3": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/@plotly/d3/-/d3-3.8.1.tgz", - "integrity": "sha512-x49ThEu1FRA00kTso4Jdfyf2byaCPLBGmLjAYQz5OzaPyLUhHesX3/Nfv2OHEhynhdy2UB39DLXq6thYe2L2kg==" - }, - "node_modules/@plotly/d3-sankey": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/@plotly/d3-sankey/-/d3-sankey-0.7.2.tgz", - "integrity": "sha512-2jdVos1N3mMp3QW0k2q1ph7Gd6j5PY1YihBrwpkFnKqO+cqtZq3AdEYUeSGXMeLsBDQYiqTVcihYfk8vr5tqhw==", + "node_modules/@nrwl/tao": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-16.5.1.tgz", + "integrity": "sha512-x+gi/fKdM6uQNIti9exFlm3V5LBP3Y8vOEziO42HdOigyrXa0S0HD2WMpccmp6PclYKhwEDUjKJ39xh5sdh4Ig==", + "dev": true, "dependencies": { - "d3-array": "1", - "d3-collection": "1", - "d3-shape": "^1.2.0" + "nx": "16.5.1" + }, + "bin": { + "tao": "index.js" } }, - "node_modules/@plotly/d3-sankey-circular": { - "version": "0.33.1", - "resolved": "https://registry.npmjs.org/@plotly/d3-sankey-circular/-/d3-sankey-circular-0.33.1.tgz", - "integrity": "sha512-FgBV1HEvCr3DV7RHhDsPXyryknucxtfnLwPtCKKxdolKyTFYoLX/ibEfX39iFYIL7DYbVeRtP43dbFcrHNE+KQ==", + "node_modules/@nx/devkit": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-16.5.1.tgz", + "integrity": "sha512-T1acZrVVmJw/sJ4PIGidCBYBiBqlg/jT9e8nIGXLSDS20xcLvfo4zBQf8UZLrmHglnwwpDpOWuVJCp2rYA5aDg==", + "dev": true, "dependencies": { - "d3-array": "^1.2.1", - "d3-collection": "^1.0.4", - "d3-shape": "^1.2.0", - "elementary-circuits-directed-graph": "^1.0.4" + "@nrwl/devkit": "16.5.1", + "ejs": "^3.1.7", + "ignore": "^5.0.4", + "semver": "7.5.3", + "tmp": "~0.2.1", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "nx": ">= 15 <= 17" } }, - "node_modules/@plotly/point-cluster": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@plotly/point-cluster/-/point-cluster-3.1.9.tgz", - "integrity": "sha512-MwaI6g9scKf68Orpr1pHZ597pYx9uP8UEFXLPbsCmuw3a84obwz6pnMXGc90VhgDNeNiLEdlmuK7CPo+5PIxXw==", - "dependencies": { + "node_modules/@nx/devkit/node_modules/tmp": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", + "dev": true, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/@nx/nx-darwin-arm64": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.5.1.tgz", + "integrity": "sha512-q98TFI4B/9N9PmKUr1jcbtD4yAFs1HfYd9jUXXTQOlfO9SbDjnrYJgZ4Fp9rMNfrBhgIQ4x1qx0AukZccKmH9Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-darwin-x64": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-16.5.1.tgz", + "integrity": "sha512-j9HmL1l8k7EVJ3eOM5y8COF93gqrydpxCDoz23ZEtsY+JHY77VAiRQsmqBgEx9GGA2dXi9VEdS67B0+1vKariw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-freebsd-x64": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.5.1.tgz", + "integrity": "sha512-CXSPT01aVS869tvCCF2tZ7LnCa8l41wJ3mTVtWBkjmRde68E5Up093hklRMyXb3kfiDYlfIKWGwrV4r0eH6x1A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-linux-arm-gnueabihf": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.5.1.tgz", + "integrity": "sha512-BhrumqJSZCWFfLFUKl4CAUwR0Y0G2H5EfFVGKivVecEQbb+INAek1aa6c89evg2/OvetQYsJ+51QknskwqvLsA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-linux-arm64-gnu": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.5.1.tgz", + "integrity": "sha512-x7MsSG0W+X43WVv7JhiSq2eKvH2suNKdlUHEG09Yt0vm3z0bhtym1UCMUg3IUAK7jy9hhLeDaFVFkC6zo+H/XQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-linux-arm64-musl": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.5.1.tgz", + "integrity": "sha512-J+/v/mFjOm74I0PNtH5Ka+fDd+/dWbKhpcZ2R1/6b9agzZk+Ff/SrwJcSYFXXWKbPX+uQ4RcJoytT06Zs3s0ow==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-linux-x64-gnu": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.5.1.tgz", + "integrity": "sha512-igooWJ5YxQ94Zft7IqgL+Lw0qHaY15Btw4gfK756g/YTYLZEt4tTvR1y6RnK/wdpE3sa68bFTLVBNCGTyiTiDQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-linux-x64-musl": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.5.1.tgz", + "integrity": "sha512-zF/exnPqFYbrLAduGhTmZ7zNEyADid2bzNQiIjJkh8Y6NpDwrQIwVIyvIxqynsjMrIs51kBH+8TUjKjj2Jgf5A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-win32-arm64-msvc": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.5.1.tgz", + "integrity": "sha512-qtqiLS9Y9TYyAbbpq58kRoOroko4ZXg5oWVqIWFHoxc5bGPweQSJCROEqd1AOl2ZDC6BxfuVHfhDDop1kK05WA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nx/nx-win32-x64-msvc": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.5.1.tgz", + "integrity": "sha512-kUJBLakK7iyA9WfsGGQBVennA4jwf5XIgm0lu35oMOphtZIluvzItMt0EYBmylEROpmpEIhHq0P6J9FA+WH0Rg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.0.4.tgz", + "integrity": "sha512-cTDi+FUDBIUOBKEtj+nhiJ71AZVlkAsQFuGQTun5tV9mwQBQgZvhCzG+URPQc8myeN32yRVZEfVAPCs1RW+Jvg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^3.2.1", + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@plotly/d3": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/@plotly/d3/-/d3-3.8.1.tgz", + "integrity": "sha512-x49ThEu1FRA00kTso4Jdfyf2byaCPLBGmLjAYQz5OzaPyLUhHesX3/Nfv2OHEhynhdy2UB39DLXq6thYe2L2kg==" + }, + "node_modules/@plotly/d3-sankey": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@plotly/d3-sankey/-/d3-sankey-0.7.2.tgz", + "integrity": "sha512-2jdVos1N3mMp3QW0k2q1ph7Gd6j5PY1YihBrwpkFnKqO+cqtZq3AdEYUeSGXMeLsBDQYiqTVcihYfk8vr5tqhw==", + "dependencies": { + "d3-array": "1", + "d3-collection": "1", + "d3-shape": "^1.2.0" + } + }, + "node_modules/@plotly/d3-sankey-circular": { + "version": "0.33.1", + "resolved": "https://registry.npmjs.org/@plotly/d3-sankey-circular/-/d3-sankey-circular-0.33.1.tgz", + "integrity": "sha512-FgBV1HEvCr3DV7RHhDsPXyryknucxtfnLwPtCKKxdolKyTFYoLX/ibEfX39iFYIL7DYbVeRtP43dbFcrHNE+KQ==", + "dependencies": { + "d3-array": "^1.2.1", + "d3-collection": "^1.0.4", + "d3-shape": "^1.2.0", + "elementary-circuits-directed-graph": "^1.0.4" + } + }, + "node_modules/@plotly/point-cluster": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@plotly/point-cluster/-/point-cluster-3.1.9.tgz", + "integrity": "sha512-MwaI6g9scKf68Orpr1pHZ597pYx9uP8UEFXLPbsCmuw3a84obwz6pnMXGc90VhgDNeNiLEdlmuK7CPo+5PIxXw==", + "dependencies": { "array-bounds": "^1.0.1", "binary-search-bounds": "^2.0.4", "clamp": "^1.0.1", @@ -3663,9 +4240,9 @@ "dev": true }, "node_modules/@types/json-schema": { - "version": "7.0.12", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", - "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, "node_modules/@types/mime": { @@ -3698,6 +4275,12 @@ "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", "dev": true }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, "node_modules/@types/send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", @@ -3746,71 +4329,294 @@ "@types/node": "*" } }, - "node_modules/@uirouter/core": { - "version": "6.0.8", - "resolved": "https://registry.npmjs.org/@uirouter/core/-/core-6.0.8.tgz", - "integrity": "sha512-Gc/BAW47i4L54p8dqYCJJZuv2s3tqlXQ0fvl6Zp2xrblELPVfxmjnc0eurx3XwfQdaqm3T6uls6tQKkof/4QMw==", + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, "engines": { - "node": ">=4.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@vitejs/plugin-basic-ssl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.0.1.tgz", - "integrity": "sha512-pcub+YbFtFhaGRTo1832FQHQSHvMrlb43974e2eS8EKleR3p1cDdkJFPci1UhwkEf1J9Bz+wKBSzqpKp7nNj2A==", + "node_modules/@typescript-eslint/parser": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" + }, "engines": { - "node": ">=14.6.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", "dev": true, "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "node_modules/@typescript-eslint/type-utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", "dev": true, "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true - }, + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@uirouter/core": { + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/@uirouter/core/-/core-6.0.8.tgz", + "integrity": "sha512-Gc/BAW47i4L54p8dqYCJJZuv2s3tqlXQ0fvl6Zp2xrblELPVfxmjnc0eurx3XwfQdaqm3T6uls6tQKkof/4QMw==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/@vitejs/plugin-basic-ssl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.0.1.tgz", + "integrity": "sha512-pcub+YbFtFhaGRTo1832FQHQSHvMrlb43974e2eS8EKleR3p1cDdkJFPci1UhwkEf1J9Bz+wKBSzqpKp7nNj2A==", + "dev": true, + "engines": { + "node": ">=14.6.0" + }, + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0" + } + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", + "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "dev": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "dev": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true + }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", @@ -3930,6 +4736,37 @@ "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", "dev": true }, + "node_modules/@yarnpkg/parsers": { + "version": "3.0.0-rc.46", + "resolved": "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.0-rc.46.tgz", + "integrity": "sha512-aiATs7pSutzda/rq8fnuPwTglyVwjM22bNnK2ZgjrpAjQHSSl3lztd2f9evst1W/qnC58DRz7T7QndUDumAR4Q==", + "dev": true, + "dependencies": { + "js-yaml": "^3.10.0", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=14.15.0" + } + }, + "node_modules/@zkochan/js-yaml": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@zkochan/js-yaml/-/js-yaml-0.0.6.tgz", + "integrity": "sha512-nzvgl3VfhcELQ8LyVrYOru+UtAy1nrygk2+AGbTm8a5YcO6o8lSjAT+pfg3vJWxIoZKOUhrK6UU7xW/+00kQrg==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@zkochan/js-yaml/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/abab": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", @@ -3970,6 +4807,15 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/adjust-sourcemap-loader": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz", @@ -4383,6 +5229,15 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "dev": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, "node_modules/array-bounds": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-bounds/-/array-bounds-1.0.1.tgz", @@ -4420,6 +5275,27 @@ "resolved": "https://registry.npmjs.org/array-rearrange/-/array-rearrange-2.2.2.tgz", "integrity": "sha512-UfobP5N12Qm4Qu4fwLDIi2v6+wZsSf6snYSxAMeKhrh37YGnNWZPRmVEKc/2wfms53TLQnzfpG8wCx2Y/6NG1w==" }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", + "dev": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, "node_modules/autoprefixer": { "version": "10.4.14", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.14.tgz", @@ -4453,6 +5329,26 @@ "postcss": "^8.1.0" } }, + "node_modules/axios": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axobject-query": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.0.0.tgz", + "integrity": "sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==", + "dev": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, "node_modules/babel-loader": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.2.tgz", @@ -4835,13 +5731,19 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5194,6 +6096,18 @@ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/commander": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", @@ -5956,6 +6870,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -5966,10 +6896,11 @@ } }, "node_modules/define-properties": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", - "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dependencies": { + "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, @@ -5988,6 +6919,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/delegate": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", @@ -6008,6 +6948,15 @@ "node": ">= 0.8" } }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", @@ -6065,6 +7014,18 @@ "node": ">=6" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/dom-serialize": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", @@ -6132,6 +7093,15 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/dotenv": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/draw-svg-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/draw-svg-path/-/draw-svg-path-1.0.0.tgz", @@ -6154,6 +7124,12 @@ "resolved": "https://registry.npmjs.org/dup/-/dup-1.0.0.tgz", "integrity": "sha512-Bz5jxMMC0wgp23Zm15ip1x8IhYRqJvF3nFC0UInJUDkN1z4uNPk9jTnfCUJXbOGiQ1JbXLQsiV41Fb+HXcj5BA==" }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, "node_modules/duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -6255,15 +7231,30 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "dev": true }, - "node_modules/elasticsearch-browser": { - "version": "16.7.1", - "resolved": "https://github.com/elastic/bower-elasticsearch-js/archive/v16.7.1.tar.gz", - "integrity": "sha1-l8Bke8pqRQLHbnl1gTVTLP3NRwc= sha512-yOFro4gLfFSy0RqVFt7mRSTgre9BaOM/8qJ8JG3uNWJr+p8xX6fZFmGRrl1/WJJvLZgImNhrU7ntJYUiMZhyPg==", - "license": "Apache-2.0" - }, - "node_modules/electron-to-chromium": { - "version": "1.4.461", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.461.tgz", + "node_modules/ejs": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", + "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", + "dev": true, + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/elasticsearch-browser": { + "version": "16.7.1", + "resolved": "https://github.com/elastic/bower-elasticsearch-js/archive/v16.7.1.tar.gz", + "integrity": "sha1-l8Bke8pqRQLHbnl1gTVTLP3NRwc= sha512-yOFro4gLfFSy0RqVFt7mRSTgre9BaOM/8qJ8JG3uNWJr+p8xX6fZFmGRrl1/WJJvLZgImNhrU7ntJYUiMZhyPg==", + "license": "Apache-2.0" + }, + "node_modules/electron-to-chromium": { + "version": "1.4.461", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.461.tgz", "integrity": "sha512-1JkvV2sgEGTDXjdsaQCeSwYYuhLRphRpc+g6EHTFELJXEiznLt3/0pZ9JuAOQ5p2rI3YxKTbivtvajirIfhrEQ==", "dev": true }, @@ -6376,6 +7367,18 @@ "node": ">=10.13.0" } }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/ent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", @@ -6431,6 +7434,25 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-module-lexer": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.0.tgz", @@ -6582,32 +7604,421 @@ "esgenerate": "bin/esgenerate.js" }, "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/eslint/node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint/node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/escodegen/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true, + "node_modules/eslint/node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.8.0" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": ">=8.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" } }, "node_modules/esprima": { @@ -6622,6 +8033,27 @@ "node": ">=4" } }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -6995,11 +8427,44 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/file-saver": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-1.3.8.tgz", "integrity": "sha512-spKHSBQIxxS81N/O21WmuXA2F6wppUCsutpzenOeZzOCCJ5gEfcbqJP983IrpLXzYmXnMUa6J03SubcNPdKrlg==" }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -7087,10 +8552,33 @@ "node": ">=8" } }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "node_modules/flatten-vertex-data": { @@ -7102,9 +8590,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true, "funding": [ { @@ -7153,6 +8641,20 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -7225,6 +8727,12 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, "node_modules/fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -7277,9 +8785,12 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/gauge": { "version": "4.0.4", @@ -7334,14 +8845,18 @@ "integrity": "sha512-LnpfLf/TNzr9zVOGiIY6aKCz8EKuXmlYNV7CM2pUjBa/B+c2I15tS7KLySep75+FuerJdmArvJLcsAXWEy2H0A==" }, "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7456,12 +8971,30 @@ "dev": true }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globalthis": { @@ -7743,11 +9276,28 @@ "delegate": "^3.1.2" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "node_modules/grid-index": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/grid-index/-/grid-index-1.1.0.tgz", @@ -7759,17 +9309,6 @@ "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", "dev": true }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -7796,20 +9335,20 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dependencies": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "engines": { "node": ">= 0.4" }, @@ -7834,6 +9373,17 @@ "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", "dev": true }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hdr-histogram-js": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/hdr-histogram-js/-/hdr-histogram-js-2.0.3.tgz", @@ -8166,9 +9716,9 @@ ] }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -8406,11 +9956,11 @@ "integrity": "sha512-F5rTJxDQ2sW81fcfOR1GnCXT6sVJC104fCyfj+mjpwNEwaPYSn5fte5jiHmBg3DHsIoL/l8Kvw5VN5SsTRcRFQ==" }, "node_modules/is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8525,6 +10075,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -8767,6 +10326,116 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/jake": { + "version": "10.8.7", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", + "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", + "dev": true, + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jake/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/jake/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jake/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/jake/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/jake/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/jake/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jake/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jake/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/jasmine-core": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.5.0.tgz", @@ -8904,6 +10573,12 @@ "node": ">=4" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -8916,6 +10591,12 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, "node_modules/json3": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz", @@ -9201,6 +10882,15 @@ "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-3.0.0.tgz", "integrity": "sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew==" }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -9853,9 +11543,9 @@ "dev": true }, "node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -10203,6 +11893,18 @@ "resolved": "https://registry.npmjs.org/native-promise-only/-/native-promise-only-0.8.1.tgz", "integrity": "sha512-zkVhZUA3y8mbz652WrL5x0fB0ehrBkulWT3TomAQ9iDtyXZvzKeEA6GPxAItBYeNYl5yngKRX612qHOhvMkDeg==" }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "node_modules/needle": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/needle/-/needle-3.2.0.tgz", @@ -10473,8 +12175,7 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", - "dev": true, - "optional": true + "dev": true }, "node_modules/node-fetch": { "version": "2.6.12", @@ -10533,7 +12234,7 @@ "version": "4.6.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", - "optional": true, + "devOptional": true, "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -10613,174 +12314,463 @@ "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-svg-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/normalize-svg-path/-/normalize-svg-path-0.1.0.tgz", + "integrity": "sha512-1/kmYej2iedi5+ROxkRESL/pI02pkg0OBnaR4hJkSIX6+ORzepwbuUXfrdZaPjysTsJInj0Rj5NuX027+dMBvA==" + }, + "node_modules/npm-bundled": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", + "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", + "dev": true, + "dependencies": { + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-install-checks": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.1.1.tgz", + "integrity": "sha512-dH3GmQL4vsPtld59cOn8uY0iOqRmqKvV+DLGwNXV/Q7MDgD2QfOADWd/mFXcIE5LVhYYGjA3baz6W9JneqnuCw==", + "dev": true, + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-normalize-package-bin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-package-arg": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-packlist": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", + "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", + "dev": true, + "dependencies": { + "ignore-walk": "^6.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-pick-manifest": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz", + "integrity": "sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA==", + "dev": true, + "dependencies": { + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-registry-fetch": { + "version": "14.0.5", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz", + "integrity": "sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA==", + "dev": true, + "dependencies": { + "make-fetch-happen": "^11.0.0", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "dev": true, + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/number-is-integer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-integer/-/number-is-integer-1.0.1.tgz", + "integrity": "sha512-Dq3iuiFBkrbmuQjGFFF3zckXNCQoSD37/SdSbgcBailUx6knDvDwb5CympBgcoWHy36sfS12u74MHYkXyHq6bg==", + "dependencies": { + "is-finite": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nx": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/nx/-/nx-16.5.1.tgz", + "integrity": "sha512-I3hJRE4hG7JWAtncWwDEO3GVeGPpN0TtM8xH5ArZXyDuVeTth/i3TtJzdDzqXO1HHtIoAQN0xeq4n9cLuMil5g==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@nrwl/tao": "16.5.1", + "@parcel/watcher": "2.0.4", + "@yarnpkg/lockfile": "^1.1.0", + "@yarnpkg/parsers": "3.0.0-rc.46", + "@zkochan/js-yaml": "0.0.6", + "axios": "^1.0.0", + "chalk": "^4.1.0", + "cli-cursor": "3.1.0", + "cli-spinners": "2.6.1", + "cliui": "^7.0.2", + "dotenv": "~10.0.0", + "enquirer": "~2.3.6", + "fast-glob": "3.2.7", + "figures": "3.2.0", + "flat": "^5.0.2", + "fs-extra": "^11.1.0", + "glob": "7.1.4", + "ignore": "^5.0.4", + "js-yaml": "4.1.0", + "jsonc-parser": "3.2.0", + "lines-and-columns": "~2.0.3", + "minimatch": "3.0.5", + "npm-run-path": "^4.0.1", + "open": "^8.4.0", + "semver": "7.5.3", + "string-width": "^4.2.3", + "strong-log-transformer": "^2.1.0", + "tar-stream": "~2.2.0", + "tmp": "~0.2.1", + "tsconfig-paths": "^4.1.2", + "tslib": "^2.3.0", + "v8-compile-cache": "2.3.0", + "yargs": "^17.6.2", + "yargs-parser": "21.1.1" + }, + "bin": { + "nx": "bin/nx.js" + }, + "optionalDependencies": { + "@nx/nx-darwin-arm64": "16.5.1", + "@nx/nx-darwin-x64": "16.5.1", + "@nx/nx-freebsd-x64": "16.5.1", + "@nx/nx-linux-arm-gnueabihf": "16.5.1", + "@nx/nx-linux-arm64-gnu": "16.5.1", + "@nx/nx-linux-arm64-musl": "16.5.1", + "@nx/nx-linux-x64-gnu": "16.5.1", + "@nx/nx-linux-x64-musl": "16.5.1", + "@nx/nx-win32-arm64-msvc": "16.5.1", + "@nx/nx-win32-x64-msvc": "16.5.1" + }, + "peerDependencies": { + "@swc-node/register": "^1.4.2", + "@swc/core": "^1.2.173" + }, + "peerDependenciesMeta": { + "@swc-node/register": { + "optional": true + }, + "@swc/core": { + "optional": true + } + } + }, + "node_modules/nx/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/nx/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/nx/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/nx/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "node_modules/nx/node_modules/cli-spinners": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", + "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "node_modules/nx/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "node_modules/normalize-svg-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/normalize-svg-path/-/normalize-svg-path-0.1.0.tgz", - "integrity": "sha512-1/kmYej2iedi5+ROxkRESL/pI02pkg0OBnaR4hJkSIX6+ORzepwbuUXfrdZaPjysTsJInj0Rj5NuX027+dMBvA==" - }, - "node_modules/npm-bundled": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", - "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", + "node_modules/nx/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "npm-normalize-package-bin": "^3.0.0" + "color-name": "~1.1.4" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=7.0.0" } }, - "node_modules/npm-install-checks": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.1.1.tgz", - "integrity": "sha512-dH3GmQL4vsPtld59cOn8uY0iOqRmqKvV+DLGwNXV/Q7MDgD2QfOADWd/mFXcIE5LVhYYGjA3baz6W9JneqnuCw==", + "node_modules/nx/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/nx/node_modules/fast-glob": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", "dev": true, "dependencies": { - "semver": "^7.1.1" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=8" } }, - "node_modules/npm-normalize-package-bin": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", - "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", + "node_modules/nx/node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=14.14" } }, - "node_modules/npm-package-arg": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", - "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", + "node_modules/nx/node_modules/glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "dev": true, "dependencies": { - "hosted-git-info": "^6.0.0", - "proc-log": "^3.0.0", - "semver": "^7.3.5", - "validate-npm-package-name": "^5.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "*" } }, - "node_modules/npm-packlist": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", - "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", + "node_modules/nx/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "dependencies": { - "ignore-walk": "^6.0.0" - }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=8" } }, - "node_modules/npm-pick-manifest": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz", - "integrity": "sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA==", + "node_modules/nx/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "npm-install-checks": "^6.0.0", - "npm-normalize-package-bin": "^3.0.0", - "npm-package-arg": "^10.0.0", - "semver": "^7.3.5" + "argparse": "^2.0.1" }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/npm-registry-fetch": { - "version": "14.0.5", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz", - "integrity": "sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA==", + "node_modules/nx/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "dependencies": { - "make-fetch-happen": "^11.0.0", - "minipass": "^5.0.0", - "minipass-fetch": "^3.0.0", - "minipass-json-stream": "^1.0.1", - "minizlib": "^2.1.2", - "npm-package-arg": "^10.0.0", - "proc-log": "^3.0.0" + "universalify": "^2.0.0" }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/nx/node_modules/lines-and-columns": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz", + "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", + "dev": true, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "node_modules/nx/node_modules/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", "dev": true, "dependencies": { - "path-key": "^3.0.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=8" + "node": "*" } }, - "node_modules/npmlog": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", - "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "node_modules/nx/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=8" } }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "node_modules/nx/node_modules/tmp": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", "dev": true, - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" + "engines": { + "node": ">=14.14" } }, - "node_modules/number-is-integer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-integer/-/number-is-integer-1.0.1.tgz", - "integrity": "sha512-Dq3iuiFBkrbmuQjGFFF3zckXNCQoSD37/SdSbgcBailUx6knDvDwb5CympBgcoWHy36sfS12u74MHYkXyHq6bg==", - "dependencies": { - "is-finite": "^1.0.1" - }, + "node_modules/nx/node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 10.0.0" } }, "node_modules/object-assign": { @@ -10792,9 +12782,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11677,6 +13667,12 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -12618,6 +14614,23 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -12695,14 +14708,18 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -13163,6 +15180,15 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -13172,6 +15198,35 @@ "node": ">=6" } }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strong-log-transformer": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz", + "integrity": "sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA==", + "dev": true, + "dependencies": { + "duplexer": "^0.1.1", + "minimist": "^1.2.0", + "through": "^2.3.4" + }, + "bin": { + "sl-log-transformer": "bin/sl-log-transformer.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/strongly-connected-components": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/strongly-connected-components/-/strongly-connected-components-1.0.1.tgz", @@ -13301,6 +15356,22 @@ "node": ">=10" } }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/tar/node_modules/fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -13679,11 +15750,46 @@ "tree-kill": "cli.js" } }, + "node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "dev": true, + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/tslib": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, "node_modules/tuf-js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz", @@ -13975,6 +16081,12 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -14749,6 +16861,18 @@ "node": ">=12" } }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zone.js": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.13.1.tgz", diff --git a/mdm-frontend/package.json b/mdm-frontend/package.json index 0fe562c0c82..65fa11f0f28 100644 --- a/mdm-frontend/package.json +++ b/mdm-frontend/package.json @@ -6,7 +6,8 @@ "start": "ng serve --proxy-config proxy.conf.json", "build": "ng build", "watch": "ng build --watch --configuration development", - "test": "ng test" + "test": "ng test", + "lint": "ng lint" }, "private": true, "dependencies": { @@ -76,10 +77,18 @@ }, "devDependencies": { "@angular-devkit/build-angular": "^16.1.4", + "@angular-eslint/builder": "16.3.1", + "@angular-eslint/eslint-plugin": "16.3.1", + "@angular-eslint/eslint-plugin-template": "16.3.1", + "@angular-eslint/schematics": "16.3.1", + "@angular-eslint/template-parser": "16.3.1", "@angular/cli": "~16.1.4", "@angular/compiler-cli": "^16.1.5", "@types/jasmine": "~4.3.0", + "@typescript-eslint/eslint-plugin": "5.62.0", + "@typescript-eslint/parser": "5.62.0", "bootstrap": "3.4.1", + "eslint": "^8.51.0", "jasmine-core": "~4.5.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.1.0", @@ -88,4 +97,4 @@ "karma-jasmine-html-reporter": "~2.0.0", "typescript": "~5.1.6" } -} +} \ No newline at end of file diff --git a/mdm-frontend/src/app/app.module.ts b/mdm-frontend/src/app/app.module.ts index 01bbdea2173..fb0ce0729a2 100644 --- a/mdm-frontend/src/app/app.module.ts +++ b/mdm-frontend/src/app/app.module.ts @@ -1,7 +1,8 @@ import { DoBootstrap, NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { UpgradeModule } from '@angular/upgrade/static'; -import { DataacquisitionprojectmanagementModule } from './dataacquisitionprojectmanagement/dataacquisitionprojectmanagement.module'; +import { DataacquisitionprojectmanagementModule } from + './dataacquisitionprojectmanagement/dataacquisitionprojectmanagement.module'; // import { AppRoutingModule } from './app-routing.module'; // import { AppComponent } from './app.component'; diff --git a/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionproject.search.service.ts b/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionproject.search.service.ts index 5e09a218e56..8841264b200 100644 --- a/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionproject.search.service.ts +++ b/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionproject.search.service.ts @@ -22,7 +22,7 @@ const DATA_ACQUISITION_PROJECT_INDEX_NAME = 'data_acquisition_projects'; }) export class DataacquisitionprojectSearchService { - constructor() {} + // constructor() {} /** * Creates an empty Elasticsearch bool query. @@ -46,8 +46,8 @@ export class DataacquisitionprojectSearchService { * @param base the base object usually consisting of a field name and a value * @returns the fragment */ - createFilterFragment(queryFragmentType: QueryFragmentType, base: Object) { - let fragment : QueryFragment = {}; + createFilterFragment(queryFragmentType: QueryFragmentType, base: { [key: string]: unknown; } | undefined) { + const fragment : QueryFragment = {}; switch (queryFragmentType) { case QueryFragmentType.term: fragment.term = base; @@ -99,51 +99,52 @@ export class DataacquisitionprojectSearchService { */ createFilterQueryForProjects(pageIndex: number, pageSize: number, - projectType: String | null, + projectType: string | null, assignedProjectsOnly: boolean, - projectId: String | null, - assigneeGroup: String | null, - releaseState: String | null, - filterDataPackages: String[] | null, - additionalInfo: String | null, - loginName?: String): Query { + projectId: string | null, + assigneeGroup: string | null, + releaseState: string | null, + filterDataPackages: string[] | null, + additionalInfo: string | null, + loginName?: string): Query { - let boolQuery = this.createBoolQuery(); + const boolQuery = this.createBoolQuery(); // add no shadows filter - let noShadowBase = {'shadow': false}; - let noShadowsFilter = this.createFilterFragment(QueryFragmentType.term, noShadowBase); + const noShadowBase = {'shadow': false}; + const noShadowsFilter = this.createFilterFragment(QueryFragmentType.term, noShadowBase); boolQuery.bool.filter?.push(noShadowsFilter); // dataproviders should only see assigned data if (assignedProjectsOnly && loginName) { - let assignedOnlyBase = {'configuration.dataProviders': loginName}; - let assignedOnlyFilter = this.createFilterFragment(QueryFragmentType.term, assignedOnlyBase); + const assignedOnlyBase = {'configuration.dataProviders': loginName}; + const assignedOnlyFilter = this.createFilterFragment(QueryFragmentType.term, assignedOnlyBase); boolQuery.bool.filter?.push(assignedOnlyFilter); } if (projectType) { - let requirement = 'configuration.requirements.is' + projectType.charAt(0).toUpperCase() + projectType.slice(1) + 'Required' - let typeBase = {[requirement]: true}; - let typeFilter = this.createFilterFragment(QueryFragmentType.term, typeBase); + const requirement = 'configuration.requirements.is' + projectType.charAt(0).toUpperCase() + + projectType.slice(1) + 'Required'; + const typeBase = {[requirement]: true}; + const typeFilter = this.createFilterFragment(QueryFragmentType.term, typeBase); boolQuery.bool.filter?.push(typeFilter); } if (projectId) { - let projectBase = {'id': projectId}; - let projectFilter = this.createFilterFragment(QueryFragmentType.term, projectBase) + const projectBase = {'id': projectId}; + const projectFilter = this.createFilterFragment(QueryFragmentType.term, projectBase); boolQuery.bool.filter?.push(projectFilter); } if (assigneeGroup) { - let assigneeGroupBase = {'assigneeGroup': assigneeGroup}; - let assigneeGroupFilter = this.createFilterFragment(QueryFragmentType.term, assigneeGroupBase) + const assigneeGroupBase = {'assigneeGroup': assigneeGroup}; + const assigneeGroupFilter = this.createFilterFragment(QueryFragmentType.term, assigneeGroupBase); boolQuery.bool.filter?.push(assigneeGroupFilter); } if (releaseState) { - let releaseStateBase = {'field': 'release'}; - let releaseStateFilter = this.createFilterFragment(QueryFragmentType.exists, releaseStateBase) + const releaseStateBase = {'field': 'release'}; + const releaseStateFilter = this.createFilterFragment(QueryFragmentType.exists, releaseStateBase); if (releaseState === "released") { boolQuery.bool.must?.push(releaseStateFilter); boolQuery.bool.must?.push({ @@ -166,21 +167,21 @@ export class DataacquisitionprojectSearchService { } if (filterDataPackages && filterDataPackages.length > 0) { - for (let dpFilter of filterDataPackages) { - let fieldName = 'configuration.requirements.is' + dpFilter + 'Required'; - let dpFilterBase = {[fieldName]: true}; - let dpFilterFilter = this.createFilterFragment(QueryFragmentType.term, dpFilterBase); + for (const dpFilter of filterDataPackages) { + const fieldName = 'configuration.requirements.is' + dpFilter + 'Required'; + const dpFilterBase = {[fieldName]: true}; + const dpFilterFilter = this.createFilterFragment(QueryFragmentType.term, dpFilterBase); boolQuery.bool.filter?.push(dpFilterFilter); } } if (additionalInfo) { - let additionalBase = {'hasUserServiceRemarks': additionalInfo === 'true' ? true : false}; - let additionalFilter = this.createFilterFragment(QueryFragmentType.term, additionalBase); + const additionalBase = {'hasUserServiceRemarks': additionalInfo === 'true' ? true : false}; + const additionalFilter = this.createFilterFragment(QueryFragmentType.term, additionalBase); boolQuery.bool.filter?.push(additionalFilter); } - let queryBody : QueryBody = { + const queryBody : QueryBody = { track_total_hits: true, query: boolQuery, from: (pageIndex) * pageSize, @@ -188,7 +189,7 @@ export class DataacquisitionprojectSearchService { sort: this.getDefaultSorting() }; - let query : Query = { + const query : Query = { index: DATA_ACQUISITION_PROJECT_INDEX_NAME, body: queryBody }; @@ -207,43 +208,44 @@ export class DataacquisitionprojectSearchService { * @returns an Elasticsearch query */ createSearchQueryForProjectsById( - projectType: String | null, + projectType: string | null, assignedProjectsOnly: boolean, - searchTerm: String | null, - loginName?: String | null) : Query { + searchTerm: string | null, + loginName?: string | null) : Query { - let boolQuery = this.createBoolQuery(); + const boolQuery = this.createBoolQuery(); // add no shadows filter - let noShadowBase = {'shadow': false}; - let noShadowsFilter = this.createFilterFragment(QueryFragmentType.term, noShadowBase); + const noShadowBase = {'shadow': false}; + const noShadowsFilter = this.createFilterFragment(QueryFragmentType.term, noShadowBase); boolQuery.bool.filter?.push(noShadowsFilter); // dataproviders should only see assigned data if (assignedProjectsOnly && loginName) { - let assignedOnlyBase = {'configuration.dataProviders': loginName}; - let assignedOnlyFilter = this.createFilterFragment(QueryFragmentType.term, assignedOnlyBase); + const assignedOnlyBase = {'configuration.dataProviders': loginName}; + const assignedOnlyFilter = this.createFilterFragment(QueryFragmentType.term, assignedOnlyBase); boolQuery.bool.filter?.push(assignedOnlyFilter); } if (projectType) { - let requirement = 'configuration.requirements.is' + projectType.charAt(0).toUpperCase() + projectType.slice(1) + 'Required' - let typeBase = {[requirement]: true}; - let typeFilter = this.createFilterFragment(QueryFragmentType.term, typeBase); + const requirement = 'configuration.requirements.is' + projectType.charAt(0).toUpperCase() + + projectType.slice(1) + 'Required'; + const typeBase = {[requirement]: true}; + const typeFilter = this.createFilterFragment(QueryFragmentType.term, typeBase); boolQuery.bool.filter?.push(typeFilter); } - let searchTermBase = { + const searchTermBase = { "id.ngrams": { "query": searchTerm || '', "operator": "AND", "minimum_should_match": "100%", "zero_terms_query": "ALL" } - } - let projectFilter = this.createFilterFragment(QueryFragmentType.match, searchTermBase) + }; + const projectFilter = this.createFilterFragment(QueryFragmentType.match, searchTermBase); boolQuery.bool.filter?.push(projectFilter); - let queryBody : QueryBody = { + const queryBody : QueryBody = { track_total_hits: true, query: boolQuery, from: 0, @@ -251,7 +253,7 @@ export class DataacquisitionprojectSearchService { sort: this.getDefaultSorting() }; - let query : Query = { + const query : Query = { index: DATA_ACQUISITION_PROJECT_INDEX_NAME, body: queryBody }; @@ -262,4 +264,5 @@ export class DataacquisitionprojectSearchService { // necessary for using service in AngularJS getAngularJSGlobal() .module('metadatamanagementApp') - .factory('dataAcquisitionProjectSearchService', downgradeInjectable(DataacquisitionprojectSearchService) as any); + .factory('dataAcquisitionProjectSearchService', + downgradeInjectable(DataacquisitionprojectSearchService) as unknown); diff --git a/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionprojectmanagement.module.ts b/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionprojectmanagement.module.ts index d27bb50a0e4..afc5211505d 100644 --- a/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionprojectmanagement.module.ts +++ b/mdm-frontend/src/app/dataacquisitionprojectmanagement/dataacquisitionprojectmanagement.module.ts @@ -2,7 +2,6 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { DataacquisitionprojectSearchService } from './dataacquisitionproject.search.service'; import { UpgradeModule } from '@angular/upgrade/static'; -import { RouterModule } from '@angular/router'; diff --git a/mdm-frontend/src/app/dataacquisitionprojectmanagement/search.interfaces.ts b/mdm-frontend/src/app/dataacquisitionprojectmanagement/search.interfaces.ts index 9f2986a75b8..830cb05d546 100644 --- a/mdm-frontend/src/app/dataacquisitionprojectmanagement/search.interfaces.ts +++ b/mdm-frontend/src/app/dataacquisitionprojectmanagement/search.interfaces.ts @@ -10,7 +10,7 @@ export interface Query { export interface QueryBody { track_total_hits: boolean; _source?: Array; - sort?: Object; + sort?: object; query: BoolQuery; from?: number; size?: number; @@ -35,8 +35,8 @@ export enum QueryFragmentType { } export interface QueryFragment { - [QueryFragmentType.term]?: { [key: string]: any }, - [QueryFragmentType.terms]?: { [key: string]: any }, - [QueryFragmentType.match]?: { [key: string]: any }, - [QueryFragmentType.exists]?: { [key: string]: any } + [QueryFragmentType.term]?: { [key: string]: unknown }, + [QueryFragmentType.terms]?: { [key: string]: unknown }, + [QueryFragmentType.match]?: { [key: string]: unknown }, + [QueryFragmentType.exists]?: { [key: string]: unknown } } diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/services/analysisPackageSearch.service.js b/mdm-frontend/src/app/legacy/analysispackagemanagement/services/analysisPackageSearch.service.js index 20612366b1d..8a9041458a5 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/services/analysisPackageSearch.service.js +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/services/analysisPackageSearch.service.js @@ -2,7 +2,14 @@ 'use strict'; angular.module('metadatamanagementApp') - .factory('AnalysisPackageSearchService', ['$q', 'ElasticSearchClient', 'CleanJSObjectService', 'SearchHelperService', 'GenericFilterOptionsSearchService', 'LanguageService', 'AnalysisPackageIdBuilderService', + .factory('AnalysisPackageSearchService', [ + '$q', + 'ElasticSearchClient', + 'CleanJSObjectService', + 'SearchHelperService', + 'GenericFilterOptionsSearchService', + 'LanguageService', + 'AnalysisPackageIdBuilderService', function($q, ElasticSearchClient, CleanJSObjectService, SearchHelperService, GenericFilterOptionsSearchService, LanguageService, AnalysisPackageIdBuilderService) { diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js index 83c693e48cd..92d934c24b2 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.controller.js @@ -200,7 +200,8 @@ angular.module('metadatamanagementApp') DataAcquisitionProjectResource.get({ id: result.dataAcquisitionProjectId }).$promise.then(function(project) { - ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); + ctrl.shouldDisplayEditButton = localStorage.getItem( + 'currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; ctrl.project = project; }); diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-edit-or-create.controller.js b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-edit-or-create.controller.js index 64b106db6c4..367ff380a7c 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-edit-or-create.controller.js +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-edit-or-create.controller.js @@ -182,7 +182,8 @@ angular.module('metadatamanagementApp') }); } else { if (CurrentProjectService.getCurrentProject() && - (!CurrentProjectService.getCurrentProject().release || CurrentProjectService.getCurrentProject().release.isPreRelease)) { + (!CurrentProjectService.getCurrentProject().release + || CurrentProjectService.getCurrentProject().release.isPreRelease)) { if (!ProjectUpdateAccessService .isUpdateAllowed(CurrentProjectService.getCurrentProject(), 'analysisPackages', true)) { diff --git a/mdm-frontend/src/app/legacy/common/details/detail.component.js b/mdm-frontend/src/app/legacy/common/details/detail.component.js index 1b03338303b..5b687f6d5d3 100644 --- a/mdm-frontend/src/app/legacy/common/details/detail.component.js +++ b/mdm-frontend/src/app/legacy/common/details/detail.component.js @@ -2,7 +2,13 @@ 'use strict'; var DetailComponent = { - controller: ['$scope', '$rootScope', 'CommonDialogsService', '$mdDialog', 'LicenseDialogService', function($scope, $rootScope, CommonDialogsService, $mdDialog, LicenseDialogService) { + controller: [ + '$scope', + '$rootScope', + 'CommonDialogsService', + '$mdDialog', + 'LicenseDialogService', + function($scope, $rootScope, CommonDialogsService, $mdDialog, LicenseDialogService) { $scope.bowser = $rootScope.bowser; /** diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js index 6734f186e9e..f07ddefd23b 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js @@ -26,7 +26,8 @@ angular.module('metadatamanagementApp') $scope.isOrderView = true; } this.project = $scope.project; - this.type = this.project && this.project.configuration.requirements.dataPackageRequired ? 'data-package' : 'analysis-package'; + this.type = this.project + && this.project.configuration.requirements.dataPackageRequired ? 'data-package' : 'analysis-package'; }], link: function (ctrl) { diff --git a/mdm-frontend/src/app/legacy/common/i18n/services/language.service.js b/mdm-frontend/src/app/legacy/common/i18n/services/language.service.js index 115eca1bc00..3bf5252837b 100644 --- a/mdm-frontend/src/app/legacy/common/i18n/services/language.service.js +++ b/mdm-frontend/src/app/legacy/common/i18n/services/language.service.js @@ -1,6 +1,15 @@ 'use strict'; -angular.module('metadatamanagementApp').factory('LanguageService', ['$q', '$translate', '$location', '$rootScope', 'tmhDynamicLocale', 'LANGUAGES', 'amMoment', '$mdDateLocale', 'moment', +angular.module('metadatamanagementApp').factory('LanguageService', [ + '$q', + '$translate', + '$location', + '$rootScope', + 'tmhDynamicLocale', + 'LANGUAGES', + 'amMoment', + '$mdDateLocale', + 'moment', function($q, $translate, $location, $rootScope, tmhDynamicLocale, LANGUAGES, amMoment, $mdDateLocale, moment) { return { diff --git a/mdm-frontend/src/app/legacy/common/migration/services/migrationService.js b/mdm-frontend/src/app/legacy/common/migration/services/migrationService.js index 9f510c08b1e..b76af0ab33f 100644 --- a/mdm-frontend/src/app/legacy/common/migration/services/migrationService.js +++ b/mdm-frontend/src/app/legacy/common/migration/services/migrationService.js @@ -1,6 +1,7 @@ 'use strict'; -angular.module('metadatamanagementApp').service('MigrationService', ['VERSION', 'localStorageService', 'ShoppingCartService', +angular.module('metadatamanagementApp').service('MigrationService', [ + 'VERSION', 'localStorageService', 'ShoppingCartService', function(VERSION, localStorageService, ShoppingCartService) { var versionKey = 'version'; diff --git a/mdm-frontend/src/app/legacy/common/pagemetadata/pageMetadata.service.js b/mdm-frontend/src/app/legacy/common/pagemetadata/pageMetadata.service.js index 2c257dd173c..77a9abbdf16 100644 --- a/mdm-frontend/src/app/legacy/common/pagemetadata/pageMetadata.service.js +++ b/mdm-frontend/src/app/legacy/common/pagemetadata/pageMetadata.service.js @@ -1,7 +1,8 @@ 'use strict'; // service for updating the page title (used in toolbar and window.title) -angular.module('metadatamanagementApp').factory('PageMetadataService', ['$rootScope', '$transitions', '$location', '$analytics', '$timeout', '$window', '$sce', 'LanguageService', '$filter', +angular.module('metadatamanagementApp').factory('PageMetadataService', [ + '$rootScope', '$transitions', '$location', '$analytics', '$timeout', '$window', '$sce', 'LanguageService', '$filter', function($rootScope, $transitions, $location, $analytics, $timeout, $window, $sce, LanguageService, $filter) { $transitions.onExit({}, function() { diff --git a/mdm-frontend/src/app/legacy/common/session-storage/session-storage.service.js b/mdm-frontend/src/app/legacy/common/session-storage/session-storage.service.js index b666b9ae5e3..c6d8dc8e43e 100644 --- a/mdm-frontend/src/app/legacy/common/session-storage/session-storage.service.js +++ b/mdm-frontend/src/app/legacy/common/session-storage/session-storage.service.js @@ -1,4 +1,7 @@ -// source: https://raw.githubusercontent.com/scriptwerx/angular-swx-session-storage/master/src/js/service/session-storage.service.js +/* source: + https://raw.githubusercontent.com/scriptwerx/ + angular-swx-session-storage/master/src/js/service/session-storage.service.js +*/ (function() { diff --git a/mdm-frontend/src/app/legacy/common/websocket/websocket.service.js b/mdm-frontend/src/app/legacy/common/websocket/websocket.service.js index df937c5b810..9d7d5aa7029 100644 --- a/mdm-frontend/src/app/legacy/common/websocket/websocket.service.js +++ b/mdm-frontend/src/app/legacy/common/websocket/websocket.service.js @@ -1,7 +1,8 @@ /*global SockJS, Stomp, window */ 'use strict'; -angular.module('metadatamanagementApp').factory('WebSocketService', ['$timeout', '$mdDialog', 'ENV', 'localStorageService', '$translate', 'LanguageService', 'ClientJS', '$location', +angular.module('metadatamanagementApp').factory('WebSocketService', [ + '$timeout', '$mdDialog', 'ENV', 'localStorageService', '$translate', 'LanguageService', 'ClientJS', '$location', function($timeout, $mdDialog, ENV, localStorageService, $translate, LanguageService, ClientJS, $location) { var socket = null; diff --git a/mdm-frontend/src/app/legacy/conceptmanagement/services/conceptSearch.service.js b/mdm-frontend/src/app/legacy/conceptmanagement/services/conceptSearch.service.js index b97f43d5706..e28c35a8fac 100644 --- a/mdm-frontend/src/app/legacy/conceptmanagement/services/conceptSearch.service.js +++ b/mdm-frontend/src/app/legacy/conceptmanagement/services/conceptSearch.service.js @@ -1,7 +1,8 @@ /* global _ */ 'use strict'; -angular.module('metadatamanagementApp').factory('ConceptSearchService', ['$q', 'ElasticSearchClient', 'SearchHelperService', 'CleanJSObjectService', 'LanguageService', +angular.module('metadatamanagementApp').factory('ConceptSearchService', [ + '$q', 'ElasticSearchClient', 'SearchHelperService', 'CleanJSObjectService', 'LanguageService', function($q, ElasticSearchClient, SearchHelperService, CleanJSObjectService, LanguageService) { var createQueryObject = function(type) { diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/metadata-type-state-card.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/metadata-type-state-card.directive.js index a2f59d5823a..778ac977a02 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/metadata-type-state-card.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/metadata-type-state-card.directive.js @@ -3,7 +3,15 @@ 'use strict'; angular.module('metadatamanagementApp') - .directive('metadataTypeStateCard', ['$state', 'ProjectStatusScoringService', 'ProjectUpdateAccessService', 'VariableUploadService', 'QuestionUploadService', 'DeleteMetadataService', 'SimpleMessageToastService', 'AnalysisPackageIdBuilderService', + .directive('metadataTypeStateCard', [ + '$state', + 'ProjectStatusScoringService', + 'ProjectUpdateAccessService', + 'VariableUploadService', + 'QuestionUploadService', + 'DeleteMetadataService', + 'SimpleMessageToastService', + 'AnalysisPackageIdBuilderService', function($state, ProjectStatusScoringService, ProjectUpdateAccessService, VariableUploadService, QuestionUploadService, DeleteMetadataService, SimpleMessageToastService, AnalysisPackageIdBuilderService) { diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js index 9884e626d51..14752c017a8 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js @@ -3,7 +3,10 @@ 'use strict'; angular.module('metadatamanagementApp') - .directive('projectCockpitConfig', ['Principal', 'DataAcquisitionProjectLastReleaseResource', function(Principal, DataAcquisitionProjectLastReleaseResource) { + .directive('projectCockpitConfig', [ + 'Principal', + 'DataAcquisitionProjectLastReleaseResource', + function(Principal, DataAcquisitionProjectLastReleaseResource) { return { restrict: 'E', templateUrl: 'scripts/dataacquisitionprojectmanagement/directives/' + diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js index dd95a57053e..50c826cf135 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-status.directive.js @@ -3,7 +3,17 @@ 'use strict'; angular.module('metadatamanagementApp') - .directive('projectCockpitStatus', ['SearchDao', 'ProjectUpdateAccessService', 'SimpleMessageToastService', 'Principal', 'DataAcquisitionProjectPostValidationService', '$mdDialog', '$translate', 'ProjectReleaseService', '$q', function( + .directive('projectCockpitStatus', [ + 'SearchDao', + 'ProjectUpdateAccessService', + 'SimpleMessageToastService', + 'Principal', + 'DataAcquisitionProjectPostValidationService', + '$mdDialog', + '$translate', + 'ProjectReleaseService', + '$q', + function( SearchDao, ProjectUpdateAccessService, SimpleMessageToastService, Principal, DataAcquisitionProjectPostValidationService, diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.directive.js index 965f82e782e..1ef32a6a011 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-versions.directive.js @@ -3,7 +3,16 @@ 'use strict'; angular.module('metadatamanagementApp') - .directive('projectCockpitVersions', ['Principal', 'CommonDialogsService', 'DataAcquisitionProjectShadowsResource', 'SimpleMessageToastService', 'DataAcquisitionProjectShadowsHideResource', '$timeout', 'DataAcquisitionProjectShadowsActionResource', 'DataAcquisitionProjectResource', function(Principal, CommonDialogsService, + .directive('projectCockpitVersions', [ + 'Principal', + 'CommonDialogsService', + 'DataAcquisitionProjectShadowsResource', + 'SimpleMessageToastService', + 'DataAcquisitionProjectShadowsHideResource', + '$timeout', + 'DataAcquisitionProjectShadowsActionResource', + 'DataAcquisitionProjectResource', + function(Principal, CommonDialogsService, DataAcquisitionProjectShadowsResource, SimpleMessageToastService, DataAcquisitionProjectShadowsHideResource, $timeout, DataAcquisitionProjectShadowsActionResource, diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-does-not-exist-validator.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-does-not-exist-validator.directive.js index e2e9b4b0afa..263642d6c37 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-does-not-exist-validator.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-does-not-exist-validator.directive.js @@ -2,7 +2,9 @@ 'use strict'; angular.module('metadatamanagementApp') - .directive('projectDoesNotExist', ['DataAcquisitionProjectResource', '$q', '$rootScope', function(DataAcquisitionProjectResource, + .directive('projectDoesNotExist', [ + 'DataAcquisitionProjectResource', '$q', '$rootScope', + function(DataAcquisitionProjectResource, $q, $rootScope) { return { require: 'ngModel', diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js index 6458cd4c2fe..41f827116c1 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/releaseButton.directive.js @@ -84,8 +84,9 @@ angular.module('metadatamanagementApp') /** * Checks whether the tooltip for regular releases should be shown. - * Regular releases are allowed if the the project is currently not released and there is no embargo date or the - * embargo date has expired. It is also allowed if the project is currently released but in a pre-release and the + * Regular releases are allowed if the the project is currently not released and there is + * no embargo date or the embargo date has expired. It is also allowed if the project is + * currently released but in a pre-release and the * embargo date has expired. * @returns */ @@ -140,7 +141,8 @@ angular.module('metadatamanagementApp') /** * Checks whether the pre-release icon should be shown. - * Pre-Releases are only possible if the project is currently not released and the embargo date is set and has not expired. + * Pre-Releases are only possible if the project is currently not released + * and the embargo date is set and has not expired. */ ctrl.shouldDisplayPreReleaseIcon = function () { return !ctrl.project.release && !ctrl.isEmbargoDateExpired(); @@ -148,7 +150,8 @@ angular.module('metadatamanagementApp') /** * Checks whether the regular release icon should be shown. - * Regular releases are possible if the project is currently not released and there is no embargo date or the embargo date has expired. + * Regular releases are possible if the project is currently not released + * and there is no embargo date or the embargo date has expired. * Regular releases are also possible if the project is currently pre-released. * @returns */ diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/currentProject.service.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/currentProject.service.js index 3a17501a714..06d2b6b92e4 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/currentProject.service.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/currentProject.service.js @@ -1,6 +1,7 @@ /* Author: Daniel Katzberg */ 'use strict'; -angular.module('metadatamanagementApp').service('CurrentProjectService', ['$rootScope', '$location', 'localStorageService', 'DataAcquisitionProjectResource', +angular.module('metadatamanagementApp').service('CurrentProjectService', [ + '$rootScope', '$location', 'localStorageService', 'DataAcquisitionProjectResource', function($rootScope, $location, localStorageService, DataAcquisitionProjectResource) { diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/deleteMetadata.service.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/deleteMetadata.service.js index c3c250e0996..1d1216ce0c8 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/deleteMetadata.service.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/deleteMetadata.service.js @@ -1,6 +1,12 @@ /* global _ */ 'use strict'; -angular.module('metadatamanagementApp').service('DeleteMetadataService', ['$rootScope', 'ProjectUpdateAccessService', 'CommonDialogsService', 'ElasticSearchAdminService', 'SimpleMessageToastService', '$injector', +angular.module('metadatamanagementApp').service('DeleteMetadataService', [ + '$rootScope', + 'ProjectUpdateAccessService', + 'CommonDialogsService', + 'ElasticSearchAdminService', + 'SimpleMessageToastService', + '$injector', function($rootScope, ProjectUpdateAccessService, CommonDialogsService, ElasticSearchAdminService, SimpleMessageToastService, $injector) { diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/outdatedVersionNotifierService.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/outdatedVersionNotifierService.js index 8d25fb3057a..b2c19110f13 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/outdatedVersionNotifierService.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/outdatedVersionNotifierService.js @@ -1,7 +1,8 @@ /* globals _, bowser */ 'use strict'; -angular.module('metadatamanagementApp').service('OutdatedVersionNotifier', ['SimpleMessageToastService', '$document', '$mdToast', 'Principal', '$location', +angular.module('metadatamanagementApp').service('OutdatedVersionNotifier', [ + 'SimpleMessageToastService', '$document', '$mdToast', 'Principal', '$location', function(SimpleMessageToastService, $document, $mdToast, Principal, $location) { @@ -40,9 +41,11 @@ angular.module('metadatamanagementApp').service('OutdatedVersionNotifier', ['Sim var versionFromUrl = $location.search().version; if (Principal.loginName() && item.shadow) { var version = _.get(item, 'release.version'); - // prevent notification when in order view (data will always be an older version than the current, unreleased version) + // prevent notification when in order view (data will always be an older version + // than the current, unreleased version) // but allow notifications for hidden datasets - // prevent notification for pre-released projects (data will always be an older version than the current, unreleased version in provider view) + // prevent notification for pre-released projects (data will always be an older version + // than the current, unreleased version in provider view) if (Principal.isProviderActive() && !item.release.isPreRelease) { showLoggedInUserMessage(item.masterId, version, item.hidden); } else { diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/postValidation.service.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/postValidation.service.js index a77634083e0..2c32ce0a96e 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/postValidation.service.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/postValidation.service.js @@ -5,7 +5,8 @@ @author Daniel Katzberg */ -angular.module('metadatamanagementApp').service('DataAcquisitionProjectPostValidationService', ['JobLoggingService', 'DataAcquisitionProjectPostValidationResource', '$q', +angular.module('metadatamanagementApp').service('DataAcquisitionProjectPostValidationService', [ + 'JobLoggingService', 'DataAcquisitionProjectPostValidationResource', '$q', function(JobLoggingService, DataAcquisitionProjectPostValidationResource, $q) { diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectReleaseService.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectReleaseService.js index 06aceb9b6af..27dfeaf55e4 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectReleaseService.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectReleaseService.js @@ -1,6 +1,12 @@ 'use strict'; -angular.module('metadatamanagementApp').service('ProjectReleaseService', ['SimpleMessageToastService', 'DataAcquisitionProjectResource', 'CurrentProjectService', '$mdDialog', '$translate', '$state', +angular.module('metadatamanagementApp').service('ProjectReleaseService', [ + 'SimpleMessageToastService', + 'DataAcquisitionProjectResource', + 'CurrentProjectService', + '$mdDialog', + '$translate', + '$state', function( SimpleMessageToastService, DataAcquisitionProjectResource, diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectSaveService.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectSaveService.js index b92cbf68b37..077f907c401 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectSaveService.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectSaveService.js @@ -1,7 +1,8 @@ /* global _ */ 'use strict'; -angular.module('metadatamanagementApp').service('ProjectSaveService', ['SimpleMessageToastService', 'DataAcquisitionProjectResource', 'CurrentProjectService', '$q', +angular.module('metadatamanagementApp').service('ProjectSaveService', [ + 'SimpleMessageToastService', 'DataAcquisitionProjectResource', 'CurrentProjectService', '$q', function( SimpleMessageToastService, DataAcquisitionProjectResource, diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectUpdateAccessService.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectUpdateAccessService.js index 65e5f3bfc35..3656d9a9164 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectUpdateAccessService.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/services/projectUpdateAccessService.js @@ -1,7 +1,8 @@ /* global _ */ 'use strict'; -angular.module('metadatamanagementApp').service('ProjectUpdateAccessService', ['CurrentProjectService', 'Principal', 'SimpleMessageToastService', '$log', '$q', 'SearchDao', +angular.module('metadatamanagementApp').service('ProjectUpdateAccessService', [ + 'CurrentProjectService', 'Principal', 'SimpleMessageToastService', '$log', '$q', 'SearchDao', function(CurrentProjectService, Principal, SimpleMessageToastService, $log, $q, SearchDao) { diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.controller.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.controller.js index 92da97a3e5f..544a188de33 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.controller.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/project-overview.controller.js @@ -92,7 +92,8 @@ angular.module('metadatamanagementApp') locationSearch.tab = ctrl.currentTab && ctrl.currentTab.group ? ctrl.currentTab.group : null; locationSearch.assignee = ctrl.selectedAssignedGroup ? ctrl.selectedAssignedGroup : null; locationSearch.release = ctrl.selectedReleaseState ? ctrl.selectedReleaseState : null; - locationSearch.packageFilter = ctrl.selectedFiltersDataPackage && ctrl.selectedFiltersDataPackage.length > 0 ? ctrl.selectedFiltersDataPackage : null; + locationSearch.packageFilter = ctrl.selectedFiltersDataPackage + && ctrl.selectedFiltersDataPackage.length > 0 ? ctrl.selectedFiltersDataPackage : null; locationSearch.additional = ctrl.selectedAdditionalInfo ? ctrl.selectedAdditionalInfo : null; locationSearch.project = ctrl.selectedProject ? ctrl.selectedProject.id : null; diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js index abb44926b77..80283747402 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/views/release-project-dialog.controller.js @@ -149,7 +149,8 @@ angular.module('metadatamanagementApp') * with the 'isPreRelease' attribute set to true. The metadata is sent to DA|RA. * If it is a beta release (version < 1.0.0) the project is not validated, saved with * the release object but no data is send to DA|RA. - * If it is a regular release the project is validated, saved and the metadata is sent to DA|RA. + * If it is a regular release the project is validated, saved and + * the metadata is sent to DA|RA. * @param {*} release the release object */ $scope.ok = function(release) { @@ -188,7 +189,7 @@ angular.module('metadatamanagementApp') $mdDialog.hide(); }); }).catch(function(error) { - console.log(error) + console.log(error); $mdDialog.show($mdDialog.alert() .title($translate.instant( i18nPrefix + 'release-not-possible-title', { @@ -271,13 +272,14 @@ angular.module('metadatamanagementApp') id: project.id })) .ok($translate.instant('global.buttons.ok'))); - }) + }); }; }; /** - * Method to check wether the release is going to be a pre-release. If an embargo date is set - * and has not expired it is a pre-release. Otherwise it is a regular release. + * Method to check wether the release is going to be a pre-release. + * If an embargo date is set and has not expired it is a pre-release. + * Otherwise it is a regular release. */ $scope.isPreRelease = function() { if ($scope.project.embargoDate) { diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/services/dataPackageSearch.service.js b/mdm-frontend/src/app/legacy/datapackagemanagement/services/dataPackageSearch.service.js index b7b21f10b19..cd99715c382 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/services/dataPackageSearch.service.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/services/dataPackageSearch.service.js @@ -1,7 +1,14 @@ /* global _ */ 'use strict'; -angular.module('metadatamanagementApp').factory('DataPackageSearchService', ['$q', 'ElasticSearchClient', 'CleanJSObjectService', 'SearchHelperService', 'GenericFilterOptionsSearchService', 'LanguageService', 'DataPackageIdBuilderService', +angular.module('metadatamanagementApp').factory('DataPackageSearchService', [ + '$q', + 'ElasticSearchClient', + 'CleanJSObjectService', + 'SearchHelperService', + 'GenericFilterOptionsSearchService', + 'LanguageService', + 'DataPackageIdBuilderService', function($q, ElasticSearchClient, CleanJSObjectService, SearchHelperService, GenericFilterOptionsSearchService, LanguageService, DataPackageIdBuilderService) { diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js index 580cecf83bb..5ae229afc46 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-detail.controller.js @@ -144,7 +144,8 @@ angular.module('metadatamanagementApp') id: result.dataAcquisitionProjectId }).$promise.then(function(project) { ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); - ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); + ctrl.shouldDisplayEditButton = localStorage.getItem( + 'currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; ctrl.project = project; ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; diff --git a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-edit-or-create.controller.js b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-edit-or-create.controller.js index a61ec069d0b..37814f114f6 100644 --- a/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-edit-or-create.controller.js +++ b/mdm-frontend/src/app/legacy/datapackagemanagement/views/data-package-edit-or-create.controller.js @@ -207,7 +207,8 @@ angular.module('metadatamanagementApp') }); } else { if (CurrentProjectService.getCurrentProject() && - (!CurrentProjectService.getCurrentProject().release || CurrentProjectService.getCurrentProject().release.isPreRelease)) { + (!CurrentProjectService.getCurrentProject().release + || CurrentProjectService.getCurrentProject().release.isPreRelease)) { if (!ProjectUpdateAccessService .isUpdateAllowed(CurrentProjectService.getCurrentProject(), 'dataPackages', true)) { diff --git a/mdm-frontend/src/app/legacy/datasetmanagement/services/dataSetSearch.service.js b/mdm-frontend/src/app/legacy/datasetmanagement/services/dataSetSearch.service.js index 2a9f1ce4de9..42ce740f827 100644 --- a/mdm-frontend/src/app/legacy/datasetmanagement/services/dataSetSearch.service.js +++ b/mdm-frontend/src/app/legacy/datasetmanagement/services/dataSetSearch.service.js @@ -1,7 +1,8 @@ /* global _*/ 'use strict'; -angular.module('metadatamanagementApp').factory('DataSetSearchService', ['ElasticSearchClient', '$q', 'CleanJSObjectService', 'SearchHelperService', 'LanguageService', 'Principal', +angular.module('metadatamanagementApp').factory('DataSetSearchService', [ + 'ElasticSearchClient', '$q', 'CleanJSObjectService', 'SearchHelperService', 'LanguageService', 'Principal', function(ElasticSearchClient, $q, CleanJSObjectService, SearchHelperService, LanguageService, Principal) { var createQueryObject = function(type) { diff --git a/mdm-frontend/src/app/legacy/datasetmanagement/views/data-set-edit-or-create.controller.js b/mdm-frontend/src/app/legacy/datasetmanagement/views/data-set-edit-or-create.controller.js index bb92427535f..e023b24882c 100644 --- a/mdm-frontend/src/app/legacy/datasetmanagement/views/data-set-edit-or-create.controller.js +++ b/mdm-frontend/src/app/legacy/datasetmanagement/views/data-set-edit-or-create.controller.js @@ -154,7 +154,8 @@ angular.module('metadatamanagementApp') }); } else { if (CurrentProjectService.getCurrentProject() && - (!CurrentProjectService.getCurrentProject().release || CurrentProjectService.getCurrentProject().release.isPreRelease)) { + (!CurrentProjectService.getCurrentProject().release + || CurrentProjectService.getCurrentProject().release.isPreRelease)) { if (!ProjectUpdateAccessService .isUpdateAllowed(CurrentProjectService.getCurrentProject(), 'data_sets', true)) { diff --git a/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.controller.js b/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.controller.js index 19eb2acebae..e5967d30a72 100644 --- a/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.controller.js +++ b/mdm-frontend/src/app/legacy/datasetmanagement/views/dataSet-detail.controller.js @@ -62,7 +62,8 @@ angular.module('metadatamanagementApp') }).$promise.then(function(project) { ctrl.project = project; ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); - ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); + ctrl.shouldDisplayEditButton = localStorage.getItem( + 'currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; diff --git a/mdm-frontend/src/app/legacy/instrumentmanagement/services/instrumentSearch.service.js b/mdm-frontend/src/app/legacy/instrumentmanagement/services/instrumentSearch.service.js index 1eb5b266ed7..6a4f5864c4c 100644 --- a/mdm-frontend/src/app/legacy/instrumentmanagement/services/instrumentSearch.service.js +++ b/mdm-frontend/src/app/legacy/instrumentmanagement/services/instrumentSearch.service.js @@ -1,7 +1,8 @@ /* global _*/ 'use strict'; -angular.module('metadatamanagementApp').factory('InstrumentSearchService', ['ElasticSearchClient', '$q', 'CleanJSObjectService', 'SearchHelperService', 'LanguageService', +angular.module('metadatamanagementApp').factory('InstrumentSearchService', [ + 'ElasticSearchClient', '$q', 'CleanJSObjectService', 'SearchHelperService', 'LanguageService', function(ElasticSearchClient, $q, CleanJSObjectService, SearchHelperService, LanguageService) { var createQueryObject = function(type) { diff --git a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js index 6817b35d4d8..684e58855c2 100644 --- a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js +++ b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-detail.controller.js @@ -65,7 +65,8 @@ angular.module('metadatamanagementApp') id: result.dataAcquisitionProjectId }).$promise.then(function(project) { ctrl.project = project; - ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); + ctrl.shouldDisplayEditButton = localStorage.getItem( + 'currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; diff --git a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-edit-or-create.controller.js b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-edit-or-create.controller.js index 1f41e23f2cc..9e3f90d3ee8 100644 --- a/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-edit-or-create.controller.js +++ b/mdm-frontend/src/app/legacy/instrumentmanagement/views/instrument-edit-or-create.controller.js @@ -188,7 +188,8 @@ angular.module('metadatamanagementApp') }); } else { if (CurrentProjectService.getCurrentProject() && - (!CurrentProjectService.getCurrentProject().release || CurrentProjectService.getCurrentProject().release.isPreRelease)) { + (!CurrentProjectService.getCurrentProject().release + || CurrentProjectService.getCurrentProject().release.isPreRelease)) { if (!ProjectUpdateAccessService .isUpdateAllowed(CurrentProjectService.getCurrentProject(), 'instruments', true)) { diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js b/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js index b2a70cf9395..56de964b6c7 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js @@ -147,7 +147,9 @@ if (results.hits.hits.length === 1) { $ctrl.project = results.hits.hits[0]._source; } else { - results.hits.hits.length < 1 ? console.error("No projects found") : console.error("Search resulted in more than one project being found.") + results.hits.hits.length < 1 ? + console.error("No projects found") : + console.error("Search resulted in more than one project being found.") } }); loadVersion($ctrl.analysisPackageIdVersion.projectId, id); @@ -186,7 +188,9 @@ if (results.hits.hits.length === 1) { $ctrl.project = results.hits.hits[0]._source; } else { - results.hits.hits.length < 1 ? console.error("No projects found") : console.error("Search resulted in more than one project being found.") + results.hits.hits.length < 1 ? + console.error("No projects found") : + console.error("Search resulted in more than one project being found.") } }); loadVersion($ctrl.analysisPackage.dataAcquisitionProjectId, id); diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js index 4e5bb70befc..29d5009926b 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/data-package-configurator.controller.js @@ -153,7 +153,9 @@ if (results.hits.hits.length === 1) { $ctrl.project = results.hits.hits[0]._source; } else { - results.hits.hits.length < 1 ? console.error("No projects found") : console.error("Search resulted in more than one project being found.") + results.hits.hits.length < 1 ? + console.error("No projects found") : + console.error("Search resulted in more than one project being found.") } }); loadVersion($ctrl.dataPackageIdVersion.projectId, id); @@ -192,7 +194,9 @@ if (results.hits.hits.length === 1) { $ctrl.project = results.hits.hits[0]._source; } else { - results.hits.hits.length < 1 ? console.error("No projects found") : console.error("Search resulted in more than one project being found.") + results.hits.hits.length < 1 ? + console.error("No projects found") : + console.error("Search resulted in more than one project being found.") } }); diff --git a/mdm-frontend/src/app/legacy/ordermanagement/services/citationHintGenerator.service.js b/mdm-frontend/src/app/legacy/ordermanagement/services/citationHintGenerator.service.js index 584aac8e80a..af41ef8960e 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/services/citationHintGenerator.service.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/services/citationHintGenerator.service.js @@ -1,6 +1,7 @@ 'use strict'; -angular.module('metadatamanagementApp').service('CitationHintGeneratorService', ['$interpolate', 'LanguageService', '$filter', '$rootScope', +angular.module('metadatamanagementApp').service('CitationHintGeneratorService', [ + '$interpolate', 'LanguageService', '$filter', '$rootScope', function($interpolate, LanguageService, $filter, $rootScope) { var Cite; if (!$rootScope.bowser.msie) { diff --git a/mdm-frontend/src/app/legacy/ordermanagement/services/shoppingCart.service.js b/mdm-frontend/src/app/legacy/ordermanagement/services/shoppingCart.service.js index 92edf9b5f78..694b590a77f 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/services/shoppingCart.service.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/services/shoppingCart.service.js @@ -1,7 +1,14 @@ /* global _ */ 'use strict'; -angular.module('metadatamanagementApp').service('ShoppingCartService', ['OrderResource', 'localStorageService', '$state', 'SimpleMessageToastService', 'ProjectReleaseService', '$rootScope', '$q', +angular.module('metadatamanagementApp').service('ShoppingCartService', [ + 'OrderResource', + 'localStorageService', + '$state', + 'SimpleMessageToastService', + 'ProjectReleaseService', + '$rootScope', + '$q', function(OrderResource, localStorageService, $state, SimpleMessageToastService, ProjectReleaseService, $rootScope, $q) { diff --git a/mdm-frontend/src/app/legacy/questionmanagement/services/questionSearch.service.js b/mdm-frontend/src/app/legacy/questionmanagement/services/questionSearch.service.js index f4f69f1fdba..66349b44ea6 100644 --- a/mdm-frontend/src/app/legacy/questionmanagement/services/questionSearch.service.js +++ b/mdm-frontend/src/app/legacy/questionmanagement/services/questionSearch.service.js @@ -1,7 +1,12 @@ /* global _*/ 'use strict'; -angular.module('metadatamanagementApp').factory('QuestionSearchService', ['ElasticSearchClient', '$q', 'CleanJSObjectService', 'SearchHelperService', 'LanguageService', +angular.module('metadatamanagementApp').factory('QuestionSearchService', [ + 'ElasticSearchClient', + '$q', + 'CleanJSObjectService', + 'SearchHelperService', + 'LanguageService', function(ElasticSearchClient, $q, CleanJSObjectService, SearchHelperService, LanguageService) { var createQueryObject = function(type) { diff --git a/mdm-frontend/src/app/legacy/questionmanagement/services/questionUpload.service.js b/mdm-frontend/src/app/legacy/questionmanagement/services/questionUpload.service.js index a412d9e4c5f..9a4d2930364 100644 --- a/mdm-frontend/src/app/legacy/questionmanagement/services/questionUpload.service.js +++ b/mdm-frontend/src/app/legacy/questionmanagement/services/questionUpload.service.js @@ -1,7 +1,24 @@ /* global _, document */ 'use strict'; -angular.module('metadatamanagementApp').service('QuestionUploadService', ['FileReaderService', 'QuestionResource', 'QuestionRepositoryClient', 'JobLoggingService', 'QuestionImageUploadService', 'CleanJSObjectService', 'ErrorMessageResolverService', '$q', 'ElasticSearchAdminService', '$rootScope', '$translate', '$mdDialog', 'QuestionIdBuilderService', 'DataPackageIdBuilderService', 'InstrumentIdBuilderService', 'Upload', '$timeout', +angular.module('metadatamanagementApp').service('QuestionUploadService', [ + 'FileReaderService', + 'QuestionResource', + 'QuestionRepositoryClient', + 'JobLoggingService', + 'QuestionImageUploadService', + 'CleanJSObjectService', + 'ErrorMessageResolverService', + '$q', + 'ElasticSearchAdminService', + '$rootScope', + '$translate', + '$mdDialog', + 'QuestionIdBuilderService', + 'DataPackageIdBuilderService', + 'InstrumentIdBuilderService', + 'Upload', + '$timeout', function(FileReaderService, QuestionResource, QuestionRepositoryClient, JobLoggingService, QuestionImageUploadService, CleanJSObjectService, ErrorMessageResolverService, $q, ElasticSearchAdminService, $rootScope, diff --git a/mdm-frontend/src/app/legacy/relatedpublicationmanagement/services/relatedPublicationSearch.service.js b/mdm-frontend/src/app/legacy/relatedpublicationmanagement/services/relatedPublicationSearch.service.js index c436809701f..e9dd7baf44f 100644 --- a/mdm-frontend/src/app/legacy/relatedpublicationmanagement/services/relatedPublicationSearch.service.js +++ b/mdm-frontend/src/app/legacy/relatedpublicationmanagement/services/relatedPublicationSearch.service.js @@ -2,7 +2,8 @@ 'use strict'; angular.module('metadatamanagementApp') - .factory('RelatedPublicationSearchService', ['ElasticSearchClient', '$q', 'CleanJSObjectService', 'SearchHelperService', + .factory('RelatedPublicationSearchService', [ + 'ElasticSearchClient', '$q', 'CleanJSObjectService', 'SearchHelperService', function(ElasticSearchClient, $q, CleanJSObjectService, SearchHelperService) { var createQueryObject = function(type) { diff --git a/mdm-frontend/src/app/legacy/relatedpublicationmanagement/services/relatedPublicationUpload.service.js b/mdm-frontend/src/app/legacy/relatedpublicationmanagement/services/relatedPublicationUpload.service.js index 3ca83566fa8..67577367d73 100644 --- a/mdm-frontend/src/app/legacy/relatedpublicationmanagement/services/relatedPublicationUpload.service.js +++ b/mdm-frontend/src/app/legacy/relatedpublicationmanagement/services/relatedPublicationUpload.service.js @@ -4,7 +4,18 @@ 'use strict'; angular.module('metadatamanagementApp') - .service('RelatedPublicationUploadService', ['ExcelReaderService', 'RelatedPublicationBuilderService', 'RelatedPublicationRepositoryClient', 'JobLoggingService', '$q', 'ErrorMessageResolverService', 'ElasticSearchAdminService', '$rootScope', '$translate', '$mdDialog', 'RelatedPublicationResource', + .service('RelatedPublicationUploadService', [ + 'ExcelReaderService', + 'RelatedPublicationBuilderService', + 'RelatedPublicationRepositoryClient', + 'JobLoggingService', + '$q', + 'ErrorMessageResolverService', + 'ElasticSearchAdminService', + '$rootScope', + '$translate', + '$mdDialog', + 'RelatedPublicationResource', function(ExcelReaderService, RelatedPublicationBuilderService, RelatedPublicationRepositoryClient, JobLoggingService, $q, ErrorMessageResolverService, ElasticSearchAdminService, $rootScope, diff --git a/mdm-frontend/src/app/legacy/searchmanagement/directives/next-search-result.directive.js b/mdm-frontend/src/app/legacy/searchmanagement/directives/next-search-result.directive.js index b3f66bf2f22..8daf933a147 100644 --- a/mdm-frontend/src/app/legacy/searchmanagement/directives/next-search-result.directive.js +++ b/mdm-frontend/src/app/legacy/searchmanagement/directives/next-search-result.directive.js @@ -1,7 +1,8 @@ /* global _ */ 'use strict'; -angular.module('metadatamanagementApp').directive('nextSearchResult', ['SearchResultNavigatorService', 'SearchTypeToDetailsStateMapper', '$state', 'Principal', +angular.module('metadatamanagementApp').directive('nextSearchResult', [ + 'SearchResultNavigatorService', 'SearchTypeToDetailsStateMapper', '$state', 'Principal', function(SearchResultNavigatorService, SearchTypeToDetailsStateMapper, $state, Principal) { return { diff --git a/mdm-frontend/src/app/legacy/searchmanagement/directives/previous-search-result.directive.js b/mdm-frontend/src/app/legacy/searchmanagement/directives/previous-search-result.directive.js index 0ad54ab4526..1f53e3533b3 100644 --- a/mdm-frontend/src/app/legacy/searchmanagement/directives/previous-search-result.directive.js +++ b/mdm-frontend/src/app/legacy/searchmanagement/directives/previous-search-result.directive.js @@ -1,7 +1,11 @@ /* global _ */ 'use strict'; -angular.module('metadatamanagementApp').directive('previousSearchResult', ['SearchResultNavigatorService', 'SearchTypeToDetailsStateMapper', '$state', 'Principal', +angular.module('metadatamanagementApp').directive('previousSearchResult', [ + 'SearchResultNavigatorService', + 'SearchTypeToDetailsStateMapper', + '$state', + 'Principal', function(SearchResultNavigatorService, SearchTypeToDetailsStateMapper, $state, Principal) { return { diff --git a/mdm-frontend/src/app/legacy/searchmanagement/services/elasticSearch.client.service.js b/mdm-frontend/src/app/legacy/searchmanagement/services/elasticSearch.client.service.js index e6bad044680..4391acc48ed 100644 --- a/mdm-frontend/src/app/legacy/searchmanagement/services/elasticSearch.client.service.js +++ b/mdm-frontend/src/app/legacy/searchmanagement/services/elasticSearch.client.service.js @@ -1,5 +1,8 @@ 'use strict'; -angular.module('metadatamanagementApp').service('ElasticSearchClient', ['esFactory', 'ElasticSearchProperties', '$location', +angular.module('metadatamanagementApp').service('ElasticSearchClient', [ + 'esFactory', + 'ElasticSearchProperties', + '$location', function(esFactory, ElasticSearchProperties, $location) { return esFactory({ host: { diff --git a/mdm-frontend/src/app/legacy/searchmanagement/services/genericFilterOptionsSearch.service.js b/mdm-frontend/src/app/legacy/searchmanagement/services/genericFilterOptionsSearch.service.js index bb88bf14ced..6d31e14e13d 100644 --- a/mdm-frontend/src/app/legacy/searchmanagement/services/genericFilterOptionsSearch.service.js +++ b/mdm-frontend/src/app/legacy/searchmanagement/services/genericFilterOptionsSearch.service.js @@ -2,7 +2,12 @@ 'use strict'; angular.module('metadatamanagementApp') - .service('GenericFilterOptionsSearchService', ['SearchHelperService', 'LanguageService', 'ElasticSearchClient', 'CleanJSObjectService', 'Principal', + .service('GenericFilterOptionsSearchService', [ + 'SearchHelperService', + 'LanguageService', + 'ElasticSearchClient', + 'CleanJSObjectService', + 'Principal', function(SearchHelperService, LanguageService, ElasticSearchClient, CleanJSObjectService, Principal) { diff --git a/mdm-frontend/src/app/legacy/searchmanagement/services/search.dao.js b/mdm-frontend/src/app/legacy/searchmanagement/services/search.dao.js index f89167813d1..4d7be91b5ea 100644 --- a/mdm-frontend/src/app/legacy/searchmanagement/services/search.dao.js +++ b/mdm-frontend/src/app/legacy/searchmanagement/services/search.dao.js @@ -2,7 +2,16 @@ /* Author: Daniel Katzberg */ 'use strict'; -angular.module('metadatamanagementApp').service('SearchDao', ['ElasticSearchClient', 'CleanJSObjectService', 'Principal', 'LanguageService', 'DataPackageIdBuilderService', 'AnalysisPackageIdBuilderService', 'SearchHelperService', 'clientId', +angular.module('metadatamanagementApp') + .service('SearchDao', [ + 'ElasticSearchClient', + 'CleanJSObjectService', + 'Principal', + 'LanguageService', + 'DataPackageIdBuilderService', + 'AnalysisPackageIdBuilderService', + 'SearchHelperService', + 'clientId', function(ElasticSearchClient, CleanJSObjectService, Principal, LanguageService, DataPackageIdBuilderService, AnalysisPackageIdBuilderService, @@ -468,8 +477,8 @@ angular.module('metadatamanagementApp').service('SearchDao', ['ElasticSearchClie return { /** - * Function creating elastic search query based on input parameters and returning request results. - + * Function creating elastic search query based on input parameters + * and returning request results. * @param {*} queryterm the term to search for * @param {*} pageNumber the current page number * @param {*} dataAcquisitionProjectId the id of the currently selected project @@ -480,8 +489,8 @@ angular.module('metadatamanagementApp').service('SearchDao', ['ElasticSearchClie * @param {*} aggregations a list of fields aggregations should be created for * @param {*} newFilters filter objects created from the url parameters * @param {*} sortCriteria option for sorting - * @param {*} enforceReleased true if search applies only to released data else false - * @param {*} additionalSearchIndex an array of strings with the names of additional indices (relevant for public user search) + * @param {*} enforceReleased true if search applies only to released data + * @param {*} additionalSearchIndex an array of strings naming additional indices * @returns {*} seach result */ search: function(queryterm, pageNumber, dataAcquisitionProjectId, diff --git a/mdm-frontend/src/app/legacy/searchmanagement/services/searchHelper.service.js b/mdm-frontend/src/app/legacy/searchmanagement/services/searchHelper.service.js index 740ba68c935..b98d709366a 100644 --- a/mdm-frontend/src/app/legacy/searchmanagement/services/searchHelper.service.js +++ b/mdm-frontend/src/app/legacy/searchmanagement/services/searchHelper.service.js @@ -1,7 +1,10 @@ /* global _ */ 'use strict'; -angular.module('metadatamanagementApp').factory('SearchHelperService', ['CleanJSObjectService', 'Principal', 'LanguageService', +angular.module('metadatamanagementApp') + .factory( + 'SearchHelperService', + ['CleanJSObjectService', 'Principal', 'LanguageService', function(CleanJSObjectService, Principal, LanguageService) { var domainObjectFilterNames = ['data-package', 'analysis-package','survey', 'data-set', 'instrument', 'variable', 'question']; @@ -671,8 +674,8 @@ angular.module('metadatamanagementApp').factory('SearchHelperService', ['CleanJS }; /** - * Adds a must term filter reducing results to shadow copies only, that are not hidden - * and not pre-released. + * Adds a must term filter reducing results to shadow copies only, + * that are not hidden and not pre-released. * @param {*} query the query this filter should be added to * @param {*} filter the filter parameter */ @@ -699,16 +702,16 @@ angular.module('metadatamanagementApp').factory('SearchHelperService', ['CleanJS }; /** - * Distiguishes between szenarios of showing only master data or showing only - * shadow copies. - * If the user is logged in and the provider view is active the search will be - * limited to master data only so show project based search results. + * Distiguishes between szenarios of showing only master data + * or showing only shadow copies. + * If the user is logged in and the provider view is active the search + * will be limited to master data only so show project based search results. * If the user is not logged in (public user) or is in the order view * the search will be limited to shadow copies only which represent released * versions of data packages and can therefore be ordered. * @param {*} query the query this filter should be added to * @param {*} filter the filter parameter - * @param {boolean} enforceReleased true if search should be limited to released versions + * @param {boolean} enforceReleased true if enforcing released versions */ var addShadowCopyFilter = function(query, filter, enforceReleased) { if (!enforceReleased && Principal.loginName() && @@ -880,8 +883,9 @@ angular.module('metadatamanagementApp').factory('SearchHelperService', ['CleanJS }; if (!Principal.loginName() || !Principal.isProviderActive()) { - // as public users and users in order view are only able to find not hidden, - // not pre-released shadow object, aggregations need to account for that, too + // as public users and users in order view are only able to find + // not hidden, not pre-released shadow object, aggregations need + // to account for that, too var shadowCopyFilter = { 'bool': { 'must': [{ diff --git a/mdm-frontend/src/app/legacy/searchmanagement/services/searchResultNavigator.service.js b/mdm-frontend/src/app/legacy/searchmanagement/services/searchResultNavigator.service.js index b160485b99d..b292f86c2ff 100644 --- a/mdm-frontend/src/app/legacy/searchmanagement/services/searchResultNavigator.service.js +++ b/mdm-frontend/src/app/legacy/searchmanagement/services/searchResultNavigator.service.js @@ -1,6 +1,9 @@ 'use strict'; -angular.module('metadatamanagementApp').factory('SearchResultNavigatorService', ['SearchDao', '$q', 'BreadcrumbService', +angular.module('metadatamanagementApp').factory('SearchResultNavigatorService', [ + 'SearchDao', + '$q', + 'BreadcrumbService', function(SearchDao, $q, BreadcrumbService) { var searchIndex = null; var lastSearchParams = {}; diff --git a/mdm-frontend/src/app/legacy/surveymanagement/services/surveyResponseRateImageUpload.service.js b/mdm-frontend/src/app/legacy/surveymanagement/services/surveyResponseRateImageUpload.service.js index 1d7be236bf8..1ec0181bad7 100644 --- a/mdm-frontend/src/app/legacy/surveymanagement/services/surveyResponseRateImageUpload.service.js +++ b/mdm-frontend/src/app/legacy/surveymanagement/services/surveyResponseRateImageUpload.service.js @@ -1,7 +1,11 @@ /* global Blob */ 'use strict'; -angular.module('metadatamanagementApp').service('SurveyResponseRateImageUploadService', ['Upload', '$q', '$http', '$rootScope', +angular.module('metadatamanagementApp').service('SurveyResponseRateImageUploadService', [ + 'Upload', + '$q', + '$http', + '$rootScope', function(Upload, $q, $http, $rootScope) { var buildImageFilename = function(surveyNumber, language) { return surveyNumber + '_responserate_' + language; diff --git a/mdm-frontend/src/app/legacy/surveymanagement/services/surveySearch.service.js b/mdm-frontend/src/app/legacy/surveymanagement/services/surveySearch.service.js index 4f453a186da..ae4514f509e 100644 --- a/mdm-frontend/src/app/legacy/surveymanagement/services/surveySearch.service.js +++ b/mdm-frontend/src/app/legacy/surveymanagement/services/surveySearch.service.js @@ -1,7 +1,14 @@ /* global _*/ 'use strict'; -angular.module('metadatamanagementApp').factory('SurveySearchService', ['ElasticSearchClient', '$q', 'LanguageService', 'SearchHelperService', 'CleanJSObjectService', 'GenericFilterOptionsSearchService', 'Principal', +angular.module('metadatamanagementApp').factory('SurveySearchService', [ + 'ElasticSearchClient', + '$q', + 'LanguageService', + 'SearchHelperService', + 'CleanJSObjectService', + 'GenericFilterOptionsSearchService', + 'Principal', function(ElasticSearchClient, $q, LanguageService, SearchHelperService, CleanJSObjectService, GenericFilterOptionsSearchService, Principal) { var createQueryObject = function(type) { diff --git a/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.controller.js b/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.controller.js index 577b9348241..ef66dc214c1 100644 --- a/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.controller.js +++ b/mdm-frontend/src/app/legacy/surveymanagement/views/survey-detail.controller.js @@ -67,7 +67,8 @@ angular.module('metadatamanagementApp') }).$promise.then(function(project) { ctrl.project = project; ctrl.projectIsCurrentlyReleased = (project.release != null && !project.release.isPreRelease); - ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' && !(project.release != null && !project.release.isPreRelease); + ctrl.shouldDisplayEditButton = localStorage.getItem('currentView') != 'orderView' + && !(project.release != null && !project.release.isPreRelease); ctrl.assigneeGroup = project.assigneeGroup; activeProject = project; ctrl.isProviderView = localStorage.getItem('currentView') != 'orderView'; diff --git a/mdm-frontend/src/app/legacy/surveymanagement/views/survey-edit-or-create.controller.js b/mdm-frontend/src/app/legacy/surveymanagement/views/survey-edit-or-create.controller.js index fa5d128aad8..5c581f8aecb 100644 --- a/mdm-frontend/src/app/legacy/surveymanagement/views/survey-edit-or-create.controller.js +++ b/mdm-frontend/src/app/legacy/surveymanagement/views/survey-edit-or-create.controller.js @@ -147,7 +147,8 @@ angular.module('metadatamanagementApp') }); } else { if (CurrentProjectService.getCurrentProject() && - (!CurrentProjectService.getCurrentProject().release || CurrentProjectService.getCurrentProject().release.isPreRelease)) { + (!CurrentProjectService.getCurrentProject().release + || CurrentProjectService.getCurrentProject().release.isPreRelease)) { if (!ProjectUpdateAccessService .isUpdateAllowed(CurrentProjectService.getCurrentProject(), 'surveys', true)) { diff --git a/mdm-frontend/src/app/legacy/usermanagement/auth/auth.service.js b/mdm-frontend/src/app/legacy/usermanagement/auth/auth.service.js index 9ec79647308..d5ed6aa91c5 100644 --- a/mdm-frontend/src/app/legacy/usermanagement/auth/auth.service.js +++ b/mdm-frontend/src/app/legacy/usermanagement/auth/auth.service.js @@ -2,7 +2,16 @@ angular .module('metadatamanagementApp') - .factory('Auth', ['$rootScope', '$q', 'Principal', 'AuthServerProvider', 'AccountResource', 'RegisterResource', 'ActivateResource', 'PasswordResource', 'PasswordResetInitResource', 'PasswordResetFinishResource', + .factory('Auth', [ + '$rootScope', + '$q', 'Principal', + 'AuthServerProvider', + 'AccountResource', + 'RegisterResource', + 'ActivateResource', + 'PasswordResource', + 'PasswordResetInitResource', + 'PasswordResetFinishResource', function Auth($rootScope, $q, Principal, AuthServerProvider, AccountResource, RegisterResource, ActivateResource, PasswordResource, PasswordResetInitResource, diff --git a/mdm-frontend/src/app/legacy/usermanagement/auth/principal.service.js b/mdm-frontend/src/app/legacy/usermanagement/auth/principal.service.js index 0f2998d7561..a0056f2ca9c 100644 --- a/mdm-frontend/src/app/legacy/usermanagement/auth/principal.service.js +++ b/mdm-frontend/src/app/legacy/usermanagement/auth/principal.service.js @@ -1,7 +1,12 @@ /* globals _ */ 'use strict'; -angular.module('metadatamanagementApp').factory('Principal', ['$q', 'AccountResource', 'AuthServerProvider', '$rootScope', 'WelcomeDialogService', +angular.module('metadatamanagementApp').factory('Principal', [ + '$q', + 'AccountResource', + 'AuthServerProvider', + '$rootScope', + 'WelcomeDialogService', function Principal($q, AccountResource, AuthServerProvider, $rootScope, WelcomeDialogService) { var _identity; diff --git a/mdm-frontend/src/app/legacy/variablemanagement/directives/create-variable-links.directive.js b/mdm-frontend/src/app/legacy/variablemanagement/directives/create-variable-links.directive.js index 5f9841803f9..9aa71802d66 100644 --- a/mdm-frontend/src/app/legacy/variablemanagement/directives/create-variable-links.directive.js +++ b/mdm-frontend/src/app/legacy/variablemanagement/directives/create-variable-links.directive.js @@ -1,3 +1,4 @@ +/* eslint-disable */ /* global _*/ 'use strict'; @@ -5,15 +6,14 @@ Directive which creates links to variable details pages on generation rules and filter expressions. Currently only STATA syntax is supported. */ -angular.module('metadatamanagementApp').directive('createVariableLinks', ['$timeout', '$compile', '$log', 'ProjectReleaseService', +angular.module('metadatamanagementApp') + .directive('createVariableLinks', ['$timeout', '$compile', '$log', 'ProjectReleaseService', function($timeout, $compile, $log, ProjectReleaseService) { var variableNameRegex = /([_A-Za-z][_A-Za-z0-9]{2,})/g; // STATA keywords, copied from highlightjs sources - //jscs:disable var keywords = 'if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h|0 hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l|0 la lab labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m|0 ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize meqparse mer merg merge mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n|0 nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u|0 unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5'.split(' '); // STATA built in functions copied from highlightjs sources var builtIns = 'abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag'.split('|'); - //jscs:enable var linkTooltip = { de: 'Klicken, um die Variable $1 anzuzeigen', en: 'Click to show the variable $1' diff --git a/mdm-frontend/src/app/legacy/variablemanagement/services/variableBuilder.service.js b/mdm-frontend/src/app/legacy/variablemanagement/services/variableBuilder.service.js index 95234dd0ed9..935c9ff55f4 100644 --- a/mdm-frontend/src/app/legacy/variablemanagement/services/variableBuilder.service.js +++ b/mdm-frontend/src/app/legacy/variablemanagement/services/variableBuilder.service.js @@ -1,7 +1,16 @@ /* global _ */ 'use strict'; -angular.module('metadatamanagementApp').service('VariableBuilderService', ['VariableResource', 'CleanJSObjectService', 'DataSetIdBuilderService', 'QuestionIdBuilderService', 'SurveyIdBuilderService', 'DataPackageIdBuilderService', 'VariableIdBuilderService', 'InstrumentIdBuilderService', +angular.module('metadatamanagementApp') + .service('VariableBuilderService', [ + 'VariableResource', + 'CleanJSObjectService', + 'DataSetIdBuilderService', + 'QuestionIdBuilderService', + 'SurveyIdBuilderService', + 'DataPackageIdBuilderService', + 'VariableIdBuilderService', + 'InstrumentIdBuilderService', function(VariableResource, CleanJSObjectService, DataSetIdBuilderService, QuestionIdBuilderService, SurveyIdBuilderService, DataPackageIdBuilderService, VariableIdBuilderService, diff --git a/mdm-frontend/src/app/legacy/variablemanagement/services/variableSearch.service.js b/mdm-frontend/src/app/legacy/variablemanagement/services/variableSearch.service.js index f026b3d0e06..a0cb3a31742 100644 --- a/mdm-frontend/src/app/legacy/variablemanagement/services/variableSearch.service.js +++ b/mdm-frontend/src/app/legacy/variablemanagement/services/variableSearch.service.js @@ -1,7 +1,14 @@ /* global _*/ 'use strict'; -angular.module('metadatamanagementApp').factory('VariableSearchService', ['ElasticSearchClient', '$q', 'SearchHelperService', 'CleanJSObjectService', 'LanguageService', 'Principal', +angular.module('metadatamanagementApp') + .factory('VariableSearchService', + ['ElasticSearchClient', + '$q', + 'SearchHelperService', + 'CleanJSObjectService', + 'LanguageService', + 'Principal', function(ElasticSearchClient, $q, SearchHelperService, CleanJSObjectService, LanguageService, Principal) { var createQueryObject = function(type) { diff --git a/mdm-frontend/src/app/legacy/variablemanagement/services/variableUpload.service.js b/mdm-frontend/src/app/legacy/variablemanagement/services/variableUpload.service.js index aedd685236b..f8cee1172e3 100644 --- a/mdm-frontend/src/app/legacy/variablemanagement/services/variableUpload.service.js +++ b/mdm-frontend/src/app/legacy/variablemanagement/services/variableUpload.service.js @@ -2,7 +2,20 @@ /* global _ */ 'use strict'; -angular.module('metadatamanagementApp').service('VariableUploadService', ['VariableBuilderService', 'VariableRepositoryClient', 'JobLoggingService', 'ErrorMessageResolverService', '$q', 'FileReaderService', 'ElasticSearchAdminService', '$rootScope', '$translate', '$mdDialog', 'CleanJSObjectService', 'VariableResource', +angular.module('metadatamanagementApp') + .service('VariableUploadService', + ['VariableBuilderService', + 'VariableRepositoryClient', + 'JobLoggingService', + 'ErrorMessageResolverService', + '$q', + 'FileReaderService', + 'ElasticSearchAdminService', + '$rootScope', + '$translate', + '$mdDialog', + 'CleanJSObjectService', + 'VariableResource', function(VariableBuilderService, VariableRepositoryClient, JobLoggingService, ErrorMessageResolverService, $q, FileReaderService, diff --git a/mdm-frontend/src/systemjs.config.js b/mdm-frontend/src/systemjs.config.js index c1c3a92cb05..026a9e036f7 100644 --- a/mdm-frontend/src/systemjs.config.js +++ b/mdm-frontend/src/systemjs.config.js @@ -19,7 +19,8 @@ '@angular/common/http': 'npm:@angular/common/fesm2015/http.mjs', '@angular/compiler': 'npm:@angular/compiler/fesm2015/compiler.mjs', '@angular/platform-browser': 'npm:@angular/platform-browser/fesm2015/platform-browser.mjs', - '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/fesm2015/platform-browser-dynamic.mjs', + '@angular/platform-browser-dynamic': + 'npm:@angular/platform-browser-dynamic/fesm2015/platform-browser-dynamic.mjs', '@angular/router': 'npm:@angular/router/fesm2015/router.mjs', '@angular/router/upgrade': 'npm:@angular/router/fesm2015/upgrade.mjs', '@angular/forms': 'npm:@angular/forms/fesm2015/forms.mjs', From 35caca6e970c217fa56e96ca45c6412c8e7db0d6 Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 11 Apr 2024 11:02:32 +0200 Subject: [PATCH 38/49] #3216: fixed version loading for mixes of released and pre-released project versions --- ...nalysis-package-configurator.controller.js | 28 +------------------ .../common/service/ShadowCopyHelper.java | 19 +++++++------ ...DataAcquisitionProjectVersionsService.java | 5 ++-- 3 files changed, 14 insertions(+), 38 deletions(-) diff --git a/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js b/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js index 56de964b6c7..54e3ab993fd 100644 --- a/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js +++ b/mdm-frontend/src/app/legacy/ordermanagement/components/analysis-package-configurator.controller.js @@ -1,7 +1,4 @@ -/* global _ */ -// (function() { - - /* globals _ */ +/* globals _ */ 'use strict'; angular @@ -339,27 +336,4 @@ } return true; }; - - // angular - // .module('metadatamanagementApp') - // .controller('AnalysisPackageConfiguratorController', [ - // '$scope', - // '$rootScope', - // '$location', - // 'DataAcquisitionProjectReleasesResource', - // '$state', - // '$mdDialog', - // '$transitions', - // 'LanguageService', - // 'ProjectReleaseService', - // 'ShoppingCartService', - // 'MessageBus', - // 'AnalysisPackageSearchService', - // 'CurrentAnalysisPackageService', - // 'AnalysisPackageCitationDialogService', - // 'DataPackageSearchService', - // 'Principal', - // Controller - // ]); - }]); diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/common/service/ShadowCopyHelper.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/common/service/ShadowCopyHelper.java index debd2d65dcd..98892a48fcf 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/common/service/ShadowCopyHelper.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/common/service/ShadowCopyHelper.java @@ -15,7 +15,7 @@ /** * Create shadow copies of domain objects provided by {@link ShadowCopyDataSource}s. - * + * * @param The domain object to be copied. */ @RequiredArgsConstructor @@ -28,7 +28,7 @@ public class ShadowCopyHelper { /** * Create shadow copies of the master domain objects of a project returned by * {@link ShadowCopyDataSource}. - * + * * @param dataAcquisitionProjectId id of the project being shadow copied * @param release The release object containing the version of the shadow copies being created * @param previousVersion The previous version of the project or {@code null} if this @@ -44,7 +44,8 @@ public void createShadowCopies(String dataAcquisitionProjectId, Release release, masters.map(master -> shadowCopyDataSource.createShadowCopy(master, release)) .forEach(shadowCopy -> { - if (hasPreviousVersion) { + // add a successorId to previous versions if the current release is not a pre-release + if (hasPreviousVersion && !release.getIsPreRelease()) { Optional opt = shadowCopyDataSource.findPredecessorOfShadowCopy(shadowCopy, previousVersion); if (opt.isPresent()) { @@ -80,14 +81,14 @@ private void hideExistingShadowCopies(String dataAcquisitionProjectId, String re private void unhideExistingShadowCopies(String dataAcquisitionProjectId, String version) { shadowCopyDataSource.unhideExistingShadowCopies(dataAcquisitionProjectId, version); } - + private void deleteExistingShadowCopies(String dataAcquisitionProjectId, String version) { shadowCopyDataSource.deleteExistingShadowCopies(dataAcquisitionProjectId, version); } - + /** * Create, hide or unhide shadow copies of current master domain objects on project release. - * + * * @param shadowCopyingStartedEvent Emitted by {@link ShadowCopyQueueItemService} */ @EventListener @@ -106,7 +107,7 @@ public void onShadowCopyingStarted(ShadowCopyingStartedEvent shadowCopyingStarte this.unhideExistingShadowCopies(shadowCopyingStartedEvent.getDataAcquisitionProjectId(), shadowCopyingStartedEvent.getRelease().getVersion()); break; - case DELETE: + case DELETE: this.deleteExistingShadowCopies(shadowCopyingStartedEvent.getDataAcquisitionProjectId(), shadowCopyingStartedEvent.getRelease().getVersion()); break; @@ -115,10 +116,10 @@ public void onShadowCopyingStarted(ShadowCopyingStartedEvent shadowCopyingStarte shadowCopyingStartedEvent.getAction() + " has not been implemented yet!"); } } - + /** * Update elasticsearch (both predecessors and current shadows). - * + * * @param shadowCopyingEndedEvent Emitted by {@link ShadowCopyQueueItemService} */ @EventListener diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java index 13db62bb0a4..5dd8885cde1 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/service/DataAcquisitionProjectVersionsService.java @@ -112,7 +112,8 @@ public Release findPreviousRelease(String id, Release currentRelease) { } /** - * Find all release stamps (limited to 100 results) for the given project id. + * Find all release stamps (limited to 100 results) for the given project id + * in which the properties version and preReleased have changed. * * @param id the project id * @param excludePreReleased boolean indicating if pre-released version shall be skipped @@ -124,7 +125,7 @@ public List findAllReleases(String id, boolean excludePreReleased, // Find all version changes List> shadows = javers.findShadows(QueryBuilder.byValueObjectId(id, DataAcquisitionProject.class, "release") - .withChangedProperty("version").limit(100).build()); + .withChangedProperty("version").withChangedProperty("isPreRelease").limit(100).build()); if (shadows.isEmpty()) { return new ArrayList<>(); From caddc4e28aaeaf472e8bf4835d38912630733855 Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 11 Apr 2024 11:20:13 +0200 Subject: [PATCH 39/49] #3216: hide related objects in order view for pre-released projects --- .../views/analysis-package-detail.html.tmpl | 1 + .../datapackagemanagement/views/data-package-detail.html.tmpl | 1 + .../app/legacy/datasetmanagement/views/dataSet-detail.html.tmpl | 1 + .../instrumentmanagement/views/instrument-detail.html.tmpl | 1 + .../app/legacy/surveymanagement/views/survey-detail.html.tmpl | 1 + 5 files changed, 5 insertions(+) diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.html.tmpl b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.html.tmpl index 3c1f55ae4b0..3b2d0e9f25e 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.html.tmpl +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/views/analysis-package-detail.html.tmpl @@ -93,6 +93,7 @@ template-url="scripts/analysispackagemanagement/templates/attachments.html.tmpl"> Date: Thu, 11 Apr 2024 12:59:34 +0200 Subject: [PATCH 40/49] #3216: added translations and fixed embargo date setting for dataproviders --- .../configuration/translations-de.js | 6 ++++++ .../configuration/translations-en.js | 6 ++++++ .../directives/project-cockpit-config.directive.js | 10 +++------- .../directives/project-cockpit-config.html.tmpl | 12 ++++++++---- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js index e6864c3c6ab..218e0911617 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-de.js @@ -190,6 +190,12 @@ angular.module('metadatamanagementApp').config([ 'config': 'Einstellungen', 'versions': 'Versionen' }, + 'release-settings': { + 'header': 'Einstellungen zur Veröffentlichung', + 'label': 'Embargo-Datum', + 'info': 'Wenn das Projekt vorerst vorläufig freigegeben werden soll, müssen Sie hier ein Embargo-Datum setzen, welches dem Zeitpunkt der geplanten Veröffentlichung entspricht.', + 'delete-tooltip': 'Embargo-Datum entfernen' + }, 'requirements': { 'header': 'Erwartete Metadaten', 'dataPackages': 'Datenpaket', diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js index 9563839a2ce..eef3110a067 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/configuration/translations-en.js @@ -191,6 +191,12 @@ angular.module('metadatamanagementApp').config([ 'config': 'Settings', 'versions': 'Versions' }, + 'release-settings': { + 'header': 'Release Settings', + 'label': 'Embargo Date', + 'info': 'If the project is to be released preliminary, you need to set an embargo date here, which corresponds to the date of the planned publication.', + 'delete-tooltip': 'Delete embargo date' + }, 'requirements': { 'header': 'Expected Metadata', 'dataPackages': 'Data Package', diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js index 14752c017a8..bd0e26edb56 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.directive.js @@ -48,9 +48,7 @@ angular.module('metadatamanagementApp') * @returns true if the user is not an assigned publisher else false */ var isNotAssignedPublisher = function() { - var loginName = Principal.loginName(); - var publishers = _.get(ctrl.project, 'configuration.publishers', []); - return publishers.indexOf(loginName) === -1; + return ctrl.project.configuration.publishers.indexOf(Principal.loginName()) === -1; }; /** @@ -58,9 +56,7 @@ angular.module('metadatamanagementApp') * @returns true if the user is not an assigned data provider else false */ var isNotAssignedDataprovider = function() { - var loginName = Principal.loginName(); - var publishers = _.get(ctrl.project, 'configuration.dataproviders', []); - return publishers.indexOf(loginName) === -1; + return ctrl.project.configuration.dataProviders.indexOf(Principal.loginName()) === -1; }; /** @@ -68,7 +64,7 @@ angular.module('metadatamanagementApp') * @returns true if the project is released or pre-released */ var isProjectReleased = function() { - return $scope.project.release; + return $scope.project.release ? true : false; }; /** diff --git a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl index 382a3363b1f..3bde70b0a51 100644 --- a/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl +++ b/mdm-frontend/src/app/legacy/dataacquisitionprojectmanagement/directives/project-cockpit-config.html.tmpl @@ -14,19 +14,23 @@ - Release Einstellungen + {{'data-acquisition-project-management.project-cockpit.release-settings.header' | translate}} +

    + {{'data-acquisition-project-management.project-cockpit.release-settings.info' | translate}} +

    - +
    - + + delete_forever - "Embargo-Date entfernen" + {{'data-acquisition-project-management.project-cockpit.release-settings.delete-tooltip' | translate}}
    From 762cbb9786ba6f3eaeca29936aaf1dfdbd270dfa Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 11 Apr 2024 13:23:31 +0200 Subject: [PATCH 41/49] #3216: added embargo date to detail page --- .../configuration/translations-de.js | 1 + .../configuration/translations-en.js | 1 + .../templates/common-details.html.tmpl | 4 ++++ .../datapackagemanagement/configuration/translations-de.js | 1 + .../datapackagemanagement/configuration/translations-en.js | 1 + .../datapackagemanagement/templates/common-details.html.tmpl | 4 ++++ 6 files changed, 12 insertions(+) diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-de.js b/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-de.js index eb4aa46b076..72202990d25 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-de.js +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-de.js @@ -75,6 +75,7 @@ angular.module('metadatamanagementApp').config([ 'fundingRef': 'Förderkennzeichen', 'fundingProgram': 'Zugehörige Förderlinie', 'version': 'Version', + 'embargo-date': 'Embargo-Datum', 'published-at': 'veröffentlicht am', 'published': 'Veröffentlicht am', 'pre-published-at': 'vorläufig veröffentlicht am', diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-en.js b/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-en.js index 37682a28755..4dadb110d53 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-en.js +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/configuration/translations-en.js @@ -75,6 +75,7 @@ angular.module('metadatamanagementApp').config([ 'fundingRef': 'Funding reference', 'fundingProgram': 'Associated funding program', 'version': 'Version', + 'embargo-date': 'Embargo Date', 'published-at': 'published at', 'published': 'Published at', 'pre-published-at': 'preliminarily published at', diff --git a/mdm-frontend/src/app/legacy/analysispackagemanagement/templates/common-details.html.tmpl b/mdm-frontend/src/app/legacy/analysispackagemanagement/templates/common-details.html.tmpl index d30fbb13062..cc29c59d8b9 100644 --- a/mdm-frontend/src/app/legacy/analysispackagemanagement/templates/common-details.html.tmpl +++ b/mdm-frontend/src/app/legacy/analysispackagemanagement/templates/common-details.html.tmpl @@ -69,6 +69,10 @@ {{$ctrl.options.analysisPackage.release.version + ' (' + ('analysis-package-management.detail.label.pre-published-at' | translate) + ' ' + ($ctrl.options.analysisPackage.release.firstDate + 'Z' | date:'mediumDate') + ')'}} {{'analysis-package-management.detail.not-yet-released' | translate}}
    + +
    {{'analysis-package-management.detail.label.embargo-date' | translate }}:
    + {{$ctrl.options.project.embargoDate | date:'mediumDate'}} +
    {{'analysis-package-management.detail.label.annotations' | translate }}:

    {{$ctrl.options.dataPackage.release.version + ' (' + ('data-package-management.detail.label.pre-published-at' | translate) + ' ' + ($ctrl.options.dataPackage.release.firstDate + 'Z' | date:'mediumDate') + ')'}} {{'data-package-management.detail.not-yet-released' | translate}} + +

    {{'data-package-management.detail.label.embargo-date' | translate }}:
    + {{$ctrl.options.project.embargoDate | date:'mediumDate'}} +
    {{'data-package-management.detail.label.remarksUserService' | translate }}:
    {{$ctrl.options.dataPackage.remarksUserService}} From 03a2fa59b417063b5fbd845b5e6937cd93c32963 Mon Sep 17 00:00:00 2001 From: theresa Date: Thu, 11 Apr 2024 13:25:35 +0200 Subject: [PATCH 42/49] #3216: fixed typo --- .../legacy/common/embargo-warning/embargo-warning.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js index f07ddefd23b..c7450fa0b1b 100644 --- a/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js +++ b/mdm-frontend/src/app/legacy/common/embargo-warning/embargo-warning.directive.js @@ -27,7 +27,7 @@ angular.module('metadatamanagementApp') } this.project = $scope.project; this.type = this.project - && this.project.configuration.requirements.dataPackageRequired ? 'data-package' : 'analysis-package'; + && this.project.configuration.requirements.dataPackagesRequired ? 'data-package' : 'analysis-package'; }], link: function (ctrl) { From 3c5ac869d8c4705d96162e8427a8aadf69bceaff Mon Sep 17 00:00:00 2001 From: Tilo Villwock Date: Mon, 22 Apr 2024 09:28:53 +0200 Subject: [PATCH 43/49] Fix duplicate field after rebase (#3216) --- .../projectmanagement/domain/DataAcquisitionProject.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/DataAcquisitionProject.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/DataAcquisitionProject.java index f944deebf27..771c20c39bd 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/DataAcquisitionProject.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/projectmanagement/domain/DataAcquisitionProject.java @@ -93,11 +93,6 @@ public class DataAcquisitionProject extends AbstractShadowableRdcDomainObject + "has-been-released-before.not-null") private Boolean hasBeenReleasedBefore; - /** - * Attribute which holds information on the planned release date. - */ - private Date embargoDate; - /** * Flag indicating whether this project has remarks for the user service. Can only be true * for data packages. From 41efdde29ad9e6b7665e3f75c358243b9b9c4298 Mon Sep 17 00:00:00 2001 From: Tilo Villwock Date: Fri, 31 May 2024 15:16:57 +0200 Subject: [PATCH 44/49] Updated to Java 17 * JDK 15 has been unsupported for a while * Gson had to be replaced with Jackson --- pom.xml | 2 +- .../ElasticsearchUpdateQueueService.java | 87 ++++++++++++++----- 2 files changed, 65 insertions(+), 24 deletions(-) diff --git a/pom.xml b/pom.xml index 562ae031109..1ab6c24ff50 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ 7.15.2 0.8.6 - 15 + 17 2.17.1 2.12.0 yyyyMMddHHmmss diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/searchmanagement/service/ElasticsearchUpdateQueueService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/searchmanagement/service/ElasticsearchUpdateQueueService.java index e9859ecc3da..34da6f1a053 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/searchmanagement/service/ElasticsearchUpdateQueueService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/searchmanagement/service/ElasticsearchUpdateQueueService.java @@ -9,6 +9,8 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.lang3.NotImplementedException; import org.elasticsearch.action.bulk.BulkRequest; import org.elasticsearch.action.delete.DeleteRequest; @@ -19,8 +21,6 @@ import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; -import com.google.gson.Gson; - import eu.dzhw.fdz.metadatamanagement.analysispackagemanagement.domain.AnalysisPackage; import eu.dzhw.fdz.metadatamanagement.analysispackagemanagement.domain.projection.AnalysisPackageSubDocumentProjection; import eu.dzhw.fdz.metadatamanagement.analysispackagemanagement.repository.AnalysisPackageRepository; @@ -127,7 +127,7 @@ public class ElasticsearchUpdateQueueService { private final ElasticsearchDao elasticsearchDao; - private final Gson gson; + private final ObjectMapper objectMapper; private final DoiBuilder doiBuilder; @@ -307,8 +307,12 @@ private boolean addUpsertActionForAnalysisPackage(ElasticsearchUpdateQueueItem l AnalysisPackageSearchDocument searchDocument = new AnalysisPackageSearchDocument( analysisPackage, release, configuration, doi, dataPackages, relatedPublications); - request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) - .source(gson.toJson(searchDocument), XContentType.JSON)); + try { + request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) + .source(this.objectMapper.writeValueAsString(searchDocument), XContentType.JSON)); + } catch (JsonProcessingException e) { + throw new RuntimeException("An error occurred while converting an Analysis Package Document to JSON", e); + } return true; } return false; @@ -335,8 +339,13 @@ private boolean addUpsertActionForDataAcquisitionProjects(ElasticsearchUpdateQue DataAcquisitionProjectSearchDocument searchDocument = new DataAcquisitionProjectSearchDocument( project); - IndexRequest req = new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) - .source(gson.toJson(searchDocument), XContentType.JSON); + IndexRequest req = null; + try { + req = new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) + .source(this.objectMapper.writeValueAsString(searchDocument), XContentType.JSON); + } catch (JsonProcessingException e) { + throw new RuntimeException("An error occurred while converting a Data Acquisition Project Document to JSON", e); + } request.add(req); return true; } @@ -395,8 +404,12 @@ private boolean addUpsertActionForConcept(ElasticsearchUpdateQueueItem lockedIte new ConceptSearchDocument(concept, dataPackageSubDocuments, nestedDataPackageDocuments, questions, instruments, surveys, dataSets, variables); - request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) - .source(gson.toJson(searchDocument), XContentType.JSON)); + try { + request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) + .source(this.objectMapper.writeValueAsString(searchDocument), XContentType.JSON)); + } catch (JsonProcessingException e) { + throw new RuntimeException("An error occurred while converting a Concept Document to JSON", e); + } return true; } return false; @@ -443,8 +456,12 @@ private boolean addUpsertActionForInstrument(ElasticsearchUpdateQueueItem locked new InstrumentSearchDocument(instrument, dataPackage, surveys, questions, variables, dataSets, concepts, release, doi, configuration); - request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) - .source(gson.toJson(searchDocument), XContentType.JSON)); + try { + request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) + .source(this.objectMapper.writeValueAsString(searchDocument), XContentType.JSON)); + } catch (JsonProcessingException e) { + throw new RuntimeException("An error occurred while converting an Instrument Document to JSON", e); + } return true; } return false; @@ -496,8 +513,12 @@ private boolean addUpsertActionForRelatedPublication(ElasticsearchUpdateQueueIte relatedPublication, dataPackageSubDocuments, nestedDataPackageDocuments, analysisPackageSubDocuments, nestedAnalysisPackageDocuments); - request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) - .source(gson.toJson(searchDocument), XContentType.JSON)); + try { + request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) + .source(this.objectMapper.writeValueAsString(searchDocument), XContentType.JSON)); + } catch (JsonProcessingException e) { + throw new RuntimeException("An error occurred while converting a Related Publication Document to JSON", e); + } return true; } return false; @@ -549,8 +570,12 @@ private boolean addUpsertActionForDataSet(ElasticsearchUpdateQueueItem lockedIte new DataSetSearchDocument(dataSet, dataPackage, variableProjections, surveys, instruments, questions, concepts, release, doi, configuration); - request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) - .source(gson.toJson(searchDocument), XContentType.JSON)); + try { + request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) + .source(this.objectMapper.writeValueAsString(searchDocument), XContentType.JSON)); + } catch (JsonProcessingException e) { + throw new RuntimeException("An error occurred while converting a DataSet Document to JSON", e); + } return true; } return false; @@ -585,8 +610,12 @@ private boolean addUpsertActionForSurvey(ElasticsearchUpdateQueueItem lockedItem SurveySearchDocument searchDocument = new SurveySearchDocument(survey, dataPackage, dataSets, variables, instruments, questions, concepts, release, doi, configuration); - request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) - .source(gson.toJson(searchDocument), XContentType.JSON)); + try { + request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) + .source(this.objectMapper.writeValueAsString(searchDocument), XContentType.JSON)); + } catch (JsonProcessingException e) { + throw new RuntimeException("An error occurred while converting a Survey Document to JSON", e); + } return true; } return false; @@ -654,8 +683,12 @@ private boolean addUpsertActionForVariable(ElasticsearchUpdateQueueItem lockedIt VariableSearchDocument searchDocument = new VariableSearchDocument(variable, dataSet, dataPackage, surveys, instruments, questions, concepts, release, doi, configuration); - request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) - .source(gson.toJson(searchDocument), XContentType.JSON)); + try { + request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) + .source(this.objectMapper.writeValueAsString(searchDocument), XContentType.JSON)); + } catch (JsonProcessingException e) { + throw new RuntimeException("An error occurred while converting a Variable Document to JSON", e); + } return true; } return false; @@ -701,8 +734,12 @@ private boolean addUpsertActionForQuestion(ElasticsearchUpdateQueueItem lockedIt QuestionSearchDocument searchDocument = new QuestionSearchDocument(question, dataPackage, instrument, surveys, variables, dataSets, concepts, release, doi, configuration); - request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) - .source(gson.toJson(searchDocument), XContentType.JSON)); + try { + request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) + .source(this.objectMapper.writeValueAsString(searchDocument), XContentType.JSON)); + } catch (JsonProcessingException e) { + throw new RuntimeException("An error occurred while converting a Question Document to JSON", e); + } return true; } return false; @@ -751,8 +788,12 @@ private boolean addUpsertActionForDataPackage(ElasticsearchUpdateQueueItem locke dataSets, variables, relatedPublications, surveys, questions, instruments, concepts, analysisPackages, release, doi, configuration); - request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) - .source(gson.toJson(searchDocument), XContentType.JSON)); + try { + request.add(new IndexRequest(lockedItem.getDocumentType().name()).id(searchDocument.getId()) + .source(this.objectMapper.writeValueAsString(searchDocument), XContentType.JSON)); + } catch (JsonProcessingException e) { + throw new RuntimeException("An error occurred while converting a data package Document to JSON", e); + } return true; } return false; From add42f8083b1642d4ebad4f9c7349f7364912617 Mon Sep 17 00:00:00 2001 From: Tilo Villwock Date: Fri, 31 May 2024 15:35:26 +0200 Subject: [PATCH 45/49] Adjusted JDK version in Github CI config --- .github/workflows/build-and-deploy.yml | 4 ++-- .github/workflows/build.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 42a137b6502..67167c7e97f 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -20,11 +20,11 @@ jobs: echo $BUILD_COMMIT_HASH sed -i "s/\"buildHash\": \".*\"/\"buildHash\": \"$BUILD_COMMIT_HASH\"/" mdm-frontend/src/assets/config.json cat mdm-frontend/src/assets/config.json - - name: Set up JDK 15 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: 15 + java-version: 17 - name: Cache maven artifacts uses: actions/cache@v3 env: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e44c496c84f..bd13805334c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,11 +18,11 @@ jobs: echo $BUILD_COMMIT_HASH sed -i "s/\"buildHash\": \".*\"/\"buildHash\": \"$BUILD_COMMIT_HASH\"/" mdm-frontend/src/assets/config.json cat mdm-frontend/src/assets/config.json - - name: Set up JDK 15 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: distribution: 'adopt' - java-version: 15 + java-version: 17 - name: Cache maven artifacts uses: actions/cache@v3 env: From a6339068636d135d880c148e9c431dc453a5e3bc Mon Sep 17 00:00:00 2001 From: Tilo Villwock Date: Fri, 31 May 2024 15:48:32 +0200 Subject: [PATCH 46/49] Updated PMD plugin for JDK 17 support and fixed new violations --- pom.xml | 2 +- .../common/rest/util/PaginationUtil.java | 10 +++++----- .../ordermanagement/rest/OrderResource.java | 4 ++-- .../searchmanagement/service/ElasticsearchType.java | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 1ab6c24ff50..359bb526897 100644 --- a/pom.xml +++ b/pom.xml @@ -627,7 +627,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.14.0 + 3.22.0 pmd check diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/common/rest/util/PaginationUtil.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/common/rest/util/PaginationUtil.java index c2d1193942a..1244333d775 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/common/rest/util/PaginationUtil.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/common/rest/util/PaginationUtil.java @@ -22,20 +22,20 @@ public static HttpHeaders generatePaginationHttpHeaders(Page page, String bas String link = ""; if ((page.getNumber() + 1) < page.getTotalPages()) { link = - "<" + (new URI(baseUrl + "?page=" + (page.getNumber() + 1) + "&size=" + page.getSize())) + "<" + new URI(baseUrl + "?page=" + (page.getNumber() + 1) + "&size=" + page.getSize()) .toString() + ">; rel=\"next\","; } // prev link - if ((page.getNumber()) > 0) { + if (page.getNumber() > 0) { link += - "<" + (new URI(baseUrl + "?page=" + (page.getNumber() - 1) + "&size=" + page.getSize())) + "<" + new URI(baseUrl + "?page=" + (page.getNumber() - 1) + "&size=" + page.getSize()) .toString() + ">; rel=\"prev\","; } // last and first link link += - "<" + (new URI(baseUrl + "?page=" + (page.getTotalPages() - 1) + "&size=" + page.getSize())) + "<" + new URI(baseUrl + "?page=" + (page.getTotalPages() - 1) + "&size=" + page.getSize()) .toString() + ">; rel=\"last\","; - link += "<" + (new URI(baseUrl + "?page=" + 0 + "&size=" + page.getSize())).toString() + link += "<" + new URI(baseUrl + "?page=" + 0 + "&size=" + page.getSize()) + ">; rel=\"first\""; headers.add(HttpHeaders.LINK, link); return headers; diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/ordermanagement/rest/OrderResource.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/ordermanagement/rest/OrderResource.java index b1918159355..c130db4ee23 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/ordermanagement/rest/OrderResource.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/ordermanagement/rest/OrderResource.java @@ -112,8 +112,8 @@ public ResponseEntity findOrder(@PathVariable String id) { if (SecurityContextHolder.getContext() == null || SecurityContextHolder.getContext().getAuthentication() == null || SecurityContextHolder.getContext().getAuthentication().getAuthorities() == null - || !(SecurityContextHolder.getContext().getAuthentication().getAuthorities() - .contains(new SimpleGrantedAuthority(AuthoritiesConstants.PUBLISHER)))) { + || !SecurityContextHolder.getContext().getAuthentication().getAuthorities() + .contains(new SimpleGrantedAuthority(AuthoritiesConstants.PUBLISHER))) { for (Product product : entity.getProducts()) { if (product != null && product.getDataPackage() != null) { product.getDataPackage().setRemarksUserService(null); diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/searchmanagement/service/ElasticsearchType.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/searchmanagement/service/ElasticsearchType.java index 782748e5d65..22da6e7d33f 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/searchmanagement/service/ElasticsearchType.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/searchmanagement/service/ElasticsearchType.java @@ -18,7 +18,7 @@ public enum ElasticsearchType { * @return the strings of this enum */ public static String[] names() { - return Stream.of(ElasticsearchType.values()).map(ElasticsearchType::name) + return Stream.of(values()).map(ElasticsearchType::name) .toArray(String[]::new); } } From b6d6de23ab7576e86ba6a52470e8fd4dbd9acf41 Mon Sep 17 00:00:00 2001 From: Tilo Villwock Date: Fri, 31 May 2024 16:04:26 +0200 Subject: [PATCH 47/49] Updated Github Spotbugs plugin --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 359bb526897..4566af13731 100644 --- a/pom.xml +++ b/pom.xml @@ -491,7 +491,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.1.4 + 4.8.5.0 spotbugs From f21dc80c21f27c7895513fc13f34512f0561dced Mon Sep 17 00:00:00 2001 From: Tilo Villwock Date: Fri, 31 May 2024 16:50:56 +0200 Subject: [PATCH 48/49] Fixed spotbugs warnings --- buildconfig/spotbugs-exclude.xml | 26 ++++++++++++++++++- .../common/service/TweetService.java | 2 ++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/buildconfig/spotbugs-exclude.xml b/buildconfig/spotbugs-exclude.xml index dc36fdffe37..6d0fa46b4c6 100644 --- a/buildconfig/spotbugs-exclude.xml +++ b/buildconfig/spotbugs-exclude.xml @@ -5,4 +5,28 @@ - \ No newline at end of file + + + + + + + + + + + + + diff --git a/src/main/java/eu/dzhw/fdz/metadatamanagement/common/service/TweetService.java b/src/main/java/eu/dzhw/fdz/metadatamanagement/common/service/TweetService.java index 1388befb857..d8fca203e71 100644 --- a/src/main/java/eu/dzhw/fdz/metadatamanagement/common/service/TweetService.java +++ b/src/main/java/eu/dzhw/fdz/metadatamanagement/common/service/TweetService.java @@ -19,6 +19,7 @@ import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import eu.dzhw.fdz.metadatamanagement.common.config.TweetProperties; import okhttp3.MediaType; import okhttp3.MultipartBody; @@ -49,6 +50,7 @@ public class TweetService { private final String oauthSecretToken; private final String endpointUrl; private final String mediaEndpointUrl; + @SuppressFBWarnings("SS_SHOULD_BE_STATIC") private final String version = "1.0"; private final String imageDir; From 414a50d92a4efeeddc17a7390c69139bbbf60f44 Mon Sep 17 00:00:00 2001 From: Tilo Villwock Date: Fri, 31 May 2024 16:59:16 +0200 Subject: [PATCH 49/49] Updated JaCoCo maven plugin --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4566af13731..81bec62a89e 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 7.15.2 - 0.8.6 + 0.8.12 17 2.17.1 2.12.0