From 3f75b64e6c877366391cc0a096cdbdec1131bb43 Mon Sep 17 00:00:00 2001 From: Florent Gravin Date: Thu, 11 Jan 2024 17:23:06 +0100 Subject: [PATCH 1/2] fix(repository): export gn4 folder in the lib --- apps/datahub/src/app/app.module.ts | 2 +- .../search/search-filters/search-filters.component.spec.ts | 2 +- apps/map-viewer/src/app/app.module.ts | 2 +- apps/metadata-editor/src/app/app.module.ts | 2 +- .../dashboard/search-header/search-header.component.spec.ts | 2 +- .../app/dashboard/search-header/search-header.component.ts | 2 +- .../src/app/my-org-users/my-org-users.component.spec.ts | 2 +- .../records/my-org-records/my-org-records.component.spec.ts | 2 +- .../src/app/records/my-records/my-records.component.spec.ts | 2 +- .../src/app/records/my-records/my-records.component.ts | 2 +- .../src/app/records/records-list.component.spec.ts | 2 +- .../src/app/records/records-list.component.ts | 2 +- apps/webcomponents/src/app/webcomponents.module.ts | 2 +- libs/api/repository/src/index.ts | 1 + libs/feature/auth/src/lib/feature-auth.module.ts | 2 +- libs/feature/catalog/src/lib/feature-catalog.module.ts | 2 +- libs/feature/catalog/src/lib/my-org/my-org.service.spec.ts | 2 +- .../favorites/favorite-star/favorite-star.component.spec.ts | 2 +- .../lib/favorites/favorite-star/favorite-star.component.ts | 5 +---- libs/feature/search/src/lib/feature-search.module.ts | 2 +- libs/feature/search/src/lib/state/effects.spec.ts | 2 +- libs/feature/search/src/lib/state/effects.ts | 2 +- .../search/src/lib/utils/service/fields.service.spec.ts | 2 +- libs/feature/search/src/lib/utils/service/fields.spec.ts | 2 +- libs/feature/search/src/lib/utils/service/fields.ts | 2 +- 25 files changed, 25 insertions(+), 27 deletions(-) diff --git a/apps/datahub/src/app/app.module.ts b/apps/datahub/src/app/app.module.ts index ec0746b964..9c4b458339 100644 --- a/apps/datahub/src/app/app.module.ts +++ b/apps/datahub/src/app/app.module.ts @@ -73,7 +73,7 @@ import { provideRepositoryUrl, } from '@geonetwork-ui/api/repository' import { BrowserAnimationsModule } from '@angular/platform-browser/animations' -import { LOGIN_URL, provideGn4 } from '@geonetwork-ui/api/repository/gn4' +import { LOGIN_URL, provideGn4 } from '@geonetwork-ui/api/repository' import { RecordRelatedRecordsComponent } from './record/record-related-records/record-related-records.component' import { RecordMetadataComponent } from './record/record-metadata/record-metadata.component' import { RecordOtherlinksComponent } from './record/record-otherlinks/record-otherlinks.component' diff --git a/apps/datahub/src/app/home/search/search-filters/search-filters.component.spec.ts b/apps/datahub/src/app/home/search/search-filters/search-filters.component.spec.ts index 95b4bc3bb7..96b24e0406 100644 --- a/apps/datahub/src/app/home/search/search-filters/search-filters.component.spec.ts +++ b/apps/datahub/src/app/home/search/search-filters/search-filters.component.spec.ts @@ -21,7 +21,7 @@ import { By } from '@angular/platform-browser' import { FormsModule } from '@angular/forms' import { FieldFilters } from '@geonetwork-ui/common/domain/model/search' import { USER_FIXTURE } from '@geonetwork-ui/common/fixtures' -import { AuthService } from '@geonetwork-ui/api/repository/gn4' +import { AuthService } from '@geonetwork-ui/api/repository' import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform.service.interface' jest.mock('@geonetwork-ui/util/app-config', () => ({ diff --git a/apps/map-viewer/src/app/app.module.ts b/apps/map-viewer/src/app/app.module.ts index 933ebd3ed3..03185a7aca 100644 --- a/apps/map-viewer/src/app/app.module.ts +++ b/apps/map-viewer/src/app/app.module.ts @@ -16,7 +16,7 @@ import { storeFreeze } from 'ngrx-store-freeze' import { environment } from '../environments/environment' import { provideRepositoryUrl } from '@geonetwork-ui/api/repository' import { BrowserAnimationsModule } from '@angular/platform-browser/animations' -import { provideGn4 } from '@geonetwork-ui/api/repository/gn4' +import { provideGn4 } from '@geonetwork-ui/api/repository' import { FeatureAuthModule } from '@geonetwork-ui/feature/auth' import { FeatureCatalogModule } from '@geonetwork-ui/feature/catalog' diff --git a/apps/metadata-editor/src/app/app.module.ts b/apps/metadata-editor/src/app/app.module.ts index ebb9d99e7c..f0306c3389 100644 --- a/apps/metadata-editor/src/app/app.module.ts +++ b/apps/metadata-editor/src/app/app.module.ts @@ -25,7 +25,7 @@ import { extModules } from './build-specifics' import { DashboardPageComponent } from './dashboard/dashboard-page.component' import { EditorRouterService } from './router.service' import { provideRepositoryUrl } from '@geonetwork-ui/api/repository' -import { provideGn4 } from '@geonetwork-ui/api/repository/gn4' +import { provideGn4 } from '@geonetwork-ui/api/repository' @NgModule({ declarations: [AppComponent], diff --git a/apps/metadata-editor/src/app/dashboard/search-header/search-header.component.spec.ts b/apps/metadata-editor/src/app/dashboard/search-header/search-header.component.spec.ts index 5633823269..e0337e836a 100644 --- a/apps/metadata-editor/src/app/dashboard/search-header/search-header.component.spec.ts +++ b/apps/metadata-editor/src/app/dashboard/search-header/search-header.component.spec.ts @@ -13,7 +13,7 @@ import { EffectsModule } from '@ngrx/effects' import { TranslateModule } from '@ngx-translate/core' import { TRANSLATE_DEFAULT_CONFIG } from '@geonetwork-ui/util/i18n' import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform.service.interface' -import { AvatarServiceInterface } from '@geonetwork-ui/api/repository/gn4' +import { AvatarServiceInterface } from '@geonetwork-ui/api/repository' class AvatarServiceInterfaceMock { getPlaceholder = () => of('http://placeholder.com') diff --git a/apps/metadata-editor/src/app/dashboard/search-header/search-header.component.ts b/apps/metadata-editor/src/app/dashboard/search-header/search-header.component.ts index ddc5d3219f..c7f6738b13 100644 --- a/apps/metadata-editor/src/app/dashboard/search-header/search-header.component.ts +++ b/apps/metadata-editor/src/app/dashboard/search-header/search-header.component.ts @@ -4,7 +4,7 @@ import { MatIconModule } from '@angular/material/icon' import { LetDirective } from '@ngrx/component' import { FeatureSearchModule } from '@geonetwork-ui/feature/search' import { UiElementsModule } from '@geonetwork-ui/ui/elements' -import { AvatarServiceInterface } from '@geonetwork-ui/api/repository/gn4' +import { AvatarServiceInterface } from '@geonetwork-ui/api/repository' import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform.service.interface' @Component({ diff --git a/apps/metadata-editor/src/app/my-org-users/my-org-users.component.spec.ts b/apps/metadata-editor/src/app/my-org-users/my-org-users.component.spec.ts index 897fa36d43..f71652a5aa 100644 --- a/apps/metadata-editor/src/app/my-org-users/my-org-users.component.spec.ts +++ b/apps/metadata-editor/src/app/my-org-users/my-org-users.component.spec.ts @@ -6,7 +6,7 @@ import { USER_FIXTURE_ANON, USERS_FIXTURE, } from '@geonetwork-ui/common/fixtures' -import { AuthService } from '@geonetwork-ui/api/repository/gn4' +import { AuthService } from '@geonetwork-ui/api/repository' import { SearchFacade } from '@geonetwork-ui/feature/search' describe('MyOrgUsersComponent', () => { diff --git a/apps/metadata-editor/src/app/records/my-org-records/my-org-records.component.spec.ts b/apps/metadata-editor/src/app/records/my-org-records/my-org-records.component.spec.ts index 63e0629753..f8d84f13b7 100644 --- a/apps/metadata-editor/src/app/records/my-org-records/my-org-records.component.spec.ts +++ b/apps/metadata-editor/src/app/records/my-org-records/my-org-records.component.spec.ts @@ -6,7 +6,7 @@ import { USER_FIXTURE_ANON, USERS_FIXTURE, } from '@geonetwork-ui/common/fixtures' -import { AuthService } from '@geonetwork-ui/api/repository/gn4' +import { AuthService } from '@geonetwork-ui/api/repository' import { SearchFacade } from '@geonetwork-ui/feature/search' import { OrganizationsServiceInterface } from '@geonetwork-ui/common/domain/organizations.service.interface' import { EditorRouterService } from '../../router.service' diff --git a/apps/metadata-editor/src/app/records/my-records/my-records.component.spec.ts b/apps/metadata-editor/src/app/records/my-records/my-records.component.spec.ts index 4c67889604..946993ea9f 100644 --- a/apps/metadata-editor/src/app/records/my-records/my-records.component.spec.ts +++ b/apps/metadata-editor/src/app/records/my-records/my-records.component.spec.ts @@ -6,7 +6,7 @@ import { TranslateModule } from '@ngx-translate/core' import { RecordsListComponent } from '../records-list.component' import { BehaviorSubject, of } from 'rxjs' import { USER_FIXTURE } from '@geonetwork-ui/common/fixtures' -import { AuthService } from '@geonetwork-ui/api/repository/gn4' +import { AuthService } from '@geonetwork-ui/api/repository' import { EditorRouterService } from '../../router.service' import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform.service.interface' diff --git a/apps/metadata-editor/src/app/records/my-records/my-records.component.ts b/apps/metadata-editor/src/app/records/my-records/my-records.component.ts index fa1cf714d4..24246ba0f7 100644 --- a/apps/metadata-editor/src/app/records/my-records/my-records.component.ts +++ b/apps/metadata-editor/src/app/records/my-records/my-records.component.ts @@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common' import { TranslateModule } from '@ngx-translate/core' import { RecordsListComponent } from '../records-list.component' import { FieldsService, SearchFacade } from '@geonetwork-ui/feature/search' -import { AuthService } from '@geonetwork-ui/api/repository/gn4' +import { AuthService } from '@geonetwork-ui/api/repository' import { EditorRouterService } from '../../router.service' import { Subscription } from 'rxjs' import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform.service.interface' diff --git a/apps/metadata-editor/src/app/records/records-list.component.spec.ts b/apps/metadata-editor/src/app/records/records-list.component.spec.ts index 8c5983a12f..20c2072e0b 100644 --- a/apps/metadata-editor/src/app/records/records-list.component.spec.ts +++ b/apps/metadata-editor/src/app/records/records-list.component.spec.ts @@ -8,7 +8,7 @@ import { Router } from '@angular/router' import { BehaviorSubject } from 'rxjs' import { CommonModule } from '@angular/common' import { MatIconModule } from '@angular/material/icon' -import { SelectionService } from '@geonetwork-ui/api/repository/gn4' +import { SelectionService } from '@geonetwork-ui/api/repository' import { DATASET_RECORDS } from '@geonetwork-ui/common/fixtures' const results = [{ md: true }] diff --git a/apps/metadata-editor/src/app/records/records-list.component.ts b/apps/metadata-editor/src/app/records/records-list.component.ts index f06d1d8203..6b8946068f 100644 --- a/apps/metadata-editor/src/app/records/records-list.component.ts +++ b/apps/metadata-editor/src/app/records/records-list.component.ts @@ -8,7 +8,7 @@ import { UiSearchModule } from '@geonetwork-ui/ui/search' import { UiElementsModule } from '@geonetwork-ui/ui/elements' import { SortByField } from '@geonetwork-ui/common/domain/model/search' import { TranslateModule } from '@ngx-translate/core' -import { SelectionService } from '@geonetwork-ui/api/repository/gn4' +import { SelectionService } from '@geonetwork-ui/api/repository' import { Subject } from 'rxjs' const includes = [ diff --git a/apps/webcomponents/src/app/webcomponents.module.ts b/apps/webcomponents/src/app/webcomponents.module.ts index 70724fe5eb..9ada9f468b 100644 --- a/apps/webcomponents/src/app/webcomponents.module.ts +++ b/apps/webcomponents/src/app/webcomponents.module.ts @@ -33,7 +33,7 @@ import { GnDatasetViewChartComponent } from './components/gn-dataset-view-chart/ import { FeatureDatavizModule } from '@geonetwork-ui/feature/dataviz' import { FeatureAuthModule } from '@geonetwork-ui/feature/auth' import { BrowserAnimationsModule } from '@angular/platform-browser/animations' -import { provideGn4 } from '@geonetwork-ui/api/repository/gn4' +import { provideGn4 } from '@geonetwork-ui/api/repository' const CUSTOM_ELEMENTS: [new (...args) => BaseComponent, string][] = [ [GnFacetsComponent, 'gn-facets'], diff --git a/libs/api/repository/src/index.ts b/libs/api/repository/src/index.ts index f6b986adca..8c4750dff2 100644 --- a/libs/api/repository/src/index.ts +++ b/libs/api/repository/src/index.ts @@ -1,2 +1,3 @@ export * from './lib/metadata-language' export * from './lib/repository-url' +export * from './lib/gn4' diff --git a/libs/feature/auth/src/lib/feature-auth.module.ts b/libs/feature/auth/src/lib/feature-auth.module.ts index ab533507c8..c0276af077 100644 --- a/libs/feature/auth/src/lib/feature-auth.module.ts +++ b/libs/feature/auth/src/lib/feature-auth.module.ts @@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common' import { AvatarServiceInterface, GravatarService, -} from '@geonetwork-ui/api/repository/gn4' +} from '@geonetwork-ui/api/repository' @NgModule({ imports: [CommonModule], diff --git a/libs/feature/catalog/src/lib/feature-catalog.module.ts b/libs/feature/catalog/src/lib/feature-catalog.module.ts index 91862c7f73..c3f2fd8265 100644 --- a/libs/feature/catalog/src/lib/feature-catalog.module.ts +++ b/libs/feature/catalog/src/lib/feature-catalog.module.ts @@ -20,7 +20,7 @@ import { OrganizationsFromGroupsService, OrganizationsFromMetadataService, OrganizationsStrategy, -} from '@geonetwork-ui/api/repository/gn4' +} from '@geonetwork-ui/api/repository' import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform.service.interface' // expects the replacement key ${name} diff --git a/libs/feature/catalog/src/lib/my-org/my-org.service.spec.ts b/libs/feature/catalog/src/lib/my-org/my-org.service.spec.ts index 824c64f1b0..d2c2624682 100644 --- a/libs/feature/catalog/src/lib/my-org/my-org.service.spec.ts +++ b/libs/feature/catalog/src/lib/my-org/my-org.service.spec.ts @@ -1,6 +1,6 @@ import { TestBed } from '@angular/core/testing' import { MyOrgService } from './my-org.service' -import { AvatarServiceInterface } from '@geonetwork-ui/api/repository/gn4' +import { AvatarServiceInterface } from '@geonetwork-ui/api/repository' import { OrganizationsServiceInterface } from '@geonetwork-ui/common/domain/organizations.service.interface' import { BehaviorSubject, of } from 'rxjs' import { UserApiModel } from '@geonetwork-ui/data-access/gn4' diff --git a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.spec.ts b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.spec.ts index c123fe48ff..b360a4b617 100644 --- a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.spec.ts +++ b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.spec.ts @@ -7,7 +7,7 @@ import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core' import { TranslateModule, TranslateService } from '@ngx-translate/core' import tippy from 'tippy.js' import { DATASET_RECORDS } from '@geonetwork-ui/common/fixtures' -import { FavoritesService } from '@geonetwork-ui/api/repository/gn4' +import { FavoritesService } from '@geonetwork-ui/api/repository' import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform.service.interface' tippy = jest.fn() diff --git a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts index ddc2b9186a..2e980bc15e 100644 --- a/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts +++ b/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts @@ -14,10 +14,7 @@ import { TranslateService } from '@ngx-translate/core' import { StarToggleComponent } from '@geonetwork-ui/ui/inputs' import { Observable, Subscription } from 'rxjs' import { CatalogRecord } from '@geonetwork-ui/common/domain/model/record' -import { - AuthService, - FavoritesService, -} from '@geonetwork-ui/api/repository/gn4' +import { AuthService, FavoritesService } from '@geonetwork-ui/api/repository' import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform.service.interface' @Component({ diff --git a/libs/feature/search/src/lib/feature-search.module.ts b/libs/feature/search/src/lib/feature-search.module.ts index 92203f0904..4252429bfe 100644 --- a/libs/feature/search/src/lib/feature-search.module.ts +++ b/libs/feature/search/src/lib/feature-search.module.ts @@ -23,7 +23,7 @@ import { FilterDropdownComponent } from './filter-dropdown/filter-dropdown.compo import { Geometry } from 'geojson' import { UiWidgetsModule } from '@geonetwork-ui/ui/widgets' import { RecordsRepositoryInterface } from '@geonetwork-ui/common/domain/repository/records-repository.interface' -import { Gn4Repository } from '@geonetwork-ui/api/repository/gn4' +import { Gn4Repository } from '@geonetwork-ui/api/repository' // this geometry will be used to filter & boost results accordingly export const FILTER_GEOMETRY = new InjectionToken>( diff --git a/libs/feature/search/src/lib/state/effects.spec.ts b/libs/feature/search/src/lib/state/effects.spec.ts index 6ac2e6a211..218190d26a 100644 --- a/libs/feature/search/src/lib/state/effects.spec.ts +++ b/libs/feature/search/src/lib/state/effects.spec.ts @@ -45,7 +45,7 @@ import { delay } from 'rxjs/operators' import { FILTER_GEOMETRY } from '../feature-search.module' import { RecordsRepositoryInterface } from '@geonetwork-ui/common/domain/repository/records-repository.interface' import { TestScheduler } from 'rxjs/internal/testing/TestScheduler' -import { FavoritesService } from '@geonetwork-ui/api/repository/gn4' +import { FavoritesService } from '@geonetwork-ui/api/repository' import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform.service.interface' const defaultSearchState = initialState[DEFAULT_SEARCH_KEY] diff --git a/libs/feature/search/src/lib/state/effects.ts b/libs/feature/search/src/lib/state/effects.ts index e649346dab..5c411efce4 100644 --- a/libs/feature/search/src/lib/state/effects.ts +++ b/libs/feature/search/src/lib/state/effects.ts @@ -43,7 +43,7 @@ import { switchMapWithSearchId } from '../utils/operators/search.operator' import { Geometry } from 'geojson' import { FILTER_GEOMETRY } from '../feature-search.module' import { RecordsRepositoryInterface } from '@geonetwork-ui/common/domain/repository/records-repository.interface' -import { FavoritesService } from '@geonetwork-ui/api/repository/gn4' +import { FavoritesService } from '@geonetwork-ui/api/repository' import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform.service.interface' import { valid as validGeoJson } from 'geojson-validation' diff --git a/libs/feature/search/src/lib/utils/service/fields.service.spec.ts b/libs/feature/search/src/lib/utils/service/fields.service.spec.ts index ef0cb50883..f3d7b8bb65 100644 --- a/libs/feature/search/src/lib/utils/service/fields.service.spec.ts +++ b/libs/feature/search/src/lib/utils/service/fields.service.spec.ts @@ -5,7 +5,7 @@ import { ToolsApiService } from '@geonetwork-ui/data-access/gn4' import { TranslateModule } from '@ngx-translate/core' import { OrganizationsServiceInterface } from '@geonetwork-ui/common/domain/organizations.service.interface' import { RecordsRepositoryInterface } from '@geonetwork-ui/common/domain/repository/records-repository.interface' -import { ElasticsearchService } from '@geonetwork-ui/api/repository/gn4' +import { ElasticsearchService } from '@geonetwork-ui/api/repository' import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform.service.interface' class RecordsRepositoryMock { diff --git a/libs/feature/search/src/lib/utils/service/fields.spec.ts b/libs/feature/search/src/lib/utils/service/fields.spec.ts index 4eb951fb92..2ceba5d88d 100644 --- a/libs/feature/search/src/lib/utils/service/fields.spec.ts +++ b/libs/feature/search/src/lib/utils/service/fields.spec.ts @@ -14,7 +14,7 @@ import { Injector } from '@angular/core' import { TranslateModule, TranslateService } from '@ngx-translate/core' import { OrganizationsServiceInterface } from '@geonetwork-ui/common/domain/organizations.service.interface' import { Organization } from '@geonetwork-ui/common/domain/model/record' -import { ElasticsearchService } from '@geonetwork-ui/api/repository/gn4' +import { ElasticsearchService } from '@geonetwork-ui/api/repository' import { RecordsRepositoryInterface } from '@geonetwork-ui/common/domain/repository/records-repository.interface' import { PlatformServiceInterface } from '@geonetwork-ui/common/domain/platform.service.interface' diff --git a/libs/feature/search/src/lib/utils/service/fields.ts b/libs/feature/search/src/lib/utils/service/fields.ts index 620816003d..ff980ea141 100644 --- a/libs/feature/search/src/lib/utils/service/fields.ts +++ b/libs/feature/search/src/lib/utils/service/fields.ts @@ -13,7 +13,7 @@ import { FieldFilters, TermBucket, } from '@geonetwork-ui/common/domain/model/search' -import { ElasticsearchService } from '@geonetwork-ui/api/repository/gn4' +import { ElasticsearchService } from '@geonetwork-ui/api/repository' import { LangService } from '@geonetwork-ui/util/i18n' export type FieldValue = string | number From 705f3a7b27a588971cca8bc5351bf9f45f7e56d3 Mon Sep 17 00:00:00 2001 From: Florent Gravin Date: Thu, 11 Jan 2024 17:23:44 +0100 Subject: [PATCH 2/2] chore: add .nx cache in .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ebec0465d8..4b3c69c714 100644 --- a/.gitignore +++ b/.gitignore @@ -43,6 +43,7 @@ testem.log Thumbs.db .angular +.nx docs/.vitepress/dist docs/.vitepress/cache