@disy/cadenza.js 3.0.3 → 3.0.4
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/CHANGELOG.md +7 -0
- package/apidoc/classes/AbortError.html +3 -3
- package/apidoc/classes/CadenzaClient.html +114 -35
- package/apidoc/classes/CadenzaError.html +5 -5
- package/apidoc/functions/cadenza.html +3 -3
- package/apidoc/index.html +2 -2
- package/apidoc/interfaces/CadenzaClientOptions.html +5 -5
- package/apidoc/interfaces/CadenzaEvent.html +4 -4
- package/apidoc/interfaces/Distance.html +2 -2
- package/apidoc/interfaces/ExternalLinkKey.html +4 -4
- package/apidoc/interfaces/Feature.html +7 -7
- package/apidoc/interfaces/FeatureCollection.html +3 -3
- package/apidoc/interfaces/Geometry.html +3 -3
- package/apidoc/interfaces/GeometryExtentStrategy.html +4 -4
- package/apidoc/interfaces/PageSource.html +3 -3
- package/apidoc/modules.html +2 -2
- package/apidoc/types/CadenzaActionEvent.html +2 -2
- package/apidoc/types/CadenzaChangeSelectionEvent.html +2 -2
- package/apidoc/types/CadenzaDrillThroughEvent.html +2 -2
- package/apidoc/types/CadenzaEditGeometryCancelEvent.html +2 -2
- package/apidoc/types/CadenzaEditGeometryOkEvent.html +2 -2
- package/apidoc/types/CadenzaEditGeometryUpdateEvent.html +2 -2
- package/apidoc/types/CadenzaErrorEvent.html +2 -2
- package/apidoc/types/CadenzaEventByType.html +1 -1
- package/apidoc/types/CadenzaEventType.html +2 -2
- package/apidoc/types/CadenzaObjectInfoEvent.html +2 -2
- package/apidoc/types/CadenzaReloadEvent.html +2 -2
- package/apidoc/types/CadenzaSelectObjectsCancelEvent.html +2 -2
- package/apidoc/types/CadenzaSelectObjectsOkEvent.html +2 -2
- package/apidoc/types/CustomValidityType.html +2 -2
- package/apidoc/types/DataType.html +2 -2
- package/apidoc/types/EmbeddingTargetId.html +2 -2
- package/apidoc/types/Extent.html +2 -2
- package/apidoc/types/ExtentStrategy.html +2 -2
- package/apidoc/types/FilterVariables.html +2 -2
- package/apidoc/types/GeometryType.html +2 -2
- package/apidoc/types/GlobalId.html +2 -2
- package/apidoc/types/LengthUnit.html +1 -1
- package/apidoc/types/OpaqueString.html +2 -2
- package/apidoc/types/OperationMode.html +2 -2
- package/apidoc/types/TablePart.html +2 -2
- package/apidoc/types/UiFeature.html +2 -2
- package/apidoc/types/WorkbookLayerPath.html +2 -2
- package/cadenza.d.ts +78 -70
- package/cadenza.js +120 -72
- package/package.json +1 -1
package/cadenza.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export class CadenzaClient {
|
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
38
|
* @hidden
|
|
39
|
-
* @param {CadenzaClientOptions} [
|
|
39
|
+
* @param {CadenzaClientOptions} [__namedParameters]
|
|
40
40
|
*/
|
|
41
41
|
constructor({ baseUrl, debug, iframe, webApplication }?: CadenzaClientOptions | undefined);
|
|
42
42
|
/** The base URL of the Cadenza server this client is requesting */
|
|
@@ -47,18 +47,18 @@ export class CadenzaClient {
|
|
|
47
47
|
* Show a page, workbook, worksheet or workbook view in an iframe.
|
|
48
48
|
*
|
|
49
49
|
* @param {PageSource | EmbeddingTargetId} source - The source to show
|
|
50
|
-
* @param {object} [
|
|
51
|
-
* @param {DataType} [
|
|
50
|
+
* @param {object} [__namedParameters]
|
|
51
|
+
* @param {DataType} [__namedParameters.dataType] - Set to 'pdf' for views of type "JasperReports report"
|
|
52
52
|
* to show the report PDF directly, without any Cadenza headers or footers.
|
|
53
|
-
* @param {UiFeature[]} [
|
|
54
|
-
* @param {boolean} [
|
|
55
|
-
* @param {FilterVariables} [
|
|
56
|
-
* @param {boolean} [
|
|
57
|
-
* @param {boolean} [
|
|
58
|
-
* @param {GlobalId} [
|
|
59
|
-
* @param {String} [
|
|
60
|
-
* @param {OperationMode} [
|
|
61
|
-
* @param {AbortSignal} [
|
|
53
|
+
* @param {UiFeature[]} [__namedParameters.disabledUiFeatures] - Cadenza UI features to disable
|
|
54
|
+
* @param {boolean} [__namedParameters.expandNavigator] - Indicates if the navigator should be expanded.
|
|
55
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
56
|
+
* @param {boolean} [__namedParameters.hideMainHeaderAndFooter] - Whether to hide the main Cadenza header and footer
|
|
57
|
+
* @param {boolean} [__namedParameters.hideWorkbookToolBar] - Whether to hide the workbook toolbar
|
|
58
|
+
* @param {GlobalId} [__namedParameters.highlightGlobalId] - The ID of an item to highlight / expand in the navigator
|
|
59
|
+
* @param {String} [__namedParameters.labelSet] - The name of a label set defined in the `basicweb-config.xml` (only supported for the welcome page)
|
|
60
|
+
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
61
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
|
|
62
62
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
63
63
|
* @throws For invalid arguments
|
|
64
64
|
* @fires
|
|
@@ -80,8 +80,8 @@ export class CadenzaClient {
|
|
|
80
80
|
} | undefined, ...args: any[]): Promise<void>;
|
|
81
81
|
/**
|
|
82
82
|
* Reload the views of a worksheet.
|
|
83
|
-
* @param {object} [
|
|
84
|
-
* @param {boolean} [
|
|
83
|
+
* @param {object} [__namedParameters] - Options
|
|
84
|
+
* @param {boolean} [__namedParameters.invalidateCaches] - When true, caches will be invalidated for objecttypes used
|
|
85
85
|
* in the worksheet
|
|
86
86
|
* @return {Promise<void>} A `Promise` which resolves when the views of the worksheet have finished reloading
|
|
87
87
|
* @postMessage
|
|
@@ -98,20 +98,24 @@ export class CadenzaClient {
|
|
|
98
98
|
* Show a workbook map view in an iframe.
|
|
99
99
|
*
|
|
100
100
|
* @param {EmbeddingTargetId} mapView - The workbook map view to show
|
|
101
|
-
* @param {object} [
|
|
102
|
-
* @param {UiFeature[]} [
|
|
103
|
-
* @param {boolean} [
|
|
104
|
-
* @param {FilterVariables} [
|
|
105
|
-
* @param {Geometry} [
|
|
106
|
-
* @param {boolean} [
|
|
107
|
-
* @param {boolean} [
|
|
108
|
-
* @param {GlobalId} [
|
|
109
|
-
* @param {string} [
|
|
110
|
-
* @param {Extent} [
|
|
111
|
-
* @param {OperationMode} [
|
|
112
|
-
* @param {boolean} [
|
|
113
|
-
* @param {ExtentStrategy} [
|
|
114
|
-
*
|
|
101
|
+
* @param {object} [__namedParameters] - Options
|
|
102
|
+
* @param {UiFeature[]} [__namedParameters.disabledUiFeatures] - Cadenza UI features to disable
|
|
103
|
+
* @param {boolean} [__namedParameters.expandNavigator] - Indicates if the navigator should be expanded.
|
|
104
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
105
|
+
* @param {Geometry} [__namedParameters.geometry] - A geometry to show on the map
|
|
106
|
+
* @param {boolean} [__namedParameters.hideMainHeaderAndFooter] - Whether to hide the main Cadenza header and footer
|
|
107
|
+
* @param {boolean} [__namedParameters.hideWorkbookToolBar] - Whether to hide the workbook toolbar
|
|
108
|
+
* @param {GlobalId} [__namedParameters.highlightGlobalId] - The ID of an item to highlight / expand in the navigator
|
|
109
|
+
* @param {string} [__namedParameters.locationFinder] - A search query for the location finder
|
|
110
|
+
* @param {Extent} [__namedParameters.mapExtent] - A map extent to set
|
|
111
|
+
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
112
|
+
* @param {boolean} [__namedParameters.useMapSrs] - Whether the geometry and the extent are in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
113
|
+
* @param {ExtentStrategy} [__namedParameters.extentStrategy] - Strategy to define the initial map extent. A given extentStrategy
|
|
114
|
+
* trumps zooming to a specified mapExtent
|
|
115
|
+
* which trumps zooming to a locationFinder result
|
|
116
|
+
* which trumps zooming to the initial extent of the opened mapView.
|
|
117
|
+
* If a specified {@link GeometryExtentStrategy} doesn't contain a 'geometry', the 'geometry' of this API call is used.
|
|
118
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
|
|
115
119
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
116
120
|
* @throws For invalid arguments
|
|
117
121
|
* @fires
|
|
@@ -226,14 +230,14 @@ export class CadenzaClient {
|
|
|
226
230
|
*
|
|
227
231
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
228
232
|
* @param {GeometryType} geometryType - The geometry type
|
|
229
|
-
* @param {object} [
|
|
230
|
-
* @param {FilterVariables} [
|
|
231
|
-
* @param {string} [
|
|
232
|
-
* @param {Extent} [
|
|
233
|
-
* @param {number} [
|
|
234
|
-
* @param {boolean} [
|
|
235
|
-
* @param {OperationMode} [
|
|
236
|
-
* @param {AbortSignal} [
|
|
233
|
+
* @param {object} [__namedParameters] - Options
|
|
234
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
235
|
+
* @param {string} [__namedParameters.locationFinder] - A search query for the location finder
|
|
236
|
+
* @param {Extent} [__namedParameters.mapExtent] - A map extent to set
|
|
237
|
+
* @param {number} [__namedParameters.minScale] - The minimum scale where the user should work on. A warning is shown when the map is zoomed out above the threshold.
|
|
238
|
+
* @param {boolean} [__namedParameters.useMapSrs] - Whether the created geometry should use the map's SRS (otherwise EPSG:4326 will be used)
|
|
239
|
+
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
240
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
|
|
237
241
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
238
242
|
* @throws For invalid arguments
|
|
239
243
|
* @fires
|
|
@@ -256,15 +260,19 @@ export class CadenzaClient {
|
|
|
256
260
|
*
|
|
257
261
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
258
262
|
* @param {Geometry} geometry - The geometry
|
|
259
|
-
* @param {object} [
|
|
260
|
-
* @param {FilterVariables} [
|
|
261
|
-
* @param {string} [
|
|
262
|
-
* @param {Extent} [
|
|
263
|
-
* @param {number} [
|
|
264
|
-
* @param {boolean} [
|
|
265
|
-
* @param {OperationMode} [
|
|
266
|
-
* @param {ExtentStrategy} [
|
|
267
|
-
*
|
|
263
|
+
* @param {object} [__namedParameters] - Options
|
|
264
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
265
|
+
* @param {string} [__namedParameters.locationFinder] - A search query for the location finder
|
|
266
|
+
* @param {Extent} [__namedParameters.mapExtent] - A map extent to set
|
|
267
|
+
* @param {number} [__namedParameters.minScale] - The minimum scale where the user should work on. A warning is shown when the map is zoomed out above the threshold.
|
|
268
|
+
* @param {boolean} [__namedParameters.useMapSrs] - Whether the geometry is in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
269
|
+
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
270
|
+
* @param {ExtentStrategy} [__namedParameters.extentStrategy] - Strategy to define the initial map extent. A given extentStrategy
|
|
271
|
+
* trumps zooming to a specified mapExtent
|
|
272
|
+
* which trumps zooming to a locationFinder result
|
|
273
|
+
* which trumps zooming to the initial extent of the opened mapView.
|
|
274
|
+
* If a specified {@link GeometryExtentStrategy} doesn't contain a 'geometry', the 'geometry' of this API call is used.
|
|
275
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
|
|
268
276
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
269
277
|
* @throws For invalid arguments
|
|
270
278
|
* @fires
|
|
@@ -297,15 +305,15 @@ export class CadenzaClient {
|
|
|
297
305
|
* Select objects in a workbook map.
|
|
298
306
|
*
|
|
299
307
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view
|
|
300
|
-
* @param {object} [
|
|
301
|
-
* @param {FilterVariables} [
|
|
302
|
-
* @param {(WorkbookLayerPath | string)[]} [
|
|
308
|
+
* @param {object} [__namedParameters] - Options
|
|
309
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
310
|
+
* @param {(WorkbookLayerPath | string)[]} [__namedParameters.layers] - Layers to restrict the selection to
|
|
303
311
|
* (identified using layer paths or print names)
|
|
304
|
-
* @param {string} [
|
|
305
|
-
* @param {Extent} [
|
|
306
|
-
* @param {boolean} [
|
|
307
|
-
* @param {OperationMode} [
|
|
308
|
-
* @param {AbortSignal} [
|
|
312
|
+
* @param {string} [__namedParameters.locationFinder] - A search query for the location finder
|
|
313
|
+
* @param {Extent} [__namedParameters.mapExtent] - A map extent to set
|
|
314
|
+
* @param {boolean} [__namedParameters.useMapSrs] - Whether the geometry is in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
315
|
+
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
316
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
|
|
309
317
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
310
318
|
* @throws For invalid arguments
|
|
311
319
|
* @fires
|
|
@@ -346,10 +354,10 @@ export class CadenzaClient {
|
|
|
346
354
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
347
355
|
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
|
|
348
356
|
* and `"pdf"` for views of type "JasperReports report".
|
|
349
|
-
* @param {object} [
|
|
350
|
-
* @param {FilterVariables} [
|
|
351
|
-
* @param {TablePart[]} [
|
|
352
|
-
* @param {AbortSignal} [
|
|
357
|
+
* @param {object} [__namedParameters] - Options
|
|
358
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
359
|
+
* @param {TablePart[]} [__namedParameters.parts] - Table parts to export; If not specified, all parts are exported.
|
|
360
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the data fetching
|
|
353
361
|
* @return {Promise<Response>} A `Promise` for the fetch response
|
|
354
362
|
* @throws For invalid arguments
|
|
355
363
|
* @server
|
|
@@ -366,11 +374,11 @@ export class CadenzaClient {
|
|
|
366
374
|
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
367
375
|
* (identified using layer paths or print names)
|
|
368
376
|
* @param {unknown[][]} objectIds - The IDs of the objects to select
|
|
369
|
-
* @param {object} [
|
|
370
|
-
* @param {FilterVariables} [
|
|
371
|
-
* @param {AbortSignal} [
|
|
372
|
-
* @param {Boolean} [
|
|
373
|
-
* @param {Boolean} [
|
|
377
|
+
* @param {object} [__namedParameters] - Options
|
|
378
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
379
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the data fetching
|
|
380
|
+
* @param {Boolean} [__namedParameters.useMapSrs] - Use the map SRS instead of WGS84
|
|
381
|
+
* @param {Boolean} [__namedParameters.fullGeometries] - Return non-simplified geometries
|
|
374
382
|
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
375
383
|
* @throws For invalid arguments
|
|
376
384
|
*/
|
|
@@ -387,10 +395,10 @@ export class CadenzaClient {
|
|
|
387
395
|
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
388
396
|
* (identified using layer paths or print names)
|
|
389
397
|
* @param {Geometry} geometry - The intersection geometry
|
|
390
|
-
* @param {object} [
|
|
391
|
-
* @param {boolean} [
|
|
392
|
-
* @param {Distance} [
|
|
393
|
-
* @param {AbortSignal} [
|
|
398
|
+
* @param {object} [__namedParameters] - Options
|
|
399
|
+
* @param {boolean} [__namedParameters.useMapSrs] - The intersection geometry and the result geometries are in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
400
|
+
* @param {Distance} [__namedParameters.buffer] - Buffer size for geometry of the transition
|
|
401
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the data fetching
|
|
394
402
|
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
395
403
|
* @server
|
|
396
404
|
*/
|
|
@@ -408,10 +416,10 @@ export class CadenzaClient {
|
|
|
408
416
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
409
417
|
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
|
|
410
418
|
* and `"pdf"` for views of type "JasperReports report".
|
|
411
|
-
* @param {object} [
|
|
412
|
-
* @param {string} [
|
|
413
|
-
* @param {FilterVariables} [
|
|
414
|
-
* @param {TablePart[]} [
|
|
419
|
+
* @param {object} [__namedParameters] - Options
|
|
420
|
+
* @param {string} [__namedParameters.fileName] - The file name to use; The file extension is appended by Cadenza.
|
|
421
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
422
|
+
* @param {TablePart[]} [__namedParameters.parts] - Table parts to export; If not specified, all parts are exported.
|
|
415
423
|
* @throws For invalid arguments
|
|
416
424
|
* @server
|
|
417
425
|
*/
|
package/cadenza.js
CHANGED
|
@@ -184,7 +184,7 @@ export class CadenzaClient {
|
|
|
184
184
|
/**
|
|
185
185
|
*
|
|
186
186
|
* @hidden
|
|
187
|
-
* @param {CadenzaClientOptions} [
|
|
187
|
+
* @param {CadenzaClientOptions} [__namedParameters]
|
|
188
188
|
*/
|
|
189
189
|
constructor({ baseUrl, debug = false, iframe, webApplication } = {}) {
|
|
190
190
|
if (webApplication) {
|
|
@@ -241,18 +241,18 @@ export class CadenzaClient {
|
|
|
241
241
|
* Show a page, workbook, worksheet or workbook view in an iframe.
|
|
242
242
|
*
|
|
243
243
|
* @param {PageSource | EmbeddingTargetId} source - The source to show
|
|
244
|
-
* @param {object} [
|
|
245
|
-
* @param {DataType} [
|
|
244
|
+
* @param {object} [__namedParameters]
|
|
245
|
+
* @param {DataType} [__namedParameters.dataType] - Set to 'pdf' for views of type "JasperReports report"
|
|
246
246
|
* to show the report PDF directly, without any Cadenza headers or footers.
|
|
247
|
-
* @param {UiFeature[]} [
|
|
248
|
-
* @param {boolean} [
|
|
249
|
-
* @param {FilterVariables} [
|
|
250
|
-
* @param {boolean} [
|
|
251
|
-
* @param {boolean} [
|
|
252
|
-
* @param {GlobalId} [
|
|
253
|
-
* @param {String} [
|
|
254
|
-
* @param {OperationMode} [
|
|
255
|
-
* @param {AbortSignal} [
|
|
247
|
+
* @param {UiFeature[]} [__namedParameters.disabledUiFeatures] - Cadenza UI features to disable
|
|
248
|
+
* @param {boolean} [__namedParameters.expandNavigator] - Indicates if the navigator should be expanded.
|
|
249
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
250
|
+
* @param {boolean} [__namedParameters.hideMainHeaderAndFooter] - Whether to hide the main Cadenza header and footer
|
|
251
|
+
* @param {boolean} [__namedParameters.hideWorkbookToolBar] - Whether to hide the workbook toolbar
|
|
252
|
+
* @param {GlobalId} [__namedParameters.highlightGlobalId] - The ID of an item to highlight / expand in the navigator
|
|
253
|
+
* @param {String} [__namedParameters.labelSet] - The name of a label set defined in the `basicweb-config.xml` (only supported for the welcome page)
|
|
254
|
+
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
255
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
|
|
256
256
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
257
257
|
* @throws For invalid arguments
|
|
258
258
|
* @fires
|
|
@@ -285,8 +285,8 @@ export class CadenzaClient {
|
|
|
285
285
|
}
|
|
286
286
|
/**
|
|
287
287
|
* Reload the views of a worksheet.
|
|
288
|
-
* @param {object} [
|
|
289
|
-
* @param {boolean} [
|
|
288
|
+
* @param {object} [__namedParameters] - Options
|
|
289
|
+
* @param {boolean} [__namedParameters.invalidateCaches] - When true, caches will be invalidated for objecttypes used
|
|
290
290
|
* in the worksheet
|
|
291
291
|
* @return {Promise<void>} A `Promise` which resolves when the views of the worksheet have finished reloading
|
|
292
292
|
* @postMessage
|
|
@@ -308,20 +308,24 @@ export class CadenzaClient {
|
|
|
308
308
|
* Show a workbook map view in an iframe.
|
|
309
309
|
*
|
|
310
310
|
* @param {EmbeddingTargetId} mapView - The workbook map view to show
|
|
311
|
-
* @param {object} [
|
|
312
|
-
* @param {UiFeature[]} [
|
|
313
|
-
* @param {boolean} [
|
|
314
|
-
* @param {FilterVariables} [
|
|
315
|
-
* @param {Geometry} [
|
|
316
|
-
* @param {boolean} [
|
|
317
|
-
* @param {boolean} [
|
|
318
|
-
* @param {GlobalId} [
|
|
319
|
-
* @param {string} [
|
|
320
|
-
* @param {Extent} [
|
|
321
|
-
* @param {OperationMode} [
|
|
322
|
-
* @param {boolean} [
|
|
323
|
-
* @param {ExtentStrategy} [
|
|
324
|
-
*
|
|
311
|
+
* @param {object} [__namedParameters] - Options
|
|
312
|
+
* @param {UiFeature[]} [__namedParameters.disabledUiFeatures] - Cadenza UI features to disable
|
|
313
|
+
* @param {boolean} [__namedParameters.expandNavigator] - Indicates if the navigator should be expanded.
|
|
314
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
315
|
+
* @param {Geometry} [__namedParameters.geometry] - A geometry to show on the map
|
|
316
|
+
* @param {boolean} [__namedParameters.hideMainHeaderAndFooter] - Whether to hide the main Cadenza header and footer
|
|
317
|
+
* @param {boolean} [__namedParameters.hideWorkbookToolBar] - Whether to hide the workbook toolbar
|
|
318
|
+
* @param {GlobalId} [__namedParameters.highlightGlobalId] - The ID of an item to highlight / expand in the navigator
|
|
319
|
+
* @param {string} [__namedParameters.locationFinder] - A search query for the location finder
|
|
320
|
+
* @param {Extent} [__namedParameters.mapExtent] - A map extent to set
|
|
321
|
+
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
322
|
+
* @param {boolean} [__namedParameters.useMapSrs] - Whether the geometry and the extent are in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
323
|
+
* @param {ExtentStrategy} [__namedParameters.extentStrategy] - Strategy to define the initial map extent. A given extentStrategy
|
|
324
|
+
* trumps zooming to a specified mapExtent
|
|
325
|
+
* which trumps zooming to a locationFinder result
|
|
326
|
+
* which trumps zooming to the initial extent of the opened mapView.
|
|
327
|
+
* If a specified {@link GeometryExtentStrategy} doesn't contain a 'geometry', the 'geometry' of this API call is used.
|
|
328
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
|
|
325
329
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
326
330
|
* @throws For invalid arguments
|
|
327
331
|
* @fires
|
|
@@ -334,7 +338,12 @@ export class CadenzaClient {
|
|
|
334
338
|
if (geometry) {
|
|
335
339
|
assertValidGeometryType(geometry.type);
|
|
336
340
|
}
|
|
337
|
-
const
|
|
341
|
+
const validExtentStrategy = sanitizeExtentStrategy({
|
|
342
|
+
geometry,
|
|
343
|
+
extentStrategy,
|
|
344
|
+
});
|
|
345
|
+
const zoomToGeometry = validExtentStrategy?.type === 'geometry' &&
|
|
346
|
+
validExtentStrategy?.geometry === geometry;
|
|
338
347
|
const params = createParams({
|
|
339
348
|
disabledUiFeatures,
|
|
340
349
|
expandNavigator,
|
|
@@ -357,6 +366,9 @@ export class CadenzaClient {
|
|
|
357
366
|
zoomToGeometry,
|
|
358
367
|
});
|
|
359
368
|
}
|
|
369
|
+
if (!zoomToGeometry && validExtentStrategy) {
|
|
370
|
+
this.#setExtentStrategy(validExtentStrategy);
|
|
371
|
+
}
|
|
360
372
|
}
|
|
361
373
|
/**
|
|
362
374
|
* Expand/collapse the navigator.
|
|
@@ -495,14 +507,14 @@ export class CadenzaClient {
|
|
|
495
507
|
*
|
|
496
508
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
497
509
|
* @param {GeometryType} geometryType - The geometry type
|
|
498
|
-
* @param {object} [
|
|
499
|
-
* @param {FilterVariables} [
|
|
500
|
-
* @param {string} [
|
|
501
|
-
* @param {Extent} [
|
|
502
|
-
* @param {number} [
|
|
503
|
-
* @param {boolean} [
|
|
504
|
-
* @param {OperationMode} [
|
|
505
|
-
* @param {AbortSignal} [
|
|
510
|
+
* @param {object} [__namedParameters] - Options
|
|
511
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
512
|
+
* @param {string} [__namedParameters.locationFinder] - A search query for the location finder
|
|
513
|
+
* @param {Extent} [__namedParameters.mapExtent] - A map extent to set
|
|
514
|
+
* @param {number} [__namedParameters.minScale] - The minimum scale where the user should work on. A warning is shown when the map is zoomed out above the threshold.
|
|
515
|
+
* @param {boolean} [__namedParameters.useMapSrs] - Whether the created geometry should use the map's SRS (otherwise EPSG:4326 will be used)
|
|
516
|
+
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
517
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
|
|
506
518
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
507
519
|
* @throws For invalid arguments
|
|
508
520
|
* @fires
|
|
@@ -530,15 +542,19 @@ export class CadenzaClient {
|
|
|
530
542
|
*
|
|
531
543
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
532
544
|
* @param {Geometry} geometry - The geometry
|
|
533
|
-
* @param {object} [
|
|
534
|
-
* @param {FilterVariables} [
|
|
535
|
-
* @param {string} [
|
|
536
|
-
* @param {Extent} [
|
|
537
|
-
* @param {number} [
|
|
538
|
-
* @param {boolean} [
|
|
539
|
-
* @param {OperationMode} [
|
|
540
|
-
* @param {ExtentStrategy} [
|
|
541
|
-
*
|
|
545
|
+
* @param {object} [__namedParameters] - Options
|
|
546
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
547
|
+
* @param {string} [__namedParameters.locationFinder] - A search query for the location finder
|
|
548
|
+
* @param {Extent} [__namedParameters.mapExtent] - A map extent to set
|
|
549
|
+
* @param {number} [__namedParameters.minScale] - The minimum scale where the user should work on. A warning is shown when the map is zoomed out above the threshold.
|
|
550
|
+
* @param {boolean} [__namedParameters.useMapSrs] - Whether the geometry is in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
551
|
+
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
552
|
+
* @param {ExtentStrategy} [__namedParameters.extentStrategy] - Strategy to define the initial map extent. A given extentStrategy
|
|
553
|
+
* trumps zooming to a specified mapExtent
|
|
554
|
+
* which trumps zooming to a locationFinder result
|
|
555
|
+
* which trumps zooming to the initial extent of the opened mapView.
|
|
556
|
+
* If a specified {@link GeometryExtentStrategy} doesn't contain a 'geometry', the 'geometry' of this API call is used.
|
|
557
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
|
|
542
558
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
543
559
|
* @throws For invalid arguments
|
|
544
560
|
* @fires
|
|
@@ -550,7 +566,12 @@ export class CadenzaClient {
|
|
|
550
566
|
async editGeometry(backgroundMapView, geometry, { filter, locationFinder, mapExtent, minScale, useMapSrs, extentStrategy, operationMode, signal, } = {}) {
|
|
551
567
|
this.#log('CadenzaClient#editGeometry', ...arguments);
|
|
552
568
|
assertValidGeometryType(geometry.type);
|
|
553
|
-
const
|
|
569
|
+
const validExtentStrategy = sanitizeExtentStrategy({
|
|
570
|
+
geometry,
|
|
571
|
+
extentStrategy,
|
|
572
|
+
});
|
|
573
|
+
const zoomToGeometry = validExtentStrategy?.type === 'geometry' &&
|
|
574
|
+
validExtentStrategy?.geometry === geometry;
|
|
554
575
|
const params = createParams({
|
|
555
576
|
action: 'editGeometry',
|
|
556
577
|
filter,
|
|
@@ -569,6 +590,9 @@ export class CadenzaClient {
|
|
|
569
590
|
zoomToGeometry,
|
|
570
591
|
});
|
|
571
592
|
}
|
|
593
|
+
if (!zoomToGeometry && validExtentStrategy) {
|
|
594
|
+
this.#setExtentStrategy(validExtentStrategy);
|
|
595
|
+
}
|
|
572
596
|
}
|
|
573
597
|
/**
|
|
574
598
|
* Set custom validity state of the geometry editor in addition to the default validation state (including errors and
|
|
@@ -587,15 +611,15 @@ export class CadenzaClient {
|
|
|
587
611
|
* Select objects in a workbook map.
|
|
588
612
|
*
|
|
589
613
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view
|
|
590
|
-
* @param {object} [
|
|
591
|
-
* @param {FilterVariables} [
|
|
592
|
-
* @param {(WorkbookLayerPath | string)[]} [
|
|
614
|
+
* @param {object} [__namedParameters] - Options
|
|
615
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
616
|
+
* @param {(WorkbookLayerPath | string)[]} [__namedParameters.layers] - Layers to restrict the selection to
|
|
593
617
|
* (identified using layer paths or print names)
|
|
594
|
-
* @param {string} [
|
|
595
|
-
* @param {Extent} [
|
|
596
|
-
* @param {boolean} [
|
|
597
|
-
* @param {OperationMode} [
|
|
598
|
-
* @param {AbortSignal} [
|
|
618
|
+
* @param {string} [__namedParameters.locationFinder] - A search query for the location finder
|
|
619
|
+
* @param {Extent} [__namedParameters.mapExtent] - A map extent to set
|
|
620
|
+
* @param {boolean} [__namedParameters.useMapSrs] - Whether the geometry is in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
621
|
+
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
622
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
|
|
599
623
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
600
624
|
* @throws For invalid arguments
|
|
601
625
|
* @fires
|
|
@@ -801,10 +825,10 @@ export class CadenzaClient {
|
|
|
801
825
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
802
826
|
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
|
|
803
827
|
* and `"pdf"` for views of type "JasperReports report".
|
|
804
|
-
* @param {object} [
|
|
805
|
-
* @param {FilterVariables} [
|
|
806
|
-
* @param {TablePart[]} [
|
|
807
|
-
* @param {AbortSignal} [
|
|
828
|
+
* @param {object} [__namedParameters] - Options
|
|
829
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
830
|
+
* @param {TablePart[]} [__namedParameters.parts] - Table parts to export; If not specified, all parts are exported.
|
|
831
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the data fetching
|
|
808
832
|
* @return {Promise<Response>} A `Promise` for the fetch response
|
|
809
833
|
* @throws For invalid arguments
|
|
810
834
|
* @server
|
|
@@ -822,11 +846,11 @@ export class CadenzaClient {
|
|
|
822
846
|
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
823
847
|
* (identified using layer paths or print names)
|
|
824
848
|
* @param {unknown[][]} objectIds - The IDs of the objects to select
|
|
825
|
-
* @param {object} [
|
|
826
|
-
* @param {FilterVariables} [
|
|
827
|
-
* @param {AbortSignal} [
|
|
828
|
-
* @param {Boolean} [
|
|
829
|
-
* @param {Boolean} [
|
|
849
|
+
* @param {object} [__namedParameters] - Options
|
|
850
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
851
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the data fetching
|
|
852
|
+
* @param {Boolean} [__namedParameters.useMapSrs] - Use the map SRS instead of WGS84
|
|
853
|
+
* @param {Boolean} [__namedParameters.fullGeometries] - Return non-simplified geometries
|
|
830
854
|
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
831
855
|
* @throws For invalid arguments
|
|
832
856
|
*/
|
|
@@ -849,10 +873,10 @@ export class CadenzaClient {
|
|
|
849
873
|
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
850
874
|
* (identified using layer paths or print names)
|
|
851
875
|
* @param {Geometry} geometry - The intersection geometry
|
|
852
|
-
* @param {object} [
|
|
853
|
-
* @param {boolean} [
|
|
854
|
-
* @param {Distance} [
|
|
855
|
-
* @param {AbortSignal} [
|
|
876
|
+
* @param {object} [__namedParameters] - Options
|
|
877
|
+
* @param {boolean} [__namedParameters.useMapSrs] - The intersection geometry and the result geometries are in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
878
|
+
* @param {Distance} [__namedParameters.buffer] - Buffer size for geometry of the transition
|
|
879
|
+
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the data fetching
|
|
856
880
|
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
857
881
|
* @server
|
|
858
882
|
*/
|
|
@@ -904,10 +928,10 @@ export class CadenzaClient {
|
|
|
904
928
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
905
929
|
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
|
|
906
930
|
* and `"pdf"` for views of type "JasperReports report".
|
|
907
|
-
* @param {object} [
|
|
908
|
-
* @param {string} [
|
|
909
|
-
* @param {FilterVariables} [
|
|
910
|
-
* @param {TablePart[]} [
|
|
931
|
+
* @param {object} [__namedParameters] - Options
|
|
932
|
+
* @param {string} [__namedParameters.fileName] - The file name to use; The file extension is appended by Cadenza.
|
|
933
|
+
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
934
|
+
* @param {TablePart[]} [__namedParameters.parts] - Table parts to export; If not specified, all parts are exported.
|
|
911
935
|
* @throws For invalid arguments
|
|
912
936
|
* @server
|
|
913
937
|
*/
|
|
@@ -1106,6 +1130,30 @@ function createParams({ action, dataType, disabledUiFeatures, expandNavigator, f
|
|
|
1106
1130
|
function array(/** @type unknown */ value) {
|
|
1107
1131
|
return Array.isArray(value) ? value : [value];
|
|
1108
1132
|
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Creates a valid extent strategy
|
|
1135
|
+
*
|
|
1136
|
+
* If the result is not a valid extent strategy, the return value is undefined.
|
|
1137
|
+
*
|
|
1138
|
+
* @param {object} __namedParameters
|
|
1139
|
+
* @param {Geometry} [__namedParameters.geometry]
|
|
1140
|
+
* @param {ExtentStrategy} [__namedParameters.extentStrategy]
|
|
1141
|
+
* @return {ExtentStrategy | undefined}
|
|
1142
|
+
*/
|
|
1143
|
+
function sanitizeExtentStrategy({ extentStrategy, geometry } = {}) {
|
|
1144
|
+
if (extentStrategy) {
|
|
1145
|
+
switch (extentStrategy.type) {
|
|
1146
|
+
case 'geometry':
|
|
1147
|
+
geometry = extentStrategy.geometry ?? geometry;
|
|
1148
|
+
if (geometry) {
|
|
1149
|
+
return { type: 'geometry', geometry };
|
|
1150
|
+
}
|
|
1151
|
+
break;
|
|
1152
|
+
default:
|
|
1153
|
+
return extentStrategy;
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1109
1157
|
// Please do not add internal event types like 'ready' here.
|
|
1110
1158
|
/**
|
|
1111
1159
|
* @typedef {'action'
|