diff --git a/README.md b/README.md index da03a6a1..11508899 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,20 @@ ✨ **This workspace has been generated by [Nx, a Smart, fast and extensible build system.](https://nx.dev)** ✨ - ## Start the app To start the development server run `nx serve datahub`. Open your browser and navigate to http://localhost:4200/. Happy coding! - ## Generate code If you happen to use Nx plugins, you can leverage code generators that might come with it. +To generate a component from the root dir for instance, run the following command: + +``` +npx nx g @nx/angular:component [my-component] --module=app.module --directory=apps/datahub/src/app/[my-component-location] +``` + Run `nx list` to get a list of available plugins and whether they have generators. Then run `nx list ` to see what generators are available. Learn more about [Nx generators on the docs](https://nx.dev/plugin-features/use-code-generators). diff --git a/apps/datahub/src/app/app.component.ts b/apps/datahub/src/app/app.component.ts index 373f4bec..d433be62 100644 --- a/apps/datahub/src/app/app.component.ts +++ b/apps/datahub/src/app/app.component.ts @@ -1,10 +1,10 @@ -import { Component } from '@angular/core'; +import { Component } from '@angular/core' @Component({ - selector: 'mel-dataplatform-root', + selector: 'mel-datahub-root', templateUrl: './app.component.html', styleUrl: './app.component.css', }) export class AppComponent { - title = 'datahub'; + title = 'datahub' } diff --git a/apps/datahub/src/app/app.module.ts b/apps/datahub/src/app/app.module.ts index 7ce9f36e..cec4572e 100644 --- a/apps/datahub/src/app/app.module.ts +++ b/apps/datahub/src/app/app.module.ts @@ -12,6 +12,7 @@ import { RouterService, ThemeService, TRANSLATE_DEFAULT_CONFIG, + UiElementsModule, UiWidgetsModule, } from 'geonetwork-ui' import { @@ -34,6 +35,13 @@ import { AppRouterService } from './app.router.service' import { HomeHeaderComponent } from './home/home-header/home-header.component' import { MatIconModule } from '@angular/material/icon' import { MelEmbeddedTranslateLoader } from './common/embedded.translate.loader' +import { ResultsListComponent } from './common/results-list/results-list.component' +import { ResultsListItemComponent } from './common/results-list-item/results-list-item.component' +import { ResultsListCarouselComponent } from './common/results-list/results-list-carousel/results-list-carousel.component' +import { ResultsListGridComponent } from './common/results-list/results-list-grid/results-list-grid.component' +import { ResultsCardFavoriteComponent } from './common/results-list-item/results-card-favorite/results-card-favorite.component' +import { ResultsCardLastCreatedComponent } from './common/results-list-item/results-card-last-created/results-card-last-created.component' +import { ResultsCardSearchComponent } from './common/results-list-item/results-card-search/results-card-search.component' @NgModule({ declarations: [ @@ -44,11 +52,19 @@ import { MelEmbeddedTranslateLoader } from './common/embedded.translate.loader' HeaderComponent, HomePageComponent, HomeHeaderComponent, + ResultsListComponent, + ResultsListCarouselComponent, + ResultsListGridComponent, + ResultsListItemComponent, + ResultsCardFavoriteComponent, + ResultsCardLastCreatedComponent, + ResultsCardSearchComponent, ], imports: [ BrowserModule, BrowserAnimationsModule, UiWidgetsModule, + UiElementsModule, FeatureSearchModule, FeatureCatalogModule, MatIconModule, diff --git a/apps/datahub/src/app/common/embedded.translate.loader.ts b/apps/datahub/src/app/common/embedded.translate.loader.ts index a32db9f8..d185a248 100644 --- a/apps/datahub/src/app/common/embedded.translate.loader.ts +++ b/apps/datahub/src/app/common/embedded.translate.loader.ts @@ -7,7 +7,7 @@ import fr from 'node_modules/geonetwork-ui/translations/fr.json' import { dropEmptyTranslations } from 'geonetwork-ui' export class MelEmbeddedTranslateLoader implements TranslateLoader { - getTranslation(lang: string): Observable { + getTranslation(lang: string): Observable> { const langs = { en: { ...en, ...en_MEL }, fr: { ...fr, ...fr_MEL } } const translations = langs[lang.substring(0, 2)] return of(translations).pipe(map(dropEmptyTranslations)) diff --git a/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.html b/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.html new file mode 100644 index 00000000..113538f9 --- /dev/null +++ b/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.html @@ -0,0 +1,16 @@ + diff --git a/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.ts b/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.ts new file mode 100644 index 00000000..a63bf346 --- /dev/null +++ b/apps/datahub/src/app/common/results-list-item/results-card-favorite/results-card-favorite.component.ts @@ -0,0 +1,10 @@ +import { ChangeDetectionStrategy, Component } from '@angular/core' +import { ResultsListItemComponent } from '../results-list-item.component' + +@Component({ + selector: 'mel-datahub-results-card-favorite', + templateUrl: './results-card-favorite.component.html', + styles: ``, + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class ResultsCardFavoriteComponent extends ResultsListItemComponent {} diff --git a/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.html b/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.html new file mode 100644 index 00000000..37326511 --- /dev/null +++ b/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.html @@ -0,0 +1,16 @@ + diff --git a/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.ts b/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.ts new file mode 100644 index 00000000..e3833877 --- /dev/null +++ b/apps/datahub/src/app/common/results-list-item/results-card-last-created/results-card-last-created.component.ts @@ -0,0 +1,10 @@ +import { ChangeDetectionStrategy, Component } from '@angular/core' +import { ResultsListItemComponent } from '../results-list-item.component' + +@Component({ + selector: 'mel-datahub-results-card-last-created', + templateUrl: './results-card-last-created.component.html', + styles: ``, + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class ResultsCardLastCreatedComponent extends ResultsListItemComponent {} diff --git a/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.html b/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.html new file mode 100644 index 00000000..34e17183 --- /dev/null +++ b/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.html @@ -0,0 +1,16 @@ + diff --git a/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.ts b/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.ts new file mode 100644 index 00000000..75503f05 --- /dev/null +++ b/apps/datahub/src/app/common/results-list-item/results-card-search/results-card-search.component.ts @@ -0,0 +1,10 @@ +import { ChangeDetectionStrategy, Component } from '@angular/core' +import { ResultsListItemComponent } from '../results-list-item.component' + +@Component({ + selector: 'mel-datahub-results-card-search', + templateUrl: './results-card-search.component.html', + styles: ``, + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class ResultsCardSearchComponent extends ResultsListItemComponent {} diff --git a/apps/datahub/src/app/common/results-list-item/results-list-item.component.ts b/apps/datahub/src/app/common/results-list-item/results-list-item.component.ts new file mode 100644 index 00000000..2722b995 --- /dev/null +++ b/apps/datahub/src/app/common/results-list-item/results-list-item.component.ts @@ -0,0 +1,11 @@ +import { Component, EventEmitter, Input, Output } from '@angular/core' +import { CatalogRecord } from 'geonetwork-ui/libs/common/domain/src/lib/model/record' + +@Component({ + selector: 'mel-datahub-results-list-item', + template: '', +}) +export class ResultsListItemComponent { + @Input() record: CatalogRecord + @Output() mdSelect = new EventEmitter() +} diff --git a/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.html b/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.html new file mode 100644 index 00000000..10a551dc --- /dev/null +++ b/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.html @@ -0,0 +1,18 @@ +
+
+ @for (record of searchFacade.results$ | async; track + record.uniqueIdentifier) { @if (favoritesOnly) { + + } @else { + + } } +
+
diff --git a/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.ts b/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.ts new file mode 100644 index 00000000..7f263b53 --- /dev/null +++ b/apps/datahub/src/app/common/results-list/results-list-carousel/results-list-carousel.component.ts @@ -0,0 +1,10 @@ +import { ChangeDetectionStrategy, Component } from '@angular/core' +import { ResultsListComponent } from '../results-list.component' + +@Component({ + selector: 'mel-datahub-results-list-carousel', + templateUrl: './results-list-carousel.component.html', + styles: ``, + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class ResultsListCarouselComponent extends ResultsListComponent {} diff --git a/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.html b/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.html new file mode 100644 index 00000000..9b4bb23f --- /dev/null +++ b/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.html @@ -0,0 +1,12 @@ +
+
+ @for (record of searchFacade.results$ | async; track + record.uniqueIdentifier) { + + } +
+
diff --git a/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.ts b/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.ts new file mode 100644 index 00000000..3db97b6b --- /dev/null +++ b/apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.ts @@ -0,0 +1,10 @@ +import { ChangeDetectionStrategy, Component } from '@angular/core' +import { ResultsListComponent } from '../results-list.component' + +@Component({ + selector: 'mel-datahub-results-list-grid', + templateUrl: './results-list-grid.component.html', + styles: ``, + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class ResultsListGridComponent extends ResultsListComponent {} diff --git a/apps/datahub/src/app/common/results-list/results-list.component.ts b/apps/datahub/src/app/common/results-list/results-list.component.ts new file mode 100644 index 00000000..41e036b7 --- /dev/null +++ b/apps/datahub/src/app/common/results-list/results-list.component.ts @@ -0,0 +1,36 @@ +import { Component, Input, OnInit } from '@angular/core' +import { Store } from '@ngrx/store' +import { + FIELDS_BRIEF, + RouterFacade, + SearchFacade, + SearchState, +} from 'geonetwork-ui' +import { CatalogRecord } from 'geonetwork-ui/libs/common/domain/src/lib/model/record' + +@Component({ + selector: 'mel-datahub-results-list', + template: '', +}) +export class ResultsListComponent implements OnInit { + @Input() favoritesOnly = false + @Input() numberOfResults = 10 + + constructor( + protected searchFacade: SearchFacade, + private routerFacade: RouterFacade, + private store: Store + ) {} + + ngOnInit() { + if (this.favoritesOnly) this.searchFacade.setFavoritesOnly(true) + this.searchFacade + .setConfigRequestFields([...FIELDS_BRIEF, 'createDate', 'changeDate']) + .setPageSize(this.numberOfResults) + .setSortBy(['desc', 'createDate']) + } + + onMetadataSelection(metadata: CatalogRecord): void { + this.routerFacade.goToMetadata(metadata) + } +} diff --git a/apps/datahub/src/app/home/home-header/home-header.component.html b/apps/datahub/src/app/home/home-header/home-header.component.html index 5af737a1..354bf753 100644 --- a/apps/datahub/src/app/home/home-header/home-header.component.html +++ b/apps/datahub/src/app/home/home-header/home-header.component.html @@ -10,6 +10,10 @@

[autoFocus]="true" > -
+
+ +
diff --git a/apps/datahub/src/app/search/search-header/search-header.component.html b/apps/datahub/src/app/search/search-header/search-header.component.html index 5a928300..278d381f 100644 --- a/apps/datahub/src/app/search/search-header/search-header.component.html +++ b/apps/datahub/src/app/search/search-header/search-header.component.html @@ -1,6 +1,11 @@

mel.datahub.search.title

-
+
+ +
diff --git a/apps/datahub/src/app/search/search-page/search-page.component.ts b/apps/datahub/src/app/search/search-page/search-page.component.ts index aac21a51..1cf8e3a8 100644 --- a/apps/datahub/src/app/search/search-page/search-page.component.ts +++ b/apps/datahub/src/app/search/search-page/search-page.component.ts @@ -1,8 +1,7 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { ChangeDetectionStrategy, Component } from '@angular/core' @Component({ selector: 'mel-datahub-search-page', - providers: [], templateUrl: './search-page.component.html', styles: ``, changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/apps/datahub/src/app/search/search-results/search-results.component.html b/apps/datahub/src/app/search/search-results/search-results.component.html index f586a80d..d9784193 100644 --- a/apps/datahub/src/app/search/search-results/search-results.component.html +++ b/apps/datahub/src/app/search/search-results/search-results.component.html @@ -3,10 +3,8 @@
- +
diff --git a/apps/datahub/src/app/search/search-results/search-results.component.ts b/apps/datahub/src/app/search/search-results/search-results.component.ts index 84d3494b..acff04a2 100644 --- a/apps/datahub/src/app/search/search-results/search-results.component.ts +++ b/apps/datahub/src/app/search/search-results/search-results.component.ts @@ -1,6 +1,4 @@ -import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core' -import { RouterFacade, SearchFacade } from 'geonetwork-ui' -import { CatalogRecord } from 'geonetwork-ui/libs/common/domain/src/lib/model/record' +import { ChangeDetectionStrategy, Component } from '@angular/core' @Component({ selector: 'mel-datahub-search-results', @@ -8,18 +6,4 @@ import { CatalogRecord } from 'geonetwork-ui/libs/common/domain/src/lib/model/re styles: ``, changeDetection: ChangeDetectionStrategy.OnPush, }) -export class SearchResultsComponent implements OnInit { - isQualitySortable = true - - constructor( - private searchRouter: RouterFacade, - private searchFacade: SearchFacade - ) {} - ngOnInit() { - this.searchFacade.setResultsLayout('CARD') - } - - onMetadataSelection(metadata: CatalogRecord): void { - this.searchRouter.goToMetadata(metadata) - } -} +export class SearchResultsComponent {} diff --git a/apps/datahub/src/index.html b/apps/datahub/src/index.html index 943b78ff..9127bc6b 100644 --- a/apps/datahub/src/index.html +++ b/apps/datahub/src/index.html @@ -17,6 +17,6 @@ /> - + diff --git a/package-lock.json b/package-lock.json index b1ed445c..08b8bfcd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,6 @@ "@ngrx/router-store": "~17.0.0", "@ngrx/store": "~17.0.0", "@ngx-translate/core": "^15.0.0", - "@ngx-translate/http-loader": "^8.0.0", "@nx/angular": "17.2.8", "geonetwork-ui": "^2.2.0-dev.f866474c", "rxjs": "~7.8.0", @@ -4842,17 +4841,17 @@ } }, "node_modules/@ngx-translate/http-loader": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@ngx-translate/http-loader/-/http-loader-8.0.0.tgz", - "integrity": "sha512-SFMsdUcmHF5OdZkL1CHEoSAwbP5EbAOPTLLboOCRRoOg21P4GJx+51jxGdJeGve6LSKLf4Pay7BkTwmE6vxYlg==", - "engines": { - "node": "^16.13.0 || >=18.10.0" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@ngx-translate/http-loader/-/http-loader-7.0.0.tgz", + "integrity": "sha512-j+NpXXlcGVdyUNyY/qsJrqqeAdJdizCd+GKh3usXExSqy1aE9866jlAIL+xrfDU4w+LiMoma5pgE4emvFebZmA==", + "peer": true, + "dependencies": { + "tslib": "^2.3.0" }, "peerDependencies": { - "@angular/common": ">=16.0.0", - "@angular/core": ">=16.0.0", - "@ngx-translate/core": ">=15.0.0", - "rxjs": "^6.5.5 || ^7.4.0" + "@angular/common": ">=13.0.0", + "@ngx-translate/core": ">=14.0.0", + "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@nodelib/fs.scandir": { @@ -16926,6 +16925,15 @@ "node": ">=0.10.0" } }, + "node_modules/geonetwork-ui/node_modules/loader-utils": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz", + "integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==", + "peer": true, + "engines": { + "node": ">= 12.13.0" + } + }, "node_modules/geonetwork-ui/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -16971,6 +16979,25 @@ "semver": "bin/semver" } }, + "node_modules/geonetwork-ui/node_modules/mini-css-extract-plugin": { + "version": "2.7.6", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.6.tgz", + "integrity": "sha512-Qk7HcgaPkGG6eD77mLvZS1nmxlao3j+9PkrT9Uc7HAE1id3F41+DdBRYRYkbyfNRGzm8/YWtzhw7nVPmwhqTQw==", + "peer": true, + "dependencies": { + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, "node_modules/geonetwork-ui/node_modules/mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", @@ -17076,6 +17103,29 @@ "node": ">=10" } }, + "node_modules/geonetwork-ui/node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "peer": true, + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/geonetwork-ui/node_modules/parse5": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", @@ -17143,6 +17193,77 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/geonetwork-ui/node_modules/postcss-loader": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.3.3.tgz", + "integrity": "sha512-YgO/yhtevGO/vJePCQmTxiaEwER94LABZN0ZMT4A0vsak9TpO+RvKRs7EmJ8peIlB9xfXCsS7M8LjqncsUZ5HA==", + "peer": true, + "dependencies": { + "cosmiconfig": "^8.2.0", + "jiti": "^1.18.2", + "semver": "^7.3.8" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "postcss": "^7.0.0 || ^8.0.1", + "webpack": "^5.0.0" + } + }, + "node_modules/geonetwork-ui/node_modules/postcss-loader/node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "peer": true, + "dependencies": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/geonetwork-ui/node_modules/proxy-from-env": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", + "optional": true, + "peer": true + }, + "node_modules/geonetwork-ui/node_modules/qs": { + "version": "6.10.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.4.tgz", + "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", + "optional": true, + "peer": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/geonetwork-ui/node_modules/regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", @@ -17173,6 +17294,43 @@ "node": ">=14.0.0" } }, + "node_modules/geonetwork-ui/node_modules/sass-loader": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-13.3.2.tgz", + "integrity": "sha512-CQbKl57kdEv+KDLquhC+gE3pXt74LEAzm+tzywcA0/aHZuub8wTErbjAoNI57rPUWRYRNC5WUnNl8eGJNbDdwg==", + "peer": true, + "dependencies": { + "neo-async": "^2.6.2" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "fibers": ">= 3.1.0", + "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", + "sass": "^1.3.0", + "sass-embedded": "*", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "fibers": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + } + } + }, "node_modules/geonetwork-ui/node_modules/slash": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", @@ -17283,6 +17441,34 @@ } } }, + "node_modules/geonetwork-ui/node_modules/webpack-dev-middleware": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-6.1.1.tgz", + "integrity": "sha512-y51HrHaFeeWir0YO4f0g+9GwZawuigzcAdRNon6jErXy/SqV/+O6eaVAzDqE6t3e3NpGeR5CS+cCDaTC+V3yEQ==", + "peer": true, + "dependencies": { + "colorette": "^2.0.10", + "memfs": "^3.4.12", + "mime-types": "^2.1.31", + "range-parser": "^1.2.1", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + } + } + }, "node_modules/geonetwork-ui/node_modules/webpack-merge": { "version": "5.9.0", "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.9.0.tgz", diff --git a/package.json b/package.json index 9b243355..4a827784 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "@ngrx/router-store": "~17.0.0", "@ngrx/store": "~17.0.0", "@ngx-translate/core": "^15.0.0", - "@ngx-translate/http-loader": "^8.0.0", "@nx/angular": "17.2.8", "geonetwork-ui": "^2.2.0-dev.f866474c", "rxjs": "~7.8.0", @@ -79,5 +78,10 @@ "ts-jest": "^29.1.0", "ts-node": "10.9.1", "typescript": "~5.2.2" + }, + "overrides": { + "geonetwork-ui": { + "@ngx-translate/core": "^15.0.0" + } } } diff --git a/proxy-config.js b/proxy-config.js index ba215c6e..7b016202 100644 --- a/proxy-config.js +++ b/proxy-config.js @@ -1,6 +1,6 @@ module.exports = { '/geonetwork': { - target: 'https://mel.integration.apps.gs-fr-prod.camptocamp.com/', + target: 'http://localhost:8080/', secure: true, logLevel: 'debug', changeOrigin: true, @@ -36,4 +36,4 @@ module.exports = { 'sec-orgname': 'myOrg', }, }, -}; +}