@disy/cadenza.js 10.2.2 → 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.
- package/CHANGELOG.md +25 -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 +123 -38
- 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 +11 -7
- package/apidoc/interfaces/FeatureCollection.html +5 -3
- package/apidoc/interfaces/Geometry.html +6 -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 +9 -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/{ZoomTarget.html → 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 +198 -130
- package/cadenza.js +245 -122
- package/package.json +1 -1
- package/sandbox.html +129 -41
- package/apidoc/interfaces/GeometryZoomTarget.html +0 -4
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,18 +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} [
|
|
52
|
-
* to show the report PDF directly
|
|
53
|
-
*
|
|
54
|
-
* @param {
|
|
55
|
-
* @param {
|
|
56
|
-
* @param {
|
|
57
|
-
* @param {boolean} [
|
|
58
|
-
* @param {
|
|
59
|
-
* @param {
|
|
60
|
-
* @param {
|
|
61
|
-
* @param {
|
|
51
|
+
* @param {object} [__namedParameters]
|
|
52
|
+
* @param {DataType} [__namedParameters.dataType] - Set to 'pdf' for embedding targets of type report and of views with view
|
|
53
|
+
* type of "JasperReports report" to show the generated report PDF directly (without any Cadenza headers or
|
|
54
|
+
* footers).
|
|
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
|
|
62
64
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
63
65
|
* @throws For invalid arguments
|
|
64
66
|
* @fires
|
|
@@ -80,8 +82,8 @@ export class CadenzaClient {
|
|
|
80
82
|
} | undefined, ...args: any[]): Promise<void>;
|
|
81
83
|
/**
|
|
82
84
|
* Reload the views of a worksheet.
|
|
83
|
-
* @param {object} [
|
|
84
|
-
* @param {boolean} [
|
|
85
|
+
* @param {object} [__namedParameters] - Options
|
|
86
|
+
* @param {boolean} [__namedParameters.invalidateCaches] - When true, caches will be invalidated for objecttypes used
|
|
85
87
|
* in the worksheet
|
|
86
88
|
* @postMessage
|
|
87
89
|
*/
|
|
@@ -97,20 +99,21 @@ export class CadenzaClient {
|
|
|
97
99
|
* Show a workbook map view in an iframe.
|
|
98
100
|
*
|
|
99
101
|
* @param {EmbeddingTargetId} mapView - The workbook map view to show
|
|
100
|
-
* @param {object} [
|
|
101
|
-
* @param {
|
|
102
|
-
* @param {
|
|
103
|
-
* @param {
|
|
104
|
-
* @param {
|
|
105
|
-
* @param {
|
|
106
|
-
* @param {boolean} [
|
|
107
|
-
* @param {
|
|
108
|
-
* @param {
|
|
109
|
-
* @param {
|
|
110
|
-
* @param {
|
|
111
|
-
* @param {
|
|
112
|
-
* @param {
|
|
113
|
-
* @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.
|
|
114
117
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
115
118
|
* @throws For invalid arguments
|
|
116
119
|
* @fires
|
|
@@ -118,7 +121,8 @@ export class CadenzaClient {
|
|
|
118
121
|
* - {@link CadenzaActionEvent}
|
|
119
122
|
* @embed
|
|
120
123
|
*/
|
|
121
|
-
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;
|
|
122
126
|
disabledUiFeatures?: UiFeature[] | undefined;
|
|
123
127
|
expandNavigator?: boolean | undefined;
|
|
124
128
|
filter?: FilterVariables | undefined;
|
|
@@ -129,9 +133,9 @@ export class CadenzaClient {
|
|
|
129
133
|
locationFinder?: string | undefined;
|
|
130
134
|
mapExtent?: Extent | undefined;
|
|
131
135
|
operationMode?: OperationMode | undefined;
|
|
132
|
-
useMapSrs?: boolean | undefined;
|
|
133
|
-
zoomTarget?: GeometryZoomTarget | undefined;
|
|
134
136
|
signal?: AbortSignal | undefined;
|
|
137
|
+
useMapSrs?: boolean | undefined;
|
|
138
|
+
extentStrategy?: ExtentStrategy | undefined;
|
|
135
139
|
} | undefined, ...args: any[]): Promise<void>;
|
|
136
140
|
/**
|
|
137
141
|
* Expand/collapse the navigator.
|
|
@@ -205,12 +209,6 @@ export class CadenzaClient {
|
|
|
205
209
|
* @postMessage
|
|
206
210
|
*/
|
|
207
211
|
removeSelection(layer: WorkbookLayerPath | string, values: unknown[][], ...args: any[]): Promise<void>;
|
|
208
|
-
/**
|
|
209
|
-
* @typedef {Object} LayerDefinition
|
|
210
|
-
* @property {string} name - The layer's name.
|
|
211
|
-
* @property {'geojson'} type - The layer's type.
|
|
212
|
-
* @property {FeatureCollection} content - The layer's content in geojson format.
|
|
213
|
-
*/
|
|
214
212
|
/**
|
|
215
213
|
* Create a geometry.
|
|
216
214
|
*
|
|
@@ -219,16 +217,17 @@ export class CadenzaClient {
|
|
|
219
217
|
*
|
|
220
218
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
221
219
|
* @param {GeometryType} geometryType - The geometry type
|
|
222
|
-
* @param {object} [
|
|
223
|
-
* @param {
|
|
224
|
-
* @param {
|
|
225
|
-
* @param {
|
|
226
|
-
* @param {
|
|
227
|
-
* @param {
|
|
228
|
-
* @param {
|
|
229
|
-
* @param {OperationMode} [
|
|
230
|
-
* @param {AbortSignal} [
|
|
231
|
-
* @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.
|
|
232
231
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
233
232
|
* @throws For invalid arguments
|
|
234
233
|
* @fires
|
|
@@ -237,46 +236,34 @@ export class CadenzaClient {
|
|
|
237
236
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
238
237
|
* @embed
|
|
239
238
|
*/
|
|
240
|
-
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;
|
|
241
241
|
disabledUiFeatures?: UiFeature[] | undefined;
|
|
242
242
|
filter?: FilterVariables | undefined;
|
|
243
243
|
locationFinder?: string | undefined;
|
|
244
244
|
mapExtent?: Extent | undefined;
|
|
245
245
|
minScale?: number | undefined;
|
|
246
|
-
useMapSrs?: boolean | undefined;
|
|
247
246
|
operationMode?: OperationMode | undefined;
|
|
248
247
|
signal?: AbortSignal | undefined;
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
* - The layer's name.
|
|
252
|
-
*/
|
|
253
|
-
name: string;
|
|
254
|
-
/**
|
|
255
|
-
* - The layer's type.
|
|
256
|
-
*/
|
|
257
|
-
type: 'geojson';
|
|
258
|
-
/**
|
|
259
|
-
* - The layer's content in geojson format.
|
|
260
|
-
*/
|
|
261
|
-
content: FeatureCollection;
|
|
262
|
-
}[] | undefined;
|
|
248
|
+
useMapSrs?: boolean | undefined;
|
|
249
|
+
extentStrategy?: ExtentStrategy | undefined;
|
|
263
250
|
} | undefined, ...args: any[]): Promise<void>;
|
|
264
251
|
/**
|
|
265
252
|
* Edit a geometry.
|
|
266
253
|
*
|
|
267
254
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
268
255
|
* @param {Geometry} geometry - The geometry
|
|
269
|
-
* @param {object} [
|
|
270
|
-
* @param {
|
|
271
|
-
* @param {
|
|
272
|
-
* @param {
|
|
273
|
-
* @param {
|
|
274
|
-
* @param {
|
|
275
|
-
* @param {
|
|
276
|
-
* @param {OperationMode} [
|
|
277
|
-
* @param {
|
|
278
|
-
* @param {
|
|
279
|
-
* @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.
|
|
280
267
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
281
268
|
* @throws For invalid arguments
|
|
282
269
|
* @fires
|
|
@@ -285,17 +272,17 @@ export class CadenzaClient {
|
|
|
285
272
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
286
273
|
* @embed
|
|
287
274
|
*/
|
|
288
|
-
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;
|
|
289
277
|
disabledUiFeatures?: UiFeature[] | undefined;
|
|
290
278
|
filter?: FilterVariables | undefined;
|
|
291
279
|
locationFinder?: string | undefined;
|
|
292
280
|
mapExtent?: Extent | undefined;
|
|
293
281
|
minScale?: number | undefined;
|
|
294
|
-
useMapSrs?: boolean | undefined;
|
|
295
282
|
operationMode?: OperationMode | undefined;
|
|
296
|
-
zoomTarget?: GeometryZoomTarget | undefined;
|
|
297
283
|
signal?: AbortSignal | undefined;
|
|
298
|
-
|
|
284
|
+
useMapSrs?: boolean | undefined;
|
|
285
|
+
extentStrategy?: ExtentStrategy | undefined;
|
|
299
286
|
} | undefined, ...args: any[]): Promise<void>;
|
|
300
287
|
/**
|
|
301
288
|
* Set custom validity state of the geometry editor in addition to the default validation state (including errors and
|
|
@@ -311,15 +298,16 @@ export class CadenzaClient {
|
|
|
311
298
|
* Select objects in a workbook map.
|
|
312
299
|
*
|
|
313
300
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view
|
|
314
|
-
* @param {object} [
|
|
315
|
-
* @param {FilterVariables} [
|
|
316
|
-
* @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
|
|
317
304
|
* (identified using layer paths or print names)
|
|
318
|
-
* @param {string} [
|
|
319
|
-
* @param {Extent} [
|
|
320
|
-
* @param {boolean} [
|
|
321
|
-
* @param {OperationMode} [
|
|
322
|
-
* @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.
|
|
323
311
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
324
312
|
* @throws For invalid arguments
|
|
325
313
|
* @fires
|
|
@@ -329,7 +317,7 @@ export class CadenzaClient {
|
|
|
329
317
|
* - {@link CadenzaSelectObjectsCancelEvent}
|
|
330
318
|
* @embed
|
|
331
319
|
*/
|
|
332
|
-
selectObjects(backgroundMapView: EmbeddingTargetId, { filter, layers, locationFinder, mapExtent, useMapSrs, operationMode, signal, }?: {
|
|
320
|
+
selectObjects(backgroundMapView: EmbeddingTargetId, { filter, layers, locationFinder, mapExtent, useMapSrs, operationMode, signal, extentStrategy, }?: {
|
|
333
321
|
filter?: FilterVariables | undefined;
|
|
334
322
|
layers?: (string | WorkbookLayerPath)[] | undefined;
|
|
335
323
|
locationFinder?: string | undefined;
|
|
@@ -337,6 +325,7 @@ export class CadenzaClient {
|
|
|
337
325
|
useMapSrs?: boolean | undefined;
|
|
338
326
|
operationMode?: OperationMode | undefined;
|
|
339
327
|
signal?: AbortSignal | undefined;
|
|
328
|
+
extentStrategy?: ExtentStrategy | undefined;
|
|
340
329
|
} | undefined, ...args: any[]): Promise<void>;
|
|
341
330
|
/**
|
|
342
331
|
* Subscribe to a `postMessage()` event.
|
|
@@ -358,12 +347,13 @@ export class CadenzaClient {
|
|
|
358
347
|
*
|
|
359
348
|
* @param {EmbeddingTargetId} source - The workbook view to fetch data from.
|
|
360
349
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
361
|
-
*
|
|
362
|
-
* and `"pdf"` for
|
|
363
|
-
*
|
|
364
|
-
* @param {
|
|
365
|
-
* @param {
|
|
366
|
-
* @param {
|
|
350
|
+
* Currently, `"csv"`, `"excel"` and `"json"` are supported for embedding targets of type view with a view type of
|
|
351
|
+
* table and indicator. `"pdf"` is supported for embedding targets of type report and of type view with a view type
|
|
352
|
+
* of "JasperReports report".
|
|
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
|
|
367
357
|
* @return {Promise<Response>} A `Promise` for the fetch response
|
|
368
358
|
* @throws For invalid arguments
|
|
369
359
|
* @server
|
|
@@ -380,11 +370,11 @@ export class CadenzaClient {
|
|
|
380
370
|
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
381
371
|
* (identified using layer paths or print names)
|
|
382
372
|
* @param {unknown[][]} objectIds - The IDs of the objects to select
|
|
383
|
-
* @param {object} [
|
|
384
|
-
* @param {FilterVariables} [
|
|
385
|
-
* @param {AbortSignal} [
|
|
386
|
-
* @param {Boolean} [
|
|
387
|
-
* @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
|
|
388
378
|
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
389
379
|
* @throws For invalid arguments
|
|
390
380
|
*/
|
|
@@ -401,10 +391,10 @@ export class CadenzaClient {
|
|
|
401
391
|
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
402
392
|
* (identified using layer paths or print names)
|
|
403
393
|
* @param {Geometry} geometry - The intersection geometry
|
|
404
|
-
* @param {object} [
|
|
405
|
-
* @param {boolean} [
|
|
406
|
-
* @param {Distance} [
|
|
407
|
-
* @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
|
|
408
398
|
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
409
399
|
* @server
|
|
410
400
|
*/
|
|
@@ -420,12 +410,13 @@ export class CadenzaClient {
|
|
|
420
410
|
*
|
|
421
411
|
* @param {EmbeddingTargetId} source - The workbook view to fetch data from.
|
|
422
412
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
423
|
-
*
|
|
424
|
-
* and `"pdf"` for
|
|
425
|
-
*
|
|
426
|
-
* @param {
|
|
427
|
-
* @param {
|
|
428
|
-
* @param {
|
|
413
|
+
* Currently, `"csv"`, `"excel"` and `"json"` are supported for embedding targets of type view with a view type of
|
|
414
|
+
* table and indicator. `"pdf"` is supported for embedding targets of type report and of type view with a view type
|
|
415
|
+
* of "JasperReports report".
|
|
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.
|
|
429
420
|
* @throws For invalid arguments
|
|
430
421
|
* @server
|
|
431
422
|
*/
|
|
@@ -475,7 +466,7 @@ export class CadenzaClient {
|
|
|
475
466
|
* @typedef {CadenzaEvent<'action', {context: string}>} CadenzaActionEvent - When the user executed a POST message action, which is defined on an external link in the Cadenza management center.
|
|
476
467
|
*/
|
|
477
468
|
/**
|
|
478
|
-
* @typedef {CadenzaEvent<'change:selection', undefined | {layer: WorkbookLayerPath, values: unknown[][]}>} CadenzaChangeSelectionEvent - When the user changed the selection.
|
|
469
|
+
* @typedef {CadenzaEvent<'change:selection', undefined | {layer: WorkbookLayerPath, values: unknown[][]}>} CadenzaChangeSelectionEvent - When the user changed the selection. `undefined` if no objects were selected.
|
|
479
470
|
*
|
|
480
471
|
* For a selection in a workbook map view with activated feature info, the values also include the simplified geometries of the selected objects.
|
|
481
472
|
*/
|
|
@@ -488,13 +479,13 @@ export class CadenzaClient {
|
|
|
488
479
|
* <p>
|
|
489
480
|
* See also: <a href="../index.html#md:json-representation-of-cadenza-object-data">JSON Representation of Cadenza Object Data</a>
|
|
490
481
|
*/
|
|
491
|
-
/** @typedef {CadenzaEvent<'editGeometry:update',
|
|
492
|
-
/** @typedef {CadenzaEvent<'editGeometry:ok',
|
|
482
|
+
/** @typedef {CadenzaEvent<'editGeometry:update', FeatureCollection | Feature | undefined>} CadenzaEditGeometryUpdateEvent - When the user changed the geometry. `FeatureCollection` if multiple features are present on the edit layer, but the original defined type is not multi-geometry. This is also the case if the dialog was instantiated from a geometry and the original defined type is inherited. `undefined` if no feature is present on the edit layer. */
|
|
483
|
+
/** @typedef {CadenzaEvent<'editGeometry:ok', Feature>} CadenzaEditGeometryOkEvent - When the user submitted the geometry. */
|
|
493
484
|
/** @typedef {CadenzaEvent<'editGeometry:cancel'>} CadenzaEditGeometryCancelEvent - When the user cancelled the geometry editing. */
|
|
494
485
|
/** @typedef {CadenzaEvent<'error', {type: string, message?: string}>} CadenzaErrorEvent - An error event that is mapped to a {@link CadenzaError} */
|
|
495
486
|
/** @typedef {CadenzaEvent<'objectInfo', {layer: WorkbookLayerPath, objectInfos: {selectionIndex: number, elements: {attributePrintName: string, formattedValue: string}[]}}>} CadenzaObjectInfoEvent - When the user opened the object info flyout. */
|
|
496
487
|
/**
|
|
497
|
-
* @typedef {CadenzaEvent<'selectObjects:ok', {layer: WorkbookLayerPath, values: unknown[][]}>} CadenzaSelectObjectsOkEvent - When the user submitted the selection.
|
|
488
|
+
* @typedef {CadenzaEvent<'selectObjects:ok', undefined | {layer: WorkbookLayerPath, values: unknown[][]}>} CadenzaSelectObjectsOkEvent - When the user submitted the selection. `undefined` if no objects were selected.
|
|
498
489
|
*
|
|
499
490
|
* For a selection in a workbook map view with activated feature info, the values also include the simplified geometries of the selected objects.
|
|
500
491
|
*/
|
|
@@ -618,11 +609,29 @@ export type OperationMode = 'normal' | 'simplified';
|
|
|
618
609
|
* * `"workbook-view-management"` - Add/Edit/Remove workbook views (Is included in 'workbook-design'.)
|
|
619
610
|
*/
|
|
620
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
|
+
};
|
|
621
626
|
export type Distance = {
|
|
622
627
|
value: number;
|
|
623
628
|
lengthUnit: LengthUnit;
|
|
624
629
|
};
|
|
625
630
|
export type LengthUnit = 'm' | 'km';
|
|
631
|
+
/**
|
|
632
|
+
* - A tuple with an x and y value
|
|
633
|
+
*/
|
|
634
|
+
export type Coordinate = [number, number];
|
|
626
635
|
/**
|
|
627
636
|
* - A [GeoJSON](https://geojson.org/) geometry object
|
|
628
637
|
*/
|
|
@@ -631,6 +640,10 @@ export type Geometry = {
|
|
|
631
640
|
* - The type of the geometry
|
|
632
641
|
*/
|
|
633
642
|
type: GeometryType;
|
|
643
|
+
/**
|
|
644
|
+
* - The coordinates of the geometry
|
|
645
|
+
*/
|
|
646
|
+
coordinates: Coordinate | Coordinate[] | Coordinate[][] | Coordinate[][][];
|
|
634
647
|
};
|
|
635
648
|
/**
|
|
636
649
|
* - A GeoJSON geometry type
|
|
@@ -643,17 +656,64 @@ export type GeometryType = 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineStr
|
|
|
643
656
|
*/
|
|
644
657
|
export type Extent = [number, number, number, number];
|
|
645
658
|
/**
|
|
646
|
-
* -
|
|
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.
|
|
647
663
|
*/
|
|
648
|
-
export type
|
|
664
|
+
export type ExtentStrategy = GeometryExtentStrategy | LayerDataExtentStrategy | LocationFinderExtentStrategy | StaticExtentStrategy;
|
|
649
665
|
/**
|
|
650
|
-
* -
|
|
666
|
+
* - The given {@link Geometry } defines the initial map extent.
|
|
651
667
|
*/
|
|
652
|
-
export type
|
|
668
|
+
export type GeometryExtentStrategy = {
|
|
653
669
|
/**
|
|
654
|
-
* The
|
|
670
|
+
* - The extent strategy type
|
|
655
671
|
*/
|
|
656
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;
|
|
657
717
|
};
|
|
658
718
|
/**
|
|
659
719
|
* - A data type
|
|
@@ -678,6 +738,10 @@ export type FilterVariables = Record<string, string | string[] | number | Date |
|
|
|
678
738
|
* - A adapted [GeoJSON](https://geojson.org/) feature object.
|
|
679
739
|
*/
|
|
680
740
|
export type Feature = {
|
|
741
|
+
/**
|
|
742
|
+
* - The object's type
|
|
743
|
+
*/
|
|
744
|
+
type: 'Feature';
|
|
681
745
|
/**
|
|
682
746
|
* - The id of the feature
|
|
683
747
|
*/
|
|
@@ -695,7 +759,11 @@ export type Feature = {
|
|
|
695
759
|
*/
|
|
696
760
|
area?: number | undefined;
|
|
697
761
|
/**
|
|
698
|
-
* - The
|
|
762
|
+
* - The circumference of a `Polygon` feature
|
|
763
|
+
*/
|
|
764
|
+
circumference?: number | undefined;
|
|
765
|
+
/**
|
|
766
|
+
* - The length of a `LineString` feature
|
|
699
767
|
*/
|
|
700
768
|
length?: number | undefined;
|
|
701
769
|
};
|
|
@@ -703,6 +771,10 @@ export type Feature = {
|
|
|
703
771
|
* - A adapted [GeoJSON](https://geojson.org/) feature collection object
|
|
704
772
|
*/
|
|
705
773
|
export type FeatureCollection = {
|
|
774
|
+
/**
|
|
775
|
+
* - The object's type
|
|
776
|
+
*/
|
|
777
|
+
type: 'FeatureCollection';
|
|
706
778
|
/**
|
|
707
779
|
* - The features within this collection
|
|
708
780
|
*/
|
|
@@ -737,7 +809,7 @@ export type CadenzaActionEvent = CadenzaEvent<'action', {
|
|
|
737
809
|
context: string;
|
|
738
810
|
}>;
|
|
739
811
|
/**
|
|
740
|
-
* - When the user changed the selection.
|
|
812
|
+
* - When the user changed the selection. `undefined` if no objects were selected.
|
|
741
813
|
*
|
|
742
814
|
* For a selection in a workbook map view with activated feature info, the values also include the simplified geometries of the selected objects.
|
|
743
815
|
*/
|
|
@@ -759,17 +831,13 @@ export type CadenzaDrillThroughEvent = CadenzaEvent<'drillThrough', {
|
|
|
759
831
|
values: unknown[][];
|
|
760
832
|
}>;
|
|
761
833
|
/**
|
|
762
|
-
* - When the user changed the geometry.
|
|
834
|
+
* - When the user changed the geometry. `FeatureCollection` if multiple features are present on the edit layer, but the original defined type is not multi-geometry. This is also the case if the dialog was instantiated from a geometry and the original defined type is inherited. `undefined` if no feature is present on the edit layer.
|
|
763
835
|
*/
|
|
764
|
-
export type CadenzaEditGeometryUpdateEvent = CadenzaEvent<'editGeometry:update',
|
|
765
|
-
geometry: Geometry;
|
|
766
|
-
}>;
|
|
836
|
+
export type CadenzaEditGeometryUpdateEvent = CadenzaEvent<'editGeometry:update', FeatureCollection | Feature | undefined>;
|
|
767
837
|
/**
|
|
768
838
|
* - When the user submitted the geometry.
|
|
769
839
|
*/
|
|
770
|
-
export type CadenzaEditGeometryOkEvent = CadenzaEvent<'editGeometry:ok',
|
|
771
|
-
geometry: Geometry;
|
|
772
|
-
}>;
|
|
840
|
+
export type CadenzaEditGeometryOkEvent = CadenzaEvent<'editGeometry:ok', Feature>;
|
|
773
841
|
/**
|
|
774
842
|
* - When the user cancelled the geometry editing.
|
|
775
843
|
*/
|
|
@@ -795,11 +863,11 @@ export type CadenzaObjectInfoEvent = CadenzaEvent<'objectInfo', {
|
|
|
795
863
|
};
|
|
796
864
|
}>;
|
|
797
865
|
/**
|
|
798
|
-
* - When the user submitted the selection.
|
|
866
|
+
* - When the user submitted the selection. `undefined` if no objects were selected.
|
|
799
867
|
*
|
|
800
868
|
* For a selection in a workbook map view with activated feature info, the values also include the simplified geometries of the selected objects.
|
|
801
869
|
*/
|
|
802
|
-
export type CadenzaSelectObjectsOkEvent = CadenzaEvent<'selectObjects:ok', {
|
|
870
|
+
export type CadenzaSelectObjectsOkEvent = CadenzaEvent<'selectObjects:ok', undefined | {
|
|
803
871
|
layer: string[];
|
|
804
872
|
values: unknown[][];
|
|
805
873
|
}>;
|