Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
API docs
zadam602b9ae64a8f
diff --git a/docs/backend_api/BAttachment.html b/docs/backend_api/BAttachment.htmlindex 985ee21e9a..50e40c1e3b 100644--- a/docs/backend_api/BAttachment.html+++ b/docs/backend_api/BAttachment.html@@ -1388,7 +1388,7 @@ larger amounts of data and generally not accessible to the user.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battachment.js.html">becca/entities/battachment.js</a>, <a href="becca_entities_battachment.js.html#line128">line 128</a>+ <a href="becca_entities_battachment.js.html">becca/entities/battachment.js</a>, <a href="becca_entities_battachment.js.html#line133">line 133</a></li></ul></dd>@@ -1770,7 +1770,7 @@ larger amounts of data and generally not accessible to the user.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battachment.js.html">becca/entities/battachment.js</a>, <a href="becca_entities_battachment.js.html#line113">line 113</a>+ <a href="becca_entities_battachment.js.html">becca/entities/battachment.js</a>, <a href="becca_entities_battachment.js.html#line118">line 118</a></li></ul></dd>@@ -2815,7 +2815,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_battachment.js.html">becca/entities/battachment.js</a>, <a href="becca_entities_battachment.js.html#line123">line 123</a>+ <a href="becca_entities_battachment.js.html">becca/entities/battachment.js</a>, <a href="becca_entities_battachment.js.html#line128">line 128</a></li></ul></dd>diff --git a/docs/backend_api/BNote.html b/docs/backend_api/BNote.htmlindex 6c07103c9c..f77a085e5d 100644--- a/docs/backend_api/BNote.html+++ b/docs/backend_api/BNote.html@@ -1588,7 +1588,7 @@ See addLabel, addRelation for more specific methods.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1308">line 1308</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1327">line 1327</a></li></ul></dd>@@ -1835,7 +1835,7 @@ See addLabel, addRelation for more specific methods.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1329">line 1329</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1348">line 1348</a></li></ul></dd>@@ -2081,7 +2081,7 @@ returned.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1342">line 1342</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1361">line 1361</a></li></ul></dd>@@ -2316,7 +2316,7 @@ returned.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1427">line 1427</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1446">line 1446</a></li></ul></dd>@@ -2432,7 +2432,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1479">line 1479</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1498">line 1498</a></li></ul></dd>@@ -2653,7 +2653,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1517">line 1517</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1536">line 1536</a></li></ul></dd>@@ -2919,7 +2919,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1149">line 1149</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1168">line 1168</a></li></ul></dd>@@ -3025,7 +3025,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1037">line 1037</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1044">line 1044</a></li></ul></dd>@@ -3127,7 +3127,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1011">line 1011</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1018">line 1018</a></li></ul></dd>@@ -3229,7 +3229,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1118">line 1118</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1125">line 1125</a></li></ul></dd>@@ -3286,7 +3286,7 @@ In the future, this functionality might get more generic and some of the require- <h4 class="name" id="getAttachmentByRole"><span class="type-signature"></span>getAttachmentByRole<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="BAttachment.html">BAttachment</a>>}</span></h4>+ <h4 class="name" id="getAttachmentByTitle"><span class="type-signature"></span>getAttachmentByTitle<span class="signature">()</span><span class="type-signature"> → {<a href="BAttachment.html">BAttachment</a>}</span></h4>@@ -3334,7 +3334,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1133">line 1133</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1152">line 1152</a></li></ul></dd>@@ -3370,7 +3370,7 @@ In the future, this functionality might get more generic and some of the require</dt><dd>-<span class="param-type">Array.<<a href="BAttachment.html">BAttachment</a>></span>+<span class="param-type"><a href="BAttachment.html">BAttachment</a></span></dd>@@ -3436,7 +3436,109 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1100">line 1100</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1107">line 1107</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++<h5>Returns:</h5>+++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">Array.<<a href="BAttachment.html">BAttachment</a>></span>+++ </dd>+</dl>++++++++++++++ <h4 class="name" id="getAttachmentsByRole"><span class="type-signature"></span>getAttachmentsByRole<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="BAttachment.html">BAttachment</a>>}</span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1140">line 1140</a></li></ul></dd>@@ -3610,7 +3712,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line574">line 574</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line581">line 581</a></li></ul></dd>@@ -3789,7 +3891,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line585">line 585</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line592">line 592</a></li></ul></dd>@@ -3997,7 +4099,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line327">line 327</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line334">line 334</a></li></ul></dd>@@ -4176,7 +4278,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1202">line 1202</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1221">line 1221</a></li></ul></dd>@@ -4355,7 +4457,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1212">line 1212</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1231">line 1231</a></li></ul></dd>@@ -4826,7 +4928,7 @@ In the future, this functionality might get more generic and some of the require- <h4 class="name" id="getContentMetadata"><span class="type-signature"></span>getContentMetadata<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>+ <h4 class="name" id="getDescendantNoteIds"><span class="type-signature"></span>getDescendantNoteIds<span class="signature">()</span><span class="type-signature"></span></h4>@@ -4862,6 +4964,8 @@ In the future, this functionality might get more generic and some of the require+ <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>use getSubtreeNoteIds() instead</li></ul></dd>+@@ -4874,7 +4978,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line215">line 215</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line965">line 965</a></li></ul></dd>@@ -4899,24 +5003,6 @@ In the future, this functionality might get more generic and some of the require-<h5>Returns:</h5>-----<dl>- <dt>- Type- </dt>- <dd>--<span class="param-type">Object</span>--- </dd>-</dl>--@@ -4928,13 +5014,19 @@ In the future, this functionality might get more generic and some of the require- <h4 class="name" id="getDescendantNoteIds"><span class="type-signature"></span>getDescendantNoteIds<span class="signature">()</span><span class="type-signature"></span></h4>+ <h4 class="name" id="getFlatText"><span class="type-signature"></span>getFlatText<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>+<div class="description">+ This is used for:+- fast searching+- note similarity evaluation+</div>+@@ -4964,8 +5056,6 @@ In the future, this functionality might get more generic and some of the require- <dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>use getSubtreeNoteIds() instead</li></ul></dd>-@@ -4978,7 +5068,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line958">line 958</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line766">line 766</a></li></ul></dd>@@ -5003,6 +5093,28 @@ In the future, this functionality might get more generic and some of the require+<h5>Returns:</h5>+++<div class="param-desc">+ - returns flattened textual representation of note, prefixes and attributes+</div>++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">string</span>+++ </dd>+</dl>++@@ -5014,19 +5126,13 @@ In the future, this functionality might get more generic and some of the require- <h4 class="name" id="getFlatText"><span class="type-signature"></span>getFlatText<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>+ <h4 class="name" id="getInheritingNotes"><span class="type-signature"></span>getInheritingNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="BNote.html">BNote</a>>}</span></h4>-<div class="description">- This is used for:-- fast searching-- note similarity evaluation-</div>-@@ -5068,7 +5174,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line759">line 759</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1070">line 1070</a></li></ul></dd>@@ -5097,7 +5203,8 @@ In the future, this functionality might get more generic and some of the require<div class="param-desc">- - returns flattened textual representation of note, prefixes and attributes+ - returns only notes which are templated, does not include their subtrees+ in effect returns notes which are influenced by note's non-inheritable attributes</div>@@ -5108,7 +5215,7 @@ In the future, this functionality might get more generic and some of the require</dt><dd>-<span class="param-type">string</span>+<span class="param-type">Array.<<a href="BNote.html">BNote</a>></span></dd>@@ -5126,7 +5233,7 @@ In the future, this functionality might get more generic and some of the require- <h4 class="name" id="getInheritingNotes"><span class="type-signature"></span>getInheritingNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="BNote.html">BNote</a>>}</span></h4>+ <h4 class="name" id="getJsonContent"><span class="type-signature"></span>getJsonContent<span class="signature">()</span><span class="type-signature"> → {*}</span></h4>@@ -5174,7 +5281,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1063">line 1063</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line217">line 217</a></li></ul></dd>@@ -5197,16 +5304,23 @@ In the future, this functionality might get more generic and some of the require+<h5>Throws:</h5>++++ <div class="param-desc">++ Error in case of invalid JSON++ </div>+++<h5>Returns:</h5>-<div class="param-desc">- - returns only notes which are templated, does not include their subtrees- in effect returns notes which are influenced by note's non-inheritable attributes-</div>-<dl>@@ -5215,7 +5329,7 @@ In the future, this functionality might get more generic and some of the require</dt><dd>-<span class="param-type">Array.<<a href="BNote.html">BNote</a>></span>+<span class="param-type">*</span></dd>@@ -5233,7 +5347,7 @@ In the future, this functionality might get more generic and some of the require- <h4 class="name" id="getJsonContent"><span class="type-signature"></span>getJsonContent<span class="signature">()</span><span class="type-signature"> → {*}</span></h4>+ <h4 class="name" id="getJsonContentSafely"><span class="type-signature"></span>getJsonContentSafely<span class="signature">()</span><span class="type-signature"> → {*|null}</span></h4>@@ -5281,7 +5395,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line220">line 220</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line228">line 228</a></li></ul></dd>@@ -5309,6 +5423,10 @@ In the future, this functionality might get more generic and some of the require<h5>Returns:</h5>+<div class="param-desc">+ valid object or null if the content cannot be parsed as JSON+</div>+<dl>@@ -5318,6 +5436,9 @@ In the future, this functionality might get more generic and some of the require<dd><span class="param-type">*</span>+|++<span class="param-type">null</span></dd>@@ -5432,7 +5553,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line514">line 514</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line521">line 521</a></li></ul></dd>@@ -5590,7 +5711,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line538">line 538</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line545">line 545</a></li></ul></dd>@@ -5760,7 +5881,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line614">line 614</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line621">line 621</a></li></ul></dd>@@ -5927,7 +6048,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line606">line 606</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line613">line 613</a></li></ul></dd>@@ -6033,7 +6154,7 @@ In the future, this functionality might get more generic and some of the require<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line684">line 684</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line691">line 691</a></li></ul></dd>@@ -6213,7 +6334,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line596">line 596</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line603">line 603</a></li></ul></dd>@@ -6483,7 +6604,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line659">line 659</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line666">line 666</a></li></ul></dd>@@ -6638,7 +6759,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line520">line 520</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line527">line 527</a></li></ul></dd>@@ -6796,7 +6917,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line544">line 544</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line551">line 551</a></li></ul></dd>@@ -6966,7 +7087,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line630">line 630</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line637">line 637</a></li></ul></dd>@@ -7133,7 +7254,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line622">line 622</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line629">line 629</a></li></ul></dd>@@ -7288,7 +7409,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line532">line 532</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line539">line 539</a></li></ul></dd>@@ -7446,7 +7567,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line556">line 556</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line563">line 563</a></li></ul></dd>@@ -7616,7 +7737,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line646">line 646</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line653">line 653</a></li></ul></dd>@@ -8064,7 +8185,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line526">line 526</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line533">line 533</a></li></ul></dd>@@ -8222,7 +8343,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line550">line 550</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line557">line 557</a></li></ul></dd>@@ -8392,7 +8513,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line638">line 638</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line645">line 645</a></li></ul></dd>@@ -8498,7 +8619,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1094">line 1094</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1101">line 1101</a></li></ul></dd>@@ -8600,7 +8721,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line303">line 303</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line310">line 310</a></li></ul></dd>@@ -8709,7 +8830,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line869">line 869</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line876">line 876</a></li></ul></dd>@@ -8880,7 +9001,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1171">line 1171</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1190">line 1190</a></li></ul></dd>@@ -9088,7 +9209,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line892">line 892</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line899">line 899</a></li></ul></dd>@@ -9190,7 +9311,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line951">line 951</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line958">line 958</a></li></ul></dd>@@ -9296,7 +9417,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line837">line 837</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line844">line 844</a></li></ul></dd>@@ -9398,7 +9519,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1057">line 1057</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1064">line 1064</a></li></ul></dd>@@ -9589,7 +9710,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1042">line 1042</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1049">line 1049</a></li></ul></dd>@@ -9815,7 +9936,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line444">line 444</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line451">line 451</a></li></ul></dd>@@ -10111,7 +10232,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line473">line 473</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line480">line 480</a></li></ul></dd>@@ -10340,7 +10461,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line564">line 564</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line571">line 571</a></li></ul></dd>@@ -10538,7 +10659,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line494">line 494</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line501">line 501</a></li></ul></dd>@@ -10736,7 +10857,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line508">line 508</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line515">line 515</a></li></ul></dd>@@ -10934,7 +11055,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line501">line 501</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line508">line 508</a></li></ul></dd>@@ -11040,7 +11161,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line298">line 298</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line305">line 305</a></li></ul></dd>@@ -11190,7 +11311,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1243">line 1243</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1262">line 1262</a></li></ul></dd>@@ -11296,7 +11417,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1221">line 1221</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1240">line 1240</a></li></ul></dd>@@ -11390,7 +11511,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line281">line 281</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line288">line 288</a></li></ul></dd>@@ -11496,7 +11617,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line287">line 287</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line294">line 294</a></li></ul></dd>@@ -11602,7 +11723,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line273">line 273</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line280">line 280</a></li></ul></dd>@@ -11708,7 +11829,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line268">line 268</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line275">line 275</a></li></ul></dd>@@ -11863,7 +11984,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line479">line 479</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line486">line 486</a></li></ul></dd>@@ -11969,7 +12090,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line263">line 263</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line270">line 270</a></li></ul></dd>@@ -12077,7 +12198,7 @@ This method can be significantly faster than the getAttribute()<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line293">line 293</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line300">line 300</a></li></ul></dd>@@ -12536,7 +12657,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1287">line 1287</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1306">line 1306</a></li></ul></dd>@@ -12716,7 +12837,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1403">line 1403</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1422">line 1422</a></li></ul></dd>@@ -12896,7 +13017,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1411">line 1411</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1430">line 1430</a></li></ul></dd>@@ -13091,7 +13212,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1624">line 1624</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1638">line 1638</a></li></ul></dd>@@ -13193,7 +13314,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1571">line 1571</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1590">line 1590</a></li></ul></dd>@@ -13425,7 +13546,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1256">line 1256</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1275">line 1275</a></li></ul></dd>@@ -13704,7 +13825,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line236">line 236</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line243">line 243</a></li></ul></dd>@@ -13884,7 +14005,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1387">line 1387</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1406">line 1406</a></li></ul></dd>@@ -14044,7 +14165,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1395">line 1395</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1414">line 1414</a></li></ul></dd>@@ -14286,7 +14407,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1354">line 1354</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1373">line 1373</a></li></ul></dd>@@ -14497,7 +14618,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1370">line 1370</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1389">line 1389</a></li></ul></dd>@@ -14708,7 +14829,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1379">line 1379</a>+ <a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line1398">line 1398</a></li></ul></dd>diff --git a/docs/backend_api/becca_entities_battachment.js.html b/docs/backend_api/becca_entities_battachment.js.htmlindex 6b55ef9051..f76056dfb9 100644--- a/docs/backend_api/becca_entities_battachment.js.html+++ b/docs/backend_api/becca_entities_battachment.js.html@@ -126,7 +126,12 @@ class BAttachment extends AbstractBeccaEntity {}decrypt() {- if (this.isProtected && !this.isDecrypted && protectedSessionService.isProtectedSessionAvailable()) {+ if (!this.isProtected || !this.attachmentId) {+ this.isDecrypted = true;+ return;+ }++ if (!this.isDecrypted && protectedSessionService.isProtectedSessionAvailable()) {try {this.title = protectedSessionService.decryptString(this.title);this.isDecrypted = true;diff --git a/docs/backend_api/becca_entities_bnote.js.html b/docs/backend_api/becca_entities_bnote.js.htmlindex 1324848662..6ef8952f17 100644--- a/docs/backend_api/becca_entities_bnote.js.html+++ b/docs/backend_api/becca_entities_bnote.js.html@@ -239,12 +239,9 @@ class BNote extends AbstractBeccaEntity {return this._getContent();}- /** @returns {{dateModified, utcDateModified}} */- getContentMetadata() {- return sql.getRow(`SELECT dateModified, utcDateModified FROM blobs WHERE blobId = ?`, [this.blobId]);- }-- /** @returns {*} */+ /**+ * @returns {*}+ * @throws Error in case of invalid JSON */getJsonContent() {const content = this.getContent();@@ -255,6 +252,16 @@ class BNote extends AbstractBeccaEntity {return JSON.parse(content);}+ /** @returns {*|null} valid object or null if the content cannot be parsed as JSON */+ getJsonContentSafely() {+ try {+ return this.getJsonContent();+ }+ catch (e) {+ return null;+ }+ }+/*** @param content* @param {object} [opts]@@ -1158,7 +1165,7 @@ class BNote extends AbstractBeccaEntity {}/** @returns {BAttachment[]} */- getAttachmentByRole(role) {+ getAttachmentsByRole(role) {return sql.getRows(`SELECT attachments.*FROM attachments@@ -1169,6 +1176,18 @@ class BNote extends AbstractBeccaEntity {.map(row => new BAttachment(row));}+ /** @returns {BAttachment} */+ getAttachmentByTitle(title) {+ return sql.getRows(`+ SELECT attachments.*+ FROM attachments+ WHERE ownerId = ?+ AND title = ?+ AND isDeleted = 0+ ORDER BY position`, [this.noteId, title])+ .map(row => new BAttachment(row))[0];+ }+/*** Gives all possible note paths leading to this note. Paths containing search note are ignored (could form cycles)*@@ -1599,7 +1618,6 @@ class BNote extends AbstractBeccaEntity {saveRevision() {return sql.transactional(() => {let noteContent = this.getContent();- const contentMetadata = this.getContentMetadata();const revision = new BRevision({noteId: this.noteId,@@ -1608,14 +1626,10 @@ class BNote extends AbstractBeccaEntity {type: this.type,mime: this.mime,isProtected: this.isProtected,- utcDateLastEdited: this.utcDateModified > contentMetadata.utcDateModified- ? this.utcDateModified- : contentMetadata.utcDateModified,+ utcDateLastEdited: this.utcDateModified,utcDateCreated: dateUtils.utcNowDateTime(),utcDateModified: dateUtils.utcNowDateTime(),- dateLastEdited: this.dateModified > contentMetadata.dateModified- ? this.dateModified- : contentMetadata.dateModified,+ dateLastEdited: this.dateModified,dateCreated: dateUtils.localNowDateTime()}, true);@@ -1638,10 +1652,10 @@ class BNote extends AbstractBeccaEntity {noteContent = noteContent.replaceAll(new RegExp(`href="[^"]*attachmentId=${noteAttachment.attachmentId}[^"]*"`, 'gi'),`href="api/attachments/${revisionAttachment.attachmentId}/download"`);}-- revision.setContent(noteContent, {forceSave: true});}+ revision.setContent(noteContent);+return revision;});}diff --git a/docs/backend_api/services_sql.js.html b/docs/backend_api/services_sql.js.htmlindex 29891f5333..828fcd8f38 100644--- a/docs/backend_api/services_sql.js.html+++ b/docs/backend_api/services_sql.js.html@@ -54,7 +54,7 @@ const LOG_ALL_QUERIES = false;});function insert(tableName, rec, replace = false) {- const keys = Object.keys(rec);+ const keys = Object.keys(rec || {});if (keys.length === 0) {log.error(`Can't insert empty object into table ${tableName}`);return;@@ -81,7 +81,7 @@ function replace(tableName, rec) {}function upsert(tableName, primaryKey, rec) {- const keys = Object.keys(rec);+ const keys = Object.keys(rec || {});if (keys.length === 0) {log.error(`Can't upsert empty object into table ${tableName}`);return;diff --git a/docs/frontend_api/FAttribute.html b/docs/frontend_api/FAttribute.htmlindex 7d05e5b0a1..8956485710 100644--- a/docs/frontend_api/FAttribute.html+++ b/docs/frontend_api/FAttribute.html@@ -912,7 +912,7 @@ and relation (representing named relationship between source and target note)</d</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/FBranch.html b/docs/frontend_api/FBranch.htmlindex 6bb8f4f3c6..3220829d1a 100644--- a/docs/frontend_api/FBranch.html+++ b/docs/frontend_api/FBranch.html@@ -1124,7 +1124,7 @@ parents.</div></div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/FNote.html b/docs/frontend_api/FNote.htmlindex 770a94b16b..3e2ffb611c 100644--- a/docs/frontend_api/FNote.html+++ b/docs/frontend_api/FNote.html@@ -1168,7 +1168,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line353">line 353</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line359">line 359</a></li></ul></dd>@@ -1274,7 +1274,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line240">line 240</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line246">line 246</a></li></ul></dd>@@ -1401,6 +1401,108 @@+<h5>Returns:</h5>+++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">Promise.<Array.<<a href="FAttachment.html">FAttachment</a>>></span>+++ </dd>+</dl>++++++++++++++ <h4 class="name" id="getAttachmentsByRole"><span class="type-signature">(async) </span>getAttachmentsByRole<span class="signature">()</span><span class="type-signature"> → {Promise.<Array.<<a href="FAttachment.html">FAttachment</a>>>}</span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line240">line 240</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++<h5>Returns:</h5>@@ -1550,7 +1652,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line616">line 616</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line622">line 622</a></li></ul></dd>@@ -1728,7 +1830,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line638">line 638</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line644">line 644</a></li></ul></dd>@@ -1928,7 +2030,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line287">line 287</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line293">line 293</a></li></ul></dd>@@ -2107,7 +2209,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line409">line 409</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line415">line 415</a></li></ul></dd>@@ -2286,7 +2388,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line419">line 419</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line425">line 425</a></li></ul></dd>@@ -2392,7 +2494,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line863">line 863</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line869">line 869</a></li></ul></dd>@@ -3057,7 +3159,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line692">line 692</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line698">line 698</a></li></ul></dd>@@ -3212,7 +3314,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line716">line 716</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line722">line 722</a></li></ul></dd>@@ -3379,7 +3481,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line502">line 502</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line508">line 508</a></li></ul></dd>@@ -3487,7 +3589,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line858">line 858</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line864">line 864</a></li></ul></dd>@@ -3589,7 +3691,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line758">line 758</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line764">line 764</a></li></ul></dd>@@ -3763,7 +3865,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line605">line 605</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line611">line 611</a></li></ul></dd>@@ -3941,7 +4043,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line627">line 627</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line633">line 633</a></li></ul></dd>@@ -4141,7 +4243,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line274">line 274</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line280">line 280</a></li></ul></dd>@@ -4296,7 +4398,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line686">line 686</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line692">line 692</a></li></ul></dd>@@ -4451,7 +4553,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line710">line 710</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line716">line 716</a></li></ul></dd>@@ -4618,7 +4720,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line494">line 494</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line500">line 500</a></li></ul></dd>@@ -4773,7 +4875,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line698">line 698</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line704">line 704</a></li></ul></dd>@@ -4928,7 +5030,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line722">line 722</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line728">line 728</a></li></ul></dd>@@ -5095,7 +5197,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line568">line 568</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line574">line 574</a></li></ul></dd>@@ -5658,7 +5760,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line704">line 704</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line710">line 710</a></li></ul></dd>@@ -5813,7 +5915,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line734">line 734</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line740">line 740</a></li></ul></dd>@@ -5983,7 +6085,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line744">line 744</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line750">line 750</a></li></ul></dd>@@ -6134,7 +6236,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line728">line 728</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line734">line 734</a></li></ul></dd>@@ -6301,7 +6403,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line576">line 576</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line582">line 582</a></li></ul></dd>@@ -6407,7 +6509,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line907">line 907</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line913">line 913</a></li></ul></dd>@@ -6585,7 +6687,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line375">line 375</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line381">line 381</a></li></ul></dd>@@ -6691,7 +6793,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line848">line 848</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line854">line 854</a></li></ul></dd>@@ -6797,7 +6899,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line838">line 838</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line844">line 844</a></li></ul></dd>@@ -6971,7 +7073,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line585">line 585</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line591">line 591</a></li></ul></dd>@@ -7228,7 +7330,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line654">line 654</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line660">line 660</a></li></ul></dd>@@ -7406,7 +7508,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line596">line 596</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line602">line 602</a></li></ul></dd>@@ -7561,7 +7663,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line648">line 648</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line654">line 654</a></li></ul></dd>@@ -7716,7 +7818,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line674">line 674</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line680">line 680</a></li></ul></dd>@@ -7871,7 +7973,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line680">line 680</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line686">line 686</a></li></ul></dd>@@ -7979,7 +8081,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line831">line 831</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line837">line 837</a></li></ul></dd>@@ -8063,7 +8165,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line428">line 428</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line434">line 434</a></li></ul></dd>@@ -8157,7 +8259,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line902">line 902</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line908">line 908</a></li></ul></dd>@@ -8263,7 +8365,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line894">line 894</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line900">line 900</a></li></ul></dd>@@ -8520,7 +8622,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line660">line 660</a>+ <a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line666">line 666</a></li></ul></dd>@@ -8588,7 +8690,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/FrontendScriptApi.html b/docs/frontend_api/FrontendScriptApi.htmlindex 788b895a35..3b340b60af 100644--- a/docs/frontend_api/FrontendScriptApi.html+++ b/docs/frontend_api/FrontendScriptApi.html@@ -94,7 +94,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line24">line 24</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line25">line 25</a></li></ul></dd>@@ -236,7 +236,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line26">line 26</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line27">line 27</a></li></ul></dd>@@ -342,7 +342,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line45">line 45</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line46">line 46</a></li></ul></dd>@@ -448,7 +448,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line42">line 42</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line43">line 43</a></li></ul></dd>@@ -554,7 +554,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line39">line 39</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line40">line 40</a></li></ul></dd>@@ -614,7 +614,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line309">line 309</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line340">line 340</a></li></ul></dd>@@ -724,7 +724,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line31">line 31</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line32">line 32</a></li></ul></dd>@@ -834,7 +834,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line36">line 36</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line37">line 37</a></li></ul></dd>@@ -947,7 +947,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line33">line 33</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line34">line 34</a></li></ul></dd>@@ -1057,7 +1057,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line29">line 29</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line30">line 30</a></li></ul></dd>@@ -1186,7 +1186,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line64">line 64</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line65">line 65</a></li></ul></dd>@@ -1341,7 +1341,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line54">line 54</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line55">line 55</a></li></ul></dd>@@ -1682,7 +1682,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line124">line 124</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line125">line 125</a></li></ul></dd>@@ -1819,7 +1819,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line317">line 317</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>@@ -2027,7 +2027,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line459">line 459</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line490">line 490</a></li></ul></dd>@@ -2409,7 +2409,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line306">line 306</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line337">line 337</a></li></ul></dd>@@ -2564,7 +2564,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line251">line 251</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line252">line 252</a></li></ul></dd>@@ -2721,7 +2721,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line503">line 503</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line534">line 534</a></li></ul></dd>@@ -2876,7 +2876,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line495">line 495</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line526">line 526</a></li></ul></dd>@@ -2986,7 +2986,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line339">line 339</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line370">line 370</a></li></ul></dd>@@ -3092,7 +3092,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line323">line 323</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line354">line 354</a></li></ul></dd>@@ -3198,7 +3198,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line354">line 354</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line385">line 385</a></li></ul></dd>@@ -3308,7 +3308,7 @@ available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.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#line331">line 331</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line362">line 362</a></li></ul></dd>@@ -3419,7 +3419,7 @@ implementation of actual widget type.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line348">line 348</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line379">line 379</a></li></ul></dd>@@ -3574,7 +3574,7 @@ implementation of actual widget type.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#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#line394">line 394</a></li></ul></dd>@@ -3729,7 +3729,7 @@ implementation of actual widget type.<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line407">line 407</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line438">line 438</a></li></ul></dd>@@ -3836,7 +3836,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#line244">line 244</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line245">line 245</a></li></ul></dd>@@ -3991,7 +3991,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#line425">line 425</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line456">line 456</a></li></ul></dd>@@ -4147,7 +4147,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#line214">line 214</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line215">line 215</a></li></ul></dd>@@ -4348,7 +4348,7 @@ otherwise (by e.g. createLink())<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#line227">line 227</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line228">line 228</a></li></ul></dd>@@ -4454,7 +4454,7 @@ otherwise (by e.g. createLink())<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#line398">line 398</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line429">line 429</a></li></ul></dd>@@ -4609,7 +4609,7 @@ otherwise (by e.g. createLink())<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#line416">line 416</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line447">line 447</a></li></ul></dd>@@ -4764,7 +4764,7 @@ otherwise (by e.g. createLink())<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line434">line 434</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line465">line 465</a></li></ul></dd>@@ -4914,7 +4914,7 @@ otherwise (by e.g. createLink())<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#line514">line 514</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line545">line 545</a></li></ul></dd>@@ -5092,7 +5092,7 @@ otherwise (by e.g. createLink())<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#line97">line 97</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line98">line 98</a></li></ul></dd>@@ -5270,7 +5270,7 @@ otherwise (by e.g. createLink())<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#line79">line 79</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line80">line 80</a></li></ul></dd>@@ -5421,7 +5421,7 @@ otherwise (by e.g. createLink())<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#line258">line 258</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line259">line 259</a></li></ul></dd>@@ -5599,7 +5599,7 @@ otherwise (by e.g. createLink())<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#line378">line 378</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line409">line 409</a></li></ul></dd>@@ -5773,7 +5773,7 @@ otherwise (by e.g. createLink())<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#line388">line 388</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line419">line 419</a></li></ul></dd>@@ -5928,7 +5928,7 @@ otherwise (by e.g. createLink())<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#line488">line 488</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line519">line 519</a></li></ul></dd>@@ -6082,7 +6082,7 @@ otherwise (by e.g. createLink())<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#line479">line 479</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line510">line 510</a></li></ul></dd>@@ -6237,7 +6237,7 @@ otherwise (by e.g. createLink())<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#line235">line 235</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line236">line 236</a></li></ul></dd>@@ -6398,7 +6398,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#line157">line 157</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line158">line 158</a></li></ul></dd>@@ -6558,7 +6558,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#line201">line 201</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line202">line 202</a></li></ul></dd>@@ -6714,7 +6714,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#line189">line 189</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line190">line 190</a></li></ul></dd>@@ -6869,7 +6869,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#line443">line 443</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line474">line 474</a></li></ul></dd>@@ -7020,7 +7020,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#line370">line 370</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line401">line 401</a></li></ul></dd>@@ -7074,7 +7074,7 @@ Internally this serializes the anonymous function into string and sends it to ba- <h4 class="name" id="showError"><span class="type-signature"></span>showError<span class="signature">(message)</span><span class="type-signature"></span></h4>+ <h4 class="name" id="showConfirmDialog"><span class="type-signature"></span>showConfirmDialog<span class="signature">(message)</span><span class="type-signature"> → {Promise.<boolean>}</span></h4>@@ -7082,7 +7082,7 @@ Internally this serializes the anonymous function into string and sends it to ba<div class="description">- Show an error message to the user.+ Show confirm dialog to the user.</div>@@ -7175,7 +7175,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#line274">line 274</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>@@ -7200,6 +7200,28 @@ Internally this serializes the anonymous function into string and sends it to ba+<h5>Returns:</h5>+++<div class="param-desc">+ promise resolving to true if the user confirmed+</div>++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">Promise.<boolean></span>+++ </dd>+</dl>++@@ -7211,7 +7233,7 @@ Internally this serializes the anonymous function into string and sends it to ba- <h4 class="name" id="showMessage"><span class="type-signature"></span>showMessage<span class="signature">(message)</span><span class="type-signature"></span></h4>+ <h4 class="name" id="showError"><span class="type-signature"></span>showError<span class="signature">(message)</span><span class="type-signature"></span></h4>@@ -7219,7 +7241,7 @@ Internally this serializes the anonymous function into string and sends it to ba<div class="description">- Show an info message to the user.+ Show an error toast message to the user.</div>@@ -7312,7 +7334,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#line266">line 266</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line275">line 275</a></li></ul></dd>@@ -7348,7 +7370,7 @@ Internally this serializes the anonymous function into string and sends it to ba- <h4 class="name" id="triggerCommand"><span class="type-signature"></span>triggerCommand<span class="signature">(name, data)</span><span class="type-signature"></span></h4>+ <h4 class="name" id="showInfoDialog"><span class="type-signature"></span>showInfoDialog<span class="signature">(message)</span><span class="type-signature"> → {Promise}</span></h4>@@ -7356,7 +7378,7 @@ Internally this serializes the anonymous function into string and sends it to ba<div class="description">- Trigger command. This is a very low-level API which should be avoided if possible.+ Show an info dialog to the user.</div>@@ -7392,7 +7414,7 @@ Internally this serializes the anonymous function into string and sends it to ba<tr>- <td class="name"><code>name</code></td>+ <td class="name"><code>message</code></td><td class="type">@@ -7412,16 +7434,148 @@ Internally this serializes the anonymous function into string and sends it to ba</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#line284">line 284</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++<h5>Returns:</h5>+++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">Promise</span>+++ </dd>+</dl>++++++++++++++ <h4 class="name" id="showMessage"><span class="type-signature"></span>showMessage<span class="signature">(message)</span><span class="type-signature"></span></h4>+++++++<div class="description">+ Show an info toast message to the user.+</div>++++++++++ <h5>Parameters:</h5>+++<table class="params">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>++++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+<tr>- <td class="name"><code>data</code></td>+ <td class="name"><code>message</code></td><td class="type">-<span class="param-type">object</span>+<span class="param-type">string</span>@@ -7472,7 +7626,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#line283">line 283</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line267">line 267</a></li></ul></dd>@@ -7508,7 +7662,7 @@ Internally this serializes the anonymous function into string and sends it to ba- <h4 class="name" id="triggerEvent"><span class="type-signature"></span>triggerEvent<span class="signature">(name, data)</span><span class="type-signature"></span></h4>+ <h4 class="name" id="showPromptDialog"><span class="type-signature"></span>showPromptDialog<span class="signature">(props)</span><span class="type-signature"> → {Promise.<string>}</span></h4>@@ -7516,7 +7670,7 @@ Internally this serializes the anonymous function into string and sends it to ba<div class="description">- Trigger event. This is a very low-level API which should be avoided if possible.+ Show prompt dialog to the user.</div>@@ -7552,7 +7706,49 @@ Internally this serializes the anonymous function into string and sends it to ba<tr>- <td class="name"><code>name</code></td>+ <td class="name"><code>props</code></td>+++ <td class="type">+++<span class="param-type">object</span>++++ </td>++++++ <td class="description last">+ <h6>Properties</h6>+++<table class="params">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>++++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>++ <td class="name"><code>title</code></td><td class="type">@@ -7575,13 +7771,36 @@ Internally this serializes the anonymous function into string and sends it to ba<tr>- <td class="name"><code>data</code></td>+ <td class="name"><code>message</code></td><td class="type">-<span class="param-type">object</span>+<span class="param-type">string</span>++++ </td>++++++ <td class="description last"></td>+ </tr>++++ <tr>++ <td class="name"><code>defaultValue</code></td>+++ <td class="type">+++<span class="param-type">string</span>@@ -7598,6 +7817,13 @@ Internally this serializes the anonymous function into string and sends it to ba</tbody></table>+ </td>+ </tr>+++ </tbody>+</table>+@@ -7632,7 +7858,349 @@ 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#line292">line 292</a>+ <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>+ </li></ul></dd>++++++++</dl>++++++++++++++++<h5>Returns:</h5>+++<div class="param-desc">+ promise resolving to the answer provided by the user+</div>++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">Promise.<string></span>+++ </dd>+</dl>++++++++++++++ <h4 class="name" id="triggerCommand"><span class="type-signature"></span>triggerCommand<span class="signature">(name, data)</span><span class="type-signature"></span></h4>+++++++<div class="description">+ Trigger command. This is a very low-level API which should be avoided if possible.+</div>++++++++++ <h5>Parameters:</h5>+++<table class="params">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>++++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>++ <td class="name"><code>name</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>++++++ <td class="description last"></td>+ </tr>++++ <tr>++ <td class="name"><code>data</code></td>+++ <td class="type">+++<span class="param-type">object</span>++++ </td>++++++ <td class="description last"></td>+ </tr>+++ </tbody>+</table>+++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line314">line 314</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="triggerEvent"><span class="type-signature"></span>triggerEvent<span class="signature">(name, data)</span><span class="type-signature"></span></h4>+++++++<div class="description">+ Trigger event. This is a very low-level API which should be avoided if possible.+</div>++++++++++ <h5>Parameters:</h5>+++<table class="params">+ <thead>+ <tr>++ <th>Name</th>+++ <th>Type</th>++++++ <th class="last">Description</th>+ </tr>+ </thead>++ <tbody>+++ <tr>++ <td class="name"><code>name</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>++++++ <td class="description last"></td>+ </tr>++++ <tr>++ <td class="name"><code>data</code></td>+++ <td class="type">+++<span class="param-type">object</span>++++ </td>++++++ <td class="description last"></td>+ </tr>+++ </tbody>+</table>+++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line323">line 323</a></li></ul></dd>@@ -7724,7 +8292,7 @@ Typical use case is when a new note has been created, we should wait until it is<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#line471">line 471</a>+ <a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line502">line 502</a></li></ul></dd>@@ -7788,7 +8356,7 @@ Typical use case is when a new note has been created, we should wait until it is</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/entities_fattachment.js.html b/docs/frontend_api/entities_fattachment.js.htmlindex b2137c3539..c49ab8dd2c 100644--- a/docs/frontend_api/entities_fattachment.js.html+++ b/docs/frontend_api/entities_fattachment.js.html@@ -80,7 +80,7 @@ export default FAttachment;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/entities_fattribute.js.html b/docs/frontend_api/entities_fattribute.js.htmlindex abbb8b686c..7daa67ff2e 100644--- a/docs/frontend_api/entities_fattribute.js.html+++ b/docs/frontend_api/entities_fattribute.js.html@@ -116,7 +116,7 @@ export default FAttribute;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/entities_fblob.js.html b/docs/frontend_api/entities_fblob.js.htmlindex 311c1fe777..e98ee01c63 100644--- a/docs/frontend_api/entities_fblob.js.html+++ b/docs/frontend_api/entities_fblob.js.html@@ -43,6 +43,27 @@/** @type {string} */this.utcDateModified = row.utcDateModified;}++ /**+ * @returns {*}+ * @throws Error in case of invalid JSON */+ getJsonContent() {+ if (!this.content || !this.content.trim()) {+ return null;+ }++ return JSON.parse(this.content);+ }++ /** @returns {*|null} valid object or null if the content cannot be parsed as JSON */+ getJsonContentSafely() {+ try {+ return this.getJsonContent();+ }+ catch (e) {+ return null;+ }+ }}</code></pre></article>@@ -54,7 +75,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/entities_fbranch.js.html b/docs/frontend_api/entities_fbranch.js.htmlindex 1d663d7de3..f2049871d7 100644--- a/docs/frontend_api/entities_fbranch.js.html+++ b/docs/frontend_api/entities_fbranch.js.html@@ -100,7 +100,7 @@ export default FBranch;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/entities_fnote.js.html b/docs/frontend_api/entities_fnote.js.htmlindex 2893ad25b6..d6f68bcca2 100644--- a/docs/frontend_api/entities_fnote.js.html+++ b/docs/frontend_api/entities_fnote.js.html@@ -264,6 +264,12 @@ class FNote {return this.attachments;}+ /** @returns {Promise<FAttachment[]>} */+ async getAttachmentsByRole(role) {+ return (await this.getAttachments())+ .filter(attachment => attachment.role === role);+ }+/** @returns {Promise<FAttachment>} */async getAttachmentById(attachmentId) {const attachments = await this.getAttachments();@@ -998,6 +1004,10 @@ class FNote {isOptions() {return this.noteId.startsWith("_options");}++ async getMetadata() {+ return await server.get(`notes/${this.noteId}/metadata`);+ }}export default FNote;@@ -1011,7 +1021,7 @@ export default FNote;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/index.html b/docs/frontend_api/index.htmlindex 46ccdc9a8b..1fc84f3649 100644--- a/docs/frontend_api/index.html+++ b/docs/frontend_api/index.html@@ -50,7 +50,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul></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.htmlindex 96cc310576..3c978b25cb 100644--- a/docs/frontend_api/services_frontend_script_api.js.html+++ b/docs/frontend_api/services_frontend_script_api.js.html@@ -42,6 +42,7 @@ import NoteContextAwareWidget from "../widgets/note_context_aware_widget.js";import BasicWidget from "../widgets/basic_widget.js";import SpacedUpdate from "./spaced_update.js";import shortcutService from "./shortcuts.js";+import dialogService from "./dialog.js";/*** <p>This is the main frontend API interface for scripts. All the properties and methods are published in the "api" object@@ -286,7 +287,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $containthis.parseDate = utils.parseDate;/**- * Show an info message to the user.+ * Show an info toast message to the user.** @method* @param {string} message@@ -294,13 +295,43 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $containthis.showMessage = toastService.showMessage;/**- * Show an error message to the user.+ * Show an error toast message to the user.** @method* @param {string} message*/this.showError = toastService.showError;+ /**+ * Show an info dialog to the user.+ *+ * @method+ * @param {string} message+ * @returns {Promise}+ */+ this.showInfoDialog = dialogService.info;++ /**+ * Show confirm dialog to the user.+ *+ * @method+ * @param {string} message+ * @returns {Promise<boolean>} promise resolving to true if the user confirmed+ */+ this.showConfirmDialog = dialogService.confirm;++ /**+ * Show prompt dialog to the user.+ *+ * @method+ * @param {object} props+ * @param {string} props.title+ * @param {string} props.message+ * @param {string} props.defaultValue+ * @returns {Promise<string>} promise resolving to the answer provided by the user+ */+ this.showPromptDialog = dialogService.prompt;+/*** Trigger command. This is a very low-level API which should be avoided if possible.*@@ -570,7 +601,7 @@ export default FrontendScriptApi;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul></nav><br class="clear">