Skip to content

Build your personal knowledge base with Trilium Notes

fixed switch between autobook and text

zadam27ab55d26a5b
diff --git a/docs/backend_api/Attribute.html b/docs/backend_api/Attribute.html
index 8df31066ff..b77a8819d7 100644
--- a/docs/backend_api/Attribute.html
+++ b/docs/backend_api/Attribute.html
@@ -272,6 +272,32 @@
+ <tr>
+
+ <td class="name"><code>deleteId</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+|
+
+<span class="param-type">null</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last">ID identifying delete transaction</td>
+ </tr>
+
+
+
<tr>
<td class="name"><code>utcDateCreated</code></td>
@@ -352,7 +378,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#line29">line 29</a>
+ <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line30">line 30</a>
</li></ul></dd>
@@ -467,7 +493,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#line46">line 46</a>
+ <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line47">line 47</a>
</li></ul></dd>
@@ -569,7 +595,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#line57">line 57</a>
+ <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line58">line 58</a>
</li></ul></dd>
@@ -671,7 +697,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#line76">line 76</a>
+ <a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line77">line 77</a>
</li></ul></dd>
diff --git a/docs/backend_api/Branch.html b/docs/backend_api/Branch.html
index dc7fe59aa3..59f845dc4e 100644
--- a/docs/backend_api/Branch.html
+++ b/docs/backend_api/Branch.html
@@ -250,6 +250,32 @@ Each note can have multiple (at least one) branches, meaning it can be placed in
+ <tr>
+
+ <td class="name"><code>deleteId</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+|
+
+<span class="param-type">null</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last">ID identifying delete transaction</td>
+ </tr>
+
+
+
<tr>
<td class="name"><code>utcDateModified</code></td>
@@ -330,7 +356,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#line30">line 30</a>
+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line25">line 25</a>
</li></ul></dd>
@@ -445,7 +471,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#line38">line 38</a>
+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line32">line 32</a>
</li></ul></dd>
diff --git a/docs/backend_api/Note.html b/docs/backend_api/Note.html
index c76b51f48a..fad34eef74 100644
--- a/docs/backend_api/Note.html
+++ b/docs/backend_api/Note.html
@@ -293,6 +293,32 @@
+ <tr>
+
+ <td class="name"><code>deleteId</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+|
+
+<span class="param-type">null</span>
+
+
+
+ </td>
+
+
+
+
+
+ <td class="description last">ID identifying delete transaction</td>
+ </tr>
+
+
+
<tr>
<td class="name"><code>isErased</code></td>
@@ -442,7 +468,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#line43">line 43</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line44">line 44</a>
</li></ul></dd>
@@ -557,7 +583,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#line540">line 540</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line547">line 547</a>
</li></ul></dd>
@@ -659,7 +685,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#line868">line 868</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line875">line 875</a>
</li></ul></dd>
@@ -837,7 +863,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#line436">line 436</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line443">line 443</a>
</li></ul></dd>
@@ -1037,7 +1063,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#line254">line 254</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line261">line 261</a>
</li></ul></dd>
@@ -1215,7 +1241,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#line447">line 447</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line454">line 454</a>
</li></ul></dd>
@@ -1321,7 +1347,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#line814">line 814</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line821">line 821</a>
</li></ul></dd>
@@ -1423,7 +1449,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#line842">line 842</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line849">line 849</a>
</li></ul></dd>
@@ -1529,7 +1555,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#line828">line 828</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line835">line 835</a>
</li></ul></dd>
@@ -1635,7 +1661,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#line74">line 74</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line75">line 75</a>
</li></ul></dd>
@@ -1737,7 +1763,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#line714">line 714</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line721">line 721</a>
</li></ul></dd>
@@ -1970,7 +1996,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#line737">line 737</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line744">line 744</a>
</li></ul></dd>
@@ -2168,7 +2194,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#line775">line 775</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line782">line 782</a>
</li></ul></dd>
@@ -2366,7 +2392,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#line784">line 784</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line791">line 791</a>
</li></ul></dd>
@@ -2468,7 +2494,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#line109">line 109</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line110">line 110</a>
</li></ul></dd>
@@ -2619,7 +2645,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#line591">line 591</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line598">line 598</a>
</li></ul></dd>
@@ -2786,7 +2812,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#line293">line 293</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line300">line 300</a>
</li></ul></dd>
@@ -2953,7 +2979,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#line277">line 277</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line284">line 284</a>
</li></ul></dd>
@@ -3108,7 +3134,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#line615">line 615</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line622">line 622</a>
</li></ul></dd>
@@ -3220,7 +3246,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#line801">line 801</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line808">line 808</a>
</li></ul></dd>
@@ -3322,7 +3348,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#line236">line 236</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line243">line 243</a>
</li></ul></dd>
@@ -3529,7 +3555,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#line212">line 212</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line219">line 219</a>
</li></ul></dd>
@@ -3707,7 +3733,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#line458">line 458</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line465">line 465</a>
</li></ul></dd>
@@ -3862,7 +3888,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#line597">line 597</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line604">line 604</a>
</li></ul></dd>
@@ -4029,7 +4055,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#line285">line 285</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line292">line 292</a>
</li></ul></dd>
@@ -4184,7 +4210,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#line621">line 621</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line628">line 628</a>
</li></ul></dd>
@@ -4339,7 +4365,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#line609">line 609</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line616">line 616</a>
</li></ul></dd>
@@ -4506,7 +4532,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#line309">line 309</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line316">line 316</a>
</li></ul></dd>
@@ -4661,7 +4687,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#line649">line 649</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line656">line 656</a>
</li></ul></dd>
@@ -4819,7 +4845,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#line633">line 633</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line640">line 640</a>
</li></ul></dd>
@@ -4925,7 +4951,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#line854">line 854</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line861">line 861</a>
</li></ul></dd>
@@ -5080,7 +5106,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#line603">line 603</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line610">line 610</a>
</li></ul></dd>
@@ -5247,7 +5273,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#line332">line 332</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line339">line 339</a>
</li></ul></dd>
@@ -5414,7 +5440,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#line301">line 301</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line308">line 308</a>
</li></ul></dd>
@@ -5569,7 +5595,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#line639">line 639</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line646">line 646</a>
</li></ul></dd>
@@ -5739,7 +5765,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#line317">line 317</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line324">line 324</a>
</li></ul></dd>
@@ -5890,7 +5916,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#line627">line 627</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line634">line 634</a>
</li></ul></dd>
@@ -6000,7 +6026,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#line791">line 791</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line798">line 798</a>
</li></ul></dd>
@@ -6102,7 +6128,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#line183">line 183</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line190">line 190</a>
</li></ul></dd>
@@ -6208,7 +6234,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#line245">line 245</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line252">line 252</a>
</li></ul></dd>
@@ -6386,7 +6412,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#line418">line 418</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line425">line 425</a>
</li></ul></dd>
@@ -6492,7 +6518,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#line821">line 821</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line828">line 828</a>
</li></ul></dd>
@@ -6647,7 +6673,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#line567">line 567</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line574">line 574</a>
</li></ul></dd>
@@ -6825,7 +6851,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#line427">line 427</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line434">line 434</a>
</li></ul></dd>
@@ -6980,7 +7006,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#line573">line 573</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line580">line 580</a>
</li></ul></dd>
@@ -7135,7 +7161,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#line585">line 585</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line592">line 592</a>
</li></ul></dd>
@@ -7290,7 +7316,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#line579">line 579</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line586">line 586</a>
</li></ul></dd>
@@ -7401,7 +7427,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#line340">line 340</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line347">line 347</a>
</li></ul></dd>
@@ -7529,7 +7555,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#line889">line 889</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line896">line 896</a>
</li></ul></dd>
@@ -7635,7 +7661,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#line173">line 173</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line180">line 180</a>
</li></ul></dd>
@@ -7741,7 +7767,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#line165">line 165</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line172">line 172</a>
</li></ul></dd>
@@ -7847,7 +7873,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#line160">line 160</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line167">line 167</a>
</li></ul></dd>
@@ -7953,7 +7979,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#line155">line 155</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line162">line 162</a>
</li></ul></dd>
@@ -8059,7 +8085,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#line178">line 178</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line185">line 185</a>
</li></ul></dd>
@@ -8165,7 +8191,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#line346">line 346</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line353">line 353</a>
</li></ul></dd>
@@ -8394,7 +8420,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#line524">line 524</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line531">line 531</a>
</li></ul></dd>
@@ -8592,7 +8618,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#line700">line 700</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line707">line 707</a>
</li></ul></dd>
@@ -8790,7 +8816,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#line709">line 709</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line716">line 716</a>
</li></ul></dd>
@@ -9019,7 +9045,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#line490">line 490</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line497">line 497</a>
</li></ul></dd>
@@ -9121,7 +9147,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#line116">line 116</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line121">line 121</a>
</li></ul></dd>
@@ -9223,7 +9249,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#line150">line 150</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line157">line 157</a>
</li></ul></dd>
@@ -9421,7 +9447,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="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line689">line 689</a>
</li></ul></dd>
@@ -9619,7 +9645,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#line691">line 691</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line698">line 698</a>
</li></ul></dd>
@@ -9879,7 +9905,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#line473">line 473</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line480">line 480</a>
</li></ul></dd>
@@ -10108,7 +10134,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#line663">line 663</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line670">line 670</a>
</li></ul></dd>
@@ -10337,7 +10363,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#line673">line 673</a>
+ <a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line680">line 680</a>
</li></ul></dd>
diff --git a/docs/backend_api/entities_attribute.js.html b/docs/backend_api/entities_attribute.js.html
index 8a2e0673f4..0b77893ce5 100644
--- a/docs/backend_api/entities_attribute.js.html
+++ b/docs/backend_api/entities_attribute.js.html
@@ -44,6 +44,7 @@ const sql = require('../services/sql');
* @property {int} position
* @property {boolean} isInheritable
* @property {boolean} isDeleted
+ * @property {string|null} deleteId - ID identifying delete transaction
* @property {string} utcDateCreated
* @property {string} utcDateModified
*
@@ -143,6 +144,20 @@ class Attribute extends Entity {
delete pojo.isOwned;
delete pojo.__note;
}
+
+ createClone(type, name, value) {
+ return new Attribute({
+ noteId: this.noteId,
+ type: type,
+ name: name,
+ value: value,
+ position: this.position,
+ isInheritable: this.isInheritable,
+ isDeleted: false,
+ utcDateCreated: this.utcDateCreated,
+ utcDateModified: this.utcDateModified
+ });
+ }
}
module.exports = Attribute;</code></pre>
diff --git a/docs/backend_api/entities_branch.js.html b/docs/backend_api/entities_branch.js.html
index c8c2e48666..3f27832890 100644
--- a/docs/backend_api/entities_branch.js.html
+++ b/docs/backend_api/entities_branch.js.html
@@ -44,6 +44,7 @@ const sql = require('../services/sql');
* @property {string} prefix
* @property {boolean} isExpanded
* @property {boolean} isDeleted
+ * @property {string|null} deleteId - ID identifying delete transaction
* @property {string} utcDateModified
* @property {string} utcDateCreated
*
@@ -53,14 +54,7 @@ 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", "prefix"]; }
-
- constructor(row = {}) {
- super(row);
-
- // used to detect move in note tree
- this.origParentNoteId = this.parentNoteId;
- }
+ static get hashedProperties() { return ["branchId", "noteId", "parentNoteId", "isDeleted", "deleteId", "prefix"]; }
/** @returns {Note|null} */
async getNote() {
@@ -92,9 +86,17 @@ class Branch extends Entity {
}
}
- // cannot be static!
- updatePojo(pojo) {
- delete pojo.origParentNoteId;
+ 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
+ });
}
}
diff --git a/docs/backend_api/entities_note.js.html b/docs/backend_api/entities_note.js.html
index 491a861008..c199be200d 100644
--- a/docs/backend_api/entities_note.js.html
+++ b/docs/backend_api/entities_note.js.html
@@ -52,6 +52,7 @@ const RELATION_DEFINITION = 'relation-definition';
* @property {int} contentLength - length of content
* @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 {boolean} isErased - true if note's content is erased after it has been deleted
* @property {string} dateCreated - local date time (with offset)
* @property {string} dateModified - local date time (with offset)
@@ -63,7 +64,7 @@ const RELATION_DEFINITION = 'relation-definition';
class Note extends Entity {
static get entityName() { return "notes"; }
static get primaryKeyName() { return "noteId"; }
- static get hashedProperties() { return ["noteId", "title", "type", "isProtected", "isDeleted"]; }
+ static get hashedProperties() { return ["noteId", "title", "type", "isProtected", "isDeleted", "deleteId"]; }
/**
* @param row - object containing database row from "notes" table
@@ -137,6 +138,10 @@ class Note extends Entity {
async getJsonContent() {
const content = await this.getContent();
+ if (!content || !content.trim()) {
+ return null;
+ }
+
return JSON.parse(content);
}
@@ -146,9 +151,11 @@ class Note extends Entity {
throw new Error(`Cannot set null content to note ${this.noteId}`);
}
+ content = Buffer.isBuffer(content) ? content : Buffer.from(content);
+
// force updating note itself so that dateModified is represented correctly even for the content
this.forcedChange = true;
- this.contentLength = content.length;
+ this.contentLength = content.byteLength;
await this.save();
this.content = content;
@@ -157,7 +164,7 @@ class Note extends Entity {
noteId: this.noteId,
content: content,
utcDateModified: dateUtils.utcNowDateTime(),
- hash: utils.hash(this.noteId + "|" + content)
+ hash: utils.hash(this.noteId + "|" + content.toString())
};
if (this.isProtected) {
@@ -833,7 +840,7 @@ class Note extends Entity {
WHERE noteId = ? AND
isDeleted = 0 AND
type = 'relation' AND
- name IN ('internalLink', 'imageLink', 'relationMapLink')`, [this.noteId]);
+ name IN ('internalLink', 'imageLink', 'relationMapLink', 'includeNoteLink')`, [this.noteId]);
}
/**
diff --git a/docs/frontend_api/Branch.html b/docs/frontend_api/Branch.html
index c2fdbb4f56..17e0c710ab 100644
--- a/docs/frontend_api/Branch.html
+++ b/docs/frontend_api/Branch.html
@@ -183,7 +183,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#line6">line 6</a>
+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line11">line 11</a>
</li></ul></dd>
@@ -241,7 +241,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#line16">line 16</a>
+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line21">line 21</a>
</li></ul></dd>
@@ -299,7 +299,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#line8">line 8</a>
+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line13">line 13</a>
</li></ul></dd>
@@ -357,7 +357,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#line12">line 12</a>
+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line17">line 17</a>
</li></ul></dd>
@@ -415,7 +415,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#line10">line 10</a>
+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line15">line 15</a>
</li></ul></dd>
@@ -473,7 +473,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#line14">line 14</a>
+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line19">line 19</a>
</li></ul></dd>
@@ -549,7 +549,109 @@
<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#line20">line 20</a>
+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line25">line 25</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>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="getParentNote"><span class="type-signature">(async) </span>getParentNote<span class="signature">()</span><span class="type-signature"> &rarr; {<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_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line30">line 30</a>
</li></ul></dd>
@@ -651,7 +753,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#line25">line 25</a>
+ <a href="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line35">line 35</a>
</li></ul></dd>
@@ -719,7 +821,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="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>
+ <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><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
diff --git a/docs/frontend_api/FrontendScriptApi.html b/docs/frontend_api/FrontendScriptApi.html
index f556d7d72e..525fc8b05f 100644
--- a/docs/frontend_api/FrontendScriptApi.html
+++ b/docs/frontend_api/FrontendScriptApi.html
@@ -1306,7 +1306,7 @@
- <td class="description last"></td>
+ <td class="description last">this must be clear text, HTML is not supported.</td>
</tr>
@@ -1347,7 +1347,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#line305">line 305</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line287">line 287</a>
</li></ul></dd>
@@ -1503,7 +1503,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#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#line382">line 382</a>
</li></ul></dd>
@@ -1683,7 +1683,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#line297">line 297</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line279">line 279</a>
</li></ul></dd>
@@ -1816,7 +1816,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#line241">line 241</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line239">line 239</a>
</li></ul></dd>
@@ -1874,7 +1874,7 @@
- <h4 class="name" id="getActiveTabNote"><span class="type-signature"></span>getActiveTabNote<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="NoteFull.html">NoteFull</a>}</span></h4>
+ <h4 class="name" id="getActiveTabNote"><span class="type-signature"></span>getActiveTabNote<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="NoteShort.html">NoteShort</a>}</span></h4>
@@ -1922,7 +1922,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#line311">line 311</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line293">line 293</a>
</li></ul></dd>
@@ -1962,7 +1962,7 @@
</dt>
<dd>
-<span class="param-type"><a href="NoteFull.html">NoteFull</a></span>
+<span class="param-type"><a href="NoteShort.html">NoteShort</a></span>
</dd>
@@ -2028,7 +2028,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#line325">line 325</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line307">line 307</a>
</li></ul></dd>
@@ -2086,7 +2086,7 @@
- <h4 class="name" id="getActiveTabTextEditor"><span class="type-signature"></span>getActiveTabTextEditor<span class="signature">()</span><span class="type-signature"> &rarr; {Editor|null}</span></h4>
+ <h4 class="name" id="getActiveTabTextEditor"><span class="type-signature"></span>getActiveTabTextEditor<span class="signature">(callback)</span><span class="type-signature"></span></h4>
@@ -2105,6 +2105,50 @@
+ <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>callback</code></td>
+
+
+ <td class="type">
+
+ </td>
+
+
+
+
+
+ <td class="description last">method receiving "textEditor" instance</td>
+ </tr>
+
+
+ </tbody>
+</table>
+
+
@@ -2138,7 +2182,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#line319">line 319</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line301">line 301</a>
</li></ul></dd>
@@ -2163,31 +2207,6 @@
-<h5>Returns:</h5>
-
-
-<div class="param-desc">
- CKEditor instance or null (e.g. if active note is not a text note)
-</div>
-
-
-
-<dl>
- <dt>
- Type
- </dt>
- <dd>
-
-<span class="param-type">Editor</span>
-|
-
-<span class="param-type">null</span>
-
-
- </dd>
-</dl>
-
-
@@ -2300,7 +2319,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#line372">line 372</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line348">line 348</a>
</li></ul></dd>
@@ -2407,7 +2426,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#line234">line 234</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line232">line 232</a>
</li></ul></dd>
@@ -2562,7 +2581,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#line381">line 381</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line357">line 357</a>
</li></ul></dd>
@@ -2718,7 +2737,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#line206">line 206</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line204">line 204</a>
</li></ul></dd>
@@ -2919,7 +2938,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#line218">line 218</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line216">line 216</a>
</li></ul></dd>
@@ -3025,7 +3044,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#line363">line 363</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line339">line 339</a>
</li></ul></dd>
@@ -3180,7 +3199,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#line390">line 390</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line366">line 366</a>
</li></ul></dd>
@@ -3289,7 +3308,7 @@ note.
<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#line336">line 336</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line318">line 318</a>
</li></ul></dd>
@@ -3341,139 +3360,6 @@ note.
-
-
-
-
-
-
- <h4 class="name" id="onNoteChange"><span class="type-signature"></span>onNoteChange<span class="signature">(func)</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>func</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">function</span>
-
-
-
- </td>
-
-
-
-
-
- <td class="description last">callback called on note change as user is typing (not necessarily tied to save event)</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#line344">line 344</a>
- </li></ul></dd>
-
-
-
-
-
-
-
-</dl>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -3577,7 +3463,7 @@ note.
<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#line248">line 248</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line246">line 246</a>
</li></ul></dd>
@@ -3683,7 +3569,7 @@ note.
<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#line355">line 355</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line331">line 331</a>
</li></ul></dd>
@@ -3713,218 +3599,6 @@ note.
-
-
-
-
-
-
- <h4 class="name" id="refreshActiveTab"><span class="type-signature"></span>refreshActiveTab<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4>
-
-
-
-
-
-
-<div class="description">
- Refresh active tab
-</div>
-
-
-
-
-
-
-
-
-
-
-
-
-
-<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#line280">line 280</a>
- </li></ul></dd>
-
-
-
-
-
-
-
-</dl>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<h5>Returns:</h5>
-
-
-
-
-<dl>
- <dt>
- Type
- </dt>
- <dd>
-
-<span class="param-type">Promise.&lt;void></span>
-
-
- </dd>
-</dl>
-
-
-
-
-
-
-
-
-
-
-
-
-
- <h4 class="name" id="refreshAllTabs"><span class="type-signature"></span>refreshAllTabs<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4>
-
-
-
-
-
-
-<div class="description">
- Refresh current tab
-</div>
-
-
-
-
-
-
-
-
-
-
-
-
-
-<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#line288">line 288</a>
- </li></ul></dd>
-
-
-
-
-
-
-
-</dl>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<h5>Returns:</h5>
-
-
-
-
-<dl>
- <dt>
- Type
- </dt>
- <dd>
-
-<span class="param-type">Promise.&lt;void></span>
-
-
- </dd>
-</dl>
-
-
-
-
-
-
-
@@ -3983,7 +3657,7 @@ note.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line272">line 272</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line270">line 270</a>
</li></ul></dd>
@@ -4138,7 +3812,7 @@ note.
<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#line226">line 226</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line224">line 224</a>
</li></ul></dd>
@@ -4407,7 +4081,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#line166">line 166</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line164">line 164</a>
</li></ul></dd>
@@ -4545,7 +4219,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#line194">line 194</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line192">line 192</a>
</li></ul></dd>
@@ -4701,7 +4375,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#line176">line 176</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line174">line 174</a>
</li></ul></dd>
@@ -4856,7 +4530,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#line399">line 399</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line375">line 375</a>
</li></ul></dd>
@@ -5007,7 +4681,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#line350">line 350</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line326">line 326</a>
</li></ul></dd>
@@ -5144,7 +4818,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#line264">line 264</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line262">line 262</a>
</li></ul></dd>
@@ -5281,7 +4955,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#line256">line 256</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line254">line 254</a>
</li></ul></dd>
@@ -5373,7 +5047,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#line417">line 417</a>
+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line393">line 393</a>
</li></ul></dd>
@@ -5419,7 +5093,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="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>
+ <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><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
diff --git a/docs/frontend_api/NoteComplement.html b/docs/frontend_api/NoteComplement.html
new file mode 100644
index 0000000000..dedca732a4
--- /dev/null
+++ b/docs/frontend_api/NoteComplement.html
@@ -0,0 +1,522 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>JSDoc: Class: NoteComplement</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: NoteComplement</h1>
+
+
+
+
+
+
+<section>
+
+<header>
+
+ <h2><span class="attribs"><span class="type-signature"></span></span>NoteComplement<span class="signature">()</span><span class="type-signature"></span></h2>
+
+ <div class="class-description">Complements the NoteShort with the main note content and other extra attributes</div>
+
+
+</header>
+
+<article>
+ <div class="container-overview">
+
+
+
+
+ <h2>Constructor</h2>
+
+
+
+ <h4 class="name" id="NoteComplement"><span class="type-signature"></span>new NoteComplement<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_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line5">line 5</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_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line10">line 10</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_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line13">line 13</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_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line16">line 16</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<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_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line7">line 7</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_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line19">line 19</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_complement.js.html">entities/note_complement.js</a>, <a href="entities_note_complement.js.html#line22">line 22</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="NoteComplement.html">NoteComplement</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 file
diff --git a/docs/frontend_api/NoteShort.html b/docs/frontend_api/NoteShort.html
index e4766ce540..20d98d86e4 100644
--- a/docs/frontend_api/NoteShort.html
+++ b/docs/frontend_api/NoteShort.html
@@ -28,7 +28,7 @@
<header>
- <h2><span class="attribs"><span class="type-signature"></span></span>NoteShort<span class="signature">(treeCache, row, branches)</span><span class="type-signature"></span></h2>
+ <h2><span class="attribs"><span class="type-signature"></span></span>NoteShort<span class="signature">(treeCache, row)</span><span class="type-signature"></span></h2>
<div class="class-description">This note's representation is used in note tree and is kept in TreeCache.</div>
@@ -45,7 +45,7 @@
- <h4 class="name" id="NoteShort"><span class="type-signature"></span>new NoteShort<span class="signature">(treeCache, row, branches)</span><span class="type-signature"></span></h4>
+ <h4 class="name" id="NoteShort"><span class="type-signature"></span>new NoteShort<span class="signature">(treeCache, row)</span><span class="type-signature"></span></h4>
@@ -128,29 +128,6 @@
</tr>
-
- <tr>
-
- <td class="name"><code>branches</code></td>
-
-
- <td class="type">
-
-
-<span class="param-type">Array.&lt;<a href="Branch.html">Branch</a>></span>
-
-
-
- </td>
-
-
-
-
-
- <td class="description last">all relevant branches, i.e. where this note is either child or parent</td>
- </tr>
-
-
</tbody>
</table>
@@ -188,7 +165,7 @@
<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#line18">line 18</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line17">line 17</a>
</li></ul></dd>
@@ -238,13 +215,23 @@
-<h4 class="name" id="archived"><span class="type-signature"></span>archived<span class="type-signature"></span></h4>
+<h4 class="name" id="attributes"><span class="type-signature"></span>attributes<span class="type-signature"> :Array.&lt;string></span></h4>
+ <h5>Type:</h5>
+ <ul>
+ <li>
+
+<span class="param-type">Array.&lt;string></span>
+
+
+ </li>
+ </ul>
+
@@ -278,7 +265,7 @@
<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#line35">line 35</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line21">line 21</a>
</li></ul></dd>
@@ -346,7 +333,7 @@
<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#line44">line 44</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line29">line 29</a>
</li></ul></dd>
@@ -414,7 +401,7 @@
<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#line50">line 50</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line35">line 35</a>
</li></ul></dd>
@@ -472,7 +459,7 @@
<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#line25">line 25</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line46">line 46</a>
</li></ul></dd>
@@ -490,7 +477,7 @@
-<h4 class="name" id="cssClass"><span class="type-signature"></span>cssClass<span class="type-signature"></span></h4>
+<h4 class="name" id="isDeleted"><span class="type-signature"></span>isDeleted<span class="type-signature"></span></h4>
@@ -530,7 +517,7 @@
<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#line37">line 37</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line54">line 54</a>
</li></ul></dd>
@@ -548,7 +535,7 @@
-<h4 class="name" id="iconClass"><span class="type-signature"></span>iconClass<span class="type-signature"></span></h4>
+<h4 class="name" id="isProtected"><span class="type-signature"></span>isProtected<span class="type-signature"></span></h4>
@@ -588,7 +575,7 @@
<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#line39">line 39</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line48">line 48</a>
</li></ul></dd>
@@ -606,7 +593,7 @@
-<h4 class="name" id="isDeleted"><span class="type-signature"></span>isDeleted<span class="type-signature"></span></h4>
+<h4 class="name" id="mime"><span class="type-signature"></span>mime<span class="type-signature"></span></h4>
@@ -646,7 +633,7 @@
<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#line33">line 33</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line52">line 52</a>
</li></ul></dd>
@@ -664,7 +651,7 @@
-<h4 class="name" id="isProtected"><span class="type-signature"></span>isProtected<span class="type-signature"></span></h4>
+<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"></span></h4>
@@ -704,7 +691,7 @@
<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#line27">line 27</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line42">line 42</a>
</li></ul></dd>
@@ -722,70 +709,22 @@
-<h4 class="name" id="mime"><span class="type-signature"></span>mime<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_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line31">line 31</a>
- </li></ul></dd>
-
-
-
-
-
-
-
-</dl>
+<h4 class="name" id="parents"><span class="type-signature"></span>parents<span class="type-signature"> :Array.&lt;string></span></h4>
-
+ <h5>Type:</h5>
+ <ul>
+ <li>
-<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"></span></h4>
-
-
-
+<span class="param-type">Array.&lt;string></span>
+ </li>
+ </ul>
@@ -820,7 +759,7 @@
<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#line21">line 21</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line27">line 27</a>
</li></ul></dd>
@@ -838,7 +777,7 @@
-<h4 class="name" id="parents"><span class="type-signature"></span>parents<span class="type-signature"> :Array.&lt;string></span></h4>
+<h4 class="name" id="parentToBranch"><span class="type-signature"></span>parentToBranch<span class="type-signature"> :Object.&lt;string, string></span></h4>
@@ -849,7 +788,7 @@
<ul>
<li>
-<span class="param-type">Array.&lt;string></span>
+<span class="param-type">Object.&lt;string, string></span>
</li>
@@ -888,7 +827,7 @@
<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#line42">line 42</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line32">line 32</a>
</li></ul></dd>
@@ -906,7 +845,7 @@
-<h4 class="name" id="parentToBranch"><span class="type-signature"></span>parentToBranch<span class="type-signature"> :Object.&lt;string, string></span></h4>
+<h4 class="name" id="targetRelations"><span class="type-signature"></span>targetRelations<span class="type-signature"> :Array.&lt;string></span></h4>
@@ -917,7 +856,7 @@
<ul>
<li>
-<span class="param-type">Object.&lt;string, string></span>
+<span class="param-type">Array.&lt;string></span>
</li>
@@ -956,7 +895,7 @@
<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#line47">line 47</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line24">line 24</a>
</li></ul></dd>
@@ -1014,7 +953,7 @@
<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#line23">line 23</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line44">line 44</a>
</li></ul></dd>
@@ -1072,7 +1011,7 @@
<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#line29">line 29</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line50">line 50</a>
</li></ul></dd>
@@ -1220,7 +1159,7 @@
<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#line227">line 227</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line290">line 290</a>
</li></ul></dd>
@@ -1420,7 +1359,7 @@
<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#line161">line 161</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>
@@ -1598,7 +1537,7 @@
<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#line238">line 238</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line312">line 312</a>
</li></ul></dd>
@@ -1704,7 +1643,7 @@
<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#line117">line 117</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line107">line 107</a>
</li></ul></dd>
@@ -1806,7 +1745,7 @@
<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#line129">line 129</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line119">line 119</a>
</li></ul></dd>
@@ -1908,7 +1847,7 @@
<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#line147">line 147</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line137">line 137</a>
</li></ul></dd>
@@ -2010,7 +1949,7 @@
<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#line152">line 152</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line142">line 142</a>
</li></ul></dd>
@@ -2161,7 +2100,7 @@
<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#line260">line 260</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line352">line 352</a>
</li></ul></dd>
@@ -2328,7 +2267,7 @@
<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#line193">line 193</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line228">line 228</a>
</li></ul></dd>
@@ -2495,7 +2434,7 @@
<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#line185">line 185</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line220">line 220</a>
</li></ul></dd>
@@ -2650,7 +2589,7 @@
<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#line272">line 272</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line376">line 376</a>
</li></ul></dd>
@@ -2708,121 +2647,91 @@
- <h4 class="name" id="getParentNoteIds"><span class="type-signature"></span>getParentNoteIds<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;string>}</span></h4>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<dl class="details">
-
-
-
-
-
-
-
+ <h4 class="name" id="getOwnedAttribute"><span class="type-signature"></span>getOwnedAttribute<span class="signature">(type, name)</span><span class="type-signature"> &rarr; {<a href="Attribute.html">Attribute</a>}</span></h4>
-
-
-
-
-
-
-
-
- <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#line137">line 137</a>
- </li></ul></dd>
-
-
-
+ <h5>Parameters:</h5>
-</dl>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<h5>Returns:</h5>
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+ <th>Type</th>
-<dl>
- <dt>
- Type
- </dt>
- <dd>
-<span class="param-type">Array.&lt;string></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="getParentNotes"><span class="type-signature">(async) </span>getParentNotes<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="NoteShort.html">NoteShort</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>
@@ -2858,7 +2767,7 @@
<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#line142">line 142</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line279">line 279</a>
</li></ul></dd>
@@ -2886,6 +2795,10 @@
<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>
@@ -2894,7 +2807,7 @@
</dt>
<dd>
-<span class="param-type">Promise.&lt;Array.&lt;<a href="NoteShort.html">NoteShort</a>>></span>
+<span class="param-type"><a href="Attribute.html">Attribute</a></span>
</dd>
@@ -2912,7 +2825,7 @@
- <h4 class="name" id="getRelation"><span class="type-signature">(async) </span>getRelation<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="Attribute.html">Attribute</a>>}</span></h4>
+ <h4 class="name" id="getOwnedAttributes"><span class="type-signature"></span>getOwnedAttributes<span class="signature">(type<span class="signature-attributes">opt</span>, name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array.&lt;<a href="Attribute.html">Attribute</a>>}</span></h4>
@@ -2940,6 +2853,8 @@
<th>Type</th>
+ <th>Attributes</th>
+
@@ -2952,7 +2867,7 @@
<tr>
- <td class="name"><code>name</code></td>
+ <td class="name"><code>type</code></td>
<td class="type">
@@ -2965,11 +2880,54 @@
</td>
+ <td class="attributes">
+
+ &lt;optional><br>
+
+
+
+
+ </td>
- <td class="description last">relation name</td>
- </tr>
+
+
+ <td class="description last">(optional) attribute type to filter</td>
+ </tr>
+
+
+
+ <tr>
+
+ <td class="name"><code>name</code></td>
+
+
+ <td class="type">
+
+
+<span class="param-type">string</span>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ &lt;optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last">(optional) attribute name to filter</td>
+ </tr>
</tbody>
@@ -3009,7 +2967,7 @@
<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#line266">line 266</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>
@@ -3038,7 +2996,7 @@
<div class="param-desc">
- relation if it exists, null otherwise
+ all note's attributes, including inherited ones
</div>
@@ -3049,7 +3007,7 @@
</dt>
<dd>
-<span class="param-type">Promise.&lt;<a href="Attribute.html">Attribute</a>></span>
+<span class="param-type">Array.&lt;<a href="Attribute.html">Attribute</a>></span>
</dd>
@@ -3067,7 +3025,7 @@
- <h4 class="name" id="getRelationDefinitions"><span class="type-signature">(async) </span>getRelationDefinitions<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>>}</span></h4>
+ <h4 class="name" id="getOwnedAttributeValue"><span class="type-signature"></span>getOwnedAttributeValue<span class="signature">(type, name)</span><span class="type-signature"> &rarr; {string}</span></h4>
@@ -3095,8 +3053,6 @@
<th>Type</th>
- <th>Attributes</th>
-
@@ -3109,7 +3065,7 @@
<tr>
- <td class="name"><code>name</code></td>
+ <td class="name"><code>type</code></td>
<td class="type">
@@ -3122,20 +3078,33 @@
</td>
- <td class="attributes">
-
- &lt;optional><br>
-
-
+
+
+ <td class="description last">attribute type (label, relation, etc.)</td>
+ </tr>
+
+
+ <tr>
+
+ <td class="name"><code>name</code></td>
+
+
+ <td class="type">
+
- </td>
+<span class="param-type">string</span>
+
+
+
+ </td>
+
- <td class="description last">relation name to filter</td>
+ <td class="description last">attribute name</td>
</tr>
@@ -3176,7 +3145,7 @@
<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#line209">line 209</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line301">line 301</a>
</li></ul></dd>
@@ -3205,7 +3174,7 @@
<div class="param-desc">
- all note's relation definitions including inherited ones
+ attribute value of given type and name or null if no such attribute exists.
</div>
@@ -3216,7 +3185,7 @@
</dt>
<dd>
-<span class="param-type">Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>></span>
+<span class="param-type">string</span>
</dd>
@@ -3234,7 +3203,7 @@
- <h4 class="name" id="getRelations"><span class="type-signature">(async) </span>getRelations<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>>}</span></h4>
+ <h4 class="name" id="getOwnedLabel"><span class="type-signature"></span>getOwnedLabel<span class="signature">(name)</span><span class="type-signature"> &rarr; {<a href="Attribute.html">Attribute</a>}</span></h4>
@@ -3262,8 +3231,6 @@
<th>Type</th>
- <th>Attributes</th>
-
@@ -3289,20 +3256,10 @@
</td>
- <td class="attributes">
-
- &lt;optional><br>
-
-
-
-
-
- </td>
-
- <td class="description last">relation name to filter</td>
+ <td class="description last">label name</td>
</tr>
@@ -3343,7 +3300,7 @@
<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#line201">line 201</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line346">line 346</a>
</li></ul></dd>
@@ -3372,7 +3329,7 @@
<div class="param-desc">
- all note's relations (attributes with type relation), including inherited ones
+ label if it exists, null otherwise
</div>
@@ -3383,7 +3340,7 @@
</dt>
<dd>
-<span class="param-type">Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>></span>
+<span class="param-type"><a href="Attribute.html">Attribute</a></span>
</dd>
@@ -3401,7 +3358,7 @@
- <h4 class="name" id="getRelationTarget"><span class="type-signature">(async) </span>getRelationTarget<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="NoteShort.html">NoteShort</a>>|null}</span></h4>
+ <h4 class="name" id="getOwnedLabels"><span class="type-signature"></span>getOwnedLabels<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array.&lt;<a href="Attribute.html">Attribute</a>>}</span></h4>
@@ -3429,6 +3386,8 @@
<th>Type</th>
+ <th>Attributes</th>
+
@@ -3454,10 +3413,20 @@
</td>
+ <td class="attributes">
+
+ &lt;optional><br>
+
+
+
+
+
+ </td>
+
- <td class="description last"></td>
+ <td class="description last">label name to filter</td>
</tr>
@@ -3498,7 +3467,7 @@
<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#line284">line 284</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line212">line 212</a>
</li></ul></dd>
@@ -3527,7 +3496,7 @@
<div class="param-desc">
- target note of the relation or null (if target is empty or note was not found)
+ all note's labels (attributes with type label), including inherited ones
</div>
@@ -3538,10 +3507,7 @@
</dt>
<dd>
-<span class="param-type">Promise.&lt;<a href="NoteShort.html">NoteShort</a>></span>
-|
-
-<span class="param-type">null</span>
+<span class="param-type">Array.&lt;<a href="Attribute.html">Attribute</a>></span>
</dd>
@@ -3559,7 +3525,7 @@
- <h4 class="name" id="getRelationTargets"><span class="type-signature">(async) </span>getRelationTargets<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="NoteShort.html">NoteShort</a>>>}</span></h4>
+ <h4 class="name" id="getOwnedLabelValue"><span class="type-signature"></span>getOwnedLabelValue<span class="signature">(name)</span><span class="type-signature"> &rarr; {string}</span></h4>
@@ -3587,8 +3553,6 @@
<th>Type</th>
- <th>Attributes</th>
-
@@ -3614,20 +3578,10 @@
</td>
- <td class="attributes">
-
- &lt;optional><br>
-
-
-
-
-
- </td>
-
- <td class="description last">relation name to filter</td>
+ <td class="description last">label name</td>
</tr>
@@ -3668,7 +3622,7 @@
<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#line294">line 294</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line370">line 370</a>
</li></ul></dd>
@@ -3696,6 +3650,10 @@
<h5>Returns:</h5>
+<div class="param-desc">
+ label value if label exists, null otherwise
+</div>
+
<dl>
@@ -3704,7 +3662,7 @@
</dt>
<dd>
-<span class="param-type">Promise.&lt;Array.&lt;<a href="NoteShort.html">NoteShort</a>>></span>
+<span class="param-type">string</span>
</dd>
@@ -3722,7 +3680,7 @@
- <h4 class="name" id="getRelationValue"><span class="type-signature">(async) </span>getRelationValue<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;string>}</span></h4>
+ <h4 class="name" id="getOwnedRelation"><span class="type-signature"></span>getOwnedRelation<span class="signature">(name)</span><span class="type-signature"> &rarr; {<a href="Attribute.html">Attribute</a>}</span></h4>
@@ -3819,7 +3777,7 @@
<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#line278">line 278</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line358">line 358</a>
</li></ul></dd>
@@ -3848,7 +3806,7 @@
<div class="param-desc">
- relation value if relation exists, null otherwise
+ relation if it exists, null otherwise
</div>
@@ -3859,7 +3817,7 @@
</dt>
<dd>
-<span class="param-type">Promise.&lt;string></span>
+<span class="param-type"><a href="Attribute.html">Attribute</a></span>
</dd>
@@ -3877,16 +3835,13 @@
- <h4 class="name" id="getTargetRelations"><span class="type-signature">(async) </span>getTargetRelations<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>>}</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"> &rarr; {Array.&lt;<a href="Attribute.html">Attribute</a>>}</span></h4>
-<div class="description">
- Get relations which target this note
-</div>
@@ -3895,6 +3850,66 @@
+ <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">
+
+ &lt;optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last">relation name to filter</td>
+ </tr>
+
+
+ </tbody>
+</table>
+
@@ -3929,7 +3944,7 @@
<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#line318">line 318</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line236">line 236</a>
</li></ul></dd>
@@ -3957,6 +3972,10 @@
<h5>Returns:</h5>
+<div class="param-desc">
+ all note's relations (attributes with type relation), including inherited ones
+</div>
+
<dl>
@@ -3965,7 +3984,7 @@
</dt>
<dd>
-<span class="param-type">Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>></span>
+<span class="param-type">Array.&lt;<a href="Attribute.html">Attribute</a>></span>
</dd>
@@ -3983,7 +4002,7 @@
- <h4 class="name" id="hasAttribute"><span class="type-signature">(async) </span>hasAttribute<span class="signature">(type, name)</span><span class="type-signature"> &rarr; {Promise.&lt;boolean>}</span></h4>
+ <h4 class="name" id="getOwnedRelationValue"><span class="type-signature"></span>getOwnedRelationValue<span class="signature">(name)</span><span class="type-signature"> &rarr; {string}</span></h4>
@@ -4021,29 +4040,6 @@
<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>
@@ -4062,7 +4058,7 @@
- <td class="description last">attribute name</td>
+ <td class="description last">relation name</td>
</tr>
@@ -4103,7 +4099,7 @@
<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#line218">line 218</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line382">line 382</a>
</li></ul></dd>
@@ -4132,7 +4128,7 @@
<div class="param-desc">
- true if note has an attribute with given type and name (including inherited)
+ relation value if relation exists, null otherwise
</div>
@@ -4143,7 +4139,7 @@
</dt>
<dd>
-<span class="param-type">Promise.&lt;boolean></span>
+<span class="param-type">string</span>
</dd>
@@ -4161,7 +4157,7 @@
- <h4 class="name" id="hasChildren"><span class="type-signature"></span>hasChildren<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
+ <h4 class="name" id="getParentNoteIds"><span class="type-signature"></span>getParentNoteIds<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;string>}</span></h4>
@@ -4209,7 +4205,7 @@
<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#line124">line 124</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line127">line 127</a>
</li></ul></dd>
@@ -4245,7 +4241,7 @@
</dt>
<dd>
-<span class="param-type">boolean</span>
+<span class="param-type">Array.&lt;string></span>
</dd>
@@ -4263,7 +4259,7 @@
- <h4 class="name" id="hasLabel"><span class="type-signature">(async) </span>hasLabel<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;boolean>}</span></h4>
+ <h4 class="name" id="getParentNotes"><span class="type-signature">(async) </span>getParentNotes<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="NoteShort.html">NoteShort</a>>>}</span></h4>
@@ -4278,21 +4274,1807 @@
- <h5>Parameters:</h5>
-
-<table class="params">
- <thead>
- <tr>
-
- <th>Name</th>
-
- <th>Type</th>
-
-
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <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#line132">line 132</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Promise.&lt;Array.&lt;<a href="NoteShort.html">NoteShort</a>>></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="getRelation"><span class="type-signature">(async) </span>getRelation<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="Attribute.html">Attribute</a>>}</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>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <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#line364">line 364</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ relation if it exists, null otherwise
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Promise.&lt;<a href="Attribute.html">Attribute</a>></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="getRelationDefinitions"><span class="type-signature">(async) </span>getRelationDefinitions<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>>}</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>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ &lt;optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last">relation name to filter</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_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line252">line 252</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ all note's relation definitions including inherited ones
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="getRelations"><span class="type-signature">(async) </span>getRelations<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>>}</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>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ &lt;optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last">relation name to filter</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_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line244">line 244</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ all note's relations (attributes with type relation), including inherited ones
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="getRelationTarget"><span class="type-signature">(async) </span>getRelationTarget<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="NoteShort.html">NoteShort</a>>|null}</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"></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_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line394">line 394</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ target note of the relation or null (if target is empty or note was not found)
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Promise.&lt;<a href="NoteShort.html">NoteShort</a>></span>
+|
+
+<span class="param-type">null</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="getRelationTargets"><span class="type-signature">(async) </span>getRelationTargets<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="NoteShort.html">NoteShort</a>>>}</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>
+
+
+
+ </td>
+
+
+ <td class="attributes">
+
+ &lt;optional><br>
+
+
+
+
+
+ </td>
+
+
+
+
+ <td class="description last">relation name to filter</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_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line404">line 404</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Promise.&lt;Array.&lt;<a href="NoteShort.html">NoteShort</a>>></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="getRelationValue"><span class="type-signature">(async) </span>getRelationValue<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;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>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <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#line388">line 388</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ relation value if relation exists, null otherwise
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Promise.&lt;string></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="getTargetRelations"><span class="type-signature"></span>getTargetRelations<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;<a href="Attribute.html">Attribute</a>>}</span></h4>
+
+
+
+
+
+
+<div class="description">
+ Get relations which target this note
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <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#line428">line 428</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Array.&lt;<a href="Attribute.html">Attribute</a>></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="hasAttribute"><span class="type-signature">(async) </span>hasAttribute<span class="signature">(type, name)</span><span class="type-signature"> &rarr; {Promise.&lt;boolean>}</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>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>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <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#line261">line 261</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ true if note has an attribute with given type and name (including inherited)
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Promise.&lt;boolean></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="hasChildren"><span class="type-signature"></span>hasChildren<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <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#line114">line 114</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">boolean</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="hasLabel"><span class="type-signature">(async) </span>hasLabel<span class="signature">(name)</span><span class="type-signature"> &rarr; {Promise.&lt;boolean>}</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">label name</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_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line328">line 328</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ true if label exists (including inherited)
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">Promise.&lt;boolean></span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="hasOwnedAttribute"><span class="type-signature"></span>hasOwnedAttribute<span class="signature">(type, name)</span><span class="type-signature"> &rarr; {boolean}</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>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>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <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#line270">line 270</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ true if note has an attribute with given type and name (including inherited)
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">boolean</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="hasOwnedLabel"><span class="type-signature"></span>hasOwnedLabel<span class="signature">(name)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h5>Parameters:</h5>
+
+
+<table class="params">
+ <thead>
+ <tr>
+
+ <th>Name</th>
+
+
+ <th>Type</th>
+
+
+
+
<th class="last">Description</th>
</tr>
@@ -4360,7 +6142,7 @@
<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#line248">line 248</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line322">line 322</a>
</li></ul></dd>
@@ -4389,7 +6171,7 @@
<div class="param-desc">
- true if label exists (including inherited)
+ true if label exists (excluding inherited)
</div>
@@ -4400,7 +6182,162 @@
</dt>
<dd>
-<span class="param-type">Promise.&lt;boolean></span>
+<span class="param-type">boolean</span>
+
+
+ </dd>
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <h4 class="name" id="hasOwnedRelation"><span class="type-signature"></span>hasOwnedRelation<span class="signature">(name)</span><span class="type-signature"> &rarr; {boolean}</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>
+
+
+
+
+
+
+<dl class="details">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <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#line334">line 334</a>
+ </li></ul></dd>
+
+
+
+
+
+
+
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+
+<div class="param-desc">
+ true if relation exists (excluding inherited)
+</div>
+
+
+
+<dl>
+ <dt>
+ Type
+ </dt>
+ <dd>
+
+<span class="param-type">boolean</span>
</dd>
@@ -4515,7 +6452,7 @@
<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#line254">line 254</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line340">line 340</a>
</li></ul></dd>
@@ -4573,7 +6510,7 @@
- <h4 class="name" id="invalidate__attributeCache"><span class="type-signature"></span>invalidate__attributeCache<span class="signature">()</span><span class="type-signature"></span></h4>
+ <h4 class="name" id="invalidateAttributeCache"><span class="type-signature"></span>invalidateAttributeCache<span class="signature">()</span><span class="type-signature"></span></h4>
@@ -4626,7 +6563,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#line309">line 309</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line419">line 419</a>
</li></ul></dd>
@@ -4710,7 +6647,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#line92">line 92</a>
+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line82">line 82</a>
</li></ul></dd>
@@ -4774,7 +6711,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="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>
+ <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><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
diff --git a/docs/frontend_api/entities_attribute.js.html b/docs/frontend_api/entities_attribute.js.html
index 01956a8e78..5b9095b62e 100644
--- a/docs/frontend_api/entities_attribute.js.html
+++ b/docs/frontend_api/entities_attribute.js.html
@@ -29,6 +29,11 @@
<pre class="prettyprint source linenums"><code>class Attribute {
constructor(treeCache, row) {
this.treeCache = treeCache;
+
+ this.update(row);
+ }
+
+ update(row) {
/** @param {string} attributeId */
this.attributeId = row.attributeId;
/** @param {string} noteId */
@@ -43,12 +48,6 @@
this.position = row.position;
/** @param {boolean} isInheritable */
this.isInheritable = row.isInheritable;
- /** @param {boolean} isDeleted */
- this.isDeleted = row.isDeleted;
- /** @param {string} utcDateCreated */
- this.utcDateCreated = row.utcDateCreated;
- /** @param {string} utcDateModified */
- this.utcDateModified = row.utcDateModified;
}
/** @returns {NoteShort} */
@@ -57,7 +56,7 @@
}
get toString() {
- return `Attribute(attributeId=${this.attributeId}, type=${this.type}, name=${this.name})`;
+ return `Attribute(attributeId=${this.attributeId}, type=${this.type}, name=${this.name}, value=${this.value})`;
}
}
@@ -71,7 +70,7 @@ export default Attribute;</code></pre>
</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>
+ <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><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
diff --git a/docs/frontend_api/entities_branch.js.html b/docs/frontend_api/entities_branch.js.html
index d8208013dc..1b5bf3a493 100644
--- a/docs/frontend_api/entities_branch.js.html
+++ b/docs/frontend_api/entities_branch.js.html
@@ -30,6 +30,11 @@
class Branch {
constructor(treeCache, row) {
this.treeCache = treeCache;
+
+ this.update(row);
+ }
+
+ update(row) {
/** @param {string} primary key */
this.branchId = row.branchId;
/** @param {string} */
@@ -49,6 +54,11 @@ class Branch {
return this.treeCache.getNote(this.noteId);
}
+ /** @returns {NoteShort} */
+ async getParentNote() {
+ return this.treeCache.getNote(this.parentNoteId);
+ }
+
/** @returns {boolean} true if it's top level, meaning its parent is root note */
isTopLevel() {
return this.parentNoteId === 'root';
@@ -69,7 +79,7 @@ export default Branch;</code></pre>
</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>
+ <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><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
diff --git a/docs/frontend_api/entities_note_complement.js.html b/docs/frontend_api/entities_note_complement.js.html
new file mode 100644
index 0000000000..03e78d1b58
--- /dev/null
+++ b/docs/frontend_api/entities_note_complement.js.html
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>JSDoc: Source: entities/note_complement.js</title>
+
+ <script src="scripts/prettify/prettify.js"> </script>
+ <script src="scripts/prettify/lang-css.js"> </script>
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+ <h1 class="page-title">Source: entities/note_complement.js</h1>
+
+
+
+
+
+
+ <section>
+ <article>
+ <pre class="prettyprint source linenums"><code>/**
+ * Complements the NoteShort with the main note content and other extra attributes
+ */
+class NoteComplement {
+ constructor(row) {
+ /** @param {string} */
+ this.noteId = row.noteId;
+
+ /** @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;
+ }
+}
+
+export default NoteComplement;</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="NoteComplement.html">NoteComplement</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.html
index ebb24d8b2e..16c7fd55d0 100644
--- a/docs/frontend_api/entities_note_short.js.html
+++ b/docs/frontend_api/entities_note_short.js.html
@@ -41,10 +41,31 @@ class NoteShort {
/**
* @param {TreeCache} treeCache
* @param {Object.&lt;string, Object>} row
- * @param {Branch[]} branches - all relevant branches, i.e. where this note is either child or parent
*/
- constructor(treeCache, row, branches) {
+ constructor(treeCache, row) {
this.treeCache = treeCache;
+
+ /** @type {string[]} */
+ this.attributes = [];
+
+ /** @type {string[]} */
+ this.targetRelations = [];
+
+ /** @type {string[]} */
+ this.parents = [];
+ /** @type {string[]} */
+ this.children = [];
+
+ /** @type {Object.&lt;string, string>} */
+ this.parentToBranch = {};
+
+ /** @type {Object.&lt;string, string>} */
+ this.childToBranch = {};
+
+ this.update(row);
+ }
+
+ update(row) {
/** @param {string} */
this.noteId = row.noteId;
/** @param {string} */
@@ -59,37 +80,6 @@ class NoteShort {
this.mime = row.mime;
/** @param {boolean} */
this.isDeleted = row.isDeleted;
- /** @param {boolean} */
- this.archived = row.archived;
- /** @param {string} */
- this.cssClass = row.cssClass;
- /** @param {string} */
- this.iconClass = row.iconClass;
-
- /** @type {string[]} */
- this.parents = [];
- /** @type {string[]} */
- this.children = [];
-
- /** @type {Object.&lt;string, string>} */
- this.parentToBranch = {};
-
- /** @type {Object.&lt;string, string>} */
- this.childToBranch = {};
-
- for (const branch of branches) {
- if (this.noteId === branch.noteId) {
- this.parents.push(branch.parentNoteId);
- this.parentToBranch[branch.parentNoteId] = branch.branchId;
- }
- else if (this.noteId === branch.parentNoteId) {
- this.children.push(branch.noteId);
- this.childToBranch[branch.noteId] = branch.branchId;
- }
- else {
- throw new Error(`Unknown branch ${branch.branchId} for note ${this.noteId}`);
- }
- }
}
addParent(parentNoteId, branchId) {
@@ -181,31 +171,76 @@ class NoteShort {
return await this.treeCache.getNotes(this.children);
}
+ /**
+ * @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
+ */
+ getOwnedAttributes(type, name) {
+ const attrs = this.attributes
+ .map(attributeId => this.treeCache.attributes[attributeId])
+ .filter(attr => !!attr);
+
+ return this.__filterAttrs(attrs, type, name)
+ }
+
/**
* @param {string} [type] - (optional) attribute type to filter
* @param {string} [name] - (optional) attribute name to filter
* @returns {Promise&lt;Attribute[]>} all note's attributes, including inherited ones
*/
async getAttributes(type, name) {
- if (!this.__attributeCache) {
- this.__attributeCache = (await server.get('notes/' + this.noteId + '/attributes'))
- .map(attrRow => new Attribute(this.treeCache, attrRow));
- }
+ const ownedAttributes = this.getOwnedAttributes();
- if (type &amp;&amp; name) {
- return this.__attributeCache.filter(attr => attr.type === type &amp;&amp; attr.name === name);
- }
- else if (type) {
- return this.__attributeCache.filter(attr => attr.type === type);
+ const attrArrs = [
+ ownedAttributes
+ ];
+
+ for (const templateAttr of ownedAttributes.filter(oa => oa.type === 'relation' &amp;&amp; oa.name === 'template')) {
+ const templateNote = await this.treeCache.getNote(templateAttr.value);
+
+ if (templateNote) {
+ attrArrs.push(await templateNote.getAttributes());
+ }
}
- else if (name) {
- return this.__attributeCache.filter(attr => attr.name === name);
+
+ if (this.noteId !== 'root') {
+ for (const parentNote of await this.getParentNotes()) {
+ attrArrs.push(await parentNote.getInheritableAttributes());
+ }
}
- else {
- return this.__attributeCache.slice();
+
+ const attributes = attrArrs.flat();
+
+ return this.__filterAttrs(attributes, type, name);
+ }
+
+ __filterAttrs(attributes, type, name) {
+ if (type &amp;&amp; name) {
+ return attributes.filter(attr => attr.type === type &amp;&amp; attr.name === name);
+ } else if (type) {
+ return attributes.filter(attr => attr.type === type);
+ } else if (name) {
+ return attributes.filter(attr => attr.name === name);
+ } else {
+ return attributes;
}
}
+ async getInheritableAttributes() {
+ const attrs = await this.getAttributes();
+
+ return attrs.filter(attr => attr.isInheritable);
+ }
+
+ /**
+ * @param {string} [name] - label name to filter
+ * @returns {Attribute[]} all note's labels (attributes with type label), including inherited ones
+ */
+ getOwnedLabels(name) {
+ return this.getOwnedAttributes(LABEL, name);
+ }
+
/**
* @param {string} [name] - label name to filter
* @returns {Promise&lt;Attribute[]>} all note's labels (attributes with type label), including inherited ones
@@ -222,6 +257,14 @@ class NoteShort {
return await this.getAttributes(LABEL_DEFINITION, name);
}
+ /**
+ * @param {string} [name] - relation name to filter
+ * @returns {Attribute[]} all note's relations (attributes with type relation), including inherited ones
+ */
+ getOwnedRelations(name) {
+ return this.getOwnedAttributes(RELATION, name);
+ }
+
/**
* @param {string} [name] - relation name to filter
* @returns {Promise&lt;Attribute[]>} all note's relations (attributes with type relation), including inherited ones
@@ -247,15 +290,46 @@ class NoteShort {
return !!await this.getAttribute(type, name);
}
+ /**
+ * @param {string} type - attribute type (label, relation, etc.)
+ * @param {string} name - attribute name
+ * @returns {boolean} true if note has an attribute with given type and name (including inherited)
+ */
+ hasOwnedAttribute(type, name) {
+ return !!this.getOwnedAttribute(type, name);
+ }
+
+ /**
+ * @param {string} type - attribute type (label, relation, etc.)
+ * @param {string} name - attribute name
+ * @returns {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.
+ */
+ getOwnedAttribute(type, name) {
+ const attributes = this.getOwnedAttributes(type, name);
+
+ return attributes.length > 0 ? attributes[0] : 0;
+ }
+
/**
* @param {string} type - attribute type (label, relation, etc.)
* @param {string} name - attribute name
* @returns {Promise&lt;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.
*/
async getAttribute(type, name) {
- const attributes = await this.getAttributes();
+ const attributes = await this.getAttributes(type, name);
- return attributes.find(attr => attr.type === type &amp;&amp; attr.name === name);
+ return attributes.length > 0 ? attributes[0] : 0;
+ }
+
+ /**
+ * @param {string} type - attribute type (label, relation, etc.)
+ * @param {string} name - attribute name
+ * @returns {string} attribute value of given type and name or null if no such attribute exists.
+ */
+ getOwnedAttributeValue(type, name) {
+ const attr = this.getOwnedAttribute(type, name);
+
+ return attr ? attr.value : null;
}
/**
@@ -269,36 +343,72 @@ class NoteShort {
return attr ? attr.value : null;
}
+ /**
+ * @param {string} name - label name
+ * @returns {boolean} true if label exists (excluding inherited)
+ */
+ hasOwnedLabel(name) { return this.hasOwnedAttribute(LABEL, name); }
+
/**
* @param {string} name - label name
* @returns {Promise&lt;boolean>} true if label exists (including inherited)
*/
async hasLabel(name) { return await this.hasAttribute(LABEL, name); }
+ /**
+ * @param {string} name - relation name
+ * @returns {boolean} true if relation exists (excluding inherited)
+ */
+ hasOwnedRelation(name) { return this.hasOwnedAttribute(RELATION, name); }
+
/**
* @param {string} name - relation name
* @returns {Promise&lt;boolean>} true if relation exists (including inherited)
*/
async hasRelation(name) { return await this.hasAttribute(RELATION, name); }
+ /**
+ * @param {string} name - label name
+ * @returns {Attribute} label if it exists, null otherwise
+ */
+ getOwnedLabel(name) { return this.getOwnedAttribute(LABEL, name); }
+
/**
* @param {string} name - label name
* @returns {Promise&lt;Attribute>} label if it exists, null otherwise
*/
async getLabel(name) { return await this.getAttribute(LABEL, name); }
+ /**
+ * @param {string} name - relation name
+ * @returns {Attribute} relation if it exists, null otherwise
+ */
+ getOwnedRelation(name) { return this.getOwnedAttribute(RELATION, name); }
+
/**
* @param {string} name - relation name
* @returns {Promise&lt;Attribute>} relation if it exists, null otherwise
*/
async getRelation(name) { return await this.getAttribute(RELATION, name); }
+ /**
+ * @param {string} name - label name
+ * @returns {string} label value if label exists, null otherwise
+ */
+ getOwnedLabelValue(name) { return this.getOwnedAttributeValue(LABEL, name); }
+
/**
* @param {string} name - label name
* @returns {Promise&lt;string>} label value if label exists, null otherwise
*/
async getLabelValue(name) { return await this.getAttributeValue(LABEL, name); }
+ /**
+ * @param {string} name - relation name
+ * @returns {string} relation value if relation exists, null otherwise
+ */
+ getOwnedRelationValue(name) { return this.getOwnedAttributeValue(RELATION, name); }
+
/**
* @param {string} name - relation name
* @returns {Promise&lt;string>} relation value if relation exists, null otherwise
@@ -334,18 +444,18 @@ class NoteShort {
* Clear note's attributes cache to force fresh reload for next attribute request.
* Cache is note instance scoped.
*/
- invalidate__attributeCache() {
+ invalidateAttributeCache() {
this.__attributeCache = null;
}
/**
* Get relations which target this note
*
- * @returns {Promise&lt;Attribute[]>}
+ * @returns {Attribute[]}
*/
- async getTargetRelations() {
- return (await server.get('notes/' + this.noteId + '/target-relations'))
- .map(attrRow => new Attribute(this.treeCache, attrRow));
+ getTargetRelations() {
+ return this.targetRelations
+ .map(attributeId => this.treeCache.attributes[attributeId]);
}
get toString() {
@@ -355,8 +465,6 @@ class NoteShort {
get dto() {
const dto = Object.assign({}, this);
delete dto.treeCache;
- delete dto.archived;
- delete dto.__attributeCache;
return dto;
}
@@ -372,7 +480,7 @@ export default NoteShort;</code></pre>
</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>
+ <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><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
diff --git a/docs/frontend_api/global.html b/docs/frontend_api/global.html
index 7f4006e31d..b4c13d6c85 100644
--- a/docs/frontend_api/global.html
+++ b/docs/frontend_api/global.html
@@ -333,7 +333,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="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>
+ <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><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
diff --git a/docs/frontend_api/index.html b/docs/frontend_api/index.html
index 310dca3437..cb160592e4 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="NoteFull.html">NoteFull</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3><a href="global.html">Global</a></h3>
+ <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><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
diff --git a/docs/frontend_api/services_frontend_script_api.js.html b/docs/frontend_api/services_frontend_script_api.js.html
index 3b73eabadc..f9289fa31c 100644
--- a/docs/frontend_api/services_frontend_script_api.js.html
+++ b/docs/frontend_api/services_frontend_script_api.js.html
@@ -32,13 +32,13 @@ import utils from './utils.js';
import toastService from './toast.js';
import linkService from './link.js';
import treeCache from './tree_cache.js';
-import noteDetailService from './note_detail.js';
import noteTooltipService from './note_tooltip.js';
import protectedSessionService from './protected_session.js';
import dateNotesService from './date_notes.js';
import StandardWidget from '../widgets/standard_widget.js';
import ws from "./ws.js";
import hoistedNoteService from "./hoisted_note.js";
+import appContext from "./app_context.js";
/**
* This is the main frontend API interface for scripts. It's published in the local "api" object.
@@ -77,7 +77,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
*/
this.activateNote = async (notePath, noteLoadedListener) => {
await treeService.activateNote(notePath, async () => {
- await treeService.scrollToActiveNote();
+ await appContext.getMainNoteTree().scrollToActiveNoteListener();
if (noteLoadedListener) {
noteLoadedListener();
@@ -94,7 +94,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
this.activateNewNote = async notePath => {
await ws.waitForMaxKnownSyncId();
- await treeService.activateNote(notePath, noteDetailService.focusAndSelectTitle);
+ await treeService.activateNote(notePath, () => appContext.trigger('focusAndSelectTitle'));
};
/**
@@ -172,9 +172,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
currentNoteId: currentNote.noteId,
originEntityName: "notes", // currently there's no other entity on frontend which can trigger event
originEntityId: originEntity ? originEntity.noteId : null
- }, {
- 'trilium-source-id': "script"
- });
+ }, "script");
if (ret.success) {
// wait until all the changes done in the script has been synced to frontend before continuing
@@ -299,22 +297,6 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
*/
this.refreshTree = treeService.reload;
- /**
- * Refresh active tab
- *
- * @method
- * @returns {Promise&lt;void>}
- */
- this.refreshActiveTab = noteDetailService.reload;
-
- /**
- * Refresh current tab
- *
- * @method
- * @returns {Promise&lt;void>}
- */
- this.refreshAllTabs = noteDetailService.reloadAllTabs;
-
/**
* Create note link (jQuery object) for given note.
*
@@ -327,30 +309,30 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
/**
* Adds given text to the editor cursor
*
- * @param {string} text
+ * @param {string} text - this must be clear text, HTML is not supported.
* @method
*/
- this.addTextToActiveTabEditor = linkService.addTextToEditor;
+ this.addTextToActiveTabEditor = text => appContext.trigger('addTextToActiveEditor', {text});
/**
* @method
- * @returns {NoteFull} active note (loaded into right pane)
+ * @returns {NoteShort} active note (loaded into right pane)
*/
- this.getActiveTabNote = noteDetailService.getActiveTabNote;
+ this.getActiveTabNote = appContext.getActiveTabNote;
/**
* See https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html for a documentation on the returned instance.
*
* @method
- * @returns {Editor|null} CKEditor instance or null (e.g. if active note is not a text note)
+ * @param callback - method receiving "textEditor" instance
*/
- this.getActiveTabTextEditor = noteDetailService.getActiveEditor;
+ this.getActiveTabTextEditor = callback => appContext.trigger('executeInActiveEditor', {callback});
/**
* @method
* @returns {Promise&lt;string|null>} returns note path of active note or null if there isn't active note
*/
- this.getActiveTabNotePath = noteDetailService.getActiveTabNotePath;
+ this.getActiveTabNotePath = appContext.getActiveTabNotePath;
/**
* This method checks whether user navigated away from the note from which the scripts has been started.
@@ -365,12 +347,6 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
return tabContext.note &amp;&amp; this.originEntity.noteId === tabContext.note.noteId;
};
- /**
- * @method
- * @param {function} func - callback called on note change as user is typing (not necessarily tied to save event)
- */
- this.onNoteChange = noteDetailService.onNoteChange;
-
/**
* @method
* @param {object} $el - jquery object on which to setup the tooltip
@@ -455,7 +431,7 @@ export default FrontendScriptApi;</code></pre>
</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>
+ <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><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
diff --git a/src/public/javascripts/services/note_detail.js b/src/public/javascripts/services/note_detail.js
deleted file mode 100644
index 9ddb3caceb..0000000000
--- a/src/public/javascripts/services/note_detail.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import appContext from "./app_context.js";
-
-function getActiveEditor() {
- const activeTabContext = appContext.getActiveTabContext();
-
- if (activeTabContext && activeTabContext.note && activeTabContext.note.type === 'text') {
- return activeTabContext.getComponent().getEditor();
- }
- else {
- return null;
- }
-}
-
-export default {
- getActiveEditor
-};
\ No newline at end of file
diff --git a/src/public/javascripts/services/tab_context.js b/src/public/javascripts/services/tab_context.js
index 1c807833ce..add1f54f8d 100644
--- a/src/public/javascripts/services/tab_context.js
+++ b/src/public/javascripts/services/tab_context.js
@@ -47,6 +47,8 @@ class TabContext extends Component {
this.notePath = notePath;
this.noteId = treeService.getNoteIdFromNotePath(notePath);
+ this.autoBookDisabled = false;
+
//this.cleanup(); // esp. on windows autocomplete is not getting closed automatically
setTimeout(async () => {
diff --git a/src/public/javascripts/widgets/component.js b/src/public/javascripts/widgets/component.js
index d193547674..66db2fb551 100644
--- a/src/public/javascripts/widgets/component.js
+++ b/src/public/javascripts/widgets/component.js
@@ -19,10 +19,18 @@ export default class Component {
let propagateToChildren = true;
+ const start = Date.now();
+
if (typeof fun === 'function') {
propagateToChildren = await fun.call(this, data) !== false;
}
+ const end = Date.now();
+
+ if (end - start > 10) {
+ console.log(`Event ${name} in component ${this.componentId} took ${end-start}ms`);
+ }
+
if (propagateToChildren) {
const promise = this.triggerChildren(name, data, sync);
diff --git a/src/public/javascripts/widgets/note_detail.js b/src/public/javascripts/widgets/note_detail.js
index 37c103439d..8caa6a602f 100644
--- a/src/public/javascripts/widgets/note_detail.js
+++ b/src/public/javascripts/widgets/note_detail.js
@@ -143,7 +143,7 @@ export default class NoteDetailWidget extends TabAwareWidget {
typeWidget.eventReceived('setTabContext', {tabContext: this.tabContext});
}
- async getWidgetType(disableAutoBook) {
+ async getWidgetType() {
const note = this.tabContext.note;
if (!note) {
@@ -152,7 +152,7 @@ export default class NoteDetailWidget extends TabAwareWidget {
let type = note.type;
- if (type === 'text' && !disableAutoBook
+ if (type === 'text' && !this.tabContext.autoBookDisabled
&& note.hasChildren()
&& utils.isDesktop()) {
@@ -224,4 +224,8 @@ export default class NoteDetailWidget extends TabAwareWidget {
beforeUnloadListener() {
this.spacedUpdate.updateNowIfNecessary();
}
+
+ autoBookDisabledListener() {
+ this.refresh();
+ }
}
\ No newline at end of file
diff --git a/src/public/javascripts/widgets/type_widgets/book.js b/src/public/javascripts/widgets/type_widgets/book.js
index b9d071cbd2..619b6e227d 100644
--- a/src/public/javascripts/widgets/type_widgets/book.js
+++ b/src/public/javascripts/widgets/type_widgets/book.js
@@ -200,7 +200,9 @@ export default class BookTypeWidget extends TypeWidget {
if (this.isAutoBook()) {
const $addTextLink = $('<a href="javascript:">here</a>').on('click', () => {
- // FIXME
+ this.tabContext.autoBookDisabled = true;
+
+ this.trigger('autoBookDisabled');
});
this.$content.append($('<div class="note-book-auto-message"></div>')