@disy/cadenza.js 10.2.3 → 10.2.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/apidoc/assets/navigation.js +1 -1
  3. package/apidoc/assets/search.js +1 -1
  4. package/apidoc/classes/AbortError.html +3 -3
  5. package/apidoc/classes/CadenzaClient.html +119 -36
  6. package/apidoc/classes/CadenzaError.html +5 -5
  7. package/apidoc/functions/cadenza.html +3 -3
  8. package/apidoc/index.html +2 -2
  9. package/apidoc/interfaces/CadenzaClientOptions.html +5 -5
  10. package/apidoc/interfaces/CadenzaEvent.html +4 -4
  11. package/apidoc/interfaces/Distance.html +2 -2
  12. package/apidoc/interfaces/ExternalLinkKey.html +4 -4
  13. package/apidoc/interfaces/Feature.html +9 -9
  14. package/apidoc/interfaces/FeatureCollection.html +4 -4
  15. package/apidoc/interfaces/Geometry.html +4 -4
  16. package/apidoc/interfaces/GeometryExtentStrategy.html +6 -0
  17. package/apidoc/interfaces/LayerDataExtentStrategy.html +7 -0
  18. package/apidoc/interfaces/LayerDefinition.html +7 -0
  19. package/apidoc/interfaces/LocationFinderExtentStrategy.html +6 -0
  20. package/apidoc/interfaces/PageSource.html +3 -3
  21. package/apidoc/interfaces/StaticExtentStrategy.html +6 -0
  22. package/apidoc/modules.html +8 -4
  23. package/apidoc/types/CadenzaActionEvent.html +2 -2
  24. package/apidoc/types/CadenzaChangeSelectionEvent.html +2 -2
  25. package/apidoc/types/CadenzaDrillThroughEvent.html +2 -2
  26. package/apidoc/types/CadenzaEditGeometryCancelEvent.html +2 -2
  27. package/apidoc/types/CadenzaEditGeometryOkEvent.html +2 -2
  28. package/apidoc/types/CadenzaEditGeometryUpdateEvent.html +2 -2
  29. package/apidoc/types/CadenzaErrorEvent.html +2 -2
  30. package/apidoc/types/CadenzaEventByType.html +1 -1
  31. package/apidoc/types/CadenzaEventType.html +2 -2
  32. package/apidoc/types/CadenzaObjectInfoEvent.html +2 -2
  33. package/apidoc/types/CadenzaReloadEvent.html +2 -2
  34. package/apidoc/types/CadenzaSelectObjectsCancelEvent.html +2 -2
  35. package/apidoc/types/CadenzaSelectObjectsOkEvent.html +2 -2
  36. package/apidoc/types/Coordinate.html +2 -2
  37. package/apidoc/types/CustomValidityType.html +2 -2
  38. package/apidoc/types/DataType.html +2 -2
  39. package/apidoc/types/EmbeddingTargetId.html +2 -2
  40. package/apidoc/types/Extent.html +2 -2
  41. package/apidoc/types/ExtentStrategy.html +5 -0
  42. package/apidoc/types/FilterVariables.html +2 -2
  43. package/apidoc/types/GeometryType.html +2 -2
  44. package/apidoc/types/GlobalId.html +2 -2
  45. package/apidoc/types/LengthUnit.html +1 -1
  46. package/apidoc/types/OpaqueString.html +2 -2
  47. package/apidoc/types/OperationMode.html +2 -2
  48. package/apidoc/types/TablePart.html +2 -2
  49. package/apidoc/types/UiFeature.html +2 -2
  50. package/apidoc/types/WorkbookLayerPath.html +2 -2
  51. package/cadenza.d.ts +161 -125
  52. package/cadenza.js +229 -114
  53. package/package.json +1 -1
  54. package/sandbox.html +126 -40
  55. package/apidoc/interfaces/GeometryZoomTarget.html +0 -4
  56. package/apidoc/types/ZoomTarget.html +0 -2
package/cadenza.d.ts CHANGED
@@ -30,13 +30,14 @@ export function cadenza(baseUrl: string, options?: CadenzaClientOptions | undefi
30
30
  * When aborted, the result Promise is rejected with an {@link AbortError}.
31
31
  * * If there's another error, the result Promise is rejected with a {@link CadenzaError}.
32
32
  * * For methods that support the `hideMainHeaderAndFooter` and `hideWorkbookToolBar` parameters - the parameters cannot override the configuration of an embedding target.
33
- * * For methods that support the `locationFinder` and `mapExtent` parameters - when both are given, the `mapExtent` takes precedence.
33
+ * * For methods that support the _deprecated_ `locationFinder` and `mapExtent` parameters - when both are given, the `mapExtent` takes precedence.
34
+ * * Both `locationFinder` and `mapExtent` parameters are _deprecated_ - Use {@link LocationFinderExtentStrategy} or {@link StaticExtentStrategy} instead.
34
35
  */
35
36
  export class CadenzaClient {
36
37
  /**
37
38
  *
38
39
  * @hidden
39
- * @param {CadenzaClientOptions} [options]
40
+ * @param {CadenzaClientOptions} [__namedParameters]
40
41
  */
41
42
  constructor({ baseUrl, debug, iframe, webApplication }?: CadenzaClientOptions | undefined);
42
43
  /** The base URL of the Cadenza server this client is requesting */
@@ -47,19 +48,19 @@ export class CadenzaClient {
47
48
  * Show a page, workbook, worksheet or workbook view in an iframe.
48
49
  *
49
50
  * @param {PageSource | EmbeddingTargetId} source - The source to show
50
- * @param {object} [options]
51
- * @param {DataType} [options.dataType] - Set to 'pdf' for embedding targets of type report and of views with view
51
+ * @param {object} [__namedParameters]
52
+ * @param {DataType} [__namedParameters.dataType] - Set to 'pdf' for embedding targets of type report and of views with view
52
53
  * type of "JasperReports report" to show the generated report PDF directly (without any Cadenza headers or
53
54
  * footers).
54
- * @param {UiFeature[]} [options.disabledUiFeatures] - Cadenza UI features to disable
55
- * @param {boolean} [options.expandNavigator] - Indicates if the navigator should be expanded.
56
- * @param {FilterVariables} [options.filter] - Filter variables
57
- * @param {boolean} [options.hideMainHeaderAndFooter] - Whether to hide the main Cadenza header and footer
58
- * @param {boolean} [options.hideWorkbookToolBar] - Whether to hide the workbook toolbar
59
- * @param {GlobalId} [options.highlightGlobalId] - The ID of an item to highlight / expand in the navigator
60
- * @param {String} [options.labelSet] - The name of a label set defined in the `basicweb-config.xml` (only supported for the welcome page)
61
- * @param {OperationMode} [options.operationMode] - The mode in which a workbook should be operated
62
- * @param {AbortSignal} [options.signal] - A signal to abort the iframe loading
55
+ * @param {UiFeature[]} [__namedParameters.disabledUiFeatures] - Cadenza UI features to disable
56
+ * @param {boolean} [__namedParameters.expandNavigator] - Indicates if the navigator should be expanded.
57
+ * @param {FilterVariables} [__namedParameters.filter] - Filter variables
58
+ * @param {boolean} [__namedParameters.hideMainHeaderAndFooter] - Whether to hide the main Cadenza header and footer
59
+ * @param {boolean} [__namedParameters.hideWorkbookToolBar] - Whether to hide the workbook toolbar
60
+ * @param {GlobalId} [__namedParameters.highlightGlobalId] - The ID of an item to highlight / expand in the navigator
61
+ * @param {String} [__namedParameters.labelSet] - The name of a label set defined in the `basicweb-config.xml` (only supported for the welcome page)
62
+ * @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
63
+ * @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
63
64
  * @return {Promise<void>} A `Promise` for when the iframe is loaded
64
65
  * @throws For invalid arguments
65
66
  * @fires
@@ -81,8 +82,8 @@ export class CadenzaClient {
81
82
  } | undefined, ...args: any[]): Promise<void>;
82
83
  /**
83
84
  * Reload the views of a worksheet.
84
- * @param {object} [options] - Options
85
- * @param {boolean} [options.invalidateCaches] - When true, caches will be invalidated for objecttypes used
85
+ * @param {object} [__namedParameters] - Options
86
+ * @param {boolean} [__namedParameters.invalidateCaches] - When true, caches will be invalidated for objecttypes used
86
87
  * in the worksheet
87
88
  * @postMessage
88
89
  */
@@ -98,20 +99,21 @@ export class CadenzaClient {
98
99
  * Show a workbook map view in an iframe.
99
100
  *
100
101
  * @param {EmbeddingTargetId} mapView - The workbook map view to show
101
- * @param {object} [options] - Options
102
- * @param {UiFeature[]} [options.disabledUiFeatures] - Cadenza UI features to disable
103
- * @param {boolean} [options.expandNavigator] - Indicates if the navigator should be expanded.
104
- * @param {FilterVariables} [options.filter] - Filter variables
105
- * @param {Geometry} [options.geometry] - A geometry to show on the map
106
- * @param {boolean} [options.hideMainHeaderAndFooter] - Whether to hide the main Cadenza header and footer
107
- * @param {boolean} [options.hideWorkbookToolBar] - Whether to hide the workbook toolbar
108
- * @param {GlobalId} [options.highlightGlobalId] - The ID of an item to highlight / expand in the navigator
109
- * @param {string} [options.locationFinder] - A search query for the location finder
110
- * @param {Extent} [options.mapExtent] - A map extent to set
111
- * @param {OperationMode} [options.operationMode] - The mode in which a workbook should be operated
112
- * @param {boolean} [options.useMapSrs] - Whether the geometry and the extent are in the map's SRS (otherwise EPSG:4326 is assumed)
113
- * @param {ZoomTarget} [options.zoomTarget] - A target Cadenza should zoom to
114
- * @param {AbortSignal} [options.signal] - A signal to abort the iframe loading
102
+ * @param {object} [__namedParameters] - Options
103
+ * @param {LayerDefinition[]} [__namedParameters.additionalLayers] - Layer definitions to be imported and shown in the background, as a basis for the drawing.
104
+ * @param {UiFeature[]} [__namedParameters.disabledUiFeatures] - Cadenza UI features to disable
105
+ * @param {boolean} [__namedParameters.expandNavigator] - Indicates if the navigator should be expanded.
106
+ * @param {FilterVariables} [__namedParameters.filter] - Filter variables
107
+ * @param {Geometry} [__namedParameters.geometry] - A geometry to show on the map
108
+ * @param {boolean} [__namedParameters.hideMainHeaderAndFooter] - Whether to hide the main Cadenza header and footer
109
+ * @param {boolean} [__namedParameters.hideWorkbookToolBar] - Whether to hide the workbook toolbar
110
+ * @param {GlobalId} [__namedParameters.highlightGlobalId] - The ID of an item to highlight / expand in the navigator
111
+ * @param {string} [__namedParameters.locationFinder] - A search query for the location finder - _Deprecated_: Use {@link LocationFinderExtentStrategy} instead.
112
+ * @param {Extent} [__namedParameters.mapExtent] - A map extent to set - _Deprecated_: Use {@link StaticExtentStrategy} instead.
113
+ * @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
114
+ * @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
115
+ * @param {boolean} [__namedParameters.useMapSrs] - Whether the coordinates specified in other parameters are specified in the map's SRS (otherwise EPSG:4326 is assumed)
116
+ * @param {ExtentStrategy} [__namedParameters.extentStrategy] - Defines the initial map extent; If not given, Cadenza's default logic is used.
115
117
  * @return {Promise<void>} A `Promise` for when the iframe is loaded
116
118
  * @throws For invalid arguments
117
119
  * @fires
@@ -119,7 +121,8 @@ export class CadenzaClient {
119
121
  * - {@link CadenzaActionEvent}
120
122
  * @embed
121
123
  */
122
- showMap(mapView: EmbeddingTargetId, { disabledUiFeatures, expandNavigator, filter, geometry, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, locationFinder, mapExtent, operationMode, useMapSrs, zoomTarget, signal, }?: {
124
+ showMap(mapView: EmbeddingTargetId, { disabledUiFeatures, expandNavigator, filter, geometry, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, locationFinder, mapExtent, operationMode, useMapSrs, extentStrategy, signal, additionalLayers, }?: {
125
+ additionalLayers?: LayerDefinition[] | undefined;
123
126
  disabledUiFeatures?: UiFeature[] | undefined;
124
127
  expandNavigator?: boolean | undefined;
125
128
  filter?: FilterVariables | undefined;
@@ -130,9 +133,9 @@ export class CadenzaClient {
130
133
  locationFinder?: string | undefined;
131
134
  mapExtent?: Extent | undefined;
132
135
  operationMode?: OperationMode | undefined;
133
- useMapSrs?: boolean | undefined;
134
- zoomTarget?: GeometryZoomTarget | undefined;
135
136
  signal?: AbortSignal | undefined;
137
+ useMapSrs?: boolean | undefined;
138
+ extentStrategy?: ExtentStrategy | undefined;
136
139
  } | undefined, ...args: any[]): Promise<void>;
137
140
  /**
138
141
  * Expand/collapse the navigator.
@@ -206,12 +209,6 @@ export class CadenzaClient {
206
209
  * @postMessage
207
210
  */
208
211
  removeSelection(layer: WorkbookLayerPath | string, values: unknown[][], ...args: any[]): Promise<void>;
209
- /**
210
- * @typedef LayerDefinition
211
- * @property {string} name - The layer's name.
212
- * @property {'geojson'} type - The layer's type.
213
- * @property {FeatureCollection} content - The layer's content in geojson format.
214
- */
215
212
  /**
216
213
  * Create a geometry.
217
214
  *
@@ -220,16 +217,17 @@ export class CadenzaClient {
220
217
  *
221
218
  * @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
222
219
  * @param {GeometryType} geometryType - The geometry type
223
- * @param {object} [options] - Options
224
- * @param {UiFeature[]} [options.disabledUiFeatures] - Cadenza UI features to disable
225
- * @param {FilterVariables} [options.filter] - Filter variables
226
- * @param {string} [options.locationFinder] - A search query for the location finder
227
- * @param {Extent} [options.mapExtent] - A map extent to set
228
- * @param {number} [options.minScale] - The minimum scale where the user should work on. A warning is shown when the map is zoomed out above the threshold.
229
- * @param {boolean} [options.useMapSrs] - Whether the created geometry should use the map's SRS (otherwise EPSG:4326 will be used)
230
- * @param {OperationMode} [options.operationMode] - The mode in which a workbook should be operated
231
- * @param {AbortSignal} [options.signal] - A signal to abort the iframe loading
232
- * @param {LayerDefinition[]} [options.additionalLayers] - Layer definitions to be imported and shown in the background, as a basis for the drawing.
220
+ * @param {object} [__namedParameters] - Options
221
+ * @param {LayerDefinition[]} [__namedParameters.additionalLayers] - Layer definitions to be imported and shown in the background, as a basis for the drawing.
222
+ * @param {UiFeature[]} [__namedParameters.disabledUiFeatures] - Cadenza UI features to disable
223
+ * @param {FilterVariables} [__namedParameters.filter] - Filter variables
224
+ * @param {string} [__namedParameters.locationFinder] - A search query for the location finder - _Deprecated_: Use {@link LocationFinderExtentStrategy} instead.
225
+ * @param {Extent} [__namedParameters.mapExtent] - A map extent to set - _Deprecated_: Use {@link StaticExtentStrategy} instead.
226
+ * @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.
227
+ * @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
228
+ * @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
229
+ * @param {boolean} [__namedParameters.useMapSrs] - Whether the coordinates specified in other parameters are specified in the map's SRS and the created geometry should use the map's SRS (otherwise EPSG:4326 is assumed)
230
+ * @param {ExtentStrategy} [__namedParameters.extentStrategy] - Defines the initial map extent; If not given, Cadenza's default logic is used.
233
231
  * @return {Promise<void>} A `Promise` for when the iframe is loaded
234
232
  * @throws For invalid arguments
235
233
  * @fires
@@ -238,46 +236,34 @@ export class CadenzaClient {
238
236
  * - {@link CadenzaEditGeometryCancelEvent}
239
237
  * @embed
240
238
  */
241
- createGeometry(backgroundMapView: EmbeddingTargetId, geometryType: GeometryType, { disabledUiFeatures, filter, locationFinder, mapExtent, minScale, useMapSrs, operationMode, signal, additionalLayers, }?: {
239
+ createGeometry(backgroundMapView: EmbeddingTargetId, geometryType: GeometryType, { additionalLayers, disabledUiFeatures, filter, locationFinder, mapExtent, minScale, useMapSrs, operationMode, signal, extentStrategy, }?: {
240
+ additionalLayers?: LayerDefinition[] | undefined;
242
241
  disabledUiFeatures?: UiFeature[] | undefined;
243
242
  filter?: FilterVariables | undefined;
244
243
  locationFinder?: string | undefined;
245
244
  mapExtent?: Extent | undefined;
246
245
  minScale?: number | undefined;
247
- useMapSrs?: boolean | undefined;
248
246
  operationMode?: OperationMode | undefined;
249
247
  signal?: AbortSignal | undefined;
250
- additionalLayers?: {
251
- /**
252
- * - The layer's name.
253
- */
254
- name: string;
255
- /**
256
- * - The layer's type.
257
- */
258
- type: 'geojson';
259
- /**
260
- * - The layer's content in geojson format.
261
- */
262
- content: FeatureCollection;
263
- }[] | undefined;
248
+ useMapSrs?: boolean | undefined;
249
+ extentStrategy?: ExtentStrategy | undefined;
264
250
  } | undefined, ...args: any[]): Promise<void>;
265
251
  /**
266
252
  * Edit a geometry.
267
253
  *
268
254
  * @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
269
255
  * @param {Geometry} geometry - The geometry
270
- * @param {object} [options] - Options
271
- * @param {UiFeature[]} [options.disabledUiFeatures] - Cadenza UI features to disable
272
- * @param {FilterVariables} [options.filter] - Filter variables
273
- * @param {string} [options.locationFinder] - A search query for the location finder
274
- * @param {Extent} [options.mapExtent] - A map extent to set
275
- * @param {number} [options.minScale] - The minimum scale where the user should work on. A warning is shown when the map is zoomed out above the threshold.
276
- * @param {boolean} [options.useMapSrs] - Whether the geometry is in the map's SRS (otherwise EPSG:4326 is assumed)
277
- * @param {OperationMode} [options.operationMode] - The mode in which a workbook should be operated
278
- * @param {ZoomTarget} [options.zoomTarget] - A target Cadenza should zoom to
279
- * @param {AbortSignal} [options.signal] - A signal to abort the iframe loading
280
- * @param {LayerDefinition[]} [options.additionalLayers] - Layer definitions to be imported and shown in the background, as a basis for the drawing. Each is a layer definition, with name, type and content (a Geojson featureCollection).
256
+ * @param {object} [__namedParameters] - Options
257
+ * @param {LayerDefinition[]} [__namedParameters.additionalLayers] - Layer definitions to be imported and shown in the background, as a basis for the drawing. Each is a layer definition, with name, type and content (a Geojson featureCollection).
258
+ * @param {UiFeature[]} [__namedParameters.disabledUiFeatures] - Cadenza UI features to disable
259
+ * @param {FilterVariables} [__namedParameters.filter] - Filter variables
260
+ * @param {string} [__namedParameters.locationFinder] - A search query for the location finder - _Deprecated_: Use {@link LocationFinderExtentStrategy} instead.
261
+ * @param {Extent} [__namedParameters.mapExtent] - A map extent to set - _Deprecated_: Use {@link StaticExtentStrategy} instead.
262
+ * @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.
263
+ * @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
264
+ * @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
265
+ * @param {boolean} [__namedParameters.useMapSrs] - Whether the coordinates specified in other parameters are specified in the map's SRS (otherwise EPSG:4326 is assumed)
266
+ * @param {ExtentStrategy} [__namedParameters.extentStrategy] - Defines the initial map extent; If not given, Cadenza's default logic is used.
281
267
  * @return {Promise<void>} A `Promise` for when the iframe is loaded
282
268
  * @throws For invalid arguments
283
269
  * @fires
@@ -286,30 +272,17 @@ export class CadenzaClient {
286
272
  * - {@link CadenzaEditGeometryCancelEvent}
287
273
  * @embed
288
274
  */
289
- editGeometry(backgroundMapView: EmbeddingTargetId, geometry: Geometry, { disabledUiFeatures, filter, locationFinder, mapExtent, minScale, useMapSrs, zoomTarget, operationMode, signal, additionalLayers, }?: {
275
+ editGeometry(backgroundMapView: EmbeddingTargetId, geometry: Geometry, { additionalLayers, disabledUiFeatures, filter, locationFinder, mapExtent, minScale, operationMode, signal, useMapSrs, extentStrategy, }?: {
276
+ additionalLayers?: LayerDefinition[] | undefined;
290
277
  disabledUiFeatures?: UiFeature[] | undefined;
291
278
  filter?: FilterVariables | undefined;
292
279
  locationFinder?: string | undefined;
293
280
  mapExtent?: Extent | undefined;
294
281
  minScale?: number | undefined;
295
- useMapSrs?: boolean | undefined;
296
282
  operationMode?: OperationMode | undefined;
297
- zoomTarget?: GeometryZoomTarget | undefined;
298
283
  signal?: AbortSignal | undefined;
299
- additionalLayers?: {
300
- /**
301
- * - The layer's name.
302
- */
303
- name: string;
304
- /**
305
- * - The layer's type.
306
- */
307
- type: 'geojson';
308
- /**
309
- * - The layer's content in geojson format.
310
- */
311
- content: FeatureCollection;
312
- }[] | undefined;
284
+ useMapSrs?: boolean | undefined;
285
+ extentStrategy?: ExtentStrategy | undefined;
313
286
  } | undefined, ...args: any[]): Promise<void>;
314
287
  /**
315
288
  * Set custom validity state of the geometry editor in addition to the default validation state (including errors and
@@ -325,15 +298,16 @@ export class CadenzaClient {
325
298
  * Select objects in a workbook map.
326
299
  *
327
300
  * @param {EmbeddingTargetId} backgroundMapView - The workbook map view
328
- * @param {object} [options] - Options
329
- * @param {FilterVariables} [options.filter] - Filter variables
330
- * @param {(WorkbookLayerPath | string)[]} [options.layers] - Layers to restrict the selection to
301
+ * @param {object} [__namedParameters] - Options
302
+ * @param {FilterVariables} [__namedParameters.filter] - Filter variables
303
+ * @param {(WorkbookLayerPath | string)[]} [__namedParameters.layers] - Layers to restrict the selection to
331
304
  * (identified using layer paths or print names)
332
- * @param {string} [options.locationFinder] - A search query for the location finder
333
- * @param {Extent} [options.mapExtent] - A map extent to set
334
- * @param {boolean} [options.useMapSrs] - Whether the geometry is in the map's SRS (otherwise EPSG:4326 is assumed)
335
- * @param {OperationMode} [options.operationMode] - The mode in which a workbook should be operated
336
- * @param {AbortSignal} [options.signal] - A signal to abort the iframe loading
305
+ * @param {string} [__namedParameters.locationFinder] - A search query for the location finder - _Deprecated_: Use {@link LocationFinderExtentStrategy} instead.
306
+ * @param {Extent} [__namedParameters.mapExtent] - A map extent to set - _Deprecated_: Use {@link StaticExtentStrategy} instead.
307
+ * @param {boolean} [__namedParameters.useMapSrs] - Whether the coordinates specified in other parameters are specified in the map's SRS (otherwise EPSG:4326 is assumed)
308
+ * @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
309
+ * @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
310
+ * @param {ExtentStrategy} [__namedParameters.extentStrategy] - Defines the initial map extent; If not given, Cadenza's default logic is used.
337
311
  * @return {Promise<void>} A `Promise` for when the iframe is loaded
338
312
  * @throws For invalid arguments
339
313
  * @fires
@@ -343,7 +317,7 @@ export class CadenzaClient {
343
317
  * - {@link CadenzaSelectObjectsCancelEvent}
344
318
  * @embed
345
319
  */
346
- selectObjects(backgroundMapView: EmbeddingTargetId, { filter, layers, locationFinder, mapExtent, useMapSrs, operationMode, signal, }?: {
320
+ selectObjects(backgroundMapView: EmbeddingTargetId, { filter, layers, locationFinder, mapExtent, useMapSrs, operationMode, signal, extentStrategy, }?: {
347
321
  filter?: FilterVariables | undefined;
348
322
  layers?: (string | WorkbookLayerPath)[] | undefined;
349
323
  locationFinder?: string | undefined;
@@ -351,6 +325,7 @@ export class CadenzaClient {
351
325
  useMapSrs?: boolean | undefined;
352
326
  operationMode?: OperationMode | undefined;
353
327
  signal?: AbortSignal | undefined;
328
+ extentStrategy?: ExtentStrategy | undefined;
354
329
  } | undefined, ...args: any[]): Promise<void>;
355
330
  /**
356
331
  * Subscribe to a `postMessage()` event.
@@ -372,13 +347,13 @@ export class CadenzaClient {
372
347
  *
373
348
  * @param {EmbeddingTargetId} source - The workbook view to fetch data from.
374
349
  * @param {DataType} dataType - The data type you want to get back from the server.
375
- * Currently, `"csv"`, `"excel"` and `"json"` are supported for embedding targets of type view with a view type of
350
+ * Currently, `"csv"`, `"excel"` and `"json"` are supported for embedding targets of type view with a view type of
376
351
  * table and indicator. `"pdf"` is supported for embedding targets of type report and of type view with a view type
377
352
  * of "JasperReports report".
378
- * @param {object} [options] - Options
379
- * @param {FilterVariables} [options.filter] - Filter variables
380
- * @param {TablePart[]} [options.parts] - Table parts to export; If not specified, all parts are exported.
381
- * @param {AbortSignal} [options.signal] - A signal to abort the data fetching
353
+ * @param {object} [__namedParameters] - Options
354
+ * @param {FilterVariables} [__namedParameters.filter] - Filter variables
355
+ * @param {TablePart[]} [__namedParameters.parts] - Table parts to export; If not specified, all parts are exported.
356
+ * @param {AbortSignal} [__namedParameters.signal] - A signal to abort the data fetching
382
357
  * @return {Promise<Response>} A `Promise` for the fetch response
383
358
  * @throws For invalid arguments
384
359
  * @server
@@ -395,11 +370,11 @@ export class CadenzaClient {
395
370
  * @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
396
371
  * (identified using layer paths or print names)
397
372
  * @param {unknown[][]} objectIds - The IDs of the objects to select
398
- * @param {object} [options] - Options
399
- * @param {FilterVariables} [options.filter] - Filter variables
400
- * @param {AbortSignal} [options.signal] - A signal to abort the data fetching
401
- * @param {Boolean} [options.useMapSrs] - Use the map SRS instead of WGS84
402
- * @param {Boolean} [options.fullGeometries] - Return non-simplified geometries
373
+ * @param {object} [__namedParameters] - Options
374
+ * @param {FilterVariables} [__namedParameters.filter] - Filter variables
375
+ * @param {AbortSignal} [__namedParameters.signal] - A signal to abort the data fetching
376
+ * @param {Boolean} [__namedParameters.useMapSrs] - Use the map SRS instead of WGS84
377
+ * @param {Boolean} [__namedParameters.fullGeometries] - Return non-simplified geometries
403
378
  * @return {Promise<FeatureCollection>} A `Promise` for the fetch response
404
379
  * @throws For invalid arguments
405
380
  */
@@ -416,10 +391,10 @@ export class CadenzaClient {
416
391
  * @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
417
392
  * (identified using layer paths or print names)
418
393
  * @param {Geometry} geometry - The intersection geometry
419
- * @param {object} [options] - Options
420
- * @param {boolean} [options.useMapSrs] - The intersection geometry and the result geometries are in the map's SRS (otherwise EPSG:4326 is assumed)
421
- * @param {Distance} [options.buffer] - Buffer size for geometry of the transition
422
- * @param {AbortSignal} [options.signal] - A signal to abort the data fetching
394
+ * @param {object} [__namedParameters] - Options
395
+ * @param {boolean} [__namedParameters.useMapSrs] - The intersection geometry and the result geometries are in the map's SRS (otherwise EPSG:4326 is assumed)
396
+ * @param {Distance} [__namedParameters.buffer] - Buffer size for geometry of the transition
397
+ * @param {AbortSignal} [__namedParameters.signal] - A signal to abort the data fetching
423
398
  * @return {Promise<FeatureCollection>} A `Promise` for the fetch response
424
399
  * @server
425
400
  */
@@ -435,13 +410,13 @@ export class CadenzaClient {
435
410
  *
436
411
  * @param {EmbeddingTargetId} source - The workbook view to fetch data from.
437
412
  * @param {DataType} dataType - The data type you want to get back from the server.
438
- * Currently, `"csv"`, `"excel"` and `"json"` are supported for embedding targets of type view with a view type of
413
+ * Currently, `"csv"`, `"excel"` and `"json"` are supported for embedding targets of type view with a view type of
439
414
  * table and indicator. `"pdf"` is supported for embedding targets of type report and of type view with a view type
440
415
  * of "JasperReports report".
441
- * @param {object} [options] - Options
442
- * @param {string} [options.fileName] - The file name to use; The file extension is appended by Cadenza.
443
- * @param {FilterVariables} [options.filter] - Filter variables
444
- * @param {TablePart[]} [options.parts] - Table parts to export; If not specified, all parts are exported.
416
+ * @param {object} [__namedParameters] - Options
417
+ * @param {string} [__namedParameters.fileName] - The file name to use; The file extension is appended by Cadenza.
418
+ * @param {FilterVariables} [__namedParameters.filter] - Filter variables
419
+ * @param {TablePart[]} [__namedParameters.parts] - Table parts to export; If not specified, all parts are exported.
445
420
  * @throws For invalid arguments
446
421
  * @server
447
422
  */
@@ -634,6 +609,20 @@ export type OperationMode = 'normal' | 'simplified';
634
609
  * * `"workbook-view-management"` - Add/Edit/Remove workbook views (Is included in 'workbook-design'.)
635
610
  */
636
611
  export type UiFeature = 'workbook-design' | 'workbook-map-add-layer' | 'workbook-view-management';
612
+ export type LayerDefinition = {
613
+ /**
614
+ * - The layer's name.
615
+ */
616
+ name: string;
617
+ /**
618
+ * - The layer's type.
619
+ */
620
+ type: 'geojson';
621
+ /**
622
+ * - The layer's content in geojson format.
623
+ */
624
+ content: FeatureCollection;
625
+ };
637
626
  export type Distance = {
638
627
  value: number;
639
628
  lengthUnit: LengthUnit;
@@ -667,17 +656,64 @@ export type GeometryType = 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineStr
667
656
  */
668
657
  export type Extent = [number, number, number, number];
669
658
  /**
670
- * - An object describing a target to zoom to
659
+ * - Options for defining the initial extent of a workbook map view;
660
+ * If the options do not result in a defined extent, Cadenza's default logic is used:
661
+ * The map will zoom in the way the underlying workbook map view was configured to initially zoom including all auto
662
+ * zooming configurations.
671
663
  */
672
- export type ZoomTarget = GeometryZoomTarget;
664
+ export type ExtentStrategy = GeometryExtentStrategy | LayerDataExtentStrategy | LocationFinderExtentStrategy | StaticExtentStrategy;
673
665
  /**
674
- * - Instructs Cadenza to zoom to a provided {@Link Geometry}
666
+ * - The given {@link Geometry } defines the initial map extent.
675
667
  */
676
- export type GeometryZoomTarget = {
668
+ export type GeometryExtentStrategy = {
677
669
  /**
678
- * The type of the zoom target
670
+ * - The extent strategy type
679
671
  */
680
672
  type: 'geometry';
673
+ /**
674
+ * - This geometry takes precedence over another geometry that might be given in an API call.
675
+ */
676
+ geometry?: Geometry | undefined;
677
+ };
678
+ /**
679
+ * - The given layers define the initial map extent.
680
+ */
681
+ export type LayerDataExtentStrategy = {
682
+ /**
683
+ * - The extent strategy type
684
+ */
685
+ type: 'layerData';
686
+ /**
687
+ * - A layer is ignored if either the layer or its extent is not known to Cadenza.
688
+ * If no layers are given, __all__ map layers are used.
689
+ */
690
+ layers?: (string | WorkbookLayerPath)[] | undefined;
691
+ };
692
+ /**
693
+ * - The first result of a location finder query defines the initial map extent.
694
+ */
695
+ export type LocationFinderExtentStrategy = {
696
+ /**
697
+ * - The extent strategy type
698
+ */
699
+ type: 'locationFinder';
700
+ /**
701
+ * - This query takes precedence over another query that might be given in an API call.
702
+ */
703
+ query: string;
704
+ };
705
+ /**
706
+ * - The given extent is used as the initial map extent.
707
+ */
708
+ export type StaticExtentStrategy = {
709
+ /**
710
+ * - The extent strategy type
711
+ */
712
+ type: 'static';
713
+ /**
714
+ * - This extent takes precedence over another extent that might be given in an API call.
715
+ */
716
+ extent: Extent;
681
717
  };
682
718
  /**
683
719
  * - A data type