@disy/cadenza.js 10.4.1 → 10.4.3
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 +16 -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 +69 -72
- package/apidoc/classes/CadenzaError.html +5 -5
- package/apidoc/functions/cadenza.html +4 -4
- package/apidoc/index.html +47 -77
- package/apidoc/interfaces/CadenzaClientOptions.html +5 -5
- package/apidoc/interfaces/CadenzaEvent.html +4 -4
- package/apidoc/interfaces/CommonEditGeometryOptions.html +20 -0
- 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 +4 -4
- package/apidoc/interfaces/LayerDataExtentStrategy.html +4 -4
- package/apidoc/interfaces/LayerDefinition.html +4 -4
- package/apidoc/interfaces/LocationFinderExtentStrategy.html +4 -4
- package/apidoc/interfaces/PageSource.html +3 -3
- package/apidoc/interfaces/SnappingOptions.html +3 -3
- package/apidoc/interfaces/SpatialFilterValue.html +4 -4
- package/apidoc/interfaces/StaticExtentStrategy.html +4 -4
- package/apidoc/modules.html +1 -1
- 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 +2 -2
- package/apidoc/types/FilterVariables.html +2 -2
- package/apidoc/types/GeometryType.html +2 -2
- package/apidoc/types/GlobalId.html +2 -2
- package/apidoc/types/Layout.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/Polygon.html +1 -1
- package/apidoc/types/SpatialRelation.html +2 -2
- package/apidoc/types/TablePart.html +2 -2
- package/apidoc/types/UiFeature.html +5 -2
- package/apidoc/types/WorkbookLayerPath.html +2 -2
- package/cadenza.d.ts +97 -71
- package/cadenza.js +176 -80
- package/package.json +1 -1
- package/sandbox.html +106 -45
package/sandbox.html
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: column;
|
|
41
41
|
gap: var(--gap);
|
|
42
|
-
overflow:
|
|
42
|
+
overflow: hidden auto;
|
|
43
43
|
}
|
|
44
44
|
fieldset > div {
|
|
45
45
|
display: flex;
|
|
@@ -153,7 +153,8 @@
|
|
|
153
153
|
closeMe: () => cadenzaClient.closeMe(),
|
|
154
154
|
getData: async data => {
|
|
155
155
|
const dataType = data.dataType;
|
|
156
|
-
const
|
|
156
|
+
const options = getOptions(data);
|
|
157
|
+
const result = await cadenzaClient.getData(dataType, options);
|
|
157
158
|
if (dataType === 'png') {
|
|
158
159
|
const url = URL.createObjectURL(result);
|
|
159
160
|
iframe.src = url;
|
|
@@ -166,7 +167,9 @@
|
|
|
166
167
|
addSelection: data => cadenzaClient.addSelection(JSON.parse(data.layer), JSON.parse(data.objectIds), { extentStrategy: JSON.parse(data.extentStrategy) }),
|
|
167
168
|
removeSelection: data => cadenzaClient.removeSelection(JSON.parse(data.layer), JSON.parse(data.objectIds), { extentStrategy: JSON.parse(data.extentStrategy) }),
|
|
168
169
|
createGeometry: (data, formData) => cadenzaClient.createGeometry(data.embeddingTargetId, data.geometryType, getOptions(data, formData)),
|
|
169
|
-
editGeometry: (
|
|
170
|
+
editGeometry: (data, formData) => cadenzaClient.editGeometry(data.embeddingTargetId, JSON.parse(data.geometry), getOptions(data, formData)),
|
|
171
|
+
batchCreateGeometry: (data , formData) => cadenzaClient.batchCreateGeometry(data.embeddingTargetId, data.geometryType, getOptions(data, formData)),
|
|
172
|
+
batchEditGeometry: (data, formData) => cadenzaClient.batchEditGeometry(data.embeddingTargetId, JSON.parse(data.features), getOptions(data, formData)),
|
|
170
173
|
selectObjects: data => cadenzaClient.selectObjects(data.embeddingTargetId, getOptions(data)),
|
|
171
174
|
fetchData: data => {
|
|
172
175
|
console.log('Inspect the fetchData() request in the devtools.');
|
|
@@ -215,6 +218,7 @@
|
|
|
215
218
|
function getOptions ({
|
|
216
219
|
additionalLayers,
|
|
217
220
|
disabledUiFeatures,
|
|
221
|
+
dataType,
|
|
218
222
|
distance,
|
|
219
223
|
expandNavigator,
|
|
220
224
|
extentStrategy,
|
|
@@ -222,6 +226,7 @@
|
|
|
222
226
|
fileName,
|
|
223
227
|
filter,
|
|
224
228
|
geometry,
|
|
229
|
+
height,
|
|
225
230
|
hideMainHeaderAndFooter,
|
|
226
231
|
hideWorkbookToolBar,
|
|
227
232
|
highlightGlobalId,
|
|
@@ -235,11 +240,14 @@
|
|
|
235
240
|
snappingLayer,
|
|
236
241
|
useMapSrs,
|
|
237
242
|
layout,
|
|
243
|
+
width,
|
|
244
|
+
withScale,
|
|
238
245
|
}, formData) {
|
|
239
246
|
return {
|
|
240
247
|
additionalLayers: additionalLayers && JSON.parse(additionalLayers),
|
|
241
248
|
buffer: distance ? { value: Number(distance), lengthUnit: lengthUnit ? lengthUnit : 'm' } : undefined,
|
|
242
249
|
...(requestAsPdf === 'on' && { dataType: 'pdf' }),
|
|
250
|
+
dataType: dataType,
|
|
243
251
|
disabledUiFeatures: disabledUiFeatures && disabledUiFeatures.split(','),
|
|
244
252
|
expandNavigator: (expandNavigator === 'on'),
|
|
245
253
|
extentStrategy: extentStrategy && JSON.parse(extentStrategy),
|
|
@@ -247,6 +255,7 @@
|
|
|
247
255
|
filter: filter && parseFilterVariables(filter),
|
|
248
256
|
fullGeometries: fullGeometries === 'on',
|
|
249
257
|
geometry: geometry && JSON.parse(geometry),
|
|
258
|
+
height: Number(height),
|
|
250
259
|
hideMainHeaderAndFooter: (hideMainHeaderAndFooter === 'on'),
|
|
251
260
|
hideWorkbookToolBar: (hideWorkbookToolBar === 'on'),
|
|
252
261
|
highlightGlobalId,
|
|
@@ -261,6 +270,8 @@
|
|
|
261
270
|
}: undefined,
|
|
262
271
|
useMapSrs: useMapSrs === 'on',
|
|
263
272
|
layout: layout || undefined,
|
|
273
|
+
width: Number(width),
|
|
274
|
+
withScale: Boolean(withScale),
|
|
264
275
|
};
|
|
265
276
|
}
|
|
266
277
|
|
|
@@ -292,18 +303,20 @@
|
|
|
292
303
|
</optgroup>
|
|
293
304
|
<optgroup label="Interact With Shown Content">
|
|
294
305
|
<option value="expandNavigator">Expand Navigator</option>
|
|
295
|
-
<option value="getData"
|
|
296
|
-
<option value="setFilter"
|
|
297
|
-
<option value="setLayerVisibility"
|
|
298
|
-
<option value="setSelection"
|
|
299
|
-
<option value="addSelection"
|
|
300
|
-
<option value="removeSelection"
|
|
306
|
+
<option value="getData">Get Data (Get Map Image)</option>
|
|
307
|
+
<option value="setFilter">Set Filter</option>
|
|
308
|
+
<option value="setLayerVisibility">Set Layer Visibility</option>
|
|
309
|
+
<option value="setSelection">Set Selection</option>
|
|
310
|
+
<option value="addSelection">Add Selection</option>
|
|
311
|
+
<option value="removeSelection">Remove Selection</option>
|
|
301
312
|
<option value="reload">Reload worksheet views</option>
|
|
302
313
|
<option value="closeMe">Close me</option>
|
|
303
314
|
</optgroup>
|
|
304
315
|
<optgroup label="Map Dialogs">
|
|
305
316
|
<option value="createGeometry">Create Geometry</option>
|
|
306
317
|
<option value="editGeometry">Edit Geometry</option>
|
|
318
|
+
<option value="batchCreateGeometry">Batch Create Geometry</option>
|
|
319
|
+
<option value="batchEditGeometry">Batch Edit Geometry</option>
|
|
307
320
|
<option value="selectObjects">Select Objects</option>
|
|
308
321
|
<option value="setCustomValidity">Set Custom Validity</option>
|
|
309
322
|
</optgroup>
|
|
@@ -387,6 +400,9 @@
|
|
|
387
400
|
<li>workbook-design</li>
|
|
388
401
|
<li>workbook-map-add-layer</li>
|
|
389
402
|
<li>workbook-view-management</li>
|
|
403
|
+
<li>embedded-dialog-footer-buttons</li>
|
|
404
|
+
<li>embedded-dialog-apply-button</li>
|
|
405
|
+
<li>embedded-dialog-cancel-button</li>
|
|
390
406
|
</ul>
|
|
391
407
|
</small>
|
|
392
408
|
</div>
|
|
@@ -529,35 +545,14 @@
|
|
|
529
545
|
|
|
530
546
|
<template data-action="setFilter" data-common="filter"></template>
|
|
531
547
|
|
|
532
|
-
<template data-action="createGeometry" data-common="additionalLayers,extentStrategy,map,snapping,disabledUiFeatures,filter">
|
|
548
|
+
<template data-action="createGeometry" data-common="geometryType,simplifiedOperationMode,minimumScale,additionalLayers,extentStrategy,map,snapping,disabledUiFeatures,filter">
|
|
533
549
|
<div>
|
|
534
550
|
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
535
551
|
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
536
552
|
</div>
|
|
537
|
-
<div>
|
|
538
|
-
<label for="geometryType">Geometry type</label>
|
|
539
|
-
<select name="geometryType" id="geometryType">
|
|
540
|
-
<option>Point</option>
|
|
541
|
-
<option>MultiPoint</option>
|
|
542
|
-
<option>LineString</option>
|
|
543
|
-
<option>MultiLineString</option>
|
|
544
|
-
<option>Polygon</option>
|
|
545
|
-
<option>MultiPolygon</option>
|
|
546
|
-
</select>
|
|
547
|
-
</div>
|
|
548
|
-
<div>
|
|
549
|
-
<label>
|
|
550
|
-
<input type="checkbox" name="simplifiedOperationMode">
|
|
551
|
-
Simplified operation mode
|
|
552
|
-
</label>
|
|
553
|
-
</div>
|
|
554
|
-
<div>
|
|
555
|
-
<label for="minScale">Minimum Scale</label>
|
|
556
|
-
<input type="number" name="minScale" id="minScale">
|
|
557
|
-
</div>
|
|
558
553
|
</template>
|
|
559
554
|
|
|
560
|
-
<template data-action="editGeometry" data-common="additionalLayers,extentStrategy,map,snapping,disabledUiFeatures,filter">
|
|
555
|
+
<template data-action="editGeometry" data-common="simplifiedOperationMode,minimumScale,additionalLayers,extentStrategy,map,snapping,disabledUiFeatures,filter">
|
|
561
556
|
<div>
|
|
562
557
|
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
563
558
|
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
@@ -582,15 +577,47 @@
|
|
|
582
577
|
</pre>
|
|
583
578
|
</small>
|
|
584
579
|
</div>
|
|
580
|
+
</template>
|
|
581
|
+
|
|
582
|
+
<template data-action="batchCreateGeometry" data-common="geometryType,simplifiedOperationMode,minimumScale,additionalLayers,extentStrategy,map,snapping,disabledUiFeatures,filter">
|
|
585
583
|
<div>
|
|
586
|
-
<label>
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
584
|
+
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
585
|
+
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
586
|
+
</div>
|
|
587
|
+
</template>
|
|
588
|
+
|
|
589
|
+
<template data-action="batchEditGeometry" data-common="simplifiedOperationMode,minimumScale,additionalLayers,extentStrategy,map,snapping,disabledUiFeatures,filter">
|
|
590
|
+
<div>
|
|
591
|
+
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
592
|
+
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
590
593
|
</div>
|
|
591
594
|
<div>
|
|
592
|
-
<label for="
|
|
593
|
-
<
|
|
595
|
+
<label for="features">Features (GeoJSON)</label>
|
|
596
|
+
<textarea name="features" id="features" rows="10" required></textarea>
|
|
597
|
+
<small>
|
|
598
|
+
<strong>Example:</strong>
|
|
599
|
+
<pre>
|
|
600
|
+
{
|
|
601
|
+
"type":"FeatureCollection",
|
|
602
|
+
"features":[
|
|
603
|
+
{
|
|
604
|
+
"type":"Feature",
|
|
605
|
+
"geometry":{
|
|
606
|
+
"coordinates":[
|
|
607
|
+
[
|
|
608
|
+
[7.96,47.93],
|
|
609
|
+
[7.90,47.64],
|
|
610
|
+
[8.31,47.70],
|
|
611
|
+
[7.96,47.93]
|
|
612
|
+
]
|
|
613
|
+
],
|
|
614
|
+
"type":"Polygon"
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
]
|
|
618
|
+
}
|
|
619
|
+
</pre>
|
|
620
|
+
</small>
|
|
594
621
|
</div>
|
|
595
622
|
</template>
|
|
596
623
|
|
|
@@ -630,17 +657,11 @@
|
|
|
630
657
|
</div>
|
|
631
658
|
</template>
|
|
632
659
|
|
|
633
|
-
<template data-action="selectObjects" data-common="extentStrategy,map,filter">
|
|
660
|
+
<template data-action="selectObjects" data-common="extentStrategy,map,disabledUiFeatures,filter">
|
|
634
661
|
<div>
|
|
635
662
|
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
636
663
|
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
637
664
|
</div>
|
|
638
|
-
<div>
|
|
639
|
-
<label>
|
|
640
|
-
<input type="checkbox" name="simplifiedOperationMode">
|
|
641
|
-
Simplified operation mode
|
|
642
|
-
</label>
|
|
643
|
-
</div>
|
|
644
665
|
<div>
|
|
645
666
|
<label for="layers">Layers</label>
|
|
646
667
|
<input name="layers" id="layers">
|
|
@@ -676,6 +697,36 @@
|
|
|
676
697
|
</template>
|
|
677
698
|
<template data-action="closeMe">No Parameters needed.</template>
|
|
678
699
|
|
|
700
|
+
<template id="common-geometryType">
|
|
701
|
+
<div>
|
|
702
|
+
<label for="geometryType">Geometry type</label>
|
|
703
|
+
<select name="geometryType" id="geometryType">
|
|
704
|
+
<option>Point</option>
|
|
705
|
+
<option>MultiPoint</option>
|
|
706
|
+
<option>LineString</option>
|
|
707
|
+
<option>MultiLineString</option>
|
|
708
|
+
<option>Polygon</option>
|
|
709
|
+
<option>MultiPolygon</option>
|
|
710
|
+
</select>
|
|
711
|
+
</div>
|
|
712
|
+
</template>
|
|
713
|
+
|
|
714
|
+
<template id="common-simplifiedOperationMode">
|
|
715
|
+
<div>
|
|
716
|
+
<label>
|
|
717
|
+
<input type="checkbox" name="simplifiedOperationMode">
|
|
718
|
+
Simplified operation mode
|
|
719
|
+
</label>
|
|
720
|
+
</div>
|
|
721
|
+
</template>
|
|
722
|
+
|
|
723
|
+
<template id="common-minimumScale">
|
|
724
|
+
<div>
|
|
725
|
+
<label for="minScale">Minimum Scale</label>
|
|
726
|
+
<input type="number" name="minScale" id="minScale">
|
|
727
|
+
</div>
|
|
728
|
+
</template>
|
|
729
|
+
|
|
679
730
|
<template id="common-object-ids">
|
|
680
731
|
<div>
|
|
681
732
|
<label for="objectids">List of object ID value lists *</label>
|
|
@@ -898,6 +949,16 @@
|
|
|
898
949
|
<small>
|
|
899
950
|
<p>Currently, only <code>dataType=png</code> is supported to get the image of the currently shown workbook map view.</p>
|
|
900
951
|
</small>
|
|
952
|
+
<hr>
|
|
953
|
+
<label for="width">Width</label>
|
|
954
|
+
<input name="width" id="width" type="number" min="0">
|
|
955
|
+
<label for="height">Height</label>
|
|
956
|
+
<input name="height" id="height" type="number" min="0">
|
|
957
|
+
<hr>
|
|
958
|
+
<label for="withScale">
|
|
959
|
+
<input name="withScale" id="withScale" type="checkbox" >
|
|
960
|
+
Include scale
|
|
961
|
+
</label>
|
|
901
962
|
</div>
|
|
902
963
|
</template>
|
|
903
964
|
|