@disy/cadenza.js 2.10.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/apidoc/assets/highlight.css +14 -0
- package/apidoc/assets/search.js +1 -1
- package/apidoc/classes/AbortError.html +2 -2
- package/apidoc/classes/CadenzaClient.html +33 -26
- package/apidoc/classes/CadenzaError.html +3 -3
- package/apidoc/functions/cadenza.html +2 -2
- package/apidoc/index.html +17 -17
- package/apidoc/interfaces/CadenzaClientOptions.html +5 -5
- package/apidoc/interfaces/CadenzaEvent.html +3 -3
- package/apidoc/interfaces/ExternalLinkKey.html +4 -4
- package/apidoc/interfaces/Geometry.html +2 -2
- package/apidoc/interfaces/PageSource.html +2 -2
- 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 +1 -1
- package/apidoc/types/CadenzaObjectInfoEvent.html +1 -1
- 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 +2 -2
- 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 +41 -20
- package/cadenza.js +55 -28
- package/package.json +1 -1
- package/sandbox.html +5 -4
|
@@ -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/fffbdcda0b6007bd151fb6fc7cc02a5b2f8069da/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/fffbdcda0b6007bd151fb6fc7cc02a5b2f8069da/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/fffbdcda0b6007bd151fb6fc7cc02a5b2f8069da/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/fffbdcda0b6007bd151fb6fc7cc02a5b2f8069da/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
|
@@ -21,6 +21,11 @@ export function cadenza(options?: CadenzaClientOptions | undefined): CadenzaClie
|
|
|
21
21
|
export function cadenza(baseUrl: string, options?: CadenzaClientOptions | undefined): CadenzaClient;
|
|
22
22
|
/**
|
|
23
23
|
* _Notes:_
|
|
24
|
+
* * Most public methods are tagged with one of these modifiers:
|
|
25
|
+
* * `Embed`: The method embeds Cadenza in the given iframe.
|
|
26
|
+
* * `Post Message`: The method communicates with an embedded or parent/opener Cadenza via postMessage.
|
|
27
|
+
* * `Post Message Parent`: The method communicates with a parent/opener Cadenza via postMessage.
|
|
28
|
+
* * `Server`: The method communicates with the Cadenza server via HTTP.
|
|
24
29
|
* * Most public methods can be aborted using an [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal).
|
|
25
30
|
* When aborted, the result Promise is rejected with an {@link AbortError}.
|
|
26
31
|
* * If there's another error, the result Promise is rejected with a {@link CadenzaError}.
|
|
@@ -57,6 +62,7 @@ export class CadenzaClient {
|
|
|
57
62
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
58
63
|
* @throws For invalid arguments
|
|
59
64
|
* @fires {@link CadenzaDrillThroughEvent}
|
|
65
|
+
* @embed
|
|
60
66
|
*/
|
|
61
67
|
show(source: PageSource | EmbeddingTargetId, { dataType, disabledUiFeatures, expandNavigator, filter, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, labelSet, operationMode, signal, }?: {
|
|
62
68
|
dataType?: DataType | undefined;
|
|
@@ -70,6 +76,21 @@ export class CadenzaClient {
|
|
|
70
76
|
operationMode?: OperationMode | undefined;
|
|
71
77
|
signal?: AbortSignal | undefined;
|
|
72
78
|
} | undefined, ...args: any[]): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Reload the views of a worksheet.
|
|
81
|
+
* @param {object} [options] - Options
|
|
82
|
+
* @param {boolean} [options.invalidateCaches] - When true, caches will be invalidated for objecttypes used
|
|
83
|
+
* in the worksheet
|
|
84
|
+
* @postMessage
|
|
85
|
+
*/
|
|
86
|
+
reload({ invalidateCaches }?: {
|
|
87
|
+
invalidateCaches?: boolean | undefined;
|
|
88
|
+
} | undefined, ...args: any[]): void;
|
|
89
|
+
/**
|
|
90
|
+
* Sends a message to parent Cadenza window to close the window containing this application
|
|
91
|
+
* @postMessageParent
|
|
92
|
+
*/
|
|
93
|
+
closeMe(): void;
|
|
73
94
|
/**
|
|
74
95
|
* Show a workbook map view in an iframe.
|
|
75
96
|
*
|
|
@@ -90,6 +111,7 @@ export class CadenzaClient {
|
|
|
90
111
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
91
112
|
* @throws For invalid arguments
|
|
92
113
|
* @fires {@link CadenzaDrillThroughEvent}
|
|
114
|
+
* @embed
|
|
93
115
|
*/
|
|
94
116
|
showMap(mapView: EmbeddingTargetId, { disabledUiFeatures, expandNavigator, filter, geometry, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, locationFinder, mapExtent, operationMode, useMapSrs, signal, }?: {
|
|
95
117
|
disabledUiFeatures?: UiFeature[] | undefined;
|
|
@@ -109,6 +131,7 @@ export class CadenzaClient {
|
|
|
109
131
|
* Expand/collapse the navigator.
|
|
110
132
|
*
|
|
111
133
|
* @param {boolean} expanded - The expansion state of the navigator
|
|
134
|
+
* @postMessage
|
|
112
135
|
*/
|
|
113
136
|
expandNavigator(expanded?: boolean, ...args: any[]): void;
|
|
114
137
|
/**
|
|
@@ -120,6 +143,7 @@ export class CadenzaClient {
|
|
|
120
143
|
* @template {DataType} T
|
|
121
144
|
* @param {T} dataType - The requested data type. Currently, only `"png"` is supported.
|
|
122
145
|
* @return {Promise<T extends 'png' ? Blob : never>}
|
|
146
|
+
* @postMessage
|
|
123
147
|
*/
|
|
124
148
|
getData<T extends DataType>(dataType: T, ...args: any[]): Promise<T extends "png" ? Blob : never>;
|
|
125
149
|
/**
|
|
@@ -128,6 +152,7 @@ export class CadenzaClient {
|
|
|
128
152
|
* @hidden
|
|
129
153
|
* @param {FilterVariables} filter - The variable values
|
|
130
154
|
* @return {Promise<void>} A `Promise` for when the filter variables were set.
|
|
155
|
+
* @postMessage
|
|
131
156
|
*/
|
|
132
157
|
setFilter(filter: FilterVariables, ...args: any[]): Promise<void>;
|
|
133
158
|
/**
|
|
@@ -141,6 +166,7 @@ export class CadenzaClient {
|
|
|
141
166
|
* (identified using a layer path or a print name)
|
|
142
167
|
* @param {boolean} visible - The visibility state of the layer
|
|
143
168
|
* @return {Promise<void>} A `Promise` for when the layer visibility was set.
|
|
169
|
+
* @postMessage
|
|
144
170
|
*/
|
|
145
171
|
setLayerVisibility(layer: WorkbookLayerPath | string, visible: boolean, ...args: any[]): Promise<void>;
|
|
146
172
|
/**
|
|
@@ -150,6 +176,7 @@ export class CadenzaClient {
|
|
|
150
176
|
* @param {WorkbookLayerPath | string} layer - The data view layer to set the selection in
|
|
151
177
|
* @param {unknown[]} values - The IDs of the objects to select
|
|
152
178
|
* @return {Promise<void>} A `Promise` for when the selection was set.
|
|
179
|
+
* @postMessage
|
|
153
180
|
*/
|
|
154
181
|
setSelection(layer: WorkbookLayerPath | string, values: unknown[], ...args: any[]): Promise<void>;
|
|
155
182
|
/**
|
|
@@ -159,6 +186,7 @@ export class CadenzaClient {
|
|
|
159
186
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
160
187
|
* @param {unknown[]} values - The IDs of the objects to select
|
|
161
188
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
189
|
+
* @postMessage
|
|
162
190
|
*/
|
|
163
191
|
addSelection(layer: WorkbookLayerPath | string, values: unknown[], ...args: any[]): Promise<void>;
|
|
164
192
|
/**
|
|
@@ -168,6 +196,7 @@ export class CadenzaClient {
|
|
|
168
196
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
169
197
|
* @param {unknown[]} values - The IDs of the objects to unselect
|
|
170
198
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
199
|
+
* @postMessage
|
|
171
200
|
*/
|
|
172
201
|
removeSelection(layer: WorkbookLayerPath | string, values: unknown[], ...args: any[]): Promise<void>;
|
|
173
202
|
/**
|
|
@@ -191,6 +220,7 @@ export class CadenzaClient {
|
|
|
191
220
|
* - {@link CadenzaEditGeometryUpdateEvent}
|
|
192
221
|
* - {@link CadenzaEditGeometryOkEvent}
|
|
193
222
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
223
|
+
* @embed
|
|
194
224
|
*/
|
|
195
225
|
createGeometry(backgroundMapView: EmbeddingTargetId, geometryType: GeometryType, { filter, locationFinder, mapExtent, minScale, useMapSrs, signal }?: {
|
|
196
226
|
filter?: FilterVariables | undefined;
|
|
@@ -218,6 +248,7 @@ export class CadenzaClient {
|
|
|
218
248
|
* - {@link CadenzaEditGeometryUpdateEvent}
|
|
219
249
|
* - {@link CadenzaEditGeometryOkEvent}
|
|
220
250
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
251
|
+
* @embed
|
|
221
252
|
*/
|
|
222
253
|
editGeometry(backgroundMapView: EmbeddingTargetId, geometry: Geometry, { filter, locationFinder, mapExtent, minScale, useMapSrs, signal }?: {
|
|
223
254
|
filter?: FilterVariables | undefined;
|
|
@@ -246,6 +277,7 @@ export class CadenzaClient {
|
|
|
246
277
|
* - {@link CadenzaObjectInfoEvent}
|
|
247
278
|
* - {@link CadenzaSelectObjectsOkEvent}
|
|
248
279
|
* - {@link CadenzaSelectObjectsCancelEvent}
|
|
280
|
+
* @embed
|
|
249
281
|
*/
|
|
250
282
|
selectObjects(backgroundMapView: EmbeddingTargetId, { filter, layers, locationFinder, mapExtent, useMapSrs, signal }?: {
|
|
251
283
|
filter?: FilterVariables | undefined;
|
|
@@ -274,15 +306,16 @@ export class CadenzaClient {
|
|
|
274
306
|
* Fetch data from a workbook view.
|
|
275
307
|
*
|
|
276
308
|
* @param {EmbeddingTargetId} source - The workbook view to fetch data from.
|
|
277
|
-
* Currently only table and indicator views are supported.
|
|
278
309
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
279
|
-
* Currently, `"csv"`, `"excel"` and `"json"` are supported
|
|
310
|
+
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
|
|
311
|
+
* and `"pdf"` for views of type "JasperReports report".
|
|
280
312
|
* @param {object} [options] - Options
|
|
281
313
|
* @param {FilterVariables} [options.filter] - Filter variables
|
|
282
314
|
* @param {TablePart[]} [options.parts] - Table parts to export; If not specified, all parts are exported.
|
|
283
315
|
* @param {AbortSignal} [options.signal] - A signal to abort the data fetching
|
|
284
316
|
* @return {Promise<Response>} A `Promise` for the fetch response
|
|
285
317
|
* @throws For invalid arguments
|
|
318
|
+
* @server
|
|
286
319
|
*/
|
|
287
320
|
fetchData(source: EmbeddingTargetId, dataType: DataType, { filter, parts, signal }?: {
|
|
288
321
|
filter?: FilterVariables | undefined;
|
|
@@ -294,34 +327,22 @@ export class CadenzaClient {
|
|
|
294
327
|
*
|
|
295
328
|
* _Note:_ The file name, if not provided, is generated from the name of the workbook view and the current date.
|
|
296
329
|
*
|
|
297
|
-
* @param {EmbeddingTargetId} source - The workbook view to
|
|
298
|
-
* Currently only table and indicator views are supported.
|
|
330
|
+
* @param {EmbeddingTargetId} source - The workbook view to fetch data from.
|
|
299
331
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
300
|
-
* Currently, `"csv"`, `"excel"` and `"json"` are supported
|
|
332
|
+
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
|
|
333
|
+
* and `"pdf"` for views of type "JasperReports report".
|
|
301
334
|
* @param {object} [options] - Options
|
|
302
335
|
* @param {string} [options.fileName] - The file name to use; The file extension is appended by Cadenza.
|
|
303
336
|
* @param {FilterVariables} [options.filter] - Filter variables
|
|
304
337
|
* @param {TablePart[]} [options.parts] - Table parts to export; If not specified, all parts are exported.
|
|
305
338
|
* @throws For invalid arguments
|
|
339
|
+
* @server
|
|
306
340
|
*/
|
|
307
341
|
downloadData(source: EmbeddingTargetId, dataType: DataType, { fileName, filter, parts }?: {
|
|
308
342
|
fileName?: string | undefined;
|
|
309
343
|
filter?: FilterVariables | undefined;
|
|
310
344
|
parts?: TablePart[] | undefined;
|
|
311
345
|
} | undefined, ...args: any[]): void;
|
|
312
|
-
/**
|
|
313
|
-
* Reload the views of a worksheet.
|
|
314
|
-
* @param {object} [options] - Options
|
|
315
|
-
* @param {boolean} [options.invalidateCaches] - When true, caches will be invalidated for objecttypes used
|
|
316
|
-
* in the worksheet
|
|
317
|
-
*/
|
|
318
|
-
reload({ invalidateCaches }?: {
|
|
319
|
-
invalidateCaches?: boolean | undefined;
|
|
320
|
-
} | undefined, ...args: any[]): void;
|
|
321
|
-
/**
|
|
322
|
-
* Sends a message to parent Cadenza window to close the window containing this application
|
|
323
|
-
*/
|
|
324
|
-
closeMe(): void;
|
|
325
346
|
#private;
|
|
326
347
|
}
|
|
327
348
|
/**
|
|
@@ -426,7 +447,7 @@ export type CadenzaClientOptions = {
|
|
|
426
447
|
* The idea is to have a specific type e.g. for the {@link EmbeddingTargetId } instead of a plain `string`.
|
|
427
448
|
* You don't need to _actually_ add that `__type` property. In TS code, just use a
|
|
428
449
|
* [type assertion](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions)
|
|
429
|
-
* (e.g. `cadenzaClient.show('
|
|
450
|
+
* (e.g. `cadenzaClient.show('<embeddingTargetId>' as EmbeddingTargetId)`).
|
|
430
451
|
*/
|
|
431
452
|
export type OpaqueString<T extends string> = string & {
|
|
432
453
|
__type: T;
|
|
@@ -452,7 +473,7 @@ export type GlobalId = OpaqueString<'GlobalId'>;
|
|
|
452
473
|
*
|
|
453
474
|
* You get the `repositoryName` and `externalLinkId` from the URL of the external link's page in the Cadenza management center:
|
|
454
475
|
* ```
|
|
455
|
-
*
|
|
476
|
+
* <baseUrl>/admin/repositories/<repositoryName>/external-links/<externalLinkId>?...
|
|
456
477
|
* ```
|
|
457
478
|
*/
|
|
458
479
|
export type ExternalLinkKey = {
|
package/cadenza.js
CHANGED
|
@@ -55,7 +55,7 @@ globalThis.cadenza = Object.assign((/** @type Parameters<cadenza> */ ...args) =>
|
|
|
55
55
|
* The idea is to have a specific type e.g. for the {@link EmbeddingTargetId} instead of a plain `string`.
|
|
56
56
|
* You don't need to _actually_ add that `__type` property. In TS code, just use a
|
|
57
57
|
* [type assertion](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions)
|
|
58
|
-
* (e.g. `cadenzaClient.show('
|
|
58
|
+
* (e.g. `cadenzaClient.show('<embeddingTargetId>' as EmbeddingTargetId)`).
|
|
59
59
|
*/
|
|
60
60
|
/**
|
|
61
61
|
* @typedef {OpaqueString<'EmbeddingTargetId'>} EmbeddingTargetId - The ID of a Cadenza embedding target
|
|
@@ -74,7 +74,7 @@ globalThis.cadenza = Object.assign((/** @type Parameters<cadenza> */ ...args) =>
|
|
|
74
74
|
*
|
|
75
75
|
* You get the `repositoryName` and `externalLinkId` from the URL of the external link's page in the Cadenza management center:
|
|
76
76
|
* ```
|
|
77
|
-
*
|
|
77
|
+
* <baseUrl>/admin/repositories/<repositoryName>/external-links/<externalLinkId>?...
|
|
78
78
|
* ```
|
|
79
79
|
*
|
|
80
80
|
* @property {string} repositoryName - The name of the link's repository
|
|
@@ -125,6 +125,11 @@ let hasCadenzaSession = false;
|
|
|
125
125
|
let firstEmbeddingTargetShown;
|
|
126
126
|
/**
|
|
127
127
|
* _Notes:_
|
|
128
|
+
* * Most public methods are tagged with one of these modifiers:
|
|
129
|
+
* * `Embed`: The method embeds Cadenza in the given iframe.
|
|
130
|
+
* * `Post Message`: The method communicates with an embedded or parent/opener Cadenza via postMessage.
|
|
131
|
+
* * `Post Message Parent`: The method communicates with a parent/opener Cadenza via postMessage.
|
|
132
|
+
* * `Server`: The method communicates with the Cadenza server via HTTP.
|
|
128
133
|
* * Most public methods can be aborted using an [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal).
|
|
129
134
|
* When aborted, the result Promise is rejected with an {@link AbortError}.
|
|
130
135
|
* * If there's another error, the result Promise is rejected with a {@link CadenzaError}.
|
|
@@ -222,6 +227,7 @@ export class CadenzaClient {
|
|
|
222
227
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
223
228
|
* @throws For invalid arguments
|
|
224
229
|
* @fires {@link CadenzaDrillThroughEvent}
|
|
230
|
+
* @embed
|
|
225
231
|
*/
|
|
226
232
|
show(source, { dataType, disabledUiFeatures, expandNavigator, filter, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, labelSet, operationMode, signal, } = {}) {
|
|
227
233
|
this.#log('CadenzaClient#show', ...arguments);
|
|
@@ -246,6 +252,26 @@ export class CadenzaClient {
|
|
|
246
252
|
});
|
|
247
253
|
return this.#show(resolvePath(source), params, signal);
|
|
248
254
|
}
|
|
255
|
+
/**
|
|
256
|
+
* Reload the views of a worksheet.
|
|
257
|
+
* @param {object} [options] - Options
|
|
258
|
+
* @param {boolean} [options.invalidateCaches] - When true, caches will be invalidated for objecttypes used
|
|
259
|
+
* in the worksheet
|
|
260
|
+
* @postMessage
|
|
261
|
+
*/
|
|
262
|
+
reload({ invalidateCaches = false } = {}) {
|
|
263
|
+
this.#log('CadenzaClient#reload', ...arguments);
|
|
264
|
+
this.#postEvent('reload', { invalidateCaches });
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Sends a message to parent Cadenza window to close the window containing this application
|
|
268
|
+
* @postMessageParent
|
|
269
|
+
*/
|
|
270
|
+
closeMe() {
|
|
271
|
+
this.#log('CadenzaClient#closeMe');
|
|
272
|
+
assert(this.#iframe == null, 'Cannot send closeMe to iframe');
|
|
273
|
+
this.#postEvent('closeMe');
|
|
274
|
+
}
|
|
249
275
|
/**
|
|
250
276
|
* Show a workbook map view in an iframe.
|
|
251
277
|
*
|
|
@@ -266,6 +292,7 @@ export class CadenzaClient {
|
|
|
266
292
|
* @return {Promise<void>} A `Promise` for when the iframe is loaded
|
|
267
293
|
* @throws For invalid arguments
|
|
268
294
|
* @fires {@link CadenzaDrillThroughEvent}
|
|
295
|
+
* @embed
|
|
269
296
|
*/
|
|
270
297
|
async showMap(mapView, { disabledUiFeatures, expandNavigator, filter, geometry, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, locationFinder, mapExtent, operationMode, useMapSrs, signal, } = {}) {
|
|
271
298
|
this.#log('CadenzaClient#showMap', ...arguments);
|
|
@@ -294,6 +321,7 @@ export class CadenzaClient {
|
|
|
294
321
|
* Expand/collapse the navigator.
|
|
295
322
|
*
|
|
296
323
|
* @param {boolean} expanded - The expansion state of the navigator
|
|
324
|
+
* @postMessage
|
|
297
325
|
*/
|
|
298
326
|
expandNavigator(expanded = true) {
|
|
299
327
|
this.#log('CadenzaClient#expandNavigator', ...arguments);
|
|
@@ -308,6 +336,7 @@ export class CadenzaClient {
|
|
|
308
336
|
* @template {DataType} T
|
|
309
337
|
* @param {T} dataType - The requested data type. Currently, only `"png"` is supported.
|
|
310
338
|
* @return {Promise<T extends 'png' ? Blob : never>}
|
|
339
|
+
* @postMessage
|
|
311
340
|
*/
|
|
312
341
|
async getData(dataType) {
|
|
313
342
|
this.#log('CadenzaClient#getData', ...arguments);
|
|
@@ -320,6 +349,7 @@ export class CadenzaClient {
|
|
|
320
349
|
* @hidden
|
|
321
350
|
* @param {FilterVariables} filter - The variable values
|
|
322
351
|
* @return {Promise<void>} A `Promise` for when the filter variables were set.
|
|
352
|
+
* @postMessage
|
|
323
353
|
*/
|
|
324
354
|
setFilter(filter) {
|
|
325
355
|
this.#log('CadenzaClient#setFilter', ...arguments);
|
|
@@ -336,6 +366,7 @@ export class CadenzaClient {
|
|
|
336
366
|
* (identified using a layer path or a print name)
|
|
337
367
|
* @param {boolean} visible - The visibility state of the layer
|
|
338
368
|
* @return {Promise<void>} A `Promise` for when the layer visibility was set.
|
|
369
|
+
* @postMessage
|
|
339
370
|
*/
|
|
340
371
|
setLayerVisibility(layer, visible) {
|
|
341
372
|
this.#log('CadenzaClient#setLayerVisibility', ...arguments);
|
|
@@ -351,6 +382,7 @@ export class CadenzaClient {
|
|
|
351
382
|
* @param {WorkbookLayerPath | string} layer - The data view layer to set the selection in
|
|
352
383
|
* @param {unknown[]} values - The IDs of the objects to select
|
|
353
384
|
* @return {Promise<void>} A `Promise` for when the selection was set.
|
|
385
|
+
* @postMessage
|
|
354
386
|
*/
|
|
355
387
|
setSelection(layer, values) {
|
|
356
388
|
this.#log('CadenzaClient#setSelection', ...arguments);
|
|
@@ -363,6 +395,7 @@ export class CadenzaClient {
|
|
|
363
395
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
364
396
|
* @param {unknown[]} values - The IDs of the objects to select
|
|
365
397
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
398
|
+
* @postMessage
|
|
366
399
|
*/
|
|
367
400
|
addSelection(layer, values) {
|
|
368
401
|
this.#log('CadenzaClient#addSelection', ...arguments);
|
|
@@ -375,6 +408,7 @@ export class CadenzaClient {
|
|
|
375
408
|
* @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
|
|
376
409
|
* @param {unknown[]} values - The IDs of the objects to unselect
|
|
377
410
|
* @return {Promise<void>} A `Promise` for when the selection was changed.
|
|
411
|
+
* @postMessage
|
|
378
412
|
*/
|
|
379
413
|
removeSelection(layer, values) {
|
|
380
414
|
this.#log('CadenzaClient#removeSelection', ...arguments);
|
|
@@ -404,6 +438,7 @@ export class CadenzaClient {
|
|
|
404
438
|
* - {@link CadenzaEditGeometryUpdateEvent}
|
|
405
439
|
* - {@link CadenzaEditGeometryOkEvent}
|
|
406
440
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
441
|
+
* @embed
|
|
407
442
|
*/
|
|
408
443
|
createGeometry(backgroundMapView, geometryType, { filter, locationFinder, mapExtent, minScale, useMapSrs, signal } = {}) {
|
|
409
444
|
this.#log('CadenzaClient#createGeometry', ...arguments);
|
|
@@ -436,6 +471,7 @@ export class CadenzaClient {
|
|
|
436
471
|
* - {@link CadenzaEditGeometryUpdateEvent}
|
|
437
472
|
* - {@link CadenzaEditGeometryOkEvent}
|
|
438
473
|
* - {@link CadenzaEditGeometryCancelEvent}
|
|
474
|
+
* @embed
|
|
439
475
|
*/
|
|
440
476
|
async editGeometry(backgroundMapView, geometry, { filter, locationFinder, mapExtent, minScale, useMapSrs, signal } = {}) {
|
|
441
477
|
this.#log('CadenzaClient#editGeometry', ...arguments);
|
|
@@ -472,6 +508,7 @@ export class CadenzaClient {
|
|
|
472
508
|
* - {@link CadenzaObjectInfoEvent}
|
|
473
509
|
* - {@link CadenzaSelectObjectsOkEvent}
|
|
474
510
|
* - {@link CadenzaSelectObjectsCancelEvent}
|
|
511
|
+
* @embed
|
|
475
512
|
*/
|
|
476
513
|
selectObjects(backgroundMapView, { filter, layers, locationFinder, mapExtent, useMapSrs, signal } = {}) {
|
|
477
514
|
this.#log('CadenzaClient#selectObjects', ...arguments);
|
|
@@ -665,19 +702,20 @@ export class CadenzaClient {
|
|
|
665
702
|
* Fetch data from a workbook view.
|
|
666
703
|
*
|
|
667
704
|
* @param {EmbeddingTargetId} source - The workbook view to fetch data from.
|
|
668
|
-
* Currently only table and indicator views are supported.
|
|
669
705
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
670
|
-
* Currently, `"csv"`, `"excel"` and `"json"` are supported
|
|
706
|
+
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
|
|
707
|
+
* and `"pdf"` for views of type "JasperReports report".
|
|
671
708
|
* @param {object} [options] - Options
|
|
672
709
|
* @param {FilterVariables} [options.filter] - Filter variables
|
|
673
710
|
* @param {TablePart[]} [options.parts] - Table parts to export; If not specified, all parts are exported.
|
|
674
711
|
* @param {AbortSignal} [options.signal] - A signal to abort the data fetching
|
|
675
712
|
* @return {Promise<Response>} A `Promise` for the fetch response
|
|
676
713
|
* @throws For invalid arguments
|
|
714
|
+
* @server
|
|
677
715
|
*/
|
|
678
716
|
fetchData(source, dataType, { filter, parts, signal } = {}) {
|
|
679
717
|
this.#log('CadenzaClient#fetchData', ...arguments);
|
|
680
|
-
assertSupportedDataType(dataType, ['csv', 'excel', 'json']);
|
|
718
|
+
assertSupportedDataType(dataType, ['csv', 'excel', 'json', 'pdf']);
|
|
681
719
|
const params = createParams({ dataType, filter, parts });
|
|
682
720
|
return this.#fetch(resolvePath(source), params, signal);
|
|
683
721
|
}
|
|
@@ -687,7 +725,13 @@ export class CadenzaClient {
|
|
|
687
725
|
/** @type AbortSignal | undefined */ signal) {
|
|
688
726
|
const url = this.#createUrl(path, params);
|
|
689
727
|
this.#log('Fetch', url.toString());
|
|
690
|
-
const res = await fetch(url, {
|
|
728
|
+
const res = await fetch(url, {
|
|
729
|
+
signal,
|
|
730
|
+
headers: {
|
|
731
|
+
// Make Cadenza return an error instead of showing an error page.
|
|
732
|
+
'X-Requested-With': 'XMLHttpRequest',
|
|
733
|
+
},
|
|
734
|
+
});
|
|
691
735
|
if (!res.ok) {
|
|
692
736
|
const errorType = {
|
|
693
737
|
400: 'bad-request',
|
|
@@ -703,40 +747,23 @@ export class CadenzaClient {
|
|
|
703
747
|
*
|
|
704
748
|
* _Note:_ The file name, if not provided, is generated from the name of the workbook view and the current date.
|
|
705
749
|
*
|
|
706
|
-
* @param {EmbeddingTargetId} source - The workbook view to
|
|
707
|
-
* Currently only table and indicator views are supported.
|
|
750
|
+
* @param {EmbeddingTargetId} source - The workbook view to fetch data from.
|
|
708
751
|
* @param {DataType} dataType - The data type you want to get back from the server.
|
|
709
|
-
* Currently, `"csv"`, `"excel"` and `"json"` are supported
|
|
752
|
+
* Currently, `"csv"`, `"excel"` and `"json"` are supported for table and indicator views
|
|
753
|
+
* and `"pdf"` for views of type "JasperReports report".
|
|
710
754
|
* @param {object} [options] - Options
|
|
711
755
|
* @param {string} [options.fileName] - The file name to use; The file extension is appended by Cadenza.
|
|
712
756
|
* @param {FilterVariables} [options.filter] - Filter variables
|
|
713
757
|
* @param {TablePart[]} [options.parts] - Table parts to export; If not specified, all parts are exported.
|
|
714
758
|
* @throws For invalid arguments
|
|
759
|
+
* @server
|
|
715
760
|
*/
|
|
716
761
|
downloadData(source, dataType, { fileName, filter, parts } = {}) {
|
|
717
762
|
this.#log('CadenzaClient#downloadData', ...arguments);
|
|
718
|
-
assertSupportedDataType(dataType, ['csv', 'excel', 'json']);
|
|
763
|
+
assertSupportedDataType(dataType, ['csv', 'excel', 'json', 'pdf']);
|
|
719
764
|
const params = createParams({ dataType, fileName, filter, parts });
|
|
720
765
|
this.#download(resolvePath(source), params);
|
|
721
766
|
}
|
|
722
|
-
/**
|
|
723
|
-
* Reload the views of a worksheet.
|
|
724
|
-
* @param {object} [options] - Options
|
|
725
|
-
* @param {boolean} [options.invalidateCaches] - When true, caches will be invalidated for objecttypes used
|
|
726
|
-
* in the worksheet
|
|
727
|
-
*/
|
|
728
|
-
reload({ invalidateCaches = false } = {}) {
|
|
729
|
-
this.#log('CadenzaClient#reload', ...arguments);
|
|
730
|
-
this.#postEvent('reload', { invalidateCaches });
|
|
731
|
-
}
|
|
732
|
-
/**
|
|
733
|
-
* Sends a message to parent Cadenza window to close the window containing this application
|
|
734
|
-
*/
|
|
735
|
-
closeMe() {
|
|
736
|
-
this.#log('CadenzaClient#closeMe');
|
|
737
|
-
assert(this.#iframe == null, 'Cannot send closeMe to iframe');
|
|
738
|
-
this.#postEvent('closeMe');
|
|
739
|
-
}
|
|
740
767
|
#download(/** @type string */ path, /** @type URLSearchParams */ params) {
|
|
741
768
|
const url = this.#createUrl(path, params);
|
|
742
769
|
const a = document.createElement('a');
|
package/package.json
CHANGED
package/sandbox.html
CHANGED
|
@@ -389,6 +389,7 @@
|
|
|
389
389
|
<option>csv</option>
|
|
390
390
|
<option>excel</option>
|
|
391
391
|
<option>json</option>
|
|
392
|
+
<option>pdf</option>
|
|
392
393
|
</select>
|
|
393
394
|
</div>
|
|
394
395
|
<div>
|
|
@@ -501,8 +502,8 @@
|
|
|
501
502
|
<input name="layers" id="layers">
|
|
502
503
|
<small>
|
|
503
504
|
<p>
|
|
504
|
-
A JSON value like <code>["
|
|
505
|
-
<code>[["
|
|
505
|
+
A JSON value like <code>["<layerPrintName>",...]</code> or
|
|
506
|
+
<code>[["<layerGroupPrintName>","<layerPrintName>"],...]</code>
|
|
506
507
|
</p>
|
|
507
508
|
</small>
|
|
508
509
|
</div>
|
|
@@ -547,8 +548,8 @@
|
|
|
547
548
|
<input name="layer" id="layer" required>
|
|
548
549
|
<small>
|
|
549
550
|
<p>
|
|
550
|
-
A JSON value like <code>"
|
|
551
|
-
<code>["
|
|
551
|
+
A JSON value like <code>"<layerPrintName>"</code> or
|
|
552
|
+
<code>["<layerGroupPrintName>","<layerPrintName>"]</code>
|
|
552
553
|
</p>
|
|
553
554
|
</small>
|
|
554
555
|
</div>
|