@disy/cadenza.js 10.2.8 → 10.2.10
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 +10 -0
- package/apidoc/assets/hierarchy.js +1 -0
- package/apidoc/assets/icons.js +17 -14
- package/apidoc/assets/icons.svg +1 -1
- package/apidoc/assets/main.js +5 -4
- package/apidoc/assets/navigation.js +1 -1
- package/apidoc/assets/search.js +1 -1
- package/apidoc/assets/style.css +1423 -1224
- package/apidoc/classes/AbortError.html +60 -60
- package/apidoc/classes/CadenzaClient.html +164 -188
- package/apidoc/classes/CadenzaError.html +15 -16
- package/apidoc/functions/cadenza.html +10 -9
- package/apidoc/index.html +146 -118
- package/apidoc/interfaces/CadenzaClientOptions.html +14 -14
- package/apidoc/interfaces/CadenzaEvent.html +6 -6
- package/apidoc/interfaces/Distance.html +3 -3
- package/apidoc/interfaces/ExternalLinkKey.html +8 -7
- package/apidoc/interfaces/Feature.html +16 -16
- package/apidoc/interfaces/FeatureCollection.html +6 -6
- package/apidoc/interfaces/Geometry.html +6 -6
- package/apidoc/interfaces/GeometryExtentStrategy.html +6 -6
- package/apidoc/interfaces/LayerDataExtentStrategy.html +7 -7
- package/apidoc/interfaces/LayerDefinition.html +7 -7
- package/apidoc/interfaces/LocationFinderExtentStrategy.html +6 -6
- package/apidoc/interfaces/PageSource.html +4 -4
- package/apidoc/interfaces/SnappingOptions.html +5 -0
- package/apidoc/interfaces/StaticExtentStrategy.html +6 -6
- package/apidoc/modules.html +1 -46
- 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 +3 -3
- package/apidoc/types/Extent.html +2 -2
- package/apidoc/types/ExtentStrategy.html +5 -5
- 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 +4 -4
- package/apidoc/types/OperationMode.html +2 -2
- package/apidoc/types/TablePart.html +2 -2
- package/apidoc/types/UiFeature.html +3 -3
- package/apidoc/types/WorkbookLayerPath.html +3 -3
- package/cadenza.d.ts +71 -27
- package/cadenza.js +69 -36
- package/package.json +8 -8
- package/sandbox.html +69 -27
package/cadenza.d.ts
CHANGED
|
@@ -19,11 +19,14 @@ export function cadenza(options?: CadenzaClientOptions | undefined): CadenzaClie
|
|
|
19
19
|
* @throws For invalid arguments
|
|
20
20
|
*/
|
|
21
21
|
export function cadenza(baseUrl: string, options?: CadenzaClientOptions | undefined): CadenzaClient;
|
|
22
|
+
export namespace cadenza {
|
|
23
|
+
export { CADENZAJS_VERSION as version };
|
|
24
|
+
}
|
|
22
25
|
/**
|
|
23
26
|
* _Notes:_
|
|
24
27
|
* * Most public methods are tagged with one of these modifiers:
|
|
25
28
|
* * `Embed`: The method embeds Cadenza in the given iframe.
|
|
26
|
-
* * `Post Message`: The method communicates with an embedded
|
|
29
|
+
* * `Post Message`: The method communicates with an embedded Cadenza via postMessage.
|
|
27
30
|
* * `Post Message Parent`: The method communicates with a parent/opener Cadenza via postMessage.
|
|
28
31
|
* * `Server`: The method communicates with the Cadenza server via HTTP.
|
|
29
32
|
* * Most public methods can be aborted using an [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal).
|
|
@@ -85,11 +88,12 @@ export class CadenzaClient {
|
|
|
85
88
|
* @param {object} [__namedParameters] - Options
|
|
86
89
|
* @param {boolean} [__namedParameters.invalidateCaches] - When true, caches will be invalidated for objecttypes used
|
|
87
90
|
* in the worksheet
|
|
91
|
+
* @return {Promise<void>} A `Promise` which resolves when the views of the worksheet have finished reloading
|
|
88
92
|
* @postMessage
|
|
89
93
|
*/
|
|
90
94
|
reload({ invalidateCaches }?: {
|
|
91
95
|
invalidateCaches?: boolean | undefined;
|
|
92
|
-
} | undefined, ...args: any[]): void
|
|
96
|
+
} | undefined, ...args: any[]): Promise<void>;
|
|
93
97
|
/**
|
|
94
98
|
* Sends a message to parent Cadenza window to close the window containing this application
|
|
95
99
|
* @postMessageParent
|
|
@@ -103,6 +107,7 @@ export class CadenzaClient {
|
|
|
103
107
|
* @param {LayerDefinition[]} [__namedParameters.additionalLayers] - Layer definitions to be imported and shown in the background, as a basis for the drawing.
|
|
104
108
|
* @param {UiFeature[]} [__namedParameters.disabledUiFeatures] - Cadenza UI features to disable
|
|
105
109
|
* @param {boolean} [__namedParameters.expandNavigator] - Indicates if the navigator should be expanded.
|
|
110
|
+
* @param {ExtentStrategy} [__namedParameters.extentStrategy] - Defines the initial map extent; If not given, Cadenza's default logic is used.
|
|
106
111
|
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
107
112
|
* @param {Geometry} [__namedParameters.geometry] - A geometry to show on the map
|
|
108
113
|
* @param {boolean} [__namedParameters.hideMainHeaderAndFooter] - Whether to hide the main Cadenza header and footer
|
|
@@ -113,7 +118,6 @@ export class CadenzaClient {
|
|
|
113
118
|
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
114
119
|
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
|
|
115
120
|
* @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.
|
|
117
121
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
118
122
|
* @throws For invalid arguments
|
|
119
123
|
* @fires
|
|
@@ -121,10 +125,11 @@ export class CadenzaClient {
|
|
|
121
125
|
* - {@link CadenzaActionEvent}
|
|
122
126
|
* @embed
|
|
123
127
|
*/
|
|
124
|
-
showMap(mapView: EmbeddingTargetId, { disabledUiFeatures, expandNavigator, filter, geometry, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, locationFinder, mapExtent, operationMode, useMapSrs,
|
|
128
|
+
showMap(mapView: EmbeddingTargetId, { additionalLayers, disabledUiFeatures, expandNavigator, extentStrategy, filter, geometry, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, locationFinder, mapExtent, operationMode, useMapSrs, signal, }?: {
|
|
125
129
|
additionalLayers?: LayerDefinition[] | undefined;
|
|
126
130
|
disabledUiFeatures?: UiFeature[] | undefined;
|
|
127
131
|
expandNavigator?: boolean | undefined;
|
|
132
|
+
extentStrategy?: ExtentStrategy | undefined;
|
|
128
133
|
filter?: FilterVariables | undefined;
|
|
129
134
|
geometry?: Geometry | undefined;
|
|
130
135
|
hideMainHeaderAndFooter?: boolean | undefined;
|
|
@@ -135,7 +140,6 @@ export class CadenzaClient {
|
|
|
135
140
|
operationMode?: OperationMode | undefined;
|
|
136
141
|
signal?: AbortSignal | undefined;
|
|
137
142
|
useMapSrs?: boolean | undefined;
|
|
138
|
-
extentStrategy?: ExtentStrategy | undefined;
|
|
139
143
|
} | undefined, ...args: any[]): Promise<void>;
|
|
140
144
|
/**
|
|
141
145
|
* Expand/collapse the navigator.
|
|
@@ -185,30 +189,42 @@ export class CadenzaClient {
|
|
|
185
189
|
* @hidden
|
|
186
190
|
* @param {WorkbookLayerPath | string} layer - The data view layer to set the selection in
|
|
187
191
|
* @param {unknown[][]} values - The IDs of the objects to select
|
|
192
|
+
* @param {object} [__namedParameters]
|
|
193
|
+
* @param {GeometryExtentStrategy} [__namedParameters.extentStrategy] - Strategy to define the new map extent
|
|
188
194
|
* @return {Promise<void>} A `Promise` for when the selection was set.
|
|
189
195
|
* @postMessage
|
|
190
196
|
*/
|
|
191
|
-
setSelection(layer: WorkbookLayerPath | string, values: unknown[][],
|
|
197
|
+
setSelection(layer: WorkbookLayerPath | string, values: unknown[][], { extentStrategy }?: {
|
|
198
|
+
extentStrategy?: GeometryExtentStrategy | undefined;
|
|
199
|
+
} | undefined, ...args: any[]): Promise<void>;
|
|
192
200
|
/**
|
|
193
201
|
* Add to the selection in the currently shown workbook map view.
|
|
194
202
|
*
|
|
195
203
|
* @hidden
|
|
196
204
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
197
205
|
* @param {unknown[][]} values - The IDs of the objects to select
|
|
206
|
+
* @param {object} [__namedParameters]
|
|
207
|
+
* @param {GeometryExtentStrategy} [__namedParameters.extentStrategy] - Strategy to define the new map extent
|
|
198
208
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
199
209
|
* @postMessage
|
|
200
210
|
*/
|
|
201
|
-
addSelection(layer: WorkbookLayerPath | string, values: unknown[][],
|
|
211
|
+
addSelection(layer: WorkbookLayerPath | string, values: unknown[][], { extentStrategy }?: {
|
|
212
|
+
extentStrategy?: GeometryExtentStrategy | undefined;
|
|
213
|
+
} | undefined, ...args: any[]): Promise<void>;
|
|
202
214
|
/**
|
|
203
215
|
* Remove from the selection in the currently shown workbook map view.
|
|
204
216
|
*
|
|
205
217
|
* @hidden
|
|
206
218
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
207
219
|
* @param {unknown[][]} values - The IDs of the objects to unselect
|
|
220
|
+
* @param {object} [__namedParameters]
|
|
221
|
+
* @param {GeometryExtentStrategy} [__namedParameters.extentStrategy] - Strategy to define the new map extent
|
|
208
222
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
209
223
|
* @postMessage
|
|
210
224
|
*/
|
|
211
|
-
removeSelection(layer: WorkbookLayerPath | string, values: unknown[][],
|
|
225
|
+
removeSelection(layer: WorkbookLayerPath | string, values: unknown[][], { extentStrategy }?: {
|
|
226
|
+
extentStrategy?: GeometryExtentStrategy | undefined;
|
|
227
|
+
} | undefined, ...args: any[]): Promise<void>;
|
|
212
228
|
/**
|
|
213
229
|
* Create a geometry.
|
|
214
230
|
*
|
|
@@ -220,14 +236,15 @@ export class CadenzaClient {
|
|
|
220
236
|
* @param {object} [__namedParameters] - Options
|
|
221
237
|
* @param {LayerDefinition[]} [__namedParameters.additionalLayers] - Layer definitions to be imported and shown in the background, as a basis for the drawing.
|
|
222
238
|
* @param {UiFeature[]} [__namedParameters.disabledUiFeatures] - Cadenza UI features to disable
|
|
239
|
+
* @param {ExtentStrategy} [__namedParameters.extentStrategy] - Defines the initial map extent; If not given, Cadenza's default logic is used.
|
|
223
240
|
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
224
241
|
* @param {string} [__namedParameters.locationFinder] - A search query for the location finder - _Deprecated_: Use {@link LocationFinderExtentStrategy} instead.
|
|
225
242
|
* @param {Extent} [__namedParameters.mapExtent] - A map extent to set - _Deprecated_: Use {@link StaticExtentStrategy} instead.
|
|
226
243
|
* @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
244
|
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
228
245
|
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
|
|
246
|
+
* @param {SnappingOptions} [__namedParameters.snapping] - Passing these options enables snapping
|
|
229
247
|
* @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.
|
|
231
248
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
232
249
|
* @throws For invalid arguments
|
|
233
250
|
* @fires
|
|
@@ -236,17 +253,18 @@ export class CadenzaClient {
|
|
|
236
253
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
237
254
|
* @embed
|
|
238
255
|
*/
|
|
239
|
-
createGeometry(backgroundMapView: EmbeddingTargetId, geometryType: GeometryType, { additionalLayers, disabledUiFeatures, filter, locationFinder, mapExtent, minScale, useMapSrs, operationMode, signal,
|
|
256
|
+
createGeometry(backgroundMapView: EmbeddingTargetId, geometryType: GeometryType, { additionalLayers, disabledUiFeatures, extentStrategy, filter, locationFinder, mapExtent, minScale, useMapSrs, operationMode, signal, snapping, }?: {
|
|
240
257
|
additionalLayers?: LayerDefinition[] | undefined;
|
|
241
258
|
disabledUiFeatures?: UiFeature[] | undefined;
|
|
259
|
+
extentStrategy?: ExtentStrategy | undefined;
|
|
242
260
|
filter?: FilterVariables | undefined;
|
|
243
261
|
locationFinder?: string | undefined;
|
|
244
262
|
mapExtent?: Extent | undefined;
|
|
245
263
|
minScale?: number | undefined;
|
|
246
264
|
operationMode?: OperationMode | undefined;
|
|
247
265
|
signal?: AbortSignal | undefined;
|
|
266
|
+
snapping?: SnappingOptions | undefined;
|
|
248
267
|
useMapSrs?: boolean | undefined;
|
|
249
|
-
extentStrategy?: ExtentStrategy | undefined;
|
|
250
268
|
} | undefined, ...args: any[]): Promise<void>;
|
|
251
269
|
/**
|
|
252
270
|
* Edit a geometry.
|
|
@@ -256,14 +274,15 @@ export class CadenzaClient {
|
|
|
256
274
|
* @param {object} [__namedParameters] - Options
|
|
257
275
|
* @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
276
|
* @param {UiFeature[]} [__namedParameters.disabledUiFeatures] - Cadenza UI features to disable
|
|
277
|
+
* @param {ExtentStrategy} [__namedParameters.extentStrategy] - Defines the initial map extent; If not given, Cadenza's default logic is used.
|
|
259
278
|
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
260
279
|
* @param {string} [__namedParameters.locationFinder] - A search query for the location finder - _Deprecated_: Use {@link LocationFinderExtentStrategy} instead.
|
|
261
280
|
* @param {Extent} [__namedParameters.mapExtent] - A map extent to set - _Deprecated_: Use {@link StaticExtentStrategy} instead.
|
|
262
281
|
* @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
282
|
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
264
283
|
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the iframe loading
|
|
284
|
+
* @param {SnappingOptions} [__namedParameters.snapping] - Passing these options enables snapping
|
|
265
285
|
* @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.
|
|
267
286
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
268
287
|
* @throws For invalid arguments
|
|
269
288
|
* @fires
|
|
@@ -272,17 +291,18 @@ export class CadenzaClient {
|
|
|
272
291
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
273
292
|
* @embed
|
|
274
293
|
*/
|
|
275
|
-
editGeometry(backgroundMapView: EmbeddingTargetId, geometry: Geometry, { additionalLayers, disabledUiFeatures, filter, locationFinder, mapExtent, minScale, operationMode, signal,
|
|
294
|
+
editGeometry(backgroundMapView: EmbeddingTargetId, geometry: Geometry, { additionalLayers, disabledUiFeatures, extentStrategy, filter, locationFinder, mapExtent, minScale, operationMode, signal, snapping, useMapSrs, }?: {
|
|
276
295
|
additionalLayers?: LayerDefinition[] | undefined;
|
|
277
296
|
disabledUiFeatures?: UiFeature[] | undefined;
|
|
297
|
+
extentStrategy?: ExtentStrategy | undefined;
|
|
278
298
|
filter?: FilterVariables | undefined;
|
|
279
299
|
locationFinder?: string | undefined;
|
|
280
300
|
mapExtent?: Extent | undefined;
|
|
281
301
|
minScale?: number | undefined;
|
|
282
302
|
operationMode?: OperationMode | undefined;
|
|
283
303
|
signal?: AbortSignal | undefined;
|
|
304
|
+
snapping?: SnappingOptions | undefined;
|
|
284
305
|
useMapSrs?: boolean | undefined;
|
|
285
|
-
extentStrategy?: ExtentStrategy | undefined;
|
|
286
306
|
} | undefined, ...args: any[]): Promise<void>;
|
|
287
307
|
/**
|
|
288
308
|
* Set custom validity state of the geometry editor in addition to the default validation state (including errors and
|
|
@@ -299,6 +319,7 @@ export class CadenzaClient {
|
|
|
299
319
|
*
|
|
300
320
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view
|
|
301
321
|
* @param {object} [__namedParameters] - Options
|
|
322
|
+
* @param {ExtentStrategy} [__namedParameters.extentStrategy] - Defines the initial map extent; If not given, Cadenza's default logic is used.
|
|
302
323
|
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
303
324
|
* @param {(WorkbookLayerPath | string)[]} [__namedParameters.layers] - Layers to restrict the selection to
|
|
304
325
|
* (identified using layer paths or print names)
|
|
@@ -307,7 +328,6 @@ export class CadenzaClient {
|
|
|
307
328
|
* @param {boolean} [__namedParameters.useMapSrs] - Whether the coordinates specified in other parameters are specified in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
308
329
|
* @param {OperationMode} [__namedParameters.operationMode] - The mode in which a workbook should be operated
|
|
309
330
|
* @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.
|
|
311
331
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
312
332
|
* @throws For invalid arguments
|
|
313
333
|
* @fires
|
|
@@ -317,7 +337,8 @@ export class CadenzaClient {
|
|
|
317
337
|
* - {@link CadenzaSelectObjectsCancelEvent}
|
|
318
338
|
* @embed
|
|
319
339
|
*/
|
|
320
|
-
selectObjects(backgroundMapView: EmbeddingTargetId, { filter, layers, locationFinder, mapExtent, useMapSrs, operationMode, signal,
|
|
340
|
+
selectObjects(backgroundMapView: EmbeddingTargetId, { extentStrategy, filter, layers, locationFinder, mapExtent, useMapSrs, operationMode, signal, }?: {
|
|
341
|
+
extentStrategy?: ExtentStrategy | undefined;
|
|
321
342
|
filter?: FilterVariables | undefined;
|
|
322
343
|
layers?: (string | WorkbookLayerPath)[] | undefined;
|
|
323
344
|
locationFinder?: string | undefined;
|
|
@@ -325,7 +346,6 @@ export class CadenzaClient {
|
|
|
325
346
|
useMapSrs?: boolean | undefined;
|
|
326
347
|
operationMode?: OperationMode | undefined;
|
|
327
348
|
signal?: AbortSignal | undefined;
|
|
328
|
-
extentStrategy?: ExtentStrategy | undefined;
|
|
329
349
|
} | undefined, ...args: any[]): Promise<void>;
|
|
330
350
|
/**
|
|
331
351
|
* Subscribe to a `postMessage()` event.
|
|
@@ -372,17 +392,17 @@ export class CadenzaClient {
|
|
|
372
392
|
* @param {unknown[][]} objectIds - The IDs of the objects to select
|
|
373
393
|
* @param {object} [__namedParameters] - Options
|
|
374
394
|
* @param {FilterVariables} [__namedParameters.filter] - Filter variables
|
|
395
|
+
* @param {Boolean} [__namedParameters.fullGeometries] - Return non-simplified geometries
|
|
375
396
|
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the data fetching
|
|
376
397
|
* @param {Boolean} [__namedParameters.useMapSrs] - Use the map SRS instead of WGS84
|
|
377
|
-
* @param {Boolean} [__namedParameters.fullGeometries] - Return non-simplified geometries
|
|
378
398
|
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
379
399
|
* @throws For invalid arguments
|
|
380
400
|
*/
|
|
381
|
-
fetchObjectInfo(source: EmbeddingTargetId, layerPath: (WorkbookLayerPath | string)[], objectIds: unknown[][], { filter, signal,
|
|
401
|
+
fetchObjectInfo(source: EmbeddingTargetId, layerPath: (WorkbookLayerPath | string)[], objectIds: unknown[][], { filter, signal, fullGeometries, useMapSrs }?: {
|
|
382
402
|
filter?: FilterVariables | undefined;
|
|
403
|
+
fullGeometries?: boolean | undefined;
|
|
383
404
|
signal?: AbortSignal | undefined;
|
|
384
405
|
useMapSrs?: boolean | undefined;
|
|
385
|
-
fullGeometries?: boolean | undefined;
|
|
386
406
|
} | undefined, ...args: any[]): Promise<FeatureCollection>;
|
|
387
407
|
/**
|
|
388
408
|
* Fetch the intersection areas from a workbook map view layer in JSON format for a given area.
|
|
@@ -392,16 +412,16 @@ export class CadenzaClient {
|
|
|
392
412
|
* (identified using layer paths or print names)
|
|
393
413
|
* @param {Geometry} geometry - The intersection geometry
|
|
394
414
|
* @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
415
|
* @param {Distance} [__namedParameters.buffer] - Buffer size for geometry of the transition
|
|
397
416
|
* @param {AbortSignal} [__namedParameters.signal] - A signal to abort the data fetching
|
|
417
|
+
* @param {boolean} [__namedParameters.useMapSrs] - The intersection geometry and the result geometries are in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
398
418
|
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
399
419
|
* @server
|
|
400
420
|
*/
|
|
401
|
-
fetchAreaIntersections(source: EmbeddingTargetId, layerPath: (WorkbookLayerPath | string)[], geometry: Geometry, {
|
|
402
|
-
useMapSrs?: boolean | undefined;
|
|
421
|
+
fetchAreaIntersections(source: EmbeddingTargetId, layerPath: (WorkbookLayerPath | string)[], geometry: Geometry, { buffer, signal, useMapSrs }?: {
|
|
403
422
|
buffer?: Distance | undefined;
|
|
404
423
|
signal?: AbortSignal | undefined;
|
|
424
|
+
useMapSrs?: boolean | undefined;
|
|
405
425
|
} | undefined, ...args: any[]): Promise<FeatureCollection>;
|
|
406
426
|
/**
|
|
407
427
|
* Download data from a workbook view.
|
|
@@ -435,9 +455,9 @@ export class CadenzaClient {
|
|
|
435
455
|
* | 'editGeometry:update'
|
|
436
456
|
* | 'editGeometry:cancel'
|
|
437
457
|
* | 'objectInfo'
|
|
458
|
+
* | 'reload'
|
|
438
459
|
* | 'selectObjects:ok'
|
|
439
460
|
* | 'selectObjects:cancel'
|
|
440
|
-
* | 'reload'
|
|
441
461
|
* } CadenzaEventType - An event type to subscribe to using {@link CadenzaClient#on}
|
|
442
462
|
*/
|
|
443
463
|
/**
|
|
@@ -449,9 +469,9 @@ export class CadenzaClient {
|
|
|
449
469
|
* : T extends 'editGeometry:ok' ? CadenzaEditGeometryOkEvent
|
|
450
470
|
* : T extends 'editGeometry:cancel' ? CadenzaEditGeometryCancelEvent
|
|
451
471
|
* : T extends 'objectInfo' ? CadenzaObjectInfoEvent
|
|
472
|
+
* : T extends 'reload' ? CadenzaReloadEvent
|
|
452
473
|
* : T extends 'selectObjects:ok' ? CadenzaSelectObjectsOkEvent
|
|
453
474
|
* : T extends 'selectObjects:cancel' ? CadenzaSelectObjectsCancelEvent
|
|
454
|
-
* : T extends 'reload' ? CadenzaReloadEvent
|
|
455
475
|
* : never
|
|
456
476
|
* } CadenzaEventByType
|
|
457
477
|
*/
|
|
@@ -784,11 +804,21 @@ export type FeatureCollection = {
|
|
|
784
804
|
* - The type of custom validity used for disclose on visual presentation and form submission behavior
|
|
785
805
|
*/
|
|
786
806
|
export type CustomValidityType = 'error' | 'warning' | 'info' | 'success';
|
|
807
|
+
export type SnappingOptions = {
|
|
808
|
+
/**
|
|
809
|
+
* - The layer to snap to
|
|
810
|
+
*/
|
|
811
|
+
layer: WorkbookLayerPath | string;
|
|
812
|
+
/**
|
|
813
|
+
* - Snapping types; Without this option, the Cadenza default snapping types are used.
|
|
814
|
+
*/
|
|
815
|
+
types?: ("toVertices" | "toEdges" | "lineTracing")[] | undefined;
|
|
816
|
+
};
|
|
787
817
|
/**
|
|
788
818
|
* - An event type to subscribe to using {@link CadenzaClienton }
|
|
789
819
|
*/
|
|
790
|
-
export type CadenzaEventType = 'action' | 'change:selection' | 'drillThrough' | 'editGeometry:ok' | 'editGeometry:update' | 'editGeometry:cancel' | 'objectInfo' | '
|
|
791
|
-
export type CadenzaEventByType<T extends CadenzaEventType> = T extends 'action' ? CadenzaActionEvent : T extends 'change:selection' ? CadenzaChangeSelectionEvent : T extends 'drillThrough' ? CadenzaDrillThroughEvent : T extends 'editGeometry:update' ? CadenzaEditGeometryUpdateEvent : T extends 'editGeometry:ok' ? CadenzaEditGeometryOkEvent : T extends 'editGeometry:cancel' ? CadenzaEditGeometryCancelEvent : T extends 'objectInfo' ? CadenzaObjectInfoEvent : T extends '
|
|
820
|
+
export type CadenzaEventType = 'action' | 'change:selection' | 'drillThrough' | 'editGeometry:ok' | 'editGeometry:update' | 'editGeometry:cancel' | 'objectInfo' | 'reload' | 'selectObjects:ok' | 'selectObjects:cancel';
|
|
821
|
+
export type CadenzaEventByType<T extends CadenzaEventType> = T extends 'action' ? CadenzaActionEvent : T extends 'change:selection' ? CadenzaChangeSelectionEvent : T extends 'drillThrough' ? CadenzaDrillThroughEvent : T extends 'editGeometry:update' ? CadenzaEditGeometryUpdateEvent : T extends 'editGeometry:ok' ? CadenzaEditGeometryOkEvent : T extends 'editGeometry:cancel' ? CadenzaEditGeometryCancelEvent : T extends 'objectInfo' ? CadenzaObjectInfoEvent : T extends 'reload' ? CadenzaReloadEvent : T extends 'selectObjects:ok' ? CadenzaSelectObjectsOkEvent : T extends 'selectObjects:cancel' ? CadenzaSelectObjectsCancelEvent : never;
|
|
792
822
|
/**
|
|
793
823
|
* - A Cadenza `postMessage()` event
|
|
794
824
|
*/
|
|
@@ -883,3 +913,17 @@ export type CadenzaSelectObjectsCancelEvent = CadenzaEvent<'selectObjects:cancel
|
|
|
883
913
|
* with the correct original URL and parameters and do what was originally done when displaying that iframe.
|
|
884
914
|
*/
|
|
885
915
|
export type CadenzaReloadEvent = CadenzaEvent<'reload'>;
|
|
916
|
+
/**
|
|
917
|
+
* @typedef CadenzaClientOptions
|
|
918
|
+
* @property {string} [baseUrl] - The base URL of the Cadenza server
|
|
919
|
+
* @property {HTMLIFrameElement | string} [options.iframe] - An iframe for embedding Cadenza or the iframe's ID.
|
|
920
|
+
* The iframe is required only for methods that embed Cadenza in an iframe, so e.g. not for {@link CadenzaClient#fetchData}.
|
|
921
|
+
* If you want to embed Cadenza in multiple iframes, you need to create an instance of the `CadenzaClient` per iframe.
|
|
922
|
+
* @property {ExternalLinkKey} [options.webApplication] - An external link that Cadenza uses to resolve the
|
|
923
|
+
* [target origin](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage#targetorigin) when posting events.
|
|
924
|
+
* This is required if Cadenza and your application are not running on the same origin.
|
|
925
|
+
* Please ensure that the user has view privilege for that link!
|
|
926
|
+
* @property {boolean} [options.debug] - Whether to enable debug logging
|
|
927
|
+
*/
|
|
928
|
+
declare const CADENZAJS_VERSION: "{{version}}";
|
|
929
|
+
export {};
|