@disy/cadenza.js 2.9.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/apidoc/assets/highlight.css +14 -0
  3. package/apidoc/assets/search.js +1 -1
  4. package/apidoc/classes/AbortError.html +2 -2
  5. package/apidoc/classes/CadenzaClient.html +35 -25
  6. package/apidoc/classes/CadenzaError.html +3 -3
  7. package/apidoc/functions/cadenza.html +2 -2
  8. package/apidoc/index.html +17 -17
  9. package/apidoc/interfaces/CadenzaClientOptions.html +5 -5
  10. package/apidoc/interfaces/CadenzaEvent.html +3 -3
  11. package/apidoc/interfaces/ExternalLinkKey.html +4 -4
  12. package/apidoc/interfaces/Geometry.html +2 -2
  13. package/apidoc/interfaces/PageSource.html +2 -2
  14. package/apidoc/types/CadenzaChangeSelectionEvent.html +1 -1
  15. package/apidoc/types/CadenzaDrillThroughEvent.html +1 -1
  16. package/apidoc/types/CadenzaEditGeometryCancelEvent.html +1 -1
  17. package/apidoc/types/CadenzaEditGeometryOkEvent.html +1 -1
  18. package/apidoc/types/CadenzaEditGeometryUpdateEvent.html +1 -1
  19. package/apidoc/types/CadenzaErrorEvent.html +1 -1
  20. package/apidoc/types/CadenzaEventByType.html +1 -1
  21. package/apidoc/types/CadenzaEventType.html +1 -1
  22. package/apidoc/types/CadenzaObjectInfoEvent.html +1 -1
  23. package/apidoc/types/CadenzaSelectObjectsCancelEvent.html +1 -1
  24. package/apidoc/types/CadenzaSelectObjectsOkEvent.html +1 -1
  25. package/apidoc/types/DataType.html +1 -1
  26. package/apidoc/types/EmbeddingTargetId.html +1 -1
  27. package/apidoc/types/Extent.html +1 -1
  28. package/apidoc/types/FilterVariables.html +1 -1
  29. package/apidoc/types/GeometryType.html +1 -1
  30. package/apidoc/types/GlobalId.html +1 -1
  31. package/apidoc/types/OpaqueString.html +2 -2
  32. package/apidoc/types/OperationMode.html +1 -1
  33. package/apidoc/types/TablePart.html +1 -1
  34. package/apidoc/types/UiFeature.html +1 -1
  35. package/apidoc/types/WorkbookLayerPath.html +1 -1
  36. package/cadenza.d.ts +47 -20
  37. package/cadenza.js +72 -35
  38. package/package.json +1 -1
  39. 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">&quot;normal&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;simplified&quot;</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/cf1e01eaccf29e32ef406aacab403abd0e5ac80b/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>
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">&quot;columns&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;values&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;totals&quot;</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/cf1e01eaccf29e32ef406aacab403abd0e5ac80b/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>
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>&quot;workbook-design&quot;</code> - The workbook designer</li>
5
5
  <li><code>&quot;workbook-view-management&quot;</code> - Add/Edit/Remove workbook views (Is included in &#39;workbook-design&#39;.)</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/cf1e01eaccf29e32ef406aacab403abd0e5ac80b/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>
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/cf1e01eaccf29e32ef406aacab403abd0e5ac80b/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>
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;
@@ -264,19 +296,26 @@ export class CadenzaClient {
264
296
  * @return {() => void} An unsubscribe function
265
297
  */
266
298
  on<TYPE extends CadenzaEventType>(type: TYPE, subscriber: (event: CadenzaEvent<TYPE, CadenzaEventByType<TYPE>["detail"]>) => void): () => void;
299
+ /**
300
+ * Remove all subscriptions.
301
+ *
302
+ * @see {@link CadenzaClient#on}
303
+ */
304
+ destroy(): void;
267
305
  /**
268
306
  * Fetch data from a workbook view.
269
307
  *
270
308
  * @param {EmbeddingTargetId} source - The workbook view to fetch data from.
271
- * Currently only table and indicator views are supported.
272
309
  * @param {DataType} dataType - The data type you want to get back from the server.
273
- * 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".
274
312
  * @param {object} [options] - Options
275
313
  * @param {FilterVariables} [options.filter] - Filter variables
276
314
  * @param {TablePart[]} [options.parts] - Table parts to export; If not specified, all parts are exported.
277
315
  * @param {AbortSignal} [options.signal] - A signal to abort the data fetching
278
316
  * @return {Promise<Response>} A `Promise` for the fetch response
279
317
  * @throws For invalid arguments
318
+ * @server
280
319
  */
281
320
  fetchData(source: EmbeddingTargetId, dataType: DataType, { filter, parts, signal }?: {
282
321
  filter?: FilterVariables | undefined;
@@ -288,34 +327,22 @@ export class CadenzaClient {
288
327
  *
289
328
  * _Note:_ The file name, if not provided, is generated from the name of the workbook view and the current date.
290
329
  *
291
- * @param {EmbeddingTargetId} source - The workbook view to download data from.
292
- * Currently only table and indicator views are supported.
330
+ * @param {EmbeddingTargetId} source - The workbook view to fetch data from.
293
331
  * @param {DataType} dataType - The data type you want to get back from the server.
294
- * 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".
295
334
  * @param {object} [options] - Options
296
335
  * @param {string} [options.fileName] - The file name to use; The file extension is appended by Cadenza.
297
336
  * @param {FilterVariables} [options.filter] - Filter variables
298
337
  * @param {TablePart[]} [options.parts] - Table parts to export; If not specified, all parts are exported.
299
338
  * @throws For invalid arguments
339
+ * @server
300
340
  */
301
341
  downloadData(source: EmbeddingTargetId, dataType: DataType, { fileName, filter, parts }?: {
302
342
  fileName?: string | undefined;
303
343
  filter?: FilterVariables | undefined;
304
344
  parts?: TablePart[] | undefined;
305
345
  } | undefined, ...args: any[]): void;
306
- /**
307
- * Reload the views of a worksheet.
308
- * @param {object} [options] - Options
309
- * @param {boolean} [options.invalidateCaches] - When true, caches will be invalidated for objecttypes used
310
- * in the worksheet
311
- */
312
- reload({ invalidateCaches }?: {
313
- invalidateCaches?: boolean | undefined;
314
- } | undefined, ...args: any[]): void;
315
- /**
316
- * Sends a message to parent Cadenza window to close the window containing this application
317
- */
318
- closeMe(): void;
319
346
  #private;
320
347
  }
321
348
  /**
@@ -420,7 +447,7 @@ export type CadenzaClientOptions = {
420
447
  * The idea is to have a specific type e.g. for the {@link EmbeddingTargetId } instead of a plain `string`.
421
448
  * You don't need to _actually_ add that `__type` property. In TS code, just use a
422
449
  * [type assertion](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions)
423
- * (e.g. `cadenzaClient.show('{embeddingTargetId}' as EmbeddingTargetId)`).
450
+ * (e.g. `cadenzaClient.show('<embeddingTargetId>' as EmbeddingTargetId)`).
424
451
  */
425
452
  export type OpaqueString<T extends string> = string & {
426
453
  __type: T;
@@ -446,7 +473,7 @@ export type GlobalId = OpaqueString<'GlobalId'>;
446
473
  *
447
474
  * You get the `repositoryName` and `externalLinkId` from the URL of the external link's page in the Cadenza management center:
448
475
  * ```
449
- * {baseUrl}/admin/repositories/{repositoryName}/external-links/{externalLinkId}?...
476
+ * <baseUrl>/admin/repositories/<repositoryName>/external-links/<externalLinkId>?...
450
477
  * ```
451
478
  */
452
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('{embeddingTargetId}' as EmbeddingTargetId)`).
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
- * {baseUrl}/admin/repositories/{repositoryName}/external-links/{externalLinkId}?...
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}.
@@ -190,12 +195,11 @@ export class CadenzaClient {
190
195
  return this.#iframeElement;
191
196
  }
192
197
  get #targetWindow() {
193
- if (this.#iframe) {
194
- return /** @type {WindowProxy} */ (this.#requiredIframe.contentWindow);
195
- }
196
- const targetWindow = window.opener ?? window.parent;
197
- assert(targetWindow !== window, 'Cannot find target window');
198
- return /** @type {WindowProxy} */ targetWindow;
198
+ const targetWindow = this.#iframe
199
+ ? this.iframe?.contentWindow
200
+ : // If a window does not have a parent, its parent property is a reference to itself.
201
+ window.opener ?? (window.parent !== window ? window.parent : null);
202
+ return /** @type {WindowProxy | null} */ targetWindow;
199
203
  }
200
204
  get #requiredIframe() {
201
205
  const iframe = /** @type {HTMLIFrameElement} */ (this.iframe);
@@ -223,6 +227,7 @@ export class CadenzaClient {
223
227
  * @return {Promise<void>} A `Promise` for when the iframe is loaded
224
228
  * @throws For invalid arguments
225
229
  * @fires {@link CadenzaDrillThroughEvent}
230
+ * @embed
226
231
  */
227
232
  show(source, { dataType, disabledUiFeatures, expandNavigator, filter, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, labelSet, operationMode, signal, } = {}) {
228
233
  this.#log('CadenzaClient#show', ...arguments);
@@ -247,6 +252,26 @@ export class CadenzaClient {
247
252
  });
248
253
  return this.#show(resolvePath(source), params, signal);
249
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
+ }
250
275
  /**
251
276
  * Show a workbook map view in an iframe.
252
277
  *
@@ -267,6 +292,7 @@ export class CadenzaClient {
267
292
  * @return {Promise<void>} A `Promise` for when the iframe is loaded
268
293
  * @throws For invalid arguments
269
294
  * @fires {@link CadenzaDrillThroughEvent}
295
+ * @embed
270
296
  */
271
297
  async showMap(mapView, { disabledUiFeatures, expandNavigator, filter, geometry, hideMainHeaderAndFooter, hideWorkbookToolBar, highlightGlobalId, locationFinder, mapExtent, operationMode, useMapSrs, signal, } = {}) {
272
298
  this.#log('CadenzaClient#showMap', ...arguments);
@@ -295,6 +321,7 @@ export class CadenzaClient {
295
321
  * Expand/collapse the navigator.
296
322
  *
297
323
  * @param {boolean} expanded - The expansion state of the navigator
324
+ * @postMessage
298
325
  */
299
326
  expandNavigator(expanded = true) {
300
327
  this.#log('CadenzaClient#expandNavigator', ...arguments);
@@ -309,6 +336,7 @@ export class CadenzaClient {
309
336
  * @template {DataType} T
310
337
  * @param {T} dataType - The requested data type. Currently, only `"png"` is supported.
311
338
  * @return {Promise<T extends 'png' ? Blob : never>}
339
+ * @postMessage
312
340
  */
313
341
  async getData(dataType) {
314
342
  this.#log('CadenzaClient#getData', ...arguments);
@@ -321,6 +349,7 @@ export class CadenzaClient {
321
349
  * @hidden
322
350
  * @param {FilterVariables} filter - The variable values
323
351
  * @return {Promise<void>} A `Promise` for when the filter variables were set.
352
+ * @postMessage
324
353
  */
325
354
  setFilter(filter) {
326
355
  this.#log('CadenzaClient#setFilter', ...arguments);
@@ -337,6 +366,7 @@ export class CadenzaClient {
337
366
  * (identified using a layer path or a print name)
338
367
  * @param {boolean} visible - The visibility state of the layer
339
368
  * @return {Promise<void>} A `Promise` for when the layer visibility was set.
369
+ * @postMessage
340
370
  */
341
371
  setLayerVisibility(layer, visible) {
342
372
  this.#log('CadenzaClient#setLayerVisibility', ...arguments);
@@ -352,6 +382,7 @@ export class CadenzaClient {
352
382
  * @param {WorkbookLayerPath | string} layer - The data view layer to set the selection in
353
383
  * @param {unknown[]} values - The IDs of the objects to select
354
384
  * @return {Promise<void>} A `Promise` for when the selection was set.
385
+ * @postMessage
355
386
  */
356
387
  setSelection(layer, values) {
357
388
  this.#log('CadenzaClient#setSelection', ...arguments);
@@ -364,6 +395,7 @@ export class CadenzaClient {
364
395
  * @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
365
396
  * @param {unknown[]} values - The IDs of the objects to select
366
397
  * @return {Promise<void>} A `Promise` for when the selection was changed.
398
+ * @postMessage
367
399
  */
368
400
  addSelection(layer, values) {
369
401
  this.#log('CadenzaClient#addSelection', ...arguments);
@@ -376,6 +408,7 @@ export class CadenzaClient {
376
408
  * @param {WorkbookLayerPath | string} layer - The data view layer to change the selection in
377
409
  * @param {unknown[]} values - The IDs of the objects to unselect
378
410
  * @return {Promise<void>} A `Promise` for when the selection was changed.
411
+ * @postMessage
379
412
  */
380
413
  removeSelection(layer, values) {
381
414
  this.#log('CadenzaClient#removeSelection', ...arguments);
@@ -405,6 +438,7 @@ export class CadenzaClient {
405
438
  * - {@link CadenzaEditGeometryUpdateEvent}
406
439
  * - {@link CadenzaEditGeometryOkEvent}
407
440
  * - {@link CadenzaEditGeometryCancelEvent}
441
+ * @embed
408
442
  */
409
443
  createGeometry(backgroundMapView, geometryType, { filter, locationFinder, mapExtent, minScale, useMapSrs, signal } = {}) {
410
444
  this.#log('CadenzaClient#createGeometry', ...arguments);
@@ -437,6 +471,7 @@ export class CadenzaClient {
437
471
  * - {@link CadenzaEditGeometryUpdateEvent}
438
472
  * - {@link CadenzaEditGeometryOkEvent}
439
473
  * - {@link CadenzaEditGeometryCancelEvent}
474
+ * @embed
440
475
  */
441
476
  async editGeometry(backgroundMapView, geometry, { filter, locationFinder, mapExtent, minScale, useMapSrs, signal } = {}) {
442
477
  this.#log('CadenzaClient#editGeometry', ...arguments);
@@ -473,6 +508,7 @@ export class CadenzaClient {
473
508
  * - {@link CadenzaObjectInfoEvent}
474
509
  * - {@link CadenzaSelectObjectsOkEvent}
475
510
  * - {@link CadenzaSelectObjectsCancelEvent}
511
+ * @embed
476
512
  */
477
513
  selectObjects(backgroundMapView, { filter, layers, locationFinder, mapExtent, useMapSrs, signal } = {}) {
478
514
  this.#log('CadenzaClient#selectObjects', ...arguments);
@@ -611,6 +647,15 @@ export class CadenzaClient {
611
647
  }
612
648
  });
613
649
  };
650
+ /**
651
+ * Remove all subscriptions.
652
+ *
653
+ * @see {@link CadenzaClient#on}
654
+ */
655
+ destroy() {
656
+ this.#subscriptions = [];
657
+ window.removeEventListener('message', this.#onMessage);
658
+ }
614
659
  /**
615
660
  * Posts an event to Cadenza and returns a `Promise` for the response.
616
661
  *
@@ -646,7 +691,9 @@ export class CadenzaClient {
646
691
  #postEvent(type, detail, transfer) {
647
692
  const cadenzaEvent = { type, detail };
648
693
  this.#log('postMessage', cadenzaEvent);
649
- this.#targetWindow.postMessage(cadenzaEvent, {
694
+ const targetWindow = this.#targetWindow;
695
+ assert(targetWindow != null, 'Cannot find target window');
696
+ targetWindow.postMessage(cadenzaEvent, {
650
697
  targetOrigin: this.#origin,
651
698
  transfer,
652
699
  });
@@ -655,19 +702,20 @@ export class CadenzaClient {
655
702
  * Fetch data from a workbook view.
656
703
  *
657
704
  * @param {EmbeddingTargetId} source - The workbook view to fetch data from.
658
- * Currently only table and indicator views are supported.
659
705
  * @param {DataType} dataType - The data type you want to get back from the server.
660
- * 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".
661
708
  * @param {object} [options] - Options
662
709
  * @param {FilterVariables} [options.filter] - Filter variables
663
710
  * @param {TablePart[]} [options.parts] - Table parts to export; If not specified, all parts are exported.
664
711
  * @param {AbortSignal} [options.signal] - A signal to abort the data fetching
665
712
  * @return {Promise<Response>} A `Promise` for the fetch response
666
713
  * @throws For invalid arguments
714
+ * @server
667
715
  */
668
716
  fetchData(source, dataType, { filter, parts, signal } = {}) {
669
717
  this.#log('CadenzaClient#fetchData', ...arguments);
670
- assertSupportedDataType(dataType, ['csv', 'excel', 'json']);
718
+ assertSupportedDataType(dataType, ['csv', 'excel', 'json', 'pdf']);
671
719
  const params = createParams({ dataType, filter, parts });
672
720
  return this.#fetch(resolvePath(source), params, signal);
673
721
  }
@@ -677,7 +725,13 @@ export class CadenzaClient {
677
725
  /** @type AbortSignal | undefined */ signal) {
678
726
  const url = this.#createUrl(path, params);
679
727
  this.#log('Fetch', url.toString());
680
- const res = await fetch(url, { signal });
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
+ });
681
735
  if (!res.ok) {
682
736
  const errorType = {
683
737
  400: 'bad-request',
@@ -693,40 +747,23 @@ export class CadenzaClient {
693
747
  *
694
748
  * _Note:_ The file name, if not provided, is generated from the name of the workbook view and the current date.
695
749
  *
696
- * @param {EmbeddingTargetId} source - The workbook view to download data from.
697
- * Currently only table and indicator views are supported.
750
+ * @param {EmbeddingTargetId} source - The workbook view to fetch data from.
698
751
  * @param {DataType} dataType - The data type you want to get back from the server.
699
- * 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".
700
754
  * @param {object} [options] - Options
701
755
  * @param {string} [options.fileName] - The file name to use; The file extension is appended by Cadenza.
702
756
  * @param {FilterVariables} [options.filter] - Filter variables
703
757
  * @param {TablePart[]} [options.parts] - Table parts to export; If not specified, all parts are exported.
704
758
  * @throws For invalid arguments
759
+ * @server
705
760
  */
706
761
  downloadData(source, dataType, { fileName, filter, parts } = {}) {
707
762
  this.#log('CadenzaClient#downloadData', ...arguments);
708
- assertSupportedDataType(dataType, ['csv', 'excel', 'json']);
763
+ assertSupportedDataType(dataType, ['csv', 'excel', 'json', 'pdf']);
709
764
  const params = createParams({ dataType, fileName, filter, parts });
710
765
  this.#download(resolvePath(source), params);
711
766
  }
712
- /**
713
- * Reload the views of a worksheet.
714
- * @param {object} [options] - Options
715
- * @param {boolean} [options.invalidateCaches] - When true, caches will be invalidated for objecttypes used
716
- * in the worksheet
717
- */
718
- reload({ invalidateCaches = false } = {}) {
719
- this.#log('CadenzaClient#reload', ...arguments);
720
- this.#postEvent('reload', { invalidateCaches });
721
- }
722
- /**
723
- * Sends a message to parent Cadenza window to close the window containing this application
724
- */
725
- closeMe() {
726
- this.#log('CadenzaClient#closeMe');
727
- assert(this.#iframe == null, 'Cannot send closeMe to iframe');
728
- this.#postEvent('closeMe');
729
- }
730
767
  #download(/** @type string */ path, /** @type URLSearchParams */ params) {
731
768
  const url = this.#createUrl(path, params);
732
769
  const a = document.createElement('a');