@disy/cadenza.js 2.14.0 → 10.2.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 -4
- package/apidoc/assets/highlight.css +30 -23
- 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 +23 -31
- package/apidoc/classes/CadenzaError.html +5 -5
- package/apidoc/functions/cadenza.html +3 -3
- package/apidoc/index.html +35 -33
- package/apidoc/interfaces/CadenzaClientOptions.html +5 -5
- package/apidoc/interfaces/CadenzaEvent.html +4 -4
- package/apidoc/interfaces/Distance.html +2 -2
- package/apidoc/interfaces/ExternalLinkKey.html +5 -5
- package/apidoc/interfaces/Feature.html +7 -7
- package/apidoc/interfaces/FeatureCollection.html +3 -3
- package/apidoc/interfaces/Geometry.html +3 -3
- package/apidoc/interfaces/GeometryZoomTarget.html +3 -3
- package/apidoc/interfaces/PageSource.html +3 -3
- package/apidoc/modules.html +2 -3
- 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/CadenzaSelectObjectsCancelEvent.html +2 -2
- package/apidoc/types/CadenzaSelectObjectsOkEvent.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/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 +2 -2
- package/apidoc/types/OperationMode.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/ZoomTarget.html +2 -2
- package/cadenza.d.ts +0 -14
- package/cadenza.js +0 -14
- package/package.json +1 -1
- package/sandbox.html +1 -17
- package/apidoc/types/CustomValidityType.html +0 -2
package/cadenza.js
CHANGED
|
@@ -147,7 +147,6 @@ globalThis.cadenza = Object.assign((/** @type Parameters<cadenza> */ ...args) =>
|
|
|
147
147
|
* @typedef FeatureCollection - A adapted [GeoJSON](https://geojson.org/) feature collection object
|
|
148
148
|
* @property {Feature[]} features - The features within this collection
|
|
149
149
|
*/
|
|
150
|
-
/** @typedef {'error'|'warning'|'info'|'success'} CustomValidityType - The type of custom validity used for disclose on visual presentation and form submission behavior */
|
|
151
150
|
let hasCadenzaSession = false;
|
|
152
151
|
/** @type {Promise<void> | undefined} */
|
|
153
152
|
let firstEmbeddingTargetShown;
|
|
@@ -539,19 +538,6 @@ export class CadenzaClient {
|
|
|
539
538
|
});
|
|
540
539
|
}
|
|
541
540
|
}
|
|
542
|
-
/**
|
|
543
|
-
* Set custom validity state of the geometry editor in addition to the default validation state (including errors and
|
|
544
|
-
* warnings). When set to error the dialog submission is blocked.
|
|
545
|
-
* If there already is a custom state set it will override it.
|
|
546
|
-
* Passing '' will reset the custom state to undefined, meaning no custom state is displayed.
|
|
547
|
-
* If no geometry editing is started, the method call has no effect.
|
|
548
|
-
* @param {string} message The message to show in the dialog
|
|
549
|
-
* @param {CustomValidityType} [type] The type of message (defaults to 'error')
|
|
550
|
-
*/
|
|
551
|
-
setCustomValidity(message, type = 'error') {
|
|
552
|
-
assert(['error', 'warning', 'info', 'success'].includes(type), `Invalid validity type: ${type}`);
|
|
553
|
-
this.#postEvent('setCustomValidity', { message, type });
|
|
554
|
-
}
|
|
555
541
|
/**
|
|
556
542
|
* Select objects in a workbook map.
|
|
557
543
|
*
|
package/package.json
CHANGED
package/sandbox.html
CHANGED
|
@@ -181,8 +181,7 @@
|
|
|
181
181
|
cadenzaClient.fetchAreaIntersections(data.embeddingTargetId, JSON.parse(data.layer), JSON.parse(data.geometry), getOptions(data))
|
|
182
182
|
.then(console.log);
|
|
183
183
|
},
|
|
184
|
-
downloadData: data => cadenzaClient.downloadData(data.embeddingTargetId, data.dataType, getOptions(data))
|
|
185
|
-
setCustomValidity: data => cadenzaClient.setCustomValidity(data.message, data.type || undefined)
|
|
184
|
+
downloadData: data => cadenzaClient.downloadData(data.embeddingTargetId, data.dataType, getOptions(data))
|
|
186
185
|
};
|
|
187
186
|
|
|
188
187
|
const form = document.getElementById('form');
|
|
@@ -298,7 +297,6 @@
|
|
|
298
297
|
<option value="createGeometry">Create Geometry</option>
|
|
299
298
|
<option value="editGeometry">Edit Geometry</option>
|
|
300
299
|
<option value="selectObjects">Select Objects</option>
|
|
301
|
-
<option value="setCustomValidity">Set Custom Validity</option>
|
|
302
300
|
</optgroup>
|
|
303
301
|
<optgroup label="Without Iframe">
|
|
304
302
|
<option value="downloadData">Download data</option>
|
|
@@ -474,20 +472,6 @@
|
|
|
474
472
|
</div>
|
|
475
473
|
</template>
|
|
476
474
|
|
|
477
|
-
<template data-action="setCustomValidity">
|
|
478
|
-
<p>Requires a geometry editing UI (Create / Edit Geometry actions) to be opened first.</p>
|
|
479
|
-
<label for="message">Message</label>
|
|
480
|
-
<input type="text" name="message" id="message">
|
|
481
|
-
<label for="type">Type</label>
|
|
482
|
-
<select name="type" id="type">
|
|
483
|
-
<option selected></option>
|
|
484
|
-
<option>success</option>
|
|
485
|
-
<option>info</option>
|
|
486
|
-
<option>warning</option>
|
|
487
|
-
<option>error</option>
|
|
488
|
-
</select>
|
|
489
|
-
</template>
|
|
490
|
-
|
|
491
475
|
<template data-action="setFilter" data-common="filter"></template>
|
|
492
476
|
|
|
493
477
|
<template data-action="createGeometry" data-common="map,filter">
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CustomValidityType | Cadenza JS - v2.13.1</title><meta name="description" content="Documentation for Cadenza JS"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"><a href="https://github.com/DisyInformationssysteme/cadenza.js">Cadenza JS on GitHub</a></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Cadenza JS - v2.13.1</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">Cadenza JS</a></li><li><a href="CustomValidityType.html">CustomValidityType</a></li></ul><h1>Type alias CustomValidityType</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Custom<wbr/>Validity<wbr/>Type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"error"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"warning"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"info"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"success"</span></div><div class="tsd-comment tsd-typography"><p>The type of custom validity used for disclose on visual presentation and form submission behavior</p>
|
|
2
|
-
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/DisyInformationssysteme/cadenza.js/blob/8d953e8af088d432939378ac9bfa81892ef0615e/src/cadenza.js#L165">src/cadenza.js:165</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>Cadenza JS - v2.13.1</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|