geonetwork-ui 2.2.0-dev.6695ae4d → 2.2.0-dev.70a9dc16
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/atomic-operations.mjs +27 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +23 -11
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.mjs +4 -2
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.mjs +14 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/converter.mjs +12 -9
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +33 -8
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +31 -14
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +2 -2
- package/esm2022/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.mjs +10 -3
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +14 -5
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +33 -8
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
- package/esm2022/libs/feature/editor/src/index.mjs +6 -1
- package/esm2022/libs/feature/editor/src/lib/+state/editor.actions.mjs +8 -0
- package/esm2022/libs/feature/editor/src/lib/+state/editor.effects.mjs +26 -0
- package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +30 -0
- package/esm2022/libs/feature/editor/src/lib/+state/editor.models.mjs +2 -0
- package/esm2022/libs/feature/editor/src/lib/+state/editor.reducer.mjs +42 -0
- package/esm2022/libs/feature/editor/src/lib/+state/editor.selectors.mjs +13 -0
- package/esm2022/libs/feature/editor/src/lib/expressions.mjs +13 -0
- package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +16 -4
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +34 -0
- package/esm2022/libs/feature/editor/src/lib/models/fields.model.mjs +2 -0
- package/esm2022/libs/feature/editor/src/lib/record-form/record-form.component.mjs +15 -11
- package/esm2022/libs/feature/editor/src/lib/services/editor.service.mjs +22 -44
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.service.mjs +9 -1
- package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +13 -13
- package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +3 -3
- package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +41 -26
- package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +11 -9
- package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/max-lines/max-lines.component.mjs +5 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +19 -7
- package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +3 -4
- package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +4 -4
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +9 -9
- package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.component.mjs +4 -2
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.model.mjs +1 -1
- package/esm2022/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/text-area/text-area.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +6 -6
- package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
- package/esm2022/libs/util/i18n/src/lib/i18n.constants.mjs +18 -1
- package/esm2022/libs/util/shared/src/lib/utils/index.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/utils/temporal-extent-union.mjs +32 -0
- package/esm2022/translations/de.json +37 -27
- package/esm2022/translations/en.json +29 -19
- package/esm2022/translations/es.json +26 -16
- package/esm2022/translations/fr.json +47 -37
- package/esm2022/translations/it.json +41 -31
- package/esm2022/translations/nl.json +27 -17
- package/esm2022/translations/pt.json +26 -16
- package/fesm2022/geonetwork-ui.mjs +835 -409
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts +2 -0
- package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts.map +1 -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/gn4/types/metadata.model.d.ts +4 -5
- package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.d.ts +3 -0
- package/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.d.ts.map +1 -0
- 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 +3 -3
- 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 +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +9 -2
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +16 -2
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.d.ts +1 -0
- package/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/platform.service.interface.d.ts +1 -1
- package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
- package/libs/feature/editor/src/index.d.ts +5 -0
- package/libs/feature/editor/src/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.actions.d.ts +23 -0
- package/libs/feature/editor/src/lib/+state/editor.actions.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/+state/editor.effects.d.ts +15 -0
- package/libs/feature/editor/src/lib/+state/editor.effects.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +19 -0
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/+state/editor.models.d.ts +2 -0
- package/libs/feature/editor/src/lib/+state/editor.models.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/+state/editor.reducer.d.ts +18 -0
- package/libs/feature/editor/src/lib/+state/editor.reducer.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/+state/editor.selectors.d.ts +15 -0
- package/libs/feature/editor/src/lib/+state/editor.selectors.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/expressions.d.ts +4 -0
- package/libs/feature/editor/src/lib/expressions.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/feature-editor.module.d.ts +3 -1
- package/libs/feature/editor/src/lib/feature-editor.module.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts +3 -0
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/models/fields.model.d.ts +15 -0
- package/libs/feature/editor/src/lib/models/fields.model.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/record-form/record-form.component.d.ts +10 -5
- package/libs/feature/editor/src/lib/record-form/record-form.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/services/editor.service.d.ts +3 -13
- package/libs/feature/editor/src/lib/services/editor.service.d.ts.map +1 -1
- package/libs/feature/map/src/lib/map-context/map-context.service.d.ts +1 -0
- package/libs/feature/map/src/lib/map-context/map-context.service.d.ts.map +1 -1
- package/libs/feature/search/src/lib/utils/service/fields.d.ts +21 -8
- package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
- package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/max-lines/max-lines.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +9 -3
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +13 -13
- package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/form-field/form-field.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/form-field/form-field.model.d.ts +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field.model.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/text-area/text-area.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +40 -40
- package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts +1 -1
- package/libs/util/i18n/src/lib/i18n.constants.d.ts +17 -0
- package/libs/util/i18n/src/lib/i18n.constants.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/index.d.ts +1 -0
- package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts +5 -0
- package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/generic.records.ts +57 -2
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +52 -6
- package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +207 -20
- package/src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts +29 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +30 -11
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.ts +3 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +4 -5
- package/src/libs/api/metadata-converter/src/lib/iso19139/codelists/keyword.mapper.ts +16 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/converter.ts +11 -9
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +58 -20
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +86 -38
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +1 -1
- package/src/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.ts +22 -2
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +15 -4
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +47 -8
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +20 -3
- package/src/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.ts +1 -0
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +1 -4
- package/src/libs/common/fixtures/src/lib/elasticsearch/full-response.ts +1 -1
- package/src/libs/common/fixtures/src/lib/gn4/groups.fixtures.ts +1 -1
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +52 -10
- package/src/libs/feature/editor/src/index.ts +5 -0
- package/src/libs/feature/editor/src/lib/+state/editor.actions.ts +24 -0
- package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +49 -0
- package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +30 -0
- package/src/libs/feature/editor/src/lib/+state/editor.models.ts +1 -0
- package/src/libs/feature/editor/src/lib/+state/editor.reducer.ts +68 -0
- package/src/libs/feature/editor/src/lib/+state/editor.selectors.ts +39 -0
- package/src/libs/feature/editor/src/lib/expressions.ts +16 -0
- package/src/libs/feature/editor/src/lib/feature-editor.module.ts +11 -0
- package/src/libs/feature/editor/src/lib/fields.config.ts +35 -0
- package/src/libs/feature/editor/src/lib/models/fields.model.ts +29 -0
- package/src/libs/feature/editor/src/lib/record-form/record-form.component.html +9 -7
- package/src/libs/feature/editor/src/lib/record-form/record-form.component.ts +11 -5
- package/src/libs/feature/editor/src/lib/services/editor.service.ts +34 -73
- package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +10 -0
- package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts +12 -12
- package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +3 -4
- package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +21 -16
- package/src/libs/feature/search/src/lib/utils/service/fields.ts +43 -34
- package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +1 -1
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.css +5 -0
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +39 -0
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +58 -0
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts +1 -0
- package/src/libs/ui/elements/src/lib/max-lines/max-lines.component.html +5 -1
- package/src/libs/ui/elements/src/lib/max-lines/max-lines.component.ts +1 -0
- package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +1 -1
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +113 -25
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +20 -3
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.ts +2 -3
- package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.html +2 -2
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +1 -1
- package/src/libs/ui/inputs/src/lib/button/button.component.css +0 -5
- package/src/libs/ui/inputs/src/lib/button/button.component.html +0 -1
- package/src/libs/ui/inputs/src/lib/button/button.component.ts +7 -6
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +3 -1
- package/src/libs/ui/inputs/src/lib/form-field/form-field.component.ts +3 -1
- package/src/libs/ui/inputs/src/lib/form-field/form-field.model.ts +0 -1
- package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.css +3 -0
- package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/text-area/text-area.component.ts +1 -0
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +2 -2
- package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +1 -0
- package/src/libs/util/i18n/src/lib/i18n.constants.ts +18 -0
- package/src/libs/util/shared/src/lib/utils/index.ts +1 -0
- package/src/libs/util/shared/src/lib/utils/temporal-extent-union.ts +32 -0
- package/tailwind.base.css +44 -15
- package/translations/de.json +37 -27
- package/translations/en.json +29 -19
- package/translations/es.json +26 -16
- package/translations/fr.json +47 -37
- package/translations/it.json +41 -31
- package/translations/nl.json +27 -17
- package/translations/pt.json +26 -16
- package/translations/sk.json +118 -108
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { firstValueFrom, Observable, of, switchMap
|
|
2
|
-
import {
|
|
1
|
+
import { firstValueFrom, Observable, of, switchMap } from 'rxjs'
|
|
2
|
+
import { map } from 'rxjs/operators'
|
|
3
3
|
import { Injector } from '@angular/core'
|
|
4
4
|
import { TranslateService } from '@ngx-translate/core'
|
|
5
5
|
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
@@ -13,7 +13,10 @@ import {
|
|
|
13
13
|
FieldFilters,
|
|
14
14
|
TermBucket,
|
|
15
15
|
} from '../../../../../../../libs/common/domain/src/lib/model/search'
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
ElasticsearchService,
|
|
18
|
+
METADATA_LANGUAGE,
|
|
19
|
+
} from '../../../../../../../libs/api/repository/src'
|
|
17
20
|
import { LangService } from '../../../../../../../libs/util/i18n/src'
|
|
18
21
|
|
|
19
22
|
export type FieldValue = string | number
|
|
@@ -36,8 +39,9 @@ export class SimpleSearchField implements AbstractSearchField {
|
|
|
36
39
|
|
|
37
40
|
constructor(
|
|
38
41
|
protected esFieldName: string,
|
|
42
|
+
protected injector: Injector,
|
|
39
43
|
protected order: 'asc' | 'desc' = 'asc',
|
|
40
|
-
protected
|
|
44
|
+
protected orderType: 'key' | 'count' = 'key'
|
|
41
45
|
) {}
|
|
42
46
|
|
|
43
47
|
protected getAggregations(): AggregationsParams {
|
|
@@ -46,13 +50,13 @@ export class SimpleSearchField implements AbstractSearchField {
|
|
|
46
50
|
type: 'terms',
|
|
47
51
|
field: this.esFieldName,
|
|
48
52
|
limit: 1000,
|
|
49
|
-
sort: [this.order,
|
|
53
|
+
sort: [this.order, this.orderType],
|
|
50
54
|
},
|
|
51
55
|
}
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
protected async getBucketLabel(bucket: TermBucket): Promise<string> {
|
|
55
|
-
return bucket.term
|
|
59
|
+
return bucket.term.toString()
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
getAvailableValues(): Observable<FieldAvailableValue[]> {
|
|
@@ -88,9 +92,18 @@ export class SimpleSearchField implements AbstractSearchField {
|
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
94
|
|
|
91
|
-
export class
|
|
95
|
+
export class TranslatedSearchField extends SimpleSearchField {
|
|
92
96
|
protected platformService = this.injector.get(PlatformServiceInterface)
|
|
93
97
|
|
|
98
|
+
constructor(
|
|
99
|
+
protected esFieldName: string,
|
|
100
|
+
protected injector: Injector,
|
|
101
|
+
protected order: 'asc' | 'desc' = 'asc',
|
|
102
|
+
protected orderType: 'key' | 'count' = 'key'
|
|
103
|
+
) {
|
|
104
|
+
super(esFieldName, injector, order, orderType)
|
|
105
|
+
}
|
|
106
|
+
|
|
94
107
|
protected async getTranslation(key: string) {
|
|
95
108
|
return firstValueFrom(this.platformService.translateKey(key))
|
|
96
109
|
}
|
|
@@ -100,6 +113,7 @@ export class KeySearchField extends SimpleSearchField {
|
|
|
100
113
|
}
|
|
101
114
|
|
|
102
115
|
getAvailableValues(): Observable<FieldAvailableValue[]> {
|
|
116
|
+
if (this.orderType === 'count') return super.getAvailableValues()
|
|
103
117
|
// sort values by alphabetical order
|
|
104
118
|
return super
|
|
105
119
|
.getAvailableValues()
|
|
@@ -111,34 +125,29 @@ export class KeySearchField extends SimpleSearchField {
|
|
|
111
125
|
}
|
|
112
126
|
}
|
|
113
127
|
|
|
114
|
-
|
|
128
|
+
/**
|
|
129
|
+
* This search field will either target the `.default` field, or a specific `.langxyz` field according
|
|
130
|
+
* to the defined METADATA_LANGUAGE token
|
|
131
|
+
* The provided ES field name should not include any prefix such as `.langeng`
|
|
132
|
+
*/
|
|
133
|
+
export class MultilingualSearchField extends SimpleSearchField {
|
|
115
134
|
private langService = this.injector.get(LangService)
|
|
116
|
-
private
|
|
117
|
-
.getThesaurusByLang(this.thesaurusName, this.langService.iso3)
|
|
118
|
-
.pipe(
|
|
119
|
-
catchError(() => {
|
|
120
|
-
console.warn('Error while loading thesaurus language package')
|
|
121
|
-
return of([])
|
|
122
|
-
}),
|
|
123
|
-
shareReplay(1)
|
|
124
|
-
)
|
|
135
|
+
private searchLanguage = this.injector.get(METADATA_LANGUAGE, null)
|
|
125
136
|
|
|
126
137
|
constructor(
|
|
127
|
-
esFieldName: string,
|
|
128
|
-
protected
|
|
129
|
-
order: 'asc' | 'desc' = 'asc',
|
|
130
|
-
|
|
138
|
+
protected esFieldName: string,
|
|
139
|
+
protected injector: Injector,
|
|
140
|
+
protected order: 'asc' | 'desc' = 'asc',
|
|
141
|
+
protected orderType: 'key' | 'count' = 'key'
|
|
131
142
|
) {
|
|
132
|
-
super(esFieldName, order,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
this.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
)
|
|
141
|
-
)
|
|
143
|
+
super(esFieldName, injector, order, orderType)
|
|
144
|
+
// note: we're excluding the metadata language "current" value because that would produce
|
|
145
|
+
// permalinks that might not work for different users
|
|
146
|
+
if (this.searchLanguage && this.searchLanguage !== 'current') {
|
|
147
|
+
this.esFieldName += `.lang${this.searchLanguage}`
|
|
148
|
+
} else {
|
|
149
|
+
this.esFieldName += '.default'
|
|
150
|
+
}
|
|
142
151
|
}
|
|
143
152
|
}
|
|
144
153
|
|
|
@@ -163,7 +172,7 @@ export class IsSpatialSearchField extends SimpleSearchField {
|
|
|
163
172
|
private translateService = this.injector.get(TranslateService)
|
|
164
173
|
|
|
165
174
|
constructor(injector: Injector) {
|
|
166
|
-
super('isSpatial', 'asc'
|
|
175
|
+
super('isSpatial', injector, 'asc')
|
|
167
176
|
this.esService.registerRuntimeField(
|
|
168
177
|
'isSpatial',
|
|
169
178
|
`String result = 'no';
|
|
@@ -223,7 +232,7 @@ export class LicenseSearchField extends SimpleSearchField {
|
|
|
223
232
|
private translateService = this.injector.get(TranslateService)
|
|
224
233
|
|
|
225
234
|
constructor(injector: Injector) {
|
|
226
|
-
super('license', 'asc'
|
|
235
|
+
super('license', injector, 'asc')
|
|
227
236
|
this.esService.registerRuntimeField(
|
|
228
237
|
'license',
|
|
229
238
|
`String raw = '';
|
|
@@ -330,7 +339,7 @@ export class OrganizationSearchField implements AbstractSearchField {
|
|
|
330
339
|
}
|
|
331
340
|
export class OwnerSearchField extends SimpleSearchField {
|
|
332
341
|
constructor(injector: Injector) {
|
|
333
|
-
super('owner', 'asc'
|
|
342
|
+
super('owner', injector, 'asc')
|
|
334
343
|
}
|
|
335
344
|
|
|
336
345
|
getAvailableValues(): Observable<FieldAvailableValue[]> {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<div class="h-full flex flex-col">
|
|
2
|
+
<div class="flex-none w-full flex flex-row items-center">
|
|
3
|
+
<p class="flex-none font-bold">{{ label }}</p>
|
|
4
|
+
<div class="flex-1 flex justify-end items-center">
|
|
5
|
+
<gn-ui-button
|
|
6
|
+
[extraClass]="getButtonExtraClass()"
|
|
7
|
+
(buttonClick)="togglePreview()"
|
|
8
|
+
>
|
|
9
|
+
<span class="material-symbols-outlined mr-1 icon-small">{{
|
|
10
|
+
preview ? 'visibility' : 'visibility_off'
|
|
11
|
+
}}</span>
|
|
12
|
+
{{ preview ? 'WYSIWYG' : 'Markdown' }}
|
|
13
|
+
</gn-ui-button>
|
|
14
|
+
<span
|
|
15
|
+
class="material-symbols-outlined m-2 icon-small"
|
|
16
|
+
[matTooltip]="tooltip"
|
|
17
|
+
matTooltipPosition="above"
|
|
18
|
+
>
|
|
19
|
+
help
|
|
20
|
+
</span>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<p class="flex-none mb-2 font-medium text-sm text-gray-900">
|
|
24
|
+
{{ helperText }}
|
|
25
|
+
</p>
|
|
26
|
+
<div class="flex-1" [hidden]="preview">
|
|
27
|
+
<gn-ui-text-area
|
|
28
|
+
[placeholder]="placeholder"
|
|
29
|
+
[value]="textContent"
|
|
30
|
+
(valueChange)="textContentChangedHandler($event)"
|
|
31
|
+
></gn-ui-text-area>
|
|
32
|
+
</div>
|
|
33
|
+
<div
|
|
34
|
+
class="flex-1 border border-gray-800 rounded overflow-y-scroll"
|
|
35
|
+
[hidden]="!preview"
|
|
36
|
+
>
|
|
37
|
+
<gn-ui-markdown-parser [textContent]="textContent"></gn-ui-markdown-parser>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
2
|
+
import {
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
Input,
|
|
7
|
+
Output,
|
|
8
|
+
} from '@angular/core'
|
|
9
|
+
import { FormsModule } from '@angular/forms'
|
|
10
|
+
import { MarkdownParserComponent } from '../markdown-parser/markdown-parser.component'
|
|
11
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
12
|
+
import { ButtonComponent, TextAreaComponent } from '../../../../../../libs/ui/inputs/src'
|
|
13
|
+
import { MatIconModule } from '@angular/material/icon'
|
|
14
|
+
import { MatTooltipModule } from '@angular/material/tooltip'
|
|
15
|
+
|
|
16
|
+
@Component({
|
|
17
|
+
selector: 'gn-ui-markdown-editor',
|
|
18
|
+
templateUrl: './markdown-editor.component.html',
|
|
19
|
+
styleUrls: ['./markdown-editor.component.css'],
|
|
20
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
|
+
standalone: true,
|
|
22
|
+
imports: [
|
|
23
|
+
CommonModule,
|
|
24
|
+
FormsModule,
|
|
25
|
+
MatIconModule,
|
|
26
|
+
MatTooltipModule,
|
|
27
|
+
ButtonComponent,
|
|
28
|
+
TextAreaComponent,
|
|
29
|
+
MarkdownParserComponent,
|
|
30
|
+
TranslateModule,
|
|
31
|
+
],
|
|
32
|
+
})
|
|
33
|
+
export class MarkdownEditorComponent {
|
|
34
|
+
@Input() label: string
|
|
35
|
+
@Input() tooltip?: string
|
|
36
|
+
@Input() helperText?: string
|
|
37
|
+
@Input() placeholder: string
|
|
38
|
+
@Input() textContent: string
|
|
39
|
+
@Output() textContentChanged: EventEmitter<string> =
|
|
40
|
+
new EventEmitter<string>()
|
|
41
|
+
|
|
42
|
+
preview = false
|
|
43
|
+
|
|
44
|
+
getButtonExtraClass() {
|
|
45
|
+
return `${
|
|
46
|
+
this.preview ? 'text-gray-200 bg-gray-900' : 'text-gray-900 bg-gray-200'
|
|
47
|
+
} rounded-[1.25rem] p-[0.375rem] text-xs font-medium w-24`
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
togglePreview() {
|
|
51
|
+
this.preview = !this.preview
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
textContentChangedHandler(textContent: string) {
|
|
55
|
+
this.textContent = textContent
|
|
56
|
+
this.textContentChanged.emit(this.textContent)
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -6,6 +6,7 @@ import { marked } from 'marked'
|
|
|
6
6
|
templateUrl: './markdown-parser.component.html',
|
|
7
7
|
styleUrls: ['./markdown-parser.component.css'],
|
|
8
8
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
|
+
standalone: true,
|
|
9
10
|
})
|
|
10
11
|
export class MarkdownParserComponent {
|
|
11
12
|
@Input() textContent: string
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
<div
|
|
2
2
|
#container
|
|
3
|
-
class="max-lines overflow-hidden transition-[max-height] duration-300"
|
|
3
|
+
class="max-lines overflow-hidden transition-[max-height] duration-300 relative"
|
|
4
4
|
[ngClass]="isExpanded ? 'ease-in' : 'ease-out'"
|
|
5
5
|
[style.maxHeight]="maxHeight"
|
|
6
6
|
>
|
|
7
7
|
<ng-content></ng-content>
|
|
8
|
+
<div
|
|
9
|
+
*ngIf="showToggleButton && !isExpanded"
|
|
10
|
+
class="absolute inset-x-0 bottom-0 bg-gradient-to-b from-transparent to-white h-3"
|
|
11
|
+
></div>
|
|
8
12
|
</div>
|
|
9
13
|
<div
|
|
10
14
|
*ngIf="showToggleButton"
|
|
@@ -55,29 +55,82 @@
|
|
|
55
55
|
</div>
|
|
56
56
|
</gn-ui-expandable-panel>
|
|
57
57
|
<gn-ui-expandable-panel
|
|
58
|
-
class="metadata-origin"
|
|
59
58
|
*ngIf="
|
|
60
59
|
metadata.lineage ||
|
|
61
60
|
metadata.recordUpdated ||
|
|
62
61
|
metadata.updateFrequency ||
|
|
63
62
|
metadata.status
|
|
64
63
|
"
|
|
65
|
-
[title]="'record.metadata.
|
|
64
|
+
[title]="'record.metadata.details' | translate"
|
|
66
65
|
>
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
>
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
<div *ngIf="metadata.lineage" class="text-gray-900 flex flex-col mt-4 gap-2">
|
|
67
|
+
<p class="whitespace-pre-line break-words text-gray-900" gnUiLinkify>
|
|
68
|
+
{{ metadata.lineage }}
|
|
69
|
+
</p>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="flex flex-row gap-6 mt-5 mb-8" *ngIf="resourceContact">
|
|
72
|
+
<div
|
|
73
|
+
*ngIf="resourceContact.organization?.logoUrl?.href"
|
|
74
|
+
class="flex items-center justify-center border-solid border border-gray-300 rounded-md bg-white h-32 overflow-hidden"
|
|
75
|
+
>
|
|
76
|
+
<gn-ui-thumbnail
|
|
77
|
+
class="relative h-full w-full"
|
|
78
|
+
[thumbnailUrl]="resourceContact.organization.logoUrl.href"
|
|
79
|
+
fit="contain"
|
|
80
|
+
></gn-ui-thumbnail>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="flex flex-col gap-1">
|
|
83
|
+
<p class="text-sm font-medium" translate>record.metadata.producer</p>
|
|
84
|
+
<div
|
|
85
|
+
class="text-primary font-title text-21 mr-2 cursor-pointer hover:underline"
|
|
86
|
+
data-cy="organization-name"
|
|
87
|
+
>
|
|
88
|
+
{{ resourceContact.organization?.name }}
|
|
89
|
+
</div>
|
|
90
|
+
<div *ngIf="resourceContact.organization?.website">
|
|
91
|
+
<a
|
|
92
|
+
[href]="resourceContact.organization.website"
|
|
93
|
+
target="_blank"
|
|
94
|
+
class="contact-website text-primary text-sm cursor-pointer hover:underline transition-all"
|
|
95
|
+
>{{ resourceContact.organization.website }}
|
|
96
|
+
<mat-icon
|
|
97
|
+
class="material-symbols-outlined !w-[12px] !h-[12px] !text-[12px] opacity-75 shrink-0"
|
|
98
|
+
>open_in_new</mat-icon
|
|
99
|
+
>
|
|
100
|
+
</a>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="mt-4" *ngIf="resourceContact.email">
|
|
103
|
+
<div class="flex">
|
|
104
|
+
<mat-icon
|
|
105
|
+
class="material-symbols-outlined !w-5 !h-5 !text-[20px] opacity-75 shrink-0"
|
|
106
|
+
>
|
|
107
|
+
mail_outline</mat-icon
|
|
108
|
+
>
|
|
109
|
+
<a
|
|
110
|
+
*ngIf="resourceContact.email"
|
|
111
|
+
[href]="'mailto:' + resourceContact.email"
|
|
112
|
+
class="text-sm hover:underline ml-2"
|
|
113
|
+
target="_blank"
|
|
114
|
+
data-cy="contact-email"
|
|
115
|
+
>{{ resourceContact?.email }}</a
|
|
116
|
+
>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
74
121
|
<div
|
|
75
|
-
class="py-
|
|
122
|
+
class="py-6 px-6 rounded bg-gray-100 grid grid-cols-2 gap-y-6 gap-x-[20px] text-gray-700"
|
|
76
123
|
>
|
|
77
|
-
<div *ngIf="metadata.
|
|
78
|
-
<p class="text-sm" translate>record.metadata.
|
|
124
|
+
<div *ngIf="metadata.recordCreated">
|
|
125
|
+
<p class="text-sm" translate>record.metadata.creation</p>
|
|
79
126
|
<p class="text-primary font-medium mt-1">
|
|
80
|
-
{{ metadata.
|
|
127
|
+
{{ metadata.recordCreated.toLocaleDateString() }}
|
|
128
|
+
</p>
|
|
129
|
+
</div>
|
|
130
|
+
<div *ngIf="metadata.recordPublished">
|
|
131
|
+
<p class="text-sm" translate>record.metadata.publication</p>
|
|
132
|
+
<p class="text-primary font-medium mt-1">
|
|
133
|
+
{{ metadata.recordPublished.toLocaleDateString() }}
|
|
81
134
|
</p>
|
|
82
135
|
</div>
|
|
83
136
|
<div *ngIf="updateFrequency">
|
|
@@ -90,17 +143,52 @@
|
|
|
90
143
|
{{ updateFrequency }}
|
|
91
144
|
</p>
|
|
92
145
|
</div>
|
|
93
|
-
<div *ngIf="metadata.
|
|
94
|
-
<p class="text-sm" translate>record.metadata.
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
146
|
+
<div *ngIf="metadata.languages">
|
|
147
|
+
<p class="text-sm mb-1" translate>record.metadata.languages</p>
|
|
148
|
+
<div class="flex flex-row gap-1 flex-wrap">
|
|
149
|
+
<p
|
|
150
|
+
class="text-primary font-medium"
|
|
151
|
+
translate
|
|
152
|
+
*ngFor="let language of metadata.languages"
|
|
153
|
+
>
|
|
154
|
+
language.{{ language }}
|
|
155
|
+
</p>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
<div *ngIf="temporalExtent">
|
|
159
|
+
<p class="text-sm" translate>record.metadata.temporalExtent</p>
|
|
160
|
+
<div class="flex flex-row gap-1 mb-1 text-primary font-medium">
|
|
161
|
+
<p
|
|
162
|
+
*ngIf="temporalExtent.start && temporalExtent.end"
|
|
163
|
+
translate
|
|
164
|
+
[translateParams]="{
|
|
165
|
+
start: temporalExtent.start,
|
|
166
|
+
end: temporalExtent.end
|
|
167
|
+
}"
|
|
168
|
+
>
|
|
169
|
+
record.metadata.temporalExtent.fromDateToDate
|
|
170
|
+
</p>
|
|
171
|
+
<p
|
|
172
|
+
*ngIf="temporalExtent.start && !temporalExtent.end"
|
|
173
|
+
translate
|
|
174
|
+
[translateParams]="{ start: temporalExtent.start }"
|
|
175
|
+
>
|
|
176
|
+
record.metadata.temporalExtent.sinceDate
|
|
177
|
+
</p>
|
|
178
|
+
<p
|
|
179
|
+
*ngIf="!temporalExtent.start && temporalExtent.end"
|
|
180
|
+
translate
|
|
181
|
+
[translateParams]="{ end: temporalExtent.end }"
|
|
182
|
+
>
|
|
183
|
+
record.metadata.temporalExtent.untilDate
|
|
184
|
+
</p>
|
|
185
|
+
</div>
|
|
98
186
|
</div>
|
|
99
187
|
</div>
|
|
100
188
|
</gn-ui-expandable-panel>
|
|
101
189
|
<gn-ui-expandable-panel
|
|
102
190
|
*ngIf="metadata.landingPage"
|
|
103
|
-
[title]="'record.metadata.
|
|
191
|
+
[title]="'record.metadata.technical' | translate"
|
|
104
192
|
>
|
|
105
193
|
<div class="flex flex-col gap-4 mr-4 py-5 rounded text-gray-700">
|
|
106
194
|
<div *ngIf="metadata.recordUpdated">
|
|
@@ -136,13 +224,13 @@
|
|
|
136
224
|
</p>
|
|
137
225
|
</div>
|
|
138
226
|
</div>
|
|
139
|
-
<div *ngIf="metadata.
|
|
140
|
-
<p class="text-sm mb-1" translate>record.metadata.
|
|
227
|
+
<div *ngIf="metadata.topics?.length">
|
|
228
|
+
<p class="text-sm mb-1" translate>record.metadata.topics</p>
|
|
141
229
|
<div class="sm:pb-4 sm:pr-16">
|
|
142
230
|
<gn-ui-badge
|
|
143
|
-
class="inline-block mr-2 lowercase"
|
|
144
|
-
*ngFor="let
|
|
145
|
-
>{{
|
|
231
|
+
class="inline-block mr-2 mb-2 lowercase"
|
|
232
|
+
*ngFor="let topic of metadata.topics"
|
|
233
|
+
>{{ topic }}</gn-ui-badge
|
|
146
234
|
>
|
|
147
235
|
</div>
|
|
148
236
|
</div>
|
|
@@ -154,7 +242,7 @@
|
|
|
154
242
|
(click)="onKeywordClick(keyword)"
|
|
155
243
|
[clickable]="true"
|
|
156
244
|
*ngFor="let keyword of metadata.keywords"
|
|
157
|
-
>{{ keyword }}</gn-ui-badge
|
|
245
|
+
>{{ keyword.label }}</gn-ui-badge
|
|
158
246
|
>
|
|
159
247
|
</div>
|
|
160
248
|
</div>
|
|
@@ -5,7 +5,11 @@ import {
|
|
|
5
5
|
Input,
|
|
6
6
|
Output,
|
|
7
7
|
} from '@angular/core'
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
DatasetRecord,
|
|
10
|
+
Keyword,
|
|
11
|
+
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
12
|
+
import { getTemporalRangeUnion } from '../../../../../../libs/util/shared/src'
|
|
9
13
|
|
|
10
14
|
@Component({
|
|
11
15
|
selector: 'gn-ui-metadata-info',
|
|
@@ -16,7 +20,7 @@ import { DatasetRecord } from '../../../../../../libs/common/domain/src/lib/mode
|
|
|
16
20
|
export class MetadataInfoComponent {
|
|
17
21
|
@Input() metadata: Partial<DatasetRecord>
|
|
18
22
|
@Input() incomplete: boolean
|
|
19
|
-
@Output() keyword = new EventEmitter<
|
|
23
|
+
@Output() keyword = new EventEmitter<Keyword>()
|
|
20
24
|
updatedTimes: number
|
|
21
25
|
|
|
22
26
|
get hasUsage() {
|
|
@@ -73,11 +77,24 @@ export class MetadataInfoComponent {
|
|
|
73
77
|
}
|
|
74
78
|
}
|
|
75
79
|
|
|
80
|
+
get temporalExtent(): { start: string; end: string } {
|
|
81
|
+
const temporalExtents = this.metadata.temporalExtents
|
|
82
|
+
return getTemporalRangeUnion(temporalExtents)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
get shownOrganization() {
|
|
86
|
+
return this.metadata.ownerOrganization
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
get resourceContact() {
|
|
90
|
+
return this.metadata.contactsForResource?.[0]
|
|
91
|
+
}
|
|
92
|
+
|
|
76
93
|
fieldReady(propName: string) {
|
|
77
94
|
return !this.incomplete || propName in this.metadata
|
|
78
95
|
}
|
|
79
96
|
|
|
80
|
-
onKeywordClick(keyword:
|
|
97
|
+
onKeywordClick(keyword: Keyword) {
|
|
81
98
|
this.keyword.emit(keyword)
|
|
82
99
|
}
|
|
83
100
|
}
|
|
@@ -32,8 +32,7 @@ export class MetadataQualityComponent implements OnChanges {
|
|
|
32
32
|
|
|
33
33
|
get calculatedQualityScore(): number {
|
|
34
34
|
return Math.round(
|
|
35
|
-
(this.items.filter(({ value }) => value
|
|
36
|
-
this.items.length
|
|
35
|
+
(this.items.filter(({ value }) => value).length * 100) / this.items.length
|
|
37
36
|
)
|
|
38
37
|
}
|
|
39
38
|
|
|
@@ -56,7 +55,7 @@ export class MetadataQualityComponent implements OnChanges {
|
|
|
56
55
|
this.items = []
|
|
57
56
|
this.add('title', !!this.metadata?.title)
|
|
58
57
|
this.add('description', !!this.metadata?.abstract)
|
|
59
|
-
this.add('topic', this.metadata?.
|
|
58
|
+
this.add('topic', this.metadata?.topics?.length > 0)
|
|
60
59
|
this.add('keywords', this.metadata?.keywords?.length > 0)
|
|
61
60
|
this.add('legalConstraints', this.metadata?.legalConstraints?.length > 0)
|
|
62
61
|
this.add('organisation', !!contact?.organization)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<div
|
|
2
2
|
#containerElement
|
|
3
|
-
class="h-full w-full relative shrink-0 overflow-hidden flex items-center"
|
|
3
|
+
class="h-full w-full relative shrink-0 overflow-hidden flex items-center justify-center"
|
|
4
4
|
[ngClass]="isPlaceholder ? 'bg-gray-100' : 'bg-white'"
|
|
5
5
|
[attr.data-cy-is-placeholder]="isPlaceholder.toString()"
|
|
6
6
|
>
|
|
7
7
|
<img
|
|
8
8
|
#imageElement
|
|
9
9
|
class="relative w-full object-center"
|
|
10
|
-
[ngClass]="imgFit === 'contain' ? 'h-4/5' : 'h-full'"
|
|
10
|
+
[ngClass]="imgFit === 'contain' ? 'h-4/5 w-4/5' : 'h-full'"
|
|
11
11
|
[ngStyle]="{ objectFit: imgFit }"
|
|
12
12
|
alt="thumbnail"
|
|
13
13
|
loading="lazy"
|
|
@@ -45,6 +45,7 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
|
|
|
45
45
|
UiInputsModule,
|
|
46
46
|
FormsModule,
|
|
47
47
|
NgOptimizedImage,
|
|
48
|
+
MarkdownParserComponent,
|
|
48
49
|
],
|
|
49
50
|
declarations: [
|
|
50
51
|
MetadataInfoComponent,
|
|
@@ -67,7 +68,6 @@ import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-over
|
|
|
67
68
|
PaginationButtonsComponent,
|
|
68
69
|
MaxLinesComponent,
|
|
69
70
|
RecordApiFormComponent,
|
|
70
|
-
MarkdownParserComponent,
|
|
71
71
|
ImageOverlayPreviewComponent,
|
|
72
72
|
],
|
|
73
73
|
exports: [
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<button
|
|
2
2
|
type="button"
|
|
3
|
-
class="flex flex-row items-center text-[1em] leading-none p-[1em] rounded-[0.25em] transition-all duration-100 focus:outline-none disabled:opacity-50 disabled:pointer-events-none"
|
|
4
3
|
[class]="classList"
|
|
5
4
|
[disabled]="disabled"
|
|
6
5
|
(click)="handleClick($event)"
|
|
@@ -12,29 +12,30 @@ import { propagateToDocumentOnly } from '../../../../../../libs/util/shared/src'
|
|
|
12
12
|
templateUrl: './button.component.html',
|
|
13
13
|
styleUrls: ['./button.component.css'],
|
|
14
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
+
standalone: true,
|
|
15
16
|
})
|
|
16
17
|
export class ButtonComponent {
|
|
17
18
|
private btnClass: string
|
|
18
19
|
|
|
19
|
-
// btn-classes are explicited to allow tailwind recognize them and add it in css.
|
|
20
20
|
@Input() set type(
|
|
21
21
|
value: 'primary' | 'secondary' | 'default' | 'outline' | 'light'
|
|
22
22
|
) {
|
|
23
|
+
// btn-classes are written in full to be picked up by tailwind
|
|
23
24
|
switch (value) {
|
|
24
25
|
case 'primary':
|
|
25
|
-
this.btnClass = 'btn-primary'
|
|
26
|
+
this.btnClass = 'gn-ui-btn-primary'
|
|
26
27
|
break
|
|
27
28
|
case 'secondary':
|
|
28
|
-
this.btnClass = 'btn-secondary'
|
|
29
|
+
this.btnClass = 'gn-ui-btn-secondary'
|
|
29
30
|
break
|
|
30
31
|
case 'outline':
|
|
31
|
-
this.btnClass = 'btn-outline'
|
|
32
|
+
this.btnClass = 'gn-ui-btn-outline'
|
|
32
33
|
break
|
|
33
34
|
case 'light':
|
|
34
|
-
this.btnClass = 'btn-light'
|
|
35
|
+
this.btnClass = 'gn-ui-btn-light'
|
|
35
36
|
break
|
|
36
37
|
default:
|
|
37
|
-
this.btnClass = 'btn-default'
|
|
38
|
+
this.btnClass = 'gn-ui-btn-default'
|
|
38
39
|
break
|
|
39
40
|
}
|
|
40
41
|
}
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
<gn-ui-button
|
|
10
10
|
type="outline"
|
|
11
11
|
class="grow min-w-0"
|
|
12
|
-
extraClass="!p-[8px] !pl-[16px] flex flex-row w-full {{
|
|
12
|
+
extraClass="bg-background !p-[8px] !pl-[16px] flex flex-row w-full {{
|
|
13
|
+
extraBtnClass
|
|
14
|
+
}}"
|
|
13
15
|
[title]="title"
|
|
14
16
|
[attr.aria-owns]="id"
|
|
15
17
|
(buttonClick)="openOverlay()"
|