@disy/cadenza.js 10.2.3 → 10.2.5
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 +17 -0
- package/apidoc/assets/navigation.js +1 -1
- package/apidoc/assets/search.js +1 -1
- package/apidoc/classes/AbortError.html +3 -3
- package/apidoc/classes/CadenzaClient.html +119 -36
- 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 +9 -9
- package/apidoc/interfaces/FeatureCollection.html +4 -4
- package/apidoc/interfaces/Geometry.html +4 -4
- package/apidoc/interfaces/GeometryExtentStrategy.html +6 -0
- package/apidoc/interfaces/LayerDataExtentStrategy.html +7 -0
- package/apidoc/interfaces/LayerDefinition.html +7 -0
- package/apidoc/interfaces/LocationFinderExtentStrategy.html +6 -0
- package/apidoc/interfaces/PageSource.html +3 -3
- package/apidoc/interfaces/StaticExtentStrategy.html +6 -0
- package/apidoc/modules.html +8 -4
- 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/Coordinate.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 +5 -0
- 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 +161 -125
- package/cadenza.js +229 -114
- package/package.json +1 -1
- package/sandbox.html +126 -40
- package/apidoc/interfaces/GeometryZoomTarget.html +0 -4
- 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} [
|
|
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} [
|
|
51
|
-
* @param {DataType} [
|
|
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[]} [
|
|
55
|
-
* @param {boolean} [
|
|
56
|
-
* @param {FilterVariables} [
|
|
57
|
-
* @param {boolean} [
|
|
58
|
-
* @param {boolean} [
|
|
59
|
-
* @param {GlobalId} [
|
|
60
|
-
* @param {String} [
|
|
61
|
-
* @param {OperationMode} [
|
|
62
|
-
* @param {AbortSignal} [
|
|
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} [
|
|
85
|
-
* @param {boolean} [
|
|
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} [
|
|
102
|
-
* @param {
|
|
103
|
-
* @param {
|
|
104
|
-
* @param {
|
|
105
|
-
* @param {
|
|
106
|
-
* @param {
|
|
107
|
-
* @param {boolean} [
|
|
108
|
-
* @param {
|
|
109
|
-
* @param {
|
|
110
|
-
* @param {
|
|
111
|
-
* @param {
|
|
112
|
-
* @param {
|
|
113
|
-
* @param {
|
|
114
|
-
* @param {
|
|
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,
|
|
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} [
|
|
224
|
-
* @param {
|
|
225
|
-
* @param {
|
|
226
|
-
* @param {
|
|
227
|
-
* @param {
|
|
228
|
-
* @param {
|
|
229
|
-
* @param {
|
|
230
|
-
* @param {OperationMode} [
|
|
231
|
-
* @param {AbortSignal} [
|
|
232
|
-
* @param {
|
|
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,
|
|
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
|
-
|
|
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} [
|
|
271
|
-
* @param {
|
|
272
|
-
* @param {
|
|
273
|
-
* @param {
|
|
274
|
-
* @param {
|
|
275
|
-
* @param {
|
|
276
|
-
* @param {
|
|
277
|
-
* @param {OperationMode} [
|
|
278
|
-
* @param {
|
|
279
|
-
* @param {
|
|
280
|
-
* @param {
|
|
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,
|
|
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
|
-
|
|
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} [
|
|
329
|
-
* @param {FilterVariables} [
|
|
330
|
-
* @param {(WorkbookLayerPath | string)[]} [
|
|
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} [
|
|
333
|
-
* @param {Extent} [
|
|
334
|
-
* @param {boolean} [
|
|
335
|
-
* @param {OperationMode} [
|
|
336
|
-
* @param {AbortSignal} [
|
|
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
|
-
*
|
|
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} [
|
|
379
|
-
* @param {FilterVariables} [
|
|
380
|
-
* @param {TablePart[]} [
|
|
381
|
-
* @param {AbortSignal} [
|
|
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} [
|
|
399
|
-
* @param {FilterVariables} [
|
|
400
|
-
* @param {AbortSignal} [
|
|
401
|
-
* @param {Boolean} [
|
|
402
|
-
* @param {Boolean} [
|
|
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} [
|
|
420
|
-
* @param {boolean} [
|
|
421
|
-
* @param {Distance} [
|
|
422
|
-
* @param {AbortSignal} [
|
|
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
|
-
*
|
|
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} [
|
|
442
|
-
* @param {string} [
|
|
443
|
-
* @param {FilterVariables} [
|
|
444
|
-
* @param {TablePart[]} [
|
|
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
|
-
* -
|
|
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
|
|
664
|
+
export type ExtentStrategy = GeometryExtentStrategy | LayerDataExtentStrategy | LocationFinderExtentStrategy | StaticExtentStrategy;
|
|
673
665
|
/**
|
|
674
|
-
* -
|
|
666
|
+
* - The given {@link Geometry } defines the initial map extent.
|
|
675
667
|
*/
|
|
676
|
-
export type
|
|
668
|
+
export type GeometryExtentStrategy = {
|
|
677
669
|
/**
|
|
678
|
-
* The
|
|
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
|