geonetwork-ui 2.2.0-dev.5b8d393f → 2.2.0-dev.6695ae4d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +42 -51
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.mjs +4 -3
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/converter.mjs +16 -11
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +23 -16
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +21 -18
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/search/aggregation.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/search/field.model.mjs +2 -0
- package/esm2022/libs/common/domain/src/lib/model/search/filter.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/search/index.mjs +2 -1
- package/esm2022/libs/common/domain/src/lib/model/search/search.model.mjs +1 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +2 -2
- package/esm2022/libs/feature/search/src/index.mjs +3 -1
- package/esm2022/libs/feature/search/src/lib/feature-search.module.mjs +2 -6
- package/esm2022/libs/feature/search/src/lib/filter-geometry.token.mjs +4 -0
- package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +7 -3
- package/esm2022/libs/feature/search/src/lib/record-url.token.mjs +4 -0
- package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +2 -2
- package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +3 -4
- package/esm2022/libs/feature/search/src/lib/state/effects.mjs +2 -2
- package/esm2022/libs/feature/search/src/lib/state/search.facade.mjs +3 -2
- package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +2 -2
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +35 -22
- package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +9 -6
- package/esm2022/libs/util/i18n/src/index.mjs +1 -2
- package/esm2022/translations/de.json +5 -4
- package/esm2022/translations/en.json +8 -7
- package/esm2022/translations/es.json +5 -4
- package/esm2022/translations/fr.json +7 -6
- package/esm2022/translations/it.json +7 -6
- package/esm2022/translations/nl.json +5 -4
- package/esm2022/translations/pt.json +5 -4
- package/fesm2022/geonetwork-ui.mjs +193 -286
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts +0 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/converter.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +5 -4
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +3 -2
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +5 -10
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/search/aggregation.model.d.ts +1 -1
- package/libs/common/domain/src/lib/model/search/aggregation.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/search/field.model.d.ts +2 -0
- package/libs/common/domain/src/lib/model/search/field.model.d.ts.map +1 -0
- package/libs/common/domain/src/lib/model/search/filter.model.d.ts +1 -1
- package/libs/common/domain/src/lib/model/search/filter.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/search/index.d.ts +1 -0
- package/libs/common/domain/src/lib/model/search/index.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/search/search.model.d.ts +1 -1
- package/libs/common/domain/src/lib/model/search/search.model.d.ts.map +1 -1
- package/libs/feature/search/src/index.d.ts +2 -0
- package/libs/feature/search/src/index.d.ts.map +1 -1
- package/libs/feature/search/src/lib/feature-search.module.d.ts +0 -4
- package/libs/feature/search/src/lib/feature-search.module.d.ts.map +1 -1
- package/libs/feature/search/src/lib/filter-geometry.token.d.ts +4 -0
- package/libs/feature/search/src/lib/filter-geometry.token.d.ts.map +1 -0
- package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts +1 -1
- package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/record-url.token.d.ts +3 -0
- package/libs/feature/search/src/lib/record-url.token.d.ts.map +1 -0
- package/libs/feature/search/src/lib/results-table/results-table.component.d.ts +0 -1
- package/libs/feature/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/state/search.facade.d.ts +1 -1
- package/libs/feature/search/src/lib/state/search.facade.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +7 -3
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +3 -1
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
- package/libs/util/i18n/src/index.d.ts +0 -1
- package/libs/util/i18n/src/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +6 -6
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +5 -3
- package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +22 -4
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +69 -65
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.ts +3 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/converter.ts +19 -12
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +62 -43
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +91 -59
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +5 -11
- package/src/libs/common/domain/src/lib/model/search/aggregation.model.ts +1 -1
- package/src/libs/common/domain/src/lib/model/search/field.model.ts +1 -0
- package/src/libs/common/domain/src/lib/model/search/filter.model.ts +1 -1
- package/src/libs/common/domain/src/lib/model/search/index.ts +1 -0
- package/src/libs/common/domain/src/lib/model/search/search.model.ts +1 -1
- package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +1 -1
- package/src/libs/feature/search/src/index.ts +2 -0
- package/src/libs/feature/search/src/lib/feature-search.module.ts +1 -10
- package/src/libs/feature/search/src/lib/filter-geometry.token.ts +7 -0
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.ts +9 -3
- package/src/libs/feature/search/src/lib/record-url.token.ts +4 -0
- package/src/libs/feature/search/src/lib/results-list/results-list.container.component.ts +1 -1
- package/src/libs/feature/search/src/lib/results-table/results-table.component.html +104 -127
- package/src/libs/feature/search/src/lib/results-table/results-table.component.ts +0 -1
- package/src/libs/feature/search/src/lib/state/effects.ts +1 -1
- package/src/libs/feature/search/src/lib/state/search.facade.ts +2 -1
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.css +2 -2
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +45 -18
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +31 -12
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +5 -5
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +12 -4
- package/src/libs/util/i18n/src/index.ts +0 -1
- package/translations/de.json +5 -4
- package/translations/en.json +8 -7
- package/translations/es.json +5 -4
- package/translations/fr.json +7 -6
- package/translations/it.json +7 -6
- package/translations/nl.json +5 -4
- package/translations/pt.json +5 -4
- package/translations/sk.json +5 -4
- package/esm2022/libs/util/i18n/src/lib/testing/test.translate.loader.mjs +0 -24
- package/esm2022/libs/util/i18n/src/lib/testing/test.translate.module.mjs +0 -109
- package/esm2022/libs/util/i18n/src/lib/testing/translations.model.mjs +0 -6
- package/libs/util/i18n/src/lib/testing/test.translate.loader.d.ts +0 -17
- package/libs/util/i18n/src/lib/testing/test.translate.loader.d.ts.map +0 -1
- package/libs/util/i18n/src/lib/testing/test.translate.module.d.ts +0 -131
- package/libs/util/i18n/src/lib/testing/test.translate.module.d.ts.map +0 -1
- package/libs/util/i18n/src/lib/testing/translations.model.d.ts +0 -21
- package/libs/util/i18n/src/lib/testing/translations.model.d.ts.map +0 -1
- package/src/libs/util/i18n/src/lib/testing/test.translate.loader.ts +0 -26
- package/src/libs/util/i18n/src/lib/testing/test.translate.module.ts +0 -235
- package/src/libs/util/i18n/src/lib/testing/translations.model.ts +0 -28
|
@@ -48,13 +48,7 @@ export const RecordStatusValues = [
|
|
|
48
48
|
]
|
|
49
49
|
export type RecordStatus = typeof RecordStatusValues[number]
|
|
50
50
|
|
|
51
|
-
export type
|
|
52
|
-
export interface AccessConstraint {
|
|
53
|
-
text: string
|
|
54
|
-
type: AccessConstraintType
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export type License = {
|
|
51
|
+
export type Constraint = {
|
|
58
52
|
text: string
|
|
59
53
|
url?: URL
|
|
60
54
|
}
|
|
@@ -77,10 +71,10 @@ export interface BaseRecord {
|
|
|
77
71
|
kind: RecordKind
|
|
78
72
|
themes: Array<string> // TODO: handle codelists
|
|
79
73
|
keywords: Array<string> // TODO: handle thesaurus and id
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
74
|
+
licenses: Array<Constraint>
|
|
75
|
+
legalConstraints: Array<Constraint>
|
|
76
|
+
securityConstraints: Array<Constraint>
|
|
77
|
+
otherConstraints: Array<Constraint>
|
|
84
78
|
overviews: Array<GraphicOverview>
|
|
85
79
|
extras?: Record<string, unknown>
|
|
86
80
|
landingPage?: URL
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type FieldName = string
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FieldFilters } from './filter.model'
|
|
2
2
|
import { CatalogRecord } from '../record'
|
|
3
3
|
import { Geometry } from 'geojson'
|
|
4
|
+
import { FieldName } from './field.model'
|
|
4
5
|
|
|
5
6
|
export type FieldSort = ['desc' | 'asc', FieldName]
|
|
6
7
|
export type SortByField = FieldSort | FieldSort[] // several sort criteria can be used!
|
|
7
|
-
export type FieldName = string
|
|
8
8
|
|
|
9
9
|
export interface SearchParams {
|
|
10
10
|
filters?: FieldFilters
|
|
@@ -50,7 +50,7 @@ const mdViewReducer = createReducer(
|
|
|
50
50
|
chartConfig,
|
|
51
51
|
})),
|
|
52
52
|
on(MdViewActions.close, (state) => {
|
|
53
|
-
// eslint-disable-next-line
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
54
54
|
const { metadata, related, ...stateWithoutMd } = state
|
|
55
55
|
return stateWithoutMd
|
|
56
56
|
})
|
|
@@ -15,24 +15,15 @@ import { initialState, reducer, SEARCH_FEATURE_KEY } from './state/reducer'
|
|
|
15
15
|
import { ResultsHitsContainerComponent } from './results-hits-number/results-hits.container.component'
|
|
16
16
|
import { SearchStateContainerDirective } from './state/container/search-state.container.directive'
|
|
17
17
|
import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
|
|
18
|
-
import {
|
|
18
|
+
import { NgModule } from '@angular/core'
|
|
19
19
|
import { UiElementsModule } from '../../../../../libs/ui/elements/src'
|
|
20
20
|
import { FavoriteStarComponent } from './favorites/favorite-star/favorite-star.component'
|
|
21
21
|
import { MatIconModule } from '@angular/material/icon'
|
|
22
22
|
import { FilterDropdownComponent } from './filter-dropdown/filter-dropdown.component'
|
|
23
|
-
import { Geometry } from 'geojson'
|
|
24
23
|
import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
|
|
25
24
|
import { RecordsRepositoryInterface } from '../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
|
|
26
25
|
import { Gn4Repository } from '../../../../../libs/api/repository/src'
|
|
27
26
|
|
|
28
|
-
// this geometry will be used to filter & boost results accordingly
|
|
29
|
-
export const FILTER_GEOMETRY = new InjectionToken<Promise<Geometry>>(
|
|
30
|
-
'filter-geometry'
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
// expects the replacement key ${uuid}
|
|
34
|
-
export const RECORD_URL_TOKEN = new InjectionToken<string>('record-url-token')
|
|
35
|
-
|
|
36
27
|
@NgModule({
|
|
37
28
|
declarations: [
|
|
38
29
|
SortByComponent,
|
|
@@ -11,12 +11,13 @@ import {
|
|
|
11
11
|
AutocompleteComponent,
|
|
12
12
|
AutocompleteItem,
|
|
13
13
|
} from '../../../../../../libs/ui/inputs/src'
|
|
14
|
-
import { Observable } from 'rxjs'
|
|
14
|
+
import { Observable, firstValueFrom } from 'rxjs'
|
|
15
15
|
import { map } from 'rxjs/operators'
|
|
16
16
|
import { SearchFacade } from '../state/search.facade'
|
|
17
17
|
import { SearchService } from '../utils/service/search.service'
|
|
18
18
|
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
19
19
|
import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
|
|
20
|
+
import { SearchFilters } from '../../../../../../libs/api/metadata-converter/src'
|
|
20
21
|
|
|
21
22
|
@Component({
|
|
22
23
|
selector: 'gn-ui-fuzzy-search',
|
|
@@ -75,7 +76,12 @@ export class FuzzySearchComponent implements OnInit {
|
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
handleInputCleared() {
|
|
79
|
-
|
|
79
|
+
async handleInputCleared() {
|
|
80
|
+
const currentSearchFilters: SearchFilters = await firstValueFrom(
|
|
81
|
+
this.searchFacade.searchFilters$
|
|
82
|
+
)
|
|
83
|
+
if (currentSearchFilters.any) {
|
|
84
|
+
this.searchService.updateFilters({ any: '' })
|
|
85
|
+
}
|
|
80
86
|
}
|
|
81
87
|
}
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
ResultsLayoutConfigItem,
|
|
18
18
|
ResultsLayoutConfigModel,
|
|
19
19
|
} from '../../../../../../libs/ui/search/src'
|
|
20
|
-
import { RECORD_URL_TOKEN } from '../
|
|
20
|
+
import { RECORD_URL_TOKEN } from '../record-url.token'
|
|
21
21
|
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
22
22
|
|
|
23
23
|
export type ResultsListShowMoreStrategy = 'auto' | 'button' | 'none'
|
|
@@ -1,135 +1,112 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
<gn-ui-interactive-table
|
|
2
|
+
[items]="records$ | async"
|
|
3
|
+
(itemClick)="handleRecordClick($event)"
|
|
4
|
+
>
|
|
5
|
+
<!-- SELECTED COLUMN -->
|
|
6
|
+
<gn-ui-interactive-table-column>
|
|
7
|
+
<ng-template #header>
|
|
8
|
+
<gn-ui-checkbox
|
|
9
|
+
[checked]="isAllSelected() | async"
|
|
10
|
+
[indeterminate]="isSomeSelected() | async"
|
|
11
|
+
(changed)="toggleSelectAll()"
|
|
12
|
+
type="default"
|
|
13
|
+
class="-m-2 mr-3"
|
|
14
|
+
>
|
|
15
|
+
</gn-ui-checkbox>
|
|
16
|
+
</ng-template>
|
|
17
|
+
<ng-template #cell let-item>
|
|
18
|
+
<gn-ui-checkbox
|
|
19
|
+
[checked]="isChecked(item) | async"
|
|
20
|
+
(changed)="handleRecordSelectedChange($event, item)"
|
|
21
|
+
class="-m-2"
|
|
22
|
+
type="default"
|
|
23
|
+
></gn-ui-checkbox>
|
|
24
|
+
</ng-template>
|
|
25
|
+
</gn-ui-interactive-table-column>
|
|
22
26
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
<!-- TITLE COLUMN -->
|
|
28
|
+
<gn-ui-interactive-table-column
|
|
29
|
+
[sortable]="true"
|
|
30
|
+
[activeSort]="isSortedBy('resourceTitleObject.default.keyword') | async"
|
|
31
|
+
(sortChange)="setSortBy('resourceTitleObject.default.keyword', $event)"
|
|
26
32
|
>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
type="default"
|
|
35
|
-
class="-m-2 mr-3"
|
|
36
|
-
>
|
|
37
|
-
</gn-ui-checkbox>
|
|
38
|
-
</ng-template>
|
|
39
|
-
<ng-template #cell let-item>
|
|
40
|
-
<gn-ui-checkbox
|
|
41
|
-
[checked]="isChecked(item) | async"
|
|
42
|
-
(changed)="handleRecordSelectedChange($event, item)"
|
|
43
|
-
class="-m-2"
|
|
44
|
-
type="default"
|
|
45
|
-
></gn-ui-checkbox>
|
|
46
|
-
</ng-template>
|
|
47
|
-
</gn-ui-interactive-table-column>
|
|
48
|
-
|
|
49
|
-
<!-- TITLE COLUMN -->
|
|
50
|
-
<gn-ui-interactive-table-column
|
|
51
|
-
[sortable]="true"
|
|
52
|
-
[activeSort]="isSortedBy('resourceTitleObject.default.keyword') | async"
|
|
53
|
-
(sortChange)="setSortBy('resourceTitleObject.default.keyword', $event)"
|
|
54
|
-
>
|
|
55
|
-
<ng-template #header>
|
|
56
|
-
<span translate>record.metadata.title</span>
|
|
57
|
-
</ng-template>
|
|
58
|
-
<ng-template #cell let-item>
|
|
59
|
-
{{ item.title }}
|
|
60
|
-
</ng-template>
|
|
61
|
-
</gn-ui-interactive-table-column>
|
|
33
|
+
<ng-template #header>
|
|
34
|
+
<span translate>record.metadata.title</span>
|
|
35
|
+
</ng-template>
|
|
36
|
+
<ng-template #cell let-item>
|
|
37
|
+
{{ item.title }}
|
|
38
|
+
</ng-template>
|
|
39
|
+
</gn-ui-interactive-table-column>
|
|
62
40
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
41
|
+
<!-- FORMATS COLUMN -->
|
|
42
|
+
<gn-ui-interactive-table-column>
|
|
43
|
+
<ng-template #header>
|
|
44
|
+
<span translate>record.metadata.formats</span>
|
|
45
|
+
</ng-template>
|
|
46
|
+
<ng-template #cell let-item>
|
|
47
|
+
<div
|
|
48
|
+
class="flex justify-start items-center gap-2"
|
|
49
|
+
*ngIf="getRecordFormats(item) as formats"
|
|
50
|
+
[title]="formats.join(', ')"
|
|
51
|
+
>
|
|
52
|
+
<span
|
|
53
|
+
class="badge-btn min-w-[45px] text-sm text-white px-2 flex-shrink-0"
|
|
54
|
+
[style.background-color]="getBadgeColor(formats[0])"
|
|
55
|
+
*ngIf="formats[0]"
|
|
56
|
+
>
|
|
57
|
+
{{ formats[0] }}
|
|
58
|
+
</span>
|
|
59
|
+
<span
|
|
60
|
+
class="badge-btn min-w-[45px] text-sm text-white px-2 flex-shrink-0"
|
|
61
|
+
[style.background-color]="getBadgeColor(formats[1])"
|
|
62
|
+
*ngIf="formats[1]"
|
|
73
63
|
>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
>
|
|
79
|
-
{{ formats[0] }}
|
|
80
|
-
</span>
|
|
81
|
-
<span
|
|
82
|
-
class="badge-btn min-w-[45px] text-sm text-white px-2 flex-shrink-0"
|
|
83
|
-
[style.background-color]="getBadgeColor(formats[1])"
|
|
84
|
-
*ngIf="formats[1]"
|
|
85
|
-
>
|
|
86
|
-
{{ formats[1] }}
|
|
87
|
-
</span>
|
|
88
|
-
<div class="flex-shrink-0" *ngIf="formats.slice(2).length > 0">
|
|
89
|
-
<span>+{{ formats.slice(2).length }}</span>
|
|
90
|
-
</div>
|
|
64
|
+
{{ formats[1] }}
|
|
65
|
+
</span>
|
|
66
|
+
<div class="flex-shrink-0" *ngIf="formats.slice(2).length > 0">
|
|
67
|
+
<span>+{{ formats.slice(2).length }}</span>
|
|
91
68
|
</div>
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
</
|
|
69
|
+
</div>
|
|
70
|
+
<div *ngIf="!getRecordFormats(item)"></div>
|
|
71
|
+
</ng-template>
|
|
72
|
+
</gn-ui-interactive-table-column>
|
|
95
73
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
74
|
+
<!-- OWNER COLUMN -->
|
|
75
|
+
<gn-ui-interactive-table-column
|
|
76
|
+
[sortable]="true"
|
|
77
|
+
[activeSort]="isSortedBy('recordOwner') | async"
|
|
78
|
+
(sortChange)="setSortBy('recordOwner', $event)"
|
|
79
|
+
>
|
|
80
|
+
<ng-template #header>
|
|
81
|
+
<span translate>record.metadata.author</span>
|
|
82
|
+
</ng-template>
|
|
83
|
+
<ng-template #cell let-item>
|
|
84
|
+
<mat-icon class="material-symbols-outlined">person</mat-icon>
|
|
85
|
+
<span>{{ formatUserInfo(item.extras?.ownerInfo) }}</span>
|
|
86
|
+
</ng-template>
|
|
87
|
+
</gn-ui-interactive-table-column>
|
|
110
88
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
89
|
+
<!-- STATUS COLUMN -->
|
|
90
|
+
<gn-ui-interactive-table-column>
|
|
91
|
+
<ng-template #header>
|
|
92
|
+
<span translate>record.metadata.status</span>
|
|
93
|
+
</ng-template>
|
|
94
|
+
<ng-template #cell let-item>
|
|
95
|
+
{{ item.status }}
|
|
96
|
+
</ng-template>
|
|
97
|
+
</gn-ui-interactive-table-column>
|
|
120
98
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
</div>
|
|
99
|
+
<!-- UPDATE DATE COLUMN -->
|
|
100
|
+
<gn-ui-interactive-table-column
|
|
101
|
+
[sortable]="true"
|
|
102
|
+
[activeSort]="isSortedBy('changeDate') | async"
|
|
103
|
+
(sortChange)="setSortBy('changeDate', $event)"
|
|
104
|
+
>
|
|
105
|
+
<ng-template #header>
|
|
106
|
+
<span translate>record.metadata.updatedOn</span>
|
|
107
|
+
</ng-template>
|
|
108
|
+
<ng-template #cell let-item>
|
|
109
|
+
{{ dateToString(item.recordUpdated) }}
|
|
110
|
+
</ng-template>
|
|
111
|
+
</gn-ui-interactive-table-column>
|
|
112
|
+
</gn-ui-interactive-table>
|
|
@@ -39,7 +39,6 @@ export class ResultsTableComponent {
|
|
|
39
39
|
@Output() recordClick = new EventEmitter<CatalogRecord>()
|
|
40
40
|
|
|
41
41
|
records$ = this.searchFacade.results$
|
|
42
|
-
recordCount$ = this.searchFacade.resultsHits$
|
|
43
42
|
selectedRecords$ = this.selectionService.selectedRecordsIdentifiers$
|
|
44
43
|
|
|
45
44
|
constructor(
|
|
@@ -41,7 +41,7 @@ import { getSearchStateSearch } from './selectors'
|
|
|
41
41
|
import { HttpErrorResponse } from '@angular/common/http'
|
|
42
42
|
import { switchMapWithSearchId } from '../utils/operators/search.operator'
|
|
43
43
|
import { Geometry } from 'geojson'
|
|
44
|
-
import { FILTER_GEOMETRY } from '../
|
|
44
|
+
import { FILTER_GEOMETRY } from '../filter-geometry.token'
|
|
45
45
|
import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
|
|
46
46
|
import { FavoritesService } from '../../../../../../libs/api/repository/src'
|
|
47
47
|
import { PlatformServiceInterface } from '../../../../../../libs/common/domain/src/lib/platform.service.interface'
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
isEndOfResults,
|
|
41
41
|
totalPages,
|
|
42
42
|
} from './selectors'
|
|
43
|
-
import { FILTER_GEOMETRY } from '../
|
|
43
|
+
import { FILTER_GEOMETRY } from '../filter-geometry.token'
|
|
44
44
|
import { Geometry } from 'geojson'
|
|
45
45
|
import { catchError, map, shareReplay } from 'rxjs/operators'
|
|
46
46
|
import {
|
|
@@ -215,5 +215,6 @@ export class SearchFacade {
|
|
|
215
215
|
this.store.dispatch(new SetFilters({}, this.searchId))
|
|
216
216
|
this.store.dispatch(new SetSortBy([], this.searchId))
|
|
217
217
|
this.store.dispatch(new SetFavoritesOnly(false, this.searchId))
|
|
218
|
+
return this
|
|
218
219
|
}
|
|
219
220
|
}
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
margin-top: 0;
|
|
75
75
|
margin-bottom: 10px;
|
|
76
76
|
color: var(--color-primary) !important;
|
|
77
|
-
text-decoration: none
|
|
78
|
-
@apply font-bold;
|
|
77
|
+
text-decoration: none;
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
:host ::ng-deep .markdown-body p > a:hover {
|
|
82
81
|
color: var(--color-primary-darker) !important;
|
|
82
|
+
@apply underline;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/** Blockquotes **/
|
|
@@ -10,6 +10,50 @@
|
|
|
10
10
|
</gn-ui-content-ghost>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
13
|
+
<gn-ui-expandable-panel [title]="'record.metadata.usage' | translate">
|
|
14
|
+
<div class="flex flex-col gap-[10px] mr-4 py-[12px] rounded text-gray-900">
|
|
15
|
+
<ng-container *ngFor="let license of licenses">
|
|
16
|
+
<div *ngIf="license.url; else noUrl" class="text-primary">
|
|
17
|
+
<a
|
|
18
|
+
[href]="license.url"
|
|
19
|
+
target="_blank"
|
|
20
|
+
class="cursor-pointer hover:underline transition-all"
|
|
21
|
+
>
|
|
22
|
+
{{ license.text }}
|
|
23
|
+
<mat-icon
|
|
24
|
+
class="material-symbols-outlined !w-[12px] !h-[12px] !text-[12px] opacity-75 shrink-0"
|
|
25
|
+
>open_in_new</mat-icon
|
|
26
|
+
>
|
|
27
|
+
</a>
|
|
28
|
+
</div>
|
|
29
|
+
<ng-template #noUrl>
|
|
30
|
+
<div class="text-primary" gnUiLinkify>
|
|
31
|
+
{{ license.text }}
|
|
32
|
+
</div>
|
|
33
|
+
</ng-template>
|
|
34
|
+
</ng-container>
|
|
35
|
+
<ng-container *ngIf="legalConstraints.length">
|
|
36
|
+
<gn-ui-markdown-parser
|
|
37
|
+
*ngFor="let constraint of legalConstraints"
|
|
38
|
+
[textContent]="constraint"
|
|
39
|
+
>
|
|
40
|
+
</gn-ui-markdown-parser>
|
|
41
|
+
</ng-container>
|
|
42
|
+
<ng-container *ngIf="otherConstraints.length">
|
|
43
|
+
<div gnUiLinkify *ngFor="let constraint of otherConstraints">
|
|
44
|
+
<h5 translate class="font-medium text-black text-sm mb-[2px] mt-[16px]">
|
|
45
|
+
record.metadata.otherConstraints
|
|
46
|
+
</h5>
|
|
47
|
+
<gn-ui-markdown-parser [textContent]="constraint">
|
|
48
|
+
</gn-ui-markdown-parser>
|
|
49
|
+
</div>
|
|
50
|
+
</ng-container>
|
|
51
|
+
|
|
52
|
+
<span class="noUsage" *ngIf="!hasUsage">
|
|
53
|
+
{{ 'record.metadata.noUsage' | translate }}
|
|
54
|
+
</span>
|
|
55
|
+
</div>
|
|
56
|
+
</gn-ui-expandable-panel>
|
|
13
57
|
<gn-ui-expandable-panel
|
|
14
58
|
class="metadata-origin"
|
|
15
59
|
*ngIf="
|
|
@@ -22,7 +66,7 @@
|
|
|
22
66
|
>
|
|
23
67
|
<p
|
|
24
68
|
*ngIf="metadata.lineage"
|
|
25
|
-
class="mb-5 pt-4 whitespace-pre-line break-words"
|
|
69
|
+
class="mb-5 pt-4 whitespace-pre-line break-words text-gray-900"
|
|
26
70
|
gnUiLinkify
|
|
27
71
|
>
|
|
28
72
|
{{ metadata.lineage }}
|
|
@@ -54,23 +98,6 @@
|
|
|
54
98
|
</div>
|
|
55
99
|
</div>
|
|
56
100
|
</gn-ui-expandable-panel>
|
|
57
|
-
<gn-ui-expandable-panel [title]="'record.metadata.usage' | translate">
|
|
58
|
-
<div class="py-4 px-6 rounded bg-gray-100 text-gray-700 flex flex-wrap gap-2">
|
|
59
|
-
<gn-ui-badge *ngIf="metadata.extras?.isOpenData">
|
|
60
|
-
<span translate>record.metadata.isOpenData</span>
|
|
61
|
-
</gn-ui-badge>
|
|
62
|
-
<span
|
|
63
|
-
class="text-primary font-medium"
|
|
64
|
-
*ngFor="let usage of usages"
|
|
65
|
-
gnUiLinkify
|
|
66
|
-
>
|
|
67
|
-
{{ usage }}
|
|
68
|
-
</span>
|
|
69
|
-
<span class="text-primary font-medium noUsage" *ngIf="!hasUsage">
|
|
70
|
-
{{ 'record.metadata.noUsage' | translate }}
|
|
71
|
-
</span>
|
|
72
|
-
</div>
|
|
73
|
-
</gn-ui-expandable-panel>
|
|
74
101
|
<gn-ui-expandable-panel
|
|
75
102
|
*ngIf="metadata.landingPage"
|
|
76
103
|
[title]="'record.metadata.details' | translate"
|
|
@@ -22,18 +22,42 @@ export class MetadataInfoComponent {
|
|
|
22
22
|
get hasUsage() {
|
|
23
23
|
return (
|
|
24
24
|
this.metadata.extras?.isOpenData === true ||
|
|
25
|
-
this.metadata.
|
|
26
|
-
|
|
25
|
+
(this.metadata.legalConstraints?.length > 0 &&
|
|
26
|
+
this.legalConstraints.length > 0) ||
|
|
27
|
+
(this.metadata.otherConstraints?.length > 0 &&
|
|
28
|
+
this.otherConstraints.length > 0) ||
|
|
29
|
+
(this.metadata.licenses?.length > 0 && this.licenses.length > 0)
|
|
27
30
|
)
|
|
28
31
|
}
|
|
29
32
|
|
|
30
|
-
get
|
|
33
|
+
get legalConstraints() {
|
|
31
34
|
let array = []
|
|
32
|
-
if (this.metadata.
|
|
33
|
-
array = array.concat(
|
|
35
|
+
if (this.metadata.legalConstraints?.length) {
|
|
36
|
+
array = array.concat(
|
|
37
|
+
this.metadata.legalConstraints.filter((c) => c.text).map((c) => c.text)
|
|
38
|
+
)
|
|
34
39
|
}
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
return array
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
get otherConstraints() {
|
|
44
|
+
let array = []
|
|
45
|
+
if (this.metadata.otherConstraints?.length) {
|
|
46
|
+
array = array.concat(
|
|
47
|
+
this.metadata.otherConstraints.filter((c) => c.text).map((c) => c.text)
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
return array
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
get licenses(): { text: string; url: string }[] {
|
|
54
|
+
let array = []
|
|
55
|
+
if (this.metadata.licenses?.length) {
|
|
56
|
+
array = array.concat(
|
|
57
|
+
this.metadata.licenses
|
|
58
|
+
.filter((c) => c.text)
|
|
59
|
+
.map((c) => ({ text: c.text, url: c.url }))
|
|
60
|
+
)
|
|
37
61
|
}
|
|
38
62
|
return array
|
|
39
63
|
}
|
|
@@ -56,9 +80,4 @@ export class MetadataInfoComponent {
|
|
|
56
80
|
onKeywordClick(keyword: string) {
|
|
57
81
|
this.keyword.emit(keyword)
|
|
58
82
|
}
|
|
59
|
-
|
|
60
|
-
copyText() {
|
|
61
|
-
navigator.clipboard.writeText(this.metadata.uniqueIdentifier)
|
|
62
|
-
;(event.target as HTMLElement).blur()
|
|
63
|
-
}
|
|
64
83
|
}
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
<div class="flex flex-row items-center gap-2">
|
|
20
20
|
<gn-ui-text-input
|
|
21
21
|
class="mr-2 w-20"
|
|
22
|
-
(
|
|
23
|
-
[value]="
|
|
22
|
+
(valueChange)="setLimit($event)"
|
|
23
|
+
[value]="displayLimit$ | async"
|
|
24
24
|
hint=""
|
|
25
25
|
>
|
|
26
26
|
</gn-ui-text-input>
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
<input
|
|
29
29
|
class="mr-2 cursor-pointer"
|
|
30
30
|
type="checkbox"
|
|
31
|
-
[checked]="
|
|
32
|
-
(change)="setLimit('')"
|
|
31
|
+
[checked]="noLimitChecked$ | async"
|
|
32
|
+
(change)="setLimit('-1')"
|
|
33
33
|
/>
|
|
34
34
|
<span class="text-sm" translate
|
|
35
35
|
>record.metadata.api.form.limit.all</span
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<gn-ui-text-input
|
|
43
43
|
class="w-20"
|
|
44
44
|
[value]="offset$ | async"
|
|
45
|
-
(
|
|
45
|
+
(valueChange)="setOffset($event)"
|
|
46
46
|
hint=""
|
|
47
47
|
>
|
|
48
48
|
</gn-ui-text-input>
|