geonetwork-ui 2.2.0-dev.81737006 → 2.2.0-dev.886aae61
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/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 +5 -2
- package/esm2022/libs/feature/map/src/lib/layers-panel/layers-panel.component.mjs +4 -3
- package/esm2022/libs/ui/elements/src/index.mjs +2 -1
- package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +17 -0
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +4 -3
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +8 -3
- package/esm2022/translations/de.json +4 -0
- package/esm2022/translations/en.json +4 -0
- package/esm2022/translations/es.json +4 -0
- package/esm2022/translations/fr.json +4 -0
- package/esm2022/translations/it.json +4 -0
- package/esm2022/translations/nl.json +4 -0
- package/esm2022/translations/pt.json +4 -0
- package/fesm2022/geonetwork-ui.mjs +108 -8
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- 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 +13 -12
- package/libs/feature/map/src/lib/feature-map.module.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +1 -0
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- 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/ui-elements.module.d.ts +12 -11
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/package.json +1 -1
- 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 +2 -0
- package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.html +3 -1
- package/src/libs/ui/elements/src/index.ts +1 -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-info/metadata-info.component.html +3 -5
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -0
- package/translations/de.json +4 -0
- package/translations/en.json +4 -0
- package/translations/es.json +4 -0
- package/translations/fr.json +4 -0
- package/translations/it.json +4 -0
- package/translations/nl.json +4 -0
- package/translations/pt.json +4 -0
- package/translations/sk.json +4 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnInit } from '@angular/core';
|
|
2
|
+
import { WmsEndpoint, WmsLayerSummary } from '@camptocamp/ogc-client';
|
|
3
|
+
import { MapFacade } from '../+state/map.facade';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class AddLayerFromWmsComponent implements OnInit {
|
|
7
|
+
private mapFacade;
|
|
8
|
+
private changeDetectorRef;
|
|
9
|
+
wmsUrl: string;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
layers: WmsLayerSummary[];
|
|
12
|
+
wmsEndpoint: WmsEndpoint | null;
|
|
13
|
+
urlChange: Subject<string>;
|
|
14
|
+
errorMessage: string | null;
|
|
15
|
+
constructor(mapFacade: MapFacade, changeDetectorRef: ChangeDetectorRef);
|
|
16
|
+
ngOnInit(): void;
|
|
17
|
+
loadLayers(): Promise<void>;
|
|
18
|
+
addLayer(layer: WmsLayerSummary): void;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AddLayerFromWmsComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AddLayerFromWmsComponent, "gn-ui-add-layer-from-wms", never, {}, {}, never, never, false, never>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=add-layer-from-wms.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-layer-from-wms.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAKhD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;;AAG9B,qBAKa,wBAAyB,YAAW,MAAM;IASnD,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,iBAAiB;IAT3B,MAAM,SAAK;IACX,OAAO,UAAQ;IACf,MAAM,EAAE,eAAe,EAAE,CAAK;IAC9B,WAAW,EAAE,WAAW,GAAG,IAAI,CAAO;IACtC,SAAS,kBAAwB;IACjC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;gBAGxB,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,iBAAiB;IAG9C,QAAQ;IAIF,UAAU;IAsBhB,QAAQ,CAAC,KAAK,EAAE,eAAe;yCAvCpB,wBAAwB;2CAAxB,wBAAwB;CA+CpC"}
|
|
@@ -5,20 +5,21 @@ import * as i3 from "./layers-panel/layers-panel.component";
|
|
|
5
5
|
import * as i4 from "./add-layer-from-catalog/add-layer-from-catalog.component";
|
|
6
6
|
import * as i5 from "./map-container/map-container.component";
|
|
7
7
|
import * as i6 from "./add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component";
|
|
8
|
-
import * as i7 from "
|
|
9
|
-
import * as i8 from "
|
|
10
|
-
import * as i9 from "../../../../ui/
|
|
11
|
-
import * as i10 from "
|
|
12
|
-
import * as i11 from "@angular/material/
|
|
13
|
-
import * as i12 from "@
|
|
14
|
-
import * as i13 from "
|
|
15
|
-
import * as i14 from "
|
|
16
|
-
import * as i15 from "@ngrx/
|
|
17
|
-
import * as i16 from "
|
|
18
|
-
import * as i17 from "../../../../ui/
|
|
8
|
+
import * as i7 from "./add-layer-from-wms/add-layer-from-wms.component";
|
|
9
|
+
import * as i8 from "@angular/common";
|
|
10
|
+
import * as i9 from "../../../../ui/map/src/lib/ui-map.module";
|
|
11
|
+
import * as i10 from "../../../../ui/layout/src/lib/ui-layout.module";
|
|
12
|
+
import * as i11 from "@angular/material/icon";
|
|
13
|
+
import * as i12 from "@angular/material/tabs";
|
|
14
|
+
import * as i13 from "@ngx-translate/core";
|
|
15
|
+
import * as i14 from "../../../search/src/lib/feature-search.module";
|
|
16
|
+
import * as i15 from "@ngrx/store";
|
|
17
|
+
import * as i16 from "@ngrx/effects";
|
|
18
|
+
import * as i17 from "../../../../ui/elements/src/lib/ui-elements.module";
|
|
19
|
+
import * as i18 from "../../../../ui/inputs/src/lib/ui-inputs.module";
|
|
19
20
|
export declare class FeatureMapModule {
|
|
20
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<FeatureMapModule, never>;
|
|
21
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FeatureMapModule, [typeof i1.MapContextComponent, typeof i2.MapInstanceDirective, typeof i3.LayersPanelComponent, typeof i4.AddLayerFromCatalogComponent, typeof i5.MapContainerComponent, typeof i6.AddLayerRecordPreviewComponent], [typeof
|
|
22
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FeatureMapModule, [typeof i1.MapContextComponent, typeof i2.MapInstanceDirective, typeof i3.LayersPanelComponent, typeof i4.AddLayerFromCatalogComponent, typeof i5.MapContainerComponent, typeof i6.AddLayerRecordPreviewComponent, typeof i7.AddLayerFromWmsComponent], [typeof i8.CommonModule, typeof i9.UiMapModule, typeof i10.UiLayoutModule, typeof i11.MatIconModule, typeof i12.MatTabsModule, typeof i13.TranslateModule, typeof i14.FeatureSearchModule, typeof i15.StoreFeatureModule, typeof i16.EffectsFeatureModule, typeof i17.UiElementsModule, typeof i18.UiInputsModule], [typeof i1.MapContextComponent, typeof i2.MapInstanceDirective, typeof i3.LayersPanelComponent, typeof i4.AddLayerFromCatalogComponent, typeof i5.MapContainerComponent]>;
|
|
22
23
|
static ɵinj: i0.ɵɵInjectorDeclaration<FeatureMapModule>;
|
|
23
24
|
}
|
|
24
25
|
//# sourceMappingURL=feature-map.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-map.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/feature/map/src/lib/feature-map.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature-map.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/feature/map/src/lib/feature-map.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAwBA,qBAsCa,gBAAgB;yCAAhB,gBAAgB;0CAAhB,gBAAgB;0CAAhB,gBAAgB;CAAG"}
|
|
@@ -19,4 +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';
|
|
22
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/ui/elements/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,6CAA6C,CAAA;AAC3D,cAAc,mDAAmD,CAAA;AACjE,cAAc,mDAAmD,CAAA;AACjE,cAAc,mDAAmD,CAAA;AACjE,cAAc,6DAA6D,CAAA;AAC3E,cAAc,2DAA2D,CAAA;AACzE,cAAc,qCAAqC,CAAA;AACnD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,uDAAuD,CAAA;AACrE,cAAc,mCAAmC,CAAA;AACjD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6CAA6C,CAAA;AAC3D,cAAc,6CAA6C,CAAA;AAC3D,cAAc,+CAA+C,CAAA;AAC7D,cAAc,qCAAqC,CAAA;AACnD,cAAc,uCAAuC,CAAA;AACrD,cAAc,yDAAyD,CAAA;AACvE,cAAc,2DAA2D,CAAA;AACzE,cAAc,2CAA2C,CAAA;AACzD,cAAc,iDAAiD,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/ui/elements/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,6CAA6C,CAAA;AAC3D,cAAc,mDAAmD,CAAA;AACjE,cAAc,mDAAmD,CAAA;AACjE,cAAc,mDAAmD,CAAA;AACjE,cAAc,6DAA6D,CAAA;AAC3E,cAAc,2DAA2D,CAAA;AACzE,cAAc,qCAAqC,CAAA;AACnD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,uDAAuD,CAAA;AACrE,cAAc,mCAAmC,CAAA;AACjD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6CAA6C,CAAA;AAC3D,cAAc,6CAA6C,CAAA;AAC3D,cAAc,+CAA+C,CAAA;AAC7D,cAAc,qCAAqC,CAAA;AACnD,cAAc,uCAAuC,CAAA;AACrD,cAAc,yDAAyD,CAAA;AACvE,cAAc,2DAA2D,CAAA;AACzE,cAAc,2CAA2C,CAAA;AACzD,cAAc,iDAAiD,CAAA;AAC/D,cAAc,iDAAiD,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class MarkdownParserComponent {
|
|
3
|
+
textContent: string;
|
|
4
|
+
get parsedMarkdown(): string | Promise<string>;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownParserComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MarkdownParserComponent, "gn-ui-markdown-parser", never, { "textContent": { "alias": "textContent"; "required": false; }; }, {}, never, never, false, never>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=markdown-parser.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-parser.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts"],"names":[],"mappings":";AAGA,qBAMa,uBAAuB;IACzB,WAAW,EAAE,MAAM,CAAA;IAE5B,IAAI,cAAc,6BAEjB;yCALU,uBAAuB;2CAAvB,uBAAuB;CAMnC"}
|
|
@@ -19,19 +19,20 @@ import * as i17 from "./metadata-info/linkify.directive";
|
|
|
19
19
|
import * as i18 from "./pagination-buttons/pagination-buttons.component";
|
|
20
20
|
import * as i19 from "./max-lines/max-lines.component";
|
|
21
21
|
import * as i20 from "./record-api-form/record-api-form.component";
|
|
22
|
-
import * as i21 from "
|
|
23
|
-
import * as i22 from "@angular/
|
|
24
|
-
import * as i23 from "@angular/material/
|
|
25
|
-
import * as i24 from "
|
|
26
|
-
import * as i25 from "../../../
|
|
27
|
-
import * as i26 from "
|
|
28
|
-
import * as i27 from "
|
|
29
|
-
import * as i28 from "
|
|
30
|
-
import * as i29 from "
|
|
31
|
-
import * as i30 from "
|
|
22
|
+
import * as i21 from "./markdown-parser/markdown-parser.component";
|
|
23
|
+
import * as i22 from "@angular/common";
|
|
24
|
+
import * as i23 from "@angular/material/icon";
|
|
25
|
+
import * as i24 from "@angular/material/tooltip";
|
|
26
|
+
import * as i25 from "../../../widgets/src/lib/ui-widgets.module";
|
|
27
|
+
import * as i26 from "../../../layout/src/lib/ui-layout.module";
|
|
28
|
+
import * as i27 from "@ngx-translate/core";
|
|
29
|
+
import * as i28 from "../../../../util/shared/src/lib/util-shared.module";
|
|
30
|
+
import * as i29 from "@angular/router";
|
|
31
|
+
import * as i30 from "../../../inputs/src/lib/ui-inputs.module";
|
|
32
|
+
import * as i31 from "@angular/forms";
|
|
32
33
|
export declare class UiElementsModule {
|
|
33
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiElementsModule, never>;
|
|
34
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<UiElementsModule, [typeof i1.MetadataInfoComponent, typeof i2.ContentGhostComponent, typeof i3.DownloadItemComponent, typeof i4.DownloadsListComponent, typeof i5.ApiCardComponent, typeof i6.LinkCardComponent, typeof i7.RelatedRecordCardComponent, typeof i8.MetadataContactComponent, typeof i9.MetadataCatalogComponent, typeof i10.MetadataQualityComponent, typeof i11.MetadataQualityItemComponent, typeof i12.SearchResultsErrorComponent, typeof i13.PaginationComponent, typeof i14.ThumbnailComponent, typeof i15.AvatarComponent, typeof i16.UserPreviewComponent, typeof i17.GnUiLinkifyDirective, typeof i18.PaginationButtonsComponent, typeof i19.MaxLinesComponent, typeof i20.RecordApiFormComponent], [typeof
|
|
35
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<UiElementsModule, [typeof i1.MetadataInfoComponent, typeof i2.ContentGhostComponent, typeof i3.DownloadItemComponent, typeof i4.DownloadsListComponent, typeof i5.ApiCardComponent, typeof i6.LinkCardComponent, typeof i7.RelatedRecordCardComponent, typeof i8.MetadataContactComponent, typeof i9.MetadataCatalogComponent, typeof i10.MetadataQualityComponent, typeof i11.MetadataQualityItemComponent, typeof i12.SearchResultsErrorComponent, typeof i13.PaginationComponent, typeof i14.ThumbnailComponent, typeof i15.AvatarComponent, typeof i16.UserPreviewComponent, typeof i17.GnUiLinkifyDirective, typeof i18.PaginationButtonsComponent, typeof i19.MaxLinesComponent, typeof i20.RecordApiFormComponent, typeof i21.MarkdownParserComponent], [typeof i22.CommonModule, typeof i23.MatIconModule, typeof i24.MatTooltipModule, typeof i25.UiWidgetsModule, typeof i26.UiLayoutModule, typeof i27.TranslateModule, typeof i28.UtilSharedModule, typeof i29.RouterModule, typeof i30.UiInputsModule, typeof i31.FormsModule, typeof i22.NgOptimizedImage], [typeof i1.MetadataInfoComponent, typeof i2.ContentGhostComponent, typeof i3.DownloadItemComponent, typeof i4.DownloadsListComponent, typeof i5.ApiCardComponent, typeof i6.LinkCardComponent, typeof i7.RelatedRecordCardComponent, typeof i8.MetadataContactComponent, typeof i9.MetadataCatalogComponent, typeof i10.MetadataQualityComponent, typeof i11.MetadataQualityItemComponent, typeof i12.SearchResultsErrorComponent, typeof i13.PaginationComponent, typeof i14.ThumbnailComponent, typeof i15.AvatarComponent, typeof i16.UserPreviewComponent, typeof i18.PaginationButtonsComponent, typeof i20.RecordApiFormComponent, typeof i21.MarkdownParserComponent]>;
|
|
35
36
|
static ɵinj: i0.ɵɵInjectorDeclaration<UiElementsModule>;
|
|
36
37
|
}
|
|
37
38
|
//# sourceMappingURL=ui-elements.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-elements.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/elements/src/lib/ui-elements.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ui-elements.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/elements/src/lib/ui-elements.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,qBA2Da,gBAAgB;yCAAhB,gBAAgB;0CAAhB,gBAAgB;0CAAhB,gBAAgB;CAAG"}
|
package/package.json
CHANGED
|
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,7 @@ 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'
|
|
23
24
|
|
|
24
25
|
@NgModule({
|
|
25
26
|
declarations: [
|
|
@@ -29,6 +30,7 @@ import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
|
|
|
29
30
|
AddLayerFromCatalogComponent,
|
|
30
31
|
MapContainerComponent,
|
|
31
32
|
AddLayerRecordPreviewComponent,
|
|
33
|
+
AddLayerFromWmsComponent,
|
|
32
34
|
],
|
|
33
35
|
exports: [
|
|
34
36
|
MapContextComponent,
|
|
@@ -31,7 +31,9 @@
|
|
|
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
39
|
<div class="p-3 h-full">Add from WFS</div>
|
|
@@ -19,3 +19,4 @@ 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'
|
|
@@ -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
|
+
}
|
|
@@ -8,11 +8,9 @@
|
|
|
8
8
|
<gn-ui-content-ghost ghostClass="h-32" [showContent]="fieldReady('abstract')">
|
|
9
9
|
<gn-ui-max-lines [maxLines]="6" *ngIf="metadata.abstract">
|
|
10
10
|
<div>
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
gnUiLinkify
|
|
15
|
-
></p>
|
|
11
|
+
<gn-ui-markdown-parser
|
|
12
|
+
[textContent]="metadata.abstract"
|
|
13
|
+
></gn-ui-markdown-parser>
|
|
16
14
|
<ng-container *ngIf="metadata.keywords?.length">
|
|
17
15
|
<p class="mb-3 font-medium text-primary text-sm" translate>
|
|
18
16
|
record.metadata.keywords
|
|
@@ -29,6 +29,7 @@ import { GnUiLinkifyDirective } from './metadata-info/linkify.directive'
|
|
|
29
29
|
import { PaginationButtonsComponent } from './pagination-buttons/pagination-buttons.component'
|
|
30
30
|
import { MaxLinesComponent } from './max-lines/max-lines.component'
|
|
31
31
|
import { RecordApiFormComponent } from './record-api-form/record-api-form.component'
|
|
32
|
+
import { MarkdownParserComponent } from './markdown-parser/markdown-parser.component'
|
|
32
33
|
|
|
33
34
|
@NgModule({
|
|
34
35
|
imports: [
|
|
@@ -65,6 +66,7 @@ import { RecordApiFormComponent } from './record-api-form/record-api-form.compon
|
|
|
65
66
|
PaginationButtonsComponent,
|
|
66
67
|
MaxLinesComponent,
|
|
67
68
|
RecordApiFormComponent,
|
|
69
|
+
MarkdownParserComponent,
|
|
68
70
|
],
|
|
69
71
|
exports: [
|
|
70
72
|
MetadataInfoComponent,
|
|
@@ -85,6 +87,7 @@ import { RecordApiFormComponent } from './record-api-form/record-api-form.compon
|
|
|
85
87
|
UserPreviewComponent,
|
|
86
88
|
PaginationButtonsComponent,
|
|
87
89
|
RecordApiFormComponent,
|
|
90
|
+
MarkdownParserComponent,
|
|
88
91
|
],
|
|
89
92
|
})
|
|
90
93
|
export class UiElementsModule {}
|
package/translations/de.json
CHANGED
|
@@ -175,10 +175,14 @@
|
|
|
175
175
|
"map.add.layer.file": "Aus einer Datei",
|
|
176
176
|
"map.add.layer.wfs": "Aus WFS",
|
|
177
177
|
"map.add.layer.wms": "Aus WMS",
|
|
178
|
+
"map.layer.add": "",
|
|
179
|
+
"map.layers.available": "",
|
|
178
180
|
"map.layers.list": "Ebenen",
|
|
179
181
|
"map.loading.data": "Kartendaten werden geladen...",
|
|
182
|
+
"map.loading.service": "",
|
|
180
183
|
"map.navigation.message": "Bitte verwenden Sie STRG + Maus (oder zwei Finger auf einem Mobilgerät), um die Karte zu navigieren",
|
|
181
184
|
"map.select.layer": "Datenquelle",
|
|
185
|
+
"map.wms.urlInput.hint": "",
|
|
182
186
|
"multiselect.filter.placeholder": "Suche",
|
|
183
187
|
"nav.back": "Zurück",
|
|
184
188
|
"next": "weiter",
|