@disy/cadenza.js 2.11.0 → 2.12.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 +5 -0
- package/README.md +1 -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 +39 -23
- package/apidoc/classes/CadenzaError.html +5 -5
- package/apidoc/functions/cadenza.html +3 -3
- package/apidoc/index.html +10 -2
- package/apidoc/interfaces/CadenzaClientOptions.html +5 -5
- package/apidoc/interfaces/CadenzaEvent.html +4 -4
- package/apidoc/interfaces/Distance.html +3 -0
- package/apidoc/interfaces/ExternalLinkKey.html +4 -4
- package/apidoc/interfaces/Feature.html +12 -0
- package/apidoc/interfaces/FeatureCollection.html +4 -0
- package/apidoc/interfaces/Geometry.html +3 -3
- package/apidoc/interfaces/GeometryZoomTarget.html +4 -0
- package/apidoc/interfaces/PageSource.html +3 -3
- package/apidoc/modules.html +8 -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 -0
- 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 -0
- package/cadenza.d.ts +104 -8
- package/cadenza.js +112 -14
- package/package.json +1 -1
- package/sandbox.cjs +2 -2
- package/sandbox.html +97 -14
|
@@ -1,2 +1,2 @@
|
|
|
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/
|
|
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 - v2.11.0</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.11.0</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/ed18e9cab078e4368378cc08c33c2040d63fcf35/src/cadenza.js#L144">src/cadenza.js:144</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.11.0</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,7 +1,7 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>UiFeature | 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="UiFeature.html">UiFeature</a></li></ul><h1>Type alias UiFeature</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Ui<wbr/>Feature</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"workbook-design"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"workbook-view-management"</span></div><div class="tsd-comment tsd-typography"><p>The name of a Cadenza UI feature</p>
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>UiFeature | Cadenza JS - v2.11.0</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.11.0</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="UiFeature.html">UiFeature</a></li></ul><h1>Type alias UiFeature</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Ui<wbr/>Feature</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"workbook-design"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"workbook-view-management"</span></div><div class="tsd-comment tsd-typography"><p>The name of a Cadenza UI feature</p>
|
|
2
2
|
<p><em>Note:</em> Supported features are:</p>
|
|
3
3
|
<ul>
|
|
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/ed18e9cab078e4368378cc08c33c2040d63fcf35/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 - v2.11.0</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
|
-
<!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
|
|
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 - v2.11.0</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.11.0</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/ed18e9cab078e4368378cc08c33c2040d63fcf35/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 - v2.11.0</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>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ZoomTarget | Cadenza JS - v2.11.0</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.11.0</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="ZoomTarget.html">ZoomTarget</a></li></ul><h1>Type alias ZoomTarget</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Zoom<wbr/>Target</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/GeometryZoomTarget.html" class="tsd-signature-type tsd-kind-interface">GeometryZoomTarget</a></div><div class="tsd-comment tsd-typography"><p>An object describing a target to zoom to</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/ed18e9cab078e4368378cc08c33c2040d63fcf35/src/cadenza.js#L132">src/cadenza.js:132</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.11.0</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
|
@@ -107,13 +107,14 @@ export class CadenzaClient {
|
|
|
107
107
|
* @param {Extent} [options.mapExtent] - A map extent to set
|
|
108
108
|
* @param {OperationMode} [options.operationMode] - The mode in which a workbook should be operated
|
|
109
109
|
* @param {boolean} [options.useMapSrs] - Whether the geometry and the extent are in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
110
|
+
* @param {ZoomTarget} [options.zoomTarget] - A target Cadenza should zoom to
|
|
110
111
|
* @param {AbortSignal} [options.signal] - A signal to abort the iframe loading
|
|
111
112
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
112
113
|
* @throws For invalid arguments
|
|
113
114
|
* @fires {@link CadenzaDrillThroughEvent}
|
|
114
115
|
* @embed
|
|
115
116
|
*/
|
|
116
|
-
showMap(mapView: EmbeddingTargetId, { disabledUiFeatures, expandNavigator, filter, geometry, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, locationFinder, mapExtent, operationMode, useMapSrs, signal, }?: {
|
|
117
|
+
showMap(mapView: EmbeddingTargetId, { disabledUiFeatures, expandNavigator, filter, geometry, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, locationFinder, mapExtent, operationMode, useMapSrs, zoomTarget, signal, }?: {
|
|
117
118
|
disabledUiFeatures?: UiFeature[] | undefined;
|
|
118
119
|
expandNavigator?: boolean | undefined;
|
|
119
120
|
filter?: FilterVariables | undefined;
|
|
@@ -125,6 +126,7 @@ export class CadenzaClient {
|
|
|
125
126
|
mapExtent?: Extent | undefined;
|
|
126
127
|
operationMode?: OperationMode | undefined;
|
|
127
128
|
useMapSrs?: boolean | undefined;
|
|
129
|
+
zoomTarget?: GeometryZoomTarget | undefined;
|
|
128
130
|
signal?: AbortSignal | undefined;
|
|
129
131
|
} | undefined, ...args: any[]): Promise<void>;
|
|
130
132
|
/**
|
|
@@ -174,31 +176,31 @@ export class CadenzaClient {
|
|
|
174
176
|
*
|
|
175
177
|
* @hidden
|
|
176
178
|
* @param {WorkbookLayerPath | string} layer - The data view layer to set the selection in
|
|
177
|
-
* @param {unknown[]} values - The IDs of the objects to select
|
|
179
|
+
* @param {unknown[][]} values - The IDs of the objects to select
|
|
178
180
|
* @return {Promise<void>} A `Promise` for when the selection was set.
|
|
179
181
|
* @postMessage
|
|
180
182
|
*/
|
|
181
|
-
setSelection(layer: WorkbookLayerPath | string, values: unknown[], ...args: any[]): Promise<void>;
|
|
183
|
+
setSelection(layer: WorkbookLayerPath | string, values: unknown[][], ...args: any[]): Promise<void>;
|
|
182
184
|
/**
|
|
183
185
|
* Add to the selection in the currently shown workbook map view.
|
|
184
186
|
*
|
|
185
187
|
* @hidden
|
|
186
188
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
187
|
-
* @param {unknown[]} values - The IDs of the objects to select
|
|
189
|
+
* @param {unknown[][]} values - The IDs of the objects to select
|
|
188
190
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
189
191
|
* @postMessage
|
|
190
192
|
*/
|
|
191
|
-
addSelection(layer: WorkbookLayerPath | string, values: unknown[], ...args: any[]): Promise<void>;
|
|
193
|
+
addSelection(layer: WorkbookLayerPath | string, values: unknown[][], ...args: any[]): Promise<void>;
|
|
192
194
|
/**
|
|
193
195
|
* Remove from the selection in the currently shown workbook map view.
|
|
194
196
|
*
|
|
195
197
|
* @hidden
|
|
196
198
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
197
|
-
* @param {unknown[]} values - The IDs of the objects to unselect
|
|
199
|
+
* @param {unknown[][]} values - The IDs of the objects to unselect
|
|
198
200
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
199
201
|
* @postMessage
|
|
200
202
|
*/
|
|
201
|
-
removeSelection(layer: WorkbookLayerPath | string, values: unknown[], ...args: any[]): Promise<void>;
|
|
203
|
+
removeSelection(layer: WorkbookLayerPath | string, values: unknown[][], ...args: any[]): Promise<void>;
|
|
202
204
|
/**
|
|
203
205
|
* Create a geometry.
|
|
204
206
|
*
|
|
@@ -241,6 +243,7 @@ export class CadenzaClient {
|
|
|
241
243
|
* @param {Extent} [options.mapExtent] - A map extent to set
|
|
242
244
|
* @param {number} [options.minScale] - The minimum scale where the user should work on. A warning is shown when the map is zoomed out above the threshold.
|
|
243
245
|
* @param {boolean} [options.useMapSrs] - Whether the geometry is in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
246
|
+
* @param {ZoomTarget} [options.zoomTarget] - A target Cadenza should zoom to
|
|
244
247
|
* @param {AbortSignal} [options.signal] - A signal to abort the iframe loading
|
|
245
248
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
246
249
|
* @throws For invalid arguments
|
|
@@ -250,12 +253,13 @@ export class CadenzaClient {
|
|
|
250
253
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
251
254
|
* @embed
|
|
252
255
|
*/
|
|
253
|
-
editGeometry(backgroundMapView: EmbeddingTargetId, geometry: Geometry, { filter, locationFinder, mapExtent, minScale, useMapSrs, signal }?: {
|
|
256
|
+
editGeometry(backgroundMapView: EmbeddingTargetId, geometry: Geometry, { filter, locationFinder, mapExtent, minScale, useMapSrs, zoomTarget, signal, }?: {
|
|
254
257
|
filter?: FilterVariables | undefined;
|
|
255
258
|
locationFinder?: string | undefined;
|
|
256
259
|
mapExtent?: Extent | undefined;
|
|
257
260
|
minScale?: number | undefined;
|
|
258
261
|
useMapSrs?: boolean | undefined;
|
|
262
|
+
zoomTarget?: GeometryZoomTarget | undefined;
|
|
259
263
|
signal?: AbortSignal | undefined;
|
|
260
264
|
} | undefined, ...args: any[]): Promise<void>;
|
|
261
265
|
/**
|
|
@@ -322,6 +326,46 @@ export class CadenzaClient {
|
|
|
322
326
|
parts?: TablePart[] | undefined;
|
|
323
327
|
signal?: AbortSignal | undefined;
|
|
324
328
|
} | undefined, ...args: any[]): Promise<Response>;
|
|
329
|
+
/**
|
|
330
|
+
* Fetch object info from a workbook map view.
|
|
331
|
+
*
|
|
332
|
+
* @param {EmbeddingTargetId} source - The workbook view to fetch object info from.
|
|
333
|
+
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
334
|
+
* (identified using layer paths or print names)
|
|
335
|
+
* @param {unknown[][]} objectIds - The IDs of the objects to select
|
|
336
|
+
* @param {object} [options] - Options
|
|
337
|
+
* @param {FilterVariables} [options.filter] - Filter variables
|
|
338
|
+
* @param {AbortSignal} [options.signal] - A signal to abort the data fetching
|
|
339
|
+
* @param {Boolean} [options.useMapSrs] - Use the map SRS instead of WGS84
|
|
340
|
+
* @param {Boolean} [options.fullGeometries] - Return non-simplified geometries
|
|
341
|
+
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
342
|
+
* @throws For invalid arguments
|
|
343
|
+
*/
|
|
344
|
+
fetchObjectInfo(source: EmbeddingTargetId, layerPath: (WorkbookLayerPath | string)[], objectIds: unknown[][], { filter, signal, useMapSrs, fullGeometries }?: {
|
|
345
|
+
filter?: FilterVariables | undefined;
|
|
346
|
+
signal?: AbortSignal | undefined;
|
|
347
|
+
useMapSrs?: boolean | undefined;
|
|
348
|
+
fullGeometries?: boolean | undefined;
|
|
349
|
+
} | undefined, ...args: any[]): Promise<FeatureCollection>;
|
|
350
|
+
/**
|
|
351
|
+
* Fetch the intersection areas from a workbook map view layer in JSON format for a given area.
|
|
352
|
+
*
|
|
353
|
+
* @param {EmbeddingTargetId} source - The workbook view to fetch object info from.
|
|
354
|
+
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
355
|
+
* (identified using layer paths or print names)
|
|
356
|
+
* @param {Geometry} geometry - The intersection geometry
|
|
357
|
+
* @param {object} [options] - Options
|
|
358
|
+
* @param {boolean} [options.useMapSrs] - The intersection geometry and the result geometries are in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
359
|
+
* @param {Distance} [options.buffer] - Buffer size for geometry of the transition
|
|
360
|
+
* @param {AbortSignal} [options.signal] - A signal to abort the data fetching
|
|
361
|
+
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
362
|
+
* @server
|
|
363
|
+
*/
|
|
364
|
+
fetchAreaIntersections(source: EmbeddingTargetId, layerPath: (WorkbookLayerPath | string)[], geometry: Geometry, { useMapSrs, buffer, signal }?: {
|
|
365
|
+
useMapSrs?: boolean | undefined;
|
|
366
|
+
buffer?: Distance | undefined;
|
|
367
|
+
signal?: AbortSignal | undefined;
|
|
368
|
+
} | undefined, ...args: any[]): Promise<FeatureCollection>;
|
|
325
369
|
/**
|
|
326
370
|
* Download data from a workbook view.
|
|
327
371
|
*
|
|
@@ -512,6 +556,11 @@ export type OperationMode = 'normal' | 'simplified';
|
|
|
512
556
|
* * `"workbook-view-management"` - Add/Edit/Remove workbook views (Is included in 'workbook-design'.)
|
|
513
557
|
*/
|
|
514
558
|
export type UiFeature = 'workbook-design' | 'workbook-view-management';
|
|
559
|
+
export type Distance = {
|
|
560
|
+
value: number;
|
|
561
|
+
lengthUnit: LengthUnit;
|
|
562
|
+
};
|
|
563
|
+
export type LengthUnit = 'm' | 'km';
|
|
515
564
|
/**
|
|
516
565
|
* - A [GeoJSON](https://geojson.org/) geometry object
|
|
517
566
|
*/
|
|
@@ -531,6 +580,19 @@ export type GeometryType = 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineStr
|
|
|
531
580
|
* - An array of numbers representing an extent: [minx, miny, maxx, maxy]
|
|
532
581
|
*/
|
|
533
582
|
export type Extent = [number, number, number, number];
|
|
583
|
+
/**
|
|
584
|
+
* - An object describing a target to zoom to
|
|
585
|
+
*/
|
|
586
|
+
export type ZoomTarget = GeometryZoomTarget;
|
|
587
|
+
/**
|
|
588
|
+
* - Instructs Cadenza to zoom to a provided {@Link Geometry}
|
|
589
|
+
*/
|
|
590
|
+
export type GeometryZoomTarget = {
|
|
591
|
+
/**
|
|
592
|
+
* The type of the zoom target
|
|
593
|
+
*/
|
|
594
|
+
type: 'geometry';
|
|
595
|
+
};
|
|
534
596
|
/**
|
|
535
597
|
* - A data type
|
|
536
598
|
*
|
|
@@ -550,6 +612,40 @@ export type TablePart = 'columns' | 'values' | 'totals';
|
|
|
550
612
|
* for Long variables, the API is currently limited to the Double value range.
|
|
551
613
|
*/
|
|
552
614
|
export type FilterVariables = Record<string, string | string[] | number | Date | null>;
|
|
615
|
+
/**
|
|
616
|
+
* - A adapted [GeoJSON](https://geojson.org/) feature object.
|
|
617
|
+
*/
|
|
618
|
+
export type Feature = {
|
|
619
|
+
/**
|
|
620
|
+
* - The id of the feature
|
|
621
|
+
*/
|
|
622
|
+
objectId: any[];
|
|
623
|
+
/**
|
|
624
|
+
* - The geometry
|
|
625
|
+
*/
|
|
626
|
+
geometry: Geometry;
|
|
627
|
+
/**
|
|
628
|
+
* - The formated properties
|
|
629
|
+
*/
|
|
630
|
+
properties: Record<string, string>;
|
|
631
|
+
/**
|
|
632
|
+
* - The area of a `Polygon` feature
|
|
633
|
+
*/
|
|
634
|
+
area?: number | undefined;
|
|
635
|
+
/**
|
|
636
|
+
* - The area of a `LineString` feature
|
|
637
|
+
*/
|
|
638
|
+
length?: number | undefined;
|
|
639
|
+
};
|
|
640
|
+
/**
|
|
641
|
+
* - A adapted [GeoJSON](https://geojson.org/) feature collection object
|
|
642
|
+
*/
|
|
643
|
+
export type FeatureCollection = {
|
|
644
|
+
/**
|
|
645
|
+
* - The features within this collection
|
|
646
|
+
*/
|
|
647
|
+
features: Feature[];
|
|
648
|
+
};
|
|
553
649
|
/**
|
|
554
650
|
* - An event type to subscribe to using {@link CadenzaClienton }
|
|
555
651
|
*/
|
package/cadenza.js
CHANGED
|
@@ -96,6 +96,14 @@ globalThis.cadenza = Object.assign((/** @type Parameters<cadenza> */ ...args) =>
|
|
|
96
96
|
* * `"workbook-design"` - The workbook designer
|
|
97
97
|
* * `"workbook-view-management"` - Add/Edit/Remove workbook views (Is included in 'workbook-design'.)
|
|
98
98
|
* */
|
|
99
|
+
/**
|
|
100
|
+
* @typedef Distance
|
|
101
|
+
* @property {number} value
|
|
102
|
+
* @property {LengthUnit} lengthUnit
|
|
103
|
+
*/
|
|
104
|
+
/**
|
|
105
|
+
* @typedef {'m'|'km'} LengthUnit
|
|
106
|
+
*/
|
|
99
107
|
/**
|
|
100
108
|
* @typedef Geometry - A [GeoJSON](https://geojson.org/) geometry object
|
|
101
109
|
* @property {GeometryType} type - The type of the geometry
|
|
@@ -106,6 +114,13 @@ globalThis.cadenza = Object.assign((/** @type Parameters<cadenza> */ ...args) =>
|
|
|
106
114
|
* _Note:_ The GeoJSON geometry type "GeometryCollection" is currently not supported.
|
|
107
115
|
*/
|
|
108
116
|
/** @typedef {[number,number,number,number]} Extent - An array of numbers representing an extent: [minx, miny, maxx, maxy] */
|
|
117
|
+
/**
|
|
118
|
+
* @typedef {GeometryZoomTarget} ZoomTarget - An object describing a target to zoom to
|
|
119
|
+
*/
|
|
120
|
+
/**
|
|
121
|
+
* @typedef GeometryZoomTarget - Instructs Cadenza to zoom to a provided {@Link Geometry}
|
|
122
|
+
* @property {'geometry'} type The type of the zoom target
|
|
123
|
+
*/
|
|
109
124
|
/**
|
|
110
125
|
* @typedef {'csv' | 'excel' | 'json' | 'pdf' | 'png'} DataType - A data type
|
|
111
126
|
*
|
|
@@ -120,6 +135,18 @@ globalThis.cadenza = Object.assign((/** @type Parameters<cadenza> */ ...args) =>
|
|
|
120
135
|
* _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
136
|
* for Long variables, the API is currently limited to the Double value range.
|
|
122
137
|
*/
|
|
138
|
+
/**
|
|
139
|
+
* @typedef Feature - A adapted [GeoJSON](https://geojson.org/) feature object.
|
|
140
|
+
* @property {any[]} objectId - The id of the feature
|
|
141
|
+
* @property {Geometry} geometry - The geometry
|
|
142
|
+
* @property {Record<string, string>} properties - The formated properties
|
|
143
|
+
* @property {number} [area] - The area of a `Polygon` feature
|
|
144
|
+
* @property {number} [length] - The area of a `LineString` feature
|
|
145
|
+
*/
|
|
146
|
+
/**
|
|
147
|
+
* @typedef FeatureCollection - A adapted [GeoJSON](https://geojson.org/) feature collection object
|
|
148
|
+
* @property {Feature[]} features - The features within this collection
|
|
149
|
+
*/
|
|
123
150
|
let hasCadenzaSession = false;
|
|
124
151
|
/** @type {Promise<void> | undefined} */
|
|
125
152
|
let firstEmbeddingTargetShown;
|
|
@@ -288,17 +315,19 @@ export class CadenzaClient {
|
|
|
288
315
|
* @param {Extent} [options.mapExtent] - A map extent to set
|
|
289
316
|
* @param {OperationMode} [options.operationMode] - The mode in which a workbook should be operated
|
|
290
317
|
* @param {boolean} [options.useMapSrs] - Whether the geometry and the extent are in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
318
|
+
* @param {ZoomTarget} [options.zoomTarget] - A target Cadenza should zoom to
|
|
291
319
|
* @param {AbortSignal} [options.signal] - A signal to abort the iframe loading
|
|
292
320
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
293
321
|
* @throws For invalid arguments
|
|
294
322
|
* @fires {@link CadenzaDrillThroughEvent}
|
|
295
323
|
* @embed
|
|
296
324
|
*/
|
|
297
|
-
async showMap(mapView, { disabledUiFeatures, expandNavigator, filter, geometry, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, locationFinder, mapExtent, operationMode, useMapSrs, signal, } = {}) {
|
|
325
|
+
async showMap(mapView, { disabledUiFeatures, expandNavigator, filter, geometry, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, locationFinder, mapExtent, operationMode, useMapSrs, zoomTarget, signal, } = {}) {
|
|
298
326
|
this.#log('CadenzaClient#showMap', ...arguments);
|
|
299
327
|
if (geometry) {
|
|
300
328
|
assertValidGeometryType(geometry.type);
|
|
301
329
|
}
|
|
330
|
+
const zoomToGeometry = geometry && zoomTarget?.type === 'geometry';
|
|
302
331
|
const params = createParams({
|
|
303
332
|
disabledUiFeatures,
|
|
304
333
|
expandNavigator,
|
|
@@ -306,7 +335,9 @@ export class CadenzaClient {
|
|
|
306
335
|
hideMainHeaderAndFooter,
|
|
307
336
|
hideWorkbookToolBar,
|
|
308
337
|
highlightGlobalId,
|
|
309
|
-
locationFinder,
|
|
338
|
+
// only use locationFinder if zoom to geometry is not set, to avoid
|
|
339
|
+
// zooming race condition for Cadenza versions below 10.1
|
|
340
|
+
locationFinder: zoomToGeometry ? undefined : locationFinder,
|
|
310
341
|
mapExtent,
|
|
311
342
|
operationMode,
|
|
312
343
|
targetType: 'MAP',
|
|
@@ -314,7 +345,10 @@ export class CadenzaClient {
|
|
|
314
345
|
});
|
|
315
346
|
await this.#show(resolvePath(mapView), params, signal);
|
|
316
347
|
if (geometry) {
|
|
317
|
-
this.#postEvent('setGeometry', {
|
|
348
|
+
this.#postEvent('setGeometry', {
|
|
349
|
+
geometry,
|
|
350
|
+
zoomToGeometry,
|
|
351
|
+
});
|
|
318
352
|
}
|
|
319
353
|
}
|
|
320
354
|
/**
|
|
@@ -380,7 +414,7 @@ export class CadenzaClient {
|
|
|
380
414
|
*
|
|
381
415
|
* @hidden
|
|
382
416
|
* @param {WorkbookLayerPath | string} layer - The data view layer to set the selection in
|
|
383
|
-
* @param {unknown[]} values - The IDs of the objects to select
|
|
417
|
+
* @param {unknown[][]} values - The IDs of the objects to select
|
|
384
418
|
* @return {Promise<void>} A `Promise` for when the selection was set.
|
|
385
419
|
* @postMessage
|
|
386
420
|
*/
|
|
@@ -393,7 +427,7 @@ export class CadenzaClient {
|
|
|
393
427
|
*
|
|
394
428
|
* @hidden
|
|
395
429
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
396
|
-
* @param {unknown[]} values - The IDs of the objects to select
|
|
430
|
+
* @param {unknown[][]} values - The IDs of the objects to select
|
|
397
431
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
398
432
|
* @postMessage
|
|
399
433
|
*/
|
|
@@ -406,7 +440,7 @@ export class CadenzaClient {
|
|
|
406
440
|
*
|
|
407
441
|
* @hidden
|
|
408
442
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
409
|
-
* @param {unknown[]} values - The IDs of the objects to unselect
|
|
443
|
+
* @param {unknown[][]} values - The IDs of the objects to unselect
|
|
410
444
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
411
445
|
* @postMessage
|
|
412
446
|
*/
|
|
@@ -464,6 +498,7 @@ export class CadenzaClient {
|
|
|
464
498
|
* @param {Extent} [options.mapExtent] - A map extent to set
|
|
465
499
|
* @param {number} [options.minScale] - The minimum scale where the user should work on. A warning is shown when the map is zoomed out above the threshold.
|
|
466
500
|
* @param {boolean} [options.useMapSrs] - Whether the geometry is in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
501
|
+
* @param {ZoomTarget} [options.zoomTarget] - A target Cadenza should zoom to
|
|
467
502
|
* @param {AbortSignal} [options.signal] - A signal to abort the iframe loading
|
|
468
503
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
469
504
|
* @throws For invalid arguments
|
|
@@ -473,20 +508,26 @@ export class CadenzaClient {
|
|
|
473
508
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
474
509
|
* @embed
|
|
475
510
|
*/
|
|
476
|
-
async editGeometry(backgroundMapView, geometry, { filter, locationFinder, mapExtent, minScale, useMapSrs, signal } = {}) {
|
|
511
|
+
async editGeometry(backgroundMapView, geometry, { filter, locationFinder, mapExtent, minScale, useMapSrs, zoomTarget, signal, } = {}) {
|
|
477
512
|
this.#log('CadenzaClient#editGeometry', ...arguments);
|
|
478
513
|
assertValidGeometryType(geometry.type);
|
|
514
|
+
const zoomToGeometry = geometry && zoomTarget?.type === 'geometry';
|
|
479
515
|
const params = createParams({
|
|
480
516
|
action: 'editGeometry',
|
|
481
517
|
filter,
|
|
482
|
-
locationFinder,
|
|
518
|
+
// only use locationFinder if zoom to geometry is not set, to avoid
|
|
519
|
+
// zooming race condition for Cadenza versions below 10.1
|
|
520
|
+
locationFinder: zoomToGeometry ? undefined : locationFinder,
|
|
483
521
|
mapExtent,
|
|
484
522
|
minScale,
|
|
485
523
|
useMapSrs,
|
|
486
524
|
});
|
|
487
525
|
await this.#show(resolvePath(backgroundMapView), params, signal);
|
|
488
526
|
if (geometry) {
|
|
489
|
-
this.#postEvent('setGeometry', {
|
|
527
|
+
this.#postEvent('setGeometry', {
|
|
528
|
+
geometry,
|
|
529
|
+
zoomToGeometry,
|
|
530
|
+
});
|
|
490
531
|
}
|
|
491
532
|
}
|
|
492
533
|
/**
|
|
@@ -719,18 +760,75 @@ export class CadenzaClient {
|
|
|
719
760
|
const params = createParams({ dataType, filter, parts });
|
|
720
761
|
return this.#fetch(resolvePath(source), params, signal);
|
|
721
762
|
}
|
|
763
|
+
/**
|
|
764
|
+
* Fetch object info from a workbook map view.
|
|
765
|
+
*
|
|
766
|
+
* @param {EmbeddingTargetId} source - The workbook view to fetch object info from.
|
|
767
|
+
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
768
|
+
* (identified using layer paths or print names)
|
|
769
|
+
* @param {unknown[][]} objectIds - The IDs of the objects to select
|
|
770
|
+
* @param {object} [options] - Options
|
|
771
|
+
* @param {FilterVariables} [options.filter] - Filter variables
|
|
772
|
+
* @param {AbortSignal} [options.signal] - A signal to abort the data fetching
|
|
773
|
+
* @param {Boolean} [options.useMapSrs] - Use the map SRS instead of WGS84
|
|
774
|
+
* @param {Boolean} [options.fullGeometries] - Return non-simplified geometries
|
|
775
|
+
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
776
|
+
* @throws For invalid arguments
|
|
777
|
+
*/
|
|
778
|
+
fetchObjectInfo(source, layerPath, objectIds, { filter, signal, useMapSrs, fullGeometries } = {}) {
|
|
779
|
+
this.#log('CadenzaClient#fetchObjectInfo', ...arguments);
|
|
780
|
+
const params = createParams({
|
|
781
|
+
filter,
|
|
782
|
+
});
|
|
783
|
+
return this.#fetch(resolvePath(source) + '/objectinfo', params, signal, JSON.stringify({
|
|
784
|
+
objectIds,
|
|
785
|
+
layerPath: array(layerPath),
|
|
786
|
+
useMapSrs,
|
|
787
|
+
fullGeometries,
|
|
788
|
+
})).then((response) => response.json());
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* Fetch the intersection areas from a workbook map view layer in JSON format for a given area.
|
|
792
|
+
*
|
|
793
|
+
* @param {EmbeddingTargetId} source - The workbook view to fetch object info from.
|
|
794
|
+
* @param {(WorkbookLayerPath | string)[]} layerPath - Layer path to identify the layer
|
|
795
|
+
* (identified using layer paths or print names)
|
|
796
|
+
* @param {Geometry} geometry - The intersection geometry
|
|
797
|
+
* @param {object} [options] - Options
|
|
798
|
+
* @param {boolean} [options.useMapSrs] - The intersection geometry and the result geometries are in the map's SRS (otherwise EPSG:4326 is assumed)
|
|
799
|
+
* @param {Distance} [options.buffer] - Buffer size for geometry of the transition
|
|
800
|
+
* @param {AbortSignal} [options.signal] - A signal to abort the data fetching
|
|
801
|
+
* @return {Promise<FeatureCollection>} A `Promise` for the fetch response
|
|
802
|
+
* @server
|
|
803
|
+
*/
|
|
804
|
+
fetchAreaIntersections(source, layerPath, geometry, { useMapSrs, buffer, signal } = {}) {
|
|
805
|
+
this.#log('CadenzaClient#areaIntersections', ...arguments);
|
|
806
|
+
const params = createParams({});
|
|
807
|
+
return this.#fetch(resolvePath(source) + '/area-intersections', params, signal, JSON.stringify({
|
|
808
|
+
layerPath: array(layerPath),
|
|
809
|
+
geometry: geometry,
|
|
810
|
+
useMapSrs: useMapSrs,
|
|
811
|
+
buffer: buffer,
|
|
812
|
+
})).then((response) => response.json());
|
|
813
|
+
}
|
|
722
814
|
async #fetch(
|
|
723
815
|
/** @type string */ path,
|
|
724
816
|
/** @type URLSearchParams */ params,
|
|
725
|
-
/** @type AbortSignal | undefined */ signal
|
|
817
|
+
/** @type AbortSignal | undefined */ signal,
|
|
818
|
+
/** @type String | undefined If body is set, the fetch will be a post.*/ body) {
|
|
726
819
|
const url = this.#createUrl(path, params);
|
|
727
820
|
this.#log('Fetch', url.toString());
|
|
821
|
+
const method = body ? 'POST' : undefined;
|
|
822
|
+
const headers = new Headers();
|
|
823
|
+
headers.set('X-Requested-With', 'XMLHttpRequest');
|
|
824
|
+
if (body) {
|
|
825
|
+
headers.set('Content-Type', 'application/json');
|
|
826
|
+
}
|
|
728
827
|
const res = await fetch(url, {
|
|
729
828
|
signal,
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
},
|
|
829
|
+
method,
|
|
830
|
+
headers,
|
|
831
|
+
body,
|
|
734
832
|
});
|
|
735
833
|
if (!res.ok) {
|
|
736
834
|
const errorType = {
|
package/package.json
CHANGED
package/sandbox.cjs
CHANGED
|
@@ -6,8 +6,8 @@ const DEFAULT_CADENZA_URL = 'http://localhost:8080/cadenza';
|
|
|
6
6
|
|
|
7
7
|
const index = process.argv.indexOf(CADENZA_URL_PARAM);
|
|
8
8
|
const cadenzaUrlFromArgs = index !== -1
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
? process.argv[index + 1]
|
|
10
|
+
: process.argv.find(arg => arg.startsWith(CADENZA_URL_PARAM + '='))?.slice(CADENZA_URL_PARAM.length + 1);
|
|
11
11
|
const cadenzaUrl = new URL(cadenzaUrlFromArgs || process.env.CADENZA_URL || DEFAULT_CADENZA_URL);
|
|
12
12
|
|
|
13
13
|
execSync(`npx --yes http-server -a localhost -c-1 -d false --proxy ${cadenzaUrl.origin} --proxy-options.headers.Origin ${cadenzaUrl.origin} -o /sandbox.html${cadenzaUrl.pathname !== '/' ? `?contextPath=${cadenzaUrl.pathname}` : ''}`, { stdio: 'inherit' });
|