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
fixed jsdoc script API generation, closes #2313
zadam600c16551a2a
diff --git a/docs/backend_api/ApiToken.html b/docs/backend_api/ApiToken.htmlindex 2d4a1d17c9..fd85e3d53d 100644--- a/docs/backend_api/ApiToken.html+++ b/docs/backend_api/ApiToken.html@@ -139,6 +139,214 @@+ <h3 class="subsection-title">Members</h3>++++<h4 class="name" id="apiTokenId"><span class="type-signature"></span>apiTokenId<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_api_token.js.html">becca/entities/api_token.js</a>, <a href="becca_entities_api_token.js.html#line18">line 18</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="token"><span class="type-signature"></span>token<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_api_token.js.html">becca/entities/api_token.js</a>, <a href="becca_entities_api_token.js.html#line20">line 20</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_api_token.js.html">becca/entities/api_token.js</a>, <a href="becca_entities_api_token.js.html#line22">line 22</a>+ </li></ul></dd>++++++++</dl>++++++++@@ -155,7 +363,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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/Attribute.html b/docs/backend_api/Attribute.htmlindex dfdc8ead76..f0dd9a7ecc 100644--- a/docs/backend_api/Attribute.html+++ b/docs/backend_api/Attribute.html@@ -30,7 +30,8 @@<h2><span class="attribs"><span class="type-signature"></span></span>Attribute<span class="signature">()</span><span class="type-signature"></span></h2>- <div class="class-description">Attribute is key value pair owned by a note.</div>+ <div class="class-description">Attribute is an abstract concept which has two real uses - label (key - value pair)+and relation (representing named relationship between source and target note)</div></header>@@ -64,264 +65,510 @@- <h5 class="subsection-title">Properties:</h5>+<dl class="details">-<table class="props">- <thead>- <tr>-- <th>Name</th>-+- <th>Type</th>+-+-+- <th class="last">Description</th>- </tr>- </thead>+- <tbody>- <tr>-- <td class="name"><code>attributeId</code></td>-+- <td class="type">---<span class="param-type">string</span>++-- </td>+-+-++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line13">line 13</a>+ </li></ul></dd>+++- <td class="description last">immutable</td>- </tr>++</dl>++++++++++++- <tr>-- <td class="name"><code>noteId</code></td>-- <td class="type">---<span class="param-type">string</span>-- </td>--- <td class="description last">immutable</td>- </tr>+ </div>- <tr>-- <td class="name"><code>type</code></td>++++++++++++++ <h3 class="subsection-title">Members</h3>+++<h4 class="name" id="attributeId"><span class="type-signature"></span>attributeId<span class="type-signature"> :string</span></h4>+++- <td class="type">+++ <h5>Type:</h5>+ <ul>+ <li>-<span class="param-type">string</span>-- </td>+ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line44">line 44</a>+ </li></ul></dd>+++++++</dl>++++++++<h4 class="name" id="isInheritable"><span class="type-signature"></span>isInheritable<span class="type-signature"> :boolean</span></h4>++++++ <h5>Type:</h5>+ <ul>+ <li>+<span class="param-type">boolean</span>+++ </li>+ </ul>++++++<dl class="details">- <td class="description last">immutable</td>- </tr>+- <tr>-- <td class="name"><code>name</code></td>++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line56">line 56</a>+ </li></ul></dd>++++++++</dl>++++++++<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"> :string</span></h4>- <td class="type">++++++ <h5>Type:</h5>+ <ul>+ <li>-<span class="param-type">string</span>-- </td>+ </li>+ </ul>+--- <td class="description last">immutable</td>- </tr>++<dl class="details">- <tr>-- <td class="name"><code>value</code></td>++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line50">line 50</a>+ </li></ul></dd>++++++++</dl>++++++++<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"> :string</span></h4>- <td class="type">++++++ <h5>Type:</h5>+ <ul>+ <li>-<span class="param-type">string</span>-- </td>+ </li>+ </ul>+--- <td class="description last"></td>- </tr>++<dl class="details">- <tr>-- <td class="name"><code>position</code></td>-+- <td class="type">---<span class="param-type">int</span>++-- </td>+-+-+- <td class="description last"></td>- </tr>+- <tr>-- <td class="name"><code>isInheritable</code></td>-+- <td class="type">---<span class="param-type">boolean</span>++-- </td>++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line46">line 46</a>+ </li></ul></dd>+++++++</dl>++++++++<h4 class="name" id="position"><span class="type-signature"></span>position<span class="type-signature"> :int</span></h4>++++++ <h5>Type:</h5>+ <ul>+ <li>+<span class="param-type">int</span>+++ </li>+ </ul>- <td class="description last">immutable</td>- </tr>+++++<dl class="details">- <tr>-- <td class="name"><code>isDeleted</code></td>-+- <td class="type">---<span class="param-type">boolean</span>++-- </td>+-+-+- <td class="description last"></td>- </tr>+- <tr>-- <td class="name"><code>deleteId</code></td>++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line52">line 52</a>+ </li></ul></dd>++++++++</dl>++++++++<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4>+++- <td class="type">+++ <h5>Type:</h5>+ <ul>+ <li>-<span class="param-type">string</span>-|-<span class="param-type">null</span>+ </li>+ </ul>-- </td>--- <td class="description last">ID identifying delete transaction</td>- </tr>++<dl class="details">- <tr>-- <td class="name"><code>utcDateModified</code></td>-+- <td class="type">---<span class="param-type">string</span>++-- </td>++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line48">line 48</a>+ </li></ul></dd>+++++++</dl>++++++++<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"> :string</span></h4>++++++ <h5>Type:</h5>+ <ul>+ <li>+<span class="param-type">string</span>- <td class="description last"></td>- </tr>-- </tbody>-</table>+ </li>+ </ul>+@@ -355,7 +602,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line25">line 25</a>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line58">line 58</a></li></ul></dd>@@ -371,33 +618,44 @@+++<h4 class="name" id="value"><span class="type-signature"></span>value<span class="type-signature"> :string</span></h4>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+ </li>+ </ul>+<dl class="details">- </div>- <h3 class="subsection-title">Extends</h3>-++- <ul>- <li><a href="Entity.html">Entity</a></li>- </ul>++++@@ -409,11 +667,29 @@++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line54">line 54</a>+ </li></ul></dd>+++</dl>++++++++++<h3 class="subsection-title">Methods</h3>@@ -470,7 +746,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line43">line 43</a>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line112">line 112</a></li></ul></dd>@@ -575,7 +851,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line50">line 50</a>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line119">line 119</a></li></ul></dd>@@ -680,7 +956,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line65">line 65</a>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line134">line 134</a></li></ul></dd>@@ -744,13 +1020,13 @@</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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 3.6.6</a>+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a></footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/BackendScriptApi.html b/docs/backend_api/BackendScriptApi.htmlindex b4c76a6b5a..cf1a18ddb8 100644--- a/docs/backend_api/BackendScriptApi.html+++ b/docs/backend_api/BackendScriptApi.html@@ -5913,7 +5913,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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/Branch.html b/docs/backend_api/Branch.htmlindex 407a6edef1..d29b8e3610 100644--- a/docs/backend_api/Branch.html+++ b/docs/backend_api/Branch.html@@ -30,8 +30,8 @@<h2><span class="attribs"><span class="type-signature"></span></span>Branch<span class="signature">()</span><span class="type-signature"></span></h2>- <div class="class-description">Branch represents note's placement in the tree - it's essentially pair of noteId and parentNoteId.-Each note can have multiple (at least one) branches, meaning it can be placed into multiple places in the tree.</div>+ <div class="class-description">Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple+parents.</div></header>@@ -65,264 +65,228 @@ Each note can have multiple (at least one) branches, meaning it can be placed in- <h5 class="subsection-title">Properties:</h5>+<dl class="details">-<table class="props">- <thead>- <tr>-- <th>Name</th>-+- <th>Type</th>+-+-+- <th class="last">Description</th>- </tr>- </thead>+- <tbody>- <tr>-- <td class="name"><code>branchId</code></td>-+- <td class="type">---<span class="param-type">string</span>++-- </td>+-+-++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line12">line 12</a>+ </li></ul></dd>+- <td class="description last">primary key, immutable</td>- </tr>+- <tr>-- <td class="name"><code>noteId</code></td>-++</dl>- <td class="type">---<span class="param-type">string</span>-- </td>--- <td class="description last">immutable</td>- </tr>-- <tr>-- <td class="name"><code>parentNoteId</code></td>-- <td class="type">---<span class="param-type">string</span>-- </td>--- <td class="description last">immutable</td>- </tr>-- <tr>-- <td class="name"><code>notePosition</code></td>-- <td class="type">---<span class="param-type">int</span>-- </td>-++ </div>-+- <td class="description last"></td>- </tr>+- <tr>-- <td class="name"><code>prefix</code></td>++++++++ <h3 class="subsection-title">Members</h3>+++<h4 class="name" id="branchId"><span class="type-signature"></span>branchId<span class="type-signature"> :string</span></h4>+++++- <td class="type">+ <h5>Type:</h5>+ <ul>+ <li>-<span class="param-type">string</span>-- </td>+ </li>+ </ul>--- <td class="description last"></td>- </tr>-- <tr>-- <td class="name"><code>isExpanded</code></td>-+<dl class="details">- <td class="type">---<span class="param-type">boolean</span>++-- </td>+-+-+- <td class="description last"></td>- </tr>+- <tr>-- <td class="name"><code>isDeleted</code></td>-+- <td class="type">---<span class="param-type">boolean</span>++-- </td>+-+-++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line43">line 43</a>+ </li></ul></dd>+- <td class="description last"></td>- </tr>+- <tr>-- <td class="name"><code>deleteId</code></td>-++</dl>- <td class="type">---<span class="param-type">string</span>-|-<span class="param-type">null</span>-- </td>-++<h4 class="name" id="childNote"><span class="type-signature"></span>childNote<span class="type-signature"></span></h4>+- <td class="description last">ID identifying delete transaction</td>- </tr>+++++++++<dl class="details">- <tr>-- <td class="name"><code>utcDateModified</code></td>-+- <td class="type">---<span class="param-type">string</span>++-- </td>+-+-+- <td class="description last"></td>- </tr>+- <tr>-- <td class="name"><code>utcDateCreated</code></td>-+- <td class="type">---<span class="param-type">string</span>++-- </td>++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line85">line 85</a>+ </li></ul></dd>++++++++</dl>+++++++<h4 class="name" id="isExpanded"><span class="type-signature"></span>isExpanded<span class="type-signature"> :boolean</span></h4>++++++ <h5>Type:</h5>+ <ul>+ <li>+<span class="param-type">boolean</span>- <td class="description last"></td>- </tr>-- </tbody>-</table>+ </li>+ </ul>+@@ -356,7 +320,7 @@ Each note can have multiple (at least one) branches, meaning it can be placed in<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line24">line 24</a>+ <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line53">line 53</a></li></ul></dd>@@ -372,34 +336,99 @@ Each note can have multiple (at least one) branches, meaning it can be placed in+++<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"> :string</span></h4>+++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+ </li>+ </ul>+<dl class="details">+++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line45">line 45</a>+ </li></ul></dd>+- </div>- <h3 class="subsection-title">Extends</h3>+++</dl>+++++++<h4 class="name" id="notePosition"><span class="type-signature"></span>notePosition<span class="type-signature"> :int</span></h4>+++++ <h5>Type:</h5><ul>- <li><a href="Entity.html">Entity</a></li>+ <li>++<span class="param-type">int</span>+++ </li></ul>++++<dl class="details">+@@ -415,23 +444,37 @@ Each note can have multiple (at least one) branches, meaning it can be placed in- <h3 class="subsection-title">Methods</h3>--+- <h4 class="name" id="getNote"><span class="type-signature"></span>getNote<span class="signature">()</span><span class="type-signature"> → {<a href="Note.html">Note</a>|null}</span></h4>+++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line51">line 51</a>+ </li></ul></dd>++++++</dl>+++++<h4 class="name" id="parentNote"><span class="type-signature"></span>parentNote<span class="type-signature"></span></h4>@@ -471,7 +514,7 @@ Each note can have multiple (at least one) branches, meaning it can be placed in<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line31">line 31</a>+ <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line99">line 99</a></li></ul></dd>@@ -487,61 +530,92 @@ Each note can have multiple (at least one) branches, meaning it can be placed in+++<h4 class="name" id="parentNoteId"><span class="type-signature"></span>parentNoteId<span class="type-signature"> :string</span></h4>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+ </li>+ </ul>-<h5>Returns:</h5>--<dl>- <dt>- Type- </dt>- <dd>--<span class="param-type"><a href="Note.html">Note</a></span>-|-<span class="param-type">null</span>+<dl class="details">+- </dd>-</dl>+++++--+- <h4 class="name" id="getParentNote"><span class="type-signature"></span>getParentNote<span class="signature">()</span><span class="type-signature"> → {<a href="Note.html">Note</a>|null}</span></h4>+++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line47">line 47</a>+ </li></ul></dd>+++++</dl>+++<h4 class="name" id="prefix"><span class="type-signature"></span>prefix<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>@@ -576,7 +650,7 @@ Each note can have multiple (at least one) branches, meaning it can be placed in<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line36">line 36</a>+ <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line49">line 49</a></li></ul></dd>@@ -592,37 +666,70 @@ Each note can have multiple (at least one) branches, meaning it can be placed in+++<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"> :string</span></h4>++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+ </li>+ </ul>-<h5>Returns:</h5>-+<dl class="details">+-<dl>- <dt>- Type- </dt>- <dd>--<span class="param-type"><a href="Note.html">Note</a></span>-|+-<span class="param-type">null</span>++- </dd>-</dl>+++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line55">line 55</a>+ </li></ul></dd>++++++++</dl>++@@ -633,6 +740,8 @@ Each note can have multiple (at least one) branches, meaning it can be placed in++</article></section>@@ -643,13 +752,13 @@ Each note can have multiple (at least one) branches, meaning it can be placed in</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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 3.6.6</a>+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a></footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/Entity.html b/docs/backend_api/Entity.htmldeleted file mode 100644index b9dbd11e2d..0000000000--- a/docs/backend_api/Entity.html+++ /dev/null@@ -1,227 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Class: Entity</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: Entity</h1>-------<section>--<header>-- <h2><span class="attribs"><span class="type-signature"></span></span>Entity<span class="signature">(row<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h2>---</header>--<article>- <div class="container-overview">------- <h4 class="name" id="Entity"><span class="type-signature"></span>new Entity<span class="signature">(row<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>--------------- <h5>Parameters:</h5>---<table class="params">- <thead>- <tr>-- <th>Name</th>--- <th>Type</th>--- <th>Attributes</th>----- <th class="last">Description</th>- </tr>- </thead>-- <tbody>--- <tr>-- <td class="name"><code>row</code></td>--- <td class="type">---<span class="param-type">object</span>---- </td>--- <td class="attributes">-- <optional><br>------ </td>----- <td class="description last">database row representing given entity</td>- </tr>--- </tbody>-</table>-------<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_entity.js.html">entities/entity.js</a>, <a href="entities_entity.js.html#line10">line 10</a>- </li></ul></dd>--------</dl>---------------------- </div>---------------------</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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 3.6.6</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>\ No newline at end of filediff --git a/docs/backend_api/Image.html b/docs/backend_api/Image.htmldeleted file mode 100644index 31e3f27628..0000000000--- a/docs/backend_api/Image.html+++ /dev/null@@ -1,389 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Class: Image</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: Image</h1>-------<section>--<header>-- <h2><span class="attribs"><span class="type-signature"></span></span>Image<span class="signature">(imageId, format, checksum, name, data, isDeleted, dateModified, dateCreated)</span><span class="type-signature"></span></h2>-- <div class="class-description">This class represents image data.</div>---</header>--<article>- <div class="container-overview">----- <h2>Constructor</h2>---- <h4 class="name" id="Image"><span class="type-signature"></span>new Image<span class="signature">(imageId, format, checksum, name, data, isDeleted, dateModified, dateCreated)</span><span class="type-signature"></span></h4>--------------- <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>imageId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>format</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>checksum</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>name</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>data</code></td>--- <td class="type">---<span class="param-type">blob</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>isDeleted</code></td>--- <td class="type">---<span class="param-type">boolean</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>dateModified</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>dateCreated</code></td>--- <td class="type">---<span class="param-type">string</span>---- </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="entities_image.js.html">entities/image.js</a>, <a href="entities_image.js.html#line20">line 20</a>- </li></ul></dd>--------</dl>-------------------- </div>--- <h3 class="subsection-title">Extends</h3>----- <ul>- <li><a href="Entity.html">Entity</a></li>- </ul>----------------------</article>--</section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Image.html">Image</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteImage.html">NoteImage</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Oct 07 2018 16:26:59 GMT+0200 (CEST)-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>\ No newline at end of filediff --git a/docs/backend_api/Link.html b/docs/backend_api/Link.htmldeleted file mode 100644index d0933aff5a..0000000000--- a/docs/backend_api/Link.html+++ /dev/null@@ -1,367 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Class: Link</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: Link</h1>-------<section>--<header>-- <h2><span class="attribs"><span class="type-signature"></span></span>Link<span class="signature">(linkId, noteId, targetNoteId, type, isDeleted, utcDateModified, utcDateCreated)</span><span class="type-signature"></span></h2>-- <div class="class-description">This class represents link from one note to another in the form of hyperlink or image reference. Note that-this is different concept than attribute/relation.</div>---</header>--<article>- <div class="container-overview">----- <h2>Constructor</h2>---- <h4 class="name" id="Link"><span class="type-signature"></span>new Link<span class="signature">(linkId, noteId, targetNoteId, type, isDeleted, utcDateModified, utcDateCreated)</span><span class="type-signature"></span></h4>--------------- <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>linkId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>noteId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>targetNoteId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>type</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>isDeleted</code></td>--- <td class="type">---<span class="param-type">boolean</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>utcDateModified</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>utcDateCreated</code></td>--- <td class="type">---<span class="param-type">string</span>---- </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="entities_link.js.html">entities/link.js</a>, <a href="entities_link.js.html#line21">line 21</a>- </li></ul></dd>--------</dl>-------------------- </div>--- <h3 class="subsection-title">Extends</h3>----- <ul>- <li><a href="Entity.html">Entity</a></li>- </ul>----------------------</article>--</section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Link.html">Link</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>\ No newline at end of filediff --git a/docs/backend_api/Note.html b/docs/backend_api/Note.htmlindex 0f075977cb..cb9c0307ff 100644--- a/docs/backend_api/Note.html+++ b/docs/backend_api/Note.html@@ -28,9 +28,9 @@<header>- <h2><span class="attribs"><span class="type-signature"></span></span>Note<span class="signature">(row)</span><span class="type-signature"></span></h2>+ <h2><span class="attribs"><span class="type-signature"></span></span>Note<span class="signature">()</span><span class="type-signature"></span></h2>- <div class="class-description">This represents a Note which is a central object in the Trilium Notes project.</div>+ <div class="class-description">Trilium's main entity which can represent text note, image, code note, file attachment etc.</div></header>@@ -45,7 +45,7 @@- <h4 class="name" id="Note"><span class="type-signature"></span>new Note<span class="signature">(row)</span><span class="type-signature"></span></h4>+ <h4 class="name" id="Note"><span class="type-signature"></span>new Note<span class="signature">()</span><span class="type-signature"></span></h4>@@ -60,335 +60,1430 @@- <h5>Parameters:</h5>+++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line18">line 18</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++++ </div>+++++++++++++++ <h3 class="subsection-title">Members</h3>++++<h4 class="name" id="children"><span class="type-signature"></span>children<span class="type-signature"> :Array.<<a href="Note.html">Note</a>></span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">Array.<<a href="Note.html">Note</a>></span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line89">line 89</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="contentSize"><span class="type-signature"></span>contentSize<span class="type-signature"> :int|null</span></h4>+++++<div class="description">+ size of the content in bytes+</div>++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">int</span>+|++<span class="param-type">null</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line115">line 115</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="dateCreated"><span class="type-signature"></span>dateCreated<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line62">line 62</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="dateModified"><span class="type-signature"></span>dateModified<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line64">line 64</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="flatTextCache"><span class="type-signature"></span>flatTextCache<span class="type-signature"> :string|null</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+|++<span class="param-type">null</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line78">line 78</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="isDecrypted"><span class="type-signature"></span>isDecrypted<span class="type-signature"> :boolean</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">boolean</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line73">line 73</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="isProtected"><span class="type-signature"></span>isProtected<span class="type-signature"> :boolean</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">boolean</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line56">line 56</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="mime"><span class="type-signature"></span>mime<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line60">line 60</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line52">line 52</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="noteSize"><span class="type-signature"></span>noteSize<span class="type-signature"> :int|null</span></h4>+++++<div class="description">+ size of the content and note revision contents in bytes+</div>++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">int</span>+|++<span class="param-type">null</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line120">line 120</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="ownedAttributes"><span class="type-signature"></span>ownedAttributes<span class="type-signature"> :Array.<<a href="Attribute.html">Attribute</a>></span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line91">line 91</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="parentBranches"><span class="type-signature"></span>parentBranches<span class="type-signature"> :Array.<<a href="Branch.html">Branch</a>></span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">Array.<<a href="Branch.html">Branch</a>></span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line85">line 85</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="parents"><span class="type-signature"></span>parents<span class="type-signature"> :Array.<<a href="Note.html">Note</a>></span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">Array.<<a href="Note.html">Note</a>></span>+++ </li>+ </ul>++++++<dl class="details">+-<table class="params">- <thead>- <tr>-- <th>Name</th>-++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line87">line 87</a>+ </li></ul></dd>++++++++</dl>++++- <th>Type</th>++<h4 class="name" id="revisionCount"><span class="type-signature"></span>revisionCount<span class="type-signature"> :int|null</span></h4>+++++<div class="description">+ number of note revisions for this note+</div>++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">int</span>+|++<span class="param-type">null</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line125">line 125</a>+ </li></ul></dd>++++++++</dl>+++++++<h4 class="name" id="targetRelations"><span class="type-signature"></span>targetRelations<span class="type-signature"> :Array.<<a href="Attribute.html">Attribute</a>></span></h4>- <th class="last">Description</th>- </tr>- </thead>- <tbody>+++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span>+++ </li>+ </ul>++++++<dl class="details">+- <tr>++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line101">line 101</a>+ </li></ul></dd>++++++++</dl>+++++++- <td class="name"><code>row</code></td>+<h4 class="name" id="title"><span class="type-signature"></span>title<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>+<span class="param-type">string</span>- <td class="type">++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line54">line 54</a>+ </li></ul></dd>++++++++</dl>+++++++- </td>+<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>+++--+<dl class="details">- <td class="description last">object containing database row from "notes" table</td>- </tr>+- </tbody>-</table>+++++- <h5 class="subsection-title">Properties:</h5>+-<table class="props">- <thead>- <tr>-- <th>Name</th>-+- <th>Type</th>+-+-++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line58">line 58</a>+ </li></ul></dd>+- <th class="last">Description</th>- </tr>- </thead>+- <tbody>- <tr>-- <td class="name"><code>noteId</code></td>-++</dl>- <td class="type">---<span class="param-type">string</span>-- </td>-+++<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"> :string</span></h4>- <td class="description last">primary key</td>- </tr>-- <tr>-- <td class="name"><code>type</code></td>-- <td class="type">+++ <h5>Type:</h5>+ <ul>+ <li>-<span class="param-type">string</span>-- </td>+ </li>+ </ul>--- <td class="description last">one of "text", "code", "file" or "render"</td>- </tr>-- <tr>-- <td class="name"><code>mime</code></td>-+<dl class="details">- <td class="type">---<span class="param-type">string</span>++-- </td>+-+-+- <td class="description last">MIME type, e.g. "text/html"</td>- </tr>+- <tr>-- <td class="name"><code>title</code></td>-+- <td class="type">---<span class="param-type">string</span>++-- </td>+-+-++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line66">line 66</a>+ </li></ul></dd>+- <td class="description last">note title</td>- </tr>+- <tr>-- <td class="name"><code>isProtected</code></td>-++</dl>- <td class="type">---<span class="param-type">boolean</span>-- </td>-+++<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"> :string</span></h4>- <td class="description last">true if note is protected</td>- </tr>-- <tr>-- <td class="name"><code>isDeleted</code></td>-- <td class="type">---<span class="param-type">boolean</span>+ <h5>Type:</h5>+ <ul>+ <li>- </td>+<span class="param-type">string</span>--+ </li>+ </ul>- <td class="description last">true if note is deleted</td>- </tr>-- <tr>-- <td class="name"><code>deleteId</code></td>-- <td class="type">---<span class="param-type">string</span>-|-<span class="param-type">null</span>+<dl class="details">+-- </td>+-+-+- <td class="description last">ID identifying delete transaction</td>- </tr>+- <tr>-- <td class="name"><code>dateCreated</code></td>-+- <td class="type">---<span class="param-type">string</span>++-- </td>+-+-+- <td class="description last">local date time (with offset)</td>- </tr>++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line68">line 68</a>+ </li></ul></dd>+- <tr>-- <td class="name"><code>dateModified</code></td>-+- <td class="type">---<span class="param-type">string</span>++</dl>-- </td>--- <td class="description last">local date time (with offset)</td>- </tr>+- <tr>-- <td class="name"><code>utcDateCreated</code></td>-++ <h3 class="subsection-title">Methods</h3>- <td class="type">+--<span class="param-type">string</span>+-- </td>++ <h4 class="name" id="__getInheritableAttributes"><span class="type-signature"></span>__getInheritableAttributes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4>+-+-- <td class="description last"></td>- </tr>-- <tr>-- <td class="name"><code>utcDateModified</code></td>-- <td class="type">---<span class="param-type">string</span>-- </td>--- <td class="description last"></td>- </tr>-- </tbody>-</table>@@ -422,7 +1517,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line31">line 31</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line395">line 395</a></li></ul></dd>@@ -447,41 +1542,28 @@------- </div>--- <h3 class="subsection-title">Extends</h3>+<h5>Returns:</h5>- <ul>- <li><a href="Entity.html">Entity</a></li>- </ul>---+<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span>--+ </dd>+</dl>----- <h3 class="subsection-title">Methods</h3>@@ -537,7 +1619,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line541">line 541</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1011">line 1011</a></li></ul></dd>@@ -639,7 +1721,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line865">line 865</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line933">line 933</a></li></ul></dd>@@ -697,91 +1779,19 @@- <h4 class="name" id="getAttribute"><span class="type-signature"></span>getAttribute<span class="signature">(type, name)</span><span class="type-signature"> → {<a href="Attribute.html">Attribute</a>}</span></h4>--------------- <h5>Parameters:</h5>+ <h4 class="name" id="getAncestors"><span class="type-signature"></span>getAncestors<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>-<table class="params">- <thead>- <tr>-- <th>Name</th>--- <th>Type</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="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="description last">attribute name</td>- </tr>-- </tbody>-</table>@@ -817,7 +1827,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line440">line 440</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line855">line 855</a></li></ul></dd>@@ -845,10 +1855,6 @@<h5>Returns:</h5>-<div class="param-desc">- 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.-</div>-<dl>@@ -857,7 +1863,7 @@</dt><dd>-<span class="param-type"><a href="Attribute.html">Attribute</a></span>+<span class="param-type">Array.<<a href="Note.html">Note</a>></span></dd>@@ -875,7 +1881,7 @@- <h4 class="name" id="getAttributes"><span class="type-signature"></span>getAttributes<span class="signature">(type<span class="signature-attributes">opt</span>, name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4>+ <h4 class="name" id="getAttribute"><span class="type-signature"></span>getAttribute<span class="signature">(type, name)</span><span class="type-signature"> → {<a href="Attribute.html">Attribute</a>}</span></h4>@@ -903,8 +1909,6 @@<th>Type</th>- <th>Attributes</th>-@@ -930,20 +1934,10 @@</td>- <td class="attributes">-- <optional><br>------ </td>-- <td class="description last">(optional) attribute type to filter</td>+ <td class="description last">attribute type (label, relation, etc.)</td></tr>@@ -963,20 +1957,10 @@</td>- <td class="attributes">-- <optional><br>------ </td>-- <td class="description last">(optional) attribute name to filter</td>+ <td class="description last">attribute name</td></tr>@@ -1017,7 +2001,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line279">line 279</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line513">line 513</a></li></ul></dd>@@ -1046,7 +2030,7 @@<div class="param-desc">- all note's attributes, including inherited ones+ 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.</div>@@ -1057,7 +2041,7 @@</dt><dd>-<span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span>+<span class="param-type"><a href="Attribute.html">Attribute</a></span></dd>@@ -1075,7 +2059,7 @@- <h4 class="name" id="getAttributeValue"><span class="type-signature"></span>getAttributeValue<span class="signature">(type, name)</span><span class="type-signature"> → {string|null}</span></h4>+ <h4 class="name" id="getAttributes"><span class="type-signature"></span>getAttributes<span class="signature">(type<span class="signature-attributes">opt</span>, name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4>@@ -1103,6 +2087,8 @@<th>Type</th>+ <th>Attributes</th>+@@ -1128,10 +2114,20 @@</td>+ <td class="attributes">++ <optional><br>++++++ </td>+- <td class="description last">attribute type (label, relation, etc.)</td>+ <td class="description last">(optional) attribute type to filter</td></tr>@@ -1151,10 +2147,20 @@</td>+ <td class="attributes">++ <optional><br>++++++ </td>+- <td class="description last">attribute name</td>+ <td class="description last">(optional) attribute name to filter</td></tr>@@ -1195,116 +2201,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line451">line 451</a>- </li></ul></dd>--------</dl>----------------<h5>Returns:</h5>---<div class="param-desc">- attribute value of given type and name or null if no such attribute exists.-</div>----<dl>- <dt>- Type- </dt>- <dd>--<span class="param-type">string</span>-|--<span class="param-type">null</span>--- </dd>-</dl>-------------- <h4 class="name" id="getBranches"><span class="type-signature"></span>getBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Branch.html">Branch</a>>}</span></h4>-------------------<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line811">line 811</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line326">line 326</a></li></ul></dd>@@ -1332,6 +2229,10 @@<h5>Returns:</h5>+<div class="param-desc">+ all note's attributes, including inherited ones+</div>+<dl>@@ -1340,7 +2241,7 @@</dt><dd>-<span class="param-type">Array.<<a href="Branch.html">Branch</a>></span>+<span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span></dd>@@ -1358,125 +2259,91 @@- <h4 class="name" id="getChildBranches"><span class="type-signature"></span>getChildBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Branch.html">Branch</a>>}</span></h4>-------------------<dl class="details">-------+ <h4 class="name" id="getAttributeValue"><span class="type-signature"></span>getAttributeValue<span class="signature">(type, name)</span><span class="type-signature"> → {string|null}</span></h4>--------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line839">line 839</a>- </li></ul></dd>---+ <h5>Parameters:</h5>-</dl>----------------<h5>Returns:</h5>+<table class="params">+ <thead>+ <tr>++ <th>Name</th>-<div class="param-desc">- child branches of this note-</div>-+ <th>Type</th>-<dl>- <dt>- Type- </dt>- <dd>-<span class="param-type">Array.<<a href="Branch.html">Branch</a>></span>+- </dd>-</dl>+ <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>--+-- <h4 class="name" id="getChildNotes"><span class="type-signature"></span>getChildNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>-+ <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="description last">attribute name</td>+ </tr>-++ </tbody>+</table>@@ -1512,7 +2379,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line825">line 825</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line524">line 524</a></li></ul></dd>@@ -1541,7 +2408,7 @@<div class="param-desc">- child notes of this note+ attribute value of given type and name or null if no such attribute exists.</div>@@ -1552,7 +2419,10 @@</dt><dd>-<span class="param-type">Array.<<a href="Note.html">Note</a>></span>+<span class="param-type">string</span>+|++<span class="param-type">null</span></dd>@@ -1570,7 +2440,7 @@- <h4 class="name" id="getContent"><span class="type-signature"></span>getContent<span class="signature">()</span><span class="type-signature"> → {*}</span></h4>+ <h4 class="name" id="getBranches"><span class="type-signature"></span>getBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Branch.html">Branch</a>>}</span></h4>@@ -1618,7 +2488,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line75">line 75</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line140">line 140</a></li></ul></dd>@@ -1654,7 +2524,7 @@</dt><dd>-<span class="param-type">*</span>+<span class="param-type">Array.<<a href="Branch.html">Branch</a>></span></dd>@@ -1672,7 +2542,7 @@- <h4 class="name" id="getContentMetadata"><span class="type-signature"></span>getContentMetadata<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>+ <h4 class="name" id="getChildBranches"><span class="type-signature"></span>getChildBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Branch.html">Branch</a>>}</span></h4>@@ -1720,7 +2590,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line111">line 111</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line160">line 160</a></li></ul></dd>@@ -1756,7 +2626,7 @@</dt><dd>-<span class="param-type">Object</span>+<span class="param-type">Array.<<a href="Branch.html">Branch</a>></span></dd>@@ -1774,7 +2644,7 @@- <h4 class="name" id="getDescendantNoteIds"><span class="type-signature"></span>getDescendantNoteIds<span class="signature">()</span><span class="type-signature"> → {Array.<string>}</span></h4>+ <h4 class="name" id="getChildNotes"><span class="type-signature"></span>getChildNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>@@ -1822,7 +2692,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line711">line 711</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line150">line 150</a></li></ul></dd>@@ -1850,10 +2720,6 @@<h5>Returns:</h5>-<div class="param-desc">- return list of all descendant noteIds of this note. Returning just noteIds because number of notes can be huge. Includes also this note's noteId-</div>-<dl>@@ -1862,7 +2728,7 @@</dt><dd>-<span class="param-type">Array.<string></span>+<span class="param-type">Array.<<a href="Note.html">Note</a>></span></dd>@@ -1880,146 +2746,19 @@- <h4 class="name" id="getDescendantNotesWithAttribute"><span class="type-signature"></span>getDescendantNotesWithAttribute<span class="signature">(type, name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>-------<div class="description">- Finds descendant notes with given attribute name and value. Only own attributes are considered, not inherited ones-</div>---------- <h5>Parameters:</h5>---<table class="params">- <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>-+ <h4 class="name" id="getContent"><span class="type-signature"></span>getContent<span class="signature">()</span><span class="type-signature"> → {*}</span></h4>++- <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>@@ -2055,7 +2794,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line734">line 734</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line174">line 174</a></li></ul></dd>@@ -2091,7 +2830,7 @@</dt><dd>-<span class="param-type">Array.<<a href="Note.html">Note</a>></span>+<span class="param-type">*</span></dd>@@ -2109,115 +2848,19 @@- <h4 class="name" id="getDescendantNotesWithLabel"><span class="type-signature"></span>getDescendantNotesWithLabel<span class="signature">(name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>-------<div class="description">- Finds descendant notes with given label name and value. Only own labels are considered, not inherited ones-</div>---------- <h5>Parameters:</h5>---<table class="params">- <thead>- <tr>-- <th>Name</th>--- <th>Type</th>--- <th>Attributes</th>----- <th class="last">Description</th>- </tr>- </thead>-- <tbody>+ <h4 class="name" id="getContentMetadata"><span class="type-signature"></span>getContentMetadata<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>- <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">label 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">label value</td>- </tr>-- </tbody>-</table>@@ -2253,7 +2896,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line772">line 772</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line208">line 208</a></li></ul></dd>@@ -2289,7 +2932,7 @@</dt><dd>-<span class="param-type">Array.<<a href="Note.html">Note</a>></span>+<span class="param-type">Object</span></dd>@@ -2307,7 +2950,7 @@- <h4 class="name" id="getDescendantNotesWithRelation"><span class="type-signature"></span>getDescendantNotesWithRelation<span class="signature">(name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>+ <h4 class="name" id="getFlatText"><span class="type-signature"></span>getFlatText<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>@@ -2315,7 +2958,9 @@<div class="description">- Finds descendant notes with given relation name and value. Only own relations are considered, not inherited ones+ This is used for:+- fast searching+- note similarity evaluation</div>@@ -2326,98 +2971,6 @@- <h5>Parameters:</h5>---<table class="params">- <thead>- <tr>-- <th>Name</th>--- <th>Type</th>--- <th>Attributes</th>----- <th class="last">Description</th>- </tr>- </thead>-- <tbody>--- <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">relation 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">relation value</td>- </tr>--- </tbody>-</table>--@@ -2451,7 +3004,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line781">line 781</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line650">line 650</a></li></ul></dd>@@ -2479,6 +3032,10 @@<h5>Returns:</h5>+<div class="param-desc">+ - returns flattened textual representation of note, prefixes and attributes+</div>+<dl>@@ -2487,7 +3044,7 @@</dt><dd>-<span class="param-type">Array.<<a href="Note.html">Note</a>></span>+<span class="param-type">string</span></dd>@@ -2553,7 +3110,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line122">line 122</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line219">line 219</a></li></ul></dd>@@ -2704,7 +3261,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line594">line 594</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line455">line 455</a></li></ul></dd>@@ -2874,7 +3431,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line302">line 302</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line545">line 545</a></li></ul></dd>@@ -3029,7 +3586,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line618">line 618</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line479">line 479</a></li></ul></dd>@@ -3090,23 +3647,80 @@- <h4 class="name" id="getLinks"><span class="type-signature"></span>getLinks<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4>+ <h4 class="name" id="getLabelValues"><span class="type-signature"></span>getLabelValues<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<string>}</span></h4>+++++++++++++++ <h5>Parameters:</h5>+<table class="params">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>+++ <th>Attributes</th>+++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+ <tr>++ <td class="name"><code>name</code></td>++ <td class="type">+++<span class="param-type">string</span>-<div class="description">- Get list of links coming out of this note.-</div>++ </td>++ <td class="attributes">++ <optional><br>++++ </td>+++ <td class="description last">label name to filter</td>+ </tr>++ </tbody>+</table>@@ -3130,8 +3744,6 @@- <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>- not intended for general use</li></ul></dd>-@@ -3144,7 +3756,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line798">line 798</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line553">line 553</a></li></ul></dd>@@ -3172,6 +3784,10 @@<h5>Returns:</h5>+<div class="param-desc">+ all note's label values, including inherited ones+</div>+<dl>@@ -3180,7 +3796,7 @@</dt><dd>-<span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span>+<span class="param-type">Array.<string></span></dd>@@ -3246,7 +3862,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line261">line 261</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line619">line 619</a></li></ul></dd>@@ -3313,11 +3929,6 @@ This method can be significantly faster than the getAttribute()-<div class="description">- This method is a faster variant of getAttributes() which looks for only owned attributes.-Use when inheritance is not needed and/or in batch/performance sensitive operations.-</div>-@@ -3453,7 +4064,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line237">line 237</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line594">line 594</a></li></ul></dd>@@ -3631,7 +4242,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line462">line 462</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line535">line 535</a></li></ul></dd>@@ -3789,7 +4400,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line600">line 600</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line461">line 461</a></li></ul></dd>@@ -3959,7 +4570,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line310">line 310</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line561">line 561</a></li></ul></dd>@@ -4114,7 +4725,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line624">line 624</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line485">line 485</a></li></ul></dd>@@ -4175,7 +4786,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati- <h4 class="name" id="getOwnedRelation"><span class="type-signature"></span>getOwnedRelation<span class="signature">(name)</span><span class="type-signature"> → {<a href="Attribute.html">Attribute</a>|null}</span></h4>+ <h4 class="name" id="getOwnedLabelValues"><span class="type-signature"></span>getOwnedLabelValues<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<string>}</span></h4>@@ -4203,6 +4814,8 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<th>Type</th>+ <th>Attributes</th>+@@ -4228,10 +4841,20 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati</td>+ <td class="attributes">++ <optional><br>++++++ </td>+- <td class="description last">relation name</td>+ <td class="description last">label name to filter</td></tr>@@ -4272,7 +4895,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line612">line 612</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line569">line 569</a></li></ul></dd>@@ -4301,7 +4924,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<div class="param-desc">- relation if it exists, null otherwise+ all note's label values, excluding inherited ones</div>@@ -4312,10 +4935,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati</dt><dd>-<span class="param-type"><a href="Attribute.html">Attribute</a></span>-|--<span class="param-type">null</span>+<span class="param-type">Array.<string></span></dd>@@ -4333,7 +4953,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati- <h4 class="name" id="getOwnedRelations"><span class="type-signature"></span>getOwnedRelations<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4>+ <h4 class="name" id="getOwnedRelation"><span class="type-signature"></span>getOwnedRelation<span class="signature">(name)</span><span class="type-signature"> → {<a href="Attribute.html">Attribute</a>|null}</span></h4>@@ -4361,8 +4981,6 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<th>Type</th>- <th>Attributes</th>-@@ -4388,20 +5006,10 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati</td>- <td class="attributes">-- <optional><br>------ </td>-- <td class="description last">relation name to filter</td>+ <td class="description last">relation name</td></tr>@@ -4442,7 +5050,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line326">line 326</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line473">line 473</a></li></ul></dd>@@ -4471,7 +5079,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<div class="param-desc">- all note's relations (attributes with type relation), excluding inherited ones+ relation if it exists, null otherwise</div>@@ -4482,7 +5090,10 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati</dt><dd>-<span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span>+<span class="param-type"><a href="Attribute.html">Attribute</a></span>+|++<span class="param-type">null</span></dd>@@ -4500,7 +5111,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati- <h4 class="name" id="getOwnedRelationTarget"><span class="type-signature"></span>getOwnedRelationTarget<span class="signature">(name)</span><span class="type-signature"> → {<a href="Note.html">Note</a>|null}</span></h4>+ <h4 class="name" id="getOwnedRelations"><span class="type-signature"></span>getOwnedRelations<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4>@@ -4528,6 +5139,8 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<th>Type</th>+ <th>Attributes</th>+@@ -4553,10 +5166,20 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati</td>+ <td class="attributes">++ <optional><br>++++++ </td>+- <td class="description last"></td>+ <td class="description last">relation name to filter</td></tr>@@ -4597,7 +5220,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line652">line 652</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line585">line 585</a></li></ul></dd>@@ -4626,7 +5249,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<div class="param-desc">- target note of the relation or null (if target is empty or note was not found)+ all note's relations (attributes with type relation), excluding inherited ones</div>@@ -4637,10 +5260,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati</dt><dd>-<span class="param-type"><a href="Note.html">Note</a></span>-|--<span class="param-type">null</span>+<span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span></dd>@@ -4755,7 +5375,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line636">line 636</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line497">line 497</a></li></ul></dd>@@ -4816,7 +5436,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati- <h4 class="name" id="getParentNotes"><span class="type-signature"></span>getParentNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>+ <h4 class="name" id="getParentBranches"><span class="type-signature"></span>getParentBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Branch.html">Branch</a>>}</span></h4>@@ -4864,7 +5484,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line851">line 851</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line135">line 135</a></li></ul></dd>@@ -4892,12 +5512,110 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<h5>Returns:</h5>-<div class="param-desc">- parent notes of this note (note can have multiple parents because of cloning)-</div>+++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">Array.<<a href="Branch.html">Branch</a>></span>+++ </dd>+</dl>++++++++++++++ <h4 class="name" id="getParentNotes"><span class="type-signature"></span>getParentNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line145">line 145</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++<h5>Returns:</h5>++++<dl><dt>Type@@ -5019,7 +5737,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line606">line 606</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line467">line 467</a></li></ul></dd>@@ -5189,7 +5907,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line318">line 318</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line577">line 577</a></li></ul></dd>@@ -5247,7 +5965,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati- <h4 class="name" id="getRelationTarget"><span class="type-signature"></span>getRelationTarget<span class="signature">(name)</span><span class="type-signature"> → {<a href="Note.html">Note</a>|null}</span></h4>+ <h4 class="name" id="getRelationValue"><span class="type-signature"></span>getRelationValue<span class="signature">(name)</span><span class="type-signature"> → {string|null}</span></h4>@@ -5303,7 +6021,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati- <td class="description last"></td>+ <td class="description last">relation name</td></tr>@@ -5344,7 +6062,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line642">line 642</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line491">line 491</a></li></ul></dd>@@ -5373,7 +6091,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<div class="param-desc">- target note of the relation or null (if target is empty or note was not found)+ relation value if relation exists, null otherwise</div>@@ -5384,7 +6102,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati</dt><dd>-<span class="param-type"><a href="Note.html">Note</a></span>+<span class="param-type">string</span>|<span class="param-type">null</span>@@ -5405,80 +6123,19 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati- <h4 class="name" id="getRelationTargets"><span class="type-signature"></span>getRelationTargets<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>--------------- <h5>Parameters:</h5>+ <h4 class="name" id="getScriptEnv"><span class="type-signature"></span>getScriptEnv<span class="signature">()</span><span class="type-signature"> → {string|null}</span></h4>-<table class="params">- <thead>- <tr>-- <th>Name</th>--- <th>Type</th>--- <th>Attributes</th>----- <th class="last">Description</th>- </tr>- </thead>-- <tbody>- <tr>-- <td class="name"><code>name</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>----- </td>--- <td class="description last">relation name to filter</td>- </tr>-- </tbody>-</table>++++@@ -5514,7 +6171,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line334">line 334</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line305">line 305</a></li></ul></dd>@@ -5542,6 +6199,10 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<h5>Returns:</h5>+<div class="param-desc">+ JS script environment - either "frontend" or "backend"+</div>+<dl>@@ -5550,7 +6211,10 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati</dt><dd>-<span class="param-type">Array.<<a href="Note.html">Note</a>></span>+<span class="param-type">string</span>+|++<span class="param-type">null</span></dd>@@ -5568,68 +6232,19 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati- <h4 class="name" id="getRelationValue"><span class="type-signature"></span>getRelationValue<span class="signature">(name)</span><span class="type-signature"> → {string|null}</span></h4>--+ <h4 class="name" id="getSubtreeNoteIds"><span class="type-signature"></span>getSubtreeNoteIds<span class="signature">()</span><span class="type-signature"> → {Array.<String>}</span></h4>----------- <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>name</code></td>-- <td class="type">---<span class="param-type">string</span>-- </td>--- <td class="description last">relation name</td>- </tr>-- </tbody>-</table>@@ -5665,7 +6280,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line630">line 630</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line798">line 798</a></li></ul></dd>@@ -5693,10 +6308,6 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<h5>Returns:</h5>-<div class="param-desc">- relation value if relation exists, null otherwise-</div>-<dl>@@ -5705,10 +6316,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati</dt><dd>-<span class="param-type">string</span>-|--<span class="param-type">null</span>+<span class="param-type">Array.<String></span></dd>@@ -5726,17 +6334,13 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati- <h4 class="name" id="getRevisions"><span class="type-signature"></span>getRevisions<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="NoteRevision.html">NoteRevision</a>>}</span></h4>+ <h4 class="name" id="getSubtreeNotes"><span class="type-signature"></span>getSubtreeNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>-<div class="description">- Returns note revisions of this note.-</div>-@@ -5778,7 +6382,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line788">line 788</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line777">line 777</a></li></ul></dd>@@ -5814,7 +6418,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati</dt><dd>-<span class="param-type">Array.<<a href="NoteRevision.html">NoteRevision</a>></span>+<span class="param-type">Array.<<a href="Note.html">Note</a>></span></dd>@@ -5832,7 +6436,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati- <h4 class="name" id="getScriptEnv"><span class="type-signature"></span>getScriptEnv<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>+ <h4 class="name" id="getSubtreeNotesIncludingTemplated"><span class="type-signature"></span>getSubtreeNotesIncludingTemplated<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>@@ -5880,7 +6484,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line208">line 208</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line746">line 746</a></li></ul></dd>@@ -5908,10 +6512,6 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<h5>Returns:</h5>-<div class="param-desc">- JS script environment - either "frontend" or "backend"-</div>-<dl>@@ -5920,7 +6520,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati</dt><dd>-<span class="param-type">string</span>+<span class="param-type">Array.<<a href="Note.html">Note</a>></span></dd>@@ -5938,7 +6538,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati- <h4 class="name" id="getTargetRelations"><span class="type-signature"></span>getTargetRelations<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4>+ <h4 class="name" id="getTemplatedNotes"><span class="type-signature"></span>getTemplatedNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>@@ -5986,7 +6586,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line270">line 270</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line895">line 895</a></li></ul></dd>@@ -6015,7 +6615,8 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<div class="param-desc">- relations targetting this specific note+ - returns only notes which are templated, does not include their subtrees+ in effect returns notes which are influenced by note's non-inheritable attributes</div>@@ -6026,7 +6627,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati</dt><dd>-<span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span>+<span class="param-type">Array.<<a href="Note.html">Note</a>></span></dd>@@ -6044,91 +6645,19 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati- <h4 class="name" id="hasAttribute"><span class="type-signature"></span>hasAttribute<span class="signature">(type, name)</span><span class="type-signature"> → {boolean}</span></h4>--------------- <h5>Parameters:</h5>+ <h4 class="name" id="hasAncestor"><span class="type-signature"></span>hasAncestor<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>-<table class="params">- <thead>- <tr>-- <th>Name</th>--- <th>Type</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="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="description last">attribute name</td>- </tr>-- </tbody>-</table>@@ -6164,7 +6693,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line422">line 422</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line879">line 879</a></li></ul></dd>@@ -6192,10 +6721,6 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<h5>Returns:</h5>-<div class="param-desc">- true if note has an attribute with given type and name (including inherited)-</div>-<dl>@@ -6270,7 +6795,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line818">line 818</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line155">line 155</a></li></ul></dd>@@ -6298,10 +6823,6 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<h5>Returns:</h5>-<div class="param-desc">- - true if note has children-</div>-<dl>@@ -6425,7 +6946,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line570">line 570</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line431">line 431</a></li></ul></dd>@@ -6603,7 +7124,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line431">line 431</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line504">line 504</a></li></ul></dd>@@ -6758,7 +7279,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line576">line 576</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line437">line 437</a></li></ul></dd>@@ -6913,7 +7434,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line588">line 588</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line449">line 449</a></li></ul></dd>@@ -7068,7 +7589,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line582">line 582</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line443">line 443</a></li></ul></dd>@@ -7120,95 +7641,6 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati------- <h4 class="name" id="invalidateAttributeCache"><span class="type-signature"></span>invalidateAttributeCache<span class="signature">()</span><span class="type-signature"></span></h4>-------<div class="description">- Clear note's attributes cache to force fresh reload for next attribute request.-Cache is note instance scoped.-</div>--------------<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line349">line 349</a>- </li></ul></dd>--------</dl>--------------------@@ -7307,7 +7739,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line896">line 896</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line954">line 954</a></li></ul></dd>@@ -7413,7 +7845,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line198">line 198</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line294">line 294</a></li></ul></dd>@@ -7519,7 +7951,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line190">line 190</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line286">line 286</a></li></ul></dd>@@ -7625,7 +8057,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line185">line 185</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line281">line 281</a></li></ul></dd>@@ -7731,7 +8163,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line180">line 180</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line276">line 276</a></li></ul></dd>@@ -7837,7 +8269,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line203">line 203</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line300">line 300</a></li></ul></dd>@@ -8070,7 +8502,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line525">line 525</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line998">line 998</a></li></ul></dd>@@ -8250,7 +8682,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line698">line 698</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1089">line 1089</a></li></ul></dd>@@ -8430,7 +8862,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line706">line 706</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1097">line 1097</a></li></ul></dd>@@ -8641,7 +9073,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line492">line 492</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line967">line 967</a></li></ul></dd>@@ -8821,7 +9253,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line682">line 682</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1073">line 1073</a></li></ul></dd>@@ -8981,7 +9413,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line690">line 690</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1081">line 1081</a></li></ul></dd>@@ -9223,7 +9655,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line476">line 476</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1040">line 1040</a></li></ul></dd>@@ -9434,7 +9866,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line665">line 665</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1056">line 1056</a></li></ul></dd>@@ -9645,7 +10077,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line674">line 674</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1065">line 1065</a></li></ul></dd>@@ -9691,13 +10123,13 @@ Cache is note instance scoped.</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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 3.6.6</a>+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a></footer><script> prettyPrint(); </script>diff --git a/docs/backend_api/NoteImage.html b/docs/backend_api/NoteImage.htmldeleted file mode 100644index 28b67ea8fa..0000000000--- a/docs/backend_api/NoteImage.html+++ /dev/null@@ -1,343 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Class: NoteImage</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: NoteImage</h1>-------<section>--<header>-- <h2><span class="attribs"><span class="type-signature"></span></span>NoteImage<span class="signature">(noteImageId, noteId, imageId, isDeleted, dateModified, dateCreated)</span><span class="type-signature"></span></h2>-- <div class="class-description">This class represents image's placement in the note(s). One image may be placed into several notes.</div>---</header>--<article>- <div class="container-overview">----- <h2>Constructor</h2>---- <h4 class="name" id="NoteImage"><span class="type-signature"></span>new NoteImage<span class="signature">(noteImageId, noteId, imageId, isDeleted, dateModified, dateCreated)</span><span class="type-signature"></span></h4>--------------- <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>noteImageId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>noteId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>imageId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>isDeleted</code></td>--- <td class="type">---<span class="param-type">boolean</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>dateModified</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>------ <td class="description last"></td>- </tr>---- <tr>-- <td class="name"><code>dateCreated</code></td>--- <td class="type">---<span class="param-type">string</span>---- </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="entities_note_image.js.html">entities/note_image.js</a>, <a href="entities_note_image.js.html#line19">line 19</a>- </li></ul></dd>--------</dl>-------------------- </div>--- <h3 class="subsection-title">Extends</h3>----- <ul>- <li><a href="Entity.html">Entity</a></li>- </ul>----------------------</article>--</section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Image.html">Image</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteImage.html">NoteImage</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Oct 07 2018 16:26:59 GMT+0200 (CEST)-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>\ No newline at end of filediff --git a/docs/backend_api/NoteRevision.html b/docs/backend_api/NoteRevision.htmlindex df87d061be..4c5ba9ca94 100644--- a/docs/backend_api/NoteRevision.html+++ b/docs/backend_api/NoteRevision.html@@ -30,7 +30,8 @@<h2><span class="attribs"><span class="type-signature"></span></span>NoteRevision<span class="signature">()</span><span class="type-signature"></span></h2>- <div class="class-description">NoteRevision represents snapshot of note's title and content at some point in the past. It's used for seamless note versioning.</div>+ <div class="class-description">NoteRevision represents snapshot of note's title and content at some point in the past.+It's used for seamless note versioning.</div></header>@@ -93,7 +94,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line14">line 14</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line15">line 15</a></li></ul></dd>@@ -143,13 +144,23 @@-<h4 class="name" id="contentLength"><span class="type-signature"></span>contentLength<span class="type-signature"></span></h4>+<h4 class="name" id="contentLength"><span class="type-signature"></span>contentLength<span class="type-signature"> :number</span></h4>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">number</span>+++ </li>+ </ul>+@@ -183,7 +194,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line45">line 45</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line46">line 46</a></li></ul></dd>@@ -201,13 +212,23 @@-<h4 class="name" id="dateCreated"><span class="type-signature"></span>dateCreated<span class="type-signature"></span></h4>+<h4 class="name" id="dateCreated"><span class="type-signature"></span>dateCreated<span class="type-signature"> :string</span></h4>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>+@@ -241,7 +262,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line37">line 37</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line38">line 38</a></li></ul></dd>@@ -259,12 +280,22 @@-<h4 class="name" id="dateLastEdited"><span class="type-signature"></span>dateLastEdited<span class="type-signature"></span></h4>+<h4 class="name" id="dateLastEdited"><span class="type-signature"></span>dateLastEdited<span class="type-signature"> :string</span></h4>+++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>++ </li>+ </ul>@@ -299,7 +330,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line35">line 35</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line36">line 36</a></li></ul></dd>@@ -317,13 +348,23 @@-<h4 class="name" id="isProtected"><span class="type-signature"></span>isProtected<span class="type-signature"></span></h4>+<h4 class="name" id="isProtected"><span class="type-signature"></span>isProtected<span class="type-signature"> :boolean</span></h4>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">boolean</span>+++ </li>+ </ul>+@@ -357,7 +398,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line31">line 31</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line32">line 32</a></li></ul></dd>@@ -375,12 +416,22 @@-<h4 class="name" id="mime"><span class="type-signature"></span>mime<span class="type-signature"></span></h4>+<h4 class="name" id="mime"><span class="type-signature"></span>mime<span class="type-signature"> :string</span></h4>+++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>++ </li>+ </ul>@@ -415,7 +466,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line29">line 29</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line30">line 30</a></li></ul></dd>@@ -433,12 +484,22 @@-<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"></span></h4>+<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"> :string</span></h4>++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>@@ -473,7 +534,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line25">line 25</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line26">line 26</a></li></ul></dd>@@ -491,13 +552,23 @@-<h4 class="name" id="noteRevisionId"><span class="type-signature"></span>noteRevisionId<span class="type-signature"></span></h4>+<h4 class="name" id="noteRevisionId"><span class="type-signature"></span>noteRevisionId<span class="type-signature"> :string</span></h4>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>+@@ -531,7 +602,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line23">line 23</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line24">line 24</a></li></ul></dd>@@ -549,12 +620,22 @@-<h4 class="name" id="title"><span class="type-signature"></span>title<span class="type-signature"></span></h4>+<h4 class="name" id="title"><span class="type-signature"></span>title<span class="type-signature"> :string</span></h4>+++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>++ </li>+ </ul>@@ -589,7 +670,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line33">line 33</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line34">line 34</a></li></ul></dd>@@ -607,12 +688,22 @@-<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"></span></h4>+<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4>++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>@@ -647,7 +738,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line27">line 27</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line28">line 28</a></li></ul></dd>@@ -665,13 +756,23 @@-<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"></span></h4>+<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"> :string</span></h4>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>+@@ -705,7 +806,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line41">line 41</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line42">line 42</a></li></ul></dd>@@ -723,12 +824,22 @@-<h4 class="name" id="utcDateLastEdited"><span class="type-signature"></span>utcDateLastEdited<span class="type-signature"></span></h4>+<h4 class="name" id="utcDateLastEdited"><span class="type-signature"></span>utcDateLastEdited<span class="type-signature"> :string</span></h4>+++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>++ </li>+ </ul>@@ -763,7 +874,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line39">line 39</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line40">line 40</a></li></ul></dd>@@ -781,12 +892,22 @@-<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"></span></h4>+<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"> :string</span></h4>++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>@@ -821,7 +942,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line43">line 43</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line44">line 44</a></li></ul></dd>@@ -897,7 +1018,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line76">line 76</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line77">line 77</a></li></ul></dd>@@ -999,7 +1120,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line140">line 140</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line141">line 141</a></li></ul></dd>@@ -1101,7 +1222,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line62">line 62</a>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line63">line 63</a></li></ul></dd>@@ -1169,7 +1290,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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/Option.html b/docs/backend_api/Option.htmlindex ef481bf808..f0f20a329c 100644--- a/docs/backend_api/Option.html+++ b/docs/backend_api/Option.html@@ -139,6 +139,282 @@+ <h3 class="subsection-title">Members</h3>++++<h4 class="name" id="isSynced"><span class="type-signature"></span>isSynced<span class="type-signature"> :boolean</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">boolean</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line22">line 22</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line18">line 18</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line24">line 24</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="value"><span class="type-signature"></span>value<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_option.js.html">becca/entities/option.js</a>, <a href="becca_entities_option.js.html#line20">line 20</a>+ </li></ul></dd>++++++++</dl>++++++++@@ -155,7 +431,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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/RecentNote.html b/docs/backend_api/RecentNote.htmlindex 3aeec055df..a03691ba7a 100644--- a/docs/backend_api/RecentNote.html+++ b/docs/backend_api/RecentNote.html@@ -139,6 +139,214 @@+ <h3 class="subsection-title">Members</h3>++++<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_recent_note.js.html">becca/entities/recent_note.js</a>, <a href="becca_entities_recent_note.js.html#line17">line 17</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="notePath"><span class="type-signature"></span>notePath<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_recent_note.js.html">becca/entities/recent_note.js</a>, <a href="becca_entities_recent_note.js.html#line19">line 19</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_recent_note.js.html">becca/entities/recent_note.js</a>, <a href="becca_entities_recent_note.js.html#line21">line 21</a>+ </li></ul></dd>++++++++</dl>++++++++@@ -155,7 +363,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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/backend_script_api.js.html b/docs/backend_api/backend_script_api.js.htmldeleted file mode 100644index b47696c4b9..0000000000--- a/docs/backend_api/backend_script_api.js.html+++ /dev/null@@ -1,472 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: 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: 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");--/**- * This is the main backend API interface for scripts. It's published in the local "api" object.- *- * @constructor- * @hideconstructor- */-function BackendScriptApi(currentNote, apiParams) {- /** @property {Note} note where script started executing */- this.startNote = apiParams.startNote;- /** @property {Note} 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 {Note|null}- */- this.getNote = becca.getNote;-- /**- * @method- * @param {string} branchId- * @returns {Branch|null}- */- this.getBranch = becca.getBranch;-- /**- * @method- * @param {string} attributeId- * @returns {Attribute|null}- */- this.getAttribute = becca.getAttribute;-- /**- * 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 {Note[]}- */- 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 {Note|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 {Note[]}- */- this.getNotesWithLabel = attributeService.getNotesWithLabel;-- /**- * Retrieves first note with given label name & value- *- * @method- * @param {string} name - attribute name- * @param {string} [value] - attribute value- * @returns {Note|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 create 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 create 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: Note, 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: Note, 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, relation-map - 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: Note, 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: Note, 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};- });- };-- /**- * Log given message to trilium logs.- *- * @param message- */- this.log = message => log.info(`Script "${currentNote.title}" (${currentNote.noteId}): ${message}`);-- /**- * Returns root note of the calendar.- *- * @method- * @returns {Note|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- * @returns {Note|null}- */- this.getDateNote = dateNoteService.getDateNote;-- /**- * Returns today's day note. If such note doesn't exist, it is created.- *- * @method- * @returns {Note|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"- * @returns {Note|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- * @returns {Note|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- * @returns {Note|null}- */- this.getYearNote = dateNoteService.getYearNote;-- /**- * @method- * @param {string} parentNoteId - this note's child notes will be sorted- */- this.sortNotesByTitle = parentNoteId => treeService.sortNotes(parentNoteId);-- /**- * 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 = () => {};-- /**- * @return {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version- */- this.getAppInfo = () => appInfo-}--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="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 3.6.7</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/becca_entities_api_token.js.html b/docs/backend_api/becca_entities_api_token.js.htmlindex ec881d8ed1..62e869de90 100644--- a/docs/backend_api/becca_entities_api_token.js.html+++ b/docs/backend_api/becca_entities_api_token.js.html@@ -42,8 +42,11 @@ class ApiToken extends AbstractEntity {constructor(row) {super();+ /** @type {string} */this.apiTokenId = row.apiTokenId;+ /** @type {string} */this.token = row.token;+ /** @type {string} */this.utcDateCreated = row.utcDateCreated || dateUtils.utcNowDateTime();}@@ -67,7 +70,7 @@ module.exports = ApiToken;</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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/becca_entities_attribute.js.html b/docs/backend_api/becca_entities_attribute.js.htmlindex 933968145c..2fe091dbd1 100644--- a/docs/backend_api/becca_entities_attribute.js.html+++ b/docs/backend_api/becca_entities_attribute.js.html@@ -34,6 +34,10 @@ const sql = require("../../services/sql.js");const dateUtils = require("../../services/date_utils.js");const promotedAttributeDefinitionParser = require("../../services/promoted_attribute_definition_parser");+/**+ * 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 Attribute extends AbstractEntity {static get entityName() { return "attributes"; }static get primaryKeyName() { return "attributeId"; }@@ -64,21 +68,21 @@ class Attribute extends AbstractEntity {}update([attributeId, noteId, type, name, value, isInheritable, position, utcDateModified]) {- /** @param {string} */+ /** @type {string} */this.attributeId = attributeId;- /** @param {string} */+ /** @type {string} */this.noteId = noteId;- /** @param {string} */+ /** @type {string} */this.type = type;- /** @param {string} */+ /** @type {string} */this.name = name;- /** @param {int} */+ /** @type {int} */this.position = position;- /** @param {string} */+ /** @type {string} */this.value = value;- /** @param {boolean} */+ /** @type {boolean} */this.isInheritable = !!isInheritable;- /** @param {string} */+ /** @type {string} */this.utcDateModified = utcDateModified;return this;@@ -91,7 +95,7 @@ class Attribute extends AbstractEntity {if (!(this.noteId in this.becca.notes)) {// entities can come out of order in sync, create skeleton which will be filled later- this.becca.notes[this.noteId] = new Note({noteId: this.noteId});+ this.becca.addNote(this.noteId, new Note({noteId: this.noteId}));}this.becca.notes[this.noteId].ownedAttributes.push(this);@@ -173,6 +177,10 @@ class Attribute extends AbstractEntity {}}+ get isDeleted() {+ return !(this.attributeId in this.becca.attributes);+ }+beforeSaving() {if (!this.value) {if (this.type === 'relation') {@@ -237,7 +245,7 @@ module.exports = Attribute;</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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/becca_entities_branch.js.html b/docs/backend_api/becca_entities_branch.js.htmlindex f5b83e4783..8601910145 100644--- a/docs/backend_api/becca_entities_branch.js.html+++ b/docs/backend_api/becca_entities_branch.js.html@@ -33,6 +33,10 @@ const AbstractEntity = require("./abstract_entity.js");const sql = require("../../services/sql.js");const dateUtils = require("../../services/date_utils.js");+/**+ * Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple+ * parents.+ */class Branch extends AbstractEntity {static get entityName() { return "branches"; }static get primaryKeyName() { return "branchId"; }@@ -63,19 +67,19 @@ class Branch extends AbstractEntity {}update([branchId, noteId, parentNoteId, prefix, notePosition, isExpanded, utcDateModified]) {- /** @param {string} */+ /** @type {string} */this.branchId = branchId;- /** @param {string} */+ /** @type {string} */this.noteId = noteId;- /** @param {string} */+ /** @type {string} */this.parentNoteId = parentNoteId;- /** @param {string} */+ /** @type {string} */this.prefix = prefix;- /** @param {int} */+ /** @type {int} */this.notePosition = notePosition;- /** @param {boolean} */+ /** @type {boolean} */this.isExpanded = !!isExpanded;- /** @param {string} */+ /** @type {string} */this.utcDateModified = utcDateModified;return this;@@ -89,20 +93,27 @@ class Branch extends AbstractEntity {const childNote = this.childNote;const parentNote = this.parentNote;- childNote.parents.push(parentNote);- childNote.parentBranches.push(this);+ if (!childNote.parents.includes(parentNote)) {+ childNote.parents.push(parentNote);+ }++ if (!childNote.parentBranches.includes(this)) {+ childNote.parentBranches.push(this);+ }- parentNote.children.push(childNote);+ if (!parentNote.children.includes(childNote)) {+ parentNote.children.push(childNote);+ }this.becca.branches[this.branchId] = this;this.becca.childParentToBranch[`${this.noteId}-${this.parentNoteId}`] = this;}- /** @return {Note} */+ /** @returns {Note} */get childNote() {if (!(this.noteId in this.becca.notes)) {// entities can come out of order in sync, create skeleton which will be filled later- this.becca.notes[this.noteId] = new Note({noteId: this.noteId});+ this.becca.addNote(this.noteId, new Note({noteId: this.noteId}));}return this.becca.notes[this.noteId];@@ -112,16 +123,20 @@ class Branch extends AbstractEntity {return this.childNote;}- /** @return {Note} */+ /** @returns {Note} */get parentNote() {if (!(this.parentNoteId in this.becca.notes)) {// entities can come out of order in sync, create skeleton which will be filled later- this.becca.notes[this.parentNoteId] = new Note({noteId: this.parentNoteId});+ this.becca.addNote(this.parentNoteId, new Note({noteId: this.parentNoteId}));}return this.becca.notes[this.parentNoteId];}+ get isDeleted() {+ return !(this.branchId in this.becca.branches);+ }+beforeSaving() {if (this.notePosition === undefined || this.notePosition === null) {// TODO finding new position can be refactored into becca@@ -177,7 +192,7 @@ module.exports = Branch;</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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/becca_entities_note.js.html b/docs/backend_api/becca_entities_note.js.htmlindex 888251975d..a166351539 100644--- a/docs/backend_api/becca_entities_note.js.html+++ b/docs/backend_api/becca_entities_note.js.html@@ -40,6 +40,9 @@ const NoteRevision = require("./note_revision.js");const LABEL = 'label';const RELATION = 'relation';+/**+ * Trilium's main entity which can represent text note, image, code note, file attachment etc.+ */class Note extends AbstractEntity {static get entityName() { return "notes"; }static get primaryKeyName() { return "noteId"; }@@ -73,68 +76,80 @@ class Note extends AbstractEntity {update([noteId, title, type, mime, isProtected, dateCreated, dateModified, utcDateCreated, utcDateModified]) {// ------ Database persisted attributes ------- /** @param {string} */+ /** @type {string} */this.noteId = noteId;- /** @param {string} */+ /** @type {string} */this.title = title;- /** @param {boolean} */+ /** @type {boolean} */this.isProtected = !!isProtected;- /** @param {string} */+ /** @type {string} */this.type = type;- /** @param {string} */+ /** @type {string} */this.mime = mime;- /** @param {string} */+ /** @type {string} */this.dateCreated = dateCreated || dateUtils.localNowDateTime();- /** @param {string} */+ /** @type {string} */this.dateModified = dateModified;- /** @param {string} */+ /** @type {string} */this.utcDateCreated = utcDateCreated || dateUtils.utcNowDateTime();- /** @param {string} */+ /** @type {string} */this.utcDateModified = utcDateModified;// ------ Derived attributes ------- /** @param {boolean} */- this.isDecrypted = !this.isProtected;+ /** @type {boolean} */+ this.isDecrypted = !this.noteId || !this.isProtected;this.decrypt();- /** @param {string|null} */+ /** @type {string|null} */this.flatTextCache = null;return this;}init() {- /** @param {Branch[]} */+ /** @type {Branch[]} */this.parentBranches = [];- /** @param {Note[]} */+ /** @type {Note[]} */this.parents = [];- /** @param {Note[]} */+ /** @type {Note[]} */this.children = [];- /** @param {Attribute[]} */+ /** @type {Attribute[]} */this.ownedAttributes = [];- /** @param {Attribute[]|null} */+ /** @type {Attribute[]|null}+ * @private */this.__attributeCache = null;- /** @param {Attribute[]|null} */+ /** @type {Attribute[]|null}+ * @private*/this.inheritableAttributeCache = null;- /** @param {Attribute[]} */+ /** @type {Attribute[]} */this.targetRelations = [];- this.becca.notes[this.noteId] = this;+ this.becca.addNote(this.noteId, this);- /** @param {Note[]|null} */+ /** @type {Note[]|null}+ * @private */this.ancestorCache = null;// following attributes are filled during searching from database- /** @param {int} size of the content in bytes */+ /**+ * size of the content in bytes+ * @type {int|null}+ */this.contentSize = null;- /** @param {int} size of the content and note revision contents in bytes */+ /**+ * size of the content and note revision contents in bytes+ * @type {int|null}+ */this.noteSize = null;- /** @param {int} number of note revisions for this note */+ /**+ * number of note revisions for this note+ * @type {int|null}+ */this.revisionCount = null;}@@ -144,26 +159,32 @@ class Note extends AbstractEntity {|| protectedSessionService.isProtectedSessionAvailable()}+ /** @returns {Branch[]} */getParentBranches() {return this.parentBranches;}+ /** @returns {Branch[]} */getBranches() {return this.parentBranches;}+ /** @returns {Note[]} */getParentNotes() {return this.parents;}+ /** @returns {Note[]} */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));}@@ -398,7 +419,7 @@ class Note extends AbstractEntity {return this.__attributeCache;}- /** @return {Attribute[]} */+ /** @returns {Attribute[]} */__getInheritableAttributes(path) {if (path.includes(this.noteId)) {return [];@@ -639,7 +660,7 @@ class Note extends AbstractEntity {// 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() {+ sortParents() {this.parentBranches.sort((a, b) =>a.branchId.startsWith('virt-')|| a.parentNote.hasInheritableOwnedArchivedLabel() ? 1 : -1);@@ -749,28 +770,38 @@ class Note extends AbstractEntity {return !!this.targetRelations.find(rel => rel.name === 'template');}- /** @return {Note[]} */+ /** @returns {Note[]} */getSubtreeNotesIncludingTemplated() {- const arr = [[this]];+ const set = new Set();- for (const childNote of this.children) {- arr.push(childNote.getSubtreeNotesIncludingTemplated());- }+ function inner(note) {+ if (set.has(note)) {+ return;+ }- for (const targetRelation of this.targetRelations) {- if (targetRelation.name === 'template') {- const note = targetRelation.note;+ set.add(note);- if (note) {- arr.push(note.getSubtreeNotesIncludingTemplated());+ 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);+ }}}}- return arr.flat();+ inner(this);++ return Array.from(set);}- /** @return {Note[]} */+ /** @returns {Note[]} */getSubtreeNotes(includeArchived = true) {const noteSet = new Set();@@ -791,9 +822,9 @@ class Note extends AbstractEntity {return Array.from(noteSet);}- /** @return {String[]} */- getSubtreeNoteIds() {- return this.getSubtreeNotes().map(note => note.noteId);+ /** @returns {String[]} */+ getSubtreeNoteIds(includeArchived = true) {+ return this.getSubtreeNotes(includeArchived).map(note => note.noteId);}getDescendantNoteIds() {@@ -848,6 +879,7 @@ class Note extends AbstractEntity {return this.getAttributes().length;}+ /** @returns {Note[]} */getAncestors() {if (!this.ancestorCache) {const noteIds = new Set();@@ -871,11 +903,22 @@ class Note extends AbstractEntity {return this.ancestorCache;}+ /** @returns {boolean} */+ hasAncestor(ancestorNoteId) {+ for (const ancestorNote of this.getAncestors()) {+ if (ancestorNote.noteId === ancestorNoteId) {+ return true;+ }+ }++ return false;+ }+getTargetRelations() {return this.targetRelations;}- /** @return {Note[]} - returns only notes which are templated, does not include their subtrees+ /** @returns {Note[]} - 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];@@ -1112,10 +1155,14 @@ class Note extends AbstractEntity {}}+ get isDeleted() {+ return !(this.noteId in this.becca.notes);+ }+beforeSaving() {super.beforeSaving();- this.becca.notes[this.noteId] = this;+ this.becca.addNote(this.noteId, this);this.dateModified = dateUtils.localNowDateTime();this.utcDateModified = dateUtils.utcNowDateTime();@@ -1164,7 +1211,7 @@ module.exports = Note;</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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/becca_entities_note_revision.js.html b/docs/backend_api/becca_entities_note_revision.js.htmlindex 63a014b978..cd16ba839d 100644--- a/docs/backend_api/becca_entities_note_revision.js.html+++ b/docs/backend_api/becca_entities_note_revision.js.html@@ -37,7 +37,8 @@ const entityChangesService = require('../../services/entity_changes');const AbstractEntity = require("./abstract_entity.js");/**- * NoteRevision represents snapshot of note's title and content at some point in the past. It's used for seamless note versioning.+ * NoteRevision represents snapshot of note's title and content at some point in the past.+ * It's used for seamless note versioning.*/class NoteRevision extends AbstractEntity {static get entityName() { return "note_revisions"; }@@ -47,29 +48,29 @@ class NoteRevision extends AbstractEntity {constructor(row) {super();- /** @param {string} */+ /** @type {string} */this.noteRevisionId = row.noteRevisionId;- /** @param {string} */+ /** @type {string} */this.noteId = row.noteId;- /** @param {string} */+ /** @type {string} */this.type = row.type;- /** @param {string} */+ /** @type {string} */this.mime = row.mime;- /** @param {boolean} */+ /** @type {boolean} */this.isProtected = !!row.isProtected;- /** @param {string} */+ /** @type {string} */this.title = row.title;- /** @param {string} */+ /** @type {string} */this.dateLastEdited = row.dateLastEdited;- /** @param {string} */+ /** @type {string} */this.dateCreated = row.dateCreated;- /** @param {string} */+ /** @type {string} */this.utcDateLastEdited = row.utcDateLastEdited;- /** @param {string} */+ /** @type {string} */this.utcDateCreated = row.utcDateCreated;- /** @param {string} */+ /** @type {string} */this.utcDateModified = row.utcDateModified;- /** @param {number} */+ /** @type {number} */this.contentLength = row.contentLength;if (this.isProtected) {@@ -77,7 +78,7 @@ class NoteRevision extends AbstractEntity {this.title = protectedSessionService.decryptString(this.title);}else {- this.title = "[Protected]";+ this.title = "[protected]";}}}@@ -194,12 +195,14 @@ class NoteRevision extends AbstractEntity {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 persisteddelete pojo.contentLength; // not getting persistedif (pojo.isProtected) {@@ -227,7 +230,7 @@ module.exports = NoteRevision;</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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/becca_entities_option.js.html b/docs/backend_api/becca_entities_option.js.htmlindex 1a5c269d88..c9cc7ae32d 100644--- a/docs/backend_api/becca_entities_option.js.html+++ b/docs/backend_api/becca_entities_option.js.html@@ -42,9 +42,13 @@ class Option extends AbstractEntity {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;@@ -79,7 +83,7 @@ module.exports = Option;</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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/becca_entities_recent_note.js.html b/docs/backend_api/becca_entities_recent_note.js.htmlindex ea9a1fae35..627f16937e 100644--- a/docs/backend_api/becca_entities_recent_note.js.html+++ b/docs/backend_api/becca_entities_recent_note.js.html@@ -41,8 +41,11 @@ class RecentNote extends AbstractEntity {constructor(row) {super();+ /** @type {string} */this.noteId = row.noteId;+ /** @type {string} */this.notePath = row.notePath;+ /** @type {string} */this.utcDateCreated = row.utcDateCreated || dateUtils.utcNowDateTime();}@@ -66,7 +69,7 @@ module.exports = RecentNote;</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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/entities_api_token.js.html b/docs/backend_api/entities_api_token.js.htmldeleted file mode 100644index 01d3dd10ac..0000000000--- a/docs/backend_api/entities_api_token.js.html+++ /dev/null@@ -1,84 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/api_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: entities/api_token.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const Entity = require('./entity');-const dateUtils = require('../services/date_utils');--/**- * ApiToken is an entity representing token used to authenticate against Trilium API from client applications. Currently used only by Trilium Sender.- *- * @property {string} apiTokenId - primary key- * @property {string} token- * @property {boolean} isDeleted - true if API token is deleted- * @property {string} utcDateCreated- *- * @extends Entity- */-class ApiToken extends Entity {- static get entityName() { return "api_tokens"; }- static get primaryKeyName() { return "apiTokenId"; }- static get hashedProperties() { return ["apiTokenId", "token", "utcDateCreated", "isDeleted"]; }-- beforeSaving() {- if (!this.isDeleted) {- this.isDeleted = false;- }-- if (!this.utcDateCreated) {- this.utcDateCreated = dateUtils.utcNowDateTime();- }-- super.beforeSaving();- }-}--module.exports = ApiToken;</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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 3.6.6</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/entities_attribute.js.html b/docs/backend_api/entities_attribute.js.htmldeleted file mode 100644index 4485a8aa56..0000000000--- a/docs/backend_api/entities_attribute.js.html+++ /dev/null@@ -1,175 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/attribute.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/attribute.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";---const Entity = require('./entity');-const dateUtils = require('../services/date_utils');-const sql = require('../services/sql');-const promotedAttributeDefinitionParser = require("../services/promoted_attribute_definition_parser");--/**- * Attribute is key value pair owned by a note.- *- * @property {string} attributeId - immutable- * @property {string} noteId - immutable- * @property {string} type - immutable- * @property {string} name - immutable- * @property {string} value- * @property {int} position- * @property {boolean} isInheritable - immutable- * @property {boolean} isDeleted- * @property {string|null} deleteId - ID identifying delete transaction- * @property {string} utcDateModified- *- * @extends Entity- */-class Attribute extends Entity {- static get entityName() { return "attributes"; }- static get primaryKeyName() { return "attributeId"; }- static get hashedProperties() { return ["attributeId", "noteId", "type", "name", "value", "isInheritable", "isDeleted"]; }-- constructor(row) {- super(row);-- this.isInheritable = !!this.isInheritable;- }-- isAutoLink() {- return this.type === 'relation' && ['internalLink', 'imageLink', 'relationMapLink', 'includeNoteLink'].includes(this.name);- }-- /**- * @returns {Note|null}- */- getNote() {- return this.repository.getNote(this.noteId);- }-- /**- * @returns {Note|null}- */- getTargetNote() {- if (this.type !== 'relation') {- throw new Error(`Attribute ${this.attributeId} is not relation`);- }-- if (!this.value) {- return null;- }-- return this.repository.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;- }- }-- beforeSaving() {- if (!this.value) {- if (this.type === 'relation') {- throw new Error(`Cannot save relation ${this.name} since it does not target any note.`);- }-- // null value isn't allowed- this.value = "";- }-- if (this.position === undefined) {- this.position = 1 + sql.getValue(`SELECT COALESCE(MAX(position), 0) FROM attributes WHERE noteId = ?`, [this.noteId]);- }-- if (!this.isInheritable) {- this.isInheritable = false;- }-- if (!this.isDeleted) {- this.isDeleted = false;- }-- super.beforeSaving();-- this.utcDateModified = dateUtils.utcNowDateTime();- }-- createClone(type, name, value, isInheritable) {- return new Attribute({- noteId: this.noteId,- type: type,- name: name,- value: value,- position: this.position,- isInheritable: isInheritable,- isDeleted: false,- utcDateModified: this.utcDateModified- });- }-}--module.exports = Attribute;-</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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 3.6.6</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/entities_branch.js.html b/docs/backend_api/entities_branch.js.htmldeleted file mode 100644index 6c28da4f8e..0000000000--- a/docs/backend_api/entities_branch.js.html+++ /dev/null@@ -1,128 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/branch.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/branch.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const Entity = require('./entity');-const dateUtils = require('../services/date_utils');-const sql = require('../services/sql');--/**- * Branch represents note's placement in the tree - it's essentially pair of noteId and parentNoteId.- * Each note can have multiple (at least one) branches, meaning it can be placed into multiple places in the tree.- *- * @property {string} branchId - primary key, immutable- * @property {string} noteId - immutable- * @property {string} parentNoteId - immutable- * @property {int} notePosition- * @property {string} prefix- * @property {boolean} isExpanded- * @property {boolean} isDeleted- * @property {string|null} deleteId - ID identifying delete transaction- * @property {string} utcDateModified- * @property {string} utcDateCreated- *- * @extends Entity- */-class Branch extends Entity {- 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", "isDeleted", "deleteId", "prefix"]; }-- /** @returns {Note|null} */- getNote() {- return this.repository.getNote(this.noteId);- }-- /** @returns {Note|null} */- getParentNote() {- return this.repository.getNote(this.parentNoteId);- }-- beforeSaving() {- if (this.notePosition === undefined || this.notePosition === null) {- const maxNotePos = sql.getValue('SELECT MAX(notePosition) FROM branches WHERE parentNoteId = ? AND isDeleted = 0', [this.parentNoteId]);- this.notePosition = maxNotePos === null ? 0 : maxNotePos + 10;- }-- if (!this.isExpanded) {- this.isExpanded = false;- }-- if (!this.isDeleted) {- this.isDeleted = false;- }-- if (!this.utcDateCreated) {- this.utcDateCreated = dateUtils.utcNowDateTime();- }-- super.beforeSaving();-- this.utcDateModified = dateUtils.utcNowDateTime();- }-- createClone(parentNoteId, notePosition) {- return new Branch({- noteId: this.noteId,- parentNoteId: parentNoteId,- notePosition: notePosition,- prefix: this.prefix,- isExpanded: this.isExpanded,- isDeleted: false,- utcDateCreated: this.utcDateCreated,- utcDateModified: this.utcDateModified- });- }-}--module.exports = Branch;-</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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 3.6.6</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/entities_entity.js.html b/docs/backend_api/entities_entity.js.htmldeleted file mode 100644index c6a8b1dcb1..0000000000--- a/docs/backend_api/entities_entity.js.html+++ /dev/null@@ -1,113 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/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: entities/entity.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const utils = require('../services/utils');-let repo = null;--class Entity {- /**- * @param {object} [row] - database row representing given entity- */- constructor(row = {}) {- for (const key in row) {- // ! is used when joint-fetching notes and note_contents objects for performance- if (!key.startsWith('!')) {- this[key] = row[key];- }- }-- if ('isDeleted' in this && this.constructor.entityName !== 'recent_notes') {- this.isDeleted = !!this.isDeleted;- }- }-- beforeSaving() {- this.generateIdIfNecessary();- }-- generateIdIfNecessary() {- if (!this[this.constructor.primaryKeyName]) {- this[this.constructor.primaryKeyName] = utils.newEntityId();- }- }-- generateHash() {- let contentToHash = "";-- for (const propertyName of this.constructor.hashedProperties) {- contentToHash += "|" + this[propertyName];- }-- return utils.hash(contentToHash).substr(0, 10);- }-- getUtcDateChanged() {- return this.utcDateModified || this.utcDateCreated;- }-- get repository() {- if (!repo) {- repo = require('../services/repository');- }-- return repo;- }-- save() {- this.repository.updateEntity(this);-- return this;- }-}--module.exports = Entity;-</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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 3.6.6</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/entities_image.js.html b/docs/backend_api/entities_image.js.htmldeleted file mode 100644index 8ef53d133f..0000000000--- a/docs/backend_api/entities_image.js.html+++ /dev/null@@ -1,92 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/image.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/image.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const Entity = require('./entity');-const dateUtils = require('../services/date_utils');--/**- * This class represents image data.- *- * @param {string} imageId- * @param {string} format- * @param {string} checksum- * @param {string} name- * @param {blob} data- * @param {boolean} isDeleted- * @param {string} dateModified- * @param {string} dateCreated- *- * @extends Entity- */-class Image extends Entity {- static get entityName() { return "images"; }- static get primaryKeyName() { return "imageId"; }- static get hashedProperties() { return ["imageId", "format", "checksum", "name", "isDeleted", "dateCreated"]; }-- beforeSaving() {- if (!this.isDeleted) {- this.isDeleted = false;- }-- if (!this.dateCreated) {- this.dateCreated = dateUtils.nowDate();- }-- super.beforeSaving();-- if (this.isChanged) {- this.dateModified = dateUtils.nowDate();- }- }-}--module.exports = Image;</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Image.html">Image</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteImage.html">NoteImage</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Oct 07 2018 16:26:59 GMT+0200 (CEST)-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/entities_link.js.html b/docs/backend_api/entities_link.js.htmldeleted file mode 100644index b4f0f1376c..0000000000--- a/docs/backend_api/entities_link.js.html+++ /dev/null@@ -1,101 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/link.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/link.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const Entity = require('./entity');-const repository = require('../services/repository');-const dateUtils = require('../services/date_utils');--/**- * This class represents link from one note to another in the form of hyperlink or image reference. Note that- * this is different concept than attribute/relation.- *- * @param {string} linkId- * @param {string} noteId- * @param {string} targetNoteId- * @param {string} type- * @param {boolean} isDeleted- * @param {string} utcDateModified- * @param {string} utcDateCreated- *- * @extends Entity- */-class Link extends Entity {- static get entityName() { return "links"; }- static get primaryKeyName() { return "linkId"; }- static get hashedProperties() { return ["linkId", "noteId", "targetNoteId", "type", "isDeleted", "utcDateCreated", "utcDateModified"]; }-- async getNote() {- return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);- }-- async getTargetNote() {- return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.targetNoteId]);- }-- beforeSaving() {- if (!this.isDeleted) {- this.isDeleted = false;- }-- if (!this.utcDateCreated) {- this.utcDateCreated = dateUtils.utcNowDateTime();- }-- super.beforeSaving();-- if (this.isChanged) {- this.utcDateModified = dateUtils.utcNowDateTime();- }- }-}--module.exports = Link;</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Link.html">Link</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/entities_note.js.html b/docs/backend_api/entities_note.js.htmldeleted file mode 100644index 1e1e264825..0000000000--- a/docs/backend_api/entities_note.js.html+++ /dev/null@@ -1,993 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/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: entities/note.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const Entity = require('./entity');-const Attribute = require('./attribute');-const protectedSessionService = require('../services/protected_session');-const sql = require('../services/sql');-const utils = require('../services/utils');-const dateUtils = require('../services/date_utils');-const entityChangesService = require('../services/entity_changes.js');--const LABEL = 'label';-const RELATION = 'relation';--/**- * This represents a Note which is a central object in the Trilium Notes project.- *- * @property {string} noteId - primary key- * @property {string} type - one of "text", "code", "file" or "render"- * @property {string} mime - MIME type, e.g. "text/html"- * @property {string} title - note title- * @property {boolean} isProtected - true if note is protected- * @property {boolean} isDeleted - true if note is deleted- * @property {string|null} deleteId - ID identifying delete transaction- * @property {string} dateCreated - local date time (with offset)- * @property {string} dateModified - local date time (with offset)- * @property {string} utcDateCreated- * @property {string} utcDateModified- *- * @extends Entity- */-class Note extends Entity {- static get entityName() { return "notes"; }- static get primaryKeyName() { return "noteId"; }- static get hashedProperties() { return ["noteId", "title", "type", "mime", "isProtected", "isDeleted", "deleteId"]; }-- /**- * @param row - object containing database row from "notes" table- */- constructor(row) {- super(row);-- this.isProtected = !!this.isProtected;- /* true if content is either not encrypted- * or encrypted, but with available protected session (so effectively decrypted) */- this.isContentAvailable = true;-- // check if there's noteId, otherwise this is a new entity which wasn't encrypted yet- if (this.isProtected && this.noteId) {- this.isContentAvailable = protectedSessionService.isProtectedSessionAvailable();-- if (this.isContentAvailable) {- try {- this.title = protectedSessionService.decryptString(this.title);- }- catch (e) {- throw new Error(`Could not decrypt title of note ${this.noteId}: ${e.message} ${e.stack}`)- }- }- else {- this.title = "[protected]";- }- }- }-- /*- * 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) {- if (this.content === undefined) {- 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);- }- }-- this.content = row.content;-- if (this.isProtected) {- if (this.isContentAvailable) {- this.content = this.content === null ? null : protectedSessionService.decrypt(this.content);- }- else {- this.content = "";- }- }- }-- if (this.isStringNote()) {- return this.content === null- ? ""- : this.content.toString("UTF-8");- }- else {- return this.content;- }- }-- /** @returns {{contentLength, dateModified, utcDateModified}} */- getContentMetadata() {- return sql.getRow(`- SELECT- LENGTH(content) AS contentLength,- dateModified,- utcDateModified- FROM note_contents- WHERE noteId = ?`, [this.noteId]);- }-- /** @returns {*} */- getJsonContent() {- const content = this.getContent();-- if (!content || !content.trim()) {- return null;- }-- return JSON.parse(content);- }-- setContent(content) {- 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);- }-- this.content = content;-- const pojo = {- noteId: this.noteId,- content: content,- dateModified: dateUtils.localNowDateTime(),- utcDateModified: dateUtils.utcNowDateTime()- };-- if (this.isProtected) {- if (this.isContentAvailable) {- pojo.content = protectedSessionService.encrypt(pojo.content);- }- else {- 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- }, null);- }-- 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.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 {boolean} true if the note has string content (not binary) */- isStringNote() {- return utils.isStringNote(this.type, this.mime);- }-- /** @returns {string} 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;- }-- loadOwnedAttributesToCache() {- this.__ownedAttributeCache = this.repository.getEntities(`SELECT * FROM attributes WHERE isDeleted = 0 AND noteId = ?`, [this.noteId]);- return this.__ownedAttributeCache;- }-- /**- * This method is a faster variant of getAttributes() which looks for only owned attributes.- * Use when inheritance is not needed and/or in batch/performance sensitive operations.- *- * @param {string} [type] - (optional) attribute type to filter- * @param {string} [name] - (optional) attribute name to filter- * @returns {Attribute[]} note's "owned" attributes - excluding inherited ones- */- getOwnedAttributes(type, name) {- if (!this.__ownedAttributeCache) {- this.loadOwnedAttributesToCache();- }-- if (type && name) {- return this.__ownedAttributeCache.filter(attr => attr.type === type && attr.name === name);- }- else if (type) {- return this.__ownedAttributeCache.filter(attr => attr.type === type);- }- else if (name) {- return this.__ownedAttributeCache.filter(attr => attr.name === name);- }- else {- return this.__ownedAttributeCache.slice();- }- }-- /**- * @returns {Attribute} attribute belonging to this specific note (excludes inherited attributes)- *- * This method can be significantly faster than the getAttribute()- */- getOwnedAttribute(type, name) {- const attrs = this.getOwnedAttributes(type, name);-- return attrs.length > 0 ? attrs[0] : null;- }-- /**- * @returns {Attribute[]} relations targetting this specific note- */- getTargetRelations() {- return this.repository.getEntities("SELECT * FROM attributes WHERE type = 'relation' AND isDeleted = 0 AND value = ?", [this.noteId]);- }-- /**- * @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) {- if (!this.__attributeCache) {- this.loadAttributesToCache();- }-- 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 {- return this.__attributeCache.slice();- }- }-- /**- * @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 {Attribute[]} all note's labels (attributes with type label), excluding inherited ones- */- getOwnedLabels(name) {- return this.getOwnedAttributes(LABEL, name);- }-- /**- * @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} [name] - relation name to filter- * @returns {Note[]}- */- getRelationTargets(name) {- const relations = this.getRelations(name);- const targets = [];-- for (const relation of relations) {- targets.push(relation.getTargetNote());- }-- return targets;- }-- /**- * Clear note's attributes cache to force fresh reload for next attribute request.- * Cache is note instance scoped.- */- invalidateAttributeCache() {- this.__attributeCache = null;- this.__ownedAttributeCache = null;- }-- loadAttributesToCache() {- const attributes = this.repository.getEntities(`- WITH RECURSIVE- tree(noteId, level) AS (- SELECT ?, 0- UNION- SELECT branches.parentNoteId, tree.level + 1- FROM branches- JOIN tree ON branches.noteId = tree.noteId- WHERE branches.isDeleted = 0- ),- treeWithAttrs(noteId, level) AS (- SELECT * FROM tree- UNION- SELECT attributes.value, treeWithAttrs.level FROM attributes- JOIN treeWithAttrs ON treeWithAttrs.noteId = attributes.noteId- WHERE attributes.isDeleted = 0- AND attributes.type = 'relation'- AND attributes.name = 'template'- )- SELECT attributes.* FROM attributes JOIN treeWithAttrs ON attributes.noteId = treeWithAttrs.noteId- WHERE attributes.isDeleted = 0 AND (attributes.isInheritable = 1 OR treeWithAttrs.level = 0)- ORDER BY level, noteId, position`, [this.noteId]);- // attributes are ordered so that "closest" attributes are first- // we order by noteId so that attributes from same note stay together. Actual noteId ordering doesn't matter.-- const filteredAttributes = attributes.filter((attr, index) => {- // if this exact attribute already appears then don't include it (can happen via cloning)- if (attributes.findIndex(it => it.attributeId === attr.attributeId) !== index) {- return false;- }-- // FIXME: this code is quite questionable, one problem is that other caches (Froca, Becca) have nothing like that- if (attr.isDefinition()) {- const firstDefinitionIndex = attributes.findIndex(el => el.type === attr.type && el.name === attr.name);-- // keep only if this element is the first definition for this type & name- return firstDefinitionIndex === index;- }- else {- const definitionAttr = attributes.find(el => el.type === 'label' && el.name === attr.type + ':' + attr.name);-- if (!definitionAttr) {- return true;- }-- const definition = definitionAttr.getDefinition();-- if (definition.multiplicity === 'multi') {- return true;- }- else {- const firstAttrIndex = attributes.findIndex(el => el.type === attr.type && el.name === attr.name);-- // in case of single-valued attribute we'll keep it only if it's first (closest)- return firstAttrIndex === index;- }- }- });-- this.__attributeCache = filteredAttributes;- }-- /**- * @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 (excluding inherited)- */- hasOwnedAttribute(type, name) {- return !!this.getOwnedAttribute(type, name);- }-- /**- * @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;- }-- /**- * 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);- }- }-- /**- * 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.loadOwnedAttributesToCache();- let attr = attributes.find(attr => attr.type === type && attr.name === name);-- if (attr) {- if (attr.value !== value) {- attr.value = value;- attr.save();-- this.invalidateAttributeCache();- }- }- else {- attr = new Attribute({- noteId: this.noteId,- type: type,- name: name,- value: value !== undefined ? value : ""- });-- attr.save();-- this.invalidateAttributeCache();- }- }-- /**- * 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.loadOwnedAttributesToCache();-- for (const attribute of attributes) {- if (attribute.type === type && attribute.name === name && (value === undefined || value === attribute.value)) {- attribute.isDeleted = true;- attribute.save();-- this.invalidateAttributeCache();- }- }- }-- /**- * @return {Attribute}- */- addAttribute(type, name, value = "", isInheritable = false, position = 1000) {- const attr = new Attribute({- noteId: this.noteId,- type: type,- name: name,- value: value,- isInheritable: isInheritable,- position: position- });-- attr.save();-- this.invalidateAttributeCache();-- return attr;- }-- addLabel(name, value = "", isInheritable = false) {- return this.addAttribute(LABEL, name, value, isInheritable);- }-- addRelation(name, targetNoteId, isInheritable = false) {- return this.addAttribute(RELATION, name, targetNoteId, isInheritable);- }-- /**- * @param {string} name - label name- * @returns {boolean} true if label exists (including inherited)- */- hasLabel(name) { return this.hasAttribute(LABEL, name); }-- /**- * @param {string} name - label name- * @returns {boolean} true if label exists (excluding inherited)- */- hasOwnedLabel(name) { return this.hasOwnedAttribute(LABEL, name); }-- /**- * @param {string} name - relation name- * @returns {boolean} true if relation exists (including inherited)- */- hasRelation(name) { return this.hasAttribute(RELATION, name); }-- /**- * @param {string} name - relation name- * @returns {boolean} true if relation exists (excluding inherited)- */- hasOwnedRelation(name) { return this.hasOwnedAttribute(RELATION, name); }-- /**- * @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} name- * @returns {Note|null} target note of the relation or null (if target is empty or note was not found)- */- getRelationTarget(name) {- const relation = this.getRelation(name);-- return relation ? this.repository.getNote(relation.value) : null;- }-- /**- * @param {string} name- * @returns {Note|null} target note of the relation or null (if target is empty or note was not found)- */- getOwnedRelationTarget(name) {- const relation = this.getOwnedRelation(name);-- return relation ? this.repository.getNote(relation.value) : null;- }-- /**- * 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); }-- /**- * @return {string[]} return list of all descendant noteIds of this note. Returning just noteIds because number of notes can be huge. Includes also this note's noteId- */- getDescendantNoteIds() {- return sql.getColumn(`- WITH RECURSIVE- tree(noteId) AS (- SELECT ?- UNION- SELECT branches.noteId FROM branches- JOIN tree ON branches.parentNoteId = tree.noteId- JOIN notes ON notes.noteId = branches.noteId- WHERE notes.isDeleted = 0- AND branches.isDeleted = 0- )- SELECT noteId FROM tree`, [this.noteId]);- }-- /**- * Finds descendant notes with given attribute name and value. Only own attributes are considered, not inherited ones- *- * @param {string} type - attribute type (label, relation, etc.)- * @param {string} name - attribute name- * @param {string} [value] - attribute value- * @returns {Note[]}- */- getDescendantNotesWithAttribute(type, name, value) {- const params = [this.noteId, name];- let valueCondition = "";-- if (value !== undefined) {- params.push(value);- valueCondition = " AND attributes.value = ?";- }-- const notes = this.repository.getEntities(`- WITH RECURSIVE- tree(noteId) AS (- SELECT ?- UNION- SELECT branches.noteId FROM branches- JOIN tree ON branches.parentNoteId = tree.noteId- JOIN notes ON notes.noteId = branches.noteId- WHERE notes.isDeleted = 0- AND branches.isDeleted = 0- )- SELECT notes.* FROM notes- JOIN tree ON tree.noteId = notes.noteId- JOIN attributes ON attributes.noteId = notes.noteId- WHERE attributes.isDeleted = 0- AND attributes.name = ?- ${valueCondition}- ORDER BY noteId, position`, params);-- return notes;- }-- /**- * Finds descendant notes with given label name and value. Only own labels are considered, not inherited ones- *- * @param {string} name - label name- * @param {string} [value] - label value- * @returns {Note[]}- */- getDescendantNotesWithLabel(name, value) { return this.getDescendantNotesWithAttribute(LABEL, name, value); }-- /**- * Finds descendant notes with given relation name and value. Only own relations are considered, not inherited ones- *- * @param {string} name - relation name- * @param {string} [value] - relation value- * @returns {Note[]}- */- getDescendantNotesWithRelation(name, value) { return this.getDescendantNotesWithAttribute(RELATION, name, value); }-- /**- * Returns note revisions of this note.- *- * @returns {NoteRevision[]}- */- getRevisions() {- return this.repository.getEntities("SELECT * FROM note_revisions WHERE noteId = ?", [this.noteId]);- }-- /**- * Get list of links coming out of this note.- *- * @deprecated - not intended for general use- * @returns {Attribute[]}- */- getLinks() {- return this.repository.getEntities(`- SELECT *- FROM attributes- WHERE noteId = ? AND- isDeleted = 0 AND- type = 'relation' AND- name IN ('internalLink', 'imageLink', 'relationMapLink', 'includeNoteLink')`, [this.noteId]);- }-- /**- * @returns {Branch[]}- */- getBranches() {- return this.repository.getEntities("SELECT * FROM branches WHERE isDeleted = 0 AND noteId = ?", [this.noteId]);- }-- /**- * @returns {boolean} - true if note has children- */- hasChildren() {- return this.getChildNotes().length > 0;- }-- /**- * @returns {Note[]} child notes of this note- */- getChildNotes() {- return this.repository.getEntities(`- SELECT notes.*- FROM branches- JOIN notes USING(noteId)- WHERE notes.isDeleted = 0- AND branches.isDeleted = 0- AND branches.parentNoteId = ?- ORDER BY branches.notePosition`, [this.noteId]);- }-- /**- * @returns {Branch[]} child branches of this note- */- getChildBranches() {- return this.repository.getEntities(`- SELECT branches.*- FROM branches- WHERE branches.isDeleted = 0- AND branches.parentNoteId = ?- ORDER BY branches.notePosition`, [this.noteId]);- }-- /**- * @returns {Note[]} parent notes of this note (note can have multiple parents because of cloning)- */- getParentNotes() {- return this.repository.getEntities(`- SELECT parent_notes.*- FROM- branches AS child_tree- JOIN notes AS parent_notes ON parent_notes.noteId = child_tree.parentNoteId- WHERE child_tree.noteId = ?- AND child_tree.isDeleted = 0- AND parent_notes.isDeleted = 0`, [this.noteId]);- }-- /**- * @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;- }-- getRelationDefinitions() {- return this.getLabels()- .filter(l => l.name.startsWith("relation:"));- }-- getLabelDefinitions() {- return this.getLabels()- .filter(l => l.name.startsWith("relation:"));- }-- /**- * @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));- }-- beforeSaving() {- if (!this.isDeleted) {- this.isDeleted = false;- }-- if (!this.dateCreated) {- this.dateCreated = dateUtils.localNowDateTime();- }-- if (!this.utcDateCreated) {- this.utcDateCreated = dateUtils.utcNowDateTime();- }-- super.beforeSaving();-- this.dateModified = dateUtils.localNowDateTime();- this.utcDateModified = dateUtils.utcNowDateTime();- }-- // cannot be static!- updatePojo(pojo) {- if (pojo.isProtected) {- if (this.isContentAvailable) {- pojo.title = protectedSessionService.encrypt(pojo.title);- }- else {- // updating protected note outside of protected session means we will keep original ciphertexts- delete pojo.title;- }- }-- delete pojo.isContentAvailable;- delete pojo.__attributeCache;- delete pojo.__ownedAttributeCache;- delete pojo.content;- /** zero references to contentHash, probably can be removed */- delete pojo.contentHash;- }-}--module.exports = Note;-</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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 3.6.6</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/entities_note_image.js.html b/docs/backend_api/entities_note_image.js.htmldeleted file mode 100644index 67990ae637..0000000000--- a/docs/backend_api/entities_note_image.js.html+++ /dev/null@@ -1,99 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/note_image.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/note_image.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const Entity = require('./entity');-const repository = require('../services/repository');-const dateUtils = require('../services/date_utils');--/**- * This class represents image's placement in the note(s). One image may be placed into several notes.- *- * @param {string} noteImageId- * @param {string} noteId- * @param {string} imageId- * @param {boolean} isDeleted- * @param {string} dateModified- * @param {string} dateCreated- *- * @extends Entity- */-class NoteImage extends Entity {- static get entityName() { return "note_images"; }- static get primaryKeyName() { return "noteImageId"; }- static get hashedProperties() { return ["noteImageId", "noteId", "imageId", "isDeleted", "dateCreated"]; }-- async getNote() {- return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);- }-- async getImage() {- return await repository.getEntity("SELECT * FROM images WHERE imageId = ?", [this.imageId]);- }-- beforeSaving() {- if (!this.isDeleted) {- this.isDeleted = false;- }-- if (!this.dateCreated) {- this.dateCreated = dateUtils.nowDate();- }-- super.beforeSaving();-- if (this.isChanged) {- this.dateModified = dateUtils.nowDate();- }- }-}--module.exports = NoteImage;</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Image.html">Image</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteImage.html">NoteImage</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Oct 07 2018 16:26:59 GMT+0200 (CEST)-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/entities_note_revision.js.html b/docs/backend_api/entities_note_revision.js.htmldeleted file mode 100644index f42910fcc4..0000000000--- a/docs/backend_api/entities_note_revision.js.html+++ /dev/null@@ -1,204 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/note_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: entities/note_revision.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const Entity = require('./entity');-const protectedSessionService = require('../services/protected_session');-const utils = require('../services/utils');-const sql = require('../services/sql');-const dateUtils = require('../services/date_utils');-const entityChangesService = require('../services/entity_changes.js');--/**- * NoteRevision represents snapshot of note's title and content at some point in the past. It's used for seamless note versioning.- *- * @property {string} noteRevisionId- * @property {string} noteId- * @property {string} type- * @property {string} mime- * @property {string} title- * @property {boolean} isProtected- * @property {string} dateLastEdited- * @property {string} dateCreated- * @property {string} utcDateLastEdited- * @property {string} utcDateCreated- * @property {string} utcDateModified- *- * @extends Entity- */-class NoteRevision extends Entity {- 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) {- super(row);-- this.isProtected = !!this.isProtected;-- if (this.isProtected) {- if (protectedSessionService.isProtectedSessionAvailable()) {- this.title = protectedSessionService.decryptString(this.title);- }- else {- this.title = "[Protected]";- }- }- }-- getNote() {- return this.repository.getNote(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 it's 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) {- if (this.content === undefined) {- 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);- }- }-- this.content = res.content;- if (this.isProtected) {- if (protectedSessionService.isProtectedSessionAvailable()) {- this.content = protectedSessionService.decrypt(this.content);- }- else {- this.content = "";- }- }- }-- if (this.isStringNote()) {- return this.content === null- ? ""- : this.content.toString("UTF-8");- }- else {- return this.content;- }- }-- setContent(content) {- this.content = content;-- const pojo = {- noteRevisionId: this.noteRevisionId,- content: content,- utcDateModified: dateUtils.utcNowDateTime()- };-- if (this.isProtected) {- if (protectedSessionService.isProtectedSessionAvailable()) {- pojo.content = protectedSessionService.encrypt(pojo.content);- }- else {- 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 + "|" + content);-- entityChangesService.addEntityChange({- entityName: 'note_revision_contents',- entityId: this.noteRevisionId,- hash: hash,- isErased: false,- utcDateChanged: this.getUtcDateChanged()- }, null);- }-- beforeSaving() {- super.beforeSaving();-- this.utcDateModified = dateUtils.utcNowDateTime();- }-- // cannot be static!- updatePojo(pojo) {- if (pojo.isProtected) {- if (protectedSessionService.isProtectedSessionAvailable()) {- pojo.title = protectedSessionService.encrypt(pojo.title);- }- else {- // updating protected note outside of protected session means we will keep original ciphertexts- delete pojo.title;- }- }-- delete pojo.content;- }-}--module.exports = NoteRevision;-</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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 3.6.6</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/entities_option.js.html b/docs/backend_api/entities_option.js.htmldeleted file mode 100644index 7ee1a2d7f5..0000000000--- a/docs/backend_api/entities_option.js.html+++ /dev/null@@ -1,90 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/option.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/option.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const Entity = require('./entity');-const dateUtils = require('../services/date_utils');--/**- * Option represents name-value pair, either directly configurable by the user or some system property.- *- * @property {string} name- * @property {string} value- * @property {boolean} isSynced- * @property {string} utcDateModified- * @property {string} utcDateCreated- *- * @extends Entity- */-class Option extends Entity {- static get entityName() { return "options"; }- static get primaryKeyName() { return "name"; }- static get hashedProperties() { return ["name", "value"]; }-- constructor(row) {- super(row);-- this.isSynced = !!this.isSynced;- }-- beforeSaving() {- if (!this.utcDateCreated) {- this.utcDateCreated = dateUtils.utcNowDateTime();- }-- super.beforeSaving();-- this.utcDateModified = dateUtils.utcNowDateTime();- }-}--module.exports = Option;-</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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 3.6.6</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/backend_api/entities_recent_note.js.html b/docs/backend_api/entities_recent_note.js.htmldeleted file mode 100644index 0efca547db..0000000000--- a/docs/backend_api/entities_recent_note.js.html+++ /dev/null@@ -1,79 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/recent_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: entities/recent_note.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>"use strict";--const Entity = require('./entity');-const dateUtils = require('../services/date_utils');--/**- * RecentNote represents recently visited note.- *- * @property {string} noteId- * @property {string} notePath- * @property {string} utcDateCreated- *- * @extends Entity- */-class RecentNote extends Entity {- static get entityName() { return "recent_notes"; }- static get primaryKeyName() { return "noteId"; }-- beforeSaving() {- if (!this.utcDateCreated) {- this.utcDateCreated = dateUtils.utcNowDateTime();- }-- super.beforeSaving();- }-}--module.exports = RecentNote;-</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Entity.html">Entity</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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 3.6.6</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.htmlindex 19416cf68d..aa443d2600 100644--- a/docs/backend_api/global.html+++ b/docs/backend_api/global.html@@ -1083,7 +1083,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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/index.html b/docs/backend_api/index.htmlindex db1dc7202a..9c94014d0f 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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/module-sql.html b/docs/backend_api/module-sql.htmlindex e4ea35b110..1f457e4cec 100644--- a/docs/backend_api/module-sql.html+++ b/docs/backend_api/module-sql.html@@ -1252,7 +1252,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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></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.htmlindex 6bdededcba..9c72d17362 100644--- a/docs/backend_api/services_backend_script_api.js.html+++ b/docs/backend_api/services_backend_script_api.js.html@@ -86,21 +86,21 @@ function BackendScriptApi(currentNote, apiParams) {* @param {string} noteId* @returns {Note|null}*/- this.getNote = becca.getNote;+ this.getNote = noteId => becca.getNote(noteId);/*** @method* @param {string} branchId* @returns {Branch|null}*/- this.getBranch = becca.getBranch;+ this.getBranch = branchId => becca.getBranch(branchId);/*** @method* @param {string} attributeId* @returns {Attribute|null}*/- this.getAttribute = becca.getAttribute;+ this.getAttribute = attributeId => becca.getAttribute(attributeId);/*** This is a powerful search method - you can search by attributes and their values, e.g.:@@ -457,7 +457,7 @@ module.exports = BackendScriptApi;</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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/services_sql.js.html b/docs/backend_api/services_sql.js.htmlindex 6f39b4b0e5..9576eb9546 100644--- a/docs/backend_api/services_sql.js.html+++ b/docs/backend_api/services_sql.js.html@@ -395,7 +395,7 @@ module.exports = {</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="ApiToken.html">ApiToken</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</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="ApiToken.html">ApiToken</a></li><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3></nav><br class="clear">diff --git a/docs/backend_api/sql.js.html b/docs/backend_api/sql.js.htmldeleted file mode 100644index 6acf22d502..0000000000--- a/docs/backend_api/sql.js.html+++ /dev/null@@ -1,410 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: 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: 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 dbConnection = new Database(dataDir.DOCUMENT_PATH);-dbConnection.pragma('journal_mode = WAL');--[`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 = []) {- const row = getRowOrNull(query, params);-- if (!row) {- return null;- }-- return row[Object.keys(row)[0]];-}--// 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 = []) {- return stmt(query).iterate(params);-}--function getMap(query, params = []) {- const map = {};- const results = getRows(query, params);-- for (const row of results) {- const keys = Object.keys(row);-- map[row[keys[0]]] = row[keys[1]];- }-- return map;-}--function getColumn(query, params = []) {- const list = [];- const result = getRows(query, params);-- if (result.length === 0) {- return list;- }-- const key = Object.keys(result[0])[0];-- for (const row of result) {- list.push(row[key]);- }-- return list;-}--function execute(query, params = []) {- return wrap(query, s => s.run(params));-}--function executeWithoutTransaction(query, params = []) {- dbConnection.run(query, params);-}--function executeMany(query, params) {- 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) {- return dbConnection.exec(query);-}--function wrap(query, func) {- const startTimestamp = Date.now();- let result;-- 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 entityChanges = cls.getAndClearEntityChangeIds();-- if (entityChanges.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);-}--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,- executeWithoutTransaction,- executeMany,- executeScript,- transactional,- upsert,- fillParamList-};-</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="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 3.6.7</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/frontend_api/Attribute.html b/docs/frontend_api/Attribute.htmlnew file mode 100644index 0000000000..d3623966a8--- /dev/null+++ b/docs/frontend_api/Attribute.html@@ -0,0 +1,757 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="utf-8">+ <title>JSDoc: Class: Attribute</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: Attribute</h1>+++++++<section>++<header>++ <h2><span class="attribs"><span class="type-signature"></span></span>Attribute<span class="signature">()</span><span class="type-signature"></span></h2>++ <div class="class-description">Attribute is an abstract concept which has two real uses - label (key - value pair)+and relation (representing named relationship between source and target note)</div>+++</header>++<article>+ <div class="container-overview">+++++ <h2>Constructor</h2>++++ <h4 class="name" id="Attribute"><span class="type-signature"></span>new Attribute<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="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line7">line 7</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++++ </div>+++++++++++++++ <h3 class="subsection-title">Members</h3>++++<h4 class="name" id="attributeId"><span class="type-signature"></span>attributeId<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line16">line 16</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="isInheritable"><span class="type-signature"></span>isInheritable<span class="type-signature"> :boolean</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">boolean</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line28">line 28</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line22">line 22</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line18">line 18</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="position"><span class="type-signature"></span>position<span class="type-signature"> :int</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">int</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line26">line 26</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line20">line 20</a>+ </li></ul></dd>++++++++</dl>+++++++++<h4 class="name" id="value"><span class="type-signature"></span>value<span class="type-signature"> :string</span></h4>+++++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line24">line 24</a>+ </li></ul></dd>++++++++</dl>+++++++++++ <h3 class="subsection-title">Methods</h3>++++++++ <h4 class="name" id="getNote"><span class="type-signature"></span>getNote<span class="signature">()</span><span class="type-signature"> → {<a href="NoteShort.html">NoteShort</a>}</span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line32">line 32</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++<h5>Returns:</h5>+++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type"><a href="NoteShort.html">NoteShort</a></span>+++ </dd>+</dl>++++++++++++++</article>++</section>+++++</div>++<nav>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</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 3.6.7</a>+</footer>++<script> prettyPrint(); </script>+<script src="scripts/linenumber.js"> </script>+</body>+</html>\ No newline at end of filediff --git a/docs/frontend_api/Branch.html b/docs/frontend_api/Branch.htmlindex 67d43ea40b..dd5aec666c 100644--- a/docs/frontend_api/Branch.html+++ b/docs/frontend_api/Branch.html@@ -30,7 +30,8 @@<h2><span class="attribs"><span class="type-signature"></span></span>Branch<span class="signature">()</span><span class="type-signature"></span></h2>- <div class="class-description">Represents mapping between note and parent note</div>+ <div class="class-description">Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple+parents.</div></header>@@ -93,7 +94,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line2">line 2</a>+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line5">line 5</a></li></ul></dd>@@ -143,12 +144,26 @@-<h4 class="name" id="branchId"><span class="type-signature"></span>branchId<span class="type-signature"></span></h4>+<h4 class="name" id="branchId"><span class="type-signature"></span>branchId<span class="type-signature"> :string</span></h4>+<div class="description">+ primary key+</div>++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>++ </li>+ </ul>@@ -183,7 +198,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line11">line 11</a>+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line17">line 17</a></li></ul></dd>@@ -201,13 +216,23 @@-<h4 class="name" id="fromSearchNote"><span class="type-signature"></span>fromSearchNote<span class="type-signature"></span></h4>+<h4 class="name" id="fromSearchNote"><span class="type-signature"></span>fromSearchNote<span class="type-signature"> :boolean</span></h4>+++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">boolean</span>+ </li>+ </ul>+@@ -241,7 +266,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line23">line 23</a>+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line29">line 29</a></li></ul></dd>@@ -259,12 +284,22 @@-<h4 class="name" id="isExpanded"><span class="type-signature"></span>isExpanded<span class="type-signature"></span></h4>+<h4 class="name" id="isExpanded"><span class="type-signature"></span>isExpanded<span class="type-signature"> :boolean</span></h4>++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">boolean</span>+ </li>+ </ul>@@ -299,7 +334,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line21">line 21</a>+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line27">line 27</a></li></ul></dd>@@ -317,12 +352,22 @@-<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"></span></h4>+<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"> :string</span></h4>++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>@@ -357,7 +402,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line13">line 13</a>+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line19">line 19</a></li></ul></dd>@@ -375,12 +420,22 @@-<h4 class="name" id="notePosition"><span class="type-signature"></span>notePosition<span class="type-signature"></span></h4>+<h4 class="name" id="notePosition"><span class="type-signature"></span>notePosition<span class="type-signature"> :int</span></h4>++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">int</span>+++ </li>+ </ul>@@ -415,7 +470,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line17">line 17</a>+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line23">line 23</a></li></ul></dd>@@ -433,13 +488,23 @@-<h4 class="name" id="parentNoteId"><span class="type-signature"></span>parentNoteId<span class="type-signature"></span></h4>+<h4 class="name" id="parentNoteId"><span class="type-signature"></span>parentNoteId<span class="type-signature"> :string</span></h4>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>+@@ -473,7 +538,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line15">line 15</a>+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line21">line 21</a></li></ul></dd>@@ -491,12 +556,22 @@-<h4 class="name" id="prefix"><span class="type-signature"></span>prefix<span class="type-signature"></span></h4>+<h4 class="name" id="prefix"><span class="type-signature"></span>prefix<span class="type-signature"> :string</span></h4>++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>@@ -531,7 +606,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line19">line 19</a>+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line25">line 25</a></li></ul></dd>@@ -607,7 +682,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line27">line 27</a>+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line33">line 33</a></li></ul></dd>@@ -709,7 +784,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line32">line 32</a>+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line38">line 38</a></li></ul></dd>@@ -811,7 +886,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line37">line 37</a>+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line43">line 43</a></li></ul></dd>@@ -913,7 +988,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line42">line 42</a>+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line48">line 48</a></li></ul></dd>@@ -981,7 +1056,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/FrontendScriptApi.html b/docs/frontend_api/FrontendScriptApi.htmlindex 77182b3f3e..bc614f7d58 100644--- a/docs/frontend_api/FrontendScriptApi.html+++ b/docs/frontend_api/FrontendScriptApi.html@@ -1928,7 +1928,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#line437">line 437</a>+ <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>@@ -3147,7 +3147,7 @@ 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#line406">line 406</a>+ <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>@@ -3635,6 +3635,161 @@ otherwise (by e.g. createNoteLink())+<h5>Returns:</h5>+++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">Promise.<<a href="NoteShort.html">NoteShort</a>></span>+++ </dd>+</dl>++++++++++++++ <h4 class="name" id="getWeekNote"><span class="type-signature"></span>getWeekNote<span class="signature">(date)</span><span class="type-signature"> → {Promise.<<a href="NoteShort.html">NoteShort</a>>}</span></h4>+++++++<div class="description">+ Returns date-note for the first date of the week of the given date. If it doesn't exist, it is automatically created.+</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>date</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>++++++ <td class="description last">e.g. "2019-04-29"</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#line406">line 406</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++<h5>Returns:</h5>@@ -3765,7 +3920,7 @@ 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#line415">line 415</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line424">line 424</a></li></ul></dd>@@ -4651,7 +4806,7 @@ 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#line464">line 464</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line473">line 473</a></li></ul></dd>@@ -4805,7 +4960,7 @@ 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#line455">line 455</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line464">line 464</a></li></ul></dd>@@ -5746,7 +5901,7 @@ 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#line424">line 424</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line433">line 433</a></li></ul></dd>@@ -6263,7 +6418,7 @@ 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#line448">line 448</a>+ <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>@@ -6309,7 +6464,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="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/KeyboardAction.html b/docs/frontend_api/KeyboardAction.htmldeleted file mode 100644index 1877d3729a..0000000000--- a/docs/frontend_api/KeyboardAction.html+++ /dev/null@@ -1,2266 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Class: KeyboardAction</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: KeyboardAction</h1>-------<section>--<header>-- <h2><span class="attribs"><span class="type-signature"></span></span>KeyboardAction<span class="signature">()</span><span class="type-signature"></span></h2>-- <div class="class-description">blaa vlaa</div>---</header>--<article>- <div class="container-overview">----- <h2>Constructor</h2>---- <h4 class="name" id="KeyboardAction"><span class="type-signature"></span>new KeyboardAction<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line5">line 5</a>- </li></ul></dd>--------</dl>---------------------- </div>--------------- <h3 class="subsection-title">Members</h3>----<h4 class="name" id=".AddLinkToText"><span class="type-signature">(static) </span>AddLinkToText<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line129">line 129</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".BackInNoteHistory"><span class="type-signature">(static) </span>BackInNoteHistory<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line171">line 171</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".ClipboardCopy"><span class="type-signature">(static) </span>ClipboardCopy<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line93">line 93</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".ClipboardCut"><span class="type-signature">(static) </span>ClipboardCut<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line105">line 105</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".ClipboardPaste"><span class="type-signature">(static) </span>ClipboardPaste<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line99">line 99</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".CloneNotesTo"><span class="type-signature">(static) </span>CloneNotesTo<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line135">line 135</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".CloseTab"><span class="type-signature">(static) </span>CloseTab<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line33">line 33</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".CollapseTree"><span class="type-signature">(static) </span>CollapseTree<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line69">line 69</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".CreateNoteAfter"><span class="type-signature">(static) </span>CreateNoteAfter<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line51">line 51</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".CreateNoteInto"><span class="type-signature">(static) </span>CreateNoteInto<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line57">line 57</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".FindInText"><span class="type-signature">(static) </span>FindInText<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line207">line 207</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".FocusNote"><span class="type-signature">(static) </span>FocusNote<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line81">line 81</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".ForwardInNoteHistory"><span class="type-signature">(static) </span>ForwardInNoteHistory<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line177">line 177</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".InsertDateTime"><span class="type-signature">(static) </span>InsertDateTime<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line189">line 189</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".JumpToNote"><span class="type-signature">(static) </span>JumpToNote<span class="type-signature"></span></h4>-----<div class="description">- Open "Jump to note" dialog-</div>--------<dl class="details">--------------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line14">line 14</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".MarkdownToHTML"><span class="type-signature">(static) </span>MarkdownToHTML<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line21">line 21</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".MoveNotesTo"><span class="type-signature">(static) </span>MoveNotesTo<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line141">line 141</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".NewTab"><span class="type-signature">(static) </span>NewTab<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line27">line 27</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".NextTab"><span class="type-signature">(static) </span>NextTab<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line39">line 39</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".OpenDevTools"><span class="type-signature">(static) </span>OpenDevTools<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line201">line 201</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".OpenSQLConsole"><span class="type-signature">(static) </span>OpenSQLConsole<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line165">line 165</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".PreviousTab"><span class="type-signature">(static) </span>PreviousTab<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line45">line 45</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".Redo"><span class="type-signature">(static) </span>Redo<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line123">line 123</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".ReloadApp"><span class="type-signature">(static) </span>ReloadApp<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line195">line 195</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".RunCurrentNote"><span class="type-signature">(static) </span>RunCurrentNote<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line87">line 87</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".RunSQL"><span class="type-signature">(static) </span>RunSQL<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line75">line 75</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".ScrollToActiveNote"><span class="type-signature">(static) </span>ScrollToActiveNote<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line63">line 63</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".SearchNotes"><span class="type-signature">(static) </span>SearchNotes<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line147">line 147</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".SelectAllNotesInParent"><span class="type-signature">(static) </span>SelectAllNotesInParent<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line111">line 111</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".ShowAttributes"><span class="type-signature">(static) </span>ShowAttributes<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line153">line 153</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".ShowHelp"><span class="type-signature">(static) </span>ShowHelp<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line159">line 159</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".ToggleFullscreen"><span class="type-signature">(static) </span>ToggleFullscreen<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line213">line 213</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".ToggleZenMode"><span class="type-signature">(static) </span>ToggleZenMode<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line183">line 183</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".Undo"><span class="type-signature">(static) </span>Undo<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line117">line 117</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".ZoomIn"><span class="type-signature">(static) </span>ZoomIn<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line225">line 225</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id=".ZoomOut"><span class="type-signature">(static) </span>ZoomOut<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="services_keyboard_action.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_action.js.html#line219">line 219</a>- </li></ul></dd>--------</dl>---------------</article>--</section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</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 3.6.3</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>\ No newline at end of filediff --git a/docs/frontend_api/KeyboardActions.html b/docs/frontend_api/KeyboardActions.htmldeleted file mode 100644index 0e5a93353d..0000000000--- a/docs/frontend_api/KeyboardActions.html+++ /dev/null@@ -1,280 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Class: KeyboardActions</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: KeyboardActions</h1>-------<section>--<header>-- <h2><span class="attribs"><span class="type-signature"></span></span>KeyboardActions<span class="signature">()</span><span class="type-signature"></span></h2>-- <div class="class-description">blaa vlaa</div>---</header>--<article>- <div class="container-overview">----- <h2>Constructor</h2>---- <h4 class="name" id="KeyboardActions"><span class="type-signature"></span>new KeyboardActions<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="services_keyboard_actions.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_actions.js.html#line5">line 5</a>- </li></ul></dd>--------</dl>---------------------- </div>--------------- <h3 class="subsection-title">Members</h3>----<h4 class="name" id="JUMP_TO"><span class="type-signature"></span>JUMP_TO<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">string</span>---- </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_keyboard_actions.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_actions.js.html#line7">line 7</a>- </li></ul></dd>--------</dl>---------------</article>--</section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardActions.html">KeyboardActions</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</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 3.6.3</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>\ No newline at end of filediff --git a/docs/frontend_api/NoteComplement.html b/docs/frontend_api/NoteComplement.htmlindex 7833bdd4a7..be954630b8 100644--- a/docs/frontend_api/NoteComplement.html+++ b/docs/frontend_api/NoteComplement.html@@ -143,13 +143,23 @@-<h4 class="name" id="combinedDateModified"><span class="type-signature"></span>combinedDateModified<span class="type-signature"></span></h4>+<h4 class="name" id="combinedDateModified"><span class="type-signature"></span>combinedDateModified<span class="type-signature"> :string</span></h4>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>+@@ -183,7 +193,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line32">line 32</a>+ <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line33">line 33</a></li></ul></dd>@@ -201,12 +211,22 @@-<h4 class="name" id="combinedUtcDateModified"><span class="type-signature"></span>combinedUtcDateModified<span class="type-signature"></span></h4>+<h4 class="name" id="combinedUtcDateModified"><span class="type-signature"></span>combinedUtcDateModified<span class="type-signature"> :string</span></h4>++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>@@ -241,7 +261,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line35">line 35</a>+ <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line36">line 36</a></li></ul></dd>@@ -259,14 +279,28 @@-<h4 class="name" id="content"><span class="type-signature"></span>content<span class="type-signature"></span></h4>+<h4 class="name" id="content"><span class="type-signature"></span>content<span class="type-signature"> :string</span></h4>+<div class="description">+ can either contain the whole content (in e.g. string notes), only part (large text notes) or nothing at all (binary notes, images)+</div>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++@@ -299,7 +333,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line12">line 12</a>+ <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line13">line 13</a></li></ul></dd>@@ -317,13 +351,23 @@-<h4 class="name" id="contentLength"><span class="type-signature"></span>contentLength<span class="type-signature"></span></h4>+<h4 class="name" id="contentLength"><span class="type-signature"></span>contentLength<span class="type-signature"> :int</span></h4>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">int</span>+++ </li>+ </ul>+@@ -357,7 +401,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line15">line 15</a>+ <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line16">line 16</a></li></ul></dd>@@ -375,12 +419,22 @@-<h4 class="name" id="dateCreated"><span class="type-signature"></span>dateCreated<span class="type-signature"></span></h4>+<h4 class="name" id="dateCreated"><span class="type-signature"></span>dateCreated<span class="type-signature"> :string</span></h4>++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>@@ -415,7 +469,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line18">line 18</a>+ <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line19">line 19</a></li></ul></dd>@@ -433,12 +487,22 @@-<h4 class="name" id="dateModified"><span class="type-signature"></span>dateModified<span class="type-signature"></span></h4>+<h4 class="name" id="dateModified"><span class="type-signature"></span>dateModified<span class="type-signature"> :string</span></h4>+++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>++ </li>+ </ul>@@ -473,7 +537,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line21">line 21</a>+ <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line22">line 22</a></li></ul></dd>@@ -491,12 +555,22 @@-<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"></span></h4>+<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"> :string</span></h4>++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>@@ -549,12 +623,22 @@-<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"></span></h4>+<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"> :string</span></h4>+++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>++ </li>+ </ul>@@ -589,7 +673,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line24">line 24</a>+ <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line25">line 25</a></li></ul></dd>@@ -607,13 +691,23 @@-<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"></span></h4>+<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"> :string</span></h4>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>+@@ -647,7 +741,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line27">line 27</a>+ <a href="entities_note_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line28">line 28</a></li></ul></dd>@@ -681,7 +775,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/NoteFull.html b/docs/frontend_api/NoteFull.htmldeleted file mode 100644index 890782f596..0000000000--- a/docs/frontend_api/NoteFull.html+++ /dev/null@@ -1,464 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Class: NoteFull</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: NoteFull</h1>-------<section>--<header>-- <h2><span class="attribs"><span class="type-signature"></span></span>NoteFull<span class="signature">()</span><span class="type-signature"></span></h2>-- <div class="class-description">Represents full note, specifically including note's content.</div>---</header>--<article>- <div class="container-overview">----- <h2>Constructor</h2>---- <h4 class="name" id="NoteFull"><span class="type-signature"></span>new NoteFull<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="entities_note_full.js.html">entities/note_full.js</a>, <a href="entities_note_full.js.html#line7">line 7</a>- </li></ul></dd>--------</dl>---------------------- </div>--------------- <h3 class="subsection-title">Members</h3>----<h4 class="name" id="content"><span class="type-signature"></span>content<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="entities_note_full.js.html">entities/note_full.js</a>, <a href="entities_note_full.js.html#line11">line 11</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id="dateCreated"><span class="type-signature"></span>dateCreated<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="entities_note_full.js.html">entities/note_full.js</a>, <a href="entities_note_full.js.html#line14">line 14</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id="dateModified"><span class="type-signature"></span>dateModified<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="entities_note_full.js.html">entities/note_full.js</a>, <a href="entities_note_full.js.html#line17">line 17</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<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="entities_note_full.js.html">entities/note_full.js</a>, <a href="entities_note_full.js.html#line20">line 20</a>- </li></ul></dd>--------</dl>---------<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<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="entities_note_full.js.html">entities/note_full.js</a>, <a href="entities_note_full.js.html#line23">line 23</a>- </li></ul></dd>--------</dl>---------------</article>--</section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</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 3.6.3</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>\ No newline at end of filediff --git a/docs/frontend_api/NoteShort.html b/docs/frontend_api/NoteShort.htmlindex 4bd75c9e06..be44835e52 100644--- a/docs/frontend_api/NoteShort.html+++ b/docs/frontend_api/NoteShort.html@@ -421,13 +421,23 @@ This note's representation is used in note tree and is kept in Froca.</div>-<h4 class="name" id="isProtected"><span class="type-signature"></span>isProtected<span class="type-signature"></span></h4>+<h4 class="name" id="isProtected"><span class="type-signature"></span>isProtected<span class="type-signature"> :boolean</span></h4>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">boolean</span>+++ </li>+ </ul>+@@ -479,12 +489,26 @@ This note's representation is used in note tree and is kept in Froca.</div>-<h4 class="name" id="mime"><span class="type-signature"></span>mime<span class="type-signature"></span></h4>+<h4 class="name" id="mime"><span class="type-signature"></span>mime<span class="type-signature"> :string</span></h4>++<div class="description">+ content-type, e.g. "application/json"+</div>++++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+ </li>+ </ul>@@ -519,7 +543,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line65">line 65</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line71">line 71</a></li></ul></dd>@@ -537,13 +561,23 @@ This note's representation is used in note tree and is kept in Froca.</div>-<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"></span></h4>+<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"> :string</span></h4>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>+@@ -799,12 +833,22 @@ This note's representation is used in note tree and is kept in Froca.</div>-<h4 class="name" id="title"><span class="type-signature"></span>title<span class="type-signature"></span></h4>+<h4 class="name" id="title"><span class="type-signature"></span>title<span class="type-signature"> :string</span></h4>+++ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>++ </li>+ </ul>@@ -857,14 +901,28 @@ This note's representation is used in note tree and is kept in Froca.</div>-<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"></span></h4>+<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4>+<div class="description">+ one of 'text', 'code', 'file' or 'render'+</div>+ <h5>Type:</h5>+ <ul>+ <li>++<span class="param-type">string</span>+++ </li>+ </ul>++@@ -897,7 +955,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line63">line 63</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line66">line 66</a></li></ul></dd>@@ -1045,7 +1103,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line469">line 469</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line475">line 475</a></li></ul></dd>@@ -1245,7 +1303,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line210">line 210</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line216">line 216</a></li></ul></dd>@@ -1423,7 +1481,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line491">line 491</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line497">line 497</a></li></ul></dd>@@ -1529,7 +1587,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line133">line 133</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line139">line 139</a></li></ul></dd>@@ -1631,7 +1689,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line128">line 128</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line134">line 134</a></li></ul></dd>@@ -1733,7 +1791,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line145">line 145</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line151">line 151</a></li></ul></dd>@@ -1835,7 +1893,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line183">line 183</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line189">line 189</a></li></ul></dd>@@ -1937,7 +1995,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line188">line 188</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line194">line 194</a></li></ul></dd>@@ -2088,7 +2146,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line531">line 531</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line537">line 537</a></li></ul></dd>@@ -2255,7 +2313,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line358">line 358</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line364">line 364</a></li></ul></dd>@@ -2410,7 +2468,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line555">line 555</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line561">line 561</a></li></ul></dd>@@ -2520,7 +2578,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line680">line 680</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line683">line 683</a></li></ul></dd>@@ -2694,7 +2752,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line458">line 458</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line464">line 464</a></li></ul></dd>@@ -2894,7 +2952,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line197">line 197</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line203">line 203</a></li></ul></dd>@@ -3072,7 +3130,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line480">line 480</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line486">line 486</a></li></ul></dd>@@ -3227,7 +3285,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line525">line 525</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line531">line 531</a></li></ul></dd>@@ -3394,7 +3452,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line350">line 350</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line356">line 356</a></li></ul></dd>@@ -3549,7 +3607,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line549">line 549</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line555">line 555</a></li></ul></dd>@@ -3704,7 +3762,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line537">line 537</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line543">line 543</a></li></ul></dd>@@ -3871,7 +3929,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line423">line 423</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line429">line 429</a></li></ul></dd>@@ -4026,7 +4084,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line561">line 561</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line567">line 567</a></li></ul></dd>@@ -4132,7 +4190,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line153">line 153</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line159">line 159</a></li></ul></dd>@@ -4234,7 +4292,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line158">line 158</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line164">line 164</a></li></ul></dd>@@ -4385,7 +4443,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line543">line 543</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line549">line 549</a></li></ul></dd>@@ -4552,7 +4610,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line431">line 431</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line437">line 437</a></li></ul></dd>@@ -4707,7 +4765,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line573">line 573</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line579">line 579</a></li></ul></dd>@@ -4877,7 +4935,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line583">line 583</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line589">line 589</a></li></ul></dd>@@ -5028,7 +5086,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line567">line 567</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line573">line 573</a></li></ul></dd>@@ -5134,7 +5192,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line724">line 724</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line727">line 727</a></li></ul></dd>@@ -5247,7 +5305,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line659">line 659</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line662">line 662</a></li></ul></dd>@@ -5353,7 +5411,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line669">line 669</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line672">line 672</a></li></ul></dd>@@ -5455,7 +5513,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line597">line 597</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line603">line 603</a></li></ul></dd>@@ -5629,7 +5687,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line440">line 440</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line446">line 446</a></li></ul></dd>@@ -5735,7 +5793,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line140">line 140</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line146">line 146</a></li></ul></dd>@@ -5886,7 +5944,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line507">line 507</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line513">line 513</a></li></ul></dd>@@ -6064,7 +6122,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line449">line 449</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line455">line 455</a></li></ul></dd>@@ -6219,7 +6277,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line501">line 501</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line507">line 507</a></li></ul></dd>@@ -6374,7 +6432,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line513">line 513</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line519">line 519</a></li></ul></dd>@@ -6529,7 +6587,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line519">line 519</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line525">line 525</a></li></ul></dd>@@ -6594,11 +6652,6 @@ This note's representation is used in note tree and is kept in Froca.</div>-<div class="description">- Clear note's attributes cache to force fresh reload for next attribute request.-Cache is note instance scoped.-</div>-@@ -6628,6 +6681,8 @@ Cache is note instance scoped.+ <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>NOOP</li></ul></dd>+@@ -6640,7 +6695,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line650">line 650</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line655">line 655</a></li></ul></dd>@@ -6724,7 +6779,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line719">line 719</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line722">line 722</a></li></ul></dd>@@ -6830,7 +6885,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line711">line 711</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line714">line 714</a></li></ul></dd>@@ -6936,7 +6991,7 @@ Cache is note instance scoped.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line103">line 103</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line109">line 109</a></li></ul></dd>@@ -7000,7 +7055,7 @@ Cache is note instance scoped.</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/branch.js.html b/docs/frontend_api/branch.js.htmldeleted file mode 100644index 0fbbe08061..0000000000--- a/docs/frontend_api/branch.js.html+++ /dev/null@@ -1,85 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: branch.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: branch.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>/** Represents mapping between note and parent note */-class Branch {- constructor(froca, row) {- this.froca = froca;- /** @param {string} primary key */- this.branchId = row.branchId;- /** @param {string} */- this.noteId = row.noteId;- this.note = null;- /** @param {string} */- this.parentNoteId = row.parentNoteId;- /** @param {int} */- this.notePosition = row.notePosition;- /** @param {string} */- this.prefix = row.prefix;- /** @param {boolean} */- this.isExpanded = row.isExpanded;- }-- /** @returns {NoteShort} */- async getNote() {- return await this.froca.getNote(this.noteId);- }-- /** @returns {boolean} true if it's top level, meaning its parent is root note */- isTopLevel() {- return this.parentNoteId === 'root';- }-- get toString() {- return `Branch(branchId=${this.branchId})`;- }-}--export default Branch;</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Aug 23 2018 12:50:56 GMT+0200 (CEST)-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/frontend_api/entities_attribute.js.html b/docs/frontend_api/entities_attribute.js.htmlindex 4c99cf6aed..9f859d8aed 100644--- a/docs/frontend_api/entities_attribute.js.html+++ b/docs/frontend_api/entities_attribute.js.html@@ -28,6 +28,10 @@<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 Attribute {constructor(froca, row) {this.froca = froca;@@ -36,19 +40,19 @@ class Attribute {}update(row) {- /** @param {string} attributeId */+ /** @type {string} */this.attributeId = row.attributeId;- /** @param {string} noteId */+ /** @type {string} */this.noteId = row.noteId;- /** @param {string} type */+ /** @type {string} */this.type = row.type;- /** @param {string} name */+ /** @type {string} */this.name = row.name;- /** @param {string} value */+ /** @type {string} */this.value = row.value;- /** @param {int} position */+ /** @type {int} */this.position = row.position;- /** @param {boolean} isInheritable */+ /** @type {boolean} */this.isInheritable = !!row.isInheritable;}@@ -100,7 +104,7 @@ export default Attribute;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/entities_branch.js.html b/docs/frontend_api/entities_branch.js.htmlindex aa3f353c58..b5a53597dd 100644--- a/docs/frontend_api/entities_branch.js.html+++ b/docs/frontend_api/entities_branch.js.html@@ -26,7 +26,10 @@<section><article>- <pre class="prettyprint source linenums"><code>/** Represents mapping between note and parent note */+ <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 Branch {constructor(froca, row) {this.froca = froca;@@ -35,19 +38,22 @@ class Branch {}update(row) {- /** @param {string} primary key */+ /**+ * primary key+ * @type {string}+ */this.branchId = row.branchId;- /** @param {string} */+ /** @type {string} */this.noteId = row.noteId;- /** @param {string} */+ /** @type {string} */this.parentNoteId = row.parentNoteId;- /** @param {int} */+ /** @type {int} */this.notePosition = row.notePosition;- /** @param {string} */+ /** @type {string} */this.prefix = row.prefix;- /** @param {boolean} */+ /** @type {boolean} */this.isExpanded = !!row.isExpanded;- /** @param {boolean} */+ /** @type {boolean} */this.fromSearchNote = !!row.fromSearchNote;}@@ -87,7 +93,7 @@ export default Branch;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/entities_note_complement.js.html b/docs/frontend_api/entities_note_complement.js.htmlindex 838b3f8572..1a17e1c486 100644--- a/docs/frontend_api/entities_note_complement.js.html+++ b/docs/frontend_api/entities_note_complement.js.html@@ -31,35 +31,36 @@*/class NoteComplement {constructor(row) {- /** @param {string} */+ /** @type {string} */this.noteId = row.noteId;/**- * @param {string} - can either contain the whole content (in e.g. string notes), only part (large text notes) or nothing at all (binary notes, images)+ * 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;- /** @param {int} */+ /** @type {int} */this.contentLength = row.contentLength;- /** @param {string} */+ /** @type {string} */this.dateCreated = row.dateCreated;- /** @param {string} */+ /** @type {string} */this.dateModified = row.dateModified;- /** @param {string} */+ /** @type {string} */this.utcDateCreated = row.utcDateCreated;- /** @param {string} */+ /** @type {string} */this.utcDateModified = row.utcDateModified;// "combined" date modified give larger out of note's and note_content's dateModified- /** @param {string} */+ /** @type {string} */this.combinedDateModified = row.combinedDateModified;- /** @param {string} */+ /** @type {string} */this.combinedUtcDateModified = row.combinedUtcDateModified;}}@@ -75,7 +76,7 @@ export default NoteComplement;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/entities_note_full.js.html b/docs/frontend_api/entities_note_full.js.htmldeleted file mode 100644index 64503a4e4f..0000000000--- a/docs/frontend_api/entities_note_full.js.html+++ /dev/null@@ -1,83 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: entities/note_full.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/note_full.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>import NoteShort from './note_short.js';--/**- * Represents full note, specifically including note's content.- */-class NoteFull extends NoteShort {- constructor(froca, row, noteShort) {- super(froca, row, []);-- /** @param {string} */- this.content = row.content;-- /** @param {string} */- this.dateCreated = row.dateCreated;-- /** @param {string} */- this.dateModified = row.dateModified;-- /** @param {string} */- this.utcDateCreated = row.utcDateCreated;-- /** @param {string} */- this.utcDateModified = row.utcDateModified;-- /* ugly */- this.parents = noteShort.parents;- this.parentToBranch = noteShort.parentToBranch;- this.children = noteShort.children;- this.childToBranch = noteShort.childToBranch;- }-}--export default NoteFull;</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</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 3.6.3</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/frontend_api/entities_note_short.js.html b/docs/frontend_api/entities_note_short.js.htmlindex 407282a764..5e3f312506 100644--- a/docs/frontend_api/entities_note_short.js.html+++ b/docs/frontend_api/entities_note_short.js.html@@ -81,15 +81,21 @@ class NoteShort {}update(row) {- /** @param {string} */+ /** @type {string} */this.noteId = row.noteId;- /** @param {string} */+ /** @type {string} */this.title = row.title;- /** @param {boolean} */+ /** @type {boolean} */this.isProtected = !!row.isProtected;- /** @param {string} one of 'text', 'code', 'file' or 'render' */+ /**+ * one of 'text', 'code', 'file' or 'render'+ * @type {string}+ */this.type = row.type;- /** @param {string} content-type, e.g. "application/json" */+ /**+ * content-type, e.g. "application/json"+ * @type {string}+ */this.mime = row.mime;}@@ -672,12 +678,9 @@ class NoteShort {}/**- * Clear note's attributes cache to force fresh reload for next attribute request.- * Cache is note instance scoped.+ * @deprecated NOOP*/- invalidateAttributeCache() {- this.__attributeCache = null;- }+ invalidateAttributeCache() {}/*** Get relations which target this note@@ -709,7 +712,7 @@ class NoteShort {return await this.froca.getNoteComplement(this.noteId);}- get toString() {+ toString() {return `Note(noteId=${this.noteId}, title=${this.title})`;}@@ -796,7 +799,7 @@ export default NoteShort;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/global.html b/docs/frontend_api/global.htmlindex f7bdbe3caa..441ecb139b 100644--- a/docs/frontend_api/global.html+++ b/docs/frontend_api/global.html@@ -425,7 +425,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/index.html b/docs/frontend_api/index.htmlindex 68f6692d07..3ea1a69d56 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="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</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 4050b4d16d..0000000000--- a/docs/frontend_api/module.exports.html+++ /dev/null@@ -1,280 +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">blaa vlaa</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="services_keyboard_actions.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_actions.js.html#line5">line 5</a>- </li></ul></dd>--------</dl>---------------------- </div>--------------- <h3 class="subsection-title">Members</h3>----<h4 class="name" id="JUMP_TO"><span class="type-signature"></span>JUMP_TO<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">string</span>---- </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_keyboard_actions.js.html">services/keyboard_action.js</a>, <a href="services_keyboard_actions.js.html#line7">line 7</a>- </li></ul></dd>--------</dl>---------------</article>--</section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</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 3.6.3</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>\ No newline at end of filediff --git a/docs/frontend_api/note_full.js.html b/docs/frontend_api/note_full.js.htmldeleted file mode 100644index c930a3e57b..0000000000--- a/docs/frontend_api/note_full.js.html+++ /dev/null@@ -1,73 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: note_full.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: note_full.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>import NoteShort from './note_short.js';--/**- * Represents full note, specifically including note's content.- */-class NoteFull extends NoteShort {- constructor(froca, row) {- super(froca, row);-- /** @param {string} */- this.content = row.content;-- if (this.content !== "" && this.isJson()) {- try {- /** @param {object} */- this.jsonContent = JSON.parse(this.content);- }- catch(e) {}- }- }-}--export default NoteFull;</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Aug 23 2018 12:50:56 GMT+0200 (CEST)-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/frontend_api/note_short.js.html b/docs/frontend_api/note_short.js.htmldeleted file mode 100644index 63401a3011..0000000000--- a/docs/frontend_api/note_short.js.html+++ /dev/null@@ -1,137 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: note_short.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: note_short.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>/**- * This note's representation is used in note tree and is kept in Froca.- * Its notable omission is the note content.- */-class NoteShort {- constructor(froca, row) {- this.froca = froca;- /** @param {string} */- this.noteId = row.noteId;- /** @param {string} */- this.title = row.title;- /** @param {boolean} */- this.isProtected = row.isProtected;- /** @param {string} one of 'text', 'code', 'file' or 'render' */- this.type = row.type;- /** @param {string} content-type, e.g. "application/json" */- this.mime = row.mime;- /** @param {boolean} */- this.archived = row.archived;- this.cssClass = row.cssClass;- }-- /** @returns {boolean} */- isJson() {- return this.mime === "application/json";- }-- /** @returns {Promise<Array.<Branch>>} */- async getBranches() {- const branchIds = this.froca.parents[this.noteId].map(- parentNoteId => this.froca.getBranchIdByChildParent(this.noteId, parentNoteId));-- return this.froca.getBranches(branchIds);- }-- /** @returns {boolean} */- hasChildren() {- return this.froca.children[this.noteId]- && this.froca.children[this.noteId].length > 0;- }-- /** @returns {Promise<Array.<Branch>>} */- async getChildBranches() {- if (!this.froca.children[this.noteId]) {- return [];- }-- const branchIds = this.froca.children[this.noteId].map(- childNoteId => this.froca.getBranchIdByChildParent(childNoteId, this.noteId));-- return await this.froca.getBranches(branchIds);- }-- /** @returns {Array.<string>} */- getParentNoteIds() {- return this.froca.parents[this.noteId] || [];- }-- /** @returns {Promise<Array.<NoteShort>>} */- async getParentNotes() {- return await this.froca.getNotes(this.getParentNoteIds());- }-- /** @returns {Array.<string>} */- getChildNoteIds() {- return this.froca.children[this.noteId] || [];- }-- /** @returns {Promise<Array.<NoteShort>>} */- async getChildNotes() {- return await this.froca.getNotes(this.getChildNoteIds());- }-- get toString() {- return `Note(noteId=${this.noteId}, title=${this.title})`;- }-- get dto() {- const dto = Object.assign({}, this);- delete dto.froca;- delete dto.archived;-- return dto;- }-}--export default NoteShort;</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul>-</nav>--<br class="clear">--<footer>- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Aug 23 2018 12:50:56 GMT+0200 (CEST)-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/frontend_api/services_frontend_script_api.js.html b/docs/frontend_api/services_frontend_script_api.js.htmlindex 18b9328b01..36c0f90d84 100644--- a/docs/frontend_api/services_frontend_script_api.js.html+++ b/docs/frontend_api/services_frontend_script_api.js.html@@ -424,6 +424,15 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain*/this.getDateNote = dateNotesService.getDateNote;+ /**+ * Returns date-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<NoteShort>}+ */+ this.getWeekNote = dateNotesService.getWeekNote;+/*** Returns month-note. If it doesn't exist, it is automatically created.*@@ -503,7 +512,7 @@ export default FrontendScriptApi;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/services_keyboard_action.js.html b/docs/frontend_api/services_keyboard_action.js.htmldeleted file mode 100644index f477850d8b..0000000000--- a/docs/frontend_api/services_keyboard_action.js.html+++ /dev/null@@ -1,280 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: services/keyboard_action.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/keyboard_action.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>/**- * blaa vlaa- */-class KeyboardAction {- constructor(params) {- this.optionName = params.optionName;- }-}--/**- * Open "Jump to note" dialog- * @static- */-KeyboardAction.JumpToNote = new KeyboardAction({- optionName: "JumpToNote",- defaultShortcuts: "mod+j",- description: 'Open "Jump to note" dialog'-});--/** @static */-KeyboardAction.MarkdownToHTML = new KeyboardAction({- optionName: "MarkdownToHTML",- defaultShortcuts: "mod+return"-});--/** @static */-KeyboardAction.NewTab = new KeyboardAction({- optionName: "NewTab",- defaultShortcuts: "mod+t"-});--/** @static */-KeyboardAction.CloseTab = new KeyboardAction({- optionName: "CloseTab",- defaultShortcuts: "mod+w"-});--/** @static */-KeyboardAction.NextTab = new KeyboardAction({- optionName: "NextTab",- defaultShortcuts: "mod+tab"-});--/** @static */-KeyboardAction.PreviousTab = new KeyboardAction({- optionName: "PreviousTab",- defaultShortcuts: "mod+shift+tab"-});--/** @static */-KeyboardAction.CreateNoteAfter = new KeyboardAction({- optionName: "CreateNoteAfter",- defaultShortcuts: "mod+o"-});--/** @static */-KeyboardAction.CreateNoteInto = new KeyboardAction({- optionName: "CreateNoteInto",- defaultShortcuts: "mod+p"-});--/** @static */-KeyboardAction.ScrollToActiveNote = new KeyboardAction({- optionName: "ScrollToActiveNote",- defaultShortcuts: "mod+."-});--/** @static */-KeyboardAction.CollapseTree = new KeyboardAction({- optionName: "CollapseTree",- defaultShortcuts: "alt+c"-});--/** @static */-KeyboardAction.RunSQL = new KeyboardAction({- optionName: "RunSQL",- defaultShortcuts: "mod+return"-});--/** @static */-KeyboardAction.FocusNote = new KeyboardAction({- optionName: "FocusNote",- defaultShortcuts: "return"-});--/** @static */-KeyboardAction.RunCurrentNote = new KeyboardAction({- optionName: "RunCurrentNote",- defaultShortcuts: "mod+return"-});--/** @static */-KeyboardAction.ClipboardCopy = new KeyboardAction({- optionName: "ClipboardCopy",- defaultShortcuts: "mod+c"-});--/** @static */-KeyboardAction.ClipboardPaste = new KeyboardAction({- optionName: "ClipboardPaste",- defaultShortcuts: "mod+v"-});--/** @static */-KeyboardAction.ClipboardCut = new KeyboardAction({- optionName: "ClipboardCut",- defaultShortcuts: "mod+x"-});--/** @static */-KeyboardAction.SelectAllNotesInParent = new KeyboardAction({- optionName: "SelectAllNotesInParent",- defaultShortcuts: "mod+a"-});--/** @static */-KeyboardAction.Undo = new KeyboardAction({- optionName: "Undo",- defaultShortcuts: "mod+z"-});--/** @static */-KeyboardAction.Redo = new KeyboardAction({- optionName: "Redo",- defaultShortcuts: "mod+y"-});--/** @static */-KeyboardAction.AddLinkToText = new KeyboardAction({- optionName: "AddLinkToText",- defaultShortcuts: "mod+l"-});--/** @static */-KeyboardAction.CloneNotesTo = new KeyboardAction({- optionName: "CloneNotesTo",- defaultShortcuts: "mod+shift+c"-});--/** @static */-KeyboardAction.MoveNotesTo = new KeyboardAction({- optionName: "MoveNotesTo",- defaultShortcuts: "mod+shift+c"-});--/** @static */-KeyboardAction.SearchNotes = new KeyboardAction({- optionName: "SearchNotes",- defaultShortcuts: "mod+s"-});--/** @static */-KeyboardAction.ShowAttributes = new KeyboardAction({- optionName: "ShowAttributes",- defaultShortcuts: "alt+a"-});--/** @static */-KeyboardAction.ShowHelp = new KeyboardAction({- optionName: "ShowHelp",- defaultShortcuts: "f1"-});--/** @static */-KeyboardAction.OpenSQLConsole = new KeyboardAction({- optionName: "OpenSQLConsole",- defaultShortcuts: "alt+o"-});--/** @static */-KeyboardAction.BackInNoteHistory = new KeyboardAction({- optionName: "BackInNoteHistory",- defaultShortcuts: "alt+left"-});--/** @static */-KeyboardAction.ForwardInNoteHistory = new KeyboardAction({- optionName: "ForwardInNoteHistory",- defaultShortcuts: "alt+right"-});--/** @static */-KeyboardAction.ToggleZenMode = new KeyboardAction({- optionName: "ToggleZenMode",- defaultShortcuts: "alt+m"-});--/** @static */-KeyboardAction.InsertDateTime = new KeyboardAction({- optionName: "InsertDateTime",- defaultShortcuts: "alt+t"-});--/** @static */-KeyboardAction.ReloadApp = new KeyboardAction({- optionName: "ReloadApp",- defaultShortcuts: ["f5", "mod+r"]-});--/** @static */-KeyboardAction.OpenDevTools = new KeyboardAction({- optionName: "OpenDevTools",- defaultShortcuts: "mod+shift+i"-});--/** @static */-KeyboardAction.FindInText = new KeyboardAction({- optionName: "FindInText",- defaultShortcuts: "mod+f"-});--/** @static */-KeyboardAction.ToggleFullscreen = new KeyboardAction({- optionName: "ToggleFullscreen",- defaultShortcuts: "f11"-});--/** @static */-KeyboardAction.ZoomOut = new KeyboardAction({- optionName: "ZoomOut",- defaultShortcuts: "mod+-"-});--/** @static */-KeyboardAction.ZoomIn = new KeyboardAction({- optionName: "ZoomIn",- defaultShortcuts: "mod+="-});--export default KeyboardAction;</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardAction.html">KeyboardAction</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</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 3.6.3</a>-</footer>--<script> prettyPrint(); </script>-<script src="scripts/linenumber.js"> </script>-</body>-</html>diff --git a/docs/frontend_api/services_keyboard_actions.js.html b/docs/frontend_api/services_keyboard_actions.js.htmldeleted file mode 100644index 6e24019bda..0000000000--- a/docs/frontend_api/services_keyboard_actions.js.html+++ /dev/null@@ -1,61 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="utf-8">- <title>JSDoc: Source: services/keyboard_action.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/keyboard_action.js</h1>------- <section>- <article>- <pre class="prettyprint source linenums"><code>/**- * blaa vlaa- */-class KeyboardActions {- constructor() {- /** @property {string} */- this.JUMP_TO = "";- }-}--export default KeyboardActions;</code></pre>- </article>- </section>-----</div>--<nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="KeyboardActions.html">KeyboardActions</a></li><li><a href="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</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 3.6.3</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.htmlindex a2bdb927b0..905052e62c 100644--- a/docs/frontend_api/widgets_collapsible_widget.js.html+++ b/docs/frontend_api/widgets_collapsible_widget.js.html@@ -75,7 +75,7 @@ export default class CollapsibleWidget extends NoteContextAwareWidget {</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/package.json b/package.jsonindex 32f1ec9aa6..ddbddcaecd 100644--- a/package.json+++ b/package.json@@ -15,8 +15,8 @@"scripts": {"start-server": "cross-env TRILIUM_ENV=dev node ./src/www","start-electron": "cross-env TRILIUM_ENV=dev electron --inspect=5858 .",- "build-backend-docs": "./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": "./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-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-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",diff --git a/src/becca/entities/api_token.js b/src/becca/entities/api_token.jsindex a445fef6e3..dcd2055917 100644--- a/src/becca/entities/api_token.js+++ b/src/becca/entities/api_token.js@@ -14,8 +14,11 @@ class ApiToken extends AbstractEntity {constructor(row) {super();+ /** @type {string} */this.apiTokenId = row.apiTokenId;+ /** @type {string} */this.token = row.token;+ /** @type {string} */this.utcDateCreated = row.utcDateCreated || dateUtils.utcNowDateTime();}diff --git a/src/becca/entities/attribute.js b/src/becca/entities/attribute.jsindex c990b44c93..47f0bebb2d 100644--- a/src/becca/entities/attribute.js+++ b/src/becca/entities/attribute.js@@ -6,6 +6,10 @@ const sql = require("../../services/sql.js");const dateUtils = require("../../services/date_utils.js");const promotedAttributeDefinitionParser = require("../../services/promoted_attribute_definition_parser");+/**+ * 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 Attribute extends AbstractEntity {static get entityName() { return "attributes"; }static get primaryKeyName() { return "attributeId"; }diff --git a/src/becca/entities/branch.js b/src/becca/entities/branch.jsindex 83f77b2bc7..6b2031ddb8 100644--- a/src/becca/entities/branch.js+++ b/src/becca/entities/branch.js@@ -5,6 +5,10 @@ const AbstractEntity = require("./abstract_entity.js");const sql = require("../../services/sql.js");const dateUtils = require("../../services/date_utils.js");+/**+ * Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple+ * parents.+ */class Branch extends AbstractEntity {static get entityName() { return "branches"; }static get primaryKeyName() { return "branchId"; }diff --git a/src/becca/entities/note.js b/src/becca/entities/note.jsindex 449951b9f6..6566bf8311 100644--- a/src/becca/entities/note.js+++ b/src/becca/entities/note.js@@ -12,6 +12,9 @@ const NoteRevision = require("./note_revision.js");const LABEL = 'label';const RELATION = 'relation';+/**+ * Trilium's main entity which can represent text note, image, code note, file attachment etc.+ */class Note extends AbstractEntity {static get entityName() { return "notes"; }static get primaryKeyName() { return "noteId"; }@@ -78,35 +81,47 @@ class Note extends AbstractEntity {}init() {- /** @param {Branch[]} */+ /** @type {Branch[]} */this.parentBranches = [];- /** @param {Note[]} */+ /** @type {Note[]} */this.parents = [];- /** @param {Note[]} */+ /** @type {Note[]} */this.children = [];- /** @param {Attribute[]} */+ /** @type {Attribute[]} */this.ownedAttributes = [];- /** @param {Attribute[]|null} */+ /** @type {Attribute[]|null}+ * @private */this.__attributeCache = null;- /** @param {Attribute[]|null} */+ /** @type {Attribute[]|null}+ * @private*/this.inheritableAttributeCache = null;- /** @param {Attribute[]} */+ /** @type {Attribute[]} */this.targetRelations = [];this.becca.addNote(this.noteId, this);- /** @param {Note[]|null} */+ /** @type {Note[]|null}+ * @private */this.ancestorCache = null;// following attributes are filled during searching from database- /** @param {int} size of the content in bytes */+ /**+ * size of the content in bytes+ * @type {int|null}+ */this.contentSize = null;- /** @param {int} size of the content and note revision contents in bytes */+ /**+ * size of the content and note revision contents in bytes+ * @type {int|null}+ */this.noteSize = null;- /** @param {int} number of note revisions for this note */+ /**+ * number of note revisions for this note+ * @type {int|null}+ */this.revisionCount = null;}diff --git a/src/becca/entities/note_revision.js b/src/becca/entities/note_revision.jsindex 1dd6aceef7..59e3855d23 100644--- a/src/becca/entities/note_revision.js+++ b/src/becca/entities/note_revision.js@@ -9,7 +9,8 @@ const entityChangesService = require('../../services/entity_changes');const AbstractEntity = require("./abstract_entity.js");/**- * NoteRevision represents snapshot of note's title and content at some point in the past. It's used for seamless note versioning.+ * NoteRevision represents snapshot of note's title and content at some point in the past.+ * It's used for seamless note versioning.*/class NoteRevision extends AbstractEntity {static get entityName() { return "note_revisions"; }diff --git a/src/becca/entities/option.js b/src/becca/entities/option.jsindex 5998409756..f38e3f45b5 100644--- a/src/becca/entities/option.js+++ b/src/becca/entities/option.js@@ -14,9 +14,13 @@ class Option extends AbstractEntity {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;diff --git a/src/becca/entities/recent_note.js b/src/becca/entities/recent_note.jsindex 06776d965c..3cb213c04f 100644--- a/src/becca/entities/recent_note.js+++ b/src/becca/entities/recent_note.js@@ -13,8 +13,11 @@ class RecentNote extends AbstractEntity {constructor(row) {super();+ /** @type {string} */this.noteId = row.noteId;+ /** @type {string} */this.notePath = row.notePath;+ /** @type {string} */this.utcDateCreated = row.utcDateCreated || dateUtils.utcNowDateTime();}diff --git a/src/public/app/entities/attribute.js b/src/public/app/entities/attribute.jsindex 99c5416eb7..80f255d6cc 100644--- a/src/public/app/entities/attribute.js+++ b/src/public/app/entities/attribute.js@@ -1,5 +1,9 @@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 Attribute {constructor(froca, row) {this.froca = froca;@@ -8,19 +12,19 @@ class Attribute {}update(row) {- /** @type {string} attributeId */+ /** @type {string} */this.attributeId = row.attributeId;- /** @type {string} noteId */+ /** @type {string} */this.noteId = row.noteId;- /** @type {string} type */+ /** @type {string} */this.type = row.type;- /** @type {string} name */+ /** @type {string} */this.name = row.name;- /** @type {string} value */+ /** @type {string} */this.value = row.value;- /** @type {int} position */+ /** @type {int} */this.position = row.position;- /** @type {boolean} isInheritable */+ /** @type {boolean} */this.isInheritable = !!row.isInheritable;}diff --git a/src/public/app/entities/branch.js b/src/public/app/entities/branch.jsindex 14fa4951bf..5abbbcc44e 100644--- a/src/public/app/entities/branch.js+++ b/src/public/app/entities/branch.js@@ -1,4 +1,7 @@-/** Represents mapping between note and parent note */+/**+ * Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple+ * parents.+ */class Branch {constructor(froca, row) {this.froca = froca;@@ -7,7 +10,10 @@ class Branch {}update(row) {- /** @type {string} primary key */+ /**+ * primary key+ * @type {string}+ */this.branchId = row.branchId;/** @type {string} */this.noteId = row.noteId;diff --git a/src/public/app/entities/note_complement.js b/src/public/app/entities/note_complement.jsindex 639f916559..e2c0e1250f 100644--- a/src/public/app/entities/note_complement.js+++ b/src/public/app/entities/note_complement.js@@ -7,7 +7,8 @@ class NoteComplement {this.noteId = row.noteId;/**- * @type {string} - can either contain the whole content (in e.g. string notes), only part (large text notes) or nothing at all (binary notes, images)+ * 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;diff --git a/src/public/app/entities/note_short.js b/src/public/app/entities/note_short.jsindex 1e3494030e..3001486a16 100644--- a/src/public/app/entities/note_short.js+++ b/src/public/app/entities/note_short.js@@ -59,9 +59,15 @@ class NoteShort {this.title = row.title;/** @type {boolean} */this.isProtected = !!row.isProtected;- /** @type {string} one of 'text', 'code', 'file' or 'render' */+ /**+ * one of 'text', 'code', 'file' or 'render'+ * @type {string}+ */this.type = row.type;- /** @type {string} content-type, e.g. "application/json" */+ /**+ * content-type, e.g. "application/json"+ * @type {string}+ */this.mime = row.mime;}