@disy/cadenza.js 10.4.1 → 10.4.2
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 +9 -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 +67 -71
- package/apidoc/classes/CadenzaError.html +5 -5
- package/apidoc/functions/cadenza.html +4 -4
- package/apidoc/index.html +9 -16
- 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 +2 -2
- package/apidoc/types/WorkbookLayerPath.html +2 -2
- package/cadenza.d.ts +88 -67
- package/cadenza.js +166 -78
- package/package.json +1 -1
- package/sandbox.html +98 -40
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,7 +303,7 @@
|
|
|
292
303
|
</optgroup>
|
|
293
304
|
<optgroup label="Interact With Shown Content">
|
|
294
305
|
<option value="expandNavigator">Expand Navigator</option>
|
|
295
|
-
<option value="getData"
|
|
306
|
+
<option value="getData">Get Data (Get Map Image)</option>
|
|
296
307
|
<option value="setFilter" class="unpublished">Set Filter</option>
|
|
297
308
|
<option value="setLayerVisibility" class="unpublished">Set Layer Visibility</option>
|
|
298
309
|
<option value="setSelection" class="unpublished">Set Selection</option>
|
|
@@ -304,6 +315,8 @@
|
|
|
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>
|
|
@@ -529,35 +542,14 @@
|
|
|
529
542
|
|
|
530
543
|
<template data-action="setFilter" data-common="filter"></template>
|
|
531
544
|
|
|
532
|
-
<template data-action="createGeometry" data-common="additionalLayers,extentStrategy,map,snapping,disabledUiFeatures,filter">
|
|
545
|
+
<template data-action="createGeometry" data-common="geometryType,simplifiedOperationMode,minimumScale,additionalLayers,extentStrategy,map,snapping,disabledUiFeatures,filter">
|
|
533
546
|
<div>
|
|
534
547
|
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
535
548
|
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
536
549
|
</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
550
|
</template>
|
|
559
551
|
|
|
560
|
-
<template data-action="editGeometry" data-common="additionalLayers,extentStrategy,map,snapping,disabledUiFeatures,filter">
|
|
552
|
+
<template data-action="editGeometry" data-common="simplifiedOperationMode,minimumScale,additionalLayers,extentStrategy,map,snapping,disabledUiFeatures,filter">
|
|
561
553
|
<div>
|
|
562
554
|
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
563
555
|
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
@@ -582,15 +574,47 @@
|
|
|
582
574
|
</pre>
|
|
583
575
|
</small>
|
|
584
576
|
</div>
|
|
577
|
+
</template>
|
|
578
|
+
|
|
579
|
+
<template data-action="batchCreateGeometry" data-common="geometryType,simplifiedOperationMode,minimumScale,additionalLayers,extentStrategy,map,snapping,disabledUiFeatures,filter">
|
|
585
580
|
<div>
|
|
586
|
-
<label>
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
581
|
+
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
582
|
+
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
583
|
+
</div>
|
|
584
|
+
</template>
|
|
585
|
+
|
|
586
|
+
<template data-action="batchEditGeometry" data-common="simplifiedOperationMode,minimumScale,additionalLayers,extentStrategy,map,snapping,disabledUiFeatures,filter">
|
|
587
|
+
<div>
|
|
588
|
+
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
589
|
+
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
590
590
|
</div>
|
|
591
591
|
<div>
|
|
592
|
-
<label for="
|
|
593
|
-
<
|
|
592
|
+
<label for="features">Features (GeoJSON)</label>
|
|
593
|
+
<textarea name="features" id="features" rows="10" required></textarea>
|
|
594
|
+
<small>
|
|
595
|
+
<strong>Example:</strong>
|
|
596
|
+
<pre>
|
|
597
|
+
{
|
|
598
|
+
"type":"FeatureCollection",
|
|
599
|
+
"features":[
|
|
600
|
+
{
|
|
601
|
+
"type":"Feature",
|
|
602
|
+
"geometry":{
|
|
603
|
+
"coordinates":[
|
|
604
|
+
[
|
|
605
|
+
[7.96,47.93],
|
|
606
|
+
[7.90,47.64],
|
|
607
|
+
[8.31,47.70],
|
|
608
|
+
[7.96,47.93]
|
|
609
|
+
]
|
|
610
|
+
],
|
|
611
|
+
"type":"Polygon"
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
]
|
|
615
|
+
}
|
|
616
|
+
</pre>
|
|
617
|
+
</small>
|
|
594
618
|
</div>
|
|
595
619
|
</template>
|
|
596
620
|
|
|
@@ -630,17 +654,11 @@
|
|
|
630
654
|
</div>
|
|
631
655
|
</template>
|
|
632
656
|
|
|
633
|
-
<template data-action="selectObjects" data-common="extentStrategy,map,filter">
|
|
657
|
+
<template data-action="selectObjects" data-common="simplifiedOperationMode,extentStrategy,map,filter">
|
|
634
658
|
<div>
|
|
635
659
|
<label for="embeddingTargetId">Embedding target ID of the map view *</label>
|
|
636
660
|
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
637
661
|
</div>
|
|
638
|
-
<div>
|
|
639
|
-
<label>
|
|
640
|
-
<input type="checkbox" name="simplifiedOperationMode">
|
|
641
|
-
Simplified operation mode
|
|
642
|
-
</label>
|
|
643
|
-
</div>
|
|
644
662
|
<div>
|
|
645
663
|
<label for="layers">Layers</label>
|
|
646
664
|
<input name="layers" id="layers">
|
|
@@ -676,6 +694,36 @@
|
|
|
676
694
|
</template>
|
|
677
695
|
<template data-action="closeMe">No Parameters needed.</template>
|
|
678
696
|
|
|
697
|
+
<template id="common-geometryType">
|
|
698
|
+
<div>
|
|
699
|
+
<label for="geometryType">Geometry type</label>
|
|
700
|
+
<select name="geometryType" id="geometryType">
|
|
701
|
+
<option>Point</option>
|
|
702
|
+
<option>MultiPoint</option>
|
|
703
|
+
<option>LineString</option>
|
|
704
|
+
<option>MultiLineString</option>
|
|
705
|
+
<option>Polygon</option>
|
|
706
|
+
<option>MultiPolygon</option>
|
|
707
|
+
</select>
|
|
708
|
+
</div>
|
|
709
|
+
</template>
|
|
710
|
+
|
|
711
|
+
<template id="common-simplifiedOperationMode">
|
|
712
|
+
<div>
|
|
713
|
+
<label>
|
|
714
|
+
<input type="checkbox" name="simplifiedOperationMode">
|
|
715
|
+
Simplified operation mode
|
|
716
|
+
</label>
|
|
717
|
+
</div>
|
|
718
|
+
</template>
|
|
719
|
+
|
|
720
|
+
<template id="common-minimumScale">
|
|
721
|
+
<div>
|
|
722
|
+
<label for="minScale">Minimum Scale</label>
|
|
723
|
+
<input type="number" name="minScale" id="minScale">
|
|
724
|
+
</div>
|
|
725
|
+
</template>
|
|
726
|
+
|
|
679
727
|
<template id="common-object-ids">
|
|
680
728
|
<div>
|
|
681
729
|
<label for="objectids">List of object ID value lists *</label>
|
|
@@ -898,6 +946,16 @@
|
|
|
898
946
|
<small>
|
|
899
947
|
<p>Currently, only <code>dataType=png</code> is supported to get the image of the currently shown workbook map view.</p>
|
|
900
948
|
</small>
|
|
949
|
+
<hr>
|
|
950
|
+
<label for="width">Width</label>
|
|
951
|
+
<input name="width" id="width" type="number" min="0">
|
|
952
|
+
<label for="height">Height</label>
|
|
953
|
+
<input name="height" id="height" type="number" min="0">
|
|
954
|
+
<hr>
|
|
955
|
+
<label for="withScale">
|
|
956
|
+
<input name="withScale" id="withScale" type="checkbox" >
|
|
957
|
+
Include scale
|
|
958
|
+
</label>
|
|
901
959
|
</div>
|
|
902
960
|
</template>
|
|
903
961
|
|