@opengeoweb/webmap 9.35.1-spike-oltanstack.0 → 9.37.0

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 (36) hide show
  1. package/index.esm.js +7751 -8863
  2. package/package.json +1 -2
  3. package/src/index.d.ts +0 -13
  4. package/src/lib/components/WMGetServiceFromStore.d.ts +3 -0
  5. package/src/lib/components/WMGlobals.d.ts +8 -0
  6. package/src/lib/components/WMJSService.d.ts +69 -0
  7. package/src/lib/components/WMJSTools.d.ts +15 -1
  8. package/src/lib/components/WMLayer.d.ts +78 -6
  9. package/src/lib/components/index.d.ts +5 -8
  10. package/src/lib/components/types.d.ts +1 -26
  11. package/src/lib/utils/getCapabilities/getCapabilities.d.ts +18 -0
  12. package/src/lib/utils/getCapabilities/getCapabilities.spec.d.ts +1 -0
  13. package/src/lib/utils/getCapabilities/index.d.ts +2 -4
  14. package/src/lib/{specs → utils/getCapabilities/mocks}/index.d.ts +4 -6
  15. package/src/lib/{specs → utils/getCapabilities/mocks}/mockGetCapabilities.d.ts +1 -2
  16. package/src/lib/utils/index.d.ts +6 -0
  17. package/src/lib/utils/mapConstants.d.ts +7 -0
  18. package/src/lib/utils/specs/WMS111GetCapabilitiesGeoServicesRADAR.d.ts +2 -0
  19. package/src/lib/{specs/layerSpecs.d.ts → utils/testSettings.d.ts} +5 -24
  20. package/src/lib/utils/testUtils.d.ts +21 -0
  21. package/src/lib/utils/utils.d.ts +5 -0
  22. package/src/lib/components/WMLayerTypes.d.ts +0 -57
  23. package/src/lib/components/WMLayerUtils.d.ts +0 -22
  24. package/src/lib/query/queryWMS.d.ts +0 -51
  25. package/src/lib/specs/getCapabilitySpecs/WMS130GetCapabilitiesRadarTestWithInheritLayerpropsToLayerTree.d.ts +0 -71
  26. package/src/lib/specs/getCapabilitySpecs/radarGetCapabilities.d.ts +0 -244
  27. package/src/lib/utils/getCapabilities/getWMSServiceId.d.ts +0 -10
  28. package/src/lib/utils/getCapabilities/utils.d.ts +0 -38
  29. package/src/lib/utils/getCapabilities/wmsQueryClient.d.ts +0 -7
  30. /package/src/lib/{utils/getCapabilities/utils.spec.d.ts → components/WMJSService.spec.d.ts} +0 -0
  31. /package/src/lib/{specs/getCapabilitySpecs → utils/getCapabilities/mocks}/WMS111GetCapabilitiesGeoServicesRADAR.d.ts +0 -0
  32. /package/src/lib/{specs/getCapabilitySpecs → utils/specs}/WMS130GetCapabilitiesHarmN25.d.ts +0 -0
  33. /package/src/lib/{specs/getCapabilitySpecs → utils/specs}/WMS130GetCapabilitiesRadarTestWithInheritAndReplaceLayerprops.d.ts +0 -0
  34. /package/src/lib/{specs/getCapabilitySpecs → utils/specs}/WMS130GetCapabilitiesRadarTestWithInheritLayerprops.d.ts +0 -0
  35. /package/src/lib/{specs/getCapabilitySpecs → utils/specs}/WMS130GetCapabilitiesRadarTestWithoutInheritLayerprops.d.ts +0 -0
  36. /package/src/lib/{specs/getCapabilitySpecs → utils/specs}/WMSSmartMet.d.ts +0 -0
@@ -1,51 +0,0 @@
1
- import { GetCapabilitiesJson, LayerProps, LayerTree, WMSServiceInfo } from '../components/types';
2
- /**
3
- * Invalidates the tanstack store for this getcapabilities service. Used to force refetch.
4
- *
5
- * @async
6
- * @param {string} serviceUrl
7
- * @returns {Promise<void>}
8
- */
9
- export declare const invalidateWMSGetCapabilities: (serviceUrl: string) => Promise<void>;
10
- /**
11
- * Fetches the WMS GetCapabilities document and converts it to a json object. It is cached by TanStack.
12
- *
13
- * @async
14
- * @param {string} serviceUrl
15
- * @returns {Promise<GetCapabilitiesJson>}
16
- */
17
- export declare const queryWMSGetCapabilities: (serviceUrl: string) => Promise<GetCapabilitiesJson>;
18
- /**
19
- * Gets the layer tree in hierarchical order for a WMS service. Cached by TanStack. Uses the same store as in queryWMSGetCapabilities.
20
- *
21
- * @async
22
- * @param {string} serviceUrl
23
- * @returns {Promise<LayerTree>}
24
- */
25
- export declare const queryWMSLayersTree: (serviceUrl: string) => Promise<LayerTree>;
26
- /**
27
- * Gets the flat layer list (without hierarchy) for a WMS service. Cached by TanStack. Uses the same store as in queryWMSGetCapabilities.
28
- *
29
- * @async
30
- * @param {string} serviceUrl
31
- * @param {boolean} [forceReload=false]
32
- * @returns {Promise<LayerProps[]>}
33
- */
34
- export declare const queryWMSLayers: (serviceUrl: string, forceReload?: boolean) => Promise<LayerProps[]>;
35
- /**
36
- * Returns details about the WMS service
37
- *
38
- * @async
39
- * @param {string} serviceUrl
40
- * @returns {Promise<WMSServiceInfo>}
41
- */
42
- export declare const queryWMSServiceInfo: (serviceUrl: string) => Promise<WMSServiceInfo>;
43
- /**
44
- * Returns specific layer from the WMS service
45
- *
46
- * @async
47
- * @param {string} serviceUrl
48
- * @param {string} name
49
- * @returns {Promise<LayerProps>}
50
- */
51
- export declare const queryWMSLayer: (serviceUrl: string, name: string) => Promise<LayerProps>;
@@ -1,71 +0,0 @@
1
- declare const _default: {
2
- name: null;
3
- title: string;
4
- leaf: boolean;
5
- path: never[];
6
- keywords: never[];
7
- abstract: undefined;
8
- styles: {
9
- title: string;
10
- name: string;
11
- legendURL: string;
12
- abstract: string;
13
- }[];
14
- dimensions: {
15
- name: string;
16
- units: string;
17
- currentValue: string;
18
- values: string;
19
- unitSymbol: undefined;
20
- }[];
21
- geographicBoundingBox: undefined;
22
- queryable: boolean;
23
- crs: {
24
- name: string;
25
- bbox: {
26
- left: number;
27
- right: number;
28
- bottom: number;
29
- top: number;
30
- };
31
- }[];
32
- children: {
33
- name: string;
34
- title: string;
35
- leaf: boolean;
36
- path: string[];
37
- keywords: never[];
38
- abstract: undefined;
39
- styles: {
40
- title: string;
41
- name: string;
42
- legendURL: string;
43
- abstract: string;
44
- }[];
45
- dimensions: {
46
- name: string;
47
- units: string;
48
- currentValue: string;
49
- values: string;
50
- unitSymbol: undefined;
51
- }[];
52
- geographicBoundingBox: {
53
- east: string;
54
- west: string;
55
- north: string;
56
- south: string;
57
- };
58
- queryable: boolean;
59
- crs: {
60
- name: string;
61
- bbox: {
62
- left: number;
63
- right: number;
64
- bottom: number;
65
- top: number;
66
- };
67
- }[];
68
- children: never[];
69
- }[];
70
- };
71
- export default _default;
@@ -1,244 +0,0 @@
1
- export declare const radarGetCapabilities: {
2
- WMS_Capabilities: {
3
- attr: {
4
- xmlns: string;
5
- 'xmlns:xlink': string;
6
- 'xmlns:xsi': string;
7
- version: string;
8
- updateSequence: string;
9
- 'xsi:schemaLocation': string;
10
- };
11
- Service: {
12
- attr: {};
13
- Name: {
14
- attr: {};
15
- value: string;
16
- };
17
- Title: {
18
- attr: {};
19
- value: string;
20
- };
21
- Abstract: {
22
- attr: {};
23
- value: string;
24
- };
25
- KeywordList: {
26
- attr: {};
27
- Keyword: {
28
- attr: {};
29
- value: string;
30
- }[];
31
- };
32
- OnlineResource: {
33
- attr: {
34
- 'xlink:type': string;
35
- 'xlink:href': string;
36
- };
37
- };
38
- ContactInformation: {
39
- attr: {};
40
- };
41
- Fees: {
42
- attr: {};
43
- value: string;
44
- };
45
- AccessConstraints: {
46
- attr: {};
47
- value: string;
48
- };
49
- MaxWidth: {
50
- attr: {};
51
- value: string;
52
- };
53
- MaxHeight: {
54
- attr: {};
55
- value: string;
56
- };
57
- };
58
- Capability: {
59
- attr: {};
60
- Request: {
61
- attr: {};
62
- GetCapabilities: {
63
- attr: {};
64
- Format: {
65
- attr: {};
66
- value: string;
67
- };
68
- DCPType: {
69
- attr: {};
70
- HTTP: {
71
- attr: {};
72
- Get: {
73
- attr: {};
74
- OnlineResource: {
75
- attr: {
76
- 'xlink:type': string;
77
- 'xlink:href': string;
78
- };
79
- };
80
- };
81
- };
82
- };
83
- };
84
- GetMap: {
85
- attr: {};
86
- Format: {
87
- attr: {};
88
- value: string;
89
- }[];
90
- DCPType: {
91
- attr: {};
92
- HTTP: {
93
- attr: {};
94
- Get: {
95
- attr: {};
96
- OnlineResource: {
97
- attr: {
98
- 'xlink:type': string;
99
- 'xlink:href': string;
100
- };
101
- };
102
- };
103
- };
104
- };
105
- };
106
- GetFeatureInfo: {
107
- attr: {};
108
- Format: {
109
- attr: {};
110
- value: string;
111
- }[];
112
- DCPType: {
113
- attr: {};
114
- HTTP: {
115
- attr: {};
116
- Get: {
117
- attr: {};
118
- OnlineResource: {
119
- attr: {
120
- 'xlink:type': string;
121
- 'xlink:href': string;
122
- };
123
- };
124
- };
125
- };
126
- };
127
- };
128
- };
129
- Exception: {
130
- attr: {};
131
- Format: {
132
- attr: {};
133
- value: string;
134
- }[];
135
- };
136
- UserDefinedSymbolization: {
137
- attr: {
138
- SupportSLD: string;
139
- };
140
- };
141
- Layer: {
142
- attr: {};
143
- Title: {
144
- attr: {};
145
- value: string;
146
- };
147
- CRS: {
148
- attr: {};
149
- value: string;
150
- }[];
151
- BoundingBox: {
152
- attr: {
153
- CRS: string;
154
- minx: string;
155
- miny: string;
156
- maxx: string;
157
- maxy: string;
158
- };
159
- }[];
160
- Layer: {
161
- attr: {
162
- queryable: string;
163
- opaque: string;
164
- cascaded: string;
165
- };
166
- Name: {
167
- attr: {};
168
- value: string;
169
- };
170
- Title: {
171
- attr: {};
172
- value: string;
173
- };
174
- EX_GeographicBoundingBox: {
175
- attr: {};
176
- westBoundLongitude: {
177
- attr: {};
178
- value: string;
179
- };
180
- eastBoundLongitude: {
181
- attr: {};
182
- value: string;
183
- };
184
- southBoundLatitude: {
185
- attr: {};
186
- value: string;
187
- };
188
- northBoundLatitude: {
189
- attr: {};
190
- value: string;
191
- };
192
- };
193
- BoundingBox: {
194
- attr: {
195
- CRS: string;
196
- minx: string;
197
- miny: string;
198
- maxx: string;
199
- maxy: string;
200
- };
201
- }[];
202
- Dimension: {
203
- attr: {
204
- name: string;
205
- units: string;
206
- default: string;
207
- multipleValues: string;
208
- nearestValue: string;
209
- current: string;
210
- };
211
- value: string;
212
- };
213
- Style: {
214
- attr: {};
215
- Name: {
216
- attr: {};
217
- value: string;
218
- };
219
- Title: {
220
- attr: {};
221
- value: string;
222
- };
223
- LegendURL: {
224
- attr: {
225
- width: string;
226
- height: string;
227
- };
228
- Format: {
229
- attr: {};
230
- value: string;
231
- };
232
- OnlineResource: {
233
- attr: {
234
- 'xlink:type': string;
235
- 'xlink:href': string;
236
- };
237
- };
238
- };
239
- }[];
240
- }[];
241
- };
242
- };
243
- };
244
- };
@@ -1,10 +0,0 @@
1
- export declare const _generateServiceId: () => string;
2
- export declare const _serviceIdLookupMap: Map<string, string>;
3
- /**
4
- * Returns the id corresponding to a WMS service url. It ensures that the id is unique across services.
5
- * The id can be used as a key in the redux store.
6
- *
7
- * @param {string} serviceUrl Link to a WMS service
8
- * @returns {string} Returns the corresponding id
9
- */
10
- export declare const getWMSServiceId: (serviceUrl: string) => string;
@@ -1,38 +0,0 @@
1
- import { Capability, GetCapabilitiesJson, Header, LayerProps, LayerTree, WMSLayerFromGetCapabilities, WMSServiceInfo } from '../../components/types';
2
- /**
3
- * A LayerTree with deeply nested children will be flattened into a 1D array.
4
- * Children properties are removed and result is sorted alphabetically by the layers title.
5
- * @param layerTree a WMS LayerTree
6
- * @returns Flat array of layers as LayerProps[]
7
- */
8
- export declare const privateWmsFlattenLayerTree: (layerTree: LayerTree) => LayerProps[];
9
- export declare const privateGetWMSUrl: (service?: string, additionalParams?: {}) => string;
10
- export declare const privateWmsGetCapabilities: (serviceUrl: string, headers?: Header[], forceReload?: boolean) => Promise<GetCapabilitiesJson>;
11
- export declare const privateWmsGetCapabilityElement: (jsonData: GetCapabilitiesJson) => Capability;
12
- export declare const privateCheckException: (jsonData: GetCapabilitiesJson) => string | undefined;
13
- export declare const privateWmsGetRootLayerFromGetCapabilities: (jsonData: GetCapabilitiesJson) => WMSLayerFromGetCapabilities;
14
- export declare const privateCheckVersion130: (jsonData: GetCapabilitiesJson) => void;
15
- export declare const privateCheckVersion: (jsonData: GetCapabilitiesJson) => string | null;
16
- /**
17
- * Returns a LayerTree object representing hierarchical structure of Lahyers in the WMS GetCapabilities document
18
- * @param jsonData GetCapabilitiesJson
19
- * @returns LayerTree
20
- */
21
- export declare const privateWmsGetLayerTree: (jsonData: GetCapabilitiesJson) => LayerTree;
22
- /**
23
- * Builds a standardized LayerTree object based on WMSLayerFromGetCapabilities object.
24
- * @param wmsLayer The WMSLayerFromGetCapabilities object
25
- * @param nestedPath - Optional, only to be used by privateWmsBuildLayerTreeFromNestedWMSLayer
26
- * @param nestedLayerPath - Optional, only to be used by privateWmsBuildLayerTreeFromNestedWMSLayer
27
- * @returns A LayerTree object.
28
- */
29
- export declare const privateWmsBuildLayerTreeFromNestedWMSLayer: (wmsLayer: WMSLayerFromGetCapabilities, nestedPath?: string[], nestedLayerPath?: LayerProps[]) => LayerTree;
30
- export type GetCapabilitiesFunctionType = (serviceUrl: string) => Promise<GetCapabilitiesJson>;
31
- export declare const setWMSGetCapabilitiesFetcher: (functionToSet: GetCapabilitiesFunctionType | null) => void;
32
- /**
33
- * Returns details about the WMS service. You are encouraged to use queryWMSServiceInfo instead.
34
- * @param getCapabilitiesJson
35
- * @param serviceUrl
36
- * @returns
37
- */
38
- export declare const privateGetWMSServiceInfo: (getCapabilitiesJson: GetCapabilitiesJson, serviceUrl: string) => WMSServiceInfo;
@@ -1,7 +0,0 @@
1
- import { QueryClient } from '@tanstack/query-core';
2
- /**
3
- * This is the default TanStack QueryClient used for the query functions.
4
- * It can be used in react by a provider to provide the query client to the hook functions.
5
- * This ensures that TanStack keeps the same store for both the hooks and the query functions.
6
- */
7
- export declare const wmsQueryClient: QueryClient;