-
-
diff --git a/apps/datahub/src/app/record/record-metadata/record-metadata.component.ts b/apps/datahub/src/app/record/record-metadata/record-metadata.component.ts
index ac9d0aeabe..bada318129 100644
--- a/apps/datahub/src/app/record/record-metadata/record-metadata.component.ts
+++ b/apps/datahub/src/app/record/record-metadata/record-metadata.component.ts
@@ -7,6 +7,7 @@ import { filter, map, mergeMap } from 'rxjs/operators'
import { OrganizationsServiceInterface } from '@geonetwork-ui/common/domain/organizations.service.interface'
import { Organization } from '@geonetwork-ui/common/domain/model/record'
import { MdViewFacade } from '@geonetwork-ui/feature/record'
+import * as basicLightbox from 'basiclightbox'
@Component({
selector: 'datahub-record-metadata',
@@ -55,6 +56,11 @@ export class RecordMetadataComponent {
errorTypes = ErrorType
selectedTabIndex$ = new BehaviorSubject(0)
+ lightbox$ = this.facade.metadata$.pipe(
+ map((metadata) => metadata?.overviews?.[0]?.url)
+ )
+ lightboxInstance: any
+
constructor(
public facade: MdViewFacade,
private searchService: SearchService,
@@ -77,4 +83,9 @@ export class RecordMetadataComponent {
.getFiltersForOrgs([org])
.subscribe((filters) => this.searchService.updateFilters(filters))
}
+
+ openLightbox(src: string) {
+ this.lightboxInstance = basicLightbox.create(`
`)
+ this.lightboxInstance.show()
+ }
}
diff --git a/package-lock.json b/package-lock.json
index ff2f2588b7..b7b45d94fb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -40,6 +40,7 @@
"@rgrove/parse-xml": "~4.0.1",
"alasql": "^3.1.0",
"axios": "^1.6.0",
+ "basiclightbox": "^5.0.4",
"chart.js": "^4.2.0",
"chroma-js": "^2.1.2",
"cypress-browser-permissions": "^1.1.0",
@@ -14707,6 +14708,11 @@
"node": ">= 0.8"
}
},
+ "node_modules/basiclightbox": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/basiclightbox/-/basiclightbox-5.0.4.tgz",
+ "integrity": "sha512-EsuNWmfcFXWZOe0txKXsllYOC7bDpoaVLc4HHHlYKB/roymlZs+FBdLUU6rx2yPpnJZhulwheKdPjqr2k0+NGQ=="
+ },
"node_modules/batch": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz",
diff --git a/package.json b/package.json
index d7589bf7cd..ba7a3a312a 100644
--- a/package.json
+++ b/package.json
@@ -75,6 +75,7 @@
"@rgrove/parse-xml": "~4.0.1",
"alasql": "^3.1.0",
"axios": "^1.6.0",
+ "basiclightbox": "^5.0.4",
"chart.js": "^4.2.0",
"chroma-js": "^2.1.2",
"cypress-browser-permissions": "^1.1.0",