@disy/cadenza.js 3.0.2 → 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 +12 -0
- package/apidoc/classes/AbortError.html +3 -3
- package/apidoc/classes/CadenzaClient.html +114 -34
- 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 +80 -71
- package/cadenza.js +122 -73
- 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,14 +80,15 @@ 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
|
+
* @return {Promise<void>} A `Promise` which resolves when the views of the worksheet have finished reloading
|
|
86
87
|
* @postMessage
|
|
87
88
|
*/
|
|
88
89
|
reload({ invalidateCaches }?: {
|
|
89
90
|
invalidateCaches?: boolean | undefined;
|
|
90
|
-
} | undefined, ...args: any[]): void
|
|
91
|
+
} | undefined, ...args: any[]): Promise<void>;
|
|
91
92
|
/**
|
|
92
93
|
* Sends a message to parent Cadenza window to close the window containing this application
|
|
93
94
|
* @postMessageParent
|
|
@@ -97,20 +98,24 @@ export class CadenzaClient {
|
|
|
97
98
|
* Show a workbook map view in an iframe.
|
|
98
99
|
*
|
|
99
100
|
* @param {EmbeddingTargetId} mapView - The workbook map view to show
|
|
100
|
-
* @param {object} [
|
|
101
|
-
* @param {UiFeature[]} [
|
|
102
|
-
* @param {boolean} [
|
|
103
|
-
* @param {FilterVariables} [
|
|
104
|
-
* @param {Geometry} [
|
|
105
|
-
* @param {boolean} [
|
|
106
|
-
* @param {boolean} [
|
|
107
|
-
* @param {GlobalId} [
|
|
108
|
-
* @param {string} [
|
|
109
|
-
* @param {Extent} [
|
|
110
|
-
* @param {OperationMode} [
|
|
111
|
-
* @param {boolean} [
|
|
112
|
-
* @param {ExtentStrategy} [
|
|
113
|
-
*
|
|
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
|
|
114
119
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
115
120
|
* @throws For invalid arguments
|
|
116
121
|
* @fires
|
|
@@ -225,14 +230,14 @@ export class CadenzaClient {
|
|
|
225
230
|
*
|
|
226
231
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
227
232
|
* @param {GeometryType} geometryType - The geometry type
|
|
228
|
-
* @param {object} [
|
|
229
|
-
* @param {FilterVariables} [
|
|
230
|
-
* @param {string} [
|
|
231
|
-
* @param {Extent} [
|
|
232
|
-
* @param {number} [
|
|
233
|
-
* @param {boolean} [
|
|
234
|
-
* @param {OperationMode} [
|
|
235
|
-
* @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
|
|
236
241
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
237
242
|
* @throws For invalid arguments
|
|
238
243
|
* @fires
|
|
@@ -255,15 +260,19 @@ export class CadenzaClient {
|
|
|
255
260
|
*
|
|
256
261
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
257
262
|
* @param {Geometry} geometry - The geometry
|
|
258
|
-
* @param {object} [
|
|
259
|
-
* @param {FilterVariables} [
|
|
260
|
-
* @param {string} [
|
|
261
|
-
* @param {Extent} [
|
|
262
|
-
* @param {number} [
|
|
263
|
-
* @param {boolean} [
|
|
264
|
-
* @param {OperationMode} [
|
|
265
|
-
* @param {ExtentStrategy} [
|
|
266
|
-
*
|
|
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
|
|
267
276
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
268
277
|
* @throws For invalid arguments
|
|
269
278
|
* @fires
|
|
@@ -296,15 +305,15 @@ export class CadenzaClient {
|
|
|
296
305
|
* Select objects in a workbook map.
|
|
297
306
|
*
|
|
298
307
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view
|
|
299
|
-
* @param {object} [
|
|
300
|
-
* @param {FilterVariables} [
|
|
301
|
-
* @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
|
|
302
311
|
* (identified using layer paths or print names)
|
|
303
|
-
* @param {string} [
|
|
304
|
-
* @param {Extent} [
|
|
305
|
-
* @param {boolean} [
|
|
306
|
-
* @param {OperationMode} [
|
|
307
|
-
* @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
|
|
308
317
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
309
318
|
* @throws For invalid arguments
|
|
310
319
|
* @fires
|
|
@@ -345,10 +354,10 @@ export class CadenzaClient {
|
|
|
345
354
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
346
355
|
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
|
|
347
356
|
* and `"pdf"` for views of type "JasperReports report".
|
|
348
|
-
* @param {object} [
|
|
349
|
-
* @param {FilterVariables} [
|
|
350
|
-
* @param {TablePart[]} [
|
|
351
|
-
* @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
|
|
352
361
|
* @return {Promise<Response>} A `Promise` for the fetch response
|
|
353
362
|
* @throws For invalid arguments
|
|
354
363
|
* @server
|
|
@@ -365,11 +374,11 @@ export class CadenzaClient {
|
|
|
365
374
|
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
366
375
|
* (identified using layer paths or print names)
|
|
367
376
|
* @param {unknown[][]} objectIds - The IDs of the objects to select
|
|
368
|
-
* @param {object} [
|
|
369
|
-
* @param {FilterVariables} [
|
|
370
|
-
* @param {AbortSignal} [
|
|
371
|
-
* @param {Boolean} [
|
|
372
|
-
* @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
|
|
373
382
|
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
374
383
|
* @throws For invalid arguments
|
|
375
384
|
*/
|
|
@@ -386,10 +395,10 @@ export class CadenzaClient {
|
|
|
386
395
|
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
387
396
|
* (identified using layer paths or print names)
|
|
388
397
|
* @param {Geometry} geometry - The intersection geometry
|
|
389
|
-
* @param {object} [
|
|
390
|
-
* @param {boolean} [
|
|
391
|
-
* @param {Distance} [
|
|
392
|
-
* @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
|
|
393
402
|
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
394
403
|
* @server
|
|
395
404
|
*/
|
|
@@ -407,10 +416,10 @@ export class CadenzaClient {
|
|
|
407
416
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
408
417
|
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
|
|
409
418
|
* and `"pdf"` for views of type "JasperReports report".
|
|
410
|
-
* @param {object} [
|
|
411
|
-
* @param {string} [
|
|
412
|
-
* @param {FilterVariables} [
|
|
413
|
-
* @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.
|
|
414
423
|
* @throws For invalid arguments
|
|
415
424
|
* @server
|
|
416
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,14 +285,15 @@ 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
|
+
* @return {Promise<void>} A `Promise` which resolves when the views of the worksheet have finished reloading
|
|
291
292
|
* @postMessage
|
|
292
293
|
*/
|
|
293
294
|
reload({ invalidateCaches = false } = {}) {
|
|
294
295
|
this.#log('CadenzaClient#reload', ...arguments);
|
|
295
|
-
this.#
|
|
296
|
+
return this.#postRequest('reload', { invalidateCaches });
|
|
296
297
|
}
|
|
297
298
|
/**
|
|
298
299
|
* Sends a message to parent Cadenza window to close the window containing this application
|
|
@@ -307,20 +308,24 @@ export class CadenzaClient {
|
|
|
307
308
|
* Show a workbook map view in an iframe.
|
|
308
309
|
*
|
|
309
310
|
* @param {EmbeddingTargetId} mapView - The workbook map view to show
|
|
310
|
-
* @param {object} [
|
|
311
|
-
* @param {UiFeature[]} [
|
|
312
|
-
* @param {boolean} [
|
|
313
|
-
* @param {FilterVariables} [
|
|
314
|
-
* @param {Geometry} [
|
|
315
|
-
* @param {boolean} [
|
|
316
|
-
* @param {boolean} [
|
|
317
|
-
* @param {GlobalId} [
|
|
318
|
-
* @param {string} [
|
|
319
|
-
* @param {Extent} [
|
|
320
|
-
* @param {OperationMode} [
|
|
321
|
-
* @param {boolean} [
|
|
322
|
-
* @param {ExtentStrategy} [
|
|
323
|
-
*
|
|
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
|
|
324
329
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
325
330
|
* @throws For invalid arguments
|
|
326
331
|
* @fires
|
|
@@ -333,7 +338,12 @@ export class CadenzaClient {
|
|
|
333
338
|
if (geometry) {
|
|
334
339
|
assertValidGeometryType(geometry.type);
|
|
335
340
|
}
|
|
336
|
-
const
|
|
341
|
+
const validExtentStrategy = sanitizeExtentStrategy({
|
|
342
|
+
geometry,
|
|
343
|
+
extentStrategy,
|
|
344
|
+
});
|
|
345
|
+
const zoomToGeometry = validExtentStrategy?.type === 'geometry' &&
|
|
346
|
+
validExtentStrategy?.geometry === geometry;
|
|
337
347
|
const params = createParams({
|
|
338
348
|
disabledUiFeatures,
|
|
339
349
|
expandNavigator,
|
|
@@ -356,6 +366,9 @@ export class CadenzaClient {
|
|
|
356
366
|
zoomToGeometry,
|
|
357
367
|
});
|
|
358
368
|
}
|
|
369
|
+
if (!zoomToGeometry && validExtentStrategy) {
|
|
370
|
+
this.#setExtentStrategy(validExtentStrategy);
|
|
371
|
+
}
|
|
359
372
|
}
|
|
360
373
|
/**
|
|
361
374
|
* Expand/collapse the navigator.
|
|
@@ -494,14 +507,14 @@ export class CadenzaClient {
|
|
|
494
507
|
*
|
|
495
508
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
496
509
|
* @param {GeometryType} geometryType - The geometry type
|
|
497
|
-
* @param {object} [
|
|
498
|
-
* @param {FilterVariables} [
|
|
499
|
-
* @param {string} [
|
|
500
|
-
* @param {Extent} [
|
|
501
|
-
* @param {number} [
|
|
502
|
-
* @param {boolean} [
|
|
503
|
-
* @param {OperationMode} [
|
|
504
|
-
* @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
|
|
505
518
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
506
519
|
* @throws For invalid arguments
|
|
507
520
|
* @fires
|
|
@@ -529,15 +542,19 @@ export class CadenzaClient {
|
|
|
529
542
|
*
|
|
530
543
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
531
544
|
* @param {Geometry} geometry - The geometry
|
|
532
|
-
* @param {object} [
|
|
533
|
-
* @param {FilterVariables} [
|
|
534
|
-
* @param {string} [
|
|
535
|
-
* @param {Extent} [
|
|
536
|
-
* @param {number} [
|
|
537
|
-
* @param {boolean} [
|
|
538
|
-
* @param {OperationMode} [
|
|
539
|
-
* @param {ExtentStrategy} [
|
|
540
|
-
*
|
|
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
|
|
541
558
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
542
559
|
* @throws For invalid arguments
|
|
543
560
|
* @fires
|
|
@@ -549,7 +566,12 @@ export class CadenzaClient {
|
|
|
549
566
|
async editGeometry(backgroundMapView, geometry, { filter, locationFinder, mapExtent, minScale, useMapSrs, extentStrategy, operationMode, signal, } = {}) {
|
|
550
567
|
this.#log('CadenzaClient#editGeometry', ...arguments);
|
|
551
568
|
assertValidGeometryType(geometry.type);
|
|
552
|
-
const
|
|
569
|
+
const validExtentStrategy = sanitizeExtentStrategy({
|
|
570
|
+
geometry,
|
|
571
|
+
extentStrategy,
|
|
572
|
+
});
|
|
573
|
+
const zoomToGeometry = validExtentStrategy?.type === 'geometry' &&
|
|
574
|
+
validExtentStrategy?.geometry === geometry;
|
|
553
575
|
const params = createParams({
|
|
554
576
|
action: 'editGeometry',
|
|
555
577
|
filter,
|
|
@@ -568,6 +590,9 @@ export class CadenzaClient {
|
|
|
568
590
|
zoomToGeometry,
|
|
569
591
|
});
|
|
570
592
|
}
|
|
593
|
+
if (!zoomToGeometry && validExtentStrategy) {
|
|
594
|
+
this.#setExtentStrategy(validExtentStrategy);
|
|
595
|
+
}
|
|
571
596
|
}
|
|
572
597
|
/**
|
|
573
598
|
* Set custom validity state of the geometry editor in addition to the default validation state (including errors and
|
|
@@ -586,15 +611,15 @@ export class CadenzaClient {
|
|
|
586
611
|
* Select objects in a workbook map.
|
|
587
612
|
*
|
|
588
613
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view
|
|
589
|
-
* @param {object} [
|
|
590
|
-
* @param {FilterVariables} [
|
|
591
|
-
* @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
|
|
592
617
|
* (identified using layer paths or print names)
|
|
593
|
-
* @param {string} [
|
|
594
|
-
* @param {Extent} [
|
|
595
|
-
* @param {boolean} [
|
|
596
|
-
* @param {OperationMode} [
|
|
597
|
-
* @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
|
|
598
623
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
599
624
|
* @throws For invalid arguments
|
|
600
625
|
* @fires
|
|
@@ -800,10 +825,10 @@ export class CadenzaClient {
|
|
|
800
825
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
801
826
|
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
|
|
802
827
|
* and `"pdf"` for views of type "JasperReports report".
|
|
803
|
-
* @param {object} [
|
|
804
|
-
* @param {FilterVariables} [
|
|
805
|
-
* @param {TablePart[]} [
|
|
806
|
-
* @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
|
|
807
832
|
* @return {Promise<Response>} A `Promise` for the fetch response
|
|
808
833
|
* @throws For invalid arguments
|
|
809
834
|
* @server
|
|
@@ -821,11 +846,11 @@ export class CadenzaClient {
|
|
|
821
846
|
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
822
847
|
* (identified using layer paths or print names)
|
|
823
848
|
* @param {unknown[][]} objectIds - The IDs of the objects to select
|
|
824
|
-
* @param {object} [
|
|
825
|
-
* @param {FilterVariables} [
|
|
826
|
-
* @param {AbortSignal} [
|
|
827
|
-
* @param {Boolean} [
|
|
828
|
-
* @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
|
|
829
854
|
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
830
855
|
* @throws For invalid arguments
|
|
831
856
|
*/
|
|
@@ -848,10 +873,10 @@ export class CadenzaClient {
|
|
|
848
873
|
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
849
874
|
* (identified using layer paths or print names)
|
|
850
875
|
* @param {Geometry} geometry - The intersection geometry
|
|
851
|
-
* @param {object} [
|
|
852
|
-
* @param {boolean} [
|
|
853
|
-
* @param {Distance} [
|
|
854
|
-
* @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
|
|
855
880
|
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
856
881
|
* @server
|
|
857
882
|
*/
|
|
@@ -903,10 +928,10 @@ export class CadenzaClient {
|
|
|
903
928
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
904
929
|
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
|
|
905
930
|
* and `"pdf"` for views of type "JasperReports report".
|
|
906
|
-
* @param {object} [
|
|
907
|
-
* @param {string} [
|
|
908
|
-
* @param {FilterVariables} [
|
|
909
|
-
* @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.
|
|
910
935
|
* @throws For invalid arguments
|
|
911
936
|
* @server
|
|
912
937
|
*/
|
|
@@ -1105,6 +1130,30 @@ function createParams({ action, dataType, disabledUiFeatures, expandNavigator, f
|
|
|
1105
1130
|
function array(/** @type unknown */ value) {
|
|
1106
1131
|
return Array.isArray(value) ? value : [value];
|
|
1107
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
|
+
}
|
|
1108
1157
|
// Please do not add internal event types like 'ready' here.
|
|
1109
1158
|
/**
|
|
1110
1159
|
* @typedef {'action'
|