@disy/cadenza.js 2.8.1 → 2.8.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 +8 -0
- package/apidoc/assets/navigation.js +1 -1
- package/apidoc/assets/search.js +1 -1
- package/apidoc/classes/AbortError.html +2 -2
- package/apidoc/classes/CadenzaClient.html +29 -20
- package/apidoc/classes/CadenzaError.html +3 -3
- package/apidoc/functions/cadenza.html +2 -2
- package/apidoc/index.html +5 -1
- package/apidoc/interfaces/CadenzaClientOptions.html +5 -5
- package/apidoc/interfaces/CadenzaEvent.html +3 -3
- package/apidoc/interfaces/ExternalLinkKey.html +3 -3
- package/apidoc/interfaces/Feature.html +12 -0
- package/apidoc/interfaces/FeatureCollection.html +4 -0
- package/apidoc/interfaces/Geometry.html +2 -2
- package/apidoc/interfaces/PageSource.html +2 -2
- package/apidoc/modules.html +3 -0
- package/apidoc/types/CadenzaChangeSelectionEvent.html +1 -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 +2 -2
- package/apidoc/types/CadenzaObjectInfoEvent.html +1 -1
- package/apidoc/types/CadenzaReloadEvent.html +5 -0
- package/apidoc/types/CadenzaSelectObjectsCancelEvent.html +1 -1
- package/apidoc/types/CadenzaSelectObjectsOkEvent.html +1 -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 +80 -8
- package/cadenza.js +65 -5
- package/package.json +1 -1
- package/sandbox.html +39 -12
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
You don't need to <em>actually</em> add that <code>__type</code> property. In TS code, just use a
|
|
4
4
|
<a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions">type assertion</a>
|
|
5
5
|
(e.g. <code>cadenzaClient.show('{embeddingTargetId}' as EmbeddingTargetId)</code>).</p>
|
|
6
|
-
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">__type</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="OpaqueString.html#T">T</a></h5></li></ul></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/
|
|
6
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"></div></li></ul></section><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">__type</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="OpaqueString.html#T">T</a></h5></li></ul></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/3906bb8b0a6b998de8cdc9c74192aaaef36af077/src/cadenza.js#L59">src/cadenza.js:59</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</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>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>OperationMode | Cadenza JS</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</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="OperationMode.html">OperationMode</a></li></ul><h1>Type alias OperationMode</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Operation<wbr/>Mode</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"normal"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"simplified"</span></div><div class="tsd-comment tsd-typography"><p>The mode in which a workbook should be operated</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/
|
|
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/3906bb8b0a6b998de8cdc9c74192aaaef36af077/src/cadenza.js#L102">src/cadenza.js:102</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</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>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>TablePart | Cadenza JS</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</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="TablePart.html">TablePart</a></li></ul><h1>Type alias TablePart</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Table<wbr/>Part</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"columns"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"values"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"totals"</span></div><div class="tsd-comment tsd-typography"><p>A part of a table to export</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/
|
|
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/3906bb8b0a6b998de8cdc9c74192aaaef36af077/src/cadenza.js#L127">src/cadenza.js:127</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</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>
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
<li><code>"workbook-design"</code> - The workbook designer</li>
|
|
5
5
|
<li><code>"workbook-view-management"</code> - Add/Edit/Remove workbook views (Is included in 'workbook-design'.)</li>
|
|
6
6
|
</ul>
|
|
7
|
-
</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/
|
|
7
|
+
</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/3906bb8b0a6b998de8cdc9c74192aaaef36af077/src/cadenza.js#L104">src/cadenza.js:104</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</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>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>WorkbookLayerPath | Cadenza JS</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</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="WorkbookLayerPath.html">WorkbookLayerPath</a></li></ul><h1>Type alias WorkbookLayerPath</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Workbook<wbr/>Layer<wbr/>Path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><div class="tsd-comment tsd-typography"><p>Identifies a layer within a workbook map view
|
|
2
2
|
using the print names of the layer and - if the layer is grouped - its ancestors</p>
|
|
3
|
-
</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/
|
|
3
|
+
</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/3906bb8b0a6b998de8cdc9c74192aaaef36af077/src/cadenza.js#L93">src/cadenza.js:93</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</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>
|
package/cadenza.d.ts
CHANGED
|
@@ -148,28 +148,28 @@ export class CadenzaClient {
|
|
|
148
148
|
*
|
|
149
149
|
* @hidden
|
|
150
150
|
* @param {WorkbookLayerPath | string} layer - The data view layer to set the selection in
|
|
151
|
-
* @param {unknown[]} values - The IDs of the objects to select
|
|
151
|
+
* @param {unknown[][]} values - The IDs of the objects to select
|
|
152
152
|
* @return {Promise<void>} A `Promise` for when the selection was set.
|
|
153
153
|
*/
|
|
154
|
-
setSelection(layer: WorkbookLayerPath | string, values: unknown[], ...args: any[]): Promise<void>;
|
|
154
|
+
setSelection(layer: WorkbookLayerPath | string, values: unknown[][], ...args: any[]): Promise<void>;
|
|
155
155
|
/**
|
|
156
156
|
* Add to the selection in the currently shown workbook map view.
|
|
157
157
|
*
|
|
158
158
|
* @hidden
|
|
159
159
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
160
|
-
* @param {unknown[]} values - The IDs of the objects to select
|
|
160
|
+
* @param {unknown[][]} values - The IDs of the objects to select
|
|
161
161
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
162
162
|
*/
|
|
163
|
-
addSelection(layer: WorkbookLayerPath | string, values: unknown[], ...args: any[]): Promise<void>;
|
|
163
|
+
addSelection(layer: WorkbookLayerPath | string, values: unknown[][], ...args: any[]): Promise<void>;
|
|
164
164
|
/**
|
|
165
165
|
* Remove from the selection in the currently shown workbook map view.
|
|
166
166
|
*
|
|
167
167
|
* @hidden
|
|
168
168
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
169
|
-
* @param {unknown[]} values - The IDs of the objects to unselect
|
|
169
|
+
* @param {unknown[][]} values - The IDs of the objects to unselect
|
|
170
170
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
171
171
|
*/
|
|
172
|
-
removeSelection(layer: WorkbookLayerPath | string, values: unknown[], ...args: any[]): Promise<void>;
|
|
172
|
+
removeSelection(layer: WorkbookLayerPath | string, values: unknown[][], ...args: any[]): Promise<void>;
|
|
173
173
|
/**
|
|
174
174
|
* Create a geometry.
|
|
175
175
|
*
|
|
@@ -289,6 +289,27 @@ export class CadenzaClient {
|
|
|
289
289
|
parts?: TablePart[] | undefined;
|
|
290
290
|
signal?: AbortSignal | undefined;
|
|
291
291
|
} | undefined, ...args: any[]): Promise<Response>;
|
|
292
|
+
/**
|
|
293
|
+
* Fetch object info from a workbook map view.
|
|
294
|
+
*
|
|
295
|
+
* @param {EmbeddingTargetId} source - The workbook view to fetch object info from.
|
|
296
|
+
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
297
|
+
* (identified using layer paths or print names)
|
|
298
|
+
* @param {unknown[][]} objectIds - The IDs of the objects to select
|
|
299
|
+
* @param {object} [options] - Options
|
|
300
|
+
* @param {FilterVariables} [options.filter] - Filter variables
|
|
301
|
+
* @param {AbortSignal} [options.signal] - A signal to abort the data fetching
|
|
302
|
+
* @param {Boolean} [options.useMapSrs] - Use the map SRS instead of WGS84
|
|
303
|
+
* @param {Boolean} [options.fullGeometries] - Return non-simplified geometries
|
|
304
|
+
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
305
|
+
* @throws For invalid arguments
|
|
306
|
+
*/
|
|
307
|
+
fetchObjectInfo(source: EmbeddingTargetId, layerPath: (WorkbookLayerPath | string)[], objectIds: unknown[][], { filter, signal, useMapSrs, fullGeometries }?: {
|
|
308
|
+
filter?: FilterVariables | undefined;
|
|
309
|
+
signal?: AbortSignal | undefined;
|
|
310
|
+
useMapSrs?: boolean | undefined;
|
|
311
|
+
fullGeometries?: boolean | undefined;
|
|
312
|
+
} | undefined, ...args: any[]): Promise<FeatureCollection>;
|
|
292
313
|
/**
|
|
293
314
|
* Download data from a workbook view.
|
|
294
315
|
*
|
|
@@ -333,6 +354,7 @@ export class CadenzaClient {
|
|
|
333
354
|
* | 'objectInfo'
|
|
334
355
|
* | 'selectObjects:ok'
|
|
335
356
|
* | 'selectObjects:cancel'
|
|
357
|
+
* | 'reload'
|
|
336
358
|
* } CadenzaEventType - An event type to subscribe to using {@link CadenzaClient#on}
|
|
337
359
|
*/
|
|
338
360
|
/**
|
|
@@ -345,6 +367,7 @@ export class CadenzaClient {
|
|
|
345
367
|
* : T extends 'objectInfo' ? CadenzaObjectInfoEvent
|
|
346
368
|
* : T extends 'selectObjects:ok' ? CadenzaSelectObjectsOkEvent
|
|
347
369
|
* : T extends 'selectObjects:cancel' ? CadenzaSelectObjectsCancelEvent
|
|
370
|
+
* : T extends 'reload' ? CadenzaReloadEvent
|
|
348
371
|
* : never
|
|
349
372
|
* } CadenzaEventByType
|
|
350
373
|
*/
|
|
@@ -380,6 +403,13 @@ export class CadenzaClient {
|
|
|
380
403
|
* For a selection in a workbook map view with activated feature info, the values also include the simplified geometries of the selected objects.
|
|
381
404
|
*/
|
|
382
405
|
/** @typedef {CadenzaEvent<'selectObjects:cancel'>} CadenzaSelectObjectsCancelEvent - When the user cancelled the selection. */
|
|
406
|
+
/**
|
|
407
|
+
* @typedef {CadenzaEvent<'reload'>} CadenzaReloadEvent - When the user clicked on the 'reload' button in the embedding standby page
|
|
408
|
+
*
|
|
409
|
+
* If a user does not interact with the iframe displaying the Cadenza content for a while, a standby embed page is displayed
|
|
410
|
+
* and the user can click a reload button there. Then the application using Cadenza JS can re-trigger the loading of the iframe
|
|
411
|
+
* with the correct original URL and parameters and do what was originally done when displaying that iframe.
|
|
412
|
+
*/
|
|
383
413
|
export class AbortError extends DOMException {
|
|
384
414
|
constructor();
|
|
385
415
|
}
|
|
@@ -529,11 +559,45 @@ export type TablePart = 'columns' | 'values' | 'totals';
|
|
|
529
559
|
* for Long variables, the API is currently limited to the Double value range.
|
|
530
560
|
*/
|
|
531
561
|
export type FilterVariables = Record<string, string | string[] | number | Date | null>;
|
|
562
|
+
/**
|
|
563
|
+
* - A adapted [GeoJSON](https://geojson.org/) feature object.
|
|
564
|
+
*/
|
|
565
|
+
export type Feature = {
|
|
566
|
+
/**
|
|
567
|
+
* - The id of the feature
|
|
568
|
+
*/
|
|
569
|
+
objectId: any[];
|
|
570
|
+
/**
|
|
571
|
+
* - The geometry
|
|
572
|
+
*/
|
|
573
|
+
geometry: Geometry;
|
|
574
|
+
/**
|
|
575
|
+
* - The formated properties
|
|
576
|
+
*/
|
|
577
|
+
properties: Record<string, string>;
|
|
578
|
+
/**
|
|
579
|
+
* - The area of a `Polygon` feature
|
|
580
|
+
*/
|
|
581
|
+
area?: number | undefined;
|
|
582
|
+
/**
|
|
583
|
+
* - The area of a `LineString` feature
|
|
584
|
+
*/
|
|
585
|
+
length?: number | undefined;
|
|
586
|
+
};
|
|
587
|
+
/**
|
|
588
|
+
* - A adapted [GeoJSON](https://geojson.org/) feature collection object
|
|
589
|
+
*/
|
|
590
|
+
export type FeatureCollection = {
|
|
591
|
+
/**
|
|
592
|
+
* - The features within this collection
|
|
593
|
+
*/
|
|
594
|
+
features: Feature[];
|
|
595
|
+
};
|
|
532
596
|
/**
|
|
533
597
|
* - An event type to subscribe to using {@link CadenzaClienton }
|
|
534
598
|
*/
|
|
535
|
-
export type CadenzaEventType = 'change:selection' | 'drillThrough' | 'editGeometry:ok' | 'editGeometry:update' | 'editGeometry:cancel' | 'objectInfo' | 'selectObjects:ok' | 'selectObjects:cancel';
|
|
536
|
-
export type CadenzaEventByType<T extends CadenzaEventType> = T extends 'change:selection' ? CadenzaChangeSelectionEvent : T extends 'drillThrough' ? CadenzaDrillThroughEvent : T extends 'editGeometry:update' ? CadenzaEditGeometryUpdateEvent : T extends 'editGeometry:ok' ? CadenzaEditGeometryOkEvent : T extends 'editGeometry:cancel' ? CadenzaEditGeometryCancelEvent : T extends 'objectInfo' ? CadenzaObjectInfoEvent : T extends 'selectObjects:ok' ? CadenzaSelectObjectsOkEvent : T extends 'selectObjects:cancel' ? CadenzaSelectObjectsCancelEvent : never;
|
|
599
|
+
export type CadenzaEventType = 'change:selection' | 'drillThrough' | 'editGeometry:ok' | 'editGeometry:update' | 'editGeometry:cancel' | 'objectInfo' | 'selectObjects:ok' | 'selectObjects:cancel' | 'reload';
|
|
600
|
+
export type CadenzaEventByType<T extends CadenzaEventType> = T extends 'change:selection' ? CadenzaChangeSelectionEvent : T extends 'drillThrough' ? CadenzaDrillThroughEvent : T extends 'editGeometry:update' ? CadenzaEditGeometryUpdateEvent : T extends 'editGeometry:ok' ? CadenzaEditGeometryOkEvent : T extends 'editGeometry:cancel' ? CadenzaEditGeometryCancelEvent : T extends 'objectInfo' ? CadenzaObjectInfoEvent : T extends 'selectObjects:ok' ? CadenzaSelectObjectsOkEvent : T extends 'selectObjects:cancel' ? CadenzaSelectObjectsCancelEvent : T extends 'reload' ? CadenzaReloadEvent : never;
|
|
537
601
|
/**
|
|
538
602
|
* - A Cadenza `postMessage()` event
|
|
539
603
|
*/
|
|
@@ -618,3 +682,11 @@ export type CadenzaSelectObjectsOkEvent = CadenzaEvent<'selectObjects:ok', {
|
|
|
618
682
|
* - When the user cancelled the selection.
|
|
619
683
|
*/
|
|
620
684
|
export type CadenzaSelectObjectsCancelEvent = CadenzaEvent<'selectObjects:cancel'>;
|
|
685
|
+
/**
|
|
686
|
+
* - When the user clicked on the 'reload' button in the embedding standby page
|
|
687
|
+
*
|
|
688
|
+
* If a user does not interact with the iframe displaying the Cadenza content for a while, a standby embed page is displayed
|
|
689
|
+
* and the user can click a reload button there. Then the application using Cadenza JS can re-trigger the loading of the iframe
|
|
690
|
+
* with the correct original URL and parameters and do what was originally done when displaying that iframe.
|
|
691
|
+
*/
|
|
692
|
+
export type CadenzaReloadEvent = CadenzaEvent<'reload'>;
|
package/cadenza.js
CHANGED
|
@@ -120,6 +120,18 @@ globalThis.cadenza = Object.assign((/** @type Parameters<cadenza> */ ...args) =>
|
|
|
120
120
|
* _Note:_ Since numbers in JavaScript are Double values ([more info on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding)),
|
|
121
121
|
* for Long variables, the API is currently limited to the Double value range.
|
|
122
122
|
*/
|
|
123
|
+
/**
|
|
124
|
+
* @typedef Feature - A adapted [GeoJSON](https://geojson.org/) feature object.
|
|
125
|
+
* @property {any[]} objectId - The id of the feature
|
|
126
|
+
* @property {Geometry} geometry - The geometry
|
|
127
|
+
* @property {Record<string, string>} properties - The formated properties
|
|
128
|
+
* @property {number} [area] - The area of a `Polygon` feature
|
|
129
|
+
* @property {number} [length] - The area of a `LineString` feature
|
|
130
|
+
*/
|
|
131
|
+
/**
|
|
132
|
+
* @typedef FeatureCollection - A adapted [GeoJSON](https://geojson.org/) feature collection object
|
|
133
|
+
* @property {Feature[]} features - The features within this collection
|
|
134
|
+
*/
|
|
123
135
|
let hasCadenzaSession = false;
|
|
124
136
|
/** @type {Promise<void> | undefined} */
|
|
125
137
|
let firstEmbeddingTargetShown;
|
|
@@ -349,7 +361,7 @@ export class CadenzaClient {
|
|
|
349
361
|
*
|
|
350
362
|
* @hidden
|
|
351
363
|
* @param {WorkbookLayerPath | string} layer - The data view layer to set the selection in
|
|
352
|
-
* @param {unknown[]} values - The IDs of the objects to select
|
|
364
|
+
* @param {unknown[][]} values - The IDs of the objects to select
|
|
353
365
|
* @return {Promise<void>} A `Promise` for when the selection was set.
|
|
354
366
|
*/
|
|
355
367
|
setSelection(layer, values) {
|
|
@@ -361,7 +373,7 @@ export class CadenzaClient {
|
|
|
361
373
|
*
|
|
362
374
|
* @hidden
|
|
363
375
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
364
|
-
* @param {unknown[]} values - The IDs of the objects to select
|
|
376
|
+
* @param {unknown[][]} values - The IDs of the objects to select
|
|
365
377
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
366
378
|
*/
|
|
367
379
|
addSelection(layer, values) {
|
|
@@ -373,7 +385,7 @@ export class CadenzaClient {
|
|
|
373
385
|
*
|
|
374
386
|
* @hidden
|
|
375
387
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
376
|
-
* @param {unknown[]} values - The IDs of the objects to unselect
|
|
388
|
+
* @param {unknown[][]} values - The IDs of the objects to unselect
|
|
377
389
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
378
390
|
*/
|
|
379
391
|
removeSelection(layer, values) {
|
|
@@ -681,13 +693,52 @@ export class CadenzaClient {
|
|
|
681
693
|
const params = createParams({ dataType, filter, parts });
|
|
682
694
|
return this.#fetch(resolvePath(source), params, signal);
|
|
683
695
|
}
|
|
696
|
+
/**
|
|
697
|
+
* Fetch object info from a workbook map view.
|
|
698
|
+
*
|
|
699
|
+
* @param {EmbeddingTargetId} source - The workbook view to fetch object info from.
|
|
700
|
+
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
701
|
+
* (identified using layer paths or print names)
|
|
702
|
+
* @param {unknown[][]} objectIds - The IDs of the objects to select
|
|
703
|
+
* @param {object} [options] - Options
|
|
704
|
+
* @param {FilterVariables} [options.filter] - Filter variables
|
|
705
|
+
* @param {AbortSignal} [options.signal] - A signal to abort the data fetching
|
|
706
|
+
* @param {Boolean} [options.useMapSrs] - Use the map SRS instead of WGS84
|
|
707
|
+
* @param {Boolean} [options.fullGeometries] - Return non-simplified geometries
|
|
708
|
+
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
709
|
+
* @throws For invalid arguments
|
|
710
|
+
*/
|
|
711
|
+
fetchObjectInfo(source, layerPath, objectIds, { filter, signal, useMapSrs, fullGeometries } = {}) {
|
|
712
|
+
this.#log('CadenzaClient#fetchObjectInfo', ...arguments);
|
|
713
|
+
const params = createParams({
|
|
714
|
+
filter,
|
|
715
|
+
});
|
|
716
|
+
return this.#fetch(resolvePath(source) + '/objectinfo', params, signal, JSON.stringify({
|
|
717
|
+
objectIds,
|
|
718
|
+
layerPath: array(layerPath),
|
|
719
|
+
useMapSrs,
|
|
720
|
+
fullGeometries,
|
|
721
|
+
})).then((response) => response.json());
|
|
722
|
+
}
|
|
684
723
|
async #fetch(
|
|
685
724
|
/** @type string */ path,
|
|
686
725
|
/** @type URLSearchParams */ params,
|
|
687
|
-
/** @type AbortSignal | undefined */ signal
|
|
726
|
+
/** @type AbortSignal | undefined */ signal,
|
|
727
|
+
/** @type String | undefined If body is set, the fetch will be a post.*/ body) {
|
|
688
728
|
const url = this.#createUrl(path, params);
|
|
689
729
|
this.#log('Fetch', url.toString());
|
|
690
|
-
const
|
|
730
|
+
const method = body ? 'POST' : undefined;
|
|
731
|
+
const headers = new Headers();
|
|
732
|
+
headers.set('X-Requested-With', 'XMLHttpRequest');
|
|
733
|
+
if (body) {
|
|
734
|
+
headers.set('Content-Type', 'application/json');
|
|
735
|
+
}
|
|
736
|
+
const res = await fetch(url, {
|
|
737
|
+
signal,
|
|
738
|
+
method,
|
|
739
|
+
headers,
|
|
740
|
+
body,
|
|
741
|
+
});
|
|
691
742
|
if (!res.ok) {
|
|
692
743
|
const errorType = {
|
|
693
744
|
400: 'bad-request',
|
|
@@ -936,6 +987,7 @@ function array(/** @type unknown */ value) {
|
|
|
936
987
|
* | 'objectInfo'
|
|
937
988
|
* | 'selectObjects:ok'
|
|
938
989
|
* | 'selectObjects:cancel'
|
|
990
|
+
* | 'reload'
|
|
939
991
|
* } CadenzaEventType - An event type to subscribe to using {@link CadenzaClient#on}
|
|
940
992
|
*/
|
|
941
993
|
/**
|
|
@@ -948,6 +1000,7 @@ function array(/** @type unknown */ value) {
|
|
|
948
1000
|
* : T extends 'objectInfo' ? CadenzaObjectInfoEvent
|
|
949
1001
|
* : T extends 'selectObjects:ok' ? CadenzaSelectObjectsOkEvent
|
|
950
1002
|
* : T extends 'selectObjects:cancel' ? CadenzaSelectObjectsCancelEvent
|
|
1003
|
+
* : T extends 'reload' ? CadenzaReloadEvent
|
|
951
1004
|
* : never
|
|
952
1005
|
* } CadenzaEventByType
|
|
953
1006
|
*/
|
|
@@ -988,6 +1041,13 @@ function array(/** @type unknown */ value) {
|
|
|
988
1041
|
* For a selection in a workbook map view with activated feature info, the values also include the simplified geometries of the selected objects.
|
|
989
1042
|
*/
|
|
990
1043
|
/** @typedef {CadenzaEvent<'selectObjects:cancel'>} CadenzaSelectObjectsCancelEvent - When the user cancelled the selection. */
|
|
1044
|
+
/**
|
|
1045
|
+
* @typedef {CadenzaEvent<'reload'>} CadenzaReloadEvent - When the user clicked on the 'reload' button in the embedding standby page
|
|
1046
|
+
*
|
|
1047
|
+
* If a user does not interact with the iframe displaying the Cadenza content for a while, a standby embed page is displayed
|
|
1048
|
+
* and the user can click a reload button there. Then the application using Cadenza JS can re-trigger the loading of the iframe
|
|
1049
|
+
* with the correct original URL and parameters and do what was originally done when displaying that iframe.
|
|
1050
|
+
*/
|
|
991
1051
|
export class AbortError extends DOMException {
|
|
992
1052
|
constructor() {
|
|
993
1053
|
super('Aborted', 'AbortError');
|
package/package.json
CHANGED
package/sandbox.html
CHANGED
|
@@ -158,9 +158,9 @@
|
|
|
158
158
|
},
|
|
159
159
|
setFilter: data => cadenzaClient.setFilter(parseFilterVariables(data.filter)),
|
|
160
160
|
setLayerVisibility: data => cadenzaClient.setLayerVisibility(JSON.parse(data.layer), data.visibility === 'on'),
|
|
161
|
-
setSelection: data => cadenzaClient.setSelection(JSON.parse(data.layer), JSON.parse(data.
|
|
162
|
-
addSelection: data => cadenzaClient.addSelection(JSON.parse(data.layer), JSON.parse(data.
|
|
163
|
-
removeSelection: data => cadenzaClient.removeSelection(JSON.parse(data.layer), JSON.parse(data.
|
|
161
|
+
setSelection: data => cadenzaClient.setSelection(JSON.parse(data.layer), JSON.parse(data.objectIds)),
|
|
162
|
+
addSelection: data => cadenzaClient.addSelection(JSON.parse(data.layer), JSON.parse(data.objectIds)),
|
|
163
|
+
removeSelection: data => cadenzaClient.removeSelection(JSON.parse(data.layer), JSON.parse(data.objectIds)),
|
|
164
164
|
createGeometry: data => cadenzaClient.createGeometry(data.embeddingTargetId, data.geometryType, getOptions(data)),
|
|
165
165
|
editGeometry: ({ geometry, ...data }) => cadenzaClient.editGeometry(data.embeddingTargetId, JSON.parse(geometry), getOptions(data)),
|
|
166
166
|
selectObjects: data => cadenzaClient.selectObjects(data.embeddingTargetId, getOptions(data)),
|
|
@@ -168,6 +168,11 @@
|
|
|
168
168
|
console.log('Inspect the fetchData() request in the devtools.');
|
|
169
169
|
cadenzaClient.fetchData(data.embeddingTargetId, data.dataType, getOptions(data));
|
|
170
170
|
},
|
|
171
|
+
fetchObjectInfo: data => {
|
|
172
|
+
console.log('Inspect the fetchObjectInfo() request in the devtools.');
|
|
173
|
+
cadenzaClient.fetchObjectInfo(data.embeddingTargetId, JSON.parse(data.layer), JSON.parse(data.objectIds), getOptions(data))
|
|
174
|
+
.then(oi => console.log(oi));
|
|
175
|
+
},
|
|
171
176
|
downloadData: data => cadenzaClient.downloadData(data.embeddingTargetId, data.dataType, getOptions(data))
|
|
172
177
|
};
|
|
173
178
|
|
|
@@ -212,7 +217,8 @@
|
|
|
212
217
|
parts,
|
|
213
218
|
layers,
|
|
214
219
|
simplifiedOperationMode,
|
|
215
|
-
useMapSrs
|
|
220
|
+
useMapSrs,
|
|
221
|
+
fullGeometries
|
|
216
222
|
}) {
|
|
217
223
|
return {
|
|
218
224
|
disabledUiFeatures: disabledUiFeatures && disabledUiFeatures.split(','),
|
|
@@ -231,7 +237,8 @@
|
|
|
231
237
|
parts: parts && parts.split(','),
|
|
232
238
|
...(simplifiedOperationMode === 'on' && { operationMode: 'simplified' }),
|
|
233
239
|
layers: layers ? JSON.parse(layers) : undefined,
|
|
234
|
-
useMapSrs: useMapSrs === 'on'
|
|
240
|
+
useMapSrs: useMapSrs === 'on',
|
|
241
|
+
fullGeometries: fullGeometries === 'on'
|
|
235
242
|
};
|
|
236
243
|
}
|
|
237
244
|
|
|
@@ -280,6 +287,7 @@
|
|
|
280
287
|
<optgroup label="Without Iframe">
|
|
281
288
|
<option value="downloadData">Download data</option>
|
|
282
289
|
<option value="fetchData">Fetch data</option>
|
|
290
|
+
<option value="fetchObjectInfo">Fetch Object Info</option>
|
|
283
291
|
</optgroup>
|
|
284
292
|
</select>
|
|
285
293
|
</div>
|
|
@@ -513,9 +521,9 @@
|
|
|
513
521
|
</div>
|
|
514
522
|
</template>
|
|
515
523
|
|
|
516
|
-
<template data-action="setSelection" data-common="layer,
|
|
517
|
-
<template data-action="addSelection" data-common="layer,
|
|
518
|
-
<template data-action="removeSelection" data-common="layer,
|
|
524
|
+
<template data-action="setSelection" data-common="layer,object-ids"></template>
|
|
525
|
+
<template data-action="addSelection" data-common="layer,object-ids"></template>
|
|
526
|
+
<template data-action="removeSelection" data-common="layer,object-ids"></template>
|
|
519
527
|
|
|
520
528
|
<template data-action="reload">
|
|
521
529
|
<div>
|
|
@@ -527,12 +535,12 @@
|
|
|
527
535
|
</template>
|
|
528
536
|
<template data-action="closeMe">No Parameters needed.</template>
|
|
529
537
|
|
|
530
|
-
<template id="common-
|
|
538
|
+
<template id="common-object-ids">
|
|
531
539
|
<div>
|
|
532
|
-
<label for="
|
|
533
|
-
<textarea name="
|
|
540
|
+
<label for="objectids">List of object ID value lists *</label>
|
|
541
|
+
<textarea name="objectIds" id="objectids" rows="5" required></textarea>
|
|
534
542
|
<small>
|
|
535
|
-
<p>A JSON value like <code>["object1","object2"]</code></p>
|
|
543
|
+
<p>A JSON value like <code>[["<object1-id>"],["<object2-id>"]]</code></p>
|
|
536
544
|
</small>
|
|
537
545
|
</div>
|
|
538
546
|
</template>
|
|
@@ -568,6 +576,25 @@
|
|
|
568
576
|
</div>
|
|
569
577
|
</template>
|
|
570
578
|
|
|
579
|
+
<template data-action="fetchObjectInfo" data-common="layer,object-ids,filter">
|
|
580
|
+
<div>
|
|
581
|
+
<label for="embeddingTargetId">Embedding target ID *</label>
|
|
582
|
+
<input name="embeddingTargetId" id="embeddingTargetId" required>
|
|
583
|
+
</div>
|
|
584
|
+
<div>
|
|
585
|
+
<label>
|
|
586
|
+
<input type="checkbox" name="useMapSrs">
|
|
587
|
+
Use map SRS
|
|
588
|
+
</label>
|
|
589
|
+
</div>
|
|
590
|
+
<div>
|
|
591
|
+
<label>
|
|
592
|
+
<input type="checkbox" name="fullGeometries">
|
|
593
|
+
Return the non-simplified geometries
|
|
594
|
+
</label>
|
|
595
|
+
</div>
|
|
596
|
+
</template>
|
|
597
|
+
|
|
571
598
|
<template data-action="getData">
|
|
572
599
|
<div>
|
|
573
600
|
<label for="dataType">Data type</label>
|