diff --git a/apps/datahub-e2e/src/e2e/dataset.cy.ts b/apps/datahub-e2e/src/e2e/dataset.cy.ts index 02d6c155..c97aa55b 100644 --- a/apps/datahub-e2e/src/e2e/dataset.cy.ts +++ b/apps/datahub-e2e/src/e2e/dataset.cy.ts @@ -114,11 +114,6 @@ describe('datasets', () => { }) it('should display the sharing tool', () => { - cy.get('mel-datahub-dataset-visualisation') - .find('.mat-mdc-tab-labels') - .children('div') - .eq(2) - .click() cy.get('gn-ui-data-view-share').should('be.visible') }) }) @@ -291,7 +286,7 @@ describe('datasets', () => { describe('Navigation', () => { describe('With a query on', () => { - beforeEach(() => cy.visit('/search?publisher=Barbie%20Inc.')) + beforeEach(() => cy.visit('/search?organization=Barbie%20Inc.')) it('should return to the search page with the previous query on', () => { cy.get('mel-datahub-results-card-search').first().click() @@ -299,7 +294,7 @@ describe('datasets', () => { .find('mel-datahub-button') .first() .click() - cy.url().should('include', '/search?publisher=Barbie%20Inc.') + cy.url().should('include', '/search?organization=Barbie%20Inc.') }) }) describe('Without a query on', () => { diff --git a/apps/datahub/src/app/app.module.ts b/apps/datahub/src/app/app.module.ts index a0bc69bf..8f418ed2 100644 --- a/apps/datahub/src/app/app.module.ts +++ b/apps/datahub/src/app/app.module.ts @@ -138,6 +138,9 @@ import { MelDatahubDropdownRangeComponent } from './search/search-filters/mel-da searchStateId: 'mainSearch', searchRouteComponent: SearchPageComponent, recordRouteComponent: DatasetPageComponent, + // reusing the search component for the organization route since MEL + // does not have org routes but param is compulsory + organizationRouteComponent: SearchPageComponent, }), ], providers: [ diff --git a/apps/datahub/src/app/dataset/dataset-visualisation/dataset-visualisation.component.html b/apps/datahub/src/app/dataset/dataset-visualisation/dataset-visualisation.component.html index eef766e1..c3434ab5 100644 --- a/apps/datahub/src/app/dataset/dataset-visualisation/dataset-visualisation.component.html +++ b/apps/datahub/src/app/dataset/dataset-visualisation/dataset-visualisation.component.html @@ -1,6 +1,6 @@
- @if(selectedTabIndex === 2) { - + @if(displayData || displayMap) { + }
diff --git a/apps/datahub/src/app/dataset/dataset-visualisation/dataset-visualisation.component.ts b/apps/datahub/src/app/dataset/dataset-visualisation/dataset-visualisation.component.ts index 378e15e8..ffea85e0 100644 --- a/apps/datahub/src/app/dataset/dataset-visualisation/dataset-visualisation.component.ts +++ b/apps/datahub/src/app/dataset/dataset-visualisation/dataset-visualisation.component.ts @@ -18,14 +18,25 @@ import { DatasetDistribution } from 'geonetwork-ui/libs/common/domain/src/lib/mo export class DatasetVisualisationComponent { @Input() displayMap: boolean @Input() displayData: boolean - selectedTabIndex = 0 + selectedView = 'map' selectedLink$ = new BehaviorSubject(null) constructor(public mdViewFacade: MdViewFacade) {} onTabIndexChange(index: number): void { - this.selectedTabIndex = index + let view + switch (index) { + case 0: + view = 'map' + break + case 1: + view = 'table' + break + default: + view = 'chart' + } + this.selectedView = view setTimeout(() => { window.dispatchEvent(new Event('resize')) }, 0) diff --git a/apps/datahub/src/app/search/search-filters/search-filters.component.ts b/apps/datahub/src/app/search/search-filters/search-filters.component.ts index c9646f2a..8db7e08d 100644 --- a/apps/datahub/src/app/search/search-filters/search-filters.component.ts +++ b/apps/datahub/src/app/search/search-filters/search-filters.component.ts @@ -4,11 +4,13 @@ import { RouterFacade } from 'geonetwork-ui' marker('mel.datahub.search.filters.topic') marker('mel.datahub.search.filters.categoryKeyword') -marker('mel.datahub.search.filters.publisher') +marker('mel.datahub.search.filters.organization') marker('mel.datahub.search.filters.publicationYear') marker('mel.datahub.search.filters.license') marker('mel.datahub.search.filters.qualityScore') marker('mel.datahub.search.filters.territories') +marker('mel.datahub.search.filters.producerOrg') +marker('mel.datahub.search.filters.publisherOrg') @Component({ selector: 'mel-datahub-search-filters', @@ -21,7 +23,7 @@ export class SearchFiltersComponent { displayCount = 3 searchConfig = [ 'topic', - 'publisher', + 'organization', 'publicationYear', 'license', 'qualityScore', diff --git a/package-lock.json b/package-lock.json index 9162085a..44a791e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,7 @@ "@ngx-translate/core": "^15.0.0", "@nx/angular": "17.3.2", "@vendure/ngx-translate-extract": "^9.0.3", - "geonetwork-ui": "^2.4.0-dev.e1bb65c4", + "geonetwork-ui": "^2.4.0-dev.71a43b38", "rxjs": "~7.8.0", "tippy.js": "^6.3.7", "tslib": "^2.3.0", @@ -14812,9 +14812,9 @@ "integrity": "sha512-gUI9nhI2iBGF0OaYYLKOaOtliFMl+Bt1rY7VmEjwxOxqoYLub/D9xmduPEhbw2imE6gYkJKhIE5it+KE2ulVxQ==" }, "node_modules/embla-carousel": { - "version": "8.1.5", - "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.1.5.tgz", - "integrity": "sha512-R6xTf7cNdR2UTNM6/yUPZlJFRmZSogMiRjJ5vXHO65II5MoUlrVYUAP0fHQei/py82Vf15lj+WI+QdhnzBxA2g==" + "version": "8.1.6", + "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.1.6.tgz", + "integrity": "sha512-9n7FVsbPAs1KD+JmO84DnEDOZMXPBQbLujjMQqvsBRN2CDWwgZ9hRSNapztdPnyJfzOIxowGmj0BUQ8ACYAPkA==" }, "node_modules/emittery": { "version": "0.13.1", @@ -16329,9 +16329,9 @@ } }, "node_modules/geonetwork-ui": { - "version": "2.4.0-dev.e1bb65c4", - "resolved": "https://registry.npmjs.org/geonetwork-ui/-/geonetwork-ui-2.4.0-dev.e1bb65c4.tgz", - "integrity": "sha512-yEQsuvHZDGchebxCWIt5fezkklLebSm1ADa37NtgYnebWd3cYsSueo9J09J48/iZoY4VFCxXkC0utgyixBKC+w==", + "version": "2.4.0-dev.71a43b38", + "resolved": "https://registry.npmjs.org/geonetwork-ui/-/geonetwork-ui-2.4.0-dev.71a43b38.tgz", + "integrity": "sha512-kk0nEoAwNio0QJCWC2d3A132WokJ9RwN9Ob5/VTDtkgnB5Gq8FvbquFNaQoTaFdQR9Vf2iJTYJBe3Fe4taDifQ==", "dependencies": { "@biesbjerg/ngx-translate-extract-marker": "^1.0.0", "@camptocamp/ogc-client": "1.1.1-dev.ad6d9ab", @@ -18470,9 +18470,9 @@ } }, "node_modules/geonetwork-ui/node_modules/@types/node": { - "version": "16.18.99", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.99.tgz", - "integrity": "sha512-X2Yc+NQaPXDuaR32UmFrTr3OXWaht756A6sJw56o4dehkySBZ0NWH30CCRviuC0KFwTDW/NTjrtbFHhYcHkd6g==", + "version": "16.18.101", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.101.tgz", + "integrity": "sha512-AAsx9Rgz2IzG8KJ6tXd6ndNkVcu+GYB6U/SnFAaokSPNx2N7dcIIfnighYUNumvj6YS2q39Dejz5tT0NCV7CWA==", "optional": true, "peer": true }, @@ -24622,6 +24622,11 @@ "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==" + }, "node_modules/pacote": { "version": "17.0.4", "resolved": "https://registry.npmjs.org/pacote/-/pacote-17.0.4.tgz", @@ -28463,22 +28468,20 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/typeorm/node_modules/glob": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", - "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } @@ -28492,15 +28495,12 @@ } }, "node_modules/typeorm/node_modules/jackspeak": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", - "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dependencies": { "@isaacs/cliui": "^8.0.2" }, - "engines": { - "node": ">=14" - }, "funding": { "url": "https://github.com/sponsors/isaacs" }, @@ -28509,9 +28509,9 @@ } }, "node_modules/typeorm/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dependencies": { "brace-expansion": "^2.0.1" }, diff --git a/package.json b/package.json index 022cef2e..5e7172a3 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@ngx-translate/core": "^15.0.0", "@nx/angular": "17.3.2", "@vendure/ngx-translate-extract": "^9.0.3", - "geonetwork-ui": "^2.4.0-dev.e1bb65c4", + "geonetwork-ui": "^2.4.0-dev.71a43b38", "rxjs": "~7.8.0", "tippy.js": "^6.3.7", "tslib": "^2.3.0", diff --git a/resources/translations/en_MEL.json b/resources/translations/en_MEL.json index 2bb51b13..eb74eb6c 100644 --- a/resources/translations/en_MEL.json +++ b/resources/translations/en_MEL.json @@ -15,8 +15,10 @@ "mel.datahub.search.filters.maxValue": "", "mel.datahub.search.filters.minValue": "", "mel.datahub.search.filters.more": "", + "mel.datahub.search.filters.organization": "", + "mel.datahub.search.filters.producerOrg": "", "mel.datahub.search.filters.publicationYear": "", - "mel.datahub.search.filters.publisher": "", + "mel.datahub.search.filters.publisherOrg": "", "mel.datahub.search.filters.qualityScore": "", "mel.datahub.search.filters.range.from": "", "mel.datahub.search.filters.range.to": "", diff --git a/resources/translations/fr_MEL.json b/resources/translations/fr_MEL.json index 2d841f72..38a6d7c1 100644 --- a/resources/translations/fr_MEL.json +++ b/resources/translations/fr_MEL.json @@ -15,8 +15,10 @@ "mel.datahub.search.filters.maxValue": "Valeur maximale", "mel.datahub.search.filters.minValue": "Valeur minimale", "mel.datahub.search.filters.more": "Plus de filtres", + "mel.datahub.search.filters.organization": "Organisation", + "mel.datahub.search.filters.producerOrg": "Producteur", "mel.datahub.search.filters.publicationYear": "Date", - "mel.datahub.search.filters.publisher": "Producteur", + "mel.datahub.search.filters.publisherOrg": "Distributeur", "mel.datahub.search.filters.qualityScore": "Score de qualité", "mel.datahub.search.filters.range.from": "De :", "mel.datahub.search.filters.range.to": "Jusqu'à :",