Skip to content

Commit

Permalink
Merge pull request #612 from geonetwork/fix-wc
Browse files Browse the repository at this point in the history
Fix web components which rely on API version
  • Loading branch information
fgravin committed Sep 8, 2023
2 parents f07dda8 + a61361c commit f46783c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions apps/webcomponents/src/app/webcomponents.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import { FeatureMapModule } from '@geonetwork-ui/feature/map'
import { GnDatasetViewChartComponent } from './components/gn-dataset-view-chart/gn-dataset-view-chart.component'
import { FeatureDatavizModule } from '@geonetwork-ui/feature/dataviz'
import { EmbeddedTranslateLoader } from '@geonetwork-ui/util/i18n'
import { FeatureAuthModule } from '@geonetwork-ui/feature/auth'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'

const CUSTOM_ELEMENTS: [new (...args) => BaseComponent, string][] = [
[GnFacetsComponent, 'gn-facets'],
Expand Down Expand Up @@ -78,6 +80,8 @@ const CUSTOM_ELEMENTS: [new (...args) => BaseComponent, string][] = [
}),
MatIconModule,
FeatureDatavizModule,
FeatureAuthModule,
BrowserAnimationsModule,
],
providers: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,16 @@ interface IncompleteOrganization {
export class OrganizationsFromMetadataService
implements OrganizationsServiceInterface
{
geonetworkVersion$ = this.siteApiService.getSiteOrPortalDescription().pipe(
geonetworkVersion$ = of(true).pipe(
switchMap(() => this.siteApiService.getSiteOrPortalDescription()),
map((info) => info['system/platform/version']),
shareReplay(1)
)

private groups$: Observable<GroupApiModel[]> = this.groupsApiService
.getGroups()
.pipe(shareReplay())
private groups$: Observable<GroupApiModel[]> = of(true).pipe(
switchMap(() => this.groupsApiService.getGroups()),
shareReplay()
)
private organisationsAggs$: Observable<OrganizationAggsBucket[]> =
this.geonetworkVersion$.pipe(
switchMap((version) =>
Expand Down

0 comments on commit f46783c

Please sign in to comment.