geonetwork-ui 2.2.0-dev.c15a456d → 2.2.0-dev.dc3a671b
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.metadata.mapper.mjs +2 -1
- package/esm2022/libs/feature/catalog/src/lib/organisations/organisations.component.mjs +4 -15
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.mjs +1 -1
- package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +106 -0
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +64 -0
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +63 -0
- package/esm2022/libs/feature/map/src/lib/feature-map.module.mjs +11 -2
- package/esm2022/libs/feature/map/src/lib/layers-panel/layers-panel.component.mjs +6 -3
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.service.mjs +3 -1
- package/esm2022/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.mjs +7 -4
- package/esm2022/libs/feature/search/src/lib/results-list/results-list.container.component.mjs +1 -1
- package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +4 -4
- package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +1 -1
- package/esm2022/libs/ui/elements/src/index.mjs +3 -1
- package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +27 -0
- package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +17 -0
- package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +10 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +12 -6
- package/esm2022/libs/ui/elements/src/lib/related-record-card/related-record-card.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +7 -3
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +13 -3
- package/esm2022/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.mjs +6 -3
- package/esm2022/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.mjs +2 -2
- package/esm2022/libs/ui/search/src/lib/record-preview-card/record-preview-card.component.mjs +1 -1
- package/esm2022/libs/ui/search/src/lib/record-preview-feed/record-preview-feed.component.mjs +1 -1
- package/esm2022/libs/ui/search/src/lib/record-preview-list/record-preview-list.component.mjs +1 -1
- package/esm2022/libs/ui/search/src/lib/record-preview-row/record-preview-row.component.mjs +1 -1
- package/esm2022/libs/ui/search/src/lib/record-preview-title/record-preview-title.component.mjs +1 -1
- package/esm2022/libs/util/i18n/src/index.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/utils/fuzzy-filter.mjs +27 -0
- package/esm2022/libs/util/shared/src/lib/utils/index.mjs +2 -1
- package/esm2022/translations/de.json +15 -1
- package/esm2022/translations/en.json +18 -4
- package/esm2022/translations/es.json +14 -0
- package/esm2022/translations/fr.json +18 -4
- package/esm2022/translations/it.json +26 -12
- package/esm2022/translations/nl.json +14 -0
- package/esm2022/translations/pt.json +14 -0
- package/fesm2022/geonetwork-ui.mjs +480 -93
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.d.ts.map +1 -1
- package/libs/feature/catalog/src/lib/organisations/organisations.component.d.ts +0 -1
- package/libs/feature/catalog/src/lib/organisations/organisations.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.d.ts +22 -0
- package/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.d.ts.map +1 -0
- package/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.d.ts +22 -0
- package/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.d.ts.map +1 -0
- package/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.d.ts +22 -0
- package/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.d.ts.map +1 -0
- package/libs/feature/map/src/lib/feature-map.module.d.ts +15 -12
- package/libs/feature/map/src/lib/feature-map.module.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/favorites/favorite-star/favorite-star.component.d.ts +2 -1
- package/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +2 -0
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.d.ts +10 -0
- package/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts +8 -0
- package/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.d.ts +1 -0
- package/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +1 -0
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts +3 -2
- package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +13 -11
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.d.ts.map +1 -1
- package/libs/util/i18n/src/index.d.ts +1 -0
- package/libs/util/i18n/src/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/fuzzy-filter.d.ts +9 -0
- package/libs/util/shared/src/lib/utils/fuzzy-filter.d.ts.map +1 -0
- 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/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.metadata.mapper.ts +1 -0
- package/src/libs/feature/catalog/src/lib/organisations/organisations.component.ts +3 -17
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.css +0 -0
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +21 -0
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.ts +107 -0
- package/src/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.css +0 -0
- package/src/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.html +37 -0
- package/src/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.ts +64 -0
- package/src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.css +0 -0
- package/src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.html +55 -0
- package/src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.ts +63 -0
- package/src/libs/feature/map/src/lib/feature-map.module.ts +6 -0
- package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.html +9 -3
- package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +6 -0
- package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html +12 -4
- package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.ts +1 -0
- package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.html +1 -0
- package/src/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.ts +1 -1
- package/src/libs/ui/elements/src/index.ts +2 -0
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.css +0 -0
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +29 -0
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.ts +15 -0
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.css +264 -0
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.html +1 -0
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts +16 -0
- package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +93 -27
- package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.ts +7 -0
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.css +4 -0
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +59 -32
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +5 -0
- package/src/libs/ui/elements/src/lib/related-record-card/related-record-card.component.html +1 -1
- package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.ts +4 -0
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +6 -0
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.ts +7 -4
- package/src/libs/ui/inputs/src/lib/navigation-button/navigation-button.component.html +8 -3
- package/src/libs/ui/inputs/src/lib/star-toggle/star-toggle.component.css +1 -0
- package/src/libs/util/i18n/src/index.ts +1 -0
- package/src/libs/util/shared/src/lib/utils/fuzzy-filter.ts +32 -0
- package/src/libs/util/shared/src/lib/utils/index.ts +1 -0
- package/translations/de.json +15 -1
- package/translations/en.json +18 -4
- package/translations/es.json +14 -0
- package/translations/fr.json +18 -4
- package/translations/it.json +26 -12
- package/translations/nl.json +14 -0
- package/translations/pt.json +14 -0
- package/translations/sk.json +14 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<div class="flex items-center mb-5">
|
|
2
|
+
<gn-ui-text-input
|
|
3
|
+
[(value)]="wfsUrl"
|
|
4
|
+
(valueChange)="urlChange.next($event)"
|
|
5
|
+
[hint]="'map.wfs.urlInput.hint' | translate"
|
|
6
|
+
class="w-96"
|
|
7
|
+
>
|
|
8
|
+
</gn-ui-text-input>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div *ngIf="errorMessage" class="text-red-500 mt-2">
|
|
12
|
+
{{ errorMessage }}
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div *ngIf="loading">
|
|
16
|
+
<p class="loading-message" translate>map.loading.service</p>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div *ngIf="!loading && layers.length > 0">
|
|
20
|
+
<h2 class="font-bold" translate>map.layers.available</h2>
|
|
21
|
+
<ng-container *ngFor="let layer of layers">
|
|
22
|
+
<div class="flex items-center justify-between my-2 layer-item-tree">
|
|
23
|
+
<p class="max-w-xs overflow-hidden overflow-ellipsis whitespace-nowrap">
|
|
24
|
+
{{ layer.title }}
|
|
25
|
+
</p>
|
|
26
|
+
<gn-ui-button
|
|
27
|
+
*ngIf="layer.name"
|
|
28
|
+
class="layer-add-btn"
|
|
29
|
+
type="primary"
|
|
30
|
+
(buttonClick)="addLayer(layer)"
|
|
31
|
+
extraClass="text-sm !px-2 !py-1"
|
|
32
|
+
translate
|
|
33
|
+
><span translate> map.layer.add </span></gn-ui-button
|
|
34
|
+
>
|
|
35
|
+
</div>
|
|
36
|
+
</ng-container>
|
|
37
|
+
</div>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ChangeDetectorRef, Component, OnInit } from '@angular/core'
|
|
2
|
+
import { WfsEndpoint, WfsFeatureTypeBrief } from '@camptocamp/ogc-client'
|
|
3
|
+
import { Subject } from 'rxjs'
|
|
4
|
+
import {
|
|
5
|
+
MapContextLayerModel,
|
|
6
|
+
MapContextLayerTypeEnum,
|
|
7
|
+
} from '../map-context/map-context.model'
|
|
8
|
+
import { MapFacade } from '../+state/map.facade'
|
|
9
|
+
import { debounceTime } from 'rxjs/operators'
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: 'gn-ui-add-layer-from-wfs',
|
|
13
|
+
templateUrl: './add-layer-from-wfs.component.html',
|
|
14
|
+
styleUrls: ['./add-layer-from-wfs.component.css'],
|
|
15
|
+
})
|
|
16
|
+
export class AddLayerFromWfsComponent implements OnInit {
|
|
17
|
+
wfsUrl = ''
|
|
18
|
+
loading = false
|
|
19
|
+
layers: WfsFeatureTypeBrief[] = []
|
|
20
|
+
wfsEndpoint: WfsEndpoint | null = null
|
|
21
|
+
urlChange = new Subject<string>()
|
|
22
|
+
errorMessage: string | null = null
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
private mapFacade: MapFacade,
|
|
26
|
+
private changeDetectorRef: ChangeDetectorRef
|
|
27
|
+
) {}
|
|
28
|
+
|
|
29
|
+
ngOnInit() {
|
|
30
|
+
this.urlChange.pipe(debounceTime(700)).subscribe(() => this.loadLayers())
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async loadLayers() {
|
|
34
|
+
this.errorMessage = null
|
|
35
|
+
try {
|
|
36
|
+
this.loading = true
|
|
37
|
+
|
|
38
|
+
if (this.wfsUrl.trim() === '') {
|
|
39
|
+
this.layers = []
|
|
40
|
+
return
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
this.wfsEndpoint = await new WfsEndpoint(this.wfsUrl).isReady()
|
|
44
|
+
this.layers = this.wfsEndpoint.getFeatureTypes()
|
|
45
|
+
console.log(this.layers)
|
|
46
|
+
} catch (error) {
|
|
47
|
+
const err = error as Error
|
|
48
|
+
this.layers = []
|
|
49
|
+
this.errorMessage = 'Error loading layers: ' + err.message
|
|
50
|
+
} finally {
|
|
51
|
+
this.loading = false
|
|
52
|
+
this.changeDetectorRef.markForCheck()
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
addLayer(layer: WfsFeatureTypeBrief) {
|
|
57
|
+
const layerToAdd: MapContextLayerModel = {
|
|
58
|
+
name: layer.name,
|
|
59
|
+
url: this.wfsUrl.toString(),
|
|
60
|
+
type: MapContextLayerTypeEnum.WFS,
|
|
61
|
+
}
|
|
62
|
+
this.mapFacade.addLayer({ ...layerToAdd, title: layer.title })
|
|
63
|
+
}
|
|
64
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<div class="flex items-center mb-5">
|
|
2
|
+
<gn-ui-text-input
|
|
3
|
+
[(value)]="wmsUrl"
|
|
4
|
+
(valueChange)="urlChange.next($event)"
|
|
5
|
+
[hint]="'map.wms.urlInput.hint' | translate"
|
|
6
|
+
class="w-96"
|
|
7
|
+
>
|
|
8
|
+
</gn-ui-text-input>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div *ngIf="errorMessage" class="text-red-500 mt-2">
|
|
12
|
+
{{ errorMessage }}
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div *ngIf="loading">
|
|
16
|
+
<p class="loading-message" translate>map.loading.service</p>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div *ngIf="!loading && layers.length > 0">
|
|
20
|
+
<h2 class="font-bold" translate>map.layers.available</h2>
|
|
21
|
+
<ng-container
|
|
22
|
+
*ngFor="let layer of layers"
|
|
23
|
+
[ngTemplateOutlet]="layerTreeItem"
|
|
24
|
+
[ngTemplateOutletContext]="{
|
|
25
|
+
layer: layer
|
|
26
|
+
}"
|
|
27
|
+
></ng-container>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<ng-template #layerTreeItem let-layer="layer">
|
|
31
|
+
<div class="flex items-center justify-between layer-tree-item my-2">
|
|
32
|
+
<p class="max-w-xs overflow-hidden overflow-ellipsis whitespace-nowrap">
|
|
33
|
+
{{ layer.title }}
|
|
34
|
+
</p>
|
|
35
|
+
<gn-ui-button
|
|
36
|
+
*ngIf="layer.name"
|
|
37
|
+
class="layer-add-btn"
|
|
38
|
+
type="primary"
|
|
39
|
+
(buttonClick)="addLayer(layer)"
|
|
40
|
+
extraClass="text-sm !px-2 !py-1"
|
|
41
|
+
translate
|
|
42
|
+
><span translate> map.layer.add </span></gn-ui-button
|
|
43
|
+
>
|
|
44
|
+
</div>
|
|
45
|
+
<div *ngIf="layer.children?.length > 0" class="ml-4">
|
|
46
|
+
<ng-container
|
|
47
|
+
*ngFor="let child of layer.children"
|
|
48
|
+
[ngTemplateOutlet]="layerTreeItem"
|
|
49
|
+
[ngTemplateOutletContext]="{
|
|
50
|
+
layer: child
|
|
51
|
+
}"
|
|
52
|
+
>
|
|
53
|
+
</ng-container>
|
|
54
|
+
</div>
|
|
55
|
+
</ng-template>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Component, ChangeDetectorRef, OnInit } from '@angular/core'
|
|
2
|
+
import { WmsEndpoint, WmsLayerSummary } from '@camptocamp/ogc-client'
|
|
3
|
+
import { MapFacade } from '../+state/map.facade'
|
|
4
|
+
import {
|
|
5
|
+
MapContextLayerModel,
|
|
6
|
+
MapContextLayerTypeEnum,
|
|
7
|
+
} from '../map-context/map-context.model'
|
|
8
|
+
import { Subject } from 'rxjs'
|
|
9
|
+
import { debounceTime } from 'rxjs/operators'
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: 'gn-ui-add-layer-from-wms',
|
|
13
|
+
templateUrl: './add-layer-from-wms.component.html',
|
|
14
|
+
styleUrls: ['./add-layer-from-wms.component.css'],
|
|
15
|
+
})
|
|
16
|
+
export class AddLayerFromWmsComponent implements OnInit {
|
|
17
|
+
wmsUrl = ''
|
|
18
|
+
loading = false
|
|
19
|
+
layers: WmsLayerSummary[] = []
|
|
20
|
+
wmsEndpoint: WmsEndpoint | null = null
|
|
21
|
+
urlChange = new Subject<string>()
|
|
22
|
+
errorMessage: string | null = null
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
private mapFacade: MapFacade,
|
|
26
|
+
private changeDetectorRef: ChangeDetectorRef
|
|
27
|
+
) {}
|
|
28
|
+
|
|
29
|
+
ngOnInit() {
|
|
30
|
+
this.urlChange.pipe(debounceTime(700)).subscribe(() => this.loadLayers())
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async loadLayers() {
|
|
34
|
+
this.errorMessage = null
|
|
35
|
+
try {
|
|
36
|
+
this.loading = true
|
|
37
|
+
|
|
38
|
+
if (this.wmsUrl.trim() === '') {
|
|
39
|
+
this.layers = []
|
|
40
|
+
return
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
this.wmsEndpoint = await new WmsEndpoint(this.wmsUrl).isReady()
|
|
44
|
+
this.layers = this.wmsEndpoint.getLayers()
|
|
45
|
+
} catch (error) {
|
|
46
|
+
const err = error as Error
|
|
47
|
+
this.layers = []
|
|
48
|
+
this.errorMessage = 'Error loading layers: ' + err.message
|
|
49
|
+
} finally {
|
|
50
|
+
this.loading = false
|
|
51
|
+
this.changeDetectorRef.markForCheck()
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
addLayer(layer: WmsLayerSummary) {
|
|
56
|
+
const layerToAdd: MapContextLayerModel = {
|
|
57
|
+
name: layer.name,
|
|
58
|
+
url: this.wmsUrl.toString(),
|
|
59
|
+
type: MapContextLayerTypeEnum.WMS,
|
|
60
|
+
}
|
|
61
|
+
this.mapFacade.addLayer({ ...layerToAdd, title: layer.title })
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -20,6 +20,9 @@ import { MapContainerComponent } from './map-container/map-container.component'
|
|
|
20
20
|
import { AddLayerRecordPreviewComponent } from './add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component'
|
|
21
21
|
import { UiElementsModule } from '../../../../../libs/ui/elements/src'
|
|
22
22
|
import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
|
|
23
|
+
import { AddLayerFromWmsComponent } from './add-layer-from-wms/add-layer-from-wms.component'
|
|
24
|
+
import { AddLayerFromFileComponent } from './add-layer-from-file/add-layer-from-file.component'
|
|
25
|
+
import { AddLayerFromWfsComponent } from './add-layer-from-wfs/add-layer-from-wfs.component'
|
|
23
26
|
|
|
24
27
|
@NgModule({
|
|
25
28
|
declarations: [
|
|
@@ -29,6 +32,9 @@ import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
|
|
|
29
32
|
AddLayerFromCatalogComponent,
|
|
30
33
|
MapContainerComponent,
|
|
31
34
|
AddLayerRecordPreviewComponent,
|
|
35
|
+
AddLayerFromWmsComponent,
|
|
36
|
+
AddLayerFromFileComponent,
|
|
37
|
+
AddLayerFromWfsComponent,
|
|
32
38
|
],
|
|
33
39
|
exports: [
|
|
34
40
|
MapContextComponent,
|
|
@@ -31,13 +31,19 @@
|
|
|
31
31
|
</div>
|
|
32
32
|
</mat-tab>
|
|
33
33
|
<mat-tab [label]="'map.add.layer.wms' | translate" bodyClass="h-full">
|
|
34
|
-
<div class="p-3
|
|
34
|
+
<div class="p-3">
|
|
35
|
+
<gn-ui-add-layer-from-wms></gn-ui-add-layer-from-wms>
|
|
36
|
+
</div>
|
|
35
37
|
</mat-tab>
|
|
36
38
|
<mat-tab [label]="'map.add.layer.wfs' | translate" bodyClass="h-full">
|
|
37
|
-
<div class="p-3
|
|
39
|
+
<div class="p-3">
|
|
40
|
+
<gn-ui-add-layer-from-wfs></gn-ui-add-layer-from-wfs>
|
|
41
|
+
</div>
|
|
38
42
|
</mat-tab>
|
|
39
43
|
<mat-tab [label]="'map.add.layer.file' | translate" bodyClass="h-full">
|
|
40
|
-
<div class="p-3
|
|
44
|
+
<div class="p-3">
|
|
45
|
+
<gn-ui-add-layer-from-file></gn-ui-add-layer-from-file>
|
|
46
|
+
</div>
|
|
41
47
|
</mat-tab>
|
|
42
48
|
</mat-tab-group>
|
|
43
49
|
</gn-ui-expandable-panel-button>
|
|
@@ -40,6 +40,8 @@ export const DEFAULT_VIEW: MapContextViewModel = {
|
|
|
40
40
|
zoom: 2,
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
export const WFS_MAX_FEATURES = 10000
|
|
44
|
+
|
|
43
45
|
@Injectable({
|
|
44
46
|
providedIn: 'root',
|
|
45
47
|
})
|
|
@@ -111,6 +113,10 @@ export class MapContextService {
|
|
|
111
113
|
urlObj.searchParams.set('typename', layerModel.name)
|
|
112
114
|
urlObj.searchParams.set('srsname', 'EPSG:3857')
|
|
113
115
|
urlObj.searchParams.set('bbox', `${extent.join(',')},EPSG:3857`)
|
|
116
|
+
urlObj.searchParams.set(
|
|
117
|
+
'maxFeatures',
|
|
118
|
+
WFS_MAX_FEATURES.toString()
|
|
119
|
+
)
|
|
114
120
|
return urlObj.toString()
|
|
115
121
|
},
|
|
116
122
|
strategy: bboxStrategy,
|
package/src/libs/feature/search/src/lib/favorites/favorite-star/favorite-star.component.html
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
<div>
|
|
2
|
-
<span
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<div class="flex flex-row content-center">
|
|
2
|
+
<span
|
|
3
|
+
class="align-text-top mr-1.5 mt-1.5 favorite-count"
|
|
4
|
+
*ngIf="hasFavoriteCount && displayCount"
|
|
5
|
+
>{{ favoriteCount }}</span
|
|
6
|
+
>
|
|
5
7
|
<gn-ui-star-toggle
|
|
6
8
|
[toggled]="isFavorite$ | async"
|
|
7
9
|
(newValue)="toggleFavorite($event)"
|
|
8
10
|
[disabled]="loading || (isAnonymous$ | async)"
|
|
11
|
+
class="mt-1"
|
|
9
12
|
></gn-ui-star-toggle>
|
|
13
|
+
<span
|
|
14
|
+
class="align-text-top ml-1.5 favorite-count mt-1.5"
|
|
15
|
+
*ngIf="!displayCount"
|
|
16
|
+
translate="datahub.record.addToFavorites"
|
|
17
|
+
></span>
|
|
10
18
|
</div>
|
|
@@ -24,6 +24,7 @@ import { PlatformServiceInterface } from '../../../../../../../libs/common/domai
|
|
|
24
24
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
25
25
|
})
|
|
26
26
|
export class FavoriteStarComponent implements AfterViewInit, OnDestroy {
|
|
27
|
+
@Input() displayCount? = true
|
|
27
28
|
@Input() set record(value) {
|
|
28
29
|
this.record_ = value
|
|
29
30
|
this.favoriteCount =
|
|
@@ -34,7 +34,7 @@ export class LanguageSwitcherComponent implements OnInit {
|
|
|
34
34
|
ngOnInit(): void {
|
|
35
35
|
const languages = this.languagePlaceholder || DEFAULT_LANGUAGES
|
|
36
36
|
this.languageList = languages.map((language) => ({
|
|
37
|
-
label:
|
|
37
|
+
label: `${language}`.toUpperCase(),
|
|
38
38
|
value: language,
|
|
39
39
|
}))
|
|
40
40
|
}
|
|
@@ -19,3 +19,5 @@ export * from './lib/related-record-card/related-record-card.component'
|
|
|
19
19
|
export * from './lib/search-results-error/search-results-error.component'
|
|
20
20
|
export * from './lib/user-preview/user-preview.component'
|
|
21
21
|
export * from './lib/record-api-form/record-api-form.component'
|
|
22
|
+
export * from './lib/markdown-parser/markdown-parser.component'
|
|
23
|
+
export * from './lib/image-overlay-preview/image-overlay-preview.component'
|
package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.css
ADDED
|
File without changes
|
package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<gn-ui-content-ghost
|
|
2
|
+
[showContent]="imageUrl !== undefined"
|
|
3
|
+
ghostClass="h-36 mb-3"
|
|
4
|
+
>
|
|
5
|
+
<div
|
|
6
|
+
*ngIf="imageUrl"
|
|
7
|
+
data-cy="record-thumbnail"
|
|
8
|
+
class="flex-shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 h-36 group-hover:shadow-xl group-hover:border-0 mb-3"
|
|
9
|
+
>
|
|
10
|
+
<gn-ui-thumbnail
|
|
11
|
+
class="relative h-full w-full"
|
|
12
|
+
[thumbnailUrl]="imageUrl"
|
|
13
|
+
fit="cover"
|
|
14
|
+
(placeholderShown)="isPlaceholderShown.emit($event)"
|
|
15
|
+
></gn-ui-thumbnail>
|
|
16
|
+
<div class="relative">
|
|
17
|
+
<gn-ui-button
|
|
18
|
+
class="absolute bottom-0 right-0 z-10 mr-2 mb-2"
|
|
19
|
+
[type]="'outline'"
|
|
20
|
+
[extraClass]="'!py-2 !px-0'"
|
|
21
|
+
(buttonClick)="openLightbox(imageUrl)"
|
|
22
|
+
>
|
|
23
|
+
<mat-icon class="material-symbols-outlined font-extralight"
|
|
24
|
+
>zoom_out_map</mat-icon
|
|
25
|
+
>
|
|
26
|
+
</gn-ui-button>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</gn-ui-content-ghost>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core'
|
|
2
|
+
import * as basicLightbox from 'basiclightbox'
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'gn-ui-image-overlay-preview',
|
|
6
|
+
templateUrl: './image-overlay-preview.component.html',
|
|
7
|
+
styleUrls: ['./image-overlay-preview.component.css'],
|
|
8
|
+
})
|
|
9
|
+
export class ImageOverlayPreviewComponent {
|
|
10
|
+
@Input() imageUrl: string
|
|
11
|
+
@Output() isPlaceholderShown = new EventEmitter<boolean>()
|
|
12
|
+
openLightbox(src: string) {
|
|
13
|
+
basicLightbox.create(`<img src="${src}"/>`).show()
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/** Body **/
|
|
2
|
+
:host /deep/ .markdown-body {
|
|
3
|
+
-ms-text-size-adjust: 100%;
|
|
4
|
+
-webkit-text-size-adjust: 100%;
|
|
5
|
+
margin: 0px 0px 1.5rem 0px;
|
|
6
|
+
line-height: 1.5;
|
|
7
|
+
word-wrap: break-word;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** Emphasis **/
|
|
11
|
+
|
|
12
|
+
:host /deep/ .markdown-body strong {
|
|
13
|
+
@apply font-bold;
|
|
14
|
+
color: var(--color-secondary-darker);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Headings **/
|
|
18
|
+
|
|
19
|
+
:host /deep/ .markdown-body h1,
|
|
20
|
+
:host /deep/ .markdown-body h2,
|
|
21
|
+
:host /deep/ .markdown-body h3,
|
|
22
|
+
:host /deep/ .markdown-body h4,
|
|
23
|
+
:host /deep/ .markdown-body h5,
|
|
24
|
+
:host /deep/ .markdown-body h6 {
|
|
25
|
+
margin-top: 24px;
|
|
26
|
+
margin-bottom: 16px;
|
|
27
|
+
line-height: 1.25;
|
|
28
|
+
@apply text-title font-title font-bold;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host /deep/ .markdown-body h1 {
|
|
32
|
+
margin: 0.67em 0;
|
|
33
|
+
padding-bottom: 0.3em;
|
|
34
|
+
font-size: 2em;
|
|
35
|
+
color: var(--color-primary);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host /deep/ .markdown-body h2 {
|
|
39
|
+
padding-bottom: 0.3em;
|
|
40
|
+
font-size: 1.5em;
|
|
41
|
+
color: var(--color-secondary);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host /deep/ .markdown-body h3 {
|
|
45
|
+
font-size: 1.25em;
|
|
46
|
+
color: var(--color-secondary);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host /deep/ .markdown-body h4 {
|
|
50
|
+
font-size: 1em;
|
|
51
|
+
color: var(--color-secondary);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host /deep/ .markdown-body h5 {
|
|
55
|
+
font-size: 0.875em;
|
|
56
|
+
color: var(--color-secondary);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host /deep/ .markdown-body h6 {
|
|
60
|
+
font-size: 0.85em;
|
|
61
|
+
color: var(--color-secondary-lighter);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Paragraphs **/
|
|
65
|
+
|
|
66
|
+
:host /deep/ .markdown-body p {
|
|
67
|
+
margin-top: 0;
|
|
68
|
+
margin-bottom: 10px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Links **/
|
|
72
|
+
|
|
73
|
+
:host /deep/ .markdown-body p > a {
|
|
74
|
+
margin-top: 0;
|
|
75
|
+
margin-bottom: 10px;
|
|
76
|
+
color: var(--color-primary) !important;
|
|
77
|
+
text-decoration: none !important;
|
|
78
|
+
@apply font-bold;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host /deep/ .markdown-body p > a:hover {
|
|
82
|
+
color: var(--color-primary-darker) !important;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** Blockquotes **/
|
|
86
|
+
|
|
87
|
+
:host /deep/ .markdown-body blockquote {
|
|
88
|
+
margin: 0;
|
|
89
|
+
padding: 0 1em;
|
|
90
|
+
color: var(--color-secondary-lighter);
|
|
91
|
+
border-left: 0.25em solid var(--color-primary-lighter);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Code **/
|
|
95
|
+
|
|
96
|
+
:host /deep/ .markdown-body pre {
|
|
97
|
+
margin-top: 0;
|
|
98
|
+
margin-bottom: 0;
|
|
99
|
+
font-size: 12px;
|
|
100
|
+
background-color: var(--color-gray-100);
|
|
101
|
+
word-wrap: normal;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:host /deep/ .markdown-body pre {
|
|
105
|
+
padding: 16px;
|
|
106
|
+
overflow: auto;
|
|
107
|
+
font-size: 85%;
|
|
108
|
+
line-height: 1.45;
|
|
109
|
+
color: var(--color-secondary);
|
|
110
|
+
border-radius: 6px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:host /deep/ .markdown-body code {
|
|
114
|
+
padding: 0.2em 0.4em;
|
|
115
|
+
margin: 0;
|
|
116
|
+
font-size: 85%;
|
|
117
|
+
white-space: break-spaces;
|
|
118
|
+
border-radius: 6px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:host /deep/ .markdown-body pre code {
|
|
122
|
+
display: inline;
|
|
123
|
+
max-width: auto;
|
|
124
|
+
padding: 0;
|
|
125
|
+
margin: 0;
|
|
126
|
+
overflow: visible;
|
|
127
|
+
line-height: inherit;
|
|
128
|
+
word-wrap: normal;
|
|
129
|
+
border: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Horizontal rules **/
|
|
133
|
+
|
|
134
|
+
:host /deep/ .markdown-body hr {
|
|
135
|
+
box-sizing: content-box;
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
background: transparent;
|
|
138
|
+
border-bottom: 1px solid var(--color-secondary);
|
|
139
|
+
height: 0.15em;
|
|
140
|
+
padding: 0;
|
|
141
|
+
margin: 24px 0;
|
|
142
|
+
background-color: var(--color-secondary);
|
|
143
|
+
border: 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:host /deep/ .markdown-body hr::before {
|
|
147
|
+
display: table;
|
|
148
|
+
content: '';
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
:host /deep/ .markdown-body hr::after {
|
|
152
|
+
display: table;
|
|
153
|
+
clear: both;
|
|
154
|
+
content: '';
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** Lists **/
|
|
158
|
+
|
|
159
|
+
:host /deep/ .markdown-body ul,
|
|
160
|
+
:host /deep/ .markdown-body ol {
|
|
161
|
+
margin-top: 0;
|
|
162
|
+
margin-bottom: 0;
|
|
163
|
+
padding-left: 2em;
|
|
164
|
+
list-style: revert;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:host /deep/ .markdown-body ol ol,
|
|
168
|
+
:host /deep/ .markdown-body ul ol {
|
|
169
|
+
list-style-type: lower-roman;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
:host /deep/ .markdown-body ul ul ol,
|
|
173
|
+
:host /deep/ .markdown-body ul ol ol,
|
|
174
|
+
:host /deep/ .markdown-body ol ul ol,
|
|
175
|
+
:host /deep/ .markdown-body ol ol ol {
|
|
176
|
+
list-style-type: lower-alpha;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:host /deep/ .markdown-body ol[type='a s'] {
|
|
180
|
+
list-style-type: lower-alpha;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
:host /deep/ .markdown-body ol[type='A s'] {
|
|
184
|
+
list-style-type: upper-alpha;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:host /deep/ .markdown-body ol[type='i s'] {
|
|
188
|
+
list-style-type: lower-roman;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:host /deep/ .markdown-body ol[type='I s'] {
|
|
192
|
+
list-style-type: upper-roman;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
:host /deep/ .markdown-body ol[type='1'] {
|
|
196
|
+
list-style: unset;
|
|
197
|
+
list-style-type: decimal;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:host /deep/ .markdown-body div > ol:not([type]) {
|
|
201
|
+
list-style: unset;
|
|
202
|
+
list-style-type: decimal;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/** Table **/
|
|
206
|
+
|
|
207
|
+
:host /deep/ .markdown-body table {
|
|
208
|
+
border-spacing: 0;
|
|
209
|
+
border-collapse: collapse;
|
|
210
|
+
display: block;
|
|
211
|
+
width: max-content;
|
|
212
|
+
max-width: 100%;
|
|
213
|
+
overflow: auto;
|
|
214
|
+
padding-bottom: 15px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
:host /deep/ .markdown-body td,
|
|
218
|
+
:host /deep/ .markdown-body th {
|
|
219
|
+
padding: 0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
:host /deep/ .markdown-body th {
|
|
223
|
+
color: var(--color-secondary);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
:host /deep/ .markdown-body table th,
|
|
227
|
+
:host /deep/ .markdown-body table td {
|
|
228
|
+
padding: 6px 13px;
|
|
229
|
+
border: 1px solid var(--color-gray-500);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:host /deep/ .markdown-body table td > :last-child {
|
|
233
|
+
margin-bottom: 0;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
:host /deep/ .markdown-body table tr {
|
|
237
|
+
background-color: #ffffff;
|
|
238
|
+
border-top: 1px solid var(--color-secondary-lighter);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
:host /deep/ .markdown-body table tr:nth-child(2n) {
|
|
242
|
+
background-color: var(--color-gray-100);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
:host /deep/ .markdown-body table img {
|
|
246
|
+
background-color: transparent;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/** Images **/
|
|
250
|
+
|
|
251
|
+
:host /deep/ .markdown-body img {
|
|
252
|
+
border-style: none;
|
|
253
|
+
max-width: 100%;
|
|
254
|
+
box-sizing: content-box;
|
|
255
|
+
background-color: transparent;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
:host /deep/ .markdown-body img[align='right'] {
|
|
259
|
+
padding-left: 20px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
:host /deep/ .markdown-body img[align='left'] {
|
|
263
|
+
padding-right: 20px;
|
|
264
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div class="markdown-body" [innerHTML]="parsedMarkdown"></div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, Input, ChangeDetectionStrategy } from '@angular/core'
|
|
2
|
+
import { marked } from 'marked'
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'gn-ui-markdown-parser',
|
|
6
|
+
templateUrl: './markdown-parser.component.html',
|
|
7
|
+
styleUrls: ['./markdown-parser.component.css'],
|
|
8
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
|
+
})
|
|
10
|
+
export class MarkdownParserComponent {
|
|
11
|
+
@Input() textContent: string
|
|
12
|
+
|
|
13
|
+
get parsedMarkdown() {
|
|
14
|
+
return marked.parse(this.textContent)
|
|
15
|
+
}
|
|
16
|
+
}
|