geonetwork-ui 2.2.0-dev.2a6e8d6d → 2.2.0-dev.34bd9854
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 +2 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +36 -2
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/feature/editor/src/lib/record-form/record-form.component.mjs +5 -3
- package/esm2022/libs/feature/map/src/index.mjs +2 -1
- package/esm2022/libs/feature/map/src/lib/constant/index.mjs +2 -1
- package/esm2022/libs/feature/map/src/lib/constant/projections.mjs +2 -0
- package/esm2022/libs/feature/map/src/lib/feature-map.module.mjs +10 -1
- package/esm2022/libs/feature/map/src/lib/geocoding/geocoding.component.mjs +32 -15
- package/esm2022/libs/feature/map/src/lib/geocoding.service.mjs +40 -0
- package/esm2022/libs/feature/map/src/lib/utils/index.mjs +1 -3
- package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +60 -29
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +29 -20
- package/esm2022/libs/feature/search/src/lib/state/effects.mjs +5 -3
- package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/editable-label/editable-label.directive.mjs +46 -0
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +8 -3
- package/esm2022/libs/ui/search/src/lib/record-table/record-table.component.mjs +3 -3
- package/esm2022/translations/fr.json +1 -1
- package/fesm2022/geonetwork-ui.mjs +238 -101
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts +1 -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/common/domain/src/lib/model/record/metadata.model.d.ts +9 -5
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/record-form/record-form.component.d.ts.map +1 -1
- package/libs/feature/map/src/index.d.ts +1 -0
- package/libs/feature/map/src/index.d.ts.map +1 -1
- package/libs/feature/map/src/lib/constant/index.d.ts +1 -0
- package/libs/feature/map/src/lib/constant/index.d.ts.map +1 -1
- package/libs/feature/map/src/lib/constant/projections.d.ts.map +1 -0
- package/libs/feature/map/src/lib/feature-map.module.d.ts.map +1 -1
- package/libs/feature/map/src/lib/geocoding/geocoding.component.d.ts +6 -1
- package/libs/feature/map/src/lib/geocoding/geocoding.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/geocoding.service.d.ts +18 -0
- package/libs/feature/map/src/lib/geocoding.service.d.ts.map +1 -0
- package/libs/feature/map/src/lib/utils/index.d.ts +0 -2
- package/libs/feature/map/src/lib/utils/index.d.ts.map +1 -1
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts +13 -11
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +1 -3
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/state/effects.d.ts.map +1 -1
- package/libs/ui/dataviz/src/lib/chart/chart.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/editable-label/editable-label.directive.d.ts +13 -0
- package/libs/ui/inputs/src/lib/editable-label/editable-label.directive.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +2 -1
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts +3 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +43 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +11 -7
- package/src/libs/feature/editor/src/lib/record-form/record-form.component.ts +2 -1
- package/src/libs/feature/map/src/index.ts +1 -0
- package/src/libs/feature/map/src/lib/constant/index.ts +1 -0
- package/src/libs/feature/map/src/lib/feature-map.module.ts +5 -0
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.ts +27 -11
- package/src/libs/feature/map/src/lib/geocoding.service.ts +59 -0
- package/src/libs/feature/map/src/lib/utils/index.ts +0 -2
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +85 -50
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +18 -3
- package/src/libs/feature/search/src/lib/state/effects.ts +4 -3
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +3 -2
- package/src/libs/ui/elements/src/lib/metadata-contact/metadata-contact.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/editable-label/editable-label.directive.ts +48 -0
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -0
- package/src/libs/ui/search/src/lib/record-table/record-table.component.html +2 -2
- package/translations/fr.json +1 -1
- package/esm2022/libs/feature/map/src/lib/utils/map-utils-wms.service.mjs +0 -55
- package/esm2022/libs/feature/map/src/lib/utils/projections.mjs +0 -2
- package/libs/feature/map/src/lib/utils/map-utils-wms.service.d.ts +0 -17
- package/libs/feature/map/src/lib/utils/map-utils-wms.service.d.ts.map +0 -1
- package/libs/feature/map/src/lib/utils/projections.d.ts.map +0 -1
- package/src/libs/feature/map/src/lib/utils/map-utils-wms.service.ts +0 -58
- /package/libs/feature/map/src/lib/{utils → constant}/projections.d.ts +0 -0
- /package/src/libs/feature/map/src/lib/{utils → constant}/projections.ts +0 -0
|
@@ -9,6 +9,7 @@ export declare const selectTranslatedValue: <T>(source: SourceWithUnknownProps,
|
|
|
9
9
|
export declare const selectTranslatedField: <T>(source: SourceWithUnknownProps, fieldName: string, lang3: string) => T;
|
|
10
10
|
export declare const toDate: (field: any) => Date;
|
|
11
11
|
export declare const getFirstValue: (field: any) => any;
|
|
12
|
+
export declare const getArrayItem: (field: any, index: any) => any;
|
|
12
13
|
export declare const getAsArray: (field: any) => any[];
|
|
13
14
|
export declare const getAsUrl: (field: any, location?: string) => URL;
|
|
14
15
|
export declare const mapLogo: (source: SourceWithUnknownProps) => URL;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atomic-operations.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACb,MAAM,2DAA2D,CAAA;AAGlE,MAAM,MAAM,sBAAsB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAA;AAE/D,eAAO,MAAM,WAAW,cACd,sBAAsB,aACnB,MAAM,MAEuD,CAAA;AAE1E,eAAO,MAAM,oBAAoB,cACvB,sBAAsB,iBACf,MAAM,EAAE,MAKtB,CAAA;AAEH,eAAO,MAAM,cAAc,wCACQ,CAAA;AAEnC,eAAO,MAAM,qBAAqB,cACxB,sBAAsB,SACvB,MAAM,MAE6D,CAAA;AAE5E,eAAO,MAAM,qBAAqB,cACxB,sBAAsB,aACnB,MAAM,SACV,MAAM,MAC4D,CAAA;AAE3E,eAAO,MAAM,MAAM,sBAA6B,CAAA;AAEhD,eAAO,MAAM,aAAa,qBACe,CAAA;AAEzC,eAAO,MAAM,UAAU,uBACuC,CAAA;AAE9D,eAAO,MAAM,QAAQ,0BAET,MAAM,QAWjB,CAAA;AAED,eAAO,MAAM,OAAO,WAAY,sBAAsB,QAGrD,CAAA;AAED,eAAO,MAAM,eAAe,kBACX,sBAAsB,SAC9B,MAAM,KACZ,YAWF,CAAA;AAED,eAAO,MAAM,UAAU,kBACN,sBAAsB,SAC9B,MAAM,KACZ,UAWF,CAAA"}
|
|
1
|
+
{"version":3,"file":"atomic-operations.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACb,MAAM,2DAA2D,CAAA;AAGlE,MAAM,MAAM,sBAAsB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAA;AAE/D,eAAO,MAAM,WAAW,cACd,sBAAsB,aACnB,MAAM,MAEuD,CAAA;AAE1E,eAAO,MAAM,oBAAoB,cACvB,sBAAsB,iBACf,MAAM,EAAE,MAKtB,CAAA;AAEH,eAAO,MAAM,cAAc,wCACQ,CAAA;AAEnC,eAAO,MAAM,qBAAqB,cACxB,sBAAsB,SACvB,MAAM,MAE6D,CAAA;AAE5E,eAAO,MAAM,qBAAqB,cACxB,sBAAsB,aACnB,MAAM,SACV,MAAM,MAC4D,CAAA;AAE3E,eAAO,MAAM,MAAM,sBAA6B,CAAA;AAEhD,eAAO,MAAM,aAAa,qBACe,CAAA;AAEzC,eAAO,MAAM,YAAY,iCACiD,CAAA;AAE1E,eAAO,MAAM,UAAU,uBACuC,CAAA;AAE9D,eAAO,MAAM,QAAQ,0BAET,MAAM,QAWjB,CAAA;AAED,eAAO,MAAM,OAAO,WAAY,sBAAsB,QAGrD,CAAA;AAED,eAAO,MAAM,eAAe,kBACX,sBAAsB,SAC9B,MAAM,KACZ,YAWF,CAAA;AAED,eAAO,MAAM,UAAU,kBACN,sBAAsB,SAC9B,MAAM,KACZ,UAWF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gn4.field.mapper.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"gn4.field.mapper.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAWL,sBAAsB,EAEvB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAI3D,OAAO,EAEL,aAAa,EACb,mBAAmB,EACnB,uBAAuB,EAKxB,MAAM,2DAA2D,CAAA;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAA;;AAElE,KAAK,gBAAgB,GAAG,sBAAsB,CAAA;AAE9C,KAAK,eAAe,GAAG,CACrB,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,EAC9B,MAAM,EAAE,gBAAgB,KACrB,OAAO,CAAC,aAAa,CAAC,CAAA;AAE3B,qBAGa,cAAc;IAEvB,OAAO,CAAC,kBAAkB;IAC1B,OAAO,CAAC,WAAW;gBADX,kBAAkB,EAAE,kBAAkB,EACtC,WAAW,EAAE,WAAW;IAGlC,OAAO,CAAC,KAAK,CAA0B;IAEvC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CA8PhD;IAED,OAAO,CAAC,YAAY,CAAqB;IAEzC,OAAO,CAAC,eAAe,CAmCrB;IAEF,OAAO,CAAC,kBAAkB;IAY1B,YAAY,CAAC,SAAS,EAAE,MAAM;IAI9B,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,uBAAuB;IAmBpE,OAAO,eACO,sBAAsB,KACjC,mBAAmB,GAAG,IAAI,CA2D5B;IAED,OAAO,CAAC,QAAQ,CAGd;yCApZS,cAAc;6CAAd,cAAc;CAqZ1B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Individual } from './contact.model';
|
|
2
|
-
import { Organization } from './organization.model';
|
|
1
|
+
import type { Individual } from './contact.model';
|
|
2
|
+
import type { Organization } from './organization.model';
|
|
3
|
+
import type { Geometry } from 'geojson';
|
|
3
4
|
type Uuid = string;
|
|
4
5
|
export type UpdateFrequencyCode = 'unknown' | 'notPlanned' | 'asNeeded' | 'irregular' | 'continual' | 'periodic';
|
|
5
6
|
export type UpdateFrequencyCustom = {
|
|
@@ -73,12 +74,15 @@ export interface GraphicOverview {
|
|
|
73
74
|
description?: string;
|
|
74
75
|
}
|
|
75
76
|
export interface DatasetSpatialExtent {
|
|
76
|
-
geometry:
|
|
77
|
+
geometry: Geometry;
|
|
77
78
|
description?: string;
|
|
78
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* At least a start or an end date should be provided
|
|
82
|
+
*/
|
|
79
83
|
export interface DatasetTemporalExtent {
|
|
80
|
-
start
|
|
81
|
-
end
|
|
84
|
+
start?: Date;
|
|
85
|
+
end?: Date;
|
|
82
86
|
description?: string;
|
|
83
87
|
}
|
|
84
88
|
export interface DatasetRecord extends BaseRecord {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/common/domain/src/lib/model/record/metadata.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"metadata.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/common/domain/src/lib/model/record/metadata.model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,KAAK,IAAI,GAAG,MAAM,CAAA;AASlB,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,YAAY,GACZ,UAAU,GACV,WAAW,GACX,WAAW,GACX,UAAU,CAAA;AAOd,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,EAAE,MAAM,CAAA;IACpB,GAAG,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;CACvC,CAAA;AACD,MAA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
1
|
-
{"version":3,"file":"record-form.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/editor/src/lib/record-form/record-form.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;;
|
|
1
|
+
{"version":3,"file":"record-form.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/editor/src/lib/record-form/record-form.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;;AAGrE,qBAQa,mBAAmB;IACX,aAAa,EAAE,aAAa;gBAA5B,aAAa,EAAE,aAAa;IAE/C,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;IAIxD,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS;yCAPjC,mBAAmB;2CAAnB,mBAAmB;CAU/B"}
|
|
@@ -17,4 +17,5 @@ export * from './lib/layers-panel/layers-panel.component';
|
|
|
17
17
|
export * from './lib/add-layer-from-catalog/add-layer-from-catalog.component';
|
|
18
18
|
export * from './lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component';
|
|
19
19
|
export * from './lib/map-container/map-container.component';
|
|
20
|
+
export * from './lib/geocoding/geocoding.component';
|
|
20
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/feature/map/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mCAAmC,CAAA;AACjD,cAAc,sCAAsC,CAAA;AACpD,cAAc,yCAAyC,CAAA;AACvD,cAAc,qCAAqC,CAAA;AACnD,cAAc,uCAAuC,CAAA;AACrD,cAAc,mDAAmD,CAAA;AACjE,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,2CAA2C,CAAA;AACzD,cAAc,+DAA+D,CAAA;AAC7E,cAAc,0FAA0F,CAAA;AACxG,cAAc,6CAA6C,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/feature/map/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mCAAmC,CAAA;AACjD,cAAc,sCAAsC,CAAA;AACpD,cAAc,yCAAyC,CAAA;AACvD,cAAc,qCAAqC,CAAA;AACnD,cAAc,uCAAuC,CAAA;AACrD,cAAc,mDAAmD,CAAA;AACjE,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,2CAA2C,CAAA;AACzD,cAAc,+DAA+D,CAAA;AAC7E,cAAc,0FAA0F,CAAA;AACxG,cAAc,6CAA6C,CAAA;AAC3D,cAAc,qCAAqC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/constant/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/constant/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projections.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/constant/projections.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,UAA0B,CAAA"}
|
|
@@ -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":";;;;;;;;;;;;;;;;;;;;;;AA4BA,qBA8Ca,gBAAgB;yCAAhB,gBAAgB;0CAAhB,gBAAgB;0CAAhB,gBAAgB;CAAG"}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
import { MapManagerService } from '../manager/map-manager.service';
|
|
4
|
+
import { GeocodingService } from '../geocoding.service';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class GeocodingComponent implements OnDestroy {
|
|
6
7
|
private mapManager;
|
|
8
|
+
private geocodingService;
|
|
7
9
|
searchText: string;
|
|
8
10
|
results: any[];
|
|
9
11
|
searchTextChanged: Subject<string>;
|
|
10
12
|
destroy$: Subject<void>;
|
|
11
|
-
|
|
13
|
+
errorMessage: string | null;
|
|
14
|
+
constructor(mapManager: MapManagerService, geocodingService: GeocodingService);
|
|
12
15
|
ngOnDestroy(): void;
|
|
13
16
|
onSearchChange(searchText: string): void;
|
|
14
17
|
clearSearch(): void;
|
|
15
18
|
zoomToLocation(result: any): void;
|
|
19
|
+
zoomToPoint(pointCoords: [number, number], view: any): void;
|
|
20
|
+
zoomToPolygon(polygonCoords: [[number, number][]], view: any): void;
|
|
16
21
|
onEnterPress(): void;
|
|
17
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<GeocodingComponent, never>;
|
|
18
23
|
static ɵcmp: i0.ɵɵComponentDeclaration<GeocodingComponent, "gn-ui-geocoding", never, {}, {}, never, never, false, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geocoding.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/geocoding/geocoding.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"geocoding.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/geocoding/geocoding.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAoB,OAAO,EAAa,MAAM,MAAM,CAAA;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAGlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;;AAEvD,qBAKa,kBAAmB,YAAW,SAAS;IAQhD,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,gBAAgB;IAR1B,UAAU,SAAK;IACf,OAAO,EAAE,GAAG,EAAE,CAAK;IACnB,iBAAiB,kBAAwB;IACzC,QAAQ,gBAAsB;IAC9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;gBAGxB,UAAU,EAAE,iBAAiB,EAC7B,gBAAgB,EAAE,gBAAgB;IAsB5C,WAAW;IAKX,cAAc,CAAC,UAAU,EAAE,MAAM;IASjC,WAAW;IAMX,cAAc,CAAC,MAAM,EAAE,GAAG;IAc1B,WAAW,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG;IAMpD,aAAa,CAAC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG;IAS5D,YAAY;yCAhFD,kBAAkB;2CAAlB,kBAAkB;CAqF9B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { GeoadminOptions, GeocodingResult, GeonamesOptions, DataGouvFrOptions } from '@geospatial-sdk/geocoding';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
type GeoadminGeocodingProvider = ['geoadmin', GeoadminOptions];
|
|
6
|
+
type GeonamesGeocodingProvider = ['geonames', GeonamesOptions];
|
|
7
|
+
type DataGouvFrGeocodingProvider = ['data-gouv-fr', DataGouvFrOptions];
|
|
8
|
+
export type GeocodingProvider = GeoadminGeocodingProvider | GeonamesGeocodingProvider | DataGouvFrGeocodingProvider;
|
|
9
|
+
export declare const GEOCODING_PROVIDER: InjectionToken<GeocodingProvider>;
|
|
10
|
+
export declare class GeocodingService {
|
|
11
|
+
private provider;
|
|
12
|
+
constructor(provider: GeocodingProvider);
|
|
13
|
+
query(text: string): Observable<GeocodingResult[]>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GeocodingService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GeocodingService>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=geocoding.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geocoding.service.d.ts","sourceRoot":"","sources":["../../../../../src/libs/feature/map/src/lib/geocoding.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,cAAc,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAEL,eAAe,EACf,eAAe,EAEf,eAAe,EACf,iBAAiB,EAElB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAQ,UAAU,EAAc,MAAM,MAAM,CAAA;;AAGnD,KAAK,yBAAyB,GAAG,CAAC,UAAU,EAAE,eAAe,CAAC,CAAA;AAC9D,KAAK,yBAAyB,GAAG,CAAC,UAAU,EAAE,eAAe,CAAC,CAAA;AAC9D,KAAK,2BAA2B,GAAG,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAA;AACtE,MAAM,MAAM,iBAAiB,GACzB,yBAAyB,GACzB,yBAAyB,GACzB,2BAA2B,CAAA;AAE/B,eAAO,MAAM,kBAAkB,mCAE9B,CAAA;AAED,qBAGa,gBAAgB;IAEG,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,iBAAiB;IAGjE,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,eAAe,EAAE,CAAC;yCALvC,gBAAgB;6CAAhB,gBAAgB;CA8B5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
|
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import type { FeatureCollection } from 'geojson';
|
|
3
3
|
import { Extent } from 'ol/extent';
|
|
4
|
-
import
|
|
4
|
+
import Feature from 'ol/Feature';
|
|
5
5
|
import { Geometry } from 'ol/geom';
|
|
6
6
|
import Layer from 'ol/layer/Layer';
|
|
7
7
|
import Map from 'ol/Map';
|
|
8
8
|
import Source from 'ol/source/Source';
|
|
9
|
-
import { DragPan,
|
|
9
|
+
import { DragPan, Interaction, MouseWheelZoom } from 'ol/interaction';
|
|
10
10
|
import { Observable } from 'rxjs';
|
|
11
|
-
import { MapContextLayerModel, MapContextLayerWmtsModel } from '../map-context/map-context.model';
|
|
12
|
-
import { MapUtilsWMSService } from './map-utils-wms.service';
|
|
11
|
+
import { MapContextLayerModel, MapContextLayerWmsModel, MapContextLayerWmtsModel } from '../map-context/map-context.model';
|
|
13
12
|
import Collection from 'ol/Collection';
|
|
14
13
|
import MapBrowserEvent from 'ol/MapBrowserEvent';
|
|
15
|
-
import { DatasetDistribution } from '../../../../../../libs/common/domain/src/lib/model/record';
|
|
14
|
+
import { CatalogRecord, DatasetDistribution } from '../../../../../../libs/common/domain/src/lib/model/record';
|
|
15
|
+
import { ProxyService } from '../../../../../../libs/util/shared/src';
|
|
16
16
|
import * as i0 from "@angular/core";
|
|
17
17
|
export declare class MapUtilsService {
|
|
18
18
|
private http;
|
|
19
|
-
private
|
|
20
|
-
constructor(http: HttpClient,
|
|
19
|
+
private proxy;
|
|
20
|
+
constructor(http: HttpClient, proxy: ProxyService);
|
|
21
21
|
createEmptyMap(): Map;
|
|
22
|
-
readFeatureCollection: (featureCollection: FeatureCollection, featureProjection?: string, dataProjection?: string) =>
|
|
22
|
+
readFeatureCollection: (featureCollection: FeatureCollection, featureProjection?: string, dataProjection?: string) => Feature<Geometry>[];
|
|
23
23
|
isWMSLayer(layer: Layer<Source>): boolean;
|
|
24
24
|
getGFIUrl(layer: any, map: any, coordinate: any): string;
|
|
25
|
-
getVectorFeaturesFromClick(olMap: any, event: any):
|
|
26
|
-
getGFIFeaturesObservablesFromClick(olMap:
|
|
25
|
+
getVectorFeaturesFromClick(olMap: any, event: any): Feature<Geometry>[];
|
|
26
|
+
getGFIFeaturesObservablesFromClick(olMap: Map, event: MapBrowserEvent<PointerEvent>): Observable<Feature<Geometry>[]>[];
|
|
27
27
|
/**
|
|
28
28
|
* Will emit `null` if no extent could be computed
|
|
29
29
|
*/
|
|
30
|
-
getLayerExtent(layer: MapContextLayerModel):
|
|
30
|
+
getLayerExtent(layer: MapContextLayerModel): Promise<Extent | null>;
|
|
31
|
+
getWmsLayerExtent(layer: MapContextLayerWmsModel): Promise<Extent | null>;
|
|
31
32
|
getWmtsLayerFromCapabilities(link: DatasetDistribution): Observable<MapContextLayerWmtsModel>;
|
|
32
33
|
prioritizePageScroll(interactions: Collection<Interaction>): void;
|
|
34
|
+
getRecordExtent(record: Partial<CatalogRecord>): Extent;
|
|
33
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<MapUtilsService, never>;
|
|
34
36
|
static ɵprov: i0.ɵɵInjectableDeclaration<MapUtilsService>;
|
|
35
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-utils.service.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/utils/map-utils.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAU,MAAM,EAAW,MAAM,WAAW,CAAA;AACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"map-utils.service.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/utils/map-utils.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAU,MAAM,EAAW,MAAM,WAAW,CAAA;AACnD,OAAO,OAAO,MAAM,YAAY,CAAA;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,KAAK,MAAM,gBAAgB,CAAA;AAClC,OAAO,GAAG,MAAM,QAAQ,CAAA;AAExB,OAAO,MAAM,MAAM,kBAAkB,CAAA;AAKrC,OAAO,EAAY,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAQ/E,OAAO,EAAQ,UAAU,EAAE,MAAM,MAAM,CAAA;AAEvC,OAAO,EACL,oBAAoB,EAEpB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,kCAAkC,CAAA;AACzC,OAAO,UAAU,MAAM,eAAe,CAAA;AACtC,OAAO,eAAe,MAAM,oBAAoB,CAAA;AAChD,OAAO,EACL,aAAa,EACb,mBAAmB,EACpB,MAAM,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,EAAE,eAAe,CAAC,OAAO,CAAC,WAMhC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FeatureInfoService, MapContextLayerModel, MapContextModel, MapManagerService, MapStyleService, MapUtilsService } from '../../../../../../libs/feature/map/src';
|
|
3
3
|
import { MapConfig } from '../../../../../../libs/util/app-config/src';
|
|
4
|
-
import { ProxyService } from '../../../../../../libs/util/shared/src';
|
|
5
4
|
import Feature from 'ol/Feature';
|
|
6
5
|
import { Geometry } from 'ol/geom';
|
|
7
6
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
@@ -14,7 +13,6 @@ export declare class MapViewComponent implements OnInit, OnDestroy {
|
|
|
14
13
|
private mapManager;
|
|
15
14
|
private mapUtils;
|
|
16
15
|
private dataService;
|
|
17
|
-
private proxy;
|
|
18
16
|
private featureInfo;
|
|
19
17
|
private changeRef;
|
|
20
18
|
private styleService;
|
|
@@ -33,7 +31,7 @@ export declare class MapViewComponent implements OnInit, OnDestroy {
|
|
|
33
31
|
selectedLink$: Observable<DatasetDistribution>;
|
|
34
32
|
currentLayers$: Observable<any[]>;
|
|
35
33
|
mapContext$: Observable<MapContextModel>;
|
|
36
|
-
constructor(mdViewFacade: MdViewFacade, mapManager: MapManagerService, mapUtils: MapUtilsService, dataService: DataService,
|
|
34
|
+
constructor(mdViewFacade: MdViewFacade, mapManager: MapManagerService, mapUtils: MapUtilsService, dataService: DataService, featureInfo: FeatureInfoService, changeRef: ChangeDetectorRef, styleService: MapStyleService);
|
|
37
35
|
ngOnDestroy(): void;
|
|
38
36
|
ngOnInit(): void;
|
|
39
37
|
onMapFeatureSelect(features: Feature<Geometry>[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-view.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/record/src/lib/map-view/map-view.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,SAAS,EACT,MAAM,EACP,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EAEpB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,eAAe,EAChB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAwB,SAAS,EAAE,MAAM,4CAA4C,CAAA;
|
|
1
|
+
{"version":3,"file":"map-view.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/record/src/lib/map-view/map-view.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,SAAS,EACT,MAAM,EACP,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EAEpB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,eAAe,EAChB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAwB,SAAS,EAAE,MAAM,4CAA4C,CAAA;AAE5F,OAAO,OAAO,MAAM,YAAY,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC,OAAO,EACL,eAAe,EAIf,UAAU,EAMX,MAAM,MAAM,CAAA;AASb,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAA;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAA;;AAE/F,qBAMa,gBAAiB,YAAW,MAAM,EAAE,SAAS;IAsFtD,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,YAAY;IA3FtB,SAAS,EAAE,SAAS,CAAyB;IAC7C,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;IAC5B,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,cAAc,CAA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,EAAE,OAAO,EACjB,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,EAC1B,iBAAiB,EAAE,0BAA0B,EAC7C,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,wBAAwB,EAGzC,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC;IAG3C,gBAAgB,qFAWf;IAED,OAAO,CAAC,sBAAsB,CAW7B;IAED,kBAAkB,8FAajB;IAED,YAAY,0FAgGX;IAED,yBAAyB,qGA2BvB;yCAtLS,aAAa;6CAAb,aAAa;CAuLzB"}
|
|
@@ -15,7 +15,7 @@ export declare class ChartComponent implements OnChanges, AfterViewInit {
|
|
|
15
15
|
setReady: (v?: unknown) => void;
|
|
16
16
|
ngAfterViewInit(): void;
|
|
17
17
|
ngOnChanges(): void;
|
|
18
|
-
createChart(): Chart<keyof import("chart.js").ChartTypeRegistry, (number | import("chart.js").Point |
|
|
18
|
+
createChart(): Chart<keyof import("chart.js").ChartTypeRegistry, (number | [number, number] | import("chart.js").Point | import("chart.js").BubbleDataPoint)[], unknown>;
|
|
19
19
|
getChartData(): ChartData;
|
|
20
20
|
getOptions(): ChartOptions;
|
|
21
21
|
truncateString(str: string, truncateLength: number): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElementRef, Renderer2, AfterViewInit, EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class EditableLabelDirective implements AfterViewInit {
|
|
4
|
+
private el;
|
|
5
|
+
private renderer;
|
|
6
|
+
editableLabelChanged: EventEmitter<string>;
|
|
7
|
+
gnUiEditableLabel?: boolean;
|
|
8
|
+
constructor(el: ElementRef, renderer: Renderer2);
|
|
9
|
+
ngAfterViewInit(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditableLabelDirective, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditableLabelDirective, "[gnUiEditableLabel]", never, { "gnUiEditableLabel": { "alias": "gnUiEditableLabel"; "required": false; }; }, { "editableLabelChanged": "editableLabelChanged"; }, never, never, true, never>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=editable-label.directive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editable-label.directive.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/inputs/src/lib/editable-label/editable-label.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,SAAS,EACT,aAAa,EACb,YAAY,EAGb,MAAM,eAAe,CAAA;;AAEtB,qBAIa,sBAAuB,YAAW,aAAa;IAI9C,OAAO,CAAC,EAAE;IAAc,OAAO,CAAC,QAAQ;IAH1C,oBAAoB,uBAA6B;IAClD,iBAAiB,CAAC,EAAE,OAAO,CAAA;gBAEhB,EAAE,EAAE,UAAU,EAAU,QAAQ,EAAE,SAAS;IAE/D,eAAe;yCANJ,sBAAsB;2CAAtB,sBAAsB;CAiClC"}
|
|
@@ -39,9 +39,10 @@ import * as i37 from "@angular/material/form-field";
|
|
|
39
39
|
import * as i38 from "@angular/material/input";
|
|
40
40
|
import * as i39 from "@angular/material/datepicker";
|
|
41
41
|
import * as i40 from "@angular/material/core";
|
|
42
|
+
import * as i41 from "./editable-label/editable-label.directive";
|
|
42
43
|
export declare class UiInputsModule {
|
|
43
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiInputsModule, never>;
|
|
44
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<UiInputsModule, [typeof i1.DropdownSelectorComponent, typeof i2.AutocompleteComponent, typeof i3.ButtonComponent, typeof i4.TextInputComponent, typeof i5.DragAndDropFileInputComponent, typeof i6.TextAreaComponent, typeof i7.ChipsInputComponent, typeof i8.NavigationButtonComponent, typeof i9.StarToggleComponent, typeof i10.DropdownMultiselectComponent, typeof i11.ViewportIntersectorComponent, typeof i12.FormFieldComponent, typeof i13.FormFieldSimpleComponent, typeof i14.FormFieldArrayComponent, typeof i15.FormFieldObjectComponent, typeof i16.FormFieldRichComponent, typeof i17.FormFieldFileComponent, typeof i18.FormFieldSpatialExtentComponent, typeof i19.FormFieldTemporalExtentComponent, typeof i20.CheckToggleComponent, typeof i21.CopyTextButtonComponent, typeof i22.CheckboxComponent, typeof i23.SearchInputComponent, typeof i24.DateRangePickerComponent], [typeof i25.CommonModule, typeof i26.TranslateModule, typeof i27.NgxDropzoneModule, typeof i28.FormsModule, typeof i28.ReactiveFormsModule, typeof i29.TagInputModule, typeof i30.UtilSharedModule, typeof i31.MatAutocompleteModule, typeof i32.MatIconModule, typeof i33.UiWidgetsModule, typeof i34.OverlayModule, typeof i35.MatCheckboxModule, typeof i36.MatTooltipModule, typeof i37.MatFormFieldModule, typeof i38.MatInputModule, typeof i39.MatDatepickerModule, typeof i40.MatNativeDateModule], [typeof i1.DropdownSelectorComponent, typeof i2.AutocompleteComponent, typeof i3.ButtonComponent, typeof i4.TextInputComponent, typeof i5.DragAndDropFileInputComponent, typeof i6.TextAreaComponent, typeof i7.ChipsInputComponent, typeof i8.NavigationButtonComponent, typeof i9.StarToggleComponent, typeof i10.DropdownMultiselectComponent, typeof i11.ViewportIntersectorComponent, typeof i12.FormFieldComponent, typeof i20.CheckToggleComponent, typeof i21.CopyTextButtonComponent, typeof i22.CheckboxComponent, typeof i23.SearchInputComponent, typeof i24.DateRangePickerComponent]>;
|
|
45
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<UiInputsModule, [typeof i1.DropdownSelectorComponent, typeof i2.AutocompleteComponent, typeof i3.ButtonComponent, typeof i4.TextInputComponent, typeof i5.DragAndDropFileInputComponent, typeof i6.TextAreaComponent, typeof i7.ChipsInputComponent, typeof i8.NavigationButtonComponent, typeof i9.StarToggleComponent, typeof i10.DropdownMultiselectComponent, typeof i11.ViewportIntersectorComponent, typeof i12.FormFieldComponent, typeof i13.FormFieldSimpleComponent, typeof i14.FormFieldArrayComponent, typeof i15.FormFieldObjectComponent, typeof i16.FormFieldRichComponent, typeof i17.FormFieldFileComponent, typeof i18.FormFieldSpatialExtentComponent, typeof i19.FormFieldTemporalExtentComponent, typeof i20.CheckToggleComponent, typeof i21.CopyTextButtonComponent, typeof i22.CheckboxComponent, typeof i23.SearchInputComponent, typeof i24.DateRangePickerComponent], [typeof i25.CommonModule, typeof i26.TranslateModule, typeof i27.NgxDropzoneModule, typeof i28.FormsModule, typeof i28.ReactiveFormsModule, typeof i29.TagInputModule, typeof i30.UtilSharedModule, typeof i31.MatAutocompleteModule, typeof i32.MatIconModule, typeof i33.UiWidgetsModule, typeof i34.OverlayModule, typeof i35.MatCheckboxModule, typeof i36.MatTooltipModule, typeof i37.MatFormFieldModule, typeof i38.MatInputModule, typeof i39.MatDatepickerModule, typeof i40.MatNativeDateModule, typeof i41.EditableLabelDirective], [typeof i1.DropdownSelectorComponent, typeof i2.AutocompleteComponent, typeof i3.ButtonComponent, typeof i4.TextInputComponent, typeof i5.DragAndDropFileInputComponent, typeof i6.TextAreaComponent, typeof i7.ChipsInputComponent, typeof i8.NavigationButtonComponent, typeof i9.StarToggleComponent, typeof i10.DropdownMultiselectComponent, typeof i11.ViewportIntersectorComponent, typeof i12.FormFieldComponent, typeof i20.CheckToggleComponent, typeof i21.CopyTextButtonComponent, typeof i22.CheckboxComponent, typeof i23.SearchInputComponent, typeof i24.DateRangePickerComponent, typeof i41.EditableLabelDirective]>;
|
|
45
46
|
static ɵinj: i0.ɵɵInjectorDeclaration<UiInputsModule>;
|
|
46
47
|
}
|
|
47
48
|
//# sourceMappingURL=ui-inputs.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-inputs.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/inputs/src/lib/ui-inputs.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ui-inputs.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/ui/inputs/src/lib/ui-inputs.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,qBAoEa,cAAc;yCAAd,cAAc;0CAAd,cAAc;0CAAd,cAAc;CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "geonetwork-ui",
|
|
3
|
-
"version": "2.2.0-dev.
|
|
3
|
+
"version": "2.2.0-dev.34bd9854",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=14.17.0"
|
|
6
6
|
},
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@biesbjerg/ngx-translate-extract-marker": "^1.0.0",
|
|
50
50
|
"@camptocamp/ogc-client": "^0.4.0",
|
|
51
|
+
"@geospatial-sdk/geocoding": "^0.0.5-alpha.1",
|
|
51
52
|
"@ltd/j-toml": "~1.35.2",
|
|
52
53
|
"@messageformat/core": "^3.0.1",
|
|
53
54
|
"@nx/angular": "16.6.0",
|
|
@@ -41,6 +41,9 @@ export const toDate = (field) => new Date(field)
|
|
|
41
41
|
export const getFirstValue = (field) =>
|
|
42
42
|
Array.isArray(field) ? field[0] : field
|
|
43
43
|
|
|
44
|
+
export const getArrayItem = (field, index) =>
|
|
45
|
+
Array.isArray(field) && field[index] !== undefined ? field[index] : null
|
|
46
|
+
|
|
44
47
|
export const getAsArray = (field) =>
|
|
45
48
|
Array.isArray(field) ? field : field !== null ? [field] : []
|
|
46
49
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
getArrayItem,
|
|
2
3
|
getAsArray,
|
|
3
4
|
getAsUrl,
|
|
4
5
|
getFirstValue,
|
|
@@ -22,6 +23,7 @@ import {
|
|
|
22
23
|
DatasetDistributionType,
|
|
23
24
|
DatasetDownloadDistribution,
|
|
24
25
|
DatasetServiceDistribution,
|
|
26
|
+
DatasetSpatialExtent,
|
|
25
27
|
OnlineLinkResource,
|
|
26
28
|
} from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
27
29
|
import { matchProtocol } from '../common/distribution.mapper'
|
|
@@ -258,6 +260,47 @@ export class Gn4FieldMapper {
|
|
|
258
260
|
kind,
|
|
259
261
|
}
|
|
260
262
|
},
|
|
263
|
+
geom: (output, source) => {
|
|
264
|
+
const geoms = getAsArray(selectField(source, 'geom'))
|
|
265
|
+
const shapes = getAsArray(selectField(source, 'shape'))
|
|
266
|
+
const extentDescriptions = getAsArray(
|
|
267
|
+
selectField(source, 'extentDescriptionObject')
|
|
268
|
+
)
|
|
269
|
+
const spatialExtents = getAsArray(selectField(source, 'spatialExtents'))
|
|
270
|
+
return {
|
|
271
|
+
...output,
|
|
272
|
+
spatialExtents: [
|
|
273
|
+
...spatialExtents,
|
|
274
|
+
...geoms.map((geom, index) => {
|
|
275
|
+
const description = selectTranslatedValue(
|
|
276
|
+
getArrayItem(extentDescriptions, index),
|
|
277
|
+
this.lang3
|
|
278
|
+
)
|
|
279
|
+
const geometry = shapes[index] ?? geom
|
|
280
|
+
return {
|
|
281
|
+
...(description !== null ? { description } : null),
|
|
282
|
+
geometry,
|
|
283
|
+
} as DatasetSpatialExtent
|
|
284
|
+
}),
|
|
285
|
+
],
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
resourceTemporalDateRange: (output, source) => {
|
|
289
|
+
const ranges = getAsArray(
|
|
290
|
+
selectField(source, 'resourceTemporalDateRange')
|
|
291
|
+
)
|
|
292
|
+
return {
|
|
293
|
+
...output,
|
|
294
|
+
temporalExtents: ranges.map((range) => {
|
|
295
|
+
const start = selectField(range, 'gte')
|
|
296
|
+
const end = selectField(range, 'lte')
|
|
297
|
+
return {
|
|
298
|
+
...(start !== null ? { start: toDate(start) } : null),
|
|
299
|
+
...(end !== null ? { end: toDate(end) } : null),
|
|
300
|
+
}
|
|
301
|
+
}),
|
|
302
|
+
}
|
|
303
|
+
},
|
|
261
304
|
}
|
|
262
305
|
|
|
263
306
|
private genericField = (output) => output
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
2
|
-
import { Individual } from './contact.model'
|
|
3
|
-
import { Organization } from './organization.model'
|
|
2
|
+
import type { Individual } from './contact.model'
|
|
3
|
+
import type { Organization } from './organization.model'
|
|
4
|
+
import type { Geometry } from 'geojson'
|
|
4
5
|
|
|
5
6
|
type Uuid = string
|
|
6
7
|
|
|
@@ -146,13 +147,16 @@ export interface GraphicOverview {
|
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
export interface DatasetSpatialExtent {
|
|
149
|
-
geometry:
|
|
150
|
+
geometry: Geometry
|
|
150
151
|
description?: string
|
|
151
152
|
}
|
|
152
153
|
|
|
154
|
+
/**
|
|
155
|
+
* At least a start or an end date should be provided
|
|
156
|
+
*/
|
|
153
157
|
export interface DatasetTemporalExtent {
|
|
154
|
-
start
|
|
155
|
-
end
|
|
158
|
+
start?: Date
|
|
159
|
+
end?: Date
|
|
156
160
|
description?: string
|
|
157
161
|
}
|
|
158
162
|
|
|
@@ -164,8 +168,8 @@ export interface DatasetRecord extends BaseRecord {
|
|
|
164
168
|
datasetUpdated?: Date
|
|
165
169
|
lineage: string // Explanation of the origin of this record (e.g: how, why)"
|
|
166
170
|
distributions: Array<DatasetDistribution>
|
|
167
|
-
spatialExtents: Array<DatasetSpatialExtent>
|
|
168
|
-
temporalExtents: Array<DatasetTemporalExtent>
|
|
171
|
+
spatialExtents: Array<DatasetSpatialExtent>
|
|
172
|
+
temporalExtents: Array<DatasetTemporalExtent>
|
|
169
173
|
spatialRepresentation?: SpatialRepresentationType
|
|
170
174
|
}
|
|
171
175
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common'
|
|
2
2
|
import { ChangeDetectionStrategy, Component } from '@angular/core'
|
|
3
3
|
import { EditorService, FormField } from '../services/editor.service'
|
|
4
|
+
import { UiInputsModule } from '../../../../../../libs/ui/inputs/src'
|
|
4
5
|
|
|
5
6
|
@Component({
|
|
6
7
|
selector: 'gn-ui-record-form',
|
|
@@ -8,7 +9,7 @@ import { EditorService, FormField } from '../services/editor.service'
|
|
|
8
9
|
styleUrls: ['./record-form.component.css'],
|
|
9
10
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10
11
|
standalone: true,
|
|
11
|
-
imports: [CommonModule],
|
|
12
|
+
imports: [CommonModule, UiInputsModule],
|
|
12
13
|
})
|
|
13
14
|
export class RecordFormComponent {
|
|
14
15
|
constructor(public editorService: EditorService) {}
|
|
@@ -17,3 +17,4 @@ export * from './lib/layers-panel/layers-panel.component'
|
|
|
17
17
|
export * from './lib/add-layer-from-catalog/add-layer-from-catalog.component'
|
|
18
18
|
export * from './lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component'
|
|
19
19
|
export * from './lib/map-container/map-container.component'
|
|
20
|
+
export * from './lib/geocoding/geocoding.component'
|
|
@@ -24,6 +24,7 @@ import { AddLayerFromWmsComponent } from './add-layer-from-wms/add-layer-from-wm
|
|
|
24
24
|
import { AddLayerFromFileComponent } from './add-layer-from-file/add-layer-from-file.component'
|
|
25
25
|
import { AddLayerFromWfsComponent } from './add-layer-from-wfs/add-layer-from-wfs.component'
|
|
26
26
|
import { GeocodingComponent } from './geocoding/geocoding.component'
|
|
27
|
+
import { GEOCODING_PROVIDER, GeocodingProvider } from './geocoding.service'
|
|
27
28
|
|
|
28
29
|
@NgModule({
|
|
29
30
|
declarations: [
|
|
@@ -65,6 +66,10 @@ import { GeocodingComponent } from './geocoding/geocoding.component'
|
|
|
65
66
|
useValue: defaultMapOptions,
|
|
66
67
|
},
|
|
67
68
|
MapFacade,
|
|
69
|
+
{
|
|
70
|
+
provide: GEOCODING_PROVIDER,
|
|
71
|
+
useValue: ['geonames', { maxRows: 5 }] as GeocodingProvider,
|
|
72
|
+
},
|
|
68
73
|
],
|
|
69
74
|
})
|
|
70
75
|
export class FeatureMapModule {}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Component, OnDestroy } from '@angular/core'
|
|
2
|
-
import { queryGeoadmin, GeoadminOptions } from '@geospatial-sdk/geocoding'
|
|
3
2
|
import { catchError, from, Subject, takeUntil } from 'rxjs'
|
|
4
3
|
import { debounceTime, switchMap } from 'rxjs/operators'
|
|
5
4
|
import { MapManagerService } from '../manager/map-manager.service'
|
|
6
5
|
import { fromLonLat } from 'ol/proj'
|
|
7
6
|
import { Polygon } from 'ol/geom'
|
|
7
|
+
import { GeocodingService } from '../geocoding.service'
|
|
8
8
|
|
|
9
9
|
@Component({
|
|
10
10
|
selector: 'gn-ui-geocoding',
|
|
@@ -16,18 +16,20 @@ export class GeocodingComponent implements OnDestroy {
|
|
|
16
16
|
results: any[] = []
|
|
17
17
|
searchTextChanged = new Subject<string>()
|
|
18
18
|
destroy$ = new Subject<void>()
|
|
19
|
+
errorMessage: string | null = null
|
|
19
20
|
|
|
20
|
-
constructor(
|
|
21
|
+
constructor(
|
|
22
|
+
private mapManager: MapManagerService,
|
|
23
|
+
private geocodingService: GeocodingService
|
|
24
|
+
) {
|
|
21
25
|
this.searchTextChanged
|
|
22
26
|
.pipe(
|
|
23
27
|
debounceTime(300),
|
|
24
28
|
switchMap((searchText) => {
|
|
25
|
-
|
|
26
|
-
origins: ['zipcode', 'gg25', 'address'],
|
|
27
|
-
limit: 6,
|
|
28
|
-
}
|
|
29
|
-
return from(queryGeoadmin(searchText, options)).pipe(
|
|
29
|
+
return from(this.geocodingService.query(searchText)).pipe(
|
|
30
30
|
catchError((error) => {
|
|
31
|
+
this.errorMessage =
|
|
32
|
+
'An error occurred while searching. Please try again.'
|
|
31
33
|
console.error(error)
|
|
32
34
|
return []
|
|
33
35
|
})
|
|
@@ -57,18 +59,32 @@ export class GeocodingComponent implements OnDestroy {
|
|
|
57
59
|
clearSearch() {
|
|
58
60
|
this.searchText = ''
|
|
59
61
|
this.results = []
|
|
62
|
+
this.errorMessage = null
|
|
60
63
|
}
|
|
61
64
|
|
|
62
|
-
zoomToLocation(result) {
|
|
65
|
+
zoomToLocation(result: any) {
|
|
63
66
|
const map = this.mapManager.map
|
|
64
67
|
const view = map.getView()
|
|
65
68
|
const geometry = result.geom
|
|
66
69
|
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
if (geometry.type === 'Point') {
|
|
71
|
+
this.zoomToPoint(geometry.coordinates, view)
|
|
72
|
+
} else if (geometry.type === 'Polygon') {
|
|
73
|
+
this.zoomToPolygon(geometry.coordinates, view)
|
|
74
|
+
} else {
|
|
75
|
+
console.error(`Unsupported geometry type: ${geometry.type}`)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
69
78
|
|
|
70
|
-
|
|
79
|
+
zoomToPoint(pointCoords: [number, number], view: any) {
|
|
80
|
+
const transformedCoords = fromLonLat(pointCoords)
|
|
81
|
+
view.setCenter(transformedCoords)
|
|
82
|
+
view.setZoom(12)
|
|
83
|
+
}
|
|
71
84
|
|
|
85
|
+
zoomToPolygon(polygonCoords: [[number, number][]], view: any) {
|
|
86
|
+
const transformedCoords = polygonCoords[0].map((coord) => fromLonLat(coord))
|
|
87
|
+
const polygon = new Polygon([transformedCoords])
|
|
72
88
|
view.fit(polygon, {
|
|
73
89
|
duration: 100,
|
|
74
90
|
maxZoom: 12,
|