@disy/cadenza.js 2.5.0 → 2.7.0
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 +7 -1
- package/apidoc/assets/search.js +1 -1
- package/apidoc/classes/AbortError.html +2 -2
- package/apidoc/classes/CadenzaClient.html +22 -20
- package/apidoc/classes/CadenzaError.html +3 -3
- package/apidoc/functions/cadenza.html +1 -1
- package/apidoc/index.html +4 -1
- package/apidoc/interfaces/CadenzaEvent.html +3 -3
- package/apidoc/interfaces/ExternalLinkKey.html +3 -3
- package/apidoc/interfaces/Geometry.html +2 -2
- package/apidoc/interfaces/PageSource.html +2 -2
- package/apidoc/types/CadenzaChangeSelectionEvent.html +2 -1
- package/apidoc/types/CadenzaDrillThroughEvent.html +1 -1
- package/apidoc/types/CadenzaEditGeometryCancelEvent.html +1 -1
- package/apidoc/types/CadenzaEditGeometryOkEvent.html +1 -1
- package/apidoc/types/CadenzaEditGeometryUpdateEvent.html +1 -1
- package/apidoc/types/CadenzaErrorEvent.html +1 -1
- package/apidoc/types/CadenzaEventByType.html +1 -1
- package/apidoc/types/CadenzaEventType.html +1 -1
- package/apidoc/types/CadenzaObjectInfoEvent.html +1 -1
- package/apidoc/types/CadenzaSelectObjectsCancelEvent.html +1 -1
- package/apidoc/types/CadenzaSelectObjectsOkEvent.html +2 -1
- package/apidoc/types/DataType.html +1 -1
- package/apidoc/types/EmbeddingTargetId.html +1 -1
- package/apidoc/types/Extent.html +1 -1
- package/apidoc/types/FilterVariables.html +1 -1
- package/apidoc/types/GeometryType.html +1 -1
- package/apidoc/types/GlobalId.html +1 -1
- package/apidoc/types/OpaqueString.html +1 -1
- package/apidoc/types/OperationMode.html +1 -1
- package/apidoc/types/TablePart.html +1 -1
- package/apidoc/types/UiFeature.html +1 -1
- package/apidoc/types/WorkbookLayerPath.html +1 -1
- package/cadenza.d.ts +27 -5
- package/cadenza.js +26 -5
- package/package.json +1 -1
- package/sandbox.html +6 -3
package/cadenza.d.ts
CHANGED
|
@@ -185,6 +185,7 @@ export class CadenzaClient {
|
|
|
185
185
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
186
186
|
* @param {GeometryType} geometryType - The geometry type
|
|
187
187
|
* @param {object} [options] - Options
|
|
188
|
+
* @param {FilterVariables} [options.filter] - Filter variables
|
|
188
189
|
* @param {string} [options.locationFinder] - A search query for the location finder
|
|
189
190
|
* @param {Extent} [options.mapExtent] - A map extent to set
|
|
190
191
|
* @param {number} [options.minScale] - The minimum scale where the user should work on. A warning is shown when the map is zoomed out above the threshold.
|
|
@@ -197,7 +198,8 @@ export class CadenzaClient {
|
|
|
197
198
|
* - {@link CadenzaEditGeometryOkEvent}
|
|
198
199
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
199
200
|
*/
|
|
200
|
-
createGeometry(backgroundMapView: EmbeddingTargetId, geometryType: GeometryType, { locationFinder, mapExtent, minScale, useMapSrs, signal }?: {
|
|
201
|
+
createGeometry(backgroundMapView: EmbeddingTargetId, geometryType: GeometryType, { filter, locationFinder, mapExtent, minScale, useMapSrs, signal }?: {
|
|
202
|
+
filter?: FilterVariables | undefined;
|
|
201
203
|
locationFinder?: string | undefined;
|
|
202
204
|
mapExtent?: Extent | undefined;
|
|
203
205
|
minScale?: number | undefined;
|
|
@@ -210,6 +212,7 @@ export class CadenzaClient {
|
|
|
210
212
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
211
213
|
* @param {Geometry} geometry - The geometry
|
|
212
214
|
* @param {object} [options] - Options
|
|
215
|
+
* @param {FilterVariables} [options.filter] - Filter variables
|
|
213
216
|
* @param {string} [options.locationFinder] - A search query for the location finder
|
|
214
217
|
* @param {Extent} [options.mapExtent] - A map extent to set
|
|
215
218
|
* @param {number} [options.minScale] - The minimum scale where the user should work on. A warning is shown when the map is zoomed out above the threshold.
|
|
@@ -222,7 +225,8 @@ export class CadenzaClient {
|
|
|
222
225
|
* - {@link CadenzaEditGeometryOkEvent}
|
|
223
226
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
224
227
|
*/
|
|
225
|
-
editGeometry(backgroundMapView: EmbeddingTargetId, geometry: Geometry, { locationFinder, mapExtent, minScale, useMapSrs, signal }?: {
|
|
228
|
+
editGeometry(backgroundMapView: EmbeddingTargetId, geometry: Geometry, { filter, locationFinder, mapExtent, minScale, useMapSrs, signal }?: {
|
|
229
|
+
filter?: FilterVariables | undefined;
|
|
226
230
|
locationFinder?: string | undefined;
|
|
227
231
|
mapExtent?: Extent | undefined;
|
|
228
232
|
minScale?: number | undefined;
|
|
@@ -234,6 +238,7 @@ export class CadenzaClient {
|
|
|
234
238
|
*
|
|
235
239
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view
|
|
236
240
|
* @param {object} [options] - Options
|
|
241
|
+
* @param {FilterVariables} [options.filter] - Filter variables
|
|
237
242
|
* @param {(WorkbookLayerPath | string)[]} [options.layers] - Layers to restrict the selection to
|
|
238
243
|
* (identified using layer paths or print names)
|
|
239
244
|
* @param {string} [options.locationFinder] - A search query for the location finder
|
|
@@ -248,7 +253,8 @@ export class CadenzaClient {
|
|
|
248
253
|
* - {@link CadenzaSelectObjectsOkEvent}
|
|
249
254
|
* - {@link CadenzaSelectObjectsCancelEvent}
|
|
250
255
|
*/
|
|
251
|
-
selectObjects(backgroundMapView: EmbeddingTargetId, { layers, locationFinder, mapExtent, useMapSrs, signal }?: {
|
|
256
|
+
selectObjects(backgroundMapView: EmbeddingTargetId, { filter, layers, locationFinder, mapExtent, useMapSrs, signal }?: {
|
|
257
|
+
filter?: FilterVariables | undefined;
|
|
252
258
|
layers?: (string | WorkbookLayerPath)[] | undefined;
|
|
253
259
|
locationFinder?: string | undefined;
|
|
254
260
|
mapExtent?: Extent | undefined;
|
|
@@ -303,6 +309,10 @@ export class CadenzaClient {
|
|
|
303
309
|
filter?: FilterVariables | undefined;
|
|
304
310
|
parts?: TablePart[] | undefined;
|
|
305
311
|
} | undefined, ...args: any[]): void;
|
|
312
|
+
/**
|
|
313
|
+
* Reload the views of a worksheet.
|
|
314
|
+
*/
|
|
315
|
+
reload(): void;
|
|
306
316
|
#private;
|
|
307
317
|
}
|
|
308
318
|
/**
|
|
@@ -336,7 +346,11 @@ export class CadenzaClient {
|
|
|
336
346
|
* @property {TYPE} type - The event type
|
|
337
347
|
* @property {DETAIL} detail - Optional event details (depending on the event type)
|
|
338
348
|
*/
|
|
339
|
-
/**
|
|
349
|
+
/**
|
|
350
|
+
* @typedef {CadenzaEvent<'change:selection', undefined | {layer: WorkbookLayerPath, values: unknown[][]}>} CadenzaChangeSelectionEvent - When the user changed the selection.
|
|
351
|
+
*
|
|
352
|
+
* For a selection in a workbook map view with activated feature info, the values also include the geometries of the selected objects.
|
|
353
|
+
*/
|
|
340
354
|
/**
|
|
341
355
|
* @typedef {CadenzaEvent<'drillThrough', {context?: string, values: unknown[][]}>} CadenzaDrillThroughEvent - When the user executed a POST message drill-through.
|
|
342
356
|
* <p>
|
|
@@ -351,7 +365,11 @@ export class CadenzaClient {
|
|
|
351
365
|
/** @typedef {CadenzaEvent<'editGeometry:cancel'>} CadenzaEditGeometryCancelEvent - When the user cancelled the geometry editing. */
|
|
352
366
|
/** @typedef {CadenzaEvent<'error', {type: string, message?: string}>} CadenzaErrorEvent - An error event that is mapped to a {@link CadenzaError} */
|
|
353
367
|
/** @typedef {CadenzaEvent<'objectInfo', {layer: WorkbookLayerPath, objectInfos: {selectionIndex: number, elements: {attributePrintName: string, formattedValue: string}[]}}>} CadenzaObjectInfoEvent - When the user opened the object info flyout. */
|
|
354
|
-
/**
|
|
368
|
+
/**
|
|
369
|
+
* @typedef {CadenzaEvent<'selectObjects:ok', {layer: WorkbookLayerPath, values: unknown[][]}>} CadenzaSelectObjectsOkEvent - When the user submitted the selection.
|
|
370
|
+
*
|
|
371
|
+
* For a selection in a workbook map view with activated feature info, the values also include the geometries of the selected objects.
|
|
372
|
+
*/
|
|
355
373
|
/** @typedef {CadenzaEvent<'selectObjects:cancel'>} CadenzaSelectObjectsCancelEvent - When the user cancelled the selection. */
|
|
356
374
|
export class AbortError extends DOMException {
|
|
357
375
|
constructor();
|
|
@@ -499,6 +517,8 @@ export type CadenzaEvent<TYPE extends string, DETAIL = unknown> = {
|
|
|
499
517
|
};
|
|
500
518
|
/**
|
|
501
519
|
* - When the user changed the selection.
|
|
520
|
+
*
|
|
521
|
+
* For a selection in a workbook map view with activated feature info, the values also include the geometries of the selected objects.
|
|
502
522
|
*/
|
|
503
523
|
export type CadenzaChangeSelectionEvent = CadenzaEvent<'change:selection', undefined | {
|
|
504
524
|
layer: string[];
|
|
@@ -555,6 +575,8 @@ export type CadenzaObjectInfoEvent = CadenzaEvent<'objectInfo', {
|
|
|
555
575
|
}>;
|
|
556
576
|
/**
|
|
557
577
|
* - When the user submitted the selection.
|
|
578
|
+
*
|
|
579
|
+
* For a selection in a workbook map view with activated feature info, the values also include the geometries of the selected objects.
|
|
558
580
|
*/
|
|
559
581
|
export type CadenzaSelectObjectsOkEvent = CadenzaEvent<'selectObjects:ok', {
|
|
560
582
|
layer: string[];
|
package/cadenza.js
CHANGED
|
@@ -358,6 +358,7 @@ export class CadenzaClient {
|
|
|
358
358
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
359
359
|
* @param {GeometryType} geometryType - The geometry type
|
|
360
360
|
* @param {object} [options] - Options
|
|
361
|
+
* @param {FilterVariables} [options.filter] - Filter variables
|
|
361
362
|
* @param {string} [options.locationFinder] - A search query for the location finder
|
|
362
363
|
* @param {Extent} [options.mapExtent] - A map extent to set
|
|
363
364
|
* @param {number} [options.minScale] - The minimum scale where the user should work on. A warning is shown when the map is zoomed out above the threshold.
|
|
@@ -370,10 +371,11 @@ export class CadenzaClient {
|
|
|
370
371
|
* - {@link CadenzaEditGeometryOkEvent}
|
|
371
372
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
372
373
|
*/
|
|
373
|
-
createGeometry(backgroundMapView, geometryType, { locationFinder, mapExtent, minScale, useMapSrs, signal } = {}) {
|
|
374
|
+
createGeometry(backgroundMapView, geometryType, { filter, locationFinder, mapExtent, minScale, useMapSrs, signal } = {}) {
|
|
374
375
|
this.#log('CadenzaClient#createGeometry', ...arguments);
|
|
375
376
|
const params = createParams({
|
|
376
377
|
action: 'editGeometry',
|
|
378
|
+
filter,
|
|
377
379
|
geometryType,
|
|
378
380
|
locationFinder,
|
|
379
381
|
mapExtent,
|
|
@@ -388,6 +390,7 @@ export class CadenzaClient {
|
|
|
388
390
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view in the background
|
|
389
391
|
* @param {Geometry} geometry - The geometry
|
|
390
392
|
* @param {object} [options] - Options
|
|
393
|
+
* @param {FilterVariables} [options.filter] - Filter variables
|
|
391
394
|
* @param {string} [options.locationFinder] - A search query for the location finder
|
|
392
395
|
* @param {Extent} [options.mapExtent] - A map extent to set
|
|
393
396
|
* @param {number} [options.minScale] - The minimum scale where the user should work on. A warning is shown when the map is zoomed out above the threshold.
|
|
@@ -400,11 +403,12 @@ export class CadenzaClient {
|
|
|
400
403
|
* - {@link CadenzaEditGeometryOkEvent}
|
|
401
404
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
402
405
|
*/
|
|
403
|
-
async editGeometry(backgroundMapView, geometry, { locationFinder, mapExtent, minScale, useMapSrs, signal } = {}) {
|
|
406
|
+
async editGeometry(backgroundMapView, geometry, { filter, locationFinder, mapExtent, minScale, useMapSrs, signal } = {}) {
|
|
404
407
|
this.#log('CadenzaClient#editGeometry', ...arguments);
|
|
405
408
|
assertValidGeometryType(geometry.type);
|
|
406
409
|
const params = createParams({
|
|
407
410
|
action: 'editGeometry',
|
|
411
|
+
filter,
|
|
408
412
|
locationFinder,
|
|
409
413
|
mapExtent,
|
|
410
414
|
minScale,
|
|
@@ -420,6 +424,7 @@ export class CadenzaClient {
|
|
|
420
424
|
*
|
|
421
425
|
* @param {EmbeddingTargetId} backgroundMapView - The workbook map view
|
|
422
426
|
* @param {object} [options] - Options
|
|
427
|
+
* @param {FilterVariables} [options.filter] - Filter variables
|
|
423
428
|
* @param {(WorkbookLayerPath | string)[]} [options.layers] - Layers to restrict the selection to
|
|
424
429
|
* (identified using layer paths or print names)
|
|
425
430
|
* @param {string} [options.locationFinder] - A search query for the location finder
|
|
@@ -434,10 +439,11 @@ export class CadenzaClient {
|
|
|
434
439
|
* - {@link CadenzaSelectObjectsOkEvent}
|
|
435
440
|
* - {@link CadenzaSelectObjectsCancelEvent}
|
|
436
441
|
*/
|
|
437
|
-
selectObjects(backgroundMapView, { layers, locationFinder, mapExtent, useMapSrs, signal } = {}) {
|
|
442
|
+
selectObjects(backgroundMapView, { filter, layers, locationFinder, mapExtent, useMapSrs, signal } = {}) {
|
|
438
443
|
this.#log('CadenzaClient#selectObjects', ...arguments);
|
|
439
444
|
const params = createParams({
|
|
440
445
|
action: 'selectObjects',
|
|
446
|
+
filter,
|
|
441
447
|
layers: layers?.map(array),
|
|
442
448
|
locationFinder,
|
|
443
449
|
mapExtent,
|
|
@@ -670,6 +676,13 @@ export class CadenzaClient {
|
|
|
670
676
|
const params = createParams({ dataType, fileName, filter, parts });
|
|
671
677
|
this.#download(resolvePath(source), params);
|
|
672
678
|
}
|
|
679
|
+
/**
|
|
680
|
+
* Reload the views of a worksheet.
|
|
681
|
+
*/
|
|
682
|
+
reload() {
|
|
683
|
+
this.#log('CadenzaClient#reload');
|
|
684
|
+
this.#postEvent('reload');
|
|
685
|
+
}
|
|
673
686
|
#download(/** @type string */ path, /** @type URLSearchParams */ params) {
|
|
674
687
|
const url = this.#createUrl(path, params);
|
|
675
688
|
const a = document.createElement('a');
|
|
@@ -895,7 +908,11 @@ function array(/** @type unknown */ value) {
|
|
|
895
908
|
* @typedef {CadenzaEvent<'change:extent', {extent: Extent}>} CadenzaChangeExtentEvent - When the user moved the map.
|
|
896
909
|
* The extent is transformed according to the `useMapSrs` option.
|
|
897
910
|
*/
|
|
898
|
-
/**
|
|
911
|
+
/**
|
|
912
|
+
* @typedef {CadenzaEvent<'change:selection', undefined | {layer: WorkbookLayerPath, values: unknown[][]}>} CadenzaChangeSelectionEvent - When the user changed the selection.
|
|
913
|
+
*
|
|
914
|
+
* For a selection in a workbook map view with activated feature info, the values also include the geometries of the selected objects.
|
|
915
|
+
*/
|
|
899
916
|
/**
|
|
900
917
|
* @typedef {CadenzaEvent<'drillThrough', {context?: string, values: unknown[][]}>} CadenzaDrillThroughEvent - When the user executed a POST message drill-through.
|
|
901
918
|
* <p>
|
|
@@ -910,7 +927,11 @@ function array(/** @type unknown */ value) {
|
|
|
910
927
|
/** @typedef {CadenzaEvent<'editGeometry:cancel'>} CadenzaEditGeometryCancelEvent - When the user cancelled the geometry editing. */
|
|
911
928
|
/** @typedef {CadenzaEvent<'error', {type: string, message?: string}>} CadenzaErrorEvent - An error event that is mapped to a {@link CadenzaError} */
|
|
912
929
|
/** @typedef {CadenzaEvent<'objectInfo', {layer: WorkbookLayerPath, objectInfos: {selectionIndex: number, elements: {attributePrintName: string, formattedValue: string}[]}}>} CadenzaObjectInfoEvent - When the user opened the object info flyout. */
|
|
913
|
-
/**
|
|
930
|
+
/**
|
|
931
|
+
* @typedef {CadenzaEvent<'selectObjects:ok', {layer: WorkbookLayerPath, values: unknown[][]}>} CadenzaSelectObjectsOkEvent - When the user submitted the selection.
|
|
932
|
+
*
|
|
933
|
+
* For a selection in a workbook map view with activated feature info, the values also include the geometries of the selected objects.
|
|
934
|
+
*/
|
|
914
935
|
/** @typedef {CadenzaEvent<'selectObjects:cancel'>} CadenzaSelectObjectsCancelEvent - When the user cancelled the selection. */
|
|
915
936
|
export class AbortError extends DOMException {
|
|
916
937
|
constructor() {
|
package/package.json
CHANGED
package/sandbox.html
CHANGED
|
@@ -139,6 +139,7 @@
|
|
|
139
139
|
showPage: data => cadenzaClient.show({ page: data.page }, getOptions(data)),
|
|
140
140
|
showMap: data => cadenzaClient.showMap(data.embeddingTargetId, getOptions(data)),
|
|
141
141
|
expandNavigator: data => cadenzaClient.expandNavigator(data.expandNavigator === 'on'),
|
|
142
|
+
reload: () => cadenzaClient.reload(),
|
|
142
143
|
getData: async data => {
|
|
143
144
|
const dataType = data.dataType;
|
|
144
145
|
const result = await cadenzaClient.getData(dataType);
|
|
@@ -261,6 +262,7 @@
|
|
|
261
262
|
<!--option value="setSelection">Set Selection</option-->
|
|
262
263
|
<!--option value="addSelection">Add Selection</option-->
|
|
263
264
|
<!--option value="removeSelection">Remove Selection</option-->
|
|
265
|
+
<option value="reload">Reload worksheet views</option>
|
|
264
266
|
</optgroup>
|
|
265
267
|
<optgroup label="Map Dialogs">
|
|
266
268
|
<option value="createGeometry">Create Geometry</option>
|
|
@@ -440,7 +442,7 @@
|
|
|
440
442
|
|
|
441
443
|
<template data-action="setFilter" data-common="filter"></template>
|
|
442
444
|
|
|
443
|
-
<template data-action="createGeometry" data-common="map">
|
|
445
|
+
<template data-action="createGeometry" data-common="map,filter">
|
|
444
446
|
<div>
|
|
445
447
|
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
446
448
|
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
@@ -462,7 +464,7 @@
|
|
|
462
464
|
</div>
|
|
463
465
|
</template>
|
|
464
466
|
|
|
465
|
-
<template data-action="editGeometry" data-common="map">
|
|
467
|
+
<template data-action="editGeometry" data-common="map,filter">
|
|
466
468
|
<div>
|
|
467
469
|
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
468
470
|
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
@@ -477,7 +479,7 @@
|
|
|
477
479
|
</div>
|
|
478
480
|
</template>
|
|
479
481
|
|
|
480
|
-
<template data-action="selectObjects" data-common="map">
|
|
482
|
+
<template data-action="selectObjects" data-common="map,filter">
|
|
481
483
|
<div>
|
|
482
484
|
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
483
485
|
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
@@ -506,6 +508,7 @@
|
|
|
506
508
|
<template data-action="setSelection" data-common="layer,layer-selection"></template>
|
|
507
509
|
<template data-action="addSelection" data-common="layer,layer-selection"></template>
|
|
508
510
|
<template data-action="removeSelection" data-common="layer,layer-selection"></template>
|
|
511
|
+
<template data-action="reload">No Paramters needed.</template>
|
|
509
512
|
|
|
510
513
|
<template id="common-layer-selection">
|
|
511
514
|
<div>
|