Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
jsdoc fixes to make export simpler
zadamc5ab6fa2faf4
diff --git a/docs/backend_api/AbstractBeccaEntity.html b/docs/backend_api/AbstractBeccaEntity.htmlindex ad11edfb0d..c520b336a8 100644--- a/docs/backend_api/AbstractBeccaEntity.html+++ b/docs/backend_api/AbstractBeccaEntity.html@@ -90,11 +90,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line16">line 16</a>- </li></ul></dd>@@ -180,11 +175,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line53">line 53</a>- </li></ul></dd>@@ -256,11 +246,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line62">line 62</a>- </li></ul></dd>@@ -340,11 +325,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line18">line 18</a>- </li></ul></dd>@@ -424,11 +404,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line30">line 30</a>- </li></ul></dd>@@ -508,11 +483,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line23">line 23</a>- </li></ul></dd>@@ -592,11 +562,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>- </li></ul></dd>@@ -676,11 +641,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line45">line 45</a>- </li></ul></dd>@@ -830,11 +790,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>- </li></ul></dd>@@ -918,11 +873,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line83">line 83</a>- </li></ul></dd>@@ -985,7 +935,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/backend_api/BAttribute.html b/docs/backend_api/BAttribute.htmlindex 8ae4ede4fc..a2d37d4c55 100644--- a/docs/backend_api/BAttribute.html+++ b/docs/backend_api/BAttribute.html@@ -91,11 +91,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line16">line 16</a>- </li></ul></dd>@@ -202,11 +197,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line47">line 47</a>- </li></ul></dd>@@ -266,11 +256,6 @@ and relation (representing named relationship between source and target note)</d- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line53">line 53</a>- </li></ul></dd>-@@ -333,11 +318,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line59">line 59</a>- </li></ul></dd>@@ -401,11 +381,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line53">line 53</a>- </li></ul></dd>@@ -469,11 +444,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line49">line 49</a>- </li></ul></dd>@@ -537,11 +507,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line55">line 55</a>- </li></ul></dd>@@ -605,11 +570,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line51">line 51</a>- </li></ul></dd>@@ -673,11 +633,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line61">line 61</a>- </li></ul></dd>@@ -741,11 +696,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line57">line 57</a>- </li></ul></dd>@@ -823,11 +773,6 @@ and relation (representing named relationship between source and target note)</d- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line62">line 62</a>- </li></ul></dd>-@@ -912,11 +857,6 @@ and relation (representing named relationship between source and target note)</d- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line18">line 18</a>- </li></ul></dd>-@@ -1001,11 +941,6 @@ and relation (representing named relationship between source and target note)</d- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line30">line 30</a>- </li></ul></dd>-@@ -1090,11 +1025,6 @@ and relation (representing named relationship between source and target note)</d- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line23">line 23</a>- </li></ul></dd>-@@ -1173,11 +1103,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line129">line 129</a>- </li></ul></dd>@@ -1284,11 +1209,6 @@ and relation (representing named relationship between source and target note)</d- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>- </li></ul></dd>-@@ -1367,11 +1287,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line142">line 142</a>- </li></ul></dd>@@ -1478,11 +1393,6 @@ and relation (representing named relationship between source and target note)</d- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line45">line 45</a>- </li></ul></dd>-@@ -1561,11 +1471,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line157">line 157</a>- </li></ul></dd>@@ -1739,11 +1644,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>- </li></ul></dd>-@@ -1832,11 +1732,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line83">line 83</a>- </li></ul></dd>-@@ -1898,7 +1793,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/backend_api/BBranch.html b/docs/backend_api/BBranch.htmlindex 7aea50f323..e12dbf8298 100644--- a/docs/backend_api/BBranch.html+++ b/docs/backend_api/BBranch.html@@ -94,11 +94,6 @@ Always check noteId instead.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line20">line 20</a>- </li></ul></dd>@@ -201,11 +196,6 @@ Always check noteId instead.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line53">line 53</a>- </li></ul></dd>-@@ -268,11 +258,6 @@ Always check noteId instead.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line51">line 51</a>- </li></ul></dd>@@ -326,11 +311,6 @@ Always check noteId instead.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line97">line 97</a>- </li></ul></dd>@@ -394,11 +374,6 @@ Always check noteId instead.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line61">line 61</a>- </li></ul></dd>@@ -460,11 +435,6 @@ of deletion should not act as a clone.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line133">line 133</a>- </li></ul></dd>@@ -528,11 +498,6 @@ of deletion should not act as a clone.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line53">line 53</a>- </li></ul></dd>@@ -596,11 +561,6 @@ of deletion should not act as a clone.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line59">line 59</a>- </li></ul></dd>@@ -654,11 +614,6 @@ of deletion should not act as a clone.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line111">line 111</a>- </li></ul></dd>@@ -722,11 +677,6 @@ of deletion should not act as a clone.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line55">line 55</a>- </li></ul></dd>@@ -790,11 +740,6 @@ of deletion should not act as a clone.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line57">line 57</a>- </li></ul></dd>@@ -858,11 +803,6 @@ of deletion should not act as a clone.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line63">line 63</a>- </li></ul></dd>@@ -940,11 +880,6 @@ of deletion should not act as a clone.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line62">line 62</a>- </li></ul></dd>-@@ -1029,11 +964,6 @@ of deletion should not act as a clone.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line18">line 18</a>- </li></ul></dd>-@@ -1210,11 +1140,6 @@ of deletion should not act as a clone.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bbranch.js.html">becca/entities/bbranch.js</a>, <a href="becca_entities_bbranch.js.html#line145">line 145</a>- </li></ul></dd>@@ -1322,11 +1247,6 @@ of deletion should not act as a clone.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line30">line 30</a>- </li></ul></dd>-@@ -1411,11 +1331,6 @@ of deletion should not act as a clone.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line23">line 23</a>- </li></ul></dd>-@@ -1500,11 +1415,6 @@ of deletion should not act as a clone.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>- </li></ul></dd>-@@ -1589,11 +1499,6 @@ of deletion should not act as a clone.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line45">line 45</a>- </li></ul></dd>-@@ -1748,11 +1653,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>- </li></ul></dd>-@@ -1841,11 +1741,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line83">line 83</a>- </li></ul></dd>-@@ -1907,7 +1802,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/backend_api/BEtapiToken.html b/docs/backend_api/BEtapiToken.htmlindex 3e9bcbe39b..3ef7442521 100644--- a/docs/backend_api/BEtapiToken.html+++ b/docs/backend_api/BEtapiToken.html@@ -96,11 +96,6 @@ from tokenHash and token.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line17">line 17</a>- </li></ul></dd>@@ -203,11 +198,6 @@ from tokenHash and token.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line53">line 53</a>- </li></ul></dd>-@@ -270,11 +260,6 @@ from tokenHash and token.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line35">line 35</a>- </li></ul></dd>@@ -338,11 +323,6 @@ from tokenHash and token.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line45">line 45</a>- </li></ul></dd>@@ -406,11 +386,6 @@ from tokenHash and token.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line37">line 37</a>- </li></ul></dd>@@ -474,11 +449,6 @@ from tokenHash and token.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line39">line 39</a>- </li></ul></dd>@@ -542,11 +512,6 @@ from tokenHash and token.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line41">line 41</a>- </li></ul></dd>@@ -610,11 +575,6 @@ from tokenHash and token.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_betapi_token.js.html">becca/entities/betapi_token.js</a>, <a href="becca_entities_betapi_token.js.html#line43">line 43</a>- </li></ul></dd>@@ -692,11 +652,6 @@ from tokenHash and token.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line62">line 62</a>- </li></ul></dd>-@@ -781,11 +736,6 @@ from tokenHash and token.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line18">line 18</a>- </li></ul></dd>-@@ -870,11 +820,6 @@ from tokenHash and token.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line30">line 30</a>- </li></ul></dd>-@@ -959,11 +904,6 @@ from tokenHash and token.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line23">line 23</a>- </li></ul></dd>-@@ -1048,11 +988,6 @@ from tokenHash and token.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>- </li></ul></dd>-@@ -1137,11 +1072,6 @@ from tokenHash and token.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line45">line 45</a>- </li></ul></dd>-@@ -1296,11 +1226,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>- </li></ul></dd>-@@ -1389,11 +1314,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line83">line 83</a>- </li></ul></dd>-@@ -1455,7 +1375,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/backend_api/BNote.html b/docs/backend_api/BNote.htmlindex cc39f22167..1ca80c827d 100644--- a/docs/backend_api/BNote.html+++ b/docs/backend_api/BNote.html@@ -90,11 +90,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line24">line 24</a>- </li></ul></dd>@@ -197,11 +192,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line53">line 53</a>- </li></ul></dd>-@@ -264,11 +254,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line68">line 68</a>- </li></ul></dd>@@ -332,11 +317,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line70">line 70</a>- </li></ul></dd>@@ -403,11 +383,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line86">line 86</a>- </li></ul></dd>@@ -475,11 +450,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line76">line 76</a>- </li></ul></dd>@@ -543,11 +513,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line81">line 81</a>- </li></ul></dd>@@ -611,11 +576,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line62">line 62</a>- </li></ul></dd>@@ -679,11 +639,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line66">line 66</a>- </li></ul></dd>@@ -747,11 +702,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line58">line 58</a>- </li></ul></dd>@@ -815,11 +765,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line60">line 60</a>- </li></ul></dd>@@ -883,11 +828,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line64">line 64</a>- </li></ul></dd>@@ -951,11 +891,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line72">line 72</a>- </li></ul></dd>@@ -1019,11 +954,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line74">line 74</a>- </li></ul></dd>@@ -1315,11 +1245,6 @@ See addLabel, addRelation for more specific methods.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1179">line 1179</a>- </li></ul></dd>@@ -1423,11 +1348,6 @@ See addLabel, addRelation for more specific methods.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line62">line 62</a>- </li></ul></dd>-@@ -1651,11 +1571,6 @@ See addLabel, addRelation for more specific methods.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1200">line 1200</a>- </li></ul></dd>@@ -1897,11 +1812,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1213">line 1213</a>- </li></ul></dd>@@ -2005,11 +1915,6 @@ returned.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line18">line 18</a>- </li></ul></dd>-@@ -2132,11 +2037,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1298">line 1298</a>- </li></ul></dd>@@ -2332,11 +2232,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1312">line 1312</a>- </li></ul></dd>@@ -2422,11 +2317,6 @@ returned.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line30">line 30</a>- </li></ul></dd>-@@ -2511,11 +2401,6 @@ returned.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line23">line 23</a>- </li></ul></dd>-@@ -2594,11 +2479,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1093">line 1093</a>- </li></ul></dd>@@ -2700,11 +2580,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1009">line 1009</a>- </li></ul></dd>@@ -2874,11 +2749,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line600">line 600</a>- </li></ul></dd>@@ -3052,11 +2922,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line611">line 611</a>- </li></ul></dd>@@ -3255,11 +3120,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line374">line 374</a>- </li></ul></dd>@@ -3316,7 +3176,7 @@ returned.- <h4 class="name" id="getBranches"><span class="type-signature"></span>getBranches<span class="signature">()</span><span class="type-signature"> → {Array.<Branch>}</span></h4>+ <h4 class="name" id="getBranches"><span class="type-signature"></span>getBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="BBranch.html">BBranch</a>>}</span></h4>@@ -3364,11 +3224,6 @@ returned.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line172">line 172</a>- </li></ul></dd>-@@ -3402,7 +3257,7 @@ returned.</dt><dd>-<span class="param-type">Array.<Branch></span>+<span class="param-type">Array.<<a href="BBranch.html">BBranch</a>></span></dd>@@ -3420,7 +3275,7 @@ returned.- <h4 class="name" id="getChildBranches"><span class="type-signature"></span>getChildBranches<span class="signature">()</span><span class="type-signature"> → {Array.<Branch>}</span></h4>+ <h4 class="name" id="getChildBranches"><span class="type-signature"></span>getChildBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="BBranch.html">BBranch</a>>}</span></h4>@@ -3465,11 +3320,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line192">line 192</a>- </li></ul></dd>@@ -3504,7 +3354,7 @@ returned.</dt><dd>-<span class="param-type">Array.<Branch></span>+<span class="param-type">Array.<<a href="BBranch.html">BBranch</a>></span></dd>@@ -3567,11 +3417,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line182">line 182</a>- </li></ul></dd>@@ -3669,11 +3514,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line206">line 206</a>- </li></ul></dd>@@ -3771,11 +3611,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line240">line 240</a>- </li></ul></dd>@@ -3876,11 +3711,6 @@ returned.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line956">line 956</a>- </li></ul></dd>-@@ -3965,11 +3795,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line740">line 740</a>- </li></ul></dd>@@ -4071,11 +3896,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line267">line 267</a>- </li></ul></dd>@@ -4222,11 +4042,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line541">line 541</a>- </li></ul></dd>@@ -4380,11 +4195,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line565">line 565</a>- </li></ul></dd>@@ -4550,11 +4360,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line640">line 640</a>- </li></ul></dd>@@ -4717,11 +4522,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line632">line 632</a>- </li></ul></dd>@@ -4823,11 +4623,6 @@ returned.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line707">line 707</a>- </li></ul></dd>@@ -5003,11 +4798,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line622">line 622</a>- </li></ul></dd>@@ -5268,11 +5058,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line682">line 682</a>- </li></ul></dd>@@ -5423,11 +5208,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line547">line 547</a>- </li></ul></dd>@@ -5581,11 +5361,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line571">line 571</a>- </li></ul></dd>@@ -5751,11 +5526,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line656">line 656</a>- </li></ul></dd>@@ -5918,11 +5688,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line648">line 648</a>- </li></ul></dd>@@ -6073,11 +5838,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line559">line 559</a>- </li></ul></dd>@@ -6231,11 +5991,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line583">line 583</a>- </li></ul></dd>@@ -6401,11 +6156,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line672">line 672</a>- </li></ul></dd>@@ -6462,7 +6212,7 @@ This method can be significantly faster than the getAttribute()- <h4 class="name" id="getParentBranches"><span class="type-signature"></span>getParentBranches<span class="signature">()</span><span class="type-signature"> → {Array.<Branch>}</span></h4>+ <h4 class="name" id="getParentBranches"><span class="type-signature"></span>getParentBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="BBranch.html">BBranch</a>>}</span></h4>@@ -6507,11 +6257,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line155">line 155</a>- </li></ul></dd>@@ -6546,7 +6291,7 @@ This method can be significantly faster than the getAttribute()</dt><dd>-<span class="param-type">Array.<Branch></span>+<span class="param-type">Array.<<a href="BBranch.html">BBranch</a>></span></dd>@@ -6609,11 +6354,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line177">line 177</a>- </li></ul></dd>@@ -6717,11 +6457,6 @@ This method can be significantly faster than the getAttribute()- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>- </li></ul></dd>-@@ -6849,11 +6584,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line553">line 553</a>- </li></ul></dd>@@ -7007,11 +6737,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line577">line 577</a>- </li></ul></dd>@@ -7177,11 +6902,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line664">line 664</a>- </li></ul></dd>@@ -7283,11 +7003,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line353">line 353</a>- </li></ul></dd>@@ -7392,11 +7107,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line867">line 867</a>- </li></ul></dd>@@ -7449,7 +7159,7 @@ This method can be significantly faster than the getAttribute()- <h4 class="name" id="getStrongParentBranches"><span class="type-signature"></span>getStrongParentBranches<span class="signature">()</span><span class="type-signature"> → {Array.<Branch>}</span></h4>+ <h4 class="name" id="getStrongParentBranches"><span class="type-signature"></span>getStrongParentBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="BBranch.html">BBranch</a>>}</span></h4>@@ -7498,11 +7208,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line164">line 164</a>- </li></ul></dd>@@ -7537,7 +7242,7 @@ This method can be significantly faster than the getAttribute()</dt><dd>-<span class="param-type">Array.<Branch></span>+<span class="param-type">Array.<<a href="BBranch.html">BBranch</a>></span></dd>@@ -7600,11 +7305,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line890">line 890</a>- </li></ul></dd>@@ -7702,11 +7402,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line949">line 949</a>- </li></ul></dd>@@ -7808,11 +7503,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line836">line 836</a>- </li></ul></dd>@@ -7910,11 +7600,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1055">line 1055</a>- </li></ul></dd>@@ -8023,11 +7708,6 @@ This method can be significantly faster than the getAttribute()- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line45">line 45</a>- </li></ul></dd>-@@ -8106,11 +7786,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1035">line 1035</a>- </li></ul></dd>@@ -8332,11 +8007,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line485">line 485</a>- </li></ul></dd>@@ -8434,11 +8104,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line187">line 187</a>- </li></ul></dd>@@ -8628,11 +8293,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line514">line 514</a>- </li></ul></dd>@@ -8857,11 +8517,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line591">line 591</a>- </li></ul></dd>@@ -9055,11 +8710,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line521">line 521</a>- </li></ul></dd>@@ -9253,11 +8903,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line535">line 535</a>- </li></ul></dd>@@ -9451,11 +9096,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line528">line 528</a>- </li></ul></dd>@@ -9601,11 +9241,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1114">line 1114</a>- </li></ul></dd>@@ -9707,11 +9342,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line342">line 342</a>- </li></ul></dd>@@ -9813,11 +9443,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line334">line 334</a>- </li></ul></dd>@@ -9919,11 +9544,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line329">line 329</a>- </li></ul></dd>@@ -10025,11 +9645,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line324">line 324</a>- </li></ul></dd>@@ -10131,11 +9746,6 @@ This method can be significantly faster than the getAttribute()-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line348">line 348</a>- </li></ul></dd>@@ -10313,11 +9923,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>- </li></ul></dd>-@@ -10523,11 +10128,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1158">line 1158</a>- </li></ul></dd>@@ -10703,11 +10303,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1274">line 1274</a>- </li></ul></dd>@@ -10883,11 +10478,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1282">line 1282</a>- </li></ul></dd>@@ -10977,11 +10567,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line83">line 83</a>- </li></ul></dd>-@@ -11078,11 +10663,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1364">line 1364</a>- </li></ul></dd>@@ -11310,11 +10890,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1127">line 1127</a>- </li></ul></dd>@@ -11490,11 +11065,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1258">line 1258</a>- </li></ul></dd>@@ -11650,11 +11220,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1266">line 1266</a>- </li></ul></dd>@@ -11892,11 +11457,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1225">line 1225</a>- </li></ul></dd>@@ -12103,11 +11663,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1241">line 1241</a>- </li></ul></dd>@@ -12314,11 +11869,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1250">line 1250</a>- </li></ul></dd>@@ -12363,7 +11913,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/backend_api/BNoteRevision.html b/docs/backend_api/BNoteRevision.htmlindex 220d0b2942..5b9b4b3365 100644--- a/docs/backend_api/BNoteRevision.html+++ b/docs/backend_api/BNoteRevision.html@@ -91,11 +91,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line17">line 17</a>- </li></ul></dd>@@ -198,11 +193,6 @@ It's used for seamless note versioning.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line53">line 53</a>- </li></ul></dd>-@@ -265,11 +255,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line48">line 48</a>- </li></ul></dd>@@ -333,11 +318,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line40">line 40</a>- </li></ul></dd>@@ -401,11 +381,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line38">line 38</a>- </li></ul></dd>@@ -469,11 +444,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line34">line 34</a>- </li></ul></dd>@@ -537,11 +507,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line32">line 32</a>- </li></ul></dd>@@ -605,11 +570,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line28">line 28</a>- </li></ul></dd>@@ -673,11 +633,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line26">line 26</a>- </li></ul></dd>@@ -741,11 +696,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line36">line 36</a>- </li></ul></dd>@@ -809,11 +759,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line30">line 30</a>- </li></ul></dd>@@ -877,11 +822,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line44">line 44</a>- </li></ul></dd>@@ -945,11 +885,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line42">line 42</a>- </li></ul></dd>@@ -1013,11 +948,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line46">line 46</a>- </li></ul></dd>@@ -1095,11 +1025,6 @@ It's used for seamless note versioning.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line62">line 62</a>- </li></ul></dd>-@@ -1184,11 +1109,6 @@ It's used for seamless note versioning.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line18">line 18</a>- </li></ul></dd>-@@ -1273,11 +1193,6 @@ It's used for seamless note versioning.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line30">line 30</a>- </li></ul></dd>-@@ -1362,11 +1277,6 @@ It's used for seamless note versioning.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line23">line 23</a>- </li></ul></dd>-@@ -1445,11 +1355,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line76">line 76</a>- </li></ul></dd>@@ -1547,11 +1452,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line140">line 140</a>- </li></ul></dd>@@ -1655,11 +1555,6 @@ It's used for seamless note versioning.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>- </li></ul></dd>-@@ -1744,11 +1639,6 @@ It's used for seamless note versioning.</div>- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line45">line 45</a>- </li></ul></dd>-@@ -1827,11 +1717,6 @@ It's used for seamless note versioning.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote_revision.js.html">becca/entities/bnote_revision.js</a>, <a href="becca_entities_bnote_revision.js.html#line62">line 62</a>- </li></ul></dd>@@ -2009,11 +1894,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>- </li></ul></dd>-@@ -2102,11 +1982,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line83">line 83</a>- </li></ul></dd>-@@ -2168,7 +2043,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/backend_api/BOption.html b/docs/backend_api/BOption.htmlindex 729982cb5d..d99af85401 100644--- a/docs/backend_api/BOption.html+++ b/docs/backend_api/BOption.html@@ -90,11 +90,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_boption.js.html">becca/entities/boption.js</a>, <a href="becca_entities_boption.js.html#line11">line 11</a>- </li></ul></dd>@@ -197,11 +192,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line53">line 53</a>- </li></ul></dd>-@@ -264,11 +254,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_boption.js.html">becca/entities/boption.js</a>, <a href="becca_entities_boption.js.html#line24">line 24</a>- </li></ul></dd>@@ -332,11 +317,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_boption.js.html">becca/entities/boption.js</a>, <a href="becca_entities_boption.js.html#line20">line 20</a>- </li></ul></dd>@@ -400,11 +380,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_boption.js.html">becca/entities/boption.js</a>, <a href="becca_entities_boption.js.html#line26">line 26</a>- </li></ul></dd>@@ -468,11 +443,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_boption.js.html">becca/entities/boption.js</a>, <a href="becca_entities_boption.js.html#line22">line 22</a>- </li></ul></dd>@@ -550,11 +520,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line62">line 62</a>- </li></ul></dd>-@@ -639,11 +604,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line18">line 18</a>- </li></ul></dd>-@@ -728,11 +688,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line30">line 30</a>- </li></ul></dd>-@@ -817,11 +772,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line23">line 23</a>- </li></ul></dd>-@@ -906,11 +856,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>- </li></ul></dd>-@@ -995,11 +940,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line45">line 45</a>- </li></ul></dd>-@@ -1154,11 +1094,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>- </li></ul></dd>-@@ -1247,11 +1182,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line83">line 83</a>- </li></ul></dd>-@@ -1313,7 +1243,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/backend_api/BRecentNote.html b/docs/backend_api/BRecentNote.htmlindex 62fc0b0995..33f9799e9d 100644--- a/docs/backend_api/BRecentNote.html+++ b/docs/backend_api/BRecentNote.html@@ -90,11 +90,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_brecent_note.js.html">becca/entities/brecent_note.js</a>, <a href="becca_entities_brecent_note.js.html#line11">line 11</a>- </li></ul></dd>@@ -197,11 +192,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line53">line 53</a>- </li></ul></dd>-@@ -264,11 +254,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_brecent_note.js.html">becca/entities/brecent_note.js</a>, <a href="becca_entities_brecent_note.js.html#line19">line 19</a>- </li></ul></dd>@@ -332,11 +317,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_brecent_note.js.html">becca/entities/brecent_note.js</a>, <a href="becca_entities_brecent_note.js.html#line21">line 21</a>- </li></ul></dd>@@ -400,11 +380,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_brecent_note.js.html">becca/entities/brecent_note.js</a>, <a href="becca_entities_brecent_note.js.html#line23">line 23</a>- </li></ul></dd>@@ -482,11 +457,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line62">line 62</a>- </li></ul></dd>-@@ -571,11 +541,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line18">line 18</a>- </li></ul></dd>-@@ -660,11 +625,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line30">line 30</a>- </li></ul></dd>-@@ -749,11 +709,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line23">line 23</a>- </li></ul></dd>-@@ -838,11 +793,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>- </li></ul></dd>-@@ -927,11 +877,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line45">line 45</a>- </li></ul></dd>-@@ -1086,11 +1031,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>- </li></ul></dd>-@@ -1179,11 +1119,6 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line83">line 83</a>- </li></ul></dd>-@@ -1245,7 +1180,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/backend_api/BackendScriptApi.html b/docs/backend_api/BackendScriptApi.htmlindex 4c4b8b850e..222a2cfd6f 100644--- a/docs/backend_api/BackendScriptApi.html+++ b/docs/backend_api/BackendScriptApi.html@@ -78,11 +78,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line29">line 29</a>- </li></ul></dd>@@ -182,11 +177,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line580">line 580</a>- </li></ul></dd>@@ -292,11 +282,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line42">line 42</a>- </li></ul></dd>@@ -402,11 +387,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line33">line 33</a>- </li></ul></dd>@@ -512,11 +492,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line44">line 44</a>- </li></ul></dd>@@ -622,11 +597,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line35">line 35</a>- </li></ul></dd>@@ -732,11 +702,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line473">line 473</a>- </li></ul></dd>@@ -842,11 +807,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line31">line 31</a>- </li></ul></dd>@@ -952,11 +912,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line46">line 46</a>- </li></ul></dd>@@ -1128,11 +1083,6 @@ JSON MIME type. See also createNewNote() for more options.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line205">line 205</a>- </li></ul></dd>@@ -1189,7 +1139,7 @@ JSON MIME type. See also createNewNote() for more options.- <h4 class="name" id="createNewNote"><span class="type-signature"></span>createNewNote<span class="signature">(params<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Object}</span></h4>+ <h4 class="name" id="createNewNote"><span class="type-signature"></span>createNewNote<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>@@ -1204,10 +1154,15 @@ JSON MIME type. See also createNewNote() for more options.- <h5>Parameters:</h5>+++++ <h5 class="subsection-title">Properties:</h5>+-<table class="params">+<table class="props"><thead><tr>@@ -1217,8 +1172,6 @@ JSON MIME type. See also createNewNote() for more options.<th>Type</th>- <th>Attributes</th>-@@ -1237,170 +1190,181 @@ JSON MIME type. See also createNewNote() for more options.<td class="type">-<span class="param-type"><a href="global.html#CreateNewNoteParams">CreateNewNoteParams</a></span>+<span class="param-type">object</span></td>- <td class="attributes">-- <optional><br>------ </td>-- <td class="description last"></td>- </tr>--- </tbody>-</table>--+ <td class="description last">+ <h6>Properties</h6>+<table class="props">+ <thead>+ <tr>++ <th>Name</th>++ <th>Type</th>++ <th>Attributes</th>+-<dl class="details">----------++ <th>Default</th>+-+ <th class="last">Description</th>+ </tr>+ </thead>+ <tbody>-+ <tr>++ <td class="name"><code>parentNoteId</code></td>+-+ <td class="type">+++<span class="param-type">string</span>--++ </td>-++ <td class="attributes">+-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line232">line 232</a>- </li></ul></dd>-++ </td>+-++ <td class="default">++ </td>+-+ <td class="description last"></td>+ </tr>-</dl>-------------+ <tr>++ <td class="name"><code>title</code></td>+-<h5>Returns:</h5>+ <td class="type">+++<span class="param-type">string</span>--<div class="param-desc">- object contains newly created entities note and branch-</div>++ </td>++ <td class="attributes">+-<dl>- <dt>- Type- </dt>- <dd>--<span class="param-type">Object</span>++ </td>+++ <td class="default">++ </td>+- </dd>-</dl>+ <td class="description last"></td>+ </tr>-----+ <tr>++ <td class="name"><code>content</code></td>---- <h4 class="name" id="createNote"><span class="type-signature"></span>createNote<span class="signature">(parentNoteId, title, content<span class="signature-attributes">opt</span>, extraOptions<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Object}</span></h4>---+ <td class="type">+++<span class="param-type">string</span>+|+<span class="param-type">buffer</span>++ </td>++ <td class="attributes">+++ </td>+++ <td class="default">++ </td>++ <td class="description last"></td>+ </tr>++ <tr>++ <td class="name"><code>type</code></td>++ <td class="type">+++<span class="param-type">string</span>- <h5>Parameters:</h5>--<table class="params">- <thead>- <tr>-- <th>Name</th>-++ </td>- <th>Type</th>++ <td class="attributes">+-- <th>Attributes</th>-++ </td>+-- <th>Default</th>-++ <td class="default">++ </td>+- <th class="last">Description</th>- </tr>- </thead>+ <td class="description last">text, code, file, image, search, book, relationMap, canvas</td>+ </tr>- <tbody><tr>- <td class="name"><code>parentNoteId</code></td>+ <td class="name"><code>mime</code></td><td class="type">@@ -1415,7 +1379,7 @@ JSON MIME type. See also createNewNote() for more options.<td class="attributes">-+ <optional><br>@@ -1428,20 +1392,20 @@ JSON MIME type. See also createNewNote() for more options.</td>- <td class="description last">create new note under this parent</td>+ <td class="description last">value is derived from default mimes for type</td></tr><tr>- <td class="name"><code>title</code></td>+ <td class="name"><code>isProtected</code></td><td class="type">-<span class="param-type">string</span>+<span class="param-type">boolean</span>@@ -1450,7 +1414,7 @@ JSON MIME type. See also createNewNote() for more options.<td class="attributes">-+ <optional><br>@@ -1460,6 +1424,8 @@ JSON MIME type. See also createNewNote() for more options.<td class="default">+ false+</td>@@ -1470,13 +1436,13 @@ JSON MIME type. See also createNewNote() for more options.<tr>- <td class="name"><code>content</code></td>+ <td class="name"><code>isExpanded</code></td><td class="type">-<span class="param-type">string</span>+<span class="param-type">boolean</span>@@ -1489,15 +1455,13 @@ JSON MIME type. See also createNewNote() for more options.--</td><td class="default">- ""+ false</td>@@ -1509,13 +1473,13 @@ JSON MIME type. See also createNewNote() for more options.<tr>- <td class="name"><code>extraOptions</code></td>+ <td class="name"><code>prefix</code></td><td class="type">-<span class="param-type"><a href="global.html#CreateNoteExtraOptions">CreateNoteExtraOptions</a></span>+<span class="param-type">string</span>@@ -1528,15 +1492,13 @@ JSON MIME type. See also createNewNote() for more options.--</td><td class="default">- {}+ ''</td>@@ -1545,19 +1507,55 @@ JSON MIME type. See also createNewNote() for more options.</tr>- </tbody>-</table>-+ <tr>++ <td class="name"><code>notePosition</code></td>++ <td class="type">+++<span class="param-type">int</span>++ </td>-<dl class="details">++ <td class="attributes">++ <optional><br>++++ </td>++++ <td class="default">++ </td>+++ <td class="description last">default is last existing notePosition in a parent + 10</td>+ </tr>+ </tbody>+</table>++ </td>+ </tr>+ </tbody>+</table>+++++<dl class="details">@@ -1570,7 +1568,7 @@ JSON MIME type. See also createNewNote() for more options.- <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>please use createTextNote() with similar API for simpler use cases or createNewNote() for more complex needs</li></ul></dd>+@@ -1582,10 +1580,7 @@ JSON MIME type. See also createNewNote() for more options.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line260">line 260</a>- </li></ul></dd>+@@ -1642,16 +1637,13 @@ JSON MIME type. See also createNewNote() for more options.- <h4 class="name" id="createOrUpdateLauncher"><span class="type-signature"></span>createOrUpdateLauncher<span class="signature">(opts)</span><span class="type-signature"></span></h4>+ <h4 class="name" id="createNote"><span class="type-signature"></span>createNote<span class="signature">(parentNoteId, title, content<span class="signature-attributes">opt</span>, extraOptions<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Object}</span></h4>-<div class="description">- Creates a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.-</div>@@ -1660,49 +1652,1016 @@ JSON MIME type. See also createNewNote() for more options.+ <h5>Parameters:</h5>+++<table class="params">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>+++ <th>Attributes</th>++++ <th>Default</th>+++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>++ <td class="name"><code>parentNoteId</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++++++ </td>++++ <td class="default">++ </td>+++ <td class="description last">create new note under this parent</td>+ </tr>++++ <tr>++ <td class="name"><code>title</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++++++ </td>++++ <td class="default">++ </td>+++ <td class="description last"></td>+ </tr>++++ <tr>++ <td class="name"><code>content</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++++ </td>++++ <td class="default">++ ""++ </td>+++ <td class="description last"></td>+ </tr>++++ <tr>++ <td class="name"><code>extraOptions</code></td>+++ <td class="type">+++<span class="param-type">object</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++++ </td>++++ <td class="default">++ {}++ </td>+++ <td class="description last"></td>+ </tr>+++ </tbody>+</table>+++++++ <h5 class="subsection-title">Properties:</h5>++++<table class="props">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>+++ <th>Attributes</th>++++ <th>Default</th>+++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>++ <td class="name"><code>extraOptions.json</code></td>+++ <td class="type">+++<span class="param-type">boolean</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>++++ <td class="default">++ false++ </td>+++ <td class="description last">should the note be JSON</td>+ </tr>++++ <tr>++ <td class="name"><code>extraOptions.isProtected</code></td>+++ <td class="type">+++<span class="param-type">boolean</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>++++ <td class="default">++ false++ </td>+++ <td class="description last">should the note be protected</td>+ </tr>++++ <tr>++ <td class="name"><code>extraOptions.type</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>++++ <td class="default">++ 'text'++ </td>+++ <td class="description last">note type</td>+ </tr>++++ <tr>++ <td class="name"><code>extraOptions.mime</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>++++ <td class="default">++ 'text/html'++ </td>+++ <td class="description last">MIME type of the note</td>+ </tr>++++ <tr>++ <td class="name"><code>extraOptions.attributes</code></td>+++ <td class="type">+++<span class="param-type">Array.<object></span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>++++ <td class="default">++ []++ </td>+++ <td class="description last">attributes to be created for this note+ <h6>Properties</h6>++<table class="props">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>+++ <th>Attributes</th>+++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>++ <td class="name"><code>type</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++++ </td>+++++ <td class="description last">attribute type - label, relation etc.</td>+ </tr>++++ <tr>++ <td class="name"><code>name</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++++ </td>+++++ <td class="description last">attribute name</td>+ </tr>++++ <tr>++ <td class="name"><code>value</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>+++++ <td class="description last">attribute value</td>+ </tr>+++ </tbody>+</table>++ </td>+ </tr>+++ </tbody>+</table>+++++<dl class="details">+++++++++++++++++ <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>please use createTextNote() with similar API for simpler use cases or createNewNote() for more complex needs</li></ul></dd>++++++++++++++++++</dl>++++++++++++++++<h5>Returns:</h5>+++<div class="param-desc">+ object contains newly created entities note and branch+</div>++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">Object</span>+++ </dd>+</dl>++++++++++++++ <h4 class="name" id="createOrUpdateLauncher"><span class="type-signature"></span>createOrUpdateLauncher<span class="signature">(opts)</span><span class="type-signature"> → {Object}</span></h4>+++++++<div class="description">+ Creates a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.+</div>++++++++++ <h5>Parameters:</h5>+++<table class="params">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>++++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>++ <td class="name"><code>opts</code></td>+++ <td class="type">+++<span class="param-type">object</span>++++ </td>++++++ <td class="description last"></td>+ </tr>+++ </tbody>+</table>+++++++ <h5 class="subsection-title">Properties:</h5>++++<table class="props">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>+++ <th>Attributes</th>++++ <th>Default</th>+++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>++ <td class="name"><code>opts.id</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++++ </td>++++ <td class="default">++ </td>+++ <td class="description last">id of the launcher, only alphanumeric at least 6 characters long</td>+ </tr>++++ <tr>++ <td class="name"><code>opts.type</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++++ </td>++++ <td class="default">++ </td>+++ <td class="description last">one of+ * "note" - activating the launcher will navigate to the target note (specified in targetNoteId param)+ * "script" - activating the launcher will execute the script (specified in scriptNoteId param)+ * "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)</td>+ </tr>++++ <tr>++ <td class="name"><code>opts.title</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++++ </td>++++ <td class="default">++ </td>+++ <td class="description last"></td>+ </tr>++++ <tr>++ <td class="name"><code>opts.isVisible</code></td>+++ <td class="type">+++<span class="param-type">boolean</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>++++ <td class="default">++ false++ </td>+++ <td class="description last">if true, will be created in the "Visible launchers", otherwise in "Available launchers"</td>+ </tr>++++ <tr>++ <td class="name"><code>opts.icon</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>++++ <td class="default">++ </td>+++ <td class="description last">name of the boxicon to be used (e.g. "bx-time")</td>+ </tr>++++ <tr>++ <td class="name"><code>opts.keyboardShortcut</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>++++ <td class="default">++ </td>+++ <td class="description last">will activate the target note/script upon pressing, e.g. "ctrl+e"</td>+ </tr>++++ <tr>++ <td class="name"><code>opts.targetNoteId</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>++++ <td class="default">++ </td>+++ <td class="description last">for type "note"</td>+ </tr>++++ <tr>++ <td class="name"><code>opts.scriptNoteId</code></td>+++ <td class="type">+++<span class="param-type">string</span>- <h5>Parameters:</h5>--<table class="params">- <thead>- <tr>-- <th>Name</th>-++ </td>- <th>Type</th>++ <td class="attributes">++ <optional><br>+-++ </td>+-++ <td class="default">++ </td>+- <th class="last">Description</th>- </tr>- </thead>+ <td class="description last">for type "script"</td>+ </tr>- <tbody><tr>- <td class="name"><code>opts</code></td>+ <td class="name"><code>opts.widgetNoteId</code></td><td class="type">-<span class="param-type"><a href="global.html#CreateOrUpdateLauncher">CreateOrUpdateLauncher</a></span>+<span class="param-type">string</span></td>+ <td class="attributes">++ <optional><br>+++ </td>- <td class="description last"></td>++ <td class="default">++ </td>+++ <td class="description last">for type "customWidget"</td></tr>@@ -1712,8 +2671,6 @@ JSON MIME type. See also createNewNote() for more options.--<dl class="details">@@ -1740,11 +2697,6 @@ JSON MIME type. See also createNewNote() for more options.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line509">line 509</a>- </li></ul></dd>@@ -1768,6 +2720,24 @@ JSON MIME type. See also createNewNote() for more options.+<h5>Returns:</h5>+++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">Object</span>+++ </dd>+</dl>++@@ -1923,11 +2893,6 @@ JSON MIME type. See also createNewNote() for more options.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line189">line 189</a>- </li></ul></dd>@@ -2105,11 +3070,6 @@ JSON MIME type. See also createNewNote() for more options.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line160">line 160</a>- </li></ul></dd>@@ -2306,11 +3266,6 @@ JSON MIME type. See also createNewNote() for more options.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line150">line 150</a>- </li></ul></dd>@@ -2457,11 +3412,6 @@ JSON MIME type. See also createNewNote() for more options.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line461">line 461</a>- </li></ul></dd>@@ -2658,11 +3608,6 @@ JSON MIME type. See also createNewNote() for more options.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line573">line 573</a>- </li></ul></dd>@@ -2760,11 +3705,6 @@ JSON MIME type. See also createNewNote() for more options.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line486">line 486</a>- </li></ul></dd>@@ -2918,11 +3858,6 @@ JSON MIME type. See also createNewNote() for more options.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line80">line 80</a>- </li></ul></dd>@@ -2978,7 +3913,7 @@ JSON MIME type. See also createNewNote() for more options.- <h4 class="name" id="getBranch"><span class="type-signature"></span>getBranch<span class="signature">(branchId)</span><span class="type-signature"> → {Branch|null}</span></h4>+ <h4 class="name" id="getBranch"><span class="type-signature"></span>getBranch<span class="signature">(branchId)</span><span class="type-signature"> → {<a href="BBranch.html">BBranch</a>|null}</span></h4>@@ -3072,11 +4007,6 @@ JSON MIME type. See also createNewNote() for more options.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line73">line 73</a>- </li></ul></dd>@@ -3111,7 +4041,7 @@ JSON MIME type. See also createNewNote() for more options.</dt><dd>-<span class="param-type">Branch</span>+<span class="param-type"><a href="BBranch.html">BBranch</a></span>|<span class="param-type">null</span>@@ -3276,11 +4206,6 @@ JSON MIME type. See also createNewNote() for more options.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line342">line 342</a>- </li></ul></dd>-@@ -3476,11 +4401,6 @@ JSON MIME type. See also createNewNote() for more options.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line352">line 352</a>- </li></ul></dd>@@ -3586,11 +4506,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line59">line 59</a>- </li></ul></dd>@@ -3787,11 +4702,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line382">line 382</a>- </li></ul></dd>@@ -3941,11 +4851,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line66">line 66</a>- </li></ul></dd>@@ -4142,11 +5047,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line139">line 139</a>- </li></ul></dd>@@ -4343,11 +5243,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line129">line 129</a>- </li></ul></dd>@@ -4449,11 +5344,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line331">line 331</a>- </li></ul></dd>@@ -4619,11 +5509,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line361">line 361</a>- </li></ul></dd>@@ -4853,11 +5738,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line372">line 372</a>- </li></ul></dd>@@ -5054,11 +5934,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line392">line 392</a>- </li></ul></dd>@@ -5207,11 +6082,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line304">line 304</a>- </li></ul></dd>@@ -5344,11 +6214,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line454">line 454</a>- </li></ul></dd>@@ -5453,11 +6318,6 @@ if some action needs to happen on only one specific instance.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line479">line 479</a>- </li></ul></dd>-@@ -5633,11 +6493,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line115">line 115</a>- </li></ul></dd>@@ -5835,11 +6690,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line91">line 91</a>- </li></ul></dd>@@ -6045,11 +6895,6 @@ This method looks similar to toggleNoteInParent() but differs because we're look- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line435">line 435</a>- </li></ul></dd>-@@ -6166,7 +7011,7 @@ This method looks similar to toggleNoteInParent() but differs because we're look<td class="type">-<span class="param-type"><a href="global.html#SortConfig">SortConfig</a></span>+<span class="param-type">object</span>@@ -6198,9 +7043,152 @@ This method looks similar to toggleNoteInParent() but differs because we're look-<dl class="details">+ <h5 class="subsection-title">Properties:</h5>++++<table class="props">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>+++ <th>Attributes</th>++++ <th>Default</th>+++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>++ <td class="name"><code>sortConfig.sortBy</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>++++ <td class="default">++ title++ </td>+++ <td class="description last">'title', 'dateCreated', 'dateModified' or a label name+ see https://github.com/zadam/trilium/wiki/Sorting for details.</td>+ </tr>++++ <tr>++ <td class="name"><code>sortConfig.reverse</code></td>+++ <td class="type">+++<span class="param-type">boolean</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>++++ <td class="default">++ false++ </td>+++ <td class="description last"></td>+ </tr>++++ <tr>++ <td class="name"><code>sortConfig.foldersFirst</code></td>+++ <td class="type">+++<span class="param-type">boolean</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>++++ <td class="default">++ false++ </td>+++ <td class="description last"></td>+ </tr>+ </tbody>+</table>+++++<dl class="details">@@ -6225,10 +7213,7 @@ This method looks similar to toggleNoteInParent() but differs because we're look- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line416">line 416</a>- </li></ul></dd>+@@ -6360,11 +7345,6 @@ This method looks similar to toggleNoteInParent() but differs because we're look- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line399">line 399</a>- </li></ul></dd>-@@ -6565,11 +7545,6 @@ This method looks similar to toggleNoteInParent() but differs because we're look-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line172">line 172</a>- </li></ul></dd>@@ -6721,11 +7696,6 @@ exists, then we'll use that transaction.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line445">line 445</a>- </li></ul></dd>@@ -6876,11 +7846,6 @@ exists, then we'll use that transaction.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line468">line 468</a>- </li></ul></dd>@@ -6947,7 +7912,7 @@ exists, then we'll use that transaction.</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/backend_api/becca_entities_abstract_becca_entity.js.html b/docs/backend_api/becca_entities_abstract_becca_entity.js.htmldeleted file mode 100644index 65f982723f..0000000000--- a/docs/backend_api/becca_entities_abstract_becca_entity.js.html+++ /dev/null@@ -1,221 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: becca/entities/abstract_becca_entity.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: becca/entities/abstract_becca_entity.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const utils = require('../../services/utils');-const sql = require('../../services/sql');-const entityChangesService = require('../../services/entity_changes');-const eventService = require("../../services/events");-const dateUtils = require("../../services/date_utils");-const cls = require("../../services/cls");-const log = require("../../services/log");--let becca = null;--/**- * Base class for all backend entities.- */-class AbstractBeccaEntity {- /** @protected */- beforeSaving() {- this.generateIdIfNecessary();- }-- /** @protected */- generateIdIfNecessary() {- if (!this[this.constructor.primaryKeyName]) {- this[this.constructor.primaryKeyName] = utils.newEntityId();- }- }-- /** @protected */- generateHash(isDeleted = false) {- let contentToHash = "";-- for (const propertyName of this.constructor.hashedProperties) {- contentToHash += `|${this[propertyName]}`;- }-- if (isDeleted) {- contentToHash += "|deleted";- }-- return utils.hash(contentToHash).substr(0, 10);- }-- /** @protected */- getUtcDateChanged() {- return this.utcDateModified || this.utcDateCreated;- }-- /**- * @protected- * @returns {Becca}- */- get becca() {- if (!becca) {- becca = require('../becca');- }-- return becca;- }-- /** @protected */- addEntityChange(isDeleted = false) {- entityChangesService.addEntityChange({- entityName: this.constructor.entityName,- entityId: this[this.constructor.primaryKeyName],- hash: this.generateHash(isDeleted),- isErased: false,- utcDateChanged: this.getUtcDateChanged(),- isSynced: this.constructor.entityName !== 'options' || !!this.isSynced- });- }-- /** @protected */- getPojoToSave() {- return this.getPojo();- }-- /**- * Saves entity - executes SQL, but doesn't commit the transaction on its own- *- * @returns {this}- */- save() {- const entityName = this.constructor.entityName;- const primaryKeyName = this.constructor.primaryKeyName;-- const isNewEntity = !this[primaryKeyName];-- if (this.beforeSaving) {- this.beforeSaving();- }-- const pojo = this.getPojoToSave();-- sql.transactional(() => {- sql.upsert(entityName, primaryKeyName, pojo);-- if (entityName === 'recent_notes') {- return;- }-- this.addEntityChange(false);-- if (!cls.isEntityEventsDisabled()) {- const eventPayload = {- entityName,- entity: this- };-- if (isNewEntity) {- eventService.emit(eventService.ENTITY_CREATED, eventPayload);- }-- eventService.emit(eventService.ENTITY_CHANGED, eventPayload);- }- });-- return this;- }-- /**- * Mark the entity as (soft) deleted. It will be completely erased later.- *- * This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.- *- * @param [deleteId=null]- */- markAsDeleted(deleteId = null) {- const entityId = this[this.constructor.primaryKeyName];- const entityName = this.constructor.entityName;-- this.utcDateModified = dateUtils.utcNowDateTime();-- sql.execute(`UPDATE ${entityName} SET isDeleted = 1, deleteId = ?, utcDateModified = ?- WHERE ${this.constructor.primaryKeyName} = ?`,- [deleteId, this.utcDateModified, entityId]);-- if (this.dateModified) {- this.dateModified = dateUtils.localNowDateTime();-- sql.execute(`UPDATE ${entityName} SET dateModified = ? WHERE ${this.constructor.primaryKeyName} = ?`,- [this.dateModified, entityId]);- }-- log.info(`Marking ${entityName} ${entityId} as deleted`);-- this.addEntityChange(true);-- eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });- }-- markAsDeletedSimple() {- const entityId = this[this.constructor.primaryKeyName];- const entityName = this.constructor.entityName;-- this.utcDateModified = dateUtils.utcNowDateTime();-- sql.execute(`UPDATE ${entityName} SET isDeleted = 1, utcDateModified = ?- WHERE ${this.constructor.primaryKeyName} = ?`,- [this.utcDateModified, entityId]);-- log.info(`Marking ${entityName} ${entityId} as deleted`);-- this.addEntityChange(true);-- eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });- }-}--module.exports = AbstractBeccaEntity;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/becca_entities_battribute.js.html b/docs/backend_api/becca_entities_battribute.js.htmldeleted file mode 100644index 447c8fca32..0000000000--- a/docs/backend_api/becca_entities_battribute.js.html+++ /dev/null@@ -1,283 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: becca/entities/battribute.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: becca/entities/battribute.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const BNote = require('./bnote');-const AbstractBeccaEntity = require("./abstract_becca_entity");-const sql = require("../../services/sql");-const dateUtils = require("../../services/date_utils");-const promotedAttributeDefinitionParser = require("../../services/promoted_attribute_definition_parser");-const {sanitizeAttributeName} = require("../../services/sanitize_attribute_name");--/**- * Attribute is an abstract concept which has two real uses - label (key - value pair)- * and relation (representing named relationship between source and target note)- *- * @extends AbstractBeccaEntity- */-class BAttribute extends AbstractBeccaEntity {- static get entityName() { return "attributes"; }- static get primaryKeyName() { return "attributeId"; }- static get hashedProperties() { return ["attributeId", "noteId", "type", "name", "value", "isInheritable"]; }-- constructor(row) {- super();-- if (!row) {- return;- }-- this.updateFromRow(row);- this.init();- }-- updateFromRow(row) {- this.update([- row.attributeId,- row.noteId,- row.type,- row.name,- row.value,- row.isInheritable,- row.position,- row.utcDateModified- ]);- }-- update([attributeId, noteId, type, name, value, isInheritable, position, utcDateModified]) {- /** @type {string} */- this.attributeId = attributeId;- /** @type {string} */- this.noteId = noteId;- /** @type {string} */- this.type = type;- /** @type {string} */- this.name = name;- /** @type {int} */- this.position = position;- /** @type {string} */- this.value = value || "";- /** @type {boolean} */- this.isInheritable = !!isInheritable;- /** @type {string} */- this.utcDateModified = utcDateModified;-- return this;- }-- init() {- if (this.attributeId) {- this.becca.attributes[this.attributeId] = this;- }-- if (!(this.noteId in this.becca.notes)) {- // entities can come out of order in sync, create skeleton which will be filled later- this.becca.addNote(this.noteId, new BNote({noteId: this.noteId}));- }-- this.becca.notes[this.noteId].ownedAttributes.push(this);-- const key = `${this.type}-${this.name.toLowerCase()}`;- this.becca.attributeIndex[key] = this.becca.attributeIndex[key] || [];- this.becca.attributeIndex[key].push(this);-- const targetNote = this.targetNote;-- if (targetNote) {- targetNote.targetRelations.push(this);- }- }-- validate() {- if (!["label", "relation"].includes(this.type)) {- throw new Error(`Invalid attribute type '${this.type}' in attribute '${this.attributeId}' of note '${this.noteId}'`);- }-- if (!this.name?.trim()) {- throw new Error(`Invalid empty name in attribute '${this.attributeId}' of note '${this.noteId}'`);- }-- if (this.type === 'relation' && !(this.value in this.becca.notes)) {- throw new Error(`Cannot save relation '${this.name}' of note '${this.noteId}' since it target not existing note '${this.value}'.`);- }- }-- get isAffectingSubtree() {- return this.isInheritable- || (this.type === 'relation' && this.name === 'template');- }-- get targetNoteId() { // alias- return this.type === 'relation' ? this.value : undefined;- }-- isAutoLink() {- return this.type === 'relation' && ['internalLink', 'imageLink', 'relationMapLink', 'includeNoteLink'].includes(this.name);- }-- get note() {- return this.becca.notes[this.noteId];- }-- get targetNote() {- if (this.type === 'relation') {- return this.becca.notes[this.value];- }- }-- /**- * @returns {BNote|null}- */- getNote() {- const note = this.becca.getNote(this.noteId);-- if (!note) {- throw new Error(`Note '${this.noteId}' of attribute '${this.attributeId}', type '${this.type}', name '${this.name}' does not exist.`);- }-- return note;- }-- /**- * @returns {BNote|null}- */- getTargetNote() {- if (this.type !== 'relation') {- throw new Error(`Attribute ${this.attributeId} is not relation`);- }-- if (!this.value) {- return null;- }-- return this.becca.getNote(this.value);- }-- /**- * @return {boolean}- */- isDefinition() {- return this.type === 'label' && (this.name.startsWith('label:') || this.name.startsWith('relation:'));- }-- getDefinition() {- return promotedAttributeDefinitionParser.parse(this.value);- }-- getDefinedName() {- if (this.type === 'label' && this.name.startsWith('label:')) {- return this.name.substr(6);- } else if (this.type === 'label' && this.name.startsWith('relation:')) {- return this.name.substr(9);- } else {- return this.name;- }- }-- get isDeleted() {- return !(this.attributeId in this.becca.attributes);- }-- beforeSaving() {- this.validate();-- this.name = sanitizeAttributeName(this.name);-- if (!this.value) {- // null value isn't allowed- this.value = "";- }-- if (this.position === undefined) {- // TODO: can be calculated from becca- this.position = 1 + sql.getValue(`SELECT COALESCE(MAX(position), 0) FROM attributes WHERE noteId = ?`, [this.noteId]);- }-- if (!this.isInheritable) {- this.isInheritable = false;- }-- this.utcDateModified = dateUtils.utcNowDateTime();-- super.beforeSaving();-- this.becca.attributes[this.attributeId] = this;- }-- getPojo() {- return {- attributeId: this.attributeId,- noteId: this.noteId,- type: this.type,- name: this.name,- position: this.position,- value: this.value,- isInheritable: this.isInheritable,- utcDateModified: this.utcDateModified,- isDeleted: false- };- }-- createClone(type, name, value, isInheritable) {- return new BAttribute({- noteId: this.noteId,- type: type,- name: name,- value: value,- position: this.position,- isInheritable: isInheritable,- utcDateModified: this.utcDateModified- });- }-}--module.exports = BAttribute;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/becca_entities_bbranch.js.html b/docs/backend_api/becca_entities_bbranch.js.htmldeleted file mode 100644index 516a40431a..0000000000--- a/docs/backend_api/becca_entities_bbranch.js.html+++ /dev/null@@ -1,328 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: becca/entities/bbranch.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: becca/entities/bbranch.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const BNote = require('./bnote');-const AbstractBeccaEntity = require("./abstract_becca_entity");-const dateUtils = require("../../services/date_utils");-const utils = require("../../services/utils");-const TaskContext = require("../../services/task_context");-const cls = require("../../services/cls");-const log = require("../../services/log");--/**- * Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple- * parents.- *- * Note that you should not rely on the branch's identity, since it can change easily with a note's move.- * Always check noteId instead.- *- * @extends AbstractBeccaEntity- */-class BBranch extends AbstractBeccaEntity {- static get entityName() { return "branches"; }- static get primaryKeyName() { return "branchId"; }- // notePosition is not part of hash because it would produce a lot of updates in case of reordering- static get hashedProperties() { return ["branchId", "noteId", "parentNoteId", "prefix"]; }-- constructor(row) {- super();-- if (!row) {- return;- }-- this.updateFromRow(row);- this.init();- }-- updateFromRow(row) {- this.update([- row.branchId,- row.noteId,- row.parentNoteId,- row.prefix,- row.notePosition,- row.isExpanded,- row.utcDateModified- ]);- }-- update([branchId, noteId, parentNoteId, prefix, notePosition, isExpanded, utcDateModified]) {- /** @type {string} */- this.branchId = branchId;- /** @type {string} */- this.noteId = noteId;- /** @type {string} */- this.parentNoteId = parentNoteId;- /** @type {string} */- this.prefix = prefix;- /** @type {int} */- this.notePosition = notePosition;- /** @type {boolean} */- this.isExpanded = !!isExpanded;- /** @type {string} */- this.utcDateModified = utcDateModified;-- return this;- }-- init() {- if (this.branchId) {- this.becca.branches[this.branchId] = this;- }-- this.becca.childParentToBranch[`${this.noteId}-${this.parentNoteId}`] = this;-- const childNote = this.childNote;-- if (!childNote.parentBranches.includes(this)) {- childNote.parentBranches.push(this);- }-- if (this.noteId === 'root') {- return;- }-- const parentNote = this.parentNote;-- if (!childNote.parents.includes(parentNote)) {- childNote.parents.push(parentNote);- }-- if (!parentNote.children.includes(childNote)) {- parentNote.children.push(childNote);- }- }-- /** @returns {BNote} */- get childNote() {- if (!(this.noteId in this.becca.notes)) {- // entities can come out of order in sync/import, create skeleton which will be filled later- this.becca.addNote(this.noteId, new BNote({noteId: this.noteId}));- }-- return this.becca.notes[this.noteId];- }-- getNote() {- return this.childNote;- }-- /** @returns {BNote|undefined} - root branch will have undefined parent, all other branches have to have a parent note */- get parentNote() {- if (!(this.parentNoteId in this.becca.notes) && this.parentNoteId !== 'none') {- // entities can come out of order in sync/import, create skeleton which will be filled later- this.becca.addNote(this.parentNoteId, new BNote({noteId: this.parentNoteId}));- }-- return this.becca.notes[this.parentNoteId];- }-- get isDeleted() {- return !(this.branchId in this.becca.branches);- }-- /**- * Branch is weak when its existence should not hinder deletion of its note.- * As a result, note with only weak branches should be immediately deleted.- * An example is shared or bookmarked clones - they are created automatically and exist for technical reasons,- * not as user-intended actions. From user perspective, they don't count as real clones and for the purpose- * of deletion should not act as a clone.- *- * @returns {boolean}- */- get isWeak() {- return ['_share', '_lbBookmarks'].includes(this.parentNoteId);- }-- /**- * Delete a branch. If this is a last note's branch, delete the note as well.- *- * @param {string} [deleteId] - optional delete identified- * @param {TaskContext} [taskContext]- *- * @return {boolean} - true if note has been deleted, false otherwise- */- deleteBranch(deleteId, taskContext) {- if (!deleteId) {- deleteId = utils.randomString(10);- }-- if (!taskContext) {- taskContext = new TaskContext('no-progress-reporting');- }-- taskContext.increaseProgressCount();-- const note = this.getNote();-- if (!taskContext.noteDeletionHandlerTriggered) {- const parentBranches = note.getParentBranches();-- if (parentBranches.length === 1 && parentBranches[0] === this) {- // needs to be run before branches and attributes are deleted and thus attached relations disappear- const handlers = require("../../services/handlers");- handlers.runAttachedRelations(note, 'runOnNoteDeletion', note);- }- }-- if (this.noteId === 'root'- || this.noteId === cls.getHoistedNoteId()) {-- throw new Error("Can't delete root or hoisted branch/note");- }-- this.markAsDeleted(deleteId);-- const notDeletedBranches = note.getStrongParentBranches();-- if (notDeletedBranches.length === 0) {- for (const weakBranch of note.getParentBranches()) {- weakBranch.markAsDeleted(deleteId);- }-- for (const childBranch of note.getChildBranches()) {- childBranch.deleteBranch(deleteId, taskContext);- }-- // first delete children and then parent - this will show up better in recent changes-- log.info(`Deleting note ${note.noteId}`);-- this.becca.notes[note.noteId].isBeingDeleted = true;-- for (const attribute of note.getOwnedAttributes()) {- attribute.markAsDeleted(deleteId);- }-- for (const relation of note.getTargetRelations()) {- relation.markAsDeleted(deleteId);- }-- note.markAsDeleted(deleteId);-- return true;- }- else {- return false;- }- }-- beforeSaving() {- if (!this.noteId || !this.parentNoteId) {- throw new Error(`noteId and parentNoteId are mandatory properties for Branch`);- }-- this.branchId = `${this.parentNoteId}_${this.noteId}`;-- if (this.notePosition === undefined || this.notePosition === null) {- let maxNotePos = 0;-- for (const childBranch of this.parentNote.getChildBranches()) {- if (maxNotePos < childBranch.notePosition- && childBranch.noteId !== '_hidden' // hidden has very large notePosition to always stay last- ) {- maxNotePos = childBranch.notePosition;- }- }-- this.notePosition = maxNotePos + 10;- }-- if (!this.isExpanded) {- this.isExpanded = false;- }-- if (!this.prefix?.trim()) {- this.prefix = null;- }-- this.utcDateModified = dateUtils.utcNowDateTime();-- super.beforeSaving();-- this.becca.branches[this.branchId] = this;- }-- getPojo() {- return {- branchId: this.branchId,- noteId: this.noteId,- parentNoteId: this.parentNoteId,- prefix: this.prefix,- notePosition: this.notePosition,- isExpanded: this.isExpanded,- isDeleted: false,- utcDateModified: this.utcDateModified- };- }-- createClone(parentNoteId, notePosition) {- const existingBranch = this.becca.getBranchFromChildAndParent(this.noteId, parentNoteId);-- if (existingBranch) {- existingBranch.notePosition = notePosition;- return existingBranch;- } else {- return new BBranch({- noteId: this.noteId,- parentNoteId: parentNoteId,- notePosition: notePosition,- prefix: this.prefix,- isExpanded: this.isExpanded- });- }- }-}--module.exports = BBranch;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/becca_entities_betapi_token.js.html b/docs/backend_api/becca_entities_betapi_token.js.htmldeleted file mode 100644index 78682c44c9..0000000000--- a/docs/backend_api/becca_entities_betapi_token.js.html+++ /dev/null@@ -1,129 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: becca/entities/betapi_token.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: becca/entities/betapi_token.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const dateUtils = require('../../services/date_utils');-const AbstractBeccaEntity = require("./abstract_becca_entity");--/**- * EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications.- * Used by:- * - Trilium Sender- * - ETAPI clients- *- * The format user is presented with is "<etapiTokenId>_<tokenHash>". This is also called "authToken" to distinguish it- * from tokenHash and token.- *- * @extends AbstractBeccaEntity- */-class BEtapiToken extends AbstractBeccaEntity {- static get entityName() { return "etapi_tokens"; }- static get primaryKeyName() { return "etapiTokenId"; }- static get hashedProperties() { return ["etapiTokenId", "name", "tokenHash", "utcDateCreated", "utcDateModified", "isDeleted"]; }-- constructor(row) {- super();-- if (!row) {- return;- }-- this.updateFromRow(row);- this.init();- }-- updateFromRow(row) {- /** @type {string} */- this.etapiTokenId = row.etapiTokenId;- /** @type {string} */- this.name = row.name;- /** @type {string} */- this.tokenHash = row.tokenHash;- /** @type {string} */- this.utcDateCreated = row.utcDateCreated || dateUtils.utcNowDateTime();- /** @type {string} */- this.utcDateModified = row.utcDateModified || this.utcDateCreated;- /** @type {boolean} */- this.isDeleted = !!row.isDeleted;-- if (this.etapiTokenId) {- this.becca.etapiTokens[this.etapiTokenId] = this;- }- }-- init() {- if (this.etapiTokenId) {- this.becca.etapiTokens[this.etapiTokenId] = this;- }- }-- getPojo() {- return {- etapiTokenId: this.etapiTokenId,- name: this.name,- tokenHash: this.tokenHash,- utcDateCreated: this.utcDateCreated,- utcDateModified: this.utcDateModified,- isDeleted: this.isDeleted- }- }-- beforeSaving() {- this.utcDateModified = dateUtils.utcNowDateTime();-- super.beforeSaving();-- this.becca.etapiTokens[this.etapiTokenId] = this;- }-}--module.exports = BEtapiToken;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/becca_entities_bnote.js.html b/docs/backend_api/becca_entities_bnote.js.htmldeleted file mode 100644index 2e481ccf60..0000000000--- a/docs/backend_api/becca_entities_bnote.js.html+++ /dev/null@@ -1,1488 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: becca/entities/bnote.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: becca/entities/bnote.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const protectedSessionService = require('../../services/protected_session');-const log = require('../../services/log');-const sql = require('../../services/sql');-const utils = require('../../services/utils');-const dateUtils = require('../../services/date_utils');-const entityChangesService = require('../../services/entity_changes');-const AbstractBeccaEntity = require("./abstract_becca_entity");-const BNoteRevision = require("./bnote_revision");-const TaskContext = require("../../services/task_context");-const dayjs = require("dayjs");-const utc = require('dayjs/plugin/utc');-dayjs.extend(utc)--const LABEL = 'label';-const RELATION = 'relation';--/**- * Trilium's main entity which can represent text note, image, code note, file attachment etc.- *- * @extends AbstractBeccaEntity- */-class BNote extends AbstractBeccaEntity {- static get entityName() { return "notes"; }- static get primaryKeyName() { return "noteId"; }- static get hashedProperties() { return ["noteId", "title", "isProtected", "type", "mime"]; }-- constructor(row) {- super();-- if (!row) {- return;- }-- this.updateFromRow(row);- this.init();- }-- updateFromRow(row) {- this.update([- row.noteId,- row.title,- row.type,- row.mime,- row.isProtected,- row.dateCreated,- row.dateModified,- row.utcDateCreated,- row.utcDateModified- ]);- }-- update([noteId, title, type, mime, isProtected, dateCreated, dateModified, utcDateCreated, utcDateModified]) {- // ------ Database persisted attributes -------- /** @type {string} */- this.noteId = noteId;- /** @type {string} */- this.title = title;- /** @type {boolean} */- this.isProtected = !!isProtected;- /** @type {string} */- this.type = type;- /** @type {string} */- this.mime = mime;- /** @type {string} */- this.dateCreated = dateCreated || dateUtils.localNowDateTime();- /** @type {string} */- this.dateModified = dateModified;- /** @type {string} */- this.utcDateCreated = utcDateCreated || dateUtils.utcNowDateTime();- /** @type {string} */- this.utcDateModified = utcDateModified;- /** @type {boolean} - set during the deletion operation, before it is completed (removed from becca completely) */- this.isBeingDeleted = false;-- // ------ Derived attributes -------- /** @type {boolean} */- this.isDecrypted = !this.noteId || !this.isProtected;-- this.decrypt();-- /** @type {string|null} */- this.flatTextCache = null;-- return this;- }-- init() {- /** @type {Branch[]}- * @private */- this.parentBranches = [];- /** @type {BNote[]}- * @private */- this.parents = [];- /** @type {BNote[]}- * @private*/- this.children = [];- /** @type {Attribute[]}- * @private */- this.ownedAttributes = [];-- /** @type {Attribute[]|null}- * @private */- this.__attributeCache = null;- /** @type {Attribute[]|null}- * @private*/- this.inheritableAttributeCache = null;-- /** @type {Attribute[]}- * @private*/- this.targetRelations = [];-- this.becca.addNote(this.noteId, this);-- /** @type {BNote[]|null}- * @private */- this.ancestorCache = null;-- // following attributes are filled during searching from database-- /**- * size of the content in bytes- * @type {int|null}- * @private- */- this.contentSize = null;- /**- * size of the content and note revision contents in bytes- * @type {int|null}- * @private- */- this.noteSize = null;- /**- * number of note revisions for this note- * @type {int|null}- * @private- */- this.revisionCount = null;- }-- isContentAvailable() {- return !this.noteId // new note which was not encrypted yet- || !this.isProtected- || protectedSessionService.isProtectedSessionAvailable()- }-- getTitleOrProtected() {- return this.isContentAvailable() ? this.title : '[protected]';- }-- /** @returns {Branch[]} */- getParentBranches() {- return this.parentBranches;- }-- /**- * Returns <i>strong</i> (as opposed to <i>weak</i>) parent branches. See isWeak for details.- *- * @returns {Branch[]}- */- getStrongParentBranches() {- return this.getParentBranches().filter(branch => !branch.isWeak);- }-- /**- * @returns {Branch[]}- * @deprecated use getParentBranches() instead- */- getBranches() {- return this.parentBranches;- }-- /** @returns {BNote[]} */- getParentNotes() {- return this.parents;- }-- /** @returns {BNote[]} */- getChildNotes() {- return this.children;- }-- /** @returns {boolean} */- hasChildren() {- return this.children && this.children.length > 0;- }-- /** @returns {Branch[]} */- getChildBranches() {- return this.children.map(childNote => this.becca.getBranchFromChildAndParent(childNote.noteId, this.noteId));- }-- /*- * Note content has quite special handling - it's not a separate entity, but a lazily loaded- * part of Note entity with it's own sync. Reasons behind this hybrid design has been:- *- * - content can be quite large and it's not necessary to load it / fill memory for any note access even if we don't need a content, especially for bulk operations like search- * - changes in the note metadata or title should not trigger note content sync (so we keep separate utcDateModified and entity changes records)- * - but to the user note content and title changes are one and the same - single dateModified (so all changes must go through Note and content is not a separate entity)- */-- /** @returns {*} */- getContent(silentNotFoundError = false) {- const row = sql.getRow(`SELECT content FROM note_contents WHERE noteId = ?`, [this.noteId]);-- if (!row) {- if (silentNotFoundError) {- return undefined;- }- else {- throw new Error(`Cannot find note content for noteId=${this.noteId}`);- }- }-- let content = row.content;-- if (this.isProtected) {- if (protectedSessionService.isProtectedSessionAvailable()) {- content = content === null ? null : protectedSessionService.decrypt(content);- }- else {- content = "";- }- }-- if (this.isStringNote()) {- return content === null- ? ""- : content.toString("UTF-8");- }- else {- return content;- }- }-- /** @returns {{contentLength, dateModified, utcDateModified}} */- getContentMetadata() {- return sql.getRow(`- SELECT- LENGTH(content) AS contentLength,- dateModified,- utcDateModified- FROM note_contents- WHERE noteId = ?`, [this.noteId]);- }-- get dateCreatedObj() {- return this.dateCreated === null ? null : dayjs(this.dateCreated);- }-- get utcDateCreatedObj() {- return this.utcDateCreated === null ? null : dayjs.utc(this.utcDateCreated);- }-- get dateModifiedObj() {- return this.dateModified === null ? null : dayjs(this.dateModified);- }-- get utcDateModifiedObj() {- return this.utcDateModified === null ? null : dayjs.utc(this.utcDateModified);- }-- /** @returns {*} */- getJsonContent() {- const content = this.getContent();-- if (!content || !content.trim()) {- return null;- }-- return JSON.parse(content);- }-- setContent(content, ignoreMissingProtectedSession = false) {- if (content === null || content === undefined) {- throw new Error(`Cannot set null content to note '${this.noteId}'`);- }-- if (this.isStringNote()) {- content = content.toString();- }- else {- content = Buffer.isBuffer(content) ? content : Buffer.from(content);- }-- const pojo = {- noteId: this.noteId,- content: content,- dateModified: dateUtils.localNowDateTime(),- utcDateModified: dateUtils.utcNowDateTime()- };-- if (this.isProtected) {- if (protectedSessionService.isProtectedSessionAvailable()) {- pojo.content = protectedSessionService.encrypt(pojo.content);- }- else if (!ignoreMissingProtectedSession) {- throw new Error(`Cannot update content of noteId '${this.noteId}' since we're out of protected session.`);- }- }-- sql.upsert("note_contents", "noteId", pojo);-- const hash = utils.hash(`${this.noteId}|${pojo.content.toString()}`);-- entityChangesService.addEntityChange({- entityName: 'note_contents',- entityId: this.noteId,- hash: hash,- isErased: false,- utcDateChanged: pojo.utcDateModified,- isSynced: true- });- }-- setJsonContent(content) {- this.setContent(JSON.stringify(content, null, '\t'));- }-- /** @returns {boolean} true if this note is the root of the note tree. Root note has "root" noteId */- isRoot() {- return this.noteId === 'root';- }-- /** @returns {boolean} true if this note is of application/json content type */- isJson() {- return this.mime === "application/json";- }-- /** @returns {boolean} true if this note is JavaScript (code or attachment) */- isJavaScript() {- return (this.type === "code" || this.type === "file" || this.type === 'launcher')- && (this.mime.startsWith("application/javascript")- || this.mime === "application/x-javascript"- || this.mime === "text/javascript");- }-- /** @returns {boolean} true if this note is HTML */- isHtml() {- return ["code", "file", "render"].includes(this.type)- && this.mime === "text/html";- }-- /** @returns {boolean} true if the note has string content (not binary) */- isStringNote() {- return utils.isStringNote(this.type, this.mime);- }-- /** @returns {string|null} JS script environment - either "frontend" or "backend" */- getScriptEnv() {- if (this.isHtml() || (this.isJavaScript() && this.mime.endsWith('env=frontend'))) {- return "frontend";- }-- if (this.type === 'render') {- return "frontend";- }-- if (this.isJavaScript() && this.mime.endsWith('env=backend')) {- return "backend";- }-- return null;- }-- /**- * @param {string} [type] - (optional) attribute type to filter- * @param {string} [name] - (optional) attribute name to filter- * @returns {Attribute[]} all note's attributes, including inherited ones- */- getAttributes(type, name) {- this.__validateTypeName(type, name);-- this.__getAttributes([]);-- if (type && name) {- return this.__attributeCache.filter(attr => attr.type === type && attr.name === name);- }- else if (type) {- return this.__attributeCache.filter(attr => attr.type === type);- }- else if (name) {- return this.__attributeCache.filter(attr => attr.name === name);- }- else {- // a bit unsafe to return the original array, but defensive copy would be costly- return this.__attributeCache;- }- }-- /** @private */- __getAttributes(path) {- if (path.includes(this.noteId)) {- return [];- }-- if (!this.__attributeCache) {- const parentAttributes = this.ownedAttributes.slice();- const newPath = [...path, this.noteId];-- if (this.noteId !== 'root') {- for (const parentNote of this.parents) {- parentAttributes.push(...parentNote.__getInheritableAttributes(newPath));- }- }-- const templateAttributes = [];-- for (const ownedAttr of parentAttributes) { // parentAttributes so we process also inherited templates- if (ownedAttr.type === 'relation' && ownedAttr.name === 'template') {- const templateNote = this.becca.notes[ownedAttr.value];-- if (templateNote) {- templateAttributes.push(- ...templateNote.__getAttributes(newPath)- // template attr is used as a marker for templates, but it's not meant to be inherited- .filter(attr => !(attr.type === 'label' && (attr.name === 'template' || attr.name === 'workspacetemplate')))- );- }- }- }-- this.__attributeCache = [];-- const addedAttributeIds = new Set();-- for (const attr of parentAttributes.concat(templateAttributes)) {- if (!addedAttributeIds.has(attr.attributeId)) {- addedAttributeIds.add(attr.attributeId);-- this.__attributeCache.push(attr);- }- }-- this.inheritableAttributeCache = [];-- for (const attr of this.__attributeCache) {- if (attr.isInheritable) {- this.inheritableAttributeCache.push(attr);- }- }- }-- return this.__attributeCache;- }-- /**- * @private- * @returns {Attribute[]}- */- __getInheritableAttributes(path) {- if (path.includes(this.noteId)) {- return [];- }-- if (!this.inheritableAttributeCache) {- this.__getAttributes(path); // will refresh also this.inheritableAttributeCache- }-- return this.inheritableAttributeCache;- }-- __validateTypeName(type, name) {- if (type && type !== 'label' && type !== 'relation') {- throw new Error(`Unrecognized attribute type '${type}'. Only 'label' and 'relation' are possible values.`);- }-- if (name) {- const firstLetter = name.charAt(0);- if (firstLetter === '#' || firstLetter === '~') {- throw new Error(`Detect '#' or '~' in the attribute's name. In the API, attribute names should be set without these characters.`);- }- }- }-- /**- * @param type- * @param name- * @param [value]- * @returns {boolean}- */- hasAttribute(type, name, value = null) {- return !!this.getAttributes().find(attr =>- attr.type === type- && attr.name === name- && (value === undefined || value === null || attr.value === value)- );- }-- getAttributeCaseInsensitive(type, name, value) {- name = name.toLowerCase();- value = value ? value.toLowerCase() : null;-- return this.getAttributes().find(- attr => attr.type === type- && attr.name.toLowerCase() === name- && (!value || attr.value.toLowerCase() === value));- }-- getRelationTarget(name) {- const relation = this.getAttributes().find(attr => attr.type === 'relation' && attr.name === name);-- return relation ? relation.targetNote : null;- }-- /**- * @param {string} name - label name- * @param {string} [value] - label value- * @returns {boolean} true if label exists (including inherited)- */- hasLabel(name, value) { return this.hasAttribute(LABEL, name, value); }-- /**- * @param {string} name - label name- * @param {string} [value] - label value- * @returns {boolean} true if label exists (excluding inherited)- */- hasOwnedLabel(name, value) { return this.hasOwnedAttribute(LABEL, name, value); }-- /**- * @param {string} name - relation name- * @param {string} [value] - relation value- * @returns {boolean} true if relation exists (including inherited)- */- hasRelation(name, value) { return this.hasAttribute(RELATION, name, value); }-- /**- * @param {string} name - relation name- * @param {string} [value] - relation value- * @returns {boolean} true if relation exists (excluding inherited)- */- hasOwnedRelation(name, value) { return this.hasOwnedAttribute(RELATION, name, value); }-- /**- * @param {string} name - label name- * @returns {Attribute|null} label if it exists, null otherwise- */- getLabel(name) { return this.getAttribute(LABEL, name); }-- /**- * @param {string} name - label name- * @returns {Attribute|null} label if it exists, null otherwise- */- getOwnedLabel(name) { return this.getOwnedAttribute(LABEL, name); }-- /**- * @param {string} name - relation name- * @returns {Attribute|null} relation if it exists, null otherwise- */- getRelation(name) { return this.getAttribute(RELATION, name); }-- /**- * @param {string} name - relation name- * @returns {Attribute|null} relation if it exists, null otherwise- */- getOwnedRelation(name) { return this.getOwnedAttribute(RELATION, name); }-- /**- * @param {string} name - label name- * @returns {string|null} label value if label exists, null otherwise- */- getLabelValue(name) { return this.getAttributeValue(LABEL, name); }-- /**- * @param {string} name - label name- * @returns {string|null} label value if label exists, null otherwise- */- getOwnedLabelValue(name) { return this.getOwnedAttributeValue(LABEL, name); }-- /**- * @param {string} name - relation name- * @returns {string|null} relation value if relation exists, null otherwise- */- getRelationValue(name) { return this.getAttributeValue(RELATION, name); }-- /**- * @param {string} name - relation name- * @returns {string|null} relation value if relation exists, null otherwise- */- getOwnedRelationValue(name) { return this.getOwnedAttributeValue(RELATION, name); }-- /**- * @param {string} type - attribute type (label, relation, etc.)- * @param {string} name - attribute name- * @param {string} [value] - attribute value- * @returns {boolean} true if note has an attribute with given type and name (excluding inherited)- */- hasOwnedAttribute(type, name, value) {- return !!this.getOwnedAttribute(type, name, value);- }-- /**- * @param {string} type - attribute type (label, relation, etc.)- * @param {string} name - attribute name- * @returns {Attribute} attribute of given type and name. If there's more such attributes, first is returned. Returns null if there's no such attribute belonging to this note.- */- getAttribute(type, name) {- const attributes = this.getAttributes();-- return attributes.find(attr => attr.type === type && attr.name === name);- }-- /**- * @param {string} type - attribute type (label, relation, etc.)- * @param {string} name - attribute name- * @returns {string|null} attribute value of given type and name or null if no such attribute exists.- */- getAttributeValue(type, name) {- const attr = this.getAttribute(type, name);-- return attr ? attr.value : null;- }-- /**- * @param {string} type - attribute type (label, relation, etc.)- * @param {string} name - attribute name- * @returns {string|null} attribute value of given type and name or null if no such attribute exists.- */- getOwnedAttributeValue(type, name) {- const attr = this.getOwnedAttribute(type, name);-- return attr ? attr.value : null;- }-- /**- * @param {string} [name] - label name to filter- * @returns {Attribute[]} all note's labels (attributes with type label), including inherited ones- */- getLabels(name) {- return this.getAttributes(LABEL, name);- }-- /**- * @param {string} [name] - label name to filter- * @returns {string[]} all note's label values, including inherited ones- */- getLabelValues(name) {- return this.getLabels(name).map(l => l.value);- }-- /**- * @param {string} [name] - label name to filter- * @returns {Attribute[]} all note's labels (attributes with type label), excluding inherited ones- */- getOwnedLabels(name) {- return this.getOwnedAttributes(LABEL, name);- }-- /**- * @param {string} [name] - label name to filter- * @returns {string[]} all note's label values, excluding inherited ones- */- getOwnedLabelValues(name) {- return this.getOwnedAttributes(LABEL, name).map(l => l.value);- }-- /**- * @param {string} [name] - relation name to filter- * @returns {Attribute[]} all note's relations (attributes with type relation), including inherited ones- */- getRelations(name) {- return this.getAttributes(RELATION, name);- }-- /**- * @param {string} [name] - relation name to filter- * @returns {Attribute[]} all note's relations (attributes with type relation), excluding inherited ones- */- getOwnedRelations(name) {- return this.getOwnedAttributes(RELATION, name);- }-- /**- * @param {string|null} [type] - (optional) attribute type to filter- * @param {string|null} [name] - (optional) attribute name to filter- * @param {string|null} [value] - (optional) attribute value to filter- * @returns {Attribute[]} note's "owned" attributes - excluding inherited ones- */- getOwnedAttributes(type = null, name = null, value = null) {- this.__validateTypeName(type, name);-- if (type && name && value !== undefined && value !== null) {- return this.ownedAttributes.filter(attr => attr.type === type && attr.name === name && attr.value === value);- }- else if (type && name) {- return this.ownedAttributes.filter(attr => attr.type === type && attr.name === name);- }- else if (type) {- return this.ownedAttributes.filter(attr => attr.type === type);- }- else if (name) {- return this.ownedAttributes.filter(attr => attr.name === name);- }- else {- return this.ownedAttributes.slice();- }- }-- /**- * @returns {Attribute} attribute belonging to this specific note (excludes inherited attributes)- *- * This method can be significantly faster than the getAttribute()- */- getOwnedAttribute(type, name, value = null) {- const attrs = this.getOwnedAttributes(type, name, value);-- return attrs.length > 0 ? attrs[0] : null;- }-- get isArchived() {- return this.hasAttribute('label', 'archived');- }-- hasInheritableOwnedArchivedLabel() {- return !!this.ownedAttributes.find(attr => attr.type === 'label' && attr.name === 'archived' && attr.isInheritable);- }-- // will sort the parents so that non-search & non-archived are first and archived at the end- // this is done so that non-search & non-archived paths are always explored as first when looking for note path- sortParents() {- this.parentBranches.sort((a, b) =>- a.branchId.startsWith('virt-') // FIXME: search virtual notes appear only in froca so this is probably not necessary- || a.parentNote?.hasInheritableOwnedArchivedLabel() ? 1 : -1);-- this.parents = this.parentBranches- .map(branch => branch.parentNote)- .filter(note => !!note);- }-- /**- * This is used for:- * - fast searching- * - note similarity evaluation- *- * @return {string} - returns flattened textual representation of note, prefixes and attributes- */- getFlatText() {- if (!this.flatTextCache) {- this.flatTextCache = `${this.noteId} ${this.type} ${this.mime} `;-- for (const branch of this.parentBranches) {- if (branch.prefix) {- this.flatTextCache += `${branch.prefix} `;- }- }-- this.flatTextCache += `${this.title} `;-- for (const attr of this.getAttributes()) {- // it's best to use space as separator since spaces are filtered from the search string by the tokenization into words- this.flatTextCache += `${attr.type === 'label' ? '#' : '~'}${attr.name}`;-- if (attr.value) {- this.flatTextCache += `=${attr.value}`;- }-- this.flatTextCache += ' ';- }-- this.flatTextCache = utils.normalize(this.flatTextCache);- }-- return this.flatTextCache;- }-- invalidateThisCache() {- this.flatTextCache = null;-- this.__attributeCache = null;- this.inheritableAttributeCache = null;- this.ancestorCache = null;- }-- invalidateSubTree(path = []) {- if (path.includes(this.noteId)) {- return;- }-- this.invalidateThisCache();-- if (this.children.length || this.targetRelations.length) {- path = [...path, this.noteId];- }-- for (const childNote of this.children) {- childNote.invalidateSubTree(path);- }-- for (const targetRelation of this.targetRelations) {- if (targetRelation.name === 'template') {- const note = targetRelation.note;-- if (note) {- note.invalidateSubTree(path);- }- }- }- }-- invalidateSubtreeFlatText() {- this.flatTextCache = null;-- for (const childNote of this.children) {- childNote.invalidateSubtreeFlatText();- }-- for (const targetRelation of this.targetRelations) {- if (targetRelation.name === 'template') {- const note = targetRelation.note;-- if (note) {- note.invalidateSubtreeFlatText();- }- }- }- }-- getRelationDefinitions() {- return this.getLabels()- .filter(l => l.name.startsWith("relation:"));- }-- getLabelDefinitions() {- return this.getLabels()- .filter(l => l.name.startsWith("relation:"));- }-- isTemplate() {- return !!this.targetRelations.find(rel => rel.name === 'template');- }-- /** @returns {BNote[]} */- getSubtreeNotesIncludingTemplated() {- const set = new Set();-- function inner(note) {- if (set.has(note)) {- return;- }-- set.add(note);-- for (const childNote of note.children) {- inner(childNote);- }-- for (const targetRelation of note.targetRelations) {- if (targetRelation.name === 'template') {- const targetNote = targetRelation.note;-- if (targetNote) {- inner(targetNote);- }- }- }- }-- inner(this);-- return Array.from(set);- }-- /** @return {BNote[]} */- getSearchResultNotes() {- if (this.type !== 'search') {- return [];- }-- try {- const searchService = require("../../services/search/services/search");- const {searchResultNoteIds} = searchService.searchFromNote(this);-- const becca = this.becca;- return searchResultNoteIds- .map(resultNoteId => becca.notes[resultNoteId])- .filter(note => !!note);- }- catch (e) {- log.error(`Could not resolve search note ${this.noteId}: ${e.message}`);- return [];- }- }-- /**- * @returns {{notes: BNote[], relationships: Array.<{parentNoteId: string, childNoteId: string}>}}- */- getSubtree({includeArchived = true, includeHidden = false, resolveSearch = false} = {}) {- const noteSet = new Set();- const relationships = []; // list of tuples parentNoteId -> childNoteId-- function resolveSearchNote(searchNote) {- try {- for (const resultNote of searchNote.getSearchResultNotes()) {- addSubtreeNotesInner(resultNote, searchNote);- }- }- catch (e) {- log.error(`Could not resolve search note ${searchNote?.noteId}: ${e.message}`);- }- }-- function addSubtreeNotesInner(note, parentNote = null) {- if (note.noteId === '_hidden' && !includeHidden) {- return;- }-- if (parentNote) {- // this needs to happen first before noteSet check to include all clone relationships- relationships.push({- parentNoteId: parentNote.noteId,- childNoteId: note.noteId- });- }-- if (noteSet.has(note)) {- return;- }-- if (!includeArchived && note.isArchived) {- return;- }-- noteSet.add(note);-- if (note.type === 'search') {- if (resolveSearch) {- resolveSearchNote(note);- }- }- else {- for (const childNote of note.children) {- addSubtreeNotesInner(childNote, note);- }- }- }-- addSubtreeNotesInner(this);-- return {- notes: Array.from(noteSet),- relationships- };- }-- /** @returns {String[]} - includes the subtree node as well */- getSubtreeNoteIds({includeArchived = true, includeHidden = false, resolveSearch = false} = {}) {- return this.getSubtree({includeArchived, includeHidden, resolveSearch})- .notes- .map(note => note.noteId);- }-- /** @deprecated use getSubtreeNoteIds() instead */- getDescendantNoteIds() {- return this.getSubtreeNoteIds();- }-- get parentCount() {- return this.parents.length;- }-- get childrenCount() {- return this.children.length;- }-- get labelCount() {- return this.getAttributes().filter(attr => attr.type === 'label').length;- }-- get ownedLabelCount() {- return this.ownedAttributes.filter(attr => attr.type === 'label').length;- }-- get relationCount() {- return this.getAttributes().filter(attr => attr.type === 'relation' && !attr.isAutoLink()).length;- }-- get relationCountIncludingLinks() {- return this.getAttributes().filter(attr => attr.type === 'relation').length;- }-- get ownedRelationCount() {- return this.ownedAttributes.filter(attr => attr.type === 'relation' && !attr.isAutoLink()).length;- }-- get ownedRelationCountIncludingLinks() {- return this.ownedAttributes.filter(attr => attr.type === 'relation').length;- }-- get targetRelationCount() {- return this.targetRelations.filter(attr => !attr.isAutoLink()).length;- }-- get targetRelationCountIncludingLinks() {- return this.targetRelations.length;- }-- get attributeCount() {- return this.getAttributes().length;- }-- get ownedAttributeCount() {- return this.getAttributes().length;- }-- /** @returns {BNote[]} */- getAncestors() {- if (!this.ancestorCache) {- const noteIds = new Set();- this.ancestorCache = [];-- for (const parent of this.parents) {- if (noteIds.has(parent.noteId)) {- continue;- }-- this.ancestorCache.push(parent);- noteIds.add(parent.noteId);-- for (const ancestorNote of parent.getAncestors()) {- if (!noteIds.has(ancestorNote.noteId)) {- this.ancestorCache.push(ancestorNote);- noteIds.add(ancestorNote.noteId);- }- }- }- }-- return this.ancestorCache;- }-- /** @returns {boolean} */- hasAncestor(ancestorNoteId) {- for (const ancestorNote of this.getAncestors()) {- if (ancestorNote.noteId === ancestorNoteId) {- return true;- }- }-- return false;- }-- isInHiddenSubtree() {- return this.noteId === '_hidden' || this.hasAncestor('_hidden');- }-- getTargetRelations() {- return this.targetRelations;- }-- /** @returns {BNote[]} - returns only notes which are templated, does not include their subtrees- * in effect returns notes which are influenced by note's non-inheritable attributes */- getTemplatedNotes() {- const arr = [this];-- for (const targetRelation of this.targetRelations) {- if (targetRelation.name === 'template') {- const note = targetRelation.note;-- if (note) {- arr.push(note);- }- }- }-- return arr;- }-- getDistanceToAncestor(ancestorNoteId) {- if (this.noteId === ancestorNoteId) {- return 0;- }-- let minDistance = 999999;-- for (const parent of this.parents) {- minDistance = Math.min(minDistance, parent.getDistanceToAncestor(ancestorNoteId) + 1);- }-- return minDistance;- }-- getNoteRevisions() {- return sql.getRows("SELECT * FROM note_revisions WHERE noteId = ?", [this.noteId])- .map(row => new BNoteRevision(row));- }-- /**- * @return {string[][]} - array of notePaths (each represented by array of noteIds constituting the particular note path)- */- getAllNotePaths() {- if (this.noteId === 'root') {- return [['root']];- }-- const notePaths = [];-- for (const parentNote of this.getParentNotes()) {- for (const parentPath of parentNote.getAllNotePaths()) {- parentPath.push(this.noteId);- notePaths.push(parentPath);- }- }-- return notePaths;- }-- /**- * @param ancestorNoteId- * @return {boolean} - true if ancestorNoteId occurs in at least one of the note's paths- */- isDescendantOfNote(ancestorNoteId) {- const notePaths = this.getAllNotePaths();-- return notePaths.some(path => path.includes(ancestorNoteId));- }-- /**- * Update's given attribute's value or creates it if it doesn't exist- *- * @param {string} type - attribute type (label, relation, etc.)- * @param {string} name - attribute name- * @param {string} [value] - attribute value (optional)- */- setAttribute(type, name, value) {- const attributes = this.getOwnedAttributes();- const attr = attributes.find(attr => attr.type === type && attr.name === name);-- value = value?.toString() || "";-- if (attr) {- if (attr.value !== value) {- attr.value = value;- attr.save();- }- }- else {- const BAttribute = require("./battribute");-- new BAttribute({- noteId: this.noteId,- type: type,- name: name,- value: value- }).save();- }- }-- /**- * Removes given attribute name-value pair if it exists.- *- * @param {string} type - attribute type (label, relation, etc.)- * @param {string} name - attribute name- * @param {string} [value] - attribute value (optional)- */- removeAttribute(type, name, value) {- const attributes = this.getOwnedAttributes();-- for (const attribute of attributes) {- if (attribute.type === type && attribute.name === name && (value === undefined || value === attribute.value)) {- attribute.markAsDeleted();- }- }- }-- /**- * Adds a new attribute to this note. The attribute is saved and returned.- * See addLabel, addRelation for more specific methods.- *- * @param {string} type - attribute type (label / relation)- * @param {string} name - name of the attribute, not including the leading ~/#- * @param {string} [value] - value of the attribute - text for labels, target note ID for relations; optional.- * @param {boolean} [isInheritable=false]- * @param {int} [position]- * @return {Attribute}- */- addAttribute(type, name, value = "", isInheritable = false, position = 1000) {- const BAttribute = require("./battribute");-- return new Attribute({- noteId: this.noteId,- type: type,- name: name,- value: value,- isInheritable: isInheritable,- position: position- }).save();- }-- /**- * Adds a new label to this note. The label attribute is saved and returned.- *- * @param {string} name - name of the label, not including the leading #- * @param {string} [value] - text value of the label; optional- * @param {boolean} [isInheritable=false]- * @return {Attribute}- */- addLabel(name, value = "", isInheritable = false) {- return this.addAttribute(LABEL, name, value, isInheritable);- }-- /**- * Adds a new relation to this note. The relation attribute is saved and- * returned.- *- * @param {string} name - name of the relation, not including the leading ~- * @param {string} targetNoteId- * @param {boolean} [isInheritable=false]- * @return {Attribute}- */- addRelation(name, targetNoteId, isInheritable = false) {- return this.addAttribute(RELATION, name, targetNoteId, isInheritable);- }-- /**- * Based on enabled, attribute is either set or removed.- *- * @param {string} type - attribute type ('relation', 'label' etc.)- * @param {boolean} enabled - toggle On or Off- * @param {string} name - attribute name- * @param {string} [value] - attribute value (optional)- */- toggleAttribute(type, enabled, name, value) {- if (enabled) {- this.setAttribute(type, name, value);- }- else {- this.removeAttribute(type, name, value);- }- }-- /**- * Based on enabled, label is either set or removed.- *- * @param {boolean} enabled - toggle On or Off- * @param {string} name - label name- * @param {string} [value] - label value (optional)- */- toggleLabel(enabled, name, value) { return this.toggleAttribute(LABEL, enabled, name, value); }-- /**- * Based on enabled, relation is either set or removed.- *- * @param {boolean} enabled - toggle On or Off- * @param {string} name - relation name- * @param {string} [value] - relation value (noteId)- */- toggleRelation(enabled, name, value) { return this.toggleAttribute(RELATION, enabled, name, value); }-- /**- * Update's given label's value or creates it if it doesn't exist- *- * @param {string} name - label name- * @param {string} [value] - label value- */- setLabel(name, value) { return this.setAttribute(LABEL, name, value); }-- /**- * Update's given relation's value or creates it if it doesn't exist- *- * @param {string} name - relation name- * @param {string} value - relation value (noteId)- */- setRelation(name, value) { return this.setAttribute(RELATION, name, value); }-- /**- * Remove label name-value pair, if it exists.- *- * @param {string} name - label name- * @param {string} [value] - label value- */- removeLabel(name, value) { return this.removeAttribute(LABEL, name, value); }-- /**- * Remove relation name-value pair, if it exists.- *- * @param {string} name - relation name- * @param {string} [value] - relation value (noteId)- */- removeRelation(name, value) { return this.removeAttribute(RELATION, name, value); }-- searchNotesInSubtree(searchString) {- const searchService = require("../../services/search/services/search");-- return searchService.searchNotes(searchString);- }-- searchNoteInSubtree(searchString) {- return this.searchNotesInSubtree(searchString)[0];- }-- /**- * @param parentNoteId- * @returns {{success: boolean, message: string}}- */- cloneTo(parentNoteId) {- const cloningService = require("../../services/cloning");-- const branch = this.becca.getNote(parentNoteId).getParentBranches()[0];-- return cloningService.cloneNoteToBranch(this.noteId, branch.branchId);- }-- /**- * (Soft) delete a note and all its descendants.- *- * @param {string} [deleteId] - optional delete identified- * @param {TaskContext} [taskContext]- */- deleteNote(deleteId, taskContext) {- if (this.isDeleted) {- return;- }-- if (!deleteId) {- deleteId = utils.randomString(10);- }-- if (!taskContext) {- taskContext = new TaskContext('no-progress-reporting');- }-- // needs to be run before branches and attributes are deleted and thus attached relations disappear- const handlers = require("../../services/handlers");- handlers.runAttachedRelations(this, 'runOnNoteDeletion', this);- taskContext.noteDeletionHandlerTriggered = true;-- for (const branch of this.getParentBranches()) {- branch.deleteBranch(deleteId, taskContext);- }- }-- decrypt() {- if (this.isProtected && !this.isDecrypted && protectedSessionService.isProtectedSessionAvailable()) {- try {- this.title = protectedSessionService.decryptString(this.title);- this.flatTextCache = null;-- this.isDecrypted = true;- }- catch (e) {- log.error(`Could not decrypt note ${this.noteId}: ${e.message} ${e.stack}`);- }- }- }-- isLaunchBarConfig() {- return this.type === 'launcher' || ['_lbRoot', '_lbAvailableLaunchers', '_lbVisibleLaunchers'].includes(this.noteId);- }-- isOptions() {- return this.noteId.startsWith("options");- }-- get isDeleted() {- return !(this.noteId in this.becca.notes) || this.isBeingDeleted;- }-- /**- * @return {BNoteRevision|null}- */- saveNoteRevision() {- const content = this.getContent();-- if (!content || (Buffer.isBuffer(content) && content.byteLength === 0)) {- return null;- }-- const contentMetadata = this.getContentMetadata();-- const noteRevision = new BNoteRevision({- noteId: this.noteId,- // title and text should be decrypted now- title: this.title,- type: this.type,- mime: this.mime,- isProtected: this.isProtected,- utcDateLastEdited: this.utcDateModified > contentMetadata.utcDateModified- ? this.utcDateModified- : contentMetadata.utcDateModified,- utcDateCreated: dateUtils.utcNowDateTime(),- utcDateModified: dateUtils.utcNowDateTime(),- dateLastEdited: this.dateModified > contentMetadata.dateModified- ? this.dateModified- : contentMetadata.dateModified,- dateCreated: dateUtils.localNowDateTime()- }, true).save();-- noteRevision.setContent(content);-- return noteRevision;- }-- beforeSaving() {- super.beforeSaving();-- this.becca.addNote(this.noteId, this);-- this.dateModified = dateUtils.localNowDateTime();- this.utcDateModified = dateUtils.utcNowDateTime();- }-- getPojo() {- return {- noteId: this.noteId,- title: this.title,- isProtected: this.isProtected,- type: this.type,- mime: this.mime,- isDeleted: false,- dateCreated: this.dateCreated,- dateModified: this.dateModified,- utcDateCreated: this.utcDateCreated,- utcDateModified: this.utcDateModified- };- }-- getPojoToSave() {- const pojo = this.getPojo();-- if (pojo.isProtected) {- if (this.isDecrypted) {- pojo.title = protectedSessionService.encrypt(pojo.title);- }- else {- // updating protected note outside of protected session means we will keep original ciphertexts- delete pojo.title;- }- }-- return pojo;- }-}--module.exports = BNote;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/becca_entities_bnote_revision.js.html b/docs/backend_api/becca_entities_bnote_revision.js.htmldeleted file mode 100644index 134307c849..0000000000--- a/docs/backend_api/becca_entities_bnote_revision.js.html+++ /dev/null@@ -1,244 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: becca/entities/bnote_revision.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: becca/entities/bnote_revision.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const protectedSessionService = require('../../services/protected_session');-const utils = require('../../services/utils');-const sql = require('../../services/sql');-const dateUtils = require('../../services/date_utils');-const becca = require('../becca');-const entityChangesService = require('../../services/entity_changes');-const AbstractBeccaEntity = require("./abstract_becca_entity");--/**- * NoteRevision represents snapshot of note's title and content at some point in the past.- * It's used for seamless note versioning.- *- * @extends AbstractBeccaEntity- */-class BNoteRevision extends AbstractBeccaEntity {- static get entityName() { return "note_revisions"; }- static get primaryKeyName() { return "noteRevisionId"; }- static get hashedProperties() { return ["noteRevisionId", "noteId", "title", "isProtected", "dateLastEdited", "dateCreated", "utcDateLastEdited", "utcDateCreated", "utcDateModified"]; }-- constructor(row, titleDecrypted = false) {- super();-- /** @type {string} */- this.noteRevisionId = row.noteRevisionId;- /** @type {string} */- this.noteId = row.noteId;- /** @type {string} */- this.type = row.type;- /** @type {string} */- this.mime = row.mime;- /** @type {boolean} */- this.isProtected = !!row.isProtected;- /** @type {string} */- this.title = row.title;- /** @type {string} */- this.dateLastEdited = row.dateLastEdited;- /** @type {string} */- this.dateCreated = row.dateCreated;- /** @type {string} */- this.utcDateLastEdited = row.utcDateLastEdited;- /** @type {string} */- this.utcDateCreated = row.utcDateCreated;- /** @type {string} */- this.utcDateModified = row.utcDateModified;- /** @type {number} */- this.contentLength = row.contentLength;-- if (this.isProtected && !titleDecrypted) {- this.title = protectedSessionService.isProtectedSessionAvailable()- ? protectedSessionService.decryptString(this.title)- : "[protected]";- }- }-- getNote() {- return becca.notes[this.noteId];- }-- /** @returns {boolean} true if the note has string content (not binary) */- isStringNote() {- return utils.isStringNote(this.type, this.mime);- }-- /*- * Note revision content has quite special handling - it's not a separate entity, but a lazily loaded- * part of NoteRevision entity with its own sync. Reason behind this hybrid design is that- * content can be quite large, and it's not necessary to load it / fill memory for any note access even- * if we don't need a content, especially for bulk operations like search.- *- * This is the same approach as is used for Note's content.- */-- /** @returns {*} */- getContent(silentNotFoundError = false) {- const res = sql.getRow(`SELECT content FROM note_revision_contents WHERE noteRevisionId = ?`, [this.noteRevisionId]);-- if (!res) {- if (silentNotFoundError) {- return undefined;- }- else {- throw new Error(`Cannot find note revision content for noteRevisionId=${this.noteRevisionId}`);- }- }-- let content = res.content;-- if (this.isProtected) {- if (protectedSessionService.isProtectedSessionAvailable()) {- content = protectedSessionService.decrypt(content);- }- else {- content = "";- }- }-- if (this.isStringNote()) {- return content === null- ? ""- : content.toString("UTF-8");- }- else {- return content;- }- }-- setContent(content, ignoreMissingProtectedSession = false) {- const pojo = {- noteRevisionId: this.noteRevisionId,- content: content,- utcDateModified: dateUtils.utcNowDateTime()- };-- if (this.isProtected) {- if (protectedSessionService.isProtectedSessionAvailable()) {- pojo.content = protectedSessionService.encrypt(pojo.content);- }- else if (!ignoreMissingProtectedSession) {- throw new Error(`Cannot update content of noteRevisionId=${this.noteRevisionId} since we're out of protected session.`);- }- }-- sql.upsert("note_revision_contents", "noteRevisionId", pojo);-- const hash = utils.hash(`${this.noteRevisionId}|${pojo.content.toString()}`);-- entityChangesService.addEntityChange({- entityName: 'note_revision_contents',- entityId: this.noteRevisionId,- hash: hash,- isErased: false,- utcDateChanged: this.getUtcDateChanged(),- isSynced: true- });- }-- /** @returns {{contentLength, dateModified, utcDateModified}} */- getContentMetadata() {- return sql.getRow(`- SELECT- LENGTH(content) AS contentLength,- dateModified,- utcDateModified- FROM note_revision_contents- WHERE noteRevisionId = ?`, [this.noteRevisionId]);- }-- beforeSaving() {- super.beforeSaving();-- this.utcDateModified = dateUtils.utcNowDateTime();- }-- getPojo() {- return {- noteRevisionId: this.noteRevisionId,- noteId: this.noteId,- type: this.type,- mime: this.mime,- isProtected: this.isProtected,- title: this.title,- dateLastEdited: this.dateLastEdited,- dateCreated: this.dateCreated,- utcDateLastEdited: this.utcDateLastEdited,- utcDateCreated: this.utcDateCreated,- utcDateModified: this.utcDateModified,- content: this.content,- contentLength: this.contentLength- };- }-- getPojoToSave() {- const pojo = this.getPojo();- delete pojo.content; // not getting persisted- delete pojo.contentLength; // not getting persisted-- if (pojo.isProtected) {- if (protectedSessionService.isProtectedSessionAvailable()) {- pojo.title = protectedSessionService.encrypt(this.title);- }- else {- // updating protected note outside of protected session means we will keep original ciphertexts- delete pojo.title;- }- }-- return pojo;- }-}--module.exports = BNoteRevision;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/becca_entities_boption.js.html b/docs/backend_api/becca_entities_boption.js.htmldeleted file mode 100644index 3a35c6105d..0000000000--- a/docs/backend_api/becca_entities_boption.js.html+++ /dev/null@@ -1,98 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: becca/entities/boption.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: becca/entities/boption.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const dateUtils = require('../../services/date_utils');-const AbstractBeccaEntity = require("./abstract_becca_entity");--/**- * Option represents name-value pair, either directly configurable by the user or some system property.- *- * @extends AbstractBeccaEntity- */-class BOption extends AbstractBeccaEntity {- static get entityName() { return "options"; }- static get primaryKeyName() { return "name"; }- static get hashedProperties() { return ["name", "value"]; }-- constructor(row) {- super();-- /** @type {string} */- this.name = row.name;- /** @type {string} */- this.value = row.value;- /** @type {boolean} */- this.isSynced = !!row.isSynced;- /** @type {string} */- this.utcDateModified = row.utcDateModified;-- this.becca.options[this.name] = this;- }-- beforeSaving() {- super.beforeSaving();-- this.utcDateModified = dateUtils.utcNowDateTime();- }-- getPojo() {- return {- name: this.name,- value: this.value,- isSynced: this.isSynced,- utcDateModified: this.utcDateModified- }- }-}--module.exports = BOption;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/becca_entities_brecent_note.js.html b/docs/backend_api/becca_entities_brecent_note.js.htmldeleted file mode 100644index 359c206695..0000000000--- a/docs/backend_api/becca_entities_brecent_note.js.html+++ /dev/null@@ -1,86 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: becca/entities/brecent_note.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: becca/entities/brecent_note.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const dateUtils = require('../../services/date_utils');-const AbstractBeccaEntity = require("./abstract_becca_entity");--/**- * RecentNote represents recently visited note.- *- * @extends AbstractBeccaEntity- */-class BRecentNote extends AbstractBeccaEntity {- static get entityName() { return "recent_notes"; }- static get primaryKeyName() { return "noteId"; }-- constructor(row) {- super();-- /** @type {string} */- this.noteId = row.noteId;- /** @type {string} */- this.notePath = row.notePath;- /** @type {string} */- this.utcDateCreated = row.utcDateCreated || dateUtils.utcNowDateTime();- }-- getPojo() {- return {- noteId: this.noteId,- notePath: this.notePath,- utcDateCreated: this.utcDateCreated- }- }-}--module.exports = BRecentNote;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/global.html b/docs/backend_api/global.htmldeleted file mode 100644index 099cb2d0b5..0000000000--- a/docs/backend_api/global.html+++ /dev/null@@ -1,1726 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Global</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Global</h1>-------<section>--<header>-- <h2></h2>---</header>--<article>- <div class="container-overview">-------<dl class="details">---------------------------------</dl>----- </div>------------------- <h3 class="subsection-title">Type Definitions</h3>----<h4 class="name" id="CreateNewNoteParams">CreateNewNoteParams</h4>------- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">object</span>--- </li>- </ul>------ <h5 class="subsection-title">Properties:</h5>----<table class="props">- <thead>- <tr>-- <th>Name</th>--- <th>Type</th>------ <th class="last">Description</th>- </tr>- </thead>-- <tbody>--- <tr>-- <td class="name"><code>parentNoteId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last">MANDATORY</td>- </tr>---- <tr>-- <td class="name"><code>title</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last">MANDATORY</td>- </tr>---- <tr>-- <td class="name"><code>content</code></td>--- <td class="type">---<span class="param-type">string</span>-|--<span class="param-type">buffer</span>---- </td>------ <td class="description last">MANDATORY</td>- </tr>---- <tr>-- <td class="name"><code>type</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last">text, code, file, image, search, book, relationMap, canvas - MANDATORY</td>- </tr>---- <tr>-- <td class="name"><code>mime</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last">value is derived from default mimes for type</td>- </tr>---- <tr>-- <td class="name"><code>isProtected</code></td>--- <td class="type">---<span class="param-type">boolean</span>---- </td>------ <td class="description last">default is false</td>- </tr>---- <tr>-- <td class="name"><code>isExpanded</code></td>--- <td class="type">---<span class="param-type">boolean</span>---- </td>------ <td class="description last">default is false</td>- </tr>---- <tr>-- <td class="name"><code>prefix</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last">default is empty string</td>- </tr>---- <tr>-- <td class="name"><code>notePosition</code></td>--- <td class="type">---<span class="param-type">int</span>---- </td>------ <td class="description last">default is last existing notePosition in a parent + 10</td>- </tr>--- </tbody>-</table>-----<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line213">line 213</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id="CreateNoteAttribute">CreateNoteAttribute</h4>------- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">object</span>--- </li>- </ul>------ <h5 class="subsection-title">Properties:</h5>----<table class="props">- <thead>- <tr>-- <th>Name</th>--- <th>Type</th>--- <th>Attributes</th>----- <th class="last">Description</th>- </tr>- </thead>-- <tbody>--- <tr>-- <td class="name"><code>type</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">---- </td>----- <td class="description last">attribute type - label, relation etc.</td>- </tr>---- <tr>-- <td class="name"><code>name</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">---- </td>----- <td class="description last">attribute name</td>- </tr>---- <tr>-- <td class="name"><code>value</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>----- <td class="description last">attribute value</td>- </tr>--- </tbody>-</table>-----<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line174">line 174</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id="CreateNoteAttribute">CreateNoteAttribute</h4>------- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">object</span>--- </li>- </ul>------ <h5 class="subsection-title">Properties:</h5>----<table class="props">- <thead>- <tr>-- <th>Name</th>--- <th>Type</th>--- <th>Attributes</th>----- <th class="last">Description</th>- </tr>- </thead>-- <tbody>--- <tr>-- <td class="name"><code>type</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">---- </td>----- <td class="description last">attribute type - label, relation etc.</td>- </tr>---- <tr>-- <td class="name"><code>name</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">---- </td>----- <td class="description last">attribute name</td>- </tr>---- <tr>-- <td class="name"><code>value</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>----- <td class="description last">attribute value</td>- </tr>--- </tbody>-</table>-----<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line234">line 234</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id="CreateNoteExtraOptions">CreateNoteExtraOptions</h4>------- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">object</span>--- </li>- </ul>------ <h5 class="subsection-title">Properties:</h5>----<table class="props">- <thead>- <tr>-- <th>Name</th>--- <th>Type</th>--- <th>Attributes</th>---- <th>Default</th>--- <th class="last">Description</th>- </tr>- </thead>-- <tbody>--- <tr>-- <td class="name"><code>json</code></td>--- <td class="type">---<span class="param-type">boolean</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- false-- </td>--- <td class="description last">should the note be JSON</td>- </tr>---- <tr>-- <td class="name"><code>isProtected</code></td>--- <td class="type">---<span class="param-type">boolean</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- false-- </td>--- <td class="description last">should the note be protected</td>- </tr>---- <tr>-- <td class="name"><code>type</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- 'text'-- </td>--- <td class="description last">note type</td>- </tr>---- <tr>-- <td class="name"><code>mime</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- 'text/html'-- </td>--- <td class="description last">MIME type of the note</td>- </tr>---- <tr>-- <td class="name"><code>attributes</code></td>--- <td class="type">---<span class="param-type">Array.<<a href="global.html#CreateNoteAttribute">CreateNoteAttribute</a>></span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- []-- </td>--- <td class="description last">attributes to be created for this note</td>- </tr>--- </tbody>-</table>-----<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line241">line 241</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id="CreateOrUpdateLauncher">CreateOrUpdateLauncher</h4>------- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">Object</span>--- </li>- </ul>------ <h5 class="subsection-title">Properties:</h5>----<table class="props">- <thead>- <tr>-- <th>Name</th>--- <th>Type</th>--- <th>Attributes</th>---- <th>Default</th>--- <th class="last">Description</th>- </tr>- </thead>-- <tbody>--- <tr>-- <td class="name"><code>id</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">---- </td>---- <td class="default">-- </td>--- <td class="description last">id of the launcher, only alphanumeric at least 6 characters long</td>- </tr>---- <tr>-- <td class="name"><code>type</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">---- </td>---- <td class="default">-- </td>--- <td class="description last">one of- * "note" - activating the launcher will navigate to the target note (specified in targetNoteId param)- * "script" - activating the launcher will execute the script (specified in scriptNoteId param)- * "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)</td>- </tr>---- <tr>-- <td class="name"><code>title</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">---- </td>---- <td class="default">-- </td>--- <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>isVisible</code></td>--- <td class="type">---<span class="param-type">boolean</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- false-- </td>--- <td class="description last">if true, will be created in the "Visible launchers", otherwise in "Available launchers"</td>- </tr>---- <tr>-- <td class="name"><code>icon</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- </td>--- <td class="description last">name of the boxicon to be used (e.g. "bx-time")</td>- </tr>---- <tr>-- <td class="name"><code>keyboardShortcut</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- </td>--- <td class="description last">will activate the target note/script upon pressing, e.g. "ctrl+e"</td>- </tr>---- <tr>-- <td class="name"><code>targetNoteId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- </td>--- <td class="description last">for type "note"</td>- </tr>---- <tr>-- <td class="name"><code>scriptNoteId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- </td>--- <td class="description last">for type "script"</td>- </tr>---- <tr>-- <td class="name"><code>widgetNoteId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- </td>--- <td class="description last">for type "customWidget"</td>- </tr>--- </tbody>-</table>-----<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line488">line 488</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id="SortConfig">SortConfig</h4>------- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">Object</span>--- </li>- </ul>------ <h5 class="subsection-title">Properties:</h5>----<table class="props">- <thead>- <tr>-- <th>Name</th>--- <th>Type</th>--- <th>Attributes</th>---- <th>Default</th>--- <th class="last">Description</th>- </tr>- </thead>-- <tbody>--- <tr>-- <td class="name"><code>sortBy</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- title-- </td>--- <td class="description last">'title', 'dateCreated', 'dateModified' or a label name- see https://github.com/zadam/trilium/wiki/Sorting for details.</td>- </tr>---- <tr>-- <td class="name"><code>reverse</code></td>--- <td class="type">---<span class="param-type">boolean</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- false-- </td>--- <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>foldersFirst</code></td>--- <td class="type">---<span class="param-type">boolean</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>---- <td class="default">-- false-- </td>--- <td class="description last"></td>- </tr>--- </tbody>-</table>-----<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line401">line 401</a>- </li></ul></dd>--------</dl>-----------</article>--</section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>\ No newline at end of filediff --git a/docs/backend_api/index.html b/docs/backend_api/index.htmlindex 7171d36351..455fa5fdcf 100644--- a/docs/backend_api/index.html+++ b/docs/backend_api/index.html@@ -50,7 +50,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/backend_api/module-sql.html b/docs/backend_api/module-sql.htmlindex 1716e1a655..73bde2df5b 100644--- a/docs/backend_api/module-sql.html+++ b/docs/backend_api/module-sql.html@@ -64,11 +64,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line3">line 3</a>- </li></ul></dd>@@ -247,11 +242,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line361">line 361</a>- </li></ul></dd>@@ -427,11 +417,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line352">line 352</a>- </li></ul></dd>@@ -629,11 +614,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line342">line 342</a>- </li></ul></dd>@@ -831,11 +811,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line318">line 318</a>- </li></ul></dd>@@ -1033,11 +1008,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line329">line 329</a>- </li></ul></dd>@@ -1235,11 +1205,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line308">line 308</a>- </li></ul></dd>@@ -1294,7 +1259,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/backend_api/services_backend_script_api.js.html b/docs/backend_api/services_backend_script_api.js.htmldeleted file mode 100644index 9be9001622..0000000000--- a/docs/backend_api/services_backend_script_api.js.html+++ /dev/null@@ -1,636 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: services/backend_script_api.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: services/backend_script_api.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>const log = require('./log');-const noteService = require('./notes');-const sql = require('./sql');-const utils = require('./utils');-const attributeService = require('./attributes');-const dateNoteService = require('./date_notes');-const treeService = require('./tree');-const config = require('./config');-const axios = require('axios');-const dayjs = require('dayjs');-const xml2js = require('xml2js');-const cloningService = require('./cloning');-const appInfo = require('./app_info');-const searchService = require('./search/services/search');-const SearchContext = require("./search/search_context");-const becca = require("../becca/becca");-const ws = require("./ws");-const SpacedUpdate = require("./spaced_update");-const specialNotesService = require("./special_notes");-const branchService = require("./branches");-const exportService = require("./export/zip");--/**- * This is the main backend API interface for scripts. It's published in the local "api" object.- *- * @constructor- * @hideconstructor- */-function BackendScriptApi(currentNote, apiParams) {- /** @property {BNote} note where script started executing */- this.startNote = apiParams.startNote;- /** @property {BNote} note where script is currently executing. Don't mix this up with concept of active note */- this.currentNote = currentNote;- /** @property {Entity} entity whose event triggered this executions */- this.originEntity = apiParams.originEntity;-- for (const key in apiParams) {- this[key] = apiParams[key];- }-- /** @property {axios} Axios library for HTTP requests. See https://axios-http.com/ for documentation */- this.axios = axios;- /** @property {dayjs} day.js library for date manipulation. See https://day.js.org/ for documentation */- this.dayjs = dayjs;- /** @property {axios} xml2js library for XML parsing. See https://github.com/Leonidas-from-XIV/node-xml2js for documentation */- this.xml2js = xml2js;-- // DEPRECATED - use direct api.unescapeHtml- this.utils = {- unescapeHtml: utils.unescapeHtml- };-- /**- * Instance name identifies particular Trilium instance. It can be useful for scripts- * if some action needs to happen on only one specific instance.- *- * @returns {string|null}- */- this.getInstanceName = () => config.General ? config.General.instanceName : null;-- /**- * @method- * @param {string} noteId- * @returns {BNote|null}- */- this.getNote = noteId => becca.getNote(noteId);-- /**- * @method- * @param {string} branchId- * @returns {Branch|null}- */- this.getBranch = branchId => becca.getBranch(branchId);-- /**- * @method- * @param {string} attributeId- * @returns {Attribute|null}- */- this.getAttribute = attributeId => becca.getAttribute(attributeId);-- /**- * This is a powerful search method - you can search by attributes and their values, e.g.:- * "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search- *- * @method- * @param {string} query- * @param {Object} [searchParams]- * @returns {BNote[]}- */- this.searchForNotes = (query, searchParams = {}) => {- if (searchParams.includeArchivedNotes === undefined) {- searchParams.includeArchivedNotes = true;- }-- if (searchParams.ignoreHoistedNote === undefined) {- searchParams.ignoreHoistedNote = true;- }-- const noteIds = searchService.findResultsWithQuery(query, new SearchContext(searchParams))- .map(sr => sr.noteId);-- return becca.getNotes(noteIds);- };-- /**- * This is a powerful search method - you can search by attributes and their values, e.g.:- * "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search- *- * @method- * @param {string} query- * @param {Object} [searchParams]- * @returns {BNote|null}- */- this.searchForNote = (query, searchParams = {}) => {- const notes = this.searchForNotes(query, searchParams);-- return notes.length > 0 ? notes[0] : null;- };-- /**- * Retrieves notes with given label name & value- *- * @method- * @param {string} name - attribute name- * @param {string} [value] - attribute value- * @returns {BNote[]}- */- this.getNotesWithLabel = attributeService.getNotesWithLabel;-- /**- * Retrieves first note with given label name & value- *- * @method- * @param {string} name - attribute name- * @param {string} [value] - attribute value- * @returns {BNote|null}- */- this.getNoteWithLabel = attributeService.getNoteWithLabel;-- /**- * If there's no branch between note and parent note, create one. Otherwise, do nothing.- *- * @method- * @param {string} noteId- * @param {string} parentNoteId- * @param {string} prefix - if branch will be created between note and parent note, set this prefix- * @returns {void}- */- this.ensureNoteIsPresentInParent = cloningService.ensureNoteIsPresentInParent;-- /**- * If there's a branch between note and parent note, remove it. Otherwise, do nothing.- *- * @method- * @param {string} noteId- * @param {string} parentNoteId- * @returns {void}- */- this.ensureNoteIsAbsentFromParent = cloningService.ensureNoteIsAbsentFromParent;-- /**- * Based on the value, either create or remove branch between note and parent note.- *- * @method- * @param {boolean} present - true if we want the branch to exist, false if we want it gone- * @param {string} noteId- * @param {string} parentNoteId- * @param {string} prefix - if branch will be created between note and parent note, set this prefix- * @returns {void}- */- this.toggleNoteInParent = cloningService.toggleNoteInParent;-- /**- * @typedef {object} CreateNoteAttribute- * @property {string} type - attribute type - label, relation etc.- * @property {string} name - attribute name- * @property {string} [value] - attribute value- */-- /**- * Create text note. See also createNewNote() for more options.- *- * @param {string} parentNoteId- * @param {string} title- * @param {string} content- * @return {{note: BNote, branch: Branch}} - object having "note" and "branch" keys representing respective objects- */- this.createTextNote = (parentNoteId, title, content = '') => noteService.createNewNote({- parentNoteId,- title,- content,- type: 'text'- });-- /**- * Create data note - data in this context means object serializable to JSON. Created note will be of type 'code' and- * JSON MIME type. See also createNewNote() for more options.- *- * @param {string} parentNoteId- * @param {string} title- * @param {object} content- * @return {{note: BNote, branch: Branch}} object having "note" and "branch" keys representing respective objects- */- this.createDataNote = (parentNoteId, title, content = {}) => noteService.createNewNote({- parentNoteId,- title,- content: JSON.stringify(content, null, '\t'),- type: 'code',- mime: 'application/json'- });-- /**- * @typedef {object} CreateNewNoteParams- * @property {string} parentNoteId - MANDATORY- * @property {string} title - MANDATORY- * @property {string|buffer} content - MANDATORY- * @property {string} type - text, code, file, image, search, book, relationMap, canvas - MANDATORY- * @property {string} mime - value is derived from default mimes for type- * @property {boolean} isProtected - default is false- * @property {boolean} isExpanded - default is false- * @property {string} prefix - default is empty string- * @property {int} notePosition - default is last existing notePosition in a parent + 10- */-- /**- * @method- *- * @param {CreateNewNoteParams} [params]- * @returns {{note: BNote, branch: Branch}} object contains newly created entities note and branch- */- this.createNewNote = noteService.createNewNote;-- /**- * @typedef {object} CreateNoteAttribute- * @property {string} type - attribute type - label, relation etc.- * @property {string} name - attribute name- * @property {string} [value] - attribute value- */-- /**- * @typedef {object} CreateNoteExtraOptions- * @property {boolean} [json=false] - should the note be JSON- * @property {boolean} [isProtected=false] - should the note be protected- * @property {string} [type='text'] - note type- * @property {string} [mime='text/html'] - MIME type of the note- * @property {CreateNoteAttribute[]} [attributes=[]] - attributes to be created for this note- */-- /**- * @method- * @deprecated please use createTextNote() with similar API for simpler use cases or createNewNote() for more complex needs- *- * @param {string} parentNoteId - create new note under this parent- * @param {string} title- * @param {string} [content=""]- * @param {CreateNoteExtraOptions} [extraOptions={}]- * @returns {{note: BNote, branch: Branch}} object contains newly created entities note and branch- */- this.createNote = (parentNoteId, title, content = "", extraOptions= {}) => {- extraOptions.parentNoteId = parentNoteId;- extraOptions.title = title;-- const parentNote = becca.getNote(parentNoteId);-- // code note type can be inherited, otherwise text is default- extraOptions.type = parentNote.type === 'code' ? 'code' : 'text';- extraOptions.mime = parentNote.type === 'code' ? parentNote.mime : 'text/html';-- if (extraOptions.json) {- extraOptions.content = JSON.stringify(content || {}, null, '\t');- extraOptions.type = 'code';- extraOptions.mime = 'application/json';- }- else {- extraOptions.content = content;- }-- return sql.transactional(() => {- const {note, branch} = noteService.createNewNote(extraOptions);-- for (const attr of extraOptions.attributes || []) {- attributeService.createAttribute({- noteId: note.noteId,- type: attr.type,- name: attr.name,- value: attr.value,- isInheritable: !!attr.isInheritable- });- }-- return {note, branch};- });- };-- this.logMessages = {};- this.logSpacedUpdates = {};-- /**- * Log given message to trilium logs and log pane in UI- *- * @param message- */- this.log = message => {- log.info(message);-- const {noteId} = this.startNote;-- this.logMessages[noteId] = this.logMessages[noteId] || [];- this.logSpacedUpdates[noteId] = this.logSpacedUpdates[noteId] || new SpacedUpdate(() => {- const messages = this.logMessages[noteId];- this.logMessages[noteId] = [];-- ws.sendMessageToAllClients({- type: 'api-log-messages',- noteId,- messages- });- }, 100);-- this.logMessages[noteId].push(message);- this.logSpacedUpdates[noteId].scheduleUpdate();- };-- /**- * Returns root note of the calendar.- *- * @method- * @returns {BNote|null}- */- this.getRootCalendarNote = dateNoteService.getRootCalendarNote;-- /**- * Returns day note for given date. If such note doesn't exist, it is created.- *- * @method- * @param {string} date in YYYY-MM-DD format- * @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use default calendar- * @returns {BNote|null}- * @deprecated use getDayNote instead- */- this.getDateNote = dateNoteService.getDayNote;-- /**- * Returns day note for given date. If such note doesn't exist, it is created.- *- * @method- * @param {string} date in YYYY-MM-DD format- * @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use default calendar- * @returns {BNote|null}- */- this.getDayNote = dateNoteService.getDayNote;-- /**- * Returns today's day note. If such note doesn't exist, it is created.- *- * @method- * @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use default calendar- * @returns {BNote|null}- */- this.getTodayNote = dateNoteService.getTodayNote;-- /**- * Returns note for the first date of the week of the given date.- *- * @method- * @param {string} date in YYYY-MM-DD format- * @param {object} [options] - "startOfTheWeek" - either "monday" (default) or "sunday"- * @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use default calendar- * @returns {BNote|null}- */- this.getWeekNote = dateNoteService.getWeekNote;-- /**- * Returns month note for given date. If such note doesn't exist, it is created.- *- * @method- * @param {string} date in YYYY-MM format- * @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use default calendar- * @returns {BNote|null}- */- this.getMonthNote = dateNoteService.getMonthNote;-- /**- * Returns year note for given year. If such note doesn't exist, it is created.- *- * @method- * @param {string} year in YYYY format- * @param {BNote} [rootNote] - specify calendar root note, normally leave empty to use default calendar- * @returns {BNote|null}- */- this.getYearNote = dateNoteService.getYearNote;-- /**- * @method- * @deprecated - use sortNotes instead- * @param {string} parentNoteId - this note's child notes will be sorted- */- this.sortNotesByTitle = parentNoteId => treeService.sortNotes(parentNoteId);-- /**- * @typedef {Object} SortConfig- * @property {string} [sortBy=title] - 'title', 'dateCreated', 'dateModified' or a label name- * see https://github.com/zadam/trilium/wiki/Sorting for details.- * @property {boolean} [reverse=false]- * @property {boolean} [foldersFirst=false]- */-- /**- * Sort child notes of a given note.- *- * @method- * @param {string} parentNoteId - this note's child notes will be sorted- * @param {SortConfig} [sortConfig]- */- this.sortNotes = (parentNoteId, sortConfig = {}) => treeService.sortNotes(- parentNoteId,- sortConfig.sortBy || "title",- !!sortConfig.reverse,- !!sortConfig.foldersFirst- );-- /**- * This method finds note by its noteId and prefix and either sets it to the given parentNoteId- * or removes the branch (if parentNoteId is not given).- *- * This method looks similar to toggleNoteInParent() but differs because we're looking up branch by prefix.- *- * @method- * @deprecated - this method is pretty confusing and serves specialized purpose only- * @param {string} noteId- * @param {string} prefix- * @param {string|null} parentNoteId- */- this.setNoteToParent = treeService.setNoteToParent;-- /**- * This functions wraps code which is supposed to be running in transaction. If transaction already- * exists, then we'll use that transaction.- *- * @method- * @param {function} func- * @returns {?} result of func callback- */- this.transactional = sql.transactional;-- /**- * Return randomly generated string of given length. This random string generation is NOT cryptographically secure.- *- * @method- * @param {number} length of the string- * @returns {string} random string- */- this.randomString = utils.randomString;-- /**- * @method- * @param {string} string to escape- * @returns {string} escaped string- */- this.escapeHtml = utils.escapeHtml;-- /**- * @method- * @param {string} string to unescape- * @returns {string} unescaped string- */- this.unescapeHtml = utils.unescapeHtml;-- /**- * @property {module:sql} sql- */- this.sql = sql;-- /**- * @method- * @deprecated - this is now no-op since all the changes should be gracefully handled per widget- */- this.refreshTree = () => {- console.warn("api.refreshTree() is a NO-OP and can be removed from your script.")- };-- /**- * @return {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version- */- this.getAppInfo = () => appInfo-- /**- * @typedef {Object} CreateOrUpdateLauncher- * @property {string} id - id of the launcher, only alphanumeric at least 6 characters long- * @property {string} type - one of- * * "note" - activating the launcher will navigate to the target note (specified in targetNoteId param)- * * "script" - activating the launcher will execute the script (specified in scriptNoteId param)- * * "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)- * @property {string} title- * @property {boolean} [isVisible=false] - if true, will be created in the "Visible launchers", otherwise in "Available launchers"- * @property {string} [icon] - name of the boxicon to be used (e.g. "bx-time")- * @property {string} [keyboardShortcut] - will activate the target note/script upon pressing, e.g. "ctrl+e"- * @property {string} [targetNoteId] - for type "note"- * @property {string} [scriptNoteId] - for type "script"- * @property {string} [widgetNoteId] - for type "customWidget"- */-- /**- * Creates a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.- *- * @param {CreateOrUpdateLauncher} opts- */- this.createOrUpdateLauncher = opts => {- if (!opts.id) { throw new Error("ID is a mandatory parameter for api.createOrUpdateLauncher(opts)"); }- if (!opts.id.match(/[a-z0-9]{6,1000}/i)) { throw new Error(`ID must be an alphanumeric string at least 6 characters long.`); }- if (!opts.type) { throw new Error("Launcher Type is a mandatory parameter for api.createOrUpdateLauncher(opts)"); }- if (!["note", "script", "customWidget"].includes(opts.type)) { throw new Error(`Given launcher type '${opts.type}'`); }- if (!opts.title?.trim()) { throw new Error("Title is a mandatory parameter for api.createOrUpdateLauncher(opts)"); }- if (opts.type === 'note' && !opts.targetNoteId) { throw new Error("targetNoteId is mandatory for launchers of type 'note'"); }- if (opts.type === 'script' && !opts.scriptNoteId) { throw new Error("scriptNoteId is mandatory for launchers of type 'script'"); }- if (opts.type === 'customWidget' && !opts.widgetNoteId) { throw new Error("widgetNoteId is mandatory for launchers of type 'customWidget'"); }-- const parentNoteId = !!opts.isVisible ? '_lbVisibleLaunchers' : '_lbAvailableLaunchers';- const noteId = 'al_' + opts.id;-- const launcherNote =- becca.getNote(opts.id) ||- specialNotesService.createLauncher({- noteId: noteId,- parentNoteId: parentNoteId,- launcherType: opts.type,- }).note;-- if (launcherNote.title !== opts.title) {- launcherNote.title = opts.title;- launcherNote.save();- }-- if (launcherNote.getParentBranches().length === 1) {- const branch = launcherNote.getParentBranches()[0];-- if (branch.parentNoteId !== parentNoteId) {- branchService.moveBranchToNote(branch, parentNoteId);- }- }-- if (opts.type === 'note') {- launcherNote.setRelation('target', opts.targetNoteId);- } else if (opts.type === 'script') {- launcherNote.setRelation('script', opts.scriptNoteId);- } else if (opts.type === 'customWidget') {- launcherNote.setRelation('widget', opts.widgetNoteId);- } else {- throw new Error(`Unrecognized launcher type '${opts.type}'`);- }-- if (opts.keyboardShortcut) {- launcherNote.setLabel('keyboardShortcut', opts.keyboardShortcut);- } else {- launcherNote.removeLabel('keyboardShortcut');- }-- if (opts.icon) {- launcherNote.setLabel('iconClass', `bx ${opts.icon}`);- } else {- launcherNote.removeLabel('keyboardShortcut');- }- };-- /**- * @method- * @param {string} noteId- * @param {string} format - either 'html' or 'markdown'- * @param {string} zipFilePath- * @returns {Promise}- */- this.exportSubtreeToZipFile = async (noteId, format, zipFilePath) => await exportService.exportToZipFile(noteId, format, zipFilePath);-- /**- * This object contains "at your risk" and "no BC guarantees" objects for advanced use cases.- *- * @type {{becca: Becca}}- */- this.__private = {- becca- }-}--module.exports = BackendScriptApi;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/services_sql.js.html b/docs/backend_api/services_sql.js.htmldeleted file mode 100644index 66ec0b8fce..0000000000--- a/docs/backend_api/services_sql.js.html+++ /dev/null@@ -1,419 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: services/sql.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: services/sql.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--/**- * @module sql- */--const log = require('./log');-const Database = require('better-sqlite3');-const dataDir = require('./data_dir');-const cls = require('./cls');-const fs = require("fs-extra");--const dbConnection = new Database(dataDir.DOCUMENT_PATH);-dbConnection.pragma('journal_mode = WAL');--const LOG_ALL_QUERIES = false;--[`exit`, `SIGINT`, `SIGUSR1`, `SIGUSR2`, `SIGTERM`].forEach(eventType => {- process.on(eventType, () => {- if (dbConnection) {- // closing connection is especially important to fold -wal file into the main DB file- // (see https://sqlite.org/tempfiles.html for details)- dbConnection.close();- }- });-});--function insert(tableName, rec, replace = false) {- const keys = Object.keys(rec);- if (keys.length === 0) {- log.error(`Can't insert empty object into table ${tableName}`);- return;- }-- const columns = keys.join(", ");- const questionMarks = keys.map(p => "?").join(", ");-- const query = `INSERT- ${replace ? "OR REPLACE" : ""} INTO- ${tableName}- (- ${columns}- )- VALUES (${questionMarks})`;-- const res = execute(query, Object.values(rec));-- return res ? res.lastInsertRowid : null;-}--function replace(tableName, rec) {- return insert(tableName, rec, true);-}--function upsert(tableName, primaryKey, rec) {- const keys = Object.keys(rec);- if (keys.length === 0) {- log.error(`Can't upsert empty object into table ${tableName}`);- return;- }-- const columns = keys.join(", ");-- const questionMarks = keys.map(colName => `@${colName}`).join(", ");-- const updateMarks = keys.map(colName => `${colName} = @${colName}`).join(", ");-- const query = `INSERT INTO ${tableName} (${columns}) VALUES (${questionMarks})- ON CONFLICT (${primaryKey}) DO UPDATE SET ${updateMarks}`;-- for (const idx in rec) {- if (rec[idx] === true || rec[idx] === false) {- rec[idx] = rec[idx] ? 1 : 0;- }- }-- execute(query, rec);-}--const statementCache = {};--function stmt(sql) {- if (!(sql in statementCache)) {- statementCache[sql] = dbConnection.prepare(sql);- }-- return statementCache[sql];-}--function getRow(query, params = []) {- return wrap(query, s => s.get(params));-}--function getRowOrNull(query, params = []) {- const all = getRows(query, params);-- return all.length > 0 ? all[0] : null;-}--function getValue(query, params = []) {- return wrap(query, s => s.pluck().get(params));-}--// smaller values can result in better performance due to better usage of statement cache-const PARAM_LIMIT = 100;--function getManyRows(query, params) {- let results = [];-- while (params.length > 0) {- const curParams = params.slice(0, Math.min(params.length, PARAM_LIMIT));- params = params.slice(curParams.length);-- const curParamsObj = {};-- let j = 1;- for (const param of curParams) {- curParamsObj['param' + j++] = param;- }-- let i = 1;- const questionMarks = curParams.map(() => ":param" + i++).join(",");- const curQuery = query.replace(/\?\?\?/g, questionMarks);-- const statement = curParams.length === PARAM_LIMIT- ? stmt(curQuery)- : dbConnection.prepare(curQuery);-- const subResults = statement.all(curParamsObj);- results = results.concat(subResults);- }-- return results;-}--function getRows(query, params = []) {- return wrap(query, s => s.all(params));-}--function getRawRows(query, params = []) {- return wrap(query, s => s.raw().all(params));-}--function iterateRows(query, params = []) {- if (LOG_ALL_QUERIES) {- console.log(query);- }-- return stmt(query).iterate(params);-}--function getMap(query, params = []) {- const map = {};- const results = getRawRows(query, params);-- for (const row of results) {- map[row[0]] = row[1];- }-- return map;-}--function getColumn(query, params = []) {- return wrap(query, s => s.pluck().all(params));-}--function execute(query, params = []) {- return wrap(query, s => s.run(params));-}--function executeMany(query, params) {- if (LOG_ALL_QUERIES) {- console.log(query);- }-- while (params.length > 0) {- const curParams = params.slice(0, Math.min(params.length, PARAM_LIMIT));- params = params.slice(curParams.length);-- const curParamsObj = {};-- let j = 1;- for (const param of curParams) {- curParamsObj['param' + j++] = param;- }-- let i = 1;- const questionMarks = curParams.map(() => ":param" + i++).join(",");- const curQuery = query.replace(/\?\?\?/g, questionMarks);-- dbConnection.prepare(curQuery).run(curParamsObj);- }-}--function executeScript(query) {- if (LOG_ALL_QUERIES) {- console.log(query);- }-- return dbConnection.exec(query);-}--function wrap(query, func) {- const startTimestamp = Date.now();- let result;-- if (LOG_ALL_QUERIES) {- console.log(query);- }-- try {- result = func(stmt(query));- }- catch (e) {- if (e.message.includes("The database connection is not open")) {- // this often happens on killing the app which puts these alerts in front of user- // in these cases error should be simply ignored.- console.log(e.message);-- return null- }-- throw e;- }-- const milliseconds = Date.now() - startTimestamp;-- if (milliseconds >= 20) {- if (query.includes("WITH RECURSIVE")) {- log.info(`Slow recursive query took ${milliseconds}ms.`);- }- else {- log.info(`Slow query took ${milliseconds}ms: ${query.trim().replace(/\s+/g, " ")}`);- }- }-- return result;-}--function transactional(func) {- try {- const ret = dbConnection.transaction(func).deferred();-- if (!dbConnection.inTransaction) { // i.e. transaction was really committed (and not just savepoint released)- require('./ws').sendTransactionEntityChangesToAllClients();- }-- return ret;- }- catch (e) {- const entityChangeIds = cls.getAndClearEntityChangeIds();-- if (entityChangeIds.length > 0) {- log.info("Transaction rollback dirtied the becca, forcing reload.");-- require('../becca/becca_loader').load();- }-- throw e;- }-}--function fillParamList(paramIds, truncate = true) {- if (paramIds.length === 0) {- return;- }-- if (truncate) {- execute("DELETE FROM param_list");- }-- paramIds = Array.from(new Set(paramIds));-- if (paramIds.length > 30000) {- fillParamList(paramIds.slice(30000), false);-- paramIds = paramIds.slice(0, 30000);- }-- // doing it manually to avoid this showing up on the sloq query list- const s = stmt(`INSERT INTO param_list VALUES ${paramIds.map(paramId => `(?)`).join(',')}`, paramIds);-- s.run(paramIds);-}--async function copyDatabase(targetFilePath) {- try {- fs.unlinkSync(targetFilePath);- } catch (e) {- } // unlink throws exception if the file did not exist-- await dbConnection.backup(targetFilePath);-}--module.exports = {- dbConnection,- insert,- replace,-- /**- * Get single value from the given query - first column from first returned row.- *- * @method- * @param {string} query - SQL query with ? used as parameter placeholder- * @param {object[]} [params] - array of params if needed- * @return [object] - single value- */- getValue,-- /**- * Get first returned row.- *- * @method- * @param {string} query - SQL query with ? used as parameter placeholder- * @param {object[]} [params] - array of params if needed- * @return {object} - map of column name to column value- */- getRow,- getRowOrNull,-- /**- * Get all returned rows.- *- * @method- * @param {string} query - SQL query with ? used as parameter placeholder- * @param {object[]} [params] - array of params if needed- * @return {object[]} - array of all rows, each row is a map of column name to column value- */- getRows,- getRawRows,- iterateRows,- getManyRows,-- /**- * Get a map of first column mapping to second column.- *- * @method- * @param {string} query - SQL query with ? used as parameter placeholder- * @param {object[]} [params] - array of params if needed- * @return {object} - map of first column to second column- */- getMap,-- /**- * Get a first column in an array.- *- * @method- * @param {string} query - SQL query with ? used as parameter placeholder- * @param {object[]} [params] - array of params if needed- * @return {object[]} - array of first column of all returned rows- */- getColumn,-- /**- * Execute SQL- *- * @method- * @param {string} query - SQL query with ? used as parameter placeholder- * @param {object[]} [params] - array of params if needed- */- execute,- executeMany,- executeScript,- transactional,- upsert,- fillParamList,- copyDatabase-};-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BNoteRevision.html">BNoteRevision</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/frontend_api/FAttribute.html b/docs/frontend_api/FAttribute.htmlindex 5a1ca75a25..19721bc559 100644--- a/docs/frontend_api/FAttribute.html+++ b/docs/frontend_api/FAttribute.html@@ -91,11 +91,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line7">line 7</a>- </li></ul></dd>@@ -191,11 +186,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line16">line 16</a>- </li></ul></dd>@@ -259,11 +249,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line28">line 28</a>- </li></ul></dd>@@ -327,11 +312,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line22">line 22</a>- </li></ul></dd>@@ -395,11 +375,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line18">line 18</a>- </li></ul></dd>@@ -463,11 +438,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line26">line 26</a>- </li></ul></dd>@@ -531,11 +501,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line20">line 20</a>- </li></ul></dd>@@ -599,11 +564,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line24">line 24</a>- </li></ul></dd>@@ -675,11 +635,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line32">line 32</a>- </li></ul></dd>@@ -777,11 +732,6 @@ and relation (representing named relationship between source and target note)</d-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line37">line 37</a>- </li></ul></dd>@@ -844,7 +794,7 @@ and relation (representing named relationship between source and target note)</d</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/FBranch.html b/docs/frontend_api/FBranch.htmlindex 864cc80081..07792adcb0 100644--- a/docs/frontend_api/FBranch.html+++ b/docs/frontend_api/FBranch.html@@ -91,11 +91,6 @@ parents.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fbranch.js.html">entities/fbranch.js</a>, <a href="entities_fbranch.js.html#line5">line 5</a>- </li></ul></dd>@@ -195,11 +190,6 @@ parents.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fbranch.js.html">entities/fbranch.js</a>, <a href="entities_fbranch.js.html#line17">line 17</a>- </li></ul></dd>@@ -263,11 +253,6 @@ parents.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fbranch.js.html">entities/fbranch.js</a>, <a href="entities_fbranch.js.html#line29">line 29</a>- </li></ul></dd>@@ -331,11 +316,6 @@ parents.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fbranch.js.html">entities/fbranch.js</a>, <a href="entities_fbranch.js.html#line27">line 27</a>- </li></ul></dd>@@ -399,11 +379,6 @@ parents.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fbranch.js.html">entities/fbranch.js</a>, <a href="entities_fbranch.js.html#line19">line 19</a>- </li></ul></dd>@@ -467,11 +442,6 @@ parents.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fbranch.js.html">entities/fbranch.js</a>, <a href="entities_fbranch.js.html#line23">line 23</a>- </li></ul></dd>@@ -535,11 +505,6 @@ parents.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fbranch.js.html">entities/fbranch.js</a>, <a href="entities_fbranch.js.html#line21">line 21</a>- </li></ul></dd>@@ -603,11 +568,6 @@ parents.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fbranch.js.html">entities/fbranch.js</a>, <a href="entities_fbranch.js.html#line25">line 25</a>- </li></ul></dd>@@ -679,11 +639,6 @@ parents.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fbranch.js.html">entities/fbranch.js</a>, <a href="entities_fbranch.js.html#line33">line 33</a>- </li></ul></dd>@@ -781,11 +736,6 @@ parents.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fbranch.js.html">entities/fbranch.js</a>, <a href="entities_fbranch.js.html#line38">line 38</a>- </li></ul></dd>@@ -883,11 +833,6 @@ parents.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fbranch.js.html">entities/fbranch.js</a>, <a href="entities_fbranch.js.html#line43">line 43</a>- </li></ul></dd>@@ -985,11 +930,6 @@ parents.</div>-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fbranch.js.html">entities/fbranch.js</a>, <a href="entities_fbranch.js.html#line48">line 48</a>- </li></ul></dd>@@ -1056,7 +996,7 @@ parents.</div></div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/FNote.html b/docs/frontend_api/FNote.htmlindex 72731a2259..a3afeef6ee 100644--- a/docs/frontend_api/FNote.html+++ b/docs/frontend_api/FNote.html@@ -158,11 +158,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line34">line 34</a>- </li></ul></dd>@@ -258,11 +253,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line38">line 38</a>- </li></ul></dd>@@ -326,11 +316,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line52">line 52</a>- </li></ul></dd>@@ -394,11 +379,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line46">line 46</a>- </li></ul></dd>@@ -462,11 +442,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line63">line 63</a>- </li></ul></dd>@@ -534,11 +509,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line73">line 73</a>- </li></ul></dd>@@ -602,11 +572,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line59">line 59</a>- </li></ul></dd>@@ -670,11 +635,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line49">line 49</a>- </li></ul></dd>@@ -738,11 +698,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line44">line 44</a>- </li></ul></dd>@@ -806,11 +761,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line41">line 41</a>- </li></ul></dd>@@ -874,11 +824,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line61">line 61</a>- </li></ul></dd>@@ -946,11 +891,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line68">line 68</a>- </li></ul></dd>@@ -1094,11 +1034,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line526">line 526</a>- </li></ul></dd>@@ -1272,11 +1207,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line548">line 548</a>- </li></ul></dd>@@ -1472,11 +1402,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line238">line 238</a>- </li></ul></dd>@@ -1581,11 +1506,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line146">line 146</a>- </li></ul></dd>-@@ -1685,11 +1605,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line163">line 163</a>- </li></ul></dd>-@@ -1786,11 +1701,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line173">line 173</a>- </li></ul></dd>@@ -1888,11 +1798,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line211">line 211</a>- </li></ul></dd>@@ -1990,11 +1895,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line216">line 216</a>- </li></ul></dd>@@ -2141,11 +2041,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line588">line 588</a>- </li></ul></dd>@@ -2296,11 +2191,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line612">line 612</a>- </li></ul></dd>@@ -2463,11 +2353,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line407">line 407</a>- </li></ul></dd>@@ -2573,11 +2458,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line743">line 743</a>- </li></ul></dd>@@ -2747,11 +2627,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line515">line 515</a>- </li></ul></dd>@@ -2925,11 +2800,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line537">line 537</a>- </li></ul></dd>@@ -3125,11 +2995,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line225">line 225</a>- </li></ul></dd>@@ -3280,11 +3145,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line582">line 582</a>- </li></ul></dd>@@ -3435,11 +3295,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line606">line 606</a>- </li></ul></dd>@@ -3602,11 +3457,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line399">line 399</a>- </li></ul></dd>@@ -3757,11 +3607,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line594">line 594</a>- </li></ul></dd>@@ -3912,11 +3757,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line618">line 618</a>- </li></ul></dd>@@ -4079,11 +3919,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line480">line 480</a>- </li></ul></dd>@@ -4185,11 +4020,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line138">line 138</a>- </li></ul></dd>@@ -4287,11 +4117,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line153">line 153</a>- </li></ul></dd>@@ -4389,11 +4214,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line181">line 181</a>- </li></ul></dd>@@ -4491,11 +4311,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line186">line 186</a>- </li></ul></dd>@@ -4642,11 +4457,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line600">line 600</a>- </li></ul></dd>@@ -4797,11 +4607,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line630">line 630</a>- </li></ul></dd>@@ -4967,11 +4772,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line640">line 640</a>- </li></ul></dd>@@ -5118,11 +4918,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line624">line 624</a>- </li></ul></dd>@@ -5285,11 +5080,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line488">line 488</a>- </li></ul></dd>@@ -5391,11 +5181,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line787">line 787</a>- </li></ul></dd>@@ -5504,11 +5289,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line732">line 732</a>- </li></ul></dd>@@ -5610,11 +5390,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line722">line 722</a>- </li></ul></dd>@@ -5712,11 +5487,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line654">line 654</a>- </li></ul></dd>@@ -5886,11 +5656,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line497">line 497</a>- </li></ul></dd>@@ -5992,11 +5757,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line168">line 168</a>- </li></ul></dd>@@ -6143,11 +5903,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line564">line 564</a>- </li></ul></dd>@@ -6321,11 +6076,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line506">line 506</a>- </li></ul></dd>@@ -6476,11 +6226,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line558">line 558</a>- </li></ul></dd>@@ -6631,11 +6376,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line570">line 570</a>- </li></ul></dd>@@ -6786,11 +6526,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line576">line 576</a>- </li></ul></dd>@@ -6895,11 +6630,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line715">line 715</a>- </li></ul></dd>-@@ -6978,11 +6708,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line782">line 782</a>- </li></ul></dd>@@ -7084,11 +6809,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line774">line 774</a>- </li></ul></dd>@@ -7190,11 +6910,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line111">line 111</a>- </li></ul></dd>@@ -7257,7 +6972,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/FNoteComplement.html b/docs/frontend_api/FNoteComplement.htmlindex 25eda287ac..121ffd256a 100644--- a/docs/frontend_api/FNoteComplement.html+++ b/docs/frontend_api/FNoteComplement.html@@ -90,11 +90,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote_complement.js.html">entities/fnote_complement.js</a>, <a href="entities_fnote_complement.js.html#line4">line 4</a>- </li></ul></dd>@@ -190,11 +185,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote_complement.js.html">entities/fnote_complement.js</a>, <a href="entities_fnote_complement.js.html#line33">line 33</a>- </li></ul></dd>@@ -258,11 +248,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote_complement.js.html">entities/fnote_complement.js</a>, <a href="entities_fnote_complement.js.html#line36">line 36</a>- </li></ul></dd>@@ -330,11 +315,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote_complement.js.html">entities/fnote_complement.js</a>, <a href="entities_fnote_complement.js.html#line13">line 13</a>- </li></ul></dd>@@ -398,11 +378,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote_complement.js.html">entities/fnote_complement.js</a>, <a href="entities_fnote_complement.js.html#line16">line 16</a>- </li></ul></dd>@@ -466,11 +441,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote_complement.js.html">entities/fnote_complement.js</a>, <a href="entities_fnote_complement.js.html#line19">line 19</a>- </li></ul></dd>@@ -534,11 +504,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote_complement.js.html">entities/fnote_complement.js</a>, <a href="entities_fnote_complement.js.html#line22">line 22</a>- </li></ul></dd>@@ -602,11 +567,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote_complement.js.html">entities/fnote_complement.js</a>, <a href="entities_fnote_complement.js.html#line7">line 7</a>- </li></ul></dd>@@ -670,11 +630,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote_complement.js.html">entities/fnote_complement.js</a>, <a href="entities_fnote_complement.js.html#line25">line 25</a>- </li></ul></dd>@@ -738,11 +693,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote_complement.js.html">entities/fnote_complement.js</a>, <a href="entities_fnote_complement.js.html#line28">line 28</a>- </li></ul></dd>@@ -775,7 +725,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/FrontendScriptApi.html b/docs/frontend_api/FrontendScriptApi.htmlindex 6c41d1787d..2e5667bca4 100644--- a/docs/frontend_api/FrontendScriptApi.html+++ b/docs/frontend_api/FrontendScriptApi.html@@ -78,11 +78,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line24">line 24</a>- </li></ul></dd>@@ -220,11 +215,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line26">line 26</a>- </li></ul></dd>@@ -326,11 +316,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line63">line 63</a>- </li></ul></dd>@@ -386,7 +371,7 @@<td class="type">-<span class="param-type">CollapsibleWidget</span>+<span class="param-type">RightPanelWidget</span>@@ -423,7 +408,7 @@-+ <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>use api.RightPanelWidget instead</li></ul></dd>@@ -433,10 +418,7 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line39">line 39</a>- </li></ul></dd>+@@ -538,11 +520,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line42">line 42</a>- </li></ul></dd>@@ -647,10 +624,106 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line60">line 60</a>- </li></ul></dd>+++++++</dl>+++++++++<h4 class="name" id="RightPanelWidget"><span class="type-signature"></span>RightPanelWidget<span class="type-signature"></span></h4>+++++++++++ <h5 class="subsection-title">Properties:</h5>++++<table class="props">+ <thead>+ <tr>+++ <th>Type</th>++++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>+++ <td class="type">+++<span class="param-type">RightPanelWidget</span>++++ </td>++++++ <td class="description last"></td>+ </tr>+++ </tbody>+</table>+++++<dl class="details">+++++++++++++++++++++++++@@ -755,11 +828,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line48">line 48</a>- </li></ul></dd>-@@ -863,11 +931,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line54">line 54</a>- </li></ul></dd>-@@ -972,11 +1035,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line31">line 31</a>- </li></ul></dd>@@ -1085,11 +1143,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line33">line 33</a>- </li></ul></dd>@@ -1195,11 +1248,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line29">line 29</a>- </li></ul></dd>@@ -1324,11 +1372,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line82">line 82</a>- </li></ul></dd>@@ -1479,11 +1522,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line72">line 72</a>- </li></ul></dd>@@ -1586,7 +1624,7 @@<td class="type">-<span class="param-type"><a href="global.html#AddButtonToToolbarOptions">AddButtonToToolbarOptions</a></span>+<span class="param-type">object</span>@@ -1608,6 +1646,189 @@+ <h5 class="subsection-title">Properties:</h5>++++<table class="props">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>+++ <th>Attributes</th>+++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>++ <td class="name"><code>opts.id</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>+++++ <td class="description last">id of the button, used to identify the old instances of this button to be replaced+ ID is optional because of BC, but not specifying it is deprecated. ID can be alphanumeric only.</td>+ </tr>++++ <tr>++ <td class="name"><code>opts.title</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++++ </td>+++++ <td class="description last"></td>+ </tr>++++ <tr>++ <td class="name"><code>opts.icon</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>+++++ <td class="description last">name of the boxicon to be used (e.g. "time" for "bx-time" icon)</td>+ </tr>++++ <tr>++ <td class="name"><code>opts.action</code></td>+++ <td class="type">+++<span class="param-type">function</span>++++ </td>+++ <td class="attributes">++++ </td>+++++ <td class="description last">callback handling the click on the button</td>+ </tr>++++ <tr>++ <td class="name"><code>opts.shortcut</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++ </td>+++++ <td class="description last">keyboard shortcut for the button, e.g. "alt+t"</td>+ </tr>+++ </tbody>+</table>++++<dl class="details">@@ -1638,11 +1859,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line143">line 143</a>- </li></ul></dd>-@@ -1774,11 +1990,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line353">line 353</a>- </li></ul></dd>@@ -1914,11 +2125,6 @@- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line341">line 341</a>- </li></ul></dd>-@@ -2121,11 +2327,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line546">line 546</a>- </li></ul></dd>@@ -2485,11 +2686,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line332">line 332</a>- </li></ul></dd>@@ -2618,11 +2814,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line272">line 272</a>- </li></ul></dd>@@ -2728,11 +2919,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line399">line 399</a>- </li></ul></dd>@@ -2834,11 +3020,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line370">line 370</a>- </li></ul></dd>@@ -2940,11 +3121,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line425">line 425</a>- </li></ul></dd>@@ -3050,11 +3226,6 @@-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line391">line 391</a>- </li></ul></dd>@@ -3161,11 +3332,6 @@ implementation of actual widget type.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line408">line 408</a>- </li></ul></dd>@@ -3266,11 +3432,6 @@ implementation of actual widget type.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line360">line 360</a>- </li></ul></dd>-@@ -3374,11 +3535,6 @@ implementation of actual widget type.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line415">line 415</a>- </li></ul></dd>-@@ -3542,11 +3698,6 @@ implementation of actual widget type.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line379">line 379</a>- </li></ul></dd>-@@ -3678,11 +3829,6 @@ implementation of actual widget type.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line434">line 434</a>- </li></ul></dd>@@ -3836,11 +3982,6 @@ implementation of actual widget type.- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line486">line 486</a>- </li></ul></dd>-@@ -3990,11 +4131,6 @@ implementation of actual widget type.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line495">line 495</a>- </li></ul></dd>@@ -4097,11 +4233,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line265">line 265</a>- </li></ul></dd>@@ -4252,11 +4383,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line513">line 513</a>- </li></ul></dd>@@ -4408,11 +4534,6 @@ if some action needs to happen on only one specific instance.-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line237">line 237</a>- </li></ul></dd>@@ -4609,11 +4730,6 @@ otherwise (by e.g. createNoteLink())-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line249">line 249</a>- </li></ul></dd>@@ -4715,11 +4831,6 @@ otherwise (by e.g. createNoteLink())-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line476">line 476</a>- </li></ul></dd>@@ -4870,11 +4981,6 @@ otherwise (by e.g. createNoteLink())-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line504">line 504</a>- </li></ul></dd>@@ -5025,11 +5131,6 @@ otherwise (by e.g. createNoteLink())-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line522">line 522</a>- </li></ul></dd>@@ -5175,11 +5276,6 @@ otherwise (by e.g. createNoteLink())-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line583">line 583</a>- </li></ul></dd>@@ -5335,11 +5431,6 @@ otherwise (by e.g. createNoteLink())-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line113">line 113</a>- </li></ul></dd>@@ -5513,11 +5604,6 @@ otherwise (by e.g. createNoteLink())-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line96">line 96</a>- </li></ul></dd>@@ -5664,11 +5750,6 @@ otherwise (by e.g. createNoteLink())-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line279">line 279</a>- </li></ul></dd>@@ -5773,11 +5854,6 @@ otherwise (by e.g. createNoteLink())- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line446">line 446</a>- </li></ul></dd>-@@ -5928,11 +6004,6 @@ otherwise (by e.g. createNoteLink())-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line457">line 457</a>- </li></ul></dd>@@ -6084,11 +6155,6 @@ otherwise (by e.g. createNoteLink())-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line466">line 466</a>- </li></ul></dd>@@ -6221,11 +6287,6 @@ otherwise (by e.g. createNoteLink())-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line573">line 573</a>- </li></ul></dd>@@ -6375,11 +6436,6 @@ otherwise (by e.g. createNoteLink())-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line564">line 564</a>- </li></ul></dd>@@ -6462,11 +6518,6 @@ otherwise (by e.g. createNoteLink())- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line319">line 319</a>- </li></ul></dd>-@@ -6598,11 +6649,6 @@ otherwise (by e.g. createNoteLink())-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line257">line 257</a>- </li></ul></dd>@@ -6759,11 +6805,6 @@ Internally this serializes the anonymous function into string and sends it to ba-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line175">line 175</a>- </li></ul></dd>@@ -6868,11 +6909,6 @@ Internally this serializes the anonymous function into string and sends it to ba- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line203">line 203</a>- </li></ul></dd>-@@ -7005,11 +7041,6 @@ Internally this serializes the anonymous function into string and sends it to ba-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line225">line 225</a>- </li></ul></dd>@@ -7161,11 +7192,6 @@ Internally this serializes the anonymous function into string and sends it to ba-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line213">line 213</a>- </li></ul></dd>@@ -7316,11 +7342,6 @@ Internally this serializes the anonymous function into string and sends it to ba-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line531">line 531</a>- </li></ul></dd>@@ -7467,11 +7488,6 @@ Internally this serializes the anonymous function into string and sends it to ba-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line440">line 440</a>- </li></ul></dd>@@ -7604,11 +7620,6 @@ Internally this serializes the anonymous function into string and sends it to ba-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line295">line 295</a>- </li></ul></dd>@@ -7741,11 +7752,6 @@ Internally this serializes the anonymous function into string and sends it to ba-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line287">line 287</a>- </li></ul></dd>@@ -7901,11 +7907,6 @@ Internally this serializes the anonymous function into string and sends it to ba-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line304">line 304</a>- </li></ul></dd>@@ -8061,11 +8062,6 @@ Internally this serializes the anonymous function into string and sends it to ba-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line313">line 313</a>- </li></ul></dd>@@ -8153,11 +8149,6 @@ Typical use case is when new note has been created, we should wait until it is s-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line557">line 557</a>- </li></ul></dd>@@ -8202,7 +8193,7 @@ Typical use case is when new note has been created, we should wait until it is s</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/entities_fattribute.js.html b/docs/frontend_api/entities_fattribute.js.htmldeleted file mode 100644index 389c5e918c..0000000000--- a/docs/frontend_api/entities_fattribute.js.html+++ /dev/null@@ -1,130 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/fattribute.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: entities/fattribute.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>import promotedAttributeDefinitionParser from '../services/promoted_attribute_definition_parser.js';--/**- * Attribute is an abstract concept which has two real uses - label (key - value pair)- * and relation (representing named relationship between source and target note)- */-class FAttribute {- constructor(froca, row) {- this.froca = froca;-- this.update(row);- }-- update(row) {- /** @type {string} */- this.attributeId = row.attributeId;- /** @type {string} */- this.noteId = row.noteId;- /** @type {string} */- this.type = row.type;- /** @type {string} */- this.name = row.name;- /** @type {string} */- this.value = row.value;- /** @type {int} */- this.position = row.position;- /** @type {boolean} */- this.isInheritable = !!row.isInheritable;- }-- /** @returns {FNote} */- getNote() {- return this.froca.notes[this.noteId];- }-- /** @returns {Promise<FNote>} */- async getTargetNote() {- const targetNoteId = this.targetNoteId;-- return await this.froca.getNote(targetNoteId, true);- }-- get targetNoteId() { // alias- if (this.type !== 'relation') {- throw new Error(`FAttribute ${this.attributeId} is not a relation`);- }-- return this.value;- }-- get isAutoLink() {- return this.type === 'relation' && ['internalLink', 'imageLink', 'relationMapLink', 'includeNoteLink'].includes(this.name);- }-- get toString() {- return `FAttribute(attributeId=${this.attributeId}, type=${this.type}, name=${this.name}, value=${this.value})`;- }-- isDefinition() {- return this.type === 'label' && (this.name.startsWith('label:') || this.name.startsWith('relation:'));- }-- getDefinition() {- return promotedAttributeDefinitionParser.parse(this.value);- }-- isDefinitionFor(attr) {- return this.type === 'label' && this.name === `${attr.type}:${attr.name}`;- }-- get dto() {- const dto = Object.assign({}, this);- delete dto.froca;-- return dto;- }-}--export default FAttribute;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/frontend_api/entities_fbranch.js.html b/docs/frontend_api/entities_fbranch.js.htmldeleted file mode 100644index 01423c8c5a..0000000000--- a/docs/frontend_api/entities_fbranch.js.html+++ /dev/null@@ -1,114 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/fbranch.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: entities/fbranch.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>/**- * Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple- * parents.- */-class FBranch {- constructor(froca, row) {- this.froca = froca;-- this.update(row);- }-- update(row) {- /**- * primary key- * @type {string}- */- this.branchId = row.branchId;- /** @type {string} */- this.noteId = row.noteId;- /** @type {string} */- this.parentNoteId = row.parentNoteId;- /** @type {int} */- this.notePosition = row.notePosition;- /** @type {string} */- this.prefix = row.prefix;- /** @type {boolean} */- this.isExpanded = !!row.isExpanded;- /** @type {boolean} */- this.fromSearchNote = !!row.fromSearchNote;- }-- /** @returns {FNote} */- async getNote() {- return this.froca.getNote(this.noteId);- }-- /** @returns {FNote} */- getNoteFromCache() {- return this.froca.getNoteFromCache(this.noteId);- }-- /** @returns {FNote} */- async getParentNote() {- return this.froca.getNote(this.parentNoteId);- }-- /** @returns {boolean} true if it's top level, meaning its parent is root note */- isTopLevel() {- return this.parentNoteId === 'root';- }-- get toString() {- return `FBranch(branchId=${this.branchId})`;- }-- get pojo() {- const pojo = {...this};- delete pojo.froca;- return pojo;- }-}--export default FBranch;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/frontend_api/entities_fnote.js.html b/docs/frontend_api/entities_fnote.js.htmldeleted file mode 100644index a5cfbd7fed..0000000000--- a/docs/frontend_api/entities_fnote.js.html+++ /dev/null@@ -1,906 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/fnote.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: entities/fnote.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>import server from '../services/server.js';-import noteAttributeCache from "../services/note_attribute_cache.js";-import ws from "../services/ws.js";-import options from "../services/options.js";-import froca from "../services/froca.js";-import protectedSessionHolder from "../services/protected_session_holder.js";-import cssClassManager from "../services/css_class_manager.js";--const LABEL = 'label';-const RELATION = 'relation';--const NOTE_TYPE_ICONS = {- "file": "bx bx-file",- "image": "bx bx-image",- "code": "bx bx-code",- "render": "bx bx-extension",- "search": "bx bx-file-find",- "relationMap": "bx bx-map-alt",- "book": "bx bx-book",- "noteMap": "bx bx-map-alt",- "mermaid": "bx bx-selection",- "canvas": "bx bx-pen",- "webView": "bx bx-globe-alt",- "launcher": "bx bx-link",- "doc": "bx bxs-file-doc",- "contentWidget": "bx bxs-widget"-};--class FNote {- /**- * @param {Froca} froca- * @param {Object.<string, Object>} row- */- constructor(froca, row) {- this.froca = froca;-- /** @type {string[]} */- this.attributes = [];-- /** @type {string[]} */- this.targetRelations = [];-- /** @type {string[]} */- this.parents = [];- /** @type {string[]} */- this.children = [];-- /** @type {Object.<string, string>} */- this.parentToBranch = {};-- /** @type {Object.<string, string>} */- this.childToBranch = {};-- this.update(row);- }-- update(row) {- /** @type {string} */- this.noteId = row.noteId;- /** @type {string} */- this.title = row.title;- /** @type {boolean} */- this.isProtected = !!row.isProtected;- /**- * one of 'text', 'code', 'file' or 'render'- * @type {string}- */- this.type = row.type;- /**- * content-type, e.g. "application/json"- * @type {string}- */- this.mime = row.mime;- }-- addParent(parentNoteId, branchId) {- if (parentNoteId === 'none') {- return;- }-- if (!this.parents.includes(parentNoteId)) {- this.parents.push(parentNoteId);- }-- this.parentToBranch[parentNoteId] = branchId;- }-- addChild(childNoteId, branchId, sort = true) {- if (!(childNoteId in this.childToBranch)) {- this.children.push(childNoteId);- }-- this.childToBranch[childNoteId] = branchId;-- if (sort) {- this.sortChildren();- }- }-- sortChildren() {- const branchIdPos = {};-- for (const branchId of Object.values(this.childToBranch)) {- branchIdPos[branchId] = this.froca.getBranch(branchId).notePosition;- }-- this.children.sort((a, b) => branchIdPos[this.childToBranch[a]] < branchIdPos[this.childToBranch[b]] ? -1 : 1);- }-- /** @returns {boolean} */- isJson() {- return this.mime === "application/json";- }-- async getContent() {- // we're not caching content since these objects are in froca and as such pretty long lived- const note = await server.get(`notes/${this.noteId}`);-- return note.content;- }-- async getJsonContent() {- const content = await this.getContent();-- try {- return JSON.parse(content);- }- catch (e) {- console.log(`Cannot parse content of note '${this.noteId}': `, e.message);-- return null;- }- }-- /**- * @returns {string[]}- */- getParentBranchIds() {- return Object.values(this.parentToBranch);- }-- /**- * @returns {string[]}- * @deprecated use getParentBranchIds() instead- */- getBranchIds() {- return this.getParentBranchIds();- }-- /**- * @returns {FBranch[]}- */- getParentBranches() {- const branchIds = Object.values(this.parentToBranch);-- return this.froca.getBranches(branchIds);- }-- /**- * @returns {FBranch[]}- * @deprecated use getParentBranches() instead- */- getBranches() {- return this.getParentBranches();- }-- /** @returns {boolean} */- hasChildren() {- return this.children.length > 0;- }-- /** @returns {FBranch[]} */- getChildBranches() {- // don't use Object.values() to guarantee order- const branchIds = this.children.map(childNoteId => this.childToBranch[childNoteId]);-- return this.froca.getBranches(branchIds);- }-- /** @returns {string[]} */- getParentNoteIds() {- return this.parents;- }-- /** @returns {FNote[]} */- getParentNotes() {- return this.froca.getNotesFromCache(this.parents);- }-- // will sort the parents so that non-search & non-archived are first and archived at the end- // this is done so that non-search & non-archived paths are always explored as first when looking for note path- resortParents() {- this.parents.sort((aNoteId, bNoteId) => {- const aBranchId = this.parentToBranch[aNoteId];-- if (aBranchId && aBranchId.startsWith('virt-')) {- return 1;- }-- const aNote = this.froca.getNoteFromCache([aNoteId]);-- if (aNote.hasLabel('archived')) {- return 1;- }-- return -1;- });- }-- /** @returns {string[]} */- getChildNoteIds() {- return this.children;- }-- /** @returns {Promise<FNote[]>} */- async getChildNotes() {- return await this.froca.getNotes(this.children);- }-- /**- * @param {string} [type] - (optional) attribute type to filter- * @param {string} [name] - (optional) attribute name to filter- * @returns {FAttribute[]} all note's attributes, including inherited ones- */- getOwnedAttributes(type, name) {- const attrs = this.attributes- .map(attributeId => this.froca.attributes[attributeId])- .filter(Boolean); // filter out nulls;-- return this.__filterAttrs(attrs, type, name);- }-- /**- * @param {string} [type] - (optional) attribute type to filter- * @param {string} [name] - (optional) attribute name to filter- * @returns {FAttribute[]} all note's attributes, including inherited ones- */- getAttributes(type, name) {- return this.__filterAttrs(this.__getCachedAttributes([]), type, name);- }-- __getCachedAttributes(path) {- // notes/clones cannot form tree cycles, it is possible to create attribute inheritance cycle via templates- // when template instance is a parent of template itself- if (path.includes(this.noteId)) {- return [];- }-- if (!(this.noteId in noteAttributeCache.attributes)) {- const newPath = [...path, this.noteId];- const attrArrs = [ this.getOwnedAttributes() ];-- if (this.noteId !== 'root') {- for (const parentNote of this.getParentNotes()) {- // these virtual parent-child relationships are also loaded into froca- if (parentNote.type !== 'search') {- attrArrs.push(parentNote.__getInheritableAttributes(newPath));- }- }- }-- for (const templateAttr of attrArrs.flat().filter(attr => attr.type === 'relation' && attr.name === 'template')) {- const templateNote = this.froca.notes[templateAttr.value];-- if (templateNote && templateNote.noteId !== this.noteId) {- attrArrs.push(- templateNote.__getCachedAttributes(newPath)- // template attr is used as a marker for templates, but it's not meant to be inherited- .filter(attr => !(attr.type === 'label' && (attr.name === 'template' || attr.name === 'workspacetemplate')))- );- }- }-- noteAttributeCache.attributes[this.noteId] = [];- const addedAttributeIds = new Set();-- for (const attr of attrArrs.flat()) {- if (!addedAttributeIds.has(attr.attributeId)) {- addedAttributeIds.add(attr.attributeId);-- noteAttributeCache.attributes[this.noteId].push(attr);- }- }- }-- return noteAttributeCache.attributes[this.noteId];- }-- isRoot() {- return this.noteId === 'root';- }-- getAllNotePaths(encounteredNoteIds = null) {- if (this.noteId === 'root') {- return [['root']];- }-- if (!encounteredNoteIds) {- encounteredNoteIds = new Set();- }-- encounteredNoteIds.add(this.noteId);-- const parentNotes = this.getParentNotes();- let paths;-- if (parentNotes.length === 1) { // optimization for the most common case- if (encounteredNoteIds.has(parentNotes[0].noteId)) {- return [];- }- else {- paths = parentNotes[0].getAllNotePaths(encounteredNoteIds);- }- }- else {- paths = [];-- for (const parentNote of parentNotes) {- if (encounteredNoteIds.has(parentNote.noteId)) {- continue;- }-- const newSet = new Set(encounteredNoteIds);-- paths.push(...parentNote.getAllNotePaths(newSet));- }- }-- for (const path of paths) {- path.push(this.noteId);- }-- return paths;- }-- getSortedNotePaths(hoistedNotePath = 'root') {- const notePaths = this.getAllNotePaths().map(path => ({- notePath: path,- isInHoistedSubTree: path.includes(hoistedNotePath),- isArchived: path.find(noteId => froca.notes[noteId].hasLabel('archived')),- isSearch: path.find(noteId => froca.notes[noteId].type === 'search'),- isHidden: path.includes('_hidden')- }));-- notePaths.sort((a, b) => {- if (a.isInHoistedSubTree !== b.isInHoistedSubTree) {- return a.isInHoistedSubTree ? -1 : 1;- } else if (a.isSearch !== b.isSearch) {- return a.isSearch ? 1 : -1;- } else if (a.isArchived !== b.isArchived) {- return a.isArchived ? 1 : -1;- } else if (a.isHidden !== b.isHidden) {- return a.isHidden ? 1 : -1;- } else {- return a.notePath.length - b.notePath.length;- }- });-- return notePaths;- }-- __filterAttrs(attributes, type, name) {- this.__validateTypeName(type, name);-- if (!type && !name) {- return attributes;- } else if (type && name) {- return attributes.filter(attr => attr.type === type && attr.name === name);- } else if (type) {- return attributes.filter(attr => attr.type === type);- } else if (name) {- return attributes.filter(attr => attr.name === name);- }- }-- __getInheritableAttributes(path) {- const attrs = this.__getCachedAttributes(path);-- return attrs.filter(attr => attr.isInheritable);- }-- __validateTypeName(type, name) {- if (type && type !== 'label' && type !== 'relation') {- throw new Error(`Unrecognized attribute type '${type}'. Only 'label' and 'relation' are possible values.`);- }-- if (name) {- const firstLetter = name.charAt(0);- if (firstLetter === '#' || firstLetter === '~') {- throw new Error(`Detect '#' or '~' in the attribute's name. In the API, attribute names should be set without these characters.`);- }- }- }-- /**- * @param {string} [name] - label name to filter- * @returns {FAttribute[]} all note's labels (attributes with type label), including inherited ones- */- getOwnedLabels(name) {- return this.getOwnedAttributes(LABEL, name);- }-- /**- * @param {string} [name] - label name to filter- * @returns {FAttribute[]} all note's labels (attributes with type label), including inherited ones- */- getLabels(name) {- return this.getAttributes(LABEL, name);- }-- getIcon() {- const iconClassLabels = this.getLabels('iconClass');- const workspaceIconClass = this.getWorkspaceIconClass();-- if (iconClassLabels.length > 0) {- return iconClassLabels[0].value;- }- else if (workspaceIconClass) {- return workspaceIconClass;- }- else if (this.noteId === 'root') {- return "bx bx-chevrons-right";- }- if (this.noteId === '_share') {- return "bx bx-share-alt";- }- else if (this.type === 'text') {- if (this.isFolder()) {- return "bx bx-folder";- }- else {- return "bx bx-note";- }- }- else if (this.type === 'code' && this.mime.startsWith('text/x-sql')) {- return "bx bx-data";- }- else {- return NOTE_TYPE_ICONS[this.type];- }- }-- getColorClass() {- const color = this.getLabelValue("color");- return cssClassManager.createClassForColor(color);- }-- isFolder() {- return this.type === 'search'- || this.getFilteredChildBranches().length > 0;- }-- getFilteredChildBranches() {- let childBranches = this.getChildBranches();-- if (!childBranches) {- ws.logError(`No children for ${parentNote}. This shouldn't happen.`);- return;- }-- if (options.is("hideIncludedImages_main")) {- const imageLinks = this.getRelations('imageLink');-- // image is already visible in the parent note so no need to display it separately in the book- childBranches = childBranches.filter(branch => !imageLinks.find(rel => rel.value === branch.noteId));- }-- // we're not checking hideArchivedNotes since that would mean we need to lazy load the child notes- // which would seriously slow down everything.- // we check this flag only once user chooses to expand the parent. This has the negative consequence that- // note may appear as folder but not contain any children when all of them are archived-- return childBranches;- }-- /**- * @param {string} [name] - relation name to filter- * @returns {FAttribute[]} all note's relations (attributes with type relation), including inherited ones- */- getOwnedRelations(name) {- return this.getOwnedAttributes(RELATION, name);- }-- /**- * @param {string} [name] - relation name to filter- * @returns {FAttribute[]} all note's relations (attributes with type relation), including inherited ones- */- getRelations(name) {- return this.getAttributes(RELATION, name);- }-- /**- * @param {string} type - attribute type (label, relation, etc.)- * @param {string} name - attribute name- * @returns {boolean} true if note has an attribute with given type and name (including inherited)- */- hasAttribute(type, name) {- return !!this.getAttribute(type, name);- }-- /**- * @param {string} type - attribute type (label, relation, etc.)- * @param {string} name - attribute name- * @returns {boolean} true if note has an attribute with given type and name (including inherited)- */- hasOwnedAttribute(type, name) {- return !!this.getOwnedAttribute(type, name);- }-- /**- * @param {string} type - attribute type (label, relation, etc.)- * @param {string} name - attribute name- * @returns {FAttribute} attribute of given type and name. If there's more such attributes, first is returned. Returns null if there's no such attribute belonging to this note.- */- getOwnedAttribute(type, name) {- const attributes = this.getOwnedAttributes(type, name);-- return attributes.length > 0 ? attributes[0] : 0;- }-- /**- * @param {string} type - attribute type (label, relation, etc.)- * @param {string} name - attribute name- * @returns {FAttribute} attribute of given type and name. If there's more such attributes, first is returned. Returns null if there's no such attribute belonging to this note.- */- getAttribute(type, name) {- const attributes = this.getAttributes(type, name);-- return attributes.length > 0 ? attributes[0] : null;- }-- /**- * @param {string} type - attribute type (label, relation, etc.)- * @param {string} name - attribute name- * @returns {string} attribute value of given type and name or null if no such attribute exists.- */- getOwnedAttributeValue(type, name) {- const attr = this.getOwnedAttribute(type, name);-- return attr ? attr.value : null;- }-- /**- * @param {string} type - attribute type (label, relation, etc.)- * @param {string} name - attribute name- * @returns {string} attribute value of given type and name or null if no such attribute exists.- */- getAttributeValue(type, name) {- const attr = this.getAttribute(type, name);-- return attr ? attr.value : null;- }-- /**- * @param {string} name - label name- * @returns {boolean} true if label exists (excluding inherited)- */- hasOwnedLabel(name) { return this.hasOwnedAttribute(LABEL, name); }-- /**- * @param {string} name - label name- * @returns {boolean} true if label exists (including inherited)- */- hasLabel(name) { return this.hasAttribute(LABEL, name); }-- /**- * @param {string} name - relation name- * @returns {boolean} true if relation exists (excluding inherited)- */- hasOwnedRelation(name) { return this.hasOwnedAttribute(RELATION, name); }-- /**- * @param {string} name - relation name- * @returns {boolean} true if relation exists (including inherited)- */- hasRelation(name) { return this.hasAttribute(RELATION, name); }-- /**- * @param {string} name - label name- * @returns {FAttribute} label if it exists, null otherwise- */- getOwnedLabel(name) { return this.getOwnedAttribute(LABEL, name); }-- /**- * @param {string} name - label name- * @returns {FAttribute} label if it exists, null otherwise- */- getLabel(name) { return this.getAttribute(LABEL, name); }-- /**- * @param {string} name - relation name- * @returns {FAttribute} relation if it exists, null otherwise- */- getOwnedRelation(name) { return this.getOwnedAttribute(RELATION, name); }-- /**- * @param {string} name - relation name- * @returns {FAttribute} relation if it exists, null otherwise- */- getRelation(name) { return this.getAttribute(RELATION, name); }-- /**- * @param {string} name - label name- * @returns {string} label value if label exists, null otherwise- */- getOwnedLabelValue(name) { return this.getOwnedAttributeValue(LABEL, name); }-- /**- * @param {string} name - label name- * @returns {string} label value if label exists, null otherwise- */- getLabelValue(name) { return this.getAttributeValue(LABEL, name); }-- /**- * @param {string} name - relation name- * @returns {string} relation value if relation exists, null otherwise- */- getOwnedRelationValue(name) { return this.getOwnedAttributeValue(RELATION, name); }-- /**- * @param {string} name - relation name- * @returns {string} relation value if relation exists, null otherwise- */- getRelationValue(name) { return this.getAttributeValue(RELATION, name); }-- /**- * @param {string} name- * @returns {Promise<FNote>|null} target note of the relation or null (if target is empty or note was not found)- */- async getRelationTarget(name) {- const targets = await this.getRelationTargets(name);-- return targets.length > 0 ? targets[0] : null;- }-- /**- * @param {string} [name] - relation name to filter- * @returns {Promise<FNote[]>}- */- async getRelationTargets(name) {- const relations = this.getRelations(name);- const targets = [];-- for (const relation of relations) {- targets.push(await this.froca.getNote(relation.value));- }-- return targets;- }-- /**- * @returns {FNote[]}- */- getTemplateNotes() {- const relations = this.getRelations('template');-- return relations.map(rel => this.froca.notes[rel.value]);- }-- getPromotedDefinitionAttributes() {- if (this.hasLabel('hidePromotedAttributes')) {- return [];- }-- const promotedAttrs = this.getAttributes()- .filter(attr => attr.isDefinition())- .filter(attr => {- const def = attr.getDefinition();-- return def && def.isPromoted;- });-- // attrs are not resorted if position changes after initial load- promotedAttrs.sort((a, b) => a.position < b.position ? -1 : 1);-- return promotedAttrs;- }-- hasAncestor(ancestorNoteId, visitedNoteIds = null) {- if (this.noteId === ancestorNoteId) {- return true;- }-- if (!visitedNoteIds) {- visitedNoteIds = new Set();- } else if (visitedNoteIds.has(this.noteId)) {- // to avoid infinite cycle when template is descendent of the instance- return false;- }-- visitedNoteIds.add(this.noteId);-- for (const templateNote of this.getTemplateNotes()) {- if (templateNote.hasAncestor(ancestorNoteId, visitedNoteIds)) {- return true;- }- }-- for (const parentNote of this.getParentNotes()) {- if (parentNote.hasAncestor(ancestorNoteId, visitedNoteIds)) {- return true;- }- }-- return false;- }-- isInHiddenSubtree() {- return this.noteId === '_hidden' || this.hasAncestor('_hidden');- }-- /**- * @deprecated NOOP- */- invalidateAttributeCache() {}-- /**- * Get relations which target this note- *- * @returns {FAttribute[]}- */- getTargetRelations() {- return this.targetRelations- .map(attributeId => this.froca.attributes[attributeId]);- }-- /**- * Get relations which target this note- *- * @returns {FNote[]}- */- async getTargetRelationSourceNotes() {- const targetRelations = this.getTargetRelations();-- return await this.froca.getNotes(targetRelations.map(tr => tr.noteId));- }-- /**- * Return note complement which is most importantly note's content- *- * @return {Promise<FNoteComplement>}- */- async getNoteComplement() {- return await this.froca.getNoteComplement(this.noteId);- }-- toString() {- return `Note(noteId=${this.noteId}, title=${this.title})`;- }-- get dto() {- const dto = Object.assign({}, this);- delete dto.froca;-- return dto;- }-- getCssClass() {- const labels = this.getLabels('cssClass');- return labels.map(l => l.value).join(' ');- }-- getWorkspaceIconClass() {- const labels = this.getLabels('workspaceIconClass');- return labels.length > 0 ? labels[0].value : "";- }-- getWorkspaceTabBackgroundColor() {- const labels = this.getLabels('workspaceTabBackgroundColor');- return labels.length > 0 ? labels[0].value : "";- }-- /** @returns {boolean} true if this note is JavaScript (code or attachment) */- isJavaScript() {- return (this.type === "code" || this.type === "file" || this.type === 'launcher')- && (this.mime.startsWith("application/javascript")- || this.mime === "application/x-javascript"- || this.mime === "text/javascript");- }-- /** @returns {boolean} true if this note is HTML */- isHtml() {- return (this.type === "code" || this.type === "file" || this.type === "render") && this.mime === "text/html";- }-- /** @returns {string|null} JS script environment - either "frontend" or "backend" */- getScriptEnv() {- if (this.isHtml() || (this.isJavaScript() && this.mime.endsWith('env=frontend'))) {- return "frontend";- }-- if (this.type === 'render') {- return "frontend";- }-- if (this.isJavaScript() && this.mime.endsWith('env=backend')) {- return "backend";- }-- return null;- }-- async executeScript() {- if (!this.isJavaScript()) {- throw new Error(`Note ${this.noteId} is of type ${this.type} and mime ${this.mime} and thus cannot be executed`);- }-- const env = this.getScriptEnv();-- if (env === "frontend") {- const bundleService = (await import("../services/bundle.js")).default;- return await bundleService.getAndExecuteBundle(this.noteId);- }- else if (env === "backend") {- const resp = await server.post(`script/run/${this.noteId}`);- }- else {- throw new Error(`Unrecognized env type ${env} for note ${this.noteId}`);- }- }-- isShared() {- for (const parentNoteId of this.parents) {- if (parentNoteId === 'root' || parentNoteId === 'none') {- continue;- }-- const parentNote = froca.notes[parentNoteId];-- if (!parentNote || parentNote.type === 'search') {- continue;- }-- if (parentNote.noteId === '_share' || parentNote.isShared()) {- return true;- }- }-- return false;- }-- isContentAvailable() {- return !this.isProtected || protectedSessionHolder.isProtectedSessionAvailable()- }-- isLaunchBarConfig() {- return this.type === 'launcher' || ['_lbRoot', '_lbAvailableLaunchers', '_lbVisibleLaunchers'].includes(this.noteId);- }-- isOptions() {- return this.noteId.startsWith("options");- }-}--export default FNote;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/frontend_api/entities_fnote_complement.js.html b/docs/frontend_api/entities_fnote_complement.js.htmldeleted file mode 100644index 6ed38dc955..0000000000--- a/docs/frontend_api/entities_fnote_complement.js.html+++ /dev/null@@ -1,91 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/fnote_complement.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: entities/fnote_complement.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>/**- * Complements the FNote with the main note content and other extra attributes- */-class FNoteComplement {- constructor(row) {- /** @type {string} */- this.noteId = row.noteId;-- /**- * can either contain the whole content (in e.g. string notes), only part (large text notes) or nothing at all (binary notes, images)- * @type {string}- */- this.content = row.content;-- /** @type {int} */- this.contentLength = row.contentLength;-- /** @type {string} */- this.dateCreated = row.dateCreated;-- /** @type {string} */- this.dateModified = row.dateModified;-- /** @type {string} */- this.utcDateCreated = row.utcDateCreated;-- /** @type {string} */- this.utcDateModified = row.utcDateModified;-- // "combined" date modified give larger out of note's and note_content's dateModified-- /** @type {string} */- this.combinedDateModified = row.combinedDateModified;-- /** @type {string} */- this.combinedUtcDateModified = row.combinedUtcDateModified;- }-}--export default FNoteComplement;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/frontend_api/global.html b/docs/frontend_api/global.htmldeleted file mode 100644index d7ba462855..0000000000--- a/docs/frontend_api/global.html+++ /dev/null@@ -1,472 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Global</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Global</h1>-------<section>--<header>-- <h2></h2>---</header>--<article>- <div class="container-overview">-------<dl class="details">---------------------------------</dl>----- </div>----------------- <h3 class="subsection-title">Methods</h3>-------- <h4 class="name" id="doRenderBody"><span class="type-signature">(async) </span>doRenderBody<span class="signature">()</span><span class="type-signature"></span></h4>-------<div class="description">- for overriding-</div>--------------<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="widgets_collapsible_widget.js.html">widgets/collapsible_widget.js</a>, <a href="widgets_collapsible_widget.js.html#line37">line 37</a>- </li></ul></dd>--------</dl>------------------------- <h3 class="subsection-title">Type Definitions</h3>----<h4 class="name" id="AddButtonToToolbarOptions">AddButtonToToolbarOptions</h4>------- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">Object</span>--- </li>- </ul>------ <h5 class="subsection-title">Properties:</h5>----<table class="props">- <thead>- <tr>-- <th>Name</th>--- <th>Type</th>--- <th>Attributes</th>----- <th class="last">Description</th>- </tr>- </thead>-- <tbody>--- <tr>-- <td class="name"><code>id</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>----- <td class="description last">id of the button, used to identify the old instances of this button to be replaced- ID is optional because of BC, but not specifying it is deprecated. ID can be alphanumeric only.</td>- </tr>---- <tr>-- <td class="name"><code>title</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">---- </td>----- <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>icon</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>----- <td class="description last">name of the boxicon to be used (e.g. "time" for "bx-time" icon)</td>- </tr>---- <tr>-- <td class="name"><code>action</code></td>--- <td class="type">---<span class="param-type">function</span>---- </td>--- <td class="attributes">---- </td>----- <td class="description last">callback handling the click on the button</td>- </tr>---- <tr>-- <td class="name"><code>shortcut</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>---- </td>----- <td class="description last">keyboard shortcut for the button, e.g. "alt+t"</td>- </tr>--- </tbody>-</table>-----<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line126">line 126</a>- </li></ul></dd>--------</dl>-----------</article>--</section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>\ No newline at end of filediff --git a/docs/frontend_api/index.html b/docs/frontend_api/index.htmlindex 85abe287b8..e6417de059 100644--- a/docs/frontend_api/index.html+++ b/docs/frontend_api/index.html@@ -50,7 +50,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/module.exports.html b/docs/frontend_api/module.exports.htmldeleted file mode 100644index 67fb32df44..0000000000--- a/docs/frontend_api/module.exports.html+++ /dev/null@@ -1,170 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Class: exports</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Class: exports</h1>-------<section>--<header>-- <h2><span class="attribs"><span class="type-signature"></span></span>exports<span class="signature">()</span><span class="type-signature"></span></h2>-- <div class="class-description">TODO: rename, it's not collapsible anymore</div>---</header>--<article>- <div class="container-overview">----- <h2>Constructor</h2>---- <h4 class="name" id="exports"><span class="type-signature"></span>new exports<span class="signature">()</span><span class="type-signature"></span></h4>-------------------<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="widgets_collapsible_widget.js.html">widgets/collapsible_widget.js</a>, <a href="widgets_collapsible_widget.js.html#line15">line 15</a>- </li></ul></dd>--------</dl>---------------------- </div>---------------------</article>--</section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>\ No newline at end of filediff --git a/docs/frontend_api/services_frontend_script_api.js.html b/docs/frontend_api/services_frontend_script_api.js.htmldeleted file mode 100644index d2c928a8d9..0000000000--- a/docs/frontend_api/services_frontend_script_api.js.html+++ /dev/null@@ -1,654 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: services/frontend_script_api.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: services/frontend_script_api.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>import server from './server.js';-import utils from './utils.js';-import toastService from './toast.js';-import linkService from './link.js';-import froca from './froca.js';-import noteTooltipService from './note_tooltip.js';-import protectedSessionService from './protected_session.js';-import dateNotesService from './date_notes.js';-import searchService from './search.js';-import CollapsibleWidget from '../widgets/collapsible_widget.js';-import ws from "./ws.js";-import appContext from "../components/app_context.js";-import NoteContextAwareWidget from "../widgets/note_context_aware_widget.js";-import BasicWidget from "../widgets/basic_widget.js";-import SpacedUpdate from "./spaced_update.js";-import shortcutService from "./shortcuts.js";--/**- * This is the main frontend API interface for scripts. It's published in the local "api" object.- *- * @constructor- * @hideconstructor- */-function FrontendScriptApi(startNote, currentNote, originEntity = null, $container = null) {- /** @property {jQuery} container of all the rendered script content */- this.$container = $container;-- /** @property {object} note where script started executing */- this.startNote = startNote;- /** @property {object} note where script is currently executing */- this.currentNote = currentNote;- /** @property {object|null} entity whose event triggered this execution */- this.originEntity = originEntity;-- // to keep consistency with backend API- this.dayjs = dayjs;-- /** @property {CollapsibleWidget} */- this.CollapsibleWidget = CollapsibleWidget;-- /** @property {NoteContextAwareWidget} */- this.NoteContextAwareWidget = NoteContextAwareWidget;-- /**- * @property {NoteContextAwareWidget}- * @deprecated use NoteContextAwareWidget instead- */- this.TabAwareWidget = NoteContextAwareWidget;-- /**- * @property {NoteContextAwareWidget}- * @deprecated use NoteContextAwareWidget instead- */- this.TabCachingWidget = NoteContextAwareWidget;-- /**- * @property {NoteContextAwareWidget}- * @deprecated use NoteContextAwareWidget instead- */- this.NoteContextCachingWidget = NoteContextAwareWidget;-- /** @property {BasicWidget} */- this.BasicWidget = BasicWidget;-- /**- * Activates note in the tree and in the note detail.- *- * @method- * @param {string} notePath (or noteId)- * @returns {Promise<void>}- */- this.activateNote = async notePath => {- await appContext.tabManager.getActiveContext().setNote(notePath);- };-- /**- * Activates newly created note. Compared to this.activateNote() also makes sure that frontend has been fully synced.- *- * @param {string} notePath (or noteId)- * @return {Promise<void>}- */- this.activateNewNote = async notePath => {- await ws.waitForMaxKnownEntityChangeId();-- await appContext.tabManager.getActiveContext().setNote(notePath);- appContext.triggerEvent('focusAndSelectTitle');- };-- /**- * Open a note in a new tab.- *- * @param {string} notePath (or noteId)- * @param {boolean} activate - set to true to activate the new tab, false to stay on the current tab- * @return {Promise<void>}- */- this.openTabWithNote = async (notePath, activate) => {- await ws.waitForMaxKnownEntityChangeId();-- await appContext.tabManager.openContextWithNote(notePath, activate);-- if (activate) {- appContext.triggerEvent('focusAndSelectTitle');- }- };-- /**- * Open a note in a new split.- *- * @param {string} notePath (or noteId)- * @param {boolean} activate - set to true to activate the new split, false to stay on the current split- * @return {Promise<void>}- */- this.openSplitWithNote = async (notePath, activate) => {- await ws.waitForMaxKnownEntityChangeId();-- const subContexts = appContext.tabManager.getActiveContext().getSubContexts();- const {ntxId} = subContexts[subContexts.length - 1];-- appContext.triggerCommand("openNewNoteSplit", {ntxId, notePath});-- if (activate) {- appContext.triggerEvent('focusAndSelectTitle');- }- };-- /**- * @typedef {Object} AddButtonToToolbarOptions- * @property {string} [id] - id of the button, used to identify the old instances of this button to be replaced- * ID is optional because of BC, but not specifying it is deprecated. ID can be alphanumeric only.- * @property {string} title- * @property {string} [icon] - name of the boxicon to be used (e.g. "time" for "bx-time" icon)- * @property {function} action - callback handling the click on the button- * @property {string} [shortcut] - keyboard shortcut for the button, e.g. "alt+t"- */-- /**- * Adds a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.- *- * @deprecated you can now create/modify launchers in the top-left Menu -> Configure Launchbar- * for special needs there's also backend API's createOrUpdateLauncher()- * @param {AddButtonToToolbarOptions} opts- */- this.addButtonToToolbar = async opts => {- console.warn("api.addButtonToToolbar() has been deprecated since v0.58 and may be removed in the future. Use Menu -> Configure Launchbar to create/update launchers instead.");-- const {action, ...reqBody} = opts;- reqBody.action = action.toString();-- await server.put('special-notes/api-script-launcher', reqBody);- };-- function prepareParams(params) {- if (!params) {- return params;- }-- return params.map(p => {- if (typeof p === "function") {- return `!@#Function: ${p.toString()}`;- }- else {- return p;- }- });- }-- /**- * Executes given anonymous function on the backend.- * Internally this serializes the anonymous function into string and sends it to backend via AJAX.- *- * @param {string} script - script to be executed on the backend- * @param {Array.<?>} params - list of parameters to the anonymous function to be send to backend- * @return {Promise<*>} return value of the executed function on the backend- */- this.runOnBackend = async (script, params = []) => {- if (typeof script === "function") {- script = script.toString();- }-- const ret = await server.post('script/exec', {- script: script,- params: prepareParams(params),- startNoteId: startNote.noteId,- currentNoteId: currentNote.noteId,- originEntityName: "notes", // currently there's no other entity on frontend which can trigger event- originEntityId: originEntity ? originEntity.noteId : null- }, "script");-- if (ret.success) {- await ws.waitForMaxKnownEntityChangeId();-- return ret.executionResult;- }- else {- throw new Error(`server error: ${ret.error}`);- }- };-- /**- * @deprecated new name of this API call is runOnBackend so use that- * @method- */- this.runOnServer = this.runOnBackend;-- /**- * This is a powerful search method - you can search by attributes and their values, e.g.:- * "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search- *- * @method- * @param {string} searchString- * @returns {Promise<FNote[]>}- */- this.searchForNotes = async searchString => {- return await searchService.searchForNotes(searchString);- };-- /**- * This is a powerful search method - you can search by attributes and their values, e.g.:- * "#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search- *- * @method- * @param {string} searchString- * @returns {Promise<FNote|null>}- */- this.searchForNote = async searchString => {- const notes = await this.searchForNotes(searchString);-- return notes.length > 0 ? notes[0] : null;- };-- /**- * Returns note by given noteId. If note is missing from cache, it's loaded.- **- * @param {string} noteId- * @return {Promise<FNote>}- */- this.getNote = async noteId => await froca.getNote(noteId);-- /**- * Returns list of notes. If note is missing from cache, it's loaded.- *- * This is often used to bulk-fill the cache with notes which would have to be picked one by one- * otherwise (by e.g. createNoteLink())- *- * @param {string[]} noteIds- * @param {boolean} [silentNotFoundError] - don't report error if the note is not found- * @return {Promise<FNote[]>}- */- this.getNotes = async (noteIds, silentNotFoundError = false) => await froca.getNotes(noteIds, silentNotFoundError);-- /**- * Update frontend tree (note) cache from the backend.- *- * @param {string[]} noteIds- * @method- */- this.reloadNotes = async noteIds => await froca.reloadNotes(noteIds);-- /**- * Instance name identifies particular Trilium instance. It can be useful for scripts- * if some action needs to happen on only one specific instance.- *- * @return {string}- */- this.getInstanceName = () => window.glob.instanceName;-- /**- * @method- * @param {Date} date- * @returns {string} date in YYYY-MM-DD format- */- this.formatDateISO = utils.formatDateISO;-- /**- * @method- * @param {string} str- * @returns {Date} parsed object- */- this.parseDate = utils.parseDate;-- /**- * Show info message to the user.- *- * @method- * @param {string} message- */- this.showMessage = toastService.showMessage;-- /**- * Show error message to the user.- *- * @method- * @param {string} message- */- this.showError = toastService.showError;-- /**- * Trigger command.- *- * @method- * @param {string} name- * @param {object} data- */- this.triggerCommand = (name, data) => appContext.triggerCommand(name, data);-- /**- * Trigger event.- *- * @method- * @param {string} name- * @param {object} data- */- this.triggerEvent = (name, data) => appContext.triggerEvent(name, data);-- /**- * @method- * @deprecated - this is now no-op since all the changes should be gracefully handled per widget- */- this.refreshTree = () => {};-- /**- * Create note link (jQuery object) for given note.- *- * @method- * @param {string} notePath (or noteId)- * @param {object} [params]- * @param {boolean} [params.showTooltip=true] - enable/disable tooltip on the link- * @param {boolean} [params.showNotePath=false] - show also whole note's path as part of the link- * @param {boolean} [params.showNoteIcon=false] - show also note icon before the title- * @param {string} [params.title=] - custom link tile with note's title as default- */- this.createNoteLink = linkService.createNoteLink;-- /**- * Adds given text to the editor cursor- *- * @deprecated use addTextToActiveContextEditor() instead- * @param {string} text - this must be clear text, HTML is not supported.- * @method- */- this.addTextToActiveTabEditor = text => {- console.warn("api.addTextToActiveTabEditor() is deprecated, use addTextToActiveContextEditor() instead.");-- return appContext.triggerCommand('addTextToActiveEditor', {text});- };-- /**- * Adds given text to the editor cursor- *- * @param {string} text - this must be clear text, HTML is not supported.- * @method- */- this.addTextToActiveContextEditor = text => appContext.triggerCommand('addTextToActiveEditor', {text});-- /**- * @method- * @deprecated use getActiveContextNote() instead- * @returns {FNote} active note (loaded into right pane)- */- this.getActiveTabNote = () => {- console.warn("api.getActiveTabNote() is deprecated, use getActiveContextNote() instead.");-- return appContext.tabManager.getActiveContextNote();- };-- /**- * @method- * @returns {FNote} active note (loaded into right pane)- */- this.getActiveContextNote = () => appContext.tabManager.getActiveContextNote();-- /**- * See https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html for a documentation on the returned instance.- *- * @deprecated use getActiveContextTextEditor()- * @method- * @param [callback] - callback receiving "textEditor" instance- */- this.getActiveTabTextEditor = callback => {- console.warn("api.getActiveTabTextEditor() is deprecated, use getActiveContextTextEditor() instead.");-- return appContext.tabManager.getActiveContext()?.getTextEditor(callback);- };-- /**- * See https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html for a documentation on the returned instance.- *- * @method- * @returns {Promise<CKEditor>} instance of CKEditor- */- this.getActiveContextTextEditor = () => appContext.tabManager.getActiveContext()?.getTextEditor();-- /**- * See https://codemirror.net/doc/manual.html#api- *- * @method- * @returns {Promise<CodeMirror>} instance of CodeMirror- */- this.getActiveContextCodeEditor = () => appContext.tabManager.getActiveContext()?.getCodeEditor();-- /**- * Get access to the widget handling note detail. Methods like `getWidgetType()` and `getTypeWidget()` to get to the- * implementation of actual widget type.- *- * @method- * @returns {Promise<NoteDetailWidget>}- */- this.getActiveNoteDetailWidget = () => new Promise(resolve => appContext.triggerCommand('executeInActiveNoteDetailWidget', {callback: resolve}));-- /**- * @method- * @deprecated use getActiveContextNotePath() instead- * @returns {Promise<string|null>} returns note path of active note or null if there isn't active note- */- this.getActiveTabNotePath = () => {- console.warn("api.getActiveTabNotePath() is deprecated, use getActiveContextNotePath() instead.");-- return appContext.tabManager.getActiveContextNotePath();- };-- /**- * @method- * @returns {Promise<string|null>} returns note path of active note or null if there isn't active note- */- this.getActiveContextNotePath = () => appContext.tabManager.getActiveContextNotePath();-- /**- * Returns component which owns given DOM element (the nearest parent component in DOM tree)- *- * @method- * @param {Element} el - DOM element- * @returns {Component}- */- this.getComponentByEl = el => appContext.getComponentByEl(el);-- /**- * @method- * @param {object} $el - jquery object on which to setup the tooltip- */- this.setupElementTooltip = noteTooltipService.setupElementTooltip;-- /**- * @deprecated use protectNote and protectSubtree instead- * @method- */- this.protectActiveNote = async () => {- const activeNote = appContext.tabManager.getActiveContextNote();-- await protectedSessionService.protectNote(activeNote.noteId, true, false);- };-- /**- * @method- * @param {string} noteId- * @param {boolean} protect - true to protect note, false to unprotect- */- this.protectNote = async (noteId, protect) => {- await protectedSessionService.protectNote(noteId, protect, false);- };-- /**- * @method- * @param {string} noteId- * @param {boolean} protect - true to protect subtree, false to unprotect- */- this.protectSubTree = async (noteId, protect) => {- await protectedSessionService.protectNote(noteId, protect, true);- };-- /**- * Returns date-note for today. If it doesn't exist, it is automatically created.- *- * @method- * @return {Promise<FNote>}- */- this.getTodayNote = dateNotesService.getTodayNote;-- /**- * Returns day note for a given date. If it doesn't exist, it is automatically created.- *- * @method- * @param {string} date - e.g. "2019-04-29"- * @return {Promise<FNote>}- * @deprecated use getDayNote instead- */- this.getDateNote = dateNotesService.getDayNote;-- /**- * Returns day note for a given date. If it doesn't exist, it is automatically created.- *- * @method- * @param {string} date - e.g. "2019-04-29"- * @return {Promise<FNote>}- */- this.getDayNote = dateNotesService.getDayNote;-- /**- * Returns day note for the first date of the week of the given date. If it doesn't exist, it is automatically created.- *- * @method- * @param {string} date - e.g. "2019-04-29"- * @return {Promise<FNote>}- */- this.getWeekNote = dateNotesService.getWeekNote;-- /**- * Returns month-note. If it doesn't exist, it is automatically created.- *- * @method- * @param {string} month - e.g. "2019-04"- * @return {Promise<FNote>}- */- this.getMonthNote = dateNotesService.getMonthNote;-- /**- * Returns year-note. If it doesn't exist, it is automatically created.- *- * @method- * @param {string} year - e.g. "2019"- * @return {Promise<FNote>}- */- this.getYearNote = dateNotesService.getYearNote;-- /**- * Hoist note in the current tab. See https://github.com/zadam/trilium/wiki/Note-hoisting- *- * @method- * @param {string} noteId - set hoisted note. 'root' will effectively unhoist- * @return {Promise}- */- this.setHoistedNoteId = (noteId) => {- const activeNoteContext = appContext.tabManager.getActiveContext();-- if (activeNoteContext) {- activeNoteContext.setHoistedNoteId(noteId);- }- };-- /**- * @method- * @param {string} keyboardShortcut - e.g. "ctrl+shift+a"- * @param {function} handler- * @param {string} [namespace] - specify namespace of the handler for the cases where call for bind may be repeated.- * If a handler with this ID exists, it's replaced by the new handler.- */- this.bindGlobalShortcut = shortcutService.bindGlobalShortcut;-- /**- * Trilium runs in backend and frontend process, when something is changed on the backend from script,- * frontend will get asynchronously synchronized.- *- * This method returns a promise which resolves once all the backend -> frontend synchronization is finished.- * Typical use case is when new note has been created, we should wait until it is synced into frontend and only then activate it.- *- * @method- */- this.waitUntilSynced = ws.waitForMaxKnownEntityChangeId;-- /**- * This will refresh all currently opened notes which have included note specified in the parameter- *- * @param includedNoteId - noteId of the included note- */- this.refreshIncludedNote = includedNoteId => appContext.triggerEvent('refreshIncludedNote', {noteId: includedNoteId});-- /**- * Return randomly generated string of given length. This random string generation is NOT cryptographically secure.- *- * @method- * @param {number} length of the string- * @returns {string} random string- */- this.randomString = utils.randomString;-- this.logMessages = {};- this.logSpacedUpdates = {};-- /**- * Log given message to the log pane in UI- *- * @param message- */- this.log = message => {- const {noteId} = this.startNote;-- message = `${utils.now()}: ${message}`;-- console.log(`Script ${noteId}: ${message}`);-- this.logMessages[noteId] = this.logMessages[noteId] || [];- this.logSpacedUpdates[noteId] = this.logSpacedUpdates[noteId] || new SpacedUpdate(() => {- const messages = this.logMessages[noteId];- this.logMessages[noteId] = [];-- appContext.triggerEvent("apiLogMessages", {noteId, messages});- }, 100);-- this.logMessages[noteId].push(message);- this.logSpacedUpdates[noteId].scheduleUpdate();- };-}--export default FrontendScriptApi;-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/frontend_api/widgets_collapsible_widget.js.html b/docs/frontend_api/widgets_collapsible_widget.js.htmldeleted file mode 100644index 94ae6982e3..0000000000--- a/docs/frontend_api/widgets_collapsible_widget.js.html+++ /dev/null@@ -1,89 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: widgets/collapsible_widget.js</title>-- <script src="scripts/prettify/prettify.js"> </script>- <script src="scripts/prettify/lang-css.js"> </script>- <!--[if lt IE 9]>- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>- <![endif]-->- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">-</head>--<body>--<div id="main">-- <h1 class="page-title">Source: widgets/collapsible_widget.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>import NoteContextAwareWidget from "./note_context_aware_widget.js";--const WIDGET_TPL = `-<div class="card widget">- <div class="card-header"></div>-- <div id="[to be set]" class="body-wrapper">- <div class="card-body"></div>- </div>-</div>`;--/**- * TODO: rename, it's not collapsible anymore- */-export default class CollapsibleWidget extends NoteContextAwareWidget {- get widgetTitle() { return "Untitled widget"; }-- get help() { return {}; }-- doRender() {- this.$widget = $(WIDGET_TPL);- this.contentSized();- this.$widget.find('[data-target]').attr('data-target', `#${this.componentId}`);-- this.$bodyWrapper = this.$widget.find('.body-wrapper');- this.$bodyWrapper.attr('id', this.componentId); // for toggle to work we need id-- this.$body = this.$bodyWrapper.find('.card-body');-- this.$title = this.$widget.find('.card-header');- this.$title.text(this.widgetTitle);-- this.initialized = this.doRenderBody();- }-- /** for overriding */- async doRenderBody() {}-}-</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FNoteComplement.html">FNoteComplement</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/jsdoc-conf.json b/jsdoc-conf.jsonindex c0451f5b4f..3a20f80156 100644--- a/jsdoc-conf.json+++ b/jsdoc-conf.json@@ -1,7 +1,8 @@{"templates": {"default": {- "includeDate": false+ "includeDate": false,+ "outputSourceFiles": false}}}\ No newline at end of filediff --git a/package.json b/package.jsonindex 875a99a344..9b355c1400 100644--- a/package.json+++ b/package.json@@ -20,7 +20,7 @@"switch-server": "rm -r ./node_modules/better-sqlite3 && npm install","switch-electron": "rm -r ./node_modules/better-sqlite3 && npm install && ./node_modules/.bin/electron-rebuild","build-backend-docs": "rm -r ./docs/backend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/backend_api src/becca/entities/*.js src/services/backend_script_api.js src/services/sql.js",- "build-frontend-docs": "rm -r ./docs/frontend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/collapsible_widget.js",+ "build-frontend-docs": "rm -r ./docs/frontend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/right_panel_widget.js","build-docs": "npm run build-backend-docs && npm run build-frontend-docs","webpack": "npx webpack -c webpack-desktop.config.js && npx webpack -c webpack-mobile.config.js && npx webpack -c webpack-setup.config.js","test-jasmine": "jasmine",diff --git a/src/becca/becca.js b/src/becca/becca.jsindex cbcbc1b035..b2fcf7f97d 100644--- a/src/becca/becca.js+++ b/src/becca/becca.js@@ -98,7 +98,7 @@ class Becca {return filteredNotes;}- /** @returns {Branch|null} */+ /** @returns {BBranch|null} */getBranch(branchId) {return this.branches[branchId];}@@ -108,7 +108,7 @@ class Becca {return this.attributes[attributeId];}- /** @returns {Branch|null} */+ /** @returns {BBranch|null} */getBranchFromChildAndParent(childNoteId, parentNoteId) {return this.childParentToBranch[`${childNoteId}-${parentNoteId}`];}diff --git a/src/becca/entities/bnote.js b/src/becca/entities/bnote.jsindex 8936b976e5..83ed8e4c6f 100644--- a/src/becca/entities/bnote.js+++ b/src/becca/entities/bnote.js@@ -89,7 +89,7 @@ class BNote extends AbstractBeccaEntity {}init() {- /** @type {Branch[]}+ /** @type {BBranch[]}* @private */this.parentBranches = [];/** @type {BNote[]}@@ -151,7 +151,7 @@ class BNote extends AbstractBeccaEntity {return this.isContentAvailable() ? this.title : '[protected]';}- /** @returns {Branch[]} */+ /** @returns {BBranch[]} */getParentBranches() {return this.parentBranches;}@@ -159,14 +159,14 @@ class BNote extends AbstractBeccaEntity {/*** Returns <i>strong</i> (as opposed to <i>weak</i>) parent branches. See isWeak for details.*- * @returns {Branch[]}+ * @returns {BBranch[]}*/getStrongParentBranches() {return this.getParentBranches().filter(branch => !branch.isWeak);}/**- * @returns {Branch[]}+ * @returns {BBranch[]}* @deprecated use getParentBranches() instead*/getBranches() {@@ -188,7 +188,7 @@ class BNote extends AbstractBeccaEntity {return this.children && this.children.length > 0;}- /** @returns {Branch[]} */+ /** @returns {BBranch[]} */getChildBranches() {return this.children.map(childNote => this.becca.getBranchFromChildAndParent(childNote.noteId, this.noteId));}diff --git a/src/public/app/services/frontend_script_api.js b/src/public/app/services/frontend_script_api.jsindex 3899d2f361..c936cd4a51 100644--- a/src/public/app/services/frontend_script_api.js+++ b/src/public/app/services/frontend_script_api.js@@ -7,7 +7,7 @@ import noteTooltipService from './note_tooltip.js';import protectedSessionService from './protected_session.js';import dateNotesService from './date_notes.js';import searchService from './search.js';-import CollapsibleWidget from '../widgets/collapsible_widget.js';+import RightPanelWidget from '../widgets/right_panel_widget.js';import ws from "./ws.js";import appContext from "../components/app_context.js";import NoteContextAwareWidget from "../widgets/note_context_aware_widget.js";@@ -35,8 +35,14 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain// to keep consistency with backend APIthis.dayjs = dayjs;- /** @property {CollapsibleWidget} */- this.CollapsibleWidget = CollapsibleWidget;+ /**+ * @property {RightPanelWidget}+ * @deprecated use api.RightPanelWidget instead+ */+ this.CollapsibleWidget = RightPanelWidget;++ /** @property {RightPanelWidget} */+ this.RightPanelWidget = RightPanelWidget;/** @property {NoteContextAwareWidget} */this.NoteContextAwareWidget = NoteContextAwareWidget;@@ -123,22 +129,18 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain}};- /**- * @typedef {Object} AddButtonToToolbarOptions- * @property {string} [id] - id of the button, used to identify the old instances of this button to be replaced- * ID is optional because of BC, but not specifying it is deprecated. ID can be alphanumeric only.- * @property {string} title- * @property {string} [icon] - name of the boxicon to be used (e.g. "time" for "bx-time" icon)- * @property {function} action - callback handling the click on the button- * @property {string} [shortcut] - keyboard shortcut for the button, e.g. "alt+t"- */-/*** Adds a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.** @deprecated you can now create/modify launchers in the top-left Menu -> Configure Launchbar* for special needs there's also backend API's createOrUpdateLauncher()- * @param {AddButtonToToolbarOptions} opts+ * @param {object} opts+ * @property {string} [opts.id] - id of the button, used to identify the old instances of this button to be replaced+ * ID is optional because of BC, but not specifying it is deprecated. ID can be alphanumeric only.+ * @property {string} opts.title+ * @property {string} [opts.icon] - name of the boxicon to be used (e.g. "time" for "bx-time" icon)+ * @property {function} opts.action - callback handling the click on the button+ * @property {string} [opts.shortcut] - keyboard shortcut for the button, e.g. "alt+t"*/this.addButtonToToolbar = async opts => {console.warn("api.addButtonToToolbar() has been deprecated since v0.58 and may be removed in the future. Use Menu -> Configure Launchbar to create/update launchers instead.");diff --git a/src/public/app/widgets/ribbon_widgets/edited_notes.js b/src/public/app/widgets/ribbon_widgets/edited_notes.jsindex a68450a475..1da61cca3c 100644--- a/src/public/app/widgets/ribbon_widgets/edited_notes.js+++ b/src/public/app/widgets/ribbon_widgets/edited_notes.js@@ -1,7 +1,7 @@-import CollapsibleWidget from "../collapsible_widget.js";import linkService from "../../services/link.js";import server from "../../services/server.js";import froca from "../../services/froca.js";+import NoteContextAwareWidget from "../note_context_aware_widget.js";const TPL = `<div class="edited-notes-widget">@@ -20,7 +20,7 @@ const TPL = `</div>`;-export default class EditedNotesWidget extends CollapsibleWidget {+export default class EditedNotesWidget extends NoteContextAwareWidget {get name() {return "editedNotes";}diff --git a/src/public/app/widgets/collapsible_widget.js b/src/public/app/widgets/right_panel_widget.jssimilarity index 85%rename from src/public/app/widgets/collapsible_widget.jsrename to src/public/app/widgets/right_panel_widget.jsindex 97f28c317d..a173dc7597 100644--- a/src/public/app/widgets/collapsible_widget.js+++ b/src/public/app/widgets/right_panel_widget.js@@ -9,10 +9,7 @@ const WIDGET_TPL = `</div></div>`;-/**- * TODO: rename, it's not collapsible anymore- */-export default class CollapsibleWidget extends NoteContextAwareWidget {+export default class RightPanelWidget extends NoteContextAwareWidget {get widgetTitle() { return "Untitled widget"; }get help() { return {}; }@@ -33,6 +30,6 @@ export default class CollapsibleWidget extends NoteContextAwareWidget {this.initialized = this.doRenderBody();}- /** for overriding */+ /* for overriding */async doRenderBody() {}}diff --git a/src/public/app/widgets/toc.js b/src/public/app/widgets/toc.jsindex 1e9dfeb4c9..450bc6ded9 100644--- a/src/public/app/widgets/toc.js+++ b/src/public/app/widgets/toc.js@@ -15,7 +15,7 @@*/import attributeService from "../services/attributes.js";-import CollapsibleWidget from "./collapsible_widget.js";+import RightPanelWidget from "./right_panel_widget.js";import options from "../services/options.js";const TPL = `<div class="toc-widget">@@ -76,7 +76,7 @@ function findHeadingNodeByIndex(parent, headingIndex) {return headingNode;}-export default class TocWidget extends CollapsibleWidget {+export default class TocWidget extends RightPanelWidget {get widgetTitle() {return "Table of Contents";}diff --git a/src/services/backend_script_api.js b/src/services/backend_script_api.jsindex 2d02c68967..fb9b96a0e3 100644--- a/src/services/backend_script_api.js+++ b/src/services/backend_script_api.js@@ -68,7 +68,7 @@ function BackendScriptApi(currentNote, apiParams) {/*** @method* @param {string} branchId- * @returns {Branch|null}+ * @returns {BBranch|null}*/this.getBranch = branchId => becca.getBranch(branchId);@@ -171,20 +171,13 @@ function BackendScriptApi(currentNote, apiParams) {*/this.toggleNoteInParent = cloningService.toggleNoteInParent;- /**- * @typedef {object} CreateNoteAttribute- * @property {string} type - attribute type - label, relation etc.- * @property {string} name - attribute name- * @property {string} [value] - attribute value- */-/*** Create text note. See also createNewNote() for more options.** @param {string} parentNoteId* @param {string} title* @param {string} content- * @return {{note: BNote, branch: Branch}} - object having "note" and "branch" keys representing respective objects+ * @return {{note: BNote, branch: BBranch}} - object having "note" and "branch" keys representing respective objects*/this.createTextNote = (parentNoteId, title, content = '') => noteService.createNewNote({parentNoteId,@@ -200,7 +193,7 @@ function BackendScriptApi(currentNote, apiParams) {* @param {string} parentNoteId* @param {string} title* @param {object} content- * @return {{note: BNote, branch: Branch}} object having "note" and "branch" keys representing respective objects+ * @return {{note: BNote, branch: BBranch}} object having "note" and "branch" keys representing respective objects*/this.createDataNote = (parentNoteId, title, content = {}) => noteService.createNewNote({parentNoteId,@@ -210,43 +203,23 @@ function BackendScriptApi(currentNote, apiParams) {mime: 'application/json'});- /**- * @typedef {object} CreateNewNoteParams- * @property {string} parentNoteId - MANDATORY- * @property {string} title - MANDATORY- * @property {string|buffer} content - MANDATORY- * @property {string} type - text, code, file, image, search, book, relationMap, canvas - MANDATORY- * @property {string} mime - value is derived from default mimes for type- * @property {boolean} isProtected - default is false- * @property {boolean} isExpanded - default is false- * @property {string} prefix - default is empty string- * @property {int} notePosition - default is last existing notePosition in a parent + 10- */-/*** @method*- * @param {CreateNewNoteParams} [params]- * @returns {{note: BNote, branch: Branch}} object contains newly created entities note and branch+ * @property {object} params+ * @property {string} params.parentNoteId+ * @property {string} params.title+ * @property {string|buffer} params.content+ * @property {string} params.type - text, code, file, image, search, book, relationMap, canvas+ * @property {string} [params.mime] - value is derived from default mimes for type+ * @property {boolean} [params.isProtected=false]+ * @property {boolean} [params.isExpanded=false]+ * @property {string} [params.prefix='']+ * @property {int} [params.notePosition] - default is last existing notePosition in a parent + 10+ * @returns {{note: BNote, branch: BBranch}} object contains newly created entities note and branch*/this.createNewNote = noteService.createNewNote;- /**- * @typedef {object} CreateNoteAttribute- * @property {string} type - attribute type - label, relation etc.- * @property {string} name - attribute name- * @property {string} [value] - attribute value- */-- /**- * @typedef {object} CreateNoteExtraOptions- * @property {boolean} [json=false] - should the note be JSON- * @property {boolean} [isProtected=false] - should the note be protected- * @property {string} [type='text'] - note type- * @property {string} [mime='text/html'] - MIME type of the note- * @property {CreateNoteAttribute[]} [attributes=[]] - attributes to be created for this note- */-/*** @method* @deprecated please use createTextNote() with similar API for simpler use cases or createNewNote() for more complex needs@@ -254,8 +227,16 @@ function BackendScriptApi(currentNote, apiParams) {* @param {string} parentNoteId - create new note under this parent* @param {string} title* @param {string} [content=""]- * @param {CreateNoteExtraOptions} [extraOptions={}]- * @returns {{note: BNote, branch: Branch}} object contains newly created entities note and branch+ * @param {object} [extraOptions={}]+ * @property {boolean} [extraOptions.json=false] - should the note be JSON+ * @property {boolean} [extraOptions.isProtected=false] - should the note be protected+ * @property {string} [extraOptions.type='text'] - note type+ * @property {string} [extraOptions.mime='text/html'] - MIME type of the note+ * @property {object[]} [extraOptions.attributes=[]] - attributes to be created for this note+ * @property {string} extraOptions.attributes.type - attribute type - label, relation etc.+ * @property {string} extraOptions.attributes.name - attribute name+ * @property {string} [extraOptions.attributes.value] - attribute value+ * @returns {{note: BNote, branch: BBranch}} object contains newly created entities note and branch*/this.createNote = (parentNoteId, title, content = "", extraOptions= {}) => {extraOptions.parentNoteId = parentNoteId;@@ -398,20 +379,16 @@ function BackendScriptApi(currentNote, apiParams) {*/this.sortNotesByTitle = parentNoteId => treeService.sortNotes(parentNoteId);- /**- * @typedef {Object} SortConfig- * @property {string} [sortBy=title] - 'title', 'dateCreated', 'dateModified' or a label name- * see https://github.com/zadam/trilium/wiki/Sorting for details.- * @property {boolean} [reverse=false]- * @property {boolean} [foldersFirst=false]- */-/*** Sort child notes of a given note.** @method* @param {string} parentNoteId - this note's child notes will be sorted- * @param {SortConfig} [sortConfig]+ * @param {object} [sortConfig]+ * @property {string} [sortConfig.sortBy=title] - 'title', 'dateCreated', 'dateModified' or a label name+ * see https://github.com/zadam/trilium/wiki/Sorting for details.+ * @property {boolean} [sortConfig.reverse=false]+ * @property {boolean} [sortConfig.foldersFirst=false]*/this.sortNotes = (parentNoteId, sortConfig = {}) => treeService.sortNotes(parentNoteId,@@ -484,27 +461,24 @@ function BackendScriptApi(currentNote, apiParams) {* @return {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version*/this.getAppInfo = () => appInfo-+/**- * @typedef {Object} CreateOrUpdateLauncher- * @property {string} id - id of the launcher, only alphanumeric at least 6 characters long- * @property {string} type - one of+ * Creates a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.+ *+ * @param {object} opts+ * @property {string} opts.id - id of the launcher, only alphanumeric at least 6 characters long+ * @property {string} opts.type - one of* * "note" - activating the launcher will navigate to the target note (specified in targetNoteId param)* * "script" - activating the launcher will execute the script (specified in scriptNoteId param)* * "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)- * @property {string} title- * @property {boolean} [isVisible=false] - if true, will be created in the "Visible launchers", otherwise in "Available launchers"- * @property {string} [icon] - name of the boxicon to be used (e.g. "bx-time")- * @property {string} [keyboardShortcut] - will activate the target note/script upon pressing, e.g. "ctrl+e"- * @property {string} [targetNoteId] - for type "note"- * @property {string} [scriptNoteId] - for type "script"- * @property {string} [widgetNoteId] - for type "customWidget"- */-- /**- * Creates a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.- *- * @param {CreateOrUpdateLauncher} opts+ * @property {string} opts.title+ * @property {boolean} [opts.isVisible=false] - if true, will be created in the "Visible launchers", otherwise in "Available launchers"+ * @property {string} [opts.icon] - name of the boxicon to be used (e.g. "bx-time")+ * @property {string} [opts.keyboardShortcut] - will activate the target note/script upon pressing, e.g. "ctrl+e"+ * @property {string} [opts.targetNoteId] - for type "note"+ * @property {string} [opts.scriptNoteId] - for type "script"+ * @property {string} [opts.widgetNoteId] - for type "customWidget"+ * @returns {{note: BNote}}*/this.createOrUpdateLauncher = opts => {if (!opts.id) { throw new Error("ID is a mandatory parameter for api.createOrUpdateLauncher(opts)"); }@@ -561,6 +535,8 @@ function BackendScriptApi(currentNote, apiParams) {} else {launcherNote.removeLabel('keyboardShortcut');}++ return {note: launcherNote};};/**diff --git a/src/services/export/zip.js b/src/services/export/zip.jsindex c1e48fcab9..75429909bb 100644--- a/src/services/export/zip.js+++ b/src/services/export/zip.js@@ -19,7 +19,7 @@ const ValidationError = require("../../errors/validation_error");/*** @param {TaskContext} taskContext- * @param {Branch} branch+ * @param {BBranch} branch* @param {string} format - 'html' or 'markdown'*/async function exportToZip(taskContext, branch, format, res, setHeaders = true) {