@disy/cadenza.js 10.5.0 → 10.5.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 +10 -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 +31 -24
- package/apidoc/classes/CadenzaError.html +5 -5
- package/apidoc/functions/cadenza.html +4 -4
- package/apidoc/index.html +20 -9
- package/apidoc/interfaces/AreaIntersectionsResult.html +4 -4
- package/apidoc/interfaces/CadenzaClientOptions.html +6 -6
- package/apidoc/interfaces/CadenzaEvent.html +4 -4
- package/apidoc/interfaces/CommonEditGeometryOptions.html +12 -12
- 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/ProblemDetails.html +6 -6
- 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/CadenzaEditGeometryCreateEvent.html +2 -0
- package/apidoc/types/CadenzaEditGeometryDeleteEvent.html +2 -0
- package/apidoc/types/CadenzaEditGeometryEditEvent.html +2 -0
- 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/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/apidoc/types/WorksheetPlaceholders.html +2 -0
- package/cadenza.d.ts +36 -4
- package/cadenza.js +38 -6
- package/package.json +1 -1
- package/sandbox.html +33 -6
package/package.json
CHANGED
package/sandbox.html
CHANGED
|
@@ -190,11 +190,17 @@
|
|
|
190
190
|
};
|
|
191
191
|
|
|
192
192
|
const form = document.getElementById('form');
|
|
193
|
-
|
|
193
|
+
const submitButton = document.getElementById('submit');
|
|
194
|
+
form.onsubmit = async (event) => {
|
|
194
195
|
event.preventDefault();
|
|
195
196
|
const formData = new FormData(form);
|
|
196
197
|
const { action, ...data } = Object.fromEntries(formData);
|
|
197
|
-
|
|
198
|
+
try {
|
|
199
|
+
submitButton.disabled = true;
|
|
200
|
+
await actionHandlers[action](data, formData);
|
|
201
|
+
} finally {
|
|
202
|
+
submitButton.disabled = false;
|
|
203
|
+
}
|
|
198
204
|
localStorage.setItem(`cadenzajs-sandbox-${action}`, JSON.stringify(data));
|
|
199
205
|
};
|
|
200
206
|
|
|
@@ -244,12 +250,12 @@
|
|
|
244
250
|
layout,
|
|
245
251
|
width,
|
|
246
252
|
withScale,
|
|
253
|
+
worksheetPlaceholders
|
|
247
254
|
}, formData) {
|
|
248
255
|
return {
|
|
249
256
|
additionalLayers: additionalLayers && JSON.parse(additionalLayers),
|
|
250
257
|
buffer: distance ? { value: Number(distance), lengthUnit: lengthUnit ? lengthUnit : 'm' } : undefined,
|
|
251
|
-
|
|
252
|
-
dataType: dataType,
|
|
258
|
+
dataType: dataType ?? (requestAsPdf === 'on' ? 'pdf' : undefined),
|
|
253
259
|
disabledUiFeatures: disabledUiFeatures && disabledUiFeatures.split(','),
|
|
254
260
|
expandNavigator: (expandNavigator === 'on'),
|
|
255
261
|
extentStrategy: extentStrategy && JSON.parse(extentStrategy),
|
|
@@ -276,6 +282,7 @@
|
|
|
276
282
|
layout: layout || undefined,
|
|
277
283
|
width: Number(width),
|
|
278
284
|
withScale: Boolean(withScale),
|
|
285
|
+
worksheetPlaceholders: (worksheetPlaceholders && JSON.parse(worksheetPlaceholders.trim())) || undefined,
|
|
279
286
|
};
|
|
280
287
|
}
|
|
281
288
|
|
|
@@ -333,7 +340,7 @@
|
|
|
333
340
|
</select>
|
|
334
341
|
</div>
|
|
335
342
|
|
|
336
|
-
<button>Go!</button>
|
|
343
|
+
<button id="submit">Go!</button>
|
|
337
344
|
</div>
|
|
338
345
|
|
|
339
346
|
<fieldset id="settings"></fieldset>
|
|
@@ -412,6 +419,26 @@
|
|
|
412
419
|
</div>
|
|
413
420
|
</template>
|
|
414
421
|
|
|
422
|
+
<template id="common-worksheetPlaceholders">
|
|
423
|
+
<div>
|
|
424
|
+
<label for="worksheetPlaceholders">Worksheet placeholder IDs</label>
|
|
425
|
+
<textarea name="worksheetPlaceholders" id="worksheetPlaceholders" rows="5"></textarea>
|
|
426
|
+
<small>
|
|
427
|
+
<p>A JSON object with a mapping of (placeholderId -> worksheetPrintName).
|
|
428
|
+
Placeholder ID is defined in the worksheet placeholder element in the report template.
|
|
429
|
+
The placeholders are then replaced with worksheet elements.</p>
|
|
430
|
+
<p>Example:</p>
|
|
431
|
+
<pre>
|
|
432
|
+
{
|
|
433
|
+
"first": "Informationen zur Arbeitsmappe",
|
|
434
|
+
"second": "Häufigkeit der Messungen"
|
|
435
|
+
}
|
|
436
|
+
</pre>
|
|
437
|
+
</small>
|
|
438
|
+
|
|
439
|
+
</div>
|
|
440
|
+
</template>
|
|
441
|
+
|
|
415
442
|
<template id="common-filter">
|
|
416
443
|
<div>
|
|
417
444
|
<label for="filter">Filter</label>
|
|
@@ -490,7 +517,7 @@
|
|
|
490
517
|
</div>
|
|
491
518
|
</template>
|
|
492
519
|
|
|
493
|
-
<template data-action="show" data-common="showWorkbook,disabledUiFeatures,filter,show">
|
|
520
|
+
<template data-action="show" data-common="showWorkbook,disabledUiFeatures,worksheetPlaceholders,filter,show">
|
|
494
521
|
<div>
|
|
495
522
|
<label for="embeddingTargetId">Embedding target ID *</label>
|
|
496
523
|
<input name="embeddingTargetId" id="embeddingTargetId" required>
|