geonetwork-ui 2.7.0-dev.fd871c105 → 2.7.0-dev.fdfe671c3
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/dataviz/src/lib/service/data.service.mjs +4 -4
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +4 -2
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +33 -8
- package/esm2022/libs/util/shared/src/lib/utils/index.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/utils/scroll.mjs +40 -0
- package/fesm2022/geonetwork-ui.mjs +116 -51
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/external-link-card/external-link-card.component.d.ts +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts +26 -7
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/index.d.ts +1 -0
- package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/scroll.d.ts +12 -0
- package/libs/util/shared/src/lib/utils/scroll.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +4 -4
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +4 -2
- package/src/libs/util/shared/src/lib/links/link-utils.ts +32 -7
- package/src/libs/util/shared/src/lib/utils/index.ts +1 -0
- package/src/libs/util/shared/src/lib/utils/scroll.ts +48 -0
|
@@ -27,7 +27,7 @@ export declare class DataService {
|
|
|
27
27
|
getDownloadLinksFromWfs(wfsLink: DatasetServiceDistribution): Observable<DatasetOnlineResource[]>;
|
|
28
28
|
getDownloadLinksFromOgcApiFeatures(ogcApiLink: DatasetServiceDistribution): Promise<DatasetOnlineResource[]>;
|
|
29
29
|
getDownloadUrlsFromOgcApi(url: string): Promise<OgcApiCollectionInfo>;
|
|
30
|
-
getItemsFromOgcApi(url: string): Promise<OgcApiRecord>;
|
|
30
|
+
getItemsFromOgcApi(url: string): Promise<OgcApiRecord[]>;
|
|
31
31
|
getGeodataLinksFromTms(tmsLink: DatasetServiceDistribution, keepOriginalLink?: boolean): Promise<DatasetServiceDistribution[]>;
|
|
32
32
|
getDownloadLinksFromEsriRest(esriRestLink: DatasetServiceDistribution): DatasetOnlineResource[];
|
|
33
33
|
readAsGeoJson(link: DatasetOnlineResource, cacheActive: boolean): Observable<FeatureCollection>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.service.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/dataviz/src/lib/service/data.service.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EAEpB,YAAY,EACZ,WAAW,EACX,UAAU,EAEX,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,UAAU,EAKX,MAAM,8CAA8C,CAAA;AACrD,OAAO,EAIL,YAAY,EACb,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAQ,UAAU,EAAc,MAAM,MAAM,CAAA;AAEnD,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,2DAA2D,CAAA;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wFAAwF,CAAA;;AAe3H,UAAU,eAAe;IACvB,GAAG,EAAE;QAAE,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,UAAU,CAAA;KAAE,CAAA;CACvE;AAED,qBAGa,WAAW;IACV,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,YAAY;IAEvC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC;IA2BvD,sBAAsB,CACpB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,GACtB,UAAU,CAAC,eAAe,CAAC;IAkD9B,kBAAkB,CAChB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,GACtB,UAAU,CAAC,MAAM,CAAC;IAerB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAMlE,uBAAuB,CACrB,OAAO,EAAE,0BAA0B,GAClC,UAAU,CAAC,qBAAqB,EAAE,CAAC;IA6BhC,kCAAkC,CACtC,UAAU,EAAE,0BAA0B,GACrC,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAiB7B,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAWrE,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"data.service.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/dataviz/src/lib/service/data.service.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EAEpB,YAAY,EACZ,WAAW,EACX,UAAU,EAEX,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,UAAU,EAKX,MAAM,8CAA8C,CAAA;AACrD,OAAO,EAIL,YAAY,EACb,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAQ,UAAU,EAAc,MAAM,MAAM,CAAA;AAEnD,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,2DAA2D,CAAA;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wFAAwF,CAAA;;AAe3H,UAAU,eAAe;IACvB,GAAG,EAAE;QAAE,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,UAAU,CAAA;KAAE,CAAA;CACvE;AAED,qBAGa,WAAW;IACV,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,YAAY;IAEvC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC;IA2BvD,sBAAsB,CACpB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,GACtB,UAAU,CAAC,eAAe,CAAC;IAkD9B,kBAAkB,CAChB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,GACtB,UAAU,CAAC,MAAM,CAAC;IAerB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAMlE,uBAAuB,CACrB,OAAO,EAAE,0BAA0B,GAClC,UAAU,CAAC,qBAAqB,EAAE,CAAC;IA6BhC,kCAAkC,CACtC,UAAU,EAAE,0BAA0B,GACrC,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAiB7B,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAWrE,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAaxD,sBAAsB,CAC1B,OAAO,EAAE,0BAA0B,EACnC,gBAAgB,UAAQ,GACvB,OAAO,CAAC,0BAA0B,EAAE,CAAC;IAqCxC,4BAA4B,CAC1B,YAAY,EAAE,0BAA0B,GACvC,qBAAqB,EAAE;IAU1B,aAAa,CACX,IAAI,EAAE,qBAAqB,EAC3B,WAAW,EAAE,OAAO,GACnB,UAAU,CAAC,iBAAiB,CAAC;IAUhC,iBAAiB,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;IAQnD,UAAU,CACR,IAAI,EAAE,qBAAqB,EAC3B,WAAW,EAAE,OAAO,GACnB,UAAU,CAAC,UAAU,CAAC;yCAjQd,WAAW;6CAAX,WAAW;CAmTvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdview.facade.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/record/src/lib/state/mdview.facade.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,EAAE,MAAM,aAAa,CAAA;AAa3C,OAAO,EAAE,qBAAqB,EAAa,MAAM,wCAAwC,CAAA;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wFAAwF,CAAA;AAChI,OAAO,EACL,aAAa,EACb,YAAY,EACb,MAAM,2DAA2D,CAAA;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAA;AAElF,OAAO,EAAY,UAAU,EAAE,MAAM,MAAM,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAA;;AAExE,qBAOa,YAAY;IAErB,OAAO,CAAC,KAAK;IACN,cAAc,EAAE,qBAAqB;IAC5C,OAAO,CAAC,aAAa;IACd,WAAW,EAAE,WAAW;gBAHvB,KAAK,EAAE,KAAK,EACb,cAAc,EAAE,qBAAqB,EACpC,aAAa,EAAE,sBAAsB,EACtC,WAAW,EAAE,WAAW;IAGjC,UAAU,sBAGT;IAED,kBAAkB,sBAEjB;IAED,SAAS,qCAGR;IAED,eAAe,+GAA6D;IAE5E,aAAa,sBAGZ;IAED,sBAAsB,sBAWrB;IAED,MAAM;;;OAA4D;IAElE,QAAQ,8BAAsD;IAE9D,QAAQ,8BAAsD;IAE9D,SAAS,8BAAuD;IAEhE,YAAY,sCAA0D;IAEtE,SAAS,sNAKR;IAED,SAAS,sNAKR;IAED,YAAY,sNAOX;IAED,cAAc,sNAMb;IAED,UAAU,sNAIT;IAED,aAAa,sNAMZ;IAED,yBAAyB,
|
|
1
|
+
{"version":3,"file":"mdview.facade.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/record/src/lib/state/mdview.facade.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,EAAE,MAAM,aAAa,CAAA;AAa3C,OAAO,EAAE,qBAAqB,EAAa,MAAM,wCAAwC,CAAA;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wFAAwF,CAAA;AAChI,OAAO,EACL,aAAa,EACb,YAAY,EACb,MAAM,2DAA2D,CAAA;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAA;AAElF,OAAO,EAAY,UAAU,EAAE,MAAM,MAAM,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAA;;AAExE,qBAOa,YAAY;IAErB,OAAO,CAAC,KAAK;IACN,cAAc,EAAE,qBAAqB;IAC5C,OAAO,CAAC,aAAa;IACd,WAAW,EAAE,WAAW;gBAHvB,KAAK,EAAE,KAAK,EACb,cAAc,EAAE,qBAAqB,EACpC,aAAa,EAAE,sBAAsB,EACtC,WAAW,EAAE,WAAW;IAGjC,UAAU,sBAGT;IAED,kBAAkB,sBAEjB;IAED,SAAS,qCAGR;IAED,eAAe,+GAA6D;IAE5E,aAAa,sBAGZ;IAED,sBAAsB,sBAWrB;IAED,MAAM;;;OAA4D;IAElE,QAAQ,8BAAsD;IAE9D,QAAQ,8BAAsD;IAE9D,SAAS,8BAAuD;IAEhE,YAAY,sCAA0D;IAEtE,SAAS,sNAKR;IAED,SAAS,sNAKR;IAED,YAAY,sNAOX;IAED,cAAc,sNAMb;IAED,UAAU,sNAIT;IAED,aAAa,sNAMZ;IAED,yBAAyB,oBAoCxB;IAED,iBAAiB,oBAEhB;IAED,WAAW,sNAMV;IAED,cAAc,6BAA4D;IAC1E,yBAAyB,sBAExB;IACD,yBAAyB,sBAExB;IAED;;;OAGG;IACH,qBAAqB,CAAC,UAAU,EAAE,aAAa;IAI/C;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM;IAIrB,aAAa;IAIb,cAAc,CAAC,WAAW,EAAE,uBAAuB;IAInD;;OAEG;IACH,eAAe,CAAC,YAAY,EAAE,YAAY;IAI1C,iBAAiB,CAAC,WAAW,EAAE,MAAM;IAIrC;;OAEG;IACH,kBAAkB,CAAC,QAAQ,EAAE,aAAa;yCAhM/B,YAAY;6CAAZ,YAAY;CAmMxB"}
|
|
@@ -22,7 +22,7 @@ export declare class DownloadsListComponent {
|
|
|
22
22
|
isFilterActive(filter: FilterFormat): boolean;
|
|
23
23
|
getFilterFormatTitle(format: FilterFormat): any;
|
|
24
24
|
isLinkOfFormat(link: DatasetDownloadDistribution, format: FilterFormat): boolean;
|
|
25
|
-
getLinkFormat(link: DatasetDownloadDistribution): "html" | "svg" | "gml" | "json" | "pdf" | "csv" | "excel" | "geojson" | "shp" | "kml" | "gpkg" | "zip" | "jpg" | "dxf" | "fgb" | "jsonfg";
|
|
25
|
+
getLinkFormat(link: DatasetDownloadDistribution): "html" | "svg" | "gml" | "json" | "pdf" | "csv" | "excel" | "geojson" | "shp" | "kml" | "gpkg" | "zip" | "jpg" | "png" | "tiff" | "dxf" | "fgb" | "jsonfg" | "webp";
|
|
26
26
|
getLinkColor(link: DatasetDownloadDistribution): string;
|
|
27
27
|
isFromApi(link: DatasetDownloadDistribution): boolean;
|
|
28
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<DownloadsListComponent, never>;
|
|
@@ -9,7 +9,7 @@ export declare class ExternalLinkCardComponent {
|
|
|
9
9
|
get size(): CardSize;
|
|
10
10
|
cardClass: string;
|
|
11
11
|
get title(): string;
|
|
12
|
-
getLinkFormat(link: any): "html" | "svg" | "gml" | "json" | "pdf" | "csv" | "excel" | "geojson" | "shp" | "kml" | "gpkg" | "zip" | "jpg" | "dxf" | "fgb" | "jsonfg";
|
|
12
|
+
getLinkFormat(link: any): "html" | "svg" | "gml" | "json" | "pdf" | "csv" | "excel" | "geojson" | "shp" | "kml" | "gpkg" | "zip" | "jpg" | "png" | "tiff" | "dxf" | "fgb" | "jsonfg" | "webp";
|
|
13
13
|
getLinkColor(link: any): string;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<ExternalLinkCardComponent, never>;
|
|
15
15
|
static ɵcmp: i0.ɵɵComponentDeclaration<ExternalLinkCardComponent, "gn-ui-external-link-card", never, { "link": { "alias": "link"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
|
|
@@ -49,10 +49,10 @@ export declare const FORMATS: {
|
|
|
49
49
|
readonly mimeTypes: readonly ["application/geopackage+sqlite3"];
|
|
50
50
|
};
|
|
51
51
|
readonly zip: {
|
|
52
|
-
readonly extensions: readonly ["zip", "tar.gz"];
|
|
52
|
+
readonly extensions: readonly ["zip", "tar.gz", "gz", "7z", "7zip"];
|
|
53
53
|
readonly priority: 8;
|
|
54
54
|
readonly color: "#B0CB52";
|
|
55
|
-
readonly mimeTypes: readonly ["application/zip", "application/x-zip"];
|
|
55
|
+
readonly mimeTypes: readonly ["application/zip", "application/x-zip", "application/x-compressed", "application/x-7z-compressed", "application/gzip", "application/x-gzip"];
|
|
56
56
|
};
|
|
57
57
|
readonly pdf: {
|
|
58
58
|
readonly extensions: readonly ["pdf"];
|
|
@@ -66,36 +66,54 @@ export declare const FORMATS: {
|
|
|
66
66
|
readonly color: "#C4A98F";
|
|
67
67
|
readonly mimeTypes: readonly ["image/jpg"];
|
|
68
68
|
};
|
|
69
|
+
readonly png: {
|
|
70
|
+
readonly extensions: readonly ["png"];
|
|
71
|
+
readonly priority: 10;
|
|
72
|
+
readonly color: "#8B5A3C";
|
|
73
|
+
readonly mimeTypes: readonly ["image/png"];
|
|
74
|
+
};
|
|
75
|
+
readonly tiff: {
|
|
76
|
+
readonly extensions: readonly ["tiff", "tif", "geotiff", "geotif"];
|
|
77
|
+
readonly priority: 11;
|
|
78
|
+
readonly color: "#6B4423";
|
|
79
|
+
readonly mimeTypes: readonly ["image/tiff"];
|
|
80
|
+
};
|
|
69
81
|
readonly svg: {
|
|
70
82
|
readonly extensions: readonly ["svg"];
|
|
71
|
-
readonly priority:
|
|
83
|
+
readonly priority: 12;
|
|
72
84
|
readonly color: "#EB6D82";
|
|
73
85
|
readonly mimeTypes: readonly ["image/svg+xml"];
|
|
74
86
|
};
|
|
75
87
|
readonly dxf: {
|
|
76
88
|
readonly extensions: readonly ["dxf"];
|
|
77
|
-
readonly priority:
|
|
89
|
+
readonly priority: 13;
|
|
78
90
|
readonly color: "#DCCD00";
|
|
79
91
|
readonly mimeTypes: readonly ["application/x-dxf", "image/x-dxf"];
|
|
80
92
|
};
|
|
81
93
|
readonly html: {
|
|
82
94
|
readonly extensions: readonly ["html", "htm"];
|
|
83
|
-
readonly priority:
|
|
95
|
+
readonly priority: 14;
|
|
84
96
|
readonly color: "#C0C9B6";
|
|
85
97
|
readonly mimeTypes: readonly ["text/html"];
|
|
86
98
|
};
|
|
87
99
|
readonly fgb: {
|
|
88
100
|
readonly extensions: readonly ["fgb", "flatgeobuf"];
|
|
89
|
-
readonly priority:
|
|
101
|
+
readonly priority: 15;
|
|
90
102
|
readonly color: "#A8111C";
|
|
91
103
|
readonly mimeTypes: readonly ["application/flatgeobuf"];
|
|
92
104
|
};
|
|
93
105
|
readonly jsonfg: {
|
|
94
106
|
readonly extensions: readonly ["jsonfg", "jsonfgc"];
|
|
95
|
-
readonly priority:
|
|
107
|
+
readonly priority: 16;
|
|
96
108
|
readonly color: "#009EE0";
|
|
97
109
|
readonly mimeTypes: readonly ["application/vnd.ogc.fg+json", "application/vnd.ogc.fg+json;compatibility=geojson"];
|
|
98
110
|
};
|
|
111
|
+
readonly webp: {
|
|
112
|
+
readonly extensions: readonly ["webp"];
|
|
113
|
+
readonly priority: 17;
|
|
114
|
+
readonly color: "#5A9E6F";
|
|
115
|
+
readonly mimeTypes: readonly ["image/webp"];
|
|
116
|
+
};
|
|
99
117
|
};
|
|
100
118
|
export type FileFormat = keyof typeof FORMATS;
|
|
101
119
|
export declare function getFormatPriority(linkFormat: FileFormat): number;
|
|
@@ -114,6 +132,7 @@ export declare function getLayers(url: string, serviceProtocol: ServiceProtocol)
|
|
|
114
132
|
hasFeatures?: boolean;
|
|
115
133
|
hasVectorTiles?: boolean;
|
|
116
134
|
hasMapTiles?: boolean;
|
|
135
|
+
hasDataQueries?: boolean;
|
|
117
136
|
}[] | import("@camptocamp/ogc-client").WfsFeatureTypeFull[] | import("@camptocamp/ogc-client").WmsLayerFull[] | import("@camptocamp/ogc-client").WmtsLayer[]>;
|
|
118
137
|
export declare function wmsLayerFlatten(layerFull: any): any[];
|
|
119
138
|
export declare function getMimeTypeForFormat(format: FileFormat): string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/links/link-utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EAChB,MAAM,2DAA2D,CAAA;AAUlE,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"link-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/links/link-utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EAChB,MAAM,2DAA2D,CAAA;AAUlE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIV,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,OAAO,CAAA;AAE7C,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAUhE;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,GAClD,MAAM,CAER;AAED,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,MAAM,GACpB,UAAU,GAAG,IAAI,CAgBnB;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,GAClD,UAAU,CAcZ;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,EACnD,KAAK,EAAE,MAAM,GACZ,OAAO,CAST;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAO7D;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,EACnD,MAAM,EAAE,UAAU,GACjB,OAAO,CAQT;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAQ5D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,qBAAqB,GAAG,MAAM,CAO7D;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,GAClD,MAAM,CA6BR;AAED,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe;;;;;;;8JAmC5E;AAED,wBAAgB,eAAe,CAAC,SAAS,KAAA,SAUxC;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAEtE"}
|
|
@@ -8,6 +8,7 @@ export * from './mobile-screen';
|
|
|
8
8
|
export * from './no-duplicate-file-name';
|
|
9
9
|
export * from './parse';
|
|
10
10
|
export * from './remove-whitespace';
|
|
11
|
+
export * from './scroll';
|
|
11
12
|
export * from './sort-by';
|
|
12
13
|
export * from './strip-html';
|
|
13
14
|
export * from './temporal-extent-union';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,SAAS,CAAA;AACvB,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,OAAO,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,SAAS,CAAA;AACvB,cAAc,qBAAqB,CAAA;AACnC,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,OAAO,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ViewportScroller } from '@angular/common';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
/**
|
|
4
|
+
* When route is changed, Angular interprets a simple query params change as "forward navigation" too.
|
|
5
|
+
* Using the pairwise function allows us to have both the previous and current router events, which we can
|
|
6
|
+
* use to effectively compare the two navigation events and see if they actually change route, or only
|
|
7
|
+
* the route parameters (i.e. search params stored in query params).
|
|
8
|
+
*
|
|
9
|
+
* Related to: https://github.com/angular/angular/issues/26744
|
|
10
|
+
*/
|
|
11
|
+
export declare function handleScrollOnNavigation(router: Router, viewportScroller: ViewportScroller): void;
|
|
12
|
+
//# sourceMappingURL=scroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/scroll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAwB,MAAM,EAAU,MAAM,iBAAiB,CAAA;AAGtE;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,GACjC,IAAI,CA2BN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "geonetwork-ui",
|
|
3
|
-
"version": "2.7.0-dev.
|
|
3
|
+
"version": "2.7.0-dev.fdfe671c3",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20"
|
|
6
6
|
},
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@biesbjerg/ngx-translate-extract-marker": "~1.0.0",
|
|
52
|
-
"@camptocamp/ogc-client": "1.
|
|
52
|
+
"@camptocamp/ogc-client": "^1.3.0",
|
|
53
53
|
"@geospatial-sdk/core": "0.0.5-dev.37",
|
|
54
54
|
"@geospatial-sdk/geocoding": "0.0.5-dev.37",
|
|
55
55
|
"@geospatial-sdk/legend": "0.0.5-dev.37",
|
|
@@ -211,21 +211,21 @@ export class DataService {
|
|
|
211
211
|
|
|
212
212
|
async getDownloadUrlsFromOgcApi(url: string): Promise<OgcApiCollectionInfo> {
|
|
213
213
|
const endpoint = new OgcApiEndpoint(url)
|
|
214
|
-
return await endpoint.
|
|
214
|
+
return await endpoint.featureCollections
|
|
215
215
|
.then((collections) => {
|
|
216
|
-
return endpoint.getCollectionInfo(collections[0]
|
|
216
|
+
return endpoint.getCollectionInfo(collections[0])
|
|
217
217
|
})
|
|
218
218
|
.catch((error) => {
|
|
219
219
|
throw new Error(`ogc.unreachable.unknown`)
|
|
220
220
|
})
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
async getItemsFromOgcApi(url: string): Promise<OgcApiRecord> {
|
|
223
|
+
async getItemsFromOgcApi(url: string): Promise<OgcApiRecord[]> {
|
|
224
224
|
const endpoint = new OgcApiEndpoint(url)
|
|
225
225
|
return await endpoint.featureCollections
|
|
226
226
|
.then((collections) => {
|
|
227
227
|
return collections.length
|
|
228
|
-
? endpoint.
|
|
228
|
+
? endpoint.getCollectionItems(collections[0])
|
|
229
229
|
: null
|
|
230
230
|
})
|
|
231
231
|
.catch(() => {
|
|
@@ -139,8 +139,10 @@ export class MdViewFacade {
|
|
|
139
139
|
return from(
|
|
140
140
|
this.dataService.getItemsFromOgcApi(link.url.href)
|
|
141
141
|
).pipe(
|
|
142
|
-
map((collectionRecords: OgcApiRecord) => {
|
|
143
|
-
return collectionRecords &&
|
|
142
|
+
map((collectionRecords: OgcApiRecord[]) => {
|
|
143
|
+
return collectionRecords &&
|
|
144
|
+
collectionRecords[0] &&
|
|
145
|
+
collectionRecords[0].geometry
|
|
144
146
|
? link
|
|
145
147
|
: null
|
|
146
148
|
}),
|
|
@@ -75,10 +75,17 @@ export const FORMATS = {
|
|
|
75
75
|
mimeTypes: ['application/geopackage+sqlite3'],
|
|
76
76
|
},
|
|
77
77
|
zip: {
|
|
78
|
-
extensions: ['zip', 'tar.gz'],
|
|
78
|
+
extensions: ['zip', 'tar.gz', 'gz', '7z', '7zip'],
|
|
79
79
|
priority: 8,
|
|
80
80
|
color: '#B0CB52',
|
|
81
|
-
mimeTypes: [
|
|
81
|
+
mimeTypes: [
|
|
82
|
+
'application/zip',
|
|
83
|
+
'application/x-zip',
|
|
84
|
+
'application/x-compressed',
|
|
85
|
+
'application/x-7z-compressed',
|
|
86
|
+
'application/gzip',
|
|
87
|
+
'application/x-gzip',
|
|
88
|
+
],
|
|
82
89
|
},
|
|
83
90
|
pdf: {
|
|
84
91
|
extensions: ['pdf'],
|
|
@@ -92,39 +99,57 @@ export const FORMATS = {
|
|
|
92
99
|
color: '#C4A98F',
|
|
93
100
|
mimeTypes: ['image/jpg'],
|
|
94
101
|
},
|
|
102
|
+
png: {
|
|
103
|
+
extensions: ['png'],
|
|
104
|
+
priority: 10,
|
|
105
|
+
color: '#8B5A3C',
|
|
106
|
+
mimeTypes: ['image/png'],
|
|
107
|
+
},
|
|
108
|
+
tiff: {
|
|
109
|
+
extensions: ['tiff', 'tif', 'geotiff', 'geotif'],
|
|
110
|
+
priority: 11,
|
|
111
|
+
color: '#6B4423',
|
|
112
|
+
mimeTypes: ['image/tiff'],
|
|
113
|
+
},
|
|
95
114
|
svg: {
|
|
96
115
|
extensions: ['svg'],
|
|
97
|
-
priority:
|
|
116
|
+
priority: 12,
|
|
98
117
|
color: '#EB6D82',
|
|
99
118
|
mimeTypes: ['image/svg+xml'],
|
|
100
119
|
},
|
|
101
120
|
dxf: {
|
|
102
121
|
extensions: ['dxf'],
|
|
103
|
-
priority:
|
|
122
|
+
priority: 13,
|
|
104
123
|
color: '#DCCD00',
|
|
105
124
|
mimeTypes: ['application/x-dxf', 'image/x-dxf'],
|
|
106
125
|
},
|
|
107
126
|
html: {
|
|
108
127
|
extensions: ['html', 'htm'],
|
|
109
|
-
priority:
|
|
128
|
+
priority: 14,
|
|
110
129
|
color: '#C0C9B6',
|
|
111
130
|
mimeTypes: ['text/html'],
|
|
112
131
|
},
|
|
113
132
|
fgb: {
|
|
114
133
|
extensions: ['fgb', 'flatgeobuf'],
|
|
115
|
-
priority:
|
|
134
|
+
priority: 15,
|
|
116
135
|
color: '#A8111C',
|
|
117
136
|
mimeTypes: ['application/flatgeobuf'],
|
|
118
137
|
},
|
|
119
138
|
jsonfg: {
|
|
120
139
|
extensions: ['jsonfg', 'jsonfgc'],
|
|
121
|
-
priority:
|
|
140
|
+
priority: 16,
|
|
122
141
|
color: '#009EE0',
|
|
123
142
|
mimeTypes: [
|
|
124
143
|
'application/vnd.ogc.fg+json',
|
|
125
144
|
'application/vnd.ogc.fg+json;compatibility=geojson',
|
|
126
145
|
],
|
|
127
146
|
},
|
|
147
|
+
webp: {
|
|
148
|
+
extensions: ['webp'],
|
|
149
|
+
priority: 17,
|
|
150
|
+
color: '#5A9E6F',
|
|
151
|
+
mimeTypes: ['image/webp'],
|
|
152
|
+
},
|
|
128
153
|
} as const
|
|
129
154
|
|
|
130
155
|
export type FileFormat = keyof typeof FORMATS
|
|
@@ -8,6 +8,7 @@ export * from './mobile-screen'
|
|
|
8
8
|
export * from './no-duplicate-file-name'
|
|
9
9
|
export * from './parse'
|
|
10
10
|
export * from './remove-whitespace'
|
|
11
|
+
export * from './scroll'
|
|
11
12
|
export * from './sort-by'
|
|
12
13
|
export * from './strip-html'
|
|
13
14
|
export * from './temporal-extent-union'
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ViewportScroller } from '@angular/common'
|
|
2
|
+
import { Event, NavigationEnd, Router, Scroll } from '@angular/router'
|
|
3
|
+
import { filter, pairwise, tap } from 'rxjs'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* When route is changed, Angular interprets a simple query params change as "forward navigation" too.
|
|
7
|
+
* Using the pairwise function allows us to have both the previous and current router events, which we can
|
|
8
|
+
* use to effectively compare the two navigation events and see if they actually change route, or only
|
|
9
|
+
* the route parameters (i.e. search params stored in query params).
|
|
10
|
+
*
|
|
11
|
+
* Related to: https://github.com/angular/angular/issues/26744
|
|
12
|
+
*/
|
|
13
|
+
export function handleScrollOnNavigation(
|
|
14
|
+
router: Router,
|
|
15
|
+
viewportScroller: ViewportScroller
|
|
16
|
+
): void {
|
|
17
|
+
router.events
|
|
18
|
+
.pipe(
|
|
19
|
+
filter((e: Event): e is Scroll => e instanceof Scroll),
|
|
20
|
+
pairwise()
|
|
21
|
+
)
|
|
22
|
+
.subscribe(([previous, current]: [Scroll, Scroll]) => {
|
|
23
|
+
if (current.position) {
|
|
24
|
+
// Backward navigation
|
|
25
|
+
viewportScroller.scrollToPosition(current.position)
|
|
26
|
+
} else if (current.anchor) {
|
|
27
|
+
// Anchor navigation
|
|
28
|
+
viewportScroller.scrollToAnchor(current.anchor)
|
|
29
|
+
} else {
|
|
30
|
+
// Check if routes match, or if it is only a query param change
|
|
31
|
+
if (
|
|
32
|
+
previous.routerEvent instanceof NavigationEnd &&
|
|
33
|
+
current.routerEvent instanceof NavigationEnd &&
|
|
34
|
+
getBaseRoute(previous.routerEvent.urlAfterRedirects) !==
|
|
35
|
+
getBaseRoute(current.routerEvent.urlAfterRedirects)
|
|
36
|
+
) {
|
|
37
|
+
// Routes don't match, this is actual forward navigation
|
|
38
|
+
// Default behavior: scroll to top
|
|
39
|
+
viewportScroller.scrollToPosition([0, 0])
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function getBaseRoute(url: string): string {
|
|
46
|
+
// return url without query params
|
|
47
|
+
return url.split('?')[0]
|
|
48
|
+
}
|