@opengeoweb/data-explorer 19.1.0 → 19.1.1

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.
Files changed (51) hide show
  1. package/dist/README.md +100 -0
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.esm.js +11120 -0
  4. package/dist/src/index.d.ts +5 -0
  5. package/dist/src/lib/components/AreaFilter/AreaFilter.d.ts +11 -0
  6. package/dist/src/lib/components/AreaFilter/AreaFilterConnect.d.ts +2 -0
  7. package/dist/src/lib/components/AreaFilter/AreaFilterLocationSearch.d.ts +6 -0
  8. package/dist/src/lib/components/ConceptList/ConceptChip.d.ts +10 -0
  9. package/dist/src/lib/components/ConceptList/ConceptChipConnect.d.ts +7 -0
  10. package/dist/src/lib/components/ConceptList/ConceptList.d.ts +8 -0
  11. package/dist/src/lib/components/ConceptList/ConceptListConnect.d.ts +2 -0
  12. package/dist/src/lib/components/DataExplorer.d.ts +18 -0
  13. package/dist/src/lib/components/DataExplorerConnect.d.ts +6 -0
  14. package/dist/src/lib/components/DataExplorerFilters/DataExplorerFilterOption.d.ts +11 -0
  15. package/dist/src/lib/components/DataExplorerFilters/DataExplorerFilters.d.ts +10 -0
  16. package/dist/src/lib/components/DataExplorerFilters/DataExplorerFiltersConnect.d.ts +2 -0
  17. package/dist/src/lib/components/DataExplorerFilters/DataExplorerSearchConnect.d.ts +2 -0
  18. package/dist/src/lib/components/DataExplorerInfo/DataExplorerInfo.d.ts +15 -0
  19. package/dist/src/lib/components/DataExplorerInfo/DataExplorerInfoButton.d.ts +7 -0
  20. package/dist/src/lib/components/DataExplorerInfo/DataExplorerInfoButtonConnect.d.ts +8 -0
  21. package/dist/src/lib/components/DataExplorerInfo/DataExplorerInfoConnect.d.ts +2 -0
  22. package/dist/src/lib/components/DataExplorerInfo/InfoDialogBaseInfo.d.ts +4 -0
  23. package/dist/src/lib/components/DataExplorerInfo/InfoDialogContacts.d.ts +4 -0
  24. package/dist/src/lib/components/DataExplorerInfo/InfoDialogGeographicalCoverage.d.ts +4 -0
  25. package/dist/src/lib/components/DataExplorerInfo/InfoDialogKeywords.d.ts +4 -0
  26. package/dist/src/lib/components/DataExplorerInfo/InfoDialogLinks.d.ts +4 -0
  27. package/dist/src/lib/components/DataExplorerInfo/InfoDialogTime.d.ts +4 -0
  28. package/dist/src/lib/components/DataExplorerInfo/InfoDialogWMSMap.d.ts +14 -0
  29. package/dist/src/lib/components/DataExplorerInfo/InfoDialogWMSMapConnect.d.ts +15 -0
  30. package/dist/src/lib/components/DatasetList/DatasetAddRemoveButton.d.ts +10 -0
  31. package/dist/src/lib/components/DatasetList/DatasetList.d.ts +10 -0
  32. package/dist/src/lib/components/DatasetList/DatasetListConnect.d.ts +2 -0
  33. package/dist/src/lib/components/DatasetList/DatasetRow.d.ts +14 -0
  34. package/dist/src/lib/components/DatasetList/DatasetRowConnect.d.ts +10 -0
  35. package/dist/src/lib/components/providers/Providers.d.ts +28 -0
  36. package/dist/src/lib/components/providers/index.d.ts +1 -0
  37. package/dist/src/lib/store/index.d.ts +4 -0
  38. package/dist/src/lib/store/listeners.d.ts +2 -0
  39. package/dist/src/lib/store/reducer.d.ts +14 -0
  40. package/dist/src/lib/store/selectors.d.ts +233 -0
  41. package/dist/src/lib/store/store.d.ts +7 -0
  42. package/dist/src/lib/store/types.d.ts +208 -0
  43. package/dist/src/lib/utils/data-explorerUtils.d.ts +8 -0
  44. package/dist/src/lib/utils/dataexplorer-api/api.d.ts +7 -0
  45. package/dist/src/lib/utils/dataexplorer-api/fakeApi.d.ts +15 -0
  46. package/dist/src/lib/utils/dataexplorer-api/hooks.d.ts +7 -0
  47. package/dist/src/lib/utils/i18n.d.ts +6 -0
  48. package/dist/src/lib/utils/location-api/fakeApi.d.ts +47 -0
  49. package/dist/src/lib/utils/storyUtils.d.ts +10 -0
  50. package/dist/src/lib/utils/timeUtils.d.ts +1 -0
  51. package/package.json +2 -1
@@ -0,0 +1,208 @@
1
+ export interface DiscoveryMetadataFeature {
2
+ id: string;
3
+ conformsTo: string[];
4
+ type: string;
5
+ geometry: InfoDialogGeographicalCoverageProps;
6
+ properties: {
7
+ identifier?: string;
8
+ title?: string;
9
+ description?: string;
10
+ formats?: {
11
+ name: string;
12
+ }[];
13
+ themes?: InfoDialogThemesProps[];
14
+ language?: {
15
+ code: string;
16
+ };
17
+ type?: string;
18
+ updated?: string;
19
+ created?: string;
20
+ rights?: string;
21
+ contacts: InfoDialogContactsProps[];
22
+ keywords?: string[];
23
+ 'wmo:dataPolicy': string;
24
+ };
25
+ links: InfoDialogLinksProps[];
26
+ time?: InfoDialogTimeProps;
27
+ }
28
+ export interface InfoDialogBaseInfoProps {
29
+ properties: {
30
+ identifier?: string;
31
+ title?: string;
32
+ description?: string;
33
+ formats?: {
34
+ name: string;
35
+ }[];
36
+ themes?: InfoDialogThemesProps[];
37
+ language?: {
38
+ code: string;
39
+ };
40
+ type?: string;
41
+ updated?: string;
42
+ created?: string;
43
+ rights?: string;
44
+ contacts: InfoDialogContactsProps[];
45
+ keywords?: string[];
46
+ 'wmo:dataPolicy': string;
47
+ };
48
+ datasetLink: string;
49
+ id: string;
50
+ }
51
+ export interface InfoDialogGeographicalCoverageProps {
52
+ type: string;
53
+ coordinates: number[][][] | number[][][][];
54
+ }
55
+ export interface InfoDialogTimeProps {
56
+ interval?: string[];
57
+ resolution?: string;
58
+ }
59
+ export interface InfoDialogThemesAndKeywordsProps {
60
+ themes?: InfoDialogThemesProps[];
61
+ keywords?: string[];
62
+ }
63
+ export interface InfoDialogThemesProps {
64
+ concepts: {
65
+ id: string;
66
+ }[];
67
+ scheme: string;
68
+ }
69
+ export interface InfoDialogLinksProps {
70
+ href: string;
71
+ rel: string;
72
+ title: string;
73
+ type: string;
74
+ }
75
+ export interface InfoDialogContactsProps {
76
+ addresses?: {
77
+ administrativeArea?: string;
78
+ city?: string;
79
+ country?: string;
80
+ deliveryPoint?: string[];
81
+ postalCode?: string;
82
+ }[];
83
+ contactInstructions?: string;
84
+ emails?: {
85
+ value: string;
86
+ }[];
87
+ hoursOfService?: string;
88
+ links?: {
89
+ href: string;
90
+ rel: string;
91
+ type: string;
92
+ }[];
93
+ name?: string;
94
+ organization?: string;
95
+ phones?: {
96
+ value: string;
97
+ }[];
98
+ position?: string;
99
+ roles?: string[];
100
+ }
101
+ export interface DiscoveryMetadataItems {
102
+ type: string;
103
+ features: DiscoveryMetadataFeature[];
104
+ numberMatched: number;
105
+ numberReturned: number;
106
+ links: object[];
107
+ timeStamp: string;
108
+ }
109
+ export interface DataExplorerWMSState {
110
+ geometry: {
111
+ type: string;
112
+ coordinates: number[][][] | number[][][][];
113
+ };
114
+ links: {
115
+ href: string;
116
+ rel: string;
117
+ title?: string;
118
+ type: string;
119
+ }[];
120
+ }
121
+ export interface DataExplorerStoreType {
122
+ discoveryCatalogueURL: string;
123
+ filters: {
124
+ searchFilter: string;
125
+ queryables: Queryable[];
126
+ concepts: Concept[];
127
+ queryableConfigurations: QueryableConfiguration[];
128
+ wmsbox?: number[];
129
+ bbox?: number[];
130
+ meteogateOnly?: boolean;
131
+ };
132
+ selectedDatasetId: string;
133
+ areaFilterTileURL?: string;
134
+ areaFilterTileLicense?: string;
135
+ infoDialogWMSState?: DataExplorerWMSState;
136
+ }
137
+ export interface DataExplorerModuleState {
138
+ dataExplorer?: DataExplorerStoreType;
139
+ }
140
+ export interface SetSearchFilterPayload {
141
+ filterText: string;
142
+ }
143
+ export interface SetQueryablesPayload {
144
+ queryables: Queryable[];
145
+ }
146
+ export interface SetQueryableValuePayload {
147
+ id: string;
148
+ value: string;
149
+ checked: boolean;
150
+ }
151
+ export interface SetSelectedConceptPayload {
152
+ id: string;
153
+ }
154
+ export interface SetSelectedDatasetPayload {
155
+ id: string;
156
+ }
157
+ export interface SetBboxFilterPayload {
158
+ bbox: number[];
159
+ }
160
+ export interface SetMeteogateOnlyPayload {
161
+ enabled: boolean;
162
+ }
163
+ export interface Queryable {
164
+ id: string;
165
+ label: string;
166
+ values: QueryableValue[];
167
+ selected: string[];
168
+ }
169
+ export interface SetWMSboxFilterPayload {
170
+ wmsBox: number[];
171
+ }
172
+ export interface QueryableValue {
173
+ value: string;
174
+ datasetCount: number;
175
+ }
176
+ export interface Concept {
177
+ id: string;
178
+ label: string;
179
+ selected: boolean;
180
+ }
181
+ export declare enum DatasetFormat {
182
+ WMS = "WMS",
183
+ GeoJSON = "GeoJSON"
184
+ }
185
+ export interface AddLayerParams {
186
+ serviceUrl: string;
187
+ layerName: string;
188
+ datasetFormat: DatasetFormat;
189
+ }
190
+ export interface DeleteLayerParams {
191
+ layerId: string;
192
+ layerIndex: number;
193
+ }
194
+ export interface ConceptConfiguration {
195
+ id: string;
196
+ label: string;
197
+ }
198
+ export interface QueryableConfiguration {
199
+ id: string;
200
+ label: string;
201
+ }
202
+ export interface DataExplorerPresets {
203
+ discoveryCatalogueURL: string;
204
+ concepts: ConceptConfiguration[];
205
+ queryables: QueryableConfiguration[];
206
+ areaFilterTileURL?: string;
207
+ areaFilterTileLicense?: string;
208
+ }
@@ -0,0 +1,8 @@
1
+ export declare const findSmallestMultiPolygonFirstChild: (multiPolygons: number[][][][]) => number;
2
+ export declare const findLargestMultiPolygonFirstChild: (multiPolygons: number[][][][]) => number;
3
+ export declare const findSmallestMultiPolygonLastChild: (multiPolygons: number[][][][]) => number;
4
+ export declare const findLargestMultiPolygonLastChild: (multiPolygons: number[][][][]) => number;
5
+ export declare const findSmallestPolygonFirstChild: (pairs: number[][][]) => number;
6
+ export declare const findLargestPolygonFirstChild: (pairs: number[][][]) => number;
7
+ export declare const findSmallestPolygonLastChild: (pairs: number[][][]) => number;
8
+ export declare const findLargestPolygonLastChild: (pairs: number[][][]) => number;
@@ -0,0 +1,7 @@
1
+ import type { FeatureCollection } from 'geojson';
2
+ import type { Concept, DataExplorerPresets, DiscoveryMetadataFeature, DiscoveryMetadataItems, Queryable } from '../../store/types';
3
+ export declare const LIMIT = 10000;
4
+ export declare const fetchItems: (baseUrl: string, search?: string, queryables?: Queryable[], concepts?: Concept[], bbox?: number[], meteogateOnly?: boolean) => Promise<DiscoveryMetadataItems | null>;
5
+ export declare const fetchGeoJSON: (collectionUrl: string) => Promise<FeatureCollection | null>;
6
+ export declare const fetchItem: (baseUrl: string, datasetId: string) => Promise<DiscoveryMetadataFeature | null>;
7
+ export declare const getDataExplorerConfiguration: (productConfigKey: string) => Promise<DataExplorerPresets>;
@@ -0,0 +1,15 @@
1
+ import type { DiscoveryMetadataItems } from '../../store/types';
2
+ export declare const testPresets: {
3
+ discoveryCatalogueURL: string;
4
+ concepts: {
5
+ id: string;
6
+ label: string;
7
+ }[];
8
+ queryables: {
9
+ id: string;
10
+ label: string;
11
+ }[];
12
+ areaFilterTileLicense: string;
13
+ };
14
+ export declare const fakeDatasets: DiscoveryMetadataItems;
15
+ export declare const dataexplorerEndpoints: import("msw").HttpHandler[];
@@ -0,0 +1,7 @@
1
+ import type { UseQueryResult } from '@tanstack/react-query';
2
+ import type { FeatureCollection } from 'geojson';
3
+ import type { Concept, DataExplorerPresets, DiscoveryMetadataFeature, DiscoveryMetadataItems, Queryable } from '../../store/types';
4
+ export declare const useGetDataexplorerConfiguration: (productConfigKey: string) => UseQueryResult<DataExplorerPresets>;
5
+ export declare const useFetchItems: (baseUrl: string, search?: string, queryables?: Queryable[], concepts?: Concept[], bbox?: number[], meteogateOnly?: boolean, enabled?: boolean) => UseQueryResult<DiscoveryMetadataItems | null>;
6
+ export declare const useFetchGeoJSON: (collectionUrl: string) => UseQueryResult<FeatureCollection | null>;
7
+ export declare const useFetchItem: (baseUrl: string, datasetId: string) => UseQueryResult<DiscoveryMetadataFeature | null>;
@@ -0,0 +1,6 @@
1
+ import i18n from 'i18next';
2
+ import type { UseTranslationResponse } from 'react-i18next';
3
+ export declare const DATA_EXPLORER_NAMESPACE = "dataexplorer";
4
+ export declare const initDataExplorerI18n: () => void;
5
+ export declare const translateInTestsAndStories: (key: string, params?: Record<string, string | number> | undefined) => string;
6
+ export declare const useDataExplorerTranslation: () => UseTranslationResponse<typeof DATA_EXPLORER_NAMESPACE, typeof i18n>;
@@ -0,0 +1,47 @@
1
+ export declare const fakeLocationList: ({
2
+ id: string;
3
+ name: string;
4
+ source: string;
5
+ group: string;
6
+ } | {
7
+ id: string;
8
+ name: string;
9
+ source: string;
10
+ group?: undefined;
11
+ })[];
12
+ export declare const fakeLocationDetailList: ({
13
+ id: string;
14
+ name: string;
15
+ source: string;
16
+ group: string;
17
+ lat: number;
18
+ lon: number;
19
+ geometry: null;
20
+ bbox?: undefined;
21
+ } | {
22
+ id: string;
23
+ name: string;
24
+ source: string;
25
+ lat: number;
26
+ lon: number;
27
+ geometry: {
28
+ type: string;
29
+ properties: {};
30
+ geometry: {
31
+ type: string;
32
+ coordinates: number[][];
33
+ };
34
+ };
35
+ group?: undefined;
36
+ bbox?: undefined;
37
+ } | {
38
+ id: string;
39
+ name: string;
40
+ source: string;
41
+ lat: number;
42
+ lon: number;
43
+ bbox: number[];
44
+ group?: undefined;
45
+ geometry?: undefined;
46
+ })[];
47
+ export declare const locationApiEndpoints: import("msw").HttpHandler[];
@@ -0,0 +1,10 @@
1
+ import type { DiscoveryMetadataFeature, InfoDialogBaseInfoProps, InfoDialogContactsProps, InfoDialogGeographicalCoverageProps, InfoDialogThemesAndKeywordsProps, InfoDialogLinksProps, InfoDialogTimeProps } from '../store/types';
2
+ export declare const InfoDialogLinksMock: InfoDialogLinksProps[];
3
+ export declare const InfoDialogTimeMock: InfoDialogTimeProps;
4
+ export declare const CoordinatedUniversalTimeMock: InfoDialogTimeProps;
5
+ export declare const InfoDialogKeywordsMock: InfoDialogThemesAndKeywordsProps;
6
+ export declare const InfoDialogContactsMock: InfoDialogContactsProps;
7
+ export declare const InfoDialogGeographicalCoveragePolygonMock: InfoDialogGeographicalCoverageProps;
8
+ export declare const InfoDialogGeographicalCoverageMultipolygonMock: InfoDialogGeographicalCoverageProps;
9
+ export declare const InfoDialogBaseInfoMock: InfoDialogBaseInfoProps;
10
+ export declare const featureInfoMock: DiscoveryMetadataFeature;
@@ -0,0 +1 @@
1
+ export declare const parseISO8601Duration: (isoDuration: string) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/data-explorer",
3
- "version": "19.1.0",
3
+ "version": "19.1.1",
4
4
  "main": "./dist/index.esm.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -42,6 +42,7 @@
42
42
  },
43
43
  "files": [
44
44
  "dist",
45
+ "!dist/package.json",
45
46
  "README.md",
46
47
  "package.json"
47
48
  ]