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
no need to create template relation if there is already one owned
zadam08e12e73497c
diff --git a/db/demo.zip b/db/demo.zipindex a2327ff331..e4740b49b6 100644Binary files a/db/demo.zip and b/db/demo.zip differdiff --git a/docs/backend_api/AbstractEntity.html b/docs/backend_api/AbstractEntity.htmlindex ab08501cea..b39f717a3c 100644--- a/docs/backend_api/AbstractEntity.html+++ b/docs/backend_api/AbstractEntity.html@@ -139,10 +139,576 @@+ <h3 class="subsection-title">Members</h3>++++<h4 class="name" id="becca"><span class="type-signature">(protected) </span>becca<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>+ </li></ul></dd>++++++++</dl>++++++++<h3 class="subsection-title">Methods</h3>+++++++ <h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="beforeSaving"><span class="type-signature">(protected) </span>beforeSaving<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="getPojoToSave"><span class="type-signature">(protected) </span>getPojoToSave<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="getUtcDateChanged"><span class="type-signature">(protected) </span>getUtcDateChanged<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++@@ -267,7 +833,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line118">line 118</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a></li></ul></dd>@@ -355,7 +921,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line73">line 73</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a></li></ul></dd>diff --git a/docs/backend_api/Attribute.html b/docs/backend_api/Attribute.htmlindex 8633da77b4..3b76968981 100644--- a/docs/backend_api/Attribute.html+++ b/docs/backend_api/Attribute.html@@ -223,6 +223,69 @@ and relation (representing named relationship between source and target note)</d+<h4 class="name" id="becca"><span class="type-signature">(protected) </span>becca<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#becca">AbstractEntity#becca</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>+ </li></ul></dd>++++++++</dl>++++++++<h4 class="name" id="isInheritable"><span class="type-signature"></span>isInheritable<span class="type-signature"> :boolean</span></h4>@@ -709,7 +772,7 @@ and relation (representing named relationship between source and target note)</d- <h4 class="name" id="getNote"><span class="type-signature"></span>getNote<span class="signature">()</span><span class="type-signature"> → {<a href="Note.html">Note</a>|null}</span></h4>+ <h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>@@ -737,6 +800,11 @@ and relation (representing named relationship between source and target note)</d+ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#addEntityChange">AbstractEntity#addEntityChange</a>+ </li></ul></dd>+@@ -757,7 +825,7 @@ and relation (representing named relationship between source and target note)</d<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line114">line 114</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a></li></ul></dd>@@ -782,27 +850,95 @@ and relation (representing named relationship between source and target note)</d-<h5>Returns:</h5>--<dl>- <dt>- Type- </dt>- <dd>++-<span class="param-type"><a href="Note.html">Note</a></span>-|+-<span class="param-type">null</span>++++ <h4 class="name" id="beforeSaving"><span class="type-signature">(protected) </span>beforeSaving<span class="signature">()</span><span class="type-signature"></span></h4>++- </dd>-</dl>+++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#beforeSaving">AbstractEntity#beforeSaving</a>+ </li></ul></dd>++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++@@ -814,7 +950,7 @@ and relation (representing named relationship between source and target note)</d- <h4 class="name" id="getTargetNote"><span class="type-signature"></span>getTargetNote<span class="signature">()</span><span class="type-signature"> → {<a href="Note.html">Note</a>|null}</span></h4>+ <h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>@@ -842,6 +978,11 @@ and relation (representing named relationship between source and target note)</d+ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateHash">AbstractEntity#generateHash</a>+ </li></ul></dd>+@@ -862,7 +1003,7 @@ and relation (representing named relationship between source and target note)</d<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line121">line 121</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a></li></ul></dd>@@ -887,27 +1028,483 @@ and relation (representing named relationship between source and target note)</d-<h5>Returns:</h5>--<dl>- <dt>- Type- </dt>- <dd>++-<span class="param-type"><a href="Note.html">Note</a></span>-|+-<span class="param-type">null</span>+++ <h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>+- </dd>+++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateIdIfNecessary">AbstractEntity#generateIdIfNecessary</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>+ </li></ul></dd>+++++++</dl>+++++++++++++++++++++++++ <h4 class="name" id="getNote"><span class="type-signature"></span>getNote<span class="signature">()</span><span class="type-signature"> → {<a href="Note.html">Note</a>|null}</span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line115">line 115</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++<h5>Returns:</h5>+++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type"><a href="Note.html">Note</a></span>+|++<span class="param-type">null</span>+++ </dd>+</dl>++++++++++++++ <h4 class="name" id="getPojoToSave"><span class="type-signature">(protected) </span>getPojoToSave<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getPojoToSave">AbstractEntity#getPojoToSave</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="getTargetNote"><span class="type-signature"></span>getTargetNote<span class="signature">()</span><span class="type-signature"> → {<a href="Note.html">Note</a>|null}</span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line122">line 122</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++<h5>Returns:</h5>+++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type"><a href="Note.html">Note</a></span>+|++<span class="param-type">null</span>+++ </dd>+</dl>++++++++++++++ <h4 class="name" id="getUtcDateChanged"><span class="type-signature">(protected) </span>getUtcDateChanged<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getUtcDateChanged">AbstractEntity#getUtcDateChanged</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++@@ -967,7 +1564,7 @@ and relation (representing named relationship between source and target note)</d<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line136">line 136</a>+ <a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line137">line 137</a></li></ul></dd>@@ -1144,7 +1741,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line118">line 118</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a></li></ul></dd>@@ -1237,7 +1834,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line73">line 73</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a></li></ul></dd>diff --git a/docs/backend_api/Branch.html b/docs/backend_api/Branch.htmlindex f89ff45ad3..db8e9e0c6b 100644--- a/docs/backend_api/Branch.html+++ b/docs/backend_api/Branch.html@@ -155,6 +155,69 @@ parents.</div>+<h4 class="name" id="becca"><span class="type-signature">(protected) </span>becca<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#becca">AbstractEntity#becca</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>+ </li></ul></dd>++++++++</dl>++++++++<h4 class="name" id="branchId"><span class="type-signature"></span>branchId<span class="type-signature"> :string</span></h4>@@ -751,6 +814,184 @@ parents.</div><h3 class="subsection-title">Methods</h3>+++++++ <h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#addEntityChange">AbstractEntity#addEntityChange</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="beforeSaving"><span class="type-signature">(protected) </span>beforeSaving<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#beforeSaving">AbstractEntity#beforeSaving</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++@@ -955,6 +1196,362 @@ parents.</div>+++++++ <h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateHash">AbstractEntity#generateHash</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateIdIfNecessary">AbstractEntity#generateIdIfNecessary</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="getPojoToSave"><span class="type-signature">(protected) </span>getPojoToSave<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getPojoToSave">AbstractEntity#getPojoToSave</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="getUtcDateChanged"><span class="type-signature">(protected) </span>getUtcDateChanged<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getUtcDateChanged">AbstractEntity#getUtcDateChanged</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++@@ -1084,7 +1681,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line118">line 118</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a></li></ul></dd>@@ -1177,7 +1774,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line73">line 73</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a></li></ul></dd>diff --git a/docs/backend_api/EtapiToken.html b/docs/backend_api/EtapiToken.htmlindex b675d8cdc1..da6e56f2fc 100644--- a/docs/backend_api/EtapiToken.html+++ b/docs/backend_api/EtapiToken.html@@ -160,6 +160,69 @@ from tokenHash and token.</div>+<h4 class="name" id="becca"><span class="type-signature">(protected) </span>becca<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#becca">AbstractEntity#becca</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>+ </li></ul></dd>++++++++</dl>++++++++<h4 class="name" id="etapiTokenId"><span class="type-signature"></span>etapiTokenId<span class="type-signature"> :string</span></h4>@@ -572,6 +635,540 @@ from tokenHash and token.</div><h3 class="subsection-title">Methods</h3>+++++++ <h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#addEntityChange">AbstractEntity#addEntityChange</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="beforeSaving"><span class="type-signature">(protected) </span>beforeSaving<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#beforeSaving">AbstractEntity#beforeSaving</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateHash">AbstractEntity#generateHash</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateIdIfNecessary">AbstractEntity#generateIdIfNecessary</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="getPojoToSave"><span class="type-signature">(protected) </span>getPojoToSave<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getPojoToSave">AbstractEntity#getPojoToSave</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="getUtcDateChanged"><span class="type-signature">(protected) </span>getUtcDateChanged<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getUtcDateChanged">AbstractEntity#getUtcDateChanged</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++@@ -701,7 +1298,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line118">line 118</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a></li></ul></dd>@@ -794,7 +1391,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line73">line 73</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a></li></ul></dd>diff --git a/docs/backend_api/Note.html b/docs/backend_api/Note.htmlindex 2afe54588c..b8f53d2d9f 100644--- a/docs/backend_api/Note.html+++ b/docs/backend_api/Note.html@@ -93,7 +93,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line23">line 23</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line24">line 24</a></li></ul></dd>@@ -154,23 +154,13 @@-<h4 class="name" id="children"><span class="type-signature"></span>children<span class="type-signature"> :Array.<<a href="Note.html">Note</a>></span></h4>+<h4 class="name" id="becca"><span class="type-signature">(protected) </span>becca<span class="type-signature"></span></h4>- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">Array.<<a href="Note.html">Note</a>></span>--- </li>- </ul>-@@ -184,27 +174,9 @@------------------- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line94">line 94</a>+ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#becca">AbstractEntity#becca</a></li></ul></dd>@@ -213,58 +185,6 @@-</dl>---------<h4 class="name" id="contentSize"><span class="type-signature"></span>contentSize<span class="type-signature"> :int|null</span></h4>-----<div class="description">- size of the content in bytes-</div>---- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">int</span>-|--<span class="param-type">null</span>--- </li>- </ul>------<dl class="details">--------------@@ -279,7 +199,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line120">line 120</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a></li></ul></dd>@@ -347,7 +267,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line67">line 67</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line68">line 68</a></li></ul></dd>@@ -415,7 +335,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line69">line 69</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line70">line 70</a></li></ul></dd>@@ -486,7 +406,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line83">line 83</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line84">line 84</a></li></ul></dd>@@ -554,7 +474,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line78">line 78</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line79">line 79</a></li></ul></dd>@@ -622,7 +542,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line61">line 61</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line62">line 62</a></li></ul></dd>@@ -690,7 +610,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line65">line 65</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line66">line 66</a></li></ul></dd>@@ -758,7 +678,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line57">line 57</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line58">line 58</a></li></ul></dd>@@ -776,14 +696,10 @@-<h4 class="name" id="noteSize"><span class="type-signature"></span>noteSize<span class="type-signature"> :int|null</span></h4>-+<h4 class="name" id="title"><span class="type-signature"></span>title<span class="type-signature"> :string</span></h4>-<div class="description">- size of the content and note revision contents in bytes-</div>@@ -791,10 +707,7 @@<ul><li>-<span class="param-type">int</span>-|--<span class="param-type">null</span>+<span class="param-type">string</span></li>@@ -833,7 +746,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line125">line 125</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line60">line 60</a></li></ul></dd>@@ -851,7 +764,7 @@-<h4 class="name" id="ownedAttributes"><span class="type-signature"></span>ownedAttributes<span class="type-signature"> :Array.<<a href="Attribute.html">Attribute</a>></span></h4>+<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4>@@ -862,7 +775,7 @@<ul><li>-<span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span>+<span class="param-type">string</span></li>@@ -901,7 +814,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line96">line 96</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line64">line 64</a></li></ul></dd>@@ -919,7 +832,7 @@-<h4 class="name" id="parentBranches"><span class="type-signature"></span>parentBranches<span class="type-signature"> :Array.<<a href="Branch.html">Branch</a>></span></h4>+<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"> :string</span></h4>@@ -930,7 +843,7 @@<ul><li>-<span class="param-type">Array.<<a href="Branch.html">Branch</a>></span>+<span class="param-type">string</span></li>@@ -969,7 +882,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line90">line 90</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line72">line 72</a></li></ul></dd>@@ -987,7 +900,7 @@-<h4 class="name" id="parents"><span class="type-signature"></span>parents<span class="type-signature"> :Array.<<a href="Note.html">Note</a>></span></h4>+<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"> :string</span></h4>@@ -998,7 +911,7 @@<ul><li>-<span class="param-type">Array.<<a href="Note.html">Note</a>></span>+<span class="param-type">string</span></li>@@ -1037,7 +950,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line92">line 92</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line74">line 74</a></li></ul></dd>@@ -1054,30 +967,31 @@++++ <h3 class="subsection-title">Methods</h3>++-<h4 class="name" id="revisionCount"><span class="type-signature"></span>revisionCount<span class="type-signature"> :int|null</span></h4>+++++ <h4 class="name" id="addAttribute"><span class="type-signature"></span>addAttribute<span class="signature">()</span><span class="type-signature"> → {<a href="Attribute.html">Attribute</a>}</span></h4>+++-<div class="description">- number of note revisions for this note-</div>- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">int</span>-|-<span class="param-type">null</span>- </li>- </ul>@@ -1112,7 +1026,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line130">line 130</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1071">line 1071</a></li></ul></dd>@@ -1128,92 +1042,58 @@---<h4 class="name" id="targetRelations"><span class="type-signature"></span>targetRelations<span class="type-signature"> :Array.<<a href="Attribute.html">Attribute</a>></span></h4>--- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span>--- </li>- </ul>--<dl class="details">-+<h5>Returns:</h5>-+--+<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type"><a href="Attribute.html">Attribute</a></span>--+ </dd>+</dl>-----++-- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line106">line 106</a>- </li></ul></dd>-+ <h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>-</dl>------<h4 class="name" id="title"><span class="type-signature"></span>title<span class="type-signature"> :string</span></h4>-- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">string</span>- </li>- </ul>@@ -1228,6 +1108,11 @@+ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#addEntityChange">AbstractEntity#addEntityChange</a>+ </li></ul></dd>+@@ -1248,7 +1133,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line59">line 59</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a></li></ul></dd>@@ -1264,94 +1149,42 @@---<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4>------ <h5>Type:</h5>- <ul>- <li>--<span class="param-type">string</span>- </li>- </ul>-<dl class="details">------++-+ <h4 class="name" id="beforeSaving"><span class="type-signature">(protected) </span>beforeSaving<span class="signature">()</span><span class="type-signature"></span></h4>---- <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line63">line 63</a>- </li></ul></dd>-----</dl>---<h4 class="name" id="utcDateCreated"><span class="type-signature"></span>utcDateCreated<span class="type-signature"> :string</span></h4>------- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">string</span>--- </li>- </ul>--@@ -1364,6 +1197,11 @@+ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#beforeSaving">AbstractEntity#beforeSaving</a>+ </li></ul></dd>+@@ -1384,7 +1222,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line71">line 71</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a></li></ul></dd>@@ -1400,99 +1238,137 @@---<h4 class="name" id="utcDateModified"><span class="type-signature"></span>utcDateModified<span class="type-signature"> :string</span></h4>- <h5>Type:</h5>- <ul>- <li>--<span class="param-type">string</span>- </li>- </ul>-<dl class="details">-++-+ <h4 class="name" id="deleteNote"><span class="type-signature"></span>deleteNote<span class="signature">(deleteId<span class="signature-attributes">opt</span>, taskContext<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>---+<div class="description">+ (Soft) delete a note and all its descendants.+</div>------ <dt class="tag-source">Source:</dt>- <dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line73">line 73</a>- </li></ul></dd>---++ <h5>Parameters:</h5>-</dl>+<table class="params">+ <thead>+ <tr>++ <th>Name</th>++ <th>Type</th>++ <th>Attributes</th>+++ <th class="last">Description</th>+ </tr>+ </thead>-+ <tbody>-- <h3 class="subsection-title">Methods</h3>+ <tr>++ <td class="name"><code>deleteId</code></td>+-+ <td class="type">++<span class="param-type">string</span>--- <h4 class="name" id="__getInheritableAttributes"><span class="type-signature"></span>__getInheritableAttributes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4>-++ </td>+++ <td class="attributes">++ <optional><br>++++++ </td>+++++ <td class="description last">optional delete identified</td>+ </tr>+ <tr>++ <td class="name"><code>taskContext</code></td>++ <td class="type">+++<span class="param-type">TaskContext</span>++ </td>++ <td class="attributes">++ <optional><br>++++ </td>+++ <td class="description last"></td>+ </tr>+++ </tbody>+</table>@@ -1528,7 +1404,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line407">line 407</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1183">line 1183</a></li></ul></dd>@@ -1553,24 +1429,6 @@-<h5>Returns:</h5>-----<dl>- <dt>- Type- </dt>- <dd>--<span class="param-type">Array.<<a href="Attribute.html">Attribute</a>></span>--- </dd>-</dl>--@@ -1582,7 +1440,7 @@- <h4 class="name" id="addAttribute"><span class="type-signature"></span>addAttribute<span class="signature">()</span><span class="type-signature"> → {<a href="Attribute.html">Attribute</a>}</span></h4>+ <h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>@@ -1610,6 +1468,11 @@+ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateHash">AbstractEntity#generateHash</a>+ </li></ul></dd>+@@ -1630,7 +1493,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1025">line 1025</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a></li></ul></dd>@@ -1655,24 +1518,6 @@-<h5>Returns:</h5>-----<dl>- <dt>- Type- </dt>- <dd>--<span class="param-type"><a href="Attribute.html">Attribute</a></span>--- </dd>-</dl>--@@ -1681,120 +1526,22 @@---- <h4 class="name" id="deleteNote"><span class="type-signature"></span>deleteNote<span class="signature">(deleteId<span class="signature-attributes">opt</span>, taskContext<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>-------<div class="description">- (Soft) delete a note and all its descendants.-</div>---------- <h5>Parameters:</h5>---<table class="params">- <thead>- <tr>-- <th>Name</th>--- <th>Type</th>--- <th>Attributes</th>----- <th class="last">Description</th>- </tr>- </thead>-- <tbody>--- <tr>-- <td class="name"><code>deleteId</code></td>--- <td class="type">---<span class="param-type">string</span>---- </td>--- <td class="attributes">-- <optional><br>------ </td>----- <td class="description last">optional delete identified</td>- </tr>+++ <h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>- <tr>-- <td class="name"><code>taskContext</code></td>-+- <td class="type">---<span class="param-type">TaskContext</span>-- </td>-- <td class="attributes">-- <optional><br>---- </td>--- <td class="description last"></td>- </tr>-- </tbody>-</table>@@ -1810,6 +1557,11 @@+ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateIdIfNecessary">AbstractEntity#generateIdIfNecessary</a>+ </li></ul></dd>+@@ -1830,7 +1582,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1137">line 1137</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a></li></ul></dd>@@ -1914,7 +1666,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line947">line 947</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line993">line 993</a></li></ul></dd>@@ -2020,7 +1772,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line867">line 867</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line913">line 913</a></li></ul></dd>@@ -2194,7 +1946,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line525">line 525</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line567">line 567</a></li></ul></dd>@@ -2394,7 +2146,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line338">line 338</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line363">line 363</a></li></ul></dd>@@ -2572,7 +2324,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line536">line 536</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line578">line 578</a></li></ul></dd>@@ -2683,7 +2435,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line152">line 152</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line161">line 161</a></li></ul></dd>@@ -2785,7 +2537,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line172">line 172</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line181">line 181</a></li></ul></dd>@@ -2887,7 +2639,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line162">line 162</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line171">line 171</a></li></ul></dd>@@ -2989,7 +2741,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line186">line 186</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line195">line 195</a></li></ul></dd>@@ -3091,7 +2843,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line220">line 220</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line229">line 229</a></li></ul></dd>@@ -3199,7 +2951,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line662">line 662</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line708">line 708</a></li></ul></dd>@@ -3305,7 +3057,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line231">line 231</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line256">line 256</a></li></ul></dd>@@ -3456,7 +3208,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line467">line 467</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line508">line 508</a></li></ul></dd>@@ -3626,7 +3378,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line557">line 557</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line599">line 599</a></li></ul></dd>@@ -3781,7 +3533,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line491">line 491</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line532">line 532</a></li></ul></dd>@@ -3951,7 +3703,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line565">line 565</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line607">line 607</a></li></ul></dd>@@ -4057,7 +3809,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line631">line 631</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line677">line 677</a></li></ul></dd>@@ -4117,7 +3869,7 @@ This method can be significantly faster than the getAttribute()- <h4 class="name" id="getOwnedAttributes"><span class="type-signature"></span>getOwnedAttributes<span class="signature">(type<span class="signature-attributes">opt</span>, name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4>+ <h4 class="name" id="getOwnedAttributes"><span class="type-signature"></span>getOwnedAttributes<span class="signature">(type<span class="signature-attributes">opt</span>, name<span class="signature-attributes">opt</span>, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Attribute.html">Attribute</a>>}</span></h4>@@ -4222,6 +3974,39 @@ This method can be significantly faster than the getAttribute()</tr>++ <tr>++ <td class="name"><code>value</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++++ </td>+++++ <td class="description last">(optional) attribute value to filter</td>+ </tr>++</tbody></table>@@ -4259,7 +4044,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line606">line 606</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line649">line 649</a></li></ul></dd>@@ -4437,7 +4222,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line547">line 547</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line589">line 589</a></li></ul></dd>@@ -4595,7 +4380,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line473">line 473</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line514">line 514</a></li></ul></dd>@@ -4765,7 +4550,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line573">line 573</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line615">line 615</a></li></ul></dd>@@ -4920,7 +4705,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line497">line 497</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line538">line 538</a></li></ul></dd>@@ -5090,7 +4875,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line581">line 581</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line623">line 623</a></li></ul></dd>@@ -5245,7 +5030,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line485">line 485</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line526">line 526</a></li></ul></dd>@@ -5415,7 +5200,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line597">line 597</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line639">line 639</a></li></ul></dd>@@ -5570,7 +5355,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line509">line 509</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line550">line 550</a></li></ul></dd>@@ -5679,7 +5464,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line144">line 144</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line153">line 153</a></li></ul></dd>@@ -5781,7 +5566,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line157">line 157</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line166">line 166</a></li></ul></dd>@@ -5829,6 +5614,95 @@ This method can be significantly faster than the getAttribute()+++++++ <h4 class="name" id="getPojoToSave"><span class="type-signature">(protected) </span>getPojoToSave<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getPojoToSave">AbstractEntity#getPojoToSave</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++@@ -5932,7 +5806,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line479">line 479</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line520">line 520</a></li></ul></dd>@@ -6102,7 +5976,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line589">line 589</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line631">line 631</a></li></ul></dd>@@ -6257,7 +6131,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line503">line 503</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line544">line 544</a></li></ul></dd>@@ -6366,7 +6240,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line317">line 317</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line342">line 342</a></li></ul></dd>@@ -6475,7 +6349,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line810">line 810</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line856">line 856</a></li></ul></dd>@@ -6577,7 +6451,109 @@ 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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line789">line 789</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line835">line 835</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++<h5>Returns:</h5>+++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">Array.<<a href="Note.html">Note</a>></span>+++ </dd>+</dl>++++++++++++++ <h4 class="name" id="getSubtreeNotesIncludingTemplated"><span class="type-signature"></span>getSubtreeNotesIncludingTemplated<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line804">line 804</a></li></ul></dd>@@ -6631,7 +6607,7 @@ This method can be significantly faster than the getAttribute()- <h4 class="name" id="getSubtreeNotesIncludingTemplated"><span class="type-signature"></span>getSubtreeNotesIncludingTemplated<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>+ <h4 class="name" id="getTemplatedNotes"><span class="type-signature"></span>getTemplatedNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>@@ -6679,7 +6655,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line758">line 758</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line955">line 955</a></li></ul></dd>@@ -6707,6 +6683,11 @@ This method can be significantly faster than the getAttribute()<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>@@ -6733,7 +6714,7 @@ This method can be significantly faster than the getAttribute()- <h4 class="name" id="getTemplatedNotes"><span class="type-signature"></span>getTemplatedNotes<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Note.html">Note</a>>}</span></h4>+ <h4 class="name" id="getUtcDateChanged"><span class="type-signature">(protected) </span>getUtcDateChanged<span class="signature">()</span><span class="type-signature"></span></h4>@@ -6761,6 +6742,11 @@ This method can be significantly faster than the getAttribute()+ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getUtcDateChanged">AbstractEntity#getUtcDateChanged</a>+ </li></ul></dd>+@@ -6781,7 +6767,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line909">line 909</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a></li></ul></dd>@@ -6806,29 +6792,6 @@ This method can be significantly faster than the getAttribute()-<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>- <dt>- Type- </dt>- <dd>--<span class="param-type">Array.<<a href="Note.html">Note</a>></span>--- </dd>-</dl>--@@ -6888,7 +6851,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line893">line 893</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line939">line 939</a></li></ul></dd>@@ -6990,7 +6953,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line167">line 167</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line176">line 176</a></li></ul></dd>@@ -7044,7 +7007,7 @@ This method can be significantly faster than the getAttribute()- <h4 class="name" id="hasLabel"><span class="type-signature"></span>hasLabel<span class="signature">(name)</span><span class="type-signature"> → {boolean}</span></h4>+ <h4 class="name" id="hasLabel"><span class="type-signature"></span>hasLabel<span class="signature">(name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {boolean}</span></h4>@@ -7072,6 +7035,8 @@ This method can be significantly faster than the getAttribute()<th>Type</th>+ <th>Attributes</th>+@@ -7097,6 +7062,14 @@ This method can be significantly faster than the getAttribute()</td>+ <td class="attributes">++++++ </td>+@@ -7104,6 +7077,39 @@ This method can be significantly faster than the getAttribute()</tr>++ <tr>++ <td class="name"><code>value</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++++ </td>+++++ <td class="description last">label value</td>+ </tr>++</tbody></table>@@ -7141,7 +7147,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line443">line 443</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line481">line 481</a></li></ul></dd>@@ -7199,7 +7205,7 @@ This method can be significantly faster than the getAttribute()- <h4 class="name" id="hasOwnedAttribute"><span class="type-signature"></span>hasOwnedAttribute<span class="signature">(type, name)</span><span class="type-signature"> → {boolean}</span></h4>+ <h4 class="name" id="hasOwnedAttribute"><span class="type-signature"></span>hasOwnedAttribute<span class="signature">(type, name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {boolean}</span></h4>@@ -7227,6 +7233,8 @@ This method can be significantly faster than the getAttribute()<th>Type</th>+ <th>Attributes</th>+@@ -7252,6 +7260,14 @@ This method can be significantly faster than the getAttribute()</td>+ <td class="attributes">++++++ </td>+@@ -7275,6 +7291,14 @@ This method can be significantly faster than the getAttribute()</td>+ <td class="attributes">++++++ </td>+@@ -7282,6 +7306,39 @@ This method can be significantly faster than the getAttribute()</tr>++ <tr>++ <td class="name"><code>value</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++++ </td>+++++ <td class="description last">attribute value</td>+ </tr>++</tbody></table>@@ -7319,7 +7376,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line516">line 516</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line558">line 558</a></li></ul></dd>@@ -7377,7 +7434,7 @@ This method can be significantly faster than the getAttribute()- <h4 class="name" id="hasOwnedLabel"><span class="type-signature"></span>hasOwnedLabel<span class="signature">(name)</span><span class="type-signature"> → {boolean}</span></h4>+ <h4 class="name" id="hasOwnedLabel"><span class="type-signature"></span>hasOwnedLabel<span class="signature">(name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {boolean}</span></h4>@@ -7405,6 +7462,8 @@ This method can be significantly faster than the getAttribute()<th>Type</th>+ <th>Attributes</th>+@@ -7430,6 +7489,14 @@ This method can be significantly faster than the getAttribute()</td>+ <td class="attributes">++++++ </td>+@@ -7437,6 +7504,39 @@ This method can be significantly faster than the getAttribute()</tr>++ <tr>++ <td class="name"><code>value</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++++ </td>+++++ <td class="description last">label value</td>+ </tr>++</tbody></table>@@ -7474,7 +7574,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line449">line 449</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line488">line 488</a></li></ul></dd>@@ -7532,7 +7632,7 @@ This method can be significantly faster than the getAttribute()- <h4 class="name" id="hasOwnedRelation"><span class="type-signature"></span>hasOwnedRelation<span class="signature">(name)</span><span class="type-signature"> → {boolean}</span></h4>+ <h4 class="name" id="hasOwnedRelation"><span class="type-signature"></span>hasOwnedRelation<span class="signature">(name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {boolean}</span></h4>@@ -7560,6 +7660,8 @@ This method can be significantly faster than the getAttribute()<th>Type</th>+ <th>Attributes</th>+@@ -7585,6 +7687,14 @@ This method can be significantly faster than the getAttribute()</td>+ <td class="attributes">++++++ </td>+@@ -7592,6 +7702,39 @@ This method can be significantly faster than the getAttribute()</tr>++ <tr>++ <td class="name"><code>value</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++++ </td>+++++ <td class="description last">relation value</td>+ </tr>++</tbody></table>@@ -7629,7 +7772,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line461">line 461</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line502">line 502</a></li></ul></dd>@@ -7687,7 +7830,7 @@ This method can be significantly faster than the getAttribute()- <h4 class="name" id="hasRelation"><span class="type-signature"></span>hasRelation<span class="signature">(name)</span><span class="type-signature"> → {boolean}</span></h4>+ <h4 class="name" id="hasRelation"><span class="type-signature"></span>hasRelation<span class="signature">(name, value<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {boolean}</span></h4>@@ -7715,6 +7858,8 @@ This method can be significantly faster than the getAttribute()<th>Type</th>+ <th>Attributes</th>+@@ -7740,6 +7885,14 @@ This method can be significantly faster than the getAttribute()</td>+ <td class="attributes">++++++ </td>+@@ -7747,6 +7900,39 @@ This method can be significantly faster than the getAttribute()</tr>++ <tr>++ <td class="name"><code>value</code></td>+++ <td class="type">+++<span class="param-type">string</span>++++ </td>+++ <td class="attributes">++ <optional><br>++++++ </td>+++++ <td class="description last">relation value</td>+ </tr>++</tbody></table>@@ -7784,7 +7970,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line455">line 455</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line495">line 495</a></li></ul></dd>@@ -7934,7 +8120,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line968">line 968</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1014">line 1014</a></li></ul></dd>@@ -8040,7 +8226,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line306">line 306</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line331">line 331</a></li></ul></dd>@@ -8146,7 +8332,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line298">line 298</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line323">line 323</a></li></ul></dd>@@ -8252,7 +8438,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line293">line 293</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line318">line 318</a></li></ul></dd>@@ -8358,7 +8544,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line288">line 288</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line313">line 313</a></li></ul></dd>@@ -8464,7 +8650,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line312">line 312</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line337">line 337</a></li></ul></dd>@@ -8645,7 +8831,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line118">line 118</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a></li></ul></dd>@@ -8856,7 +9042,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1012">line 1012</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1058">line 1058</a></li></ul></dd>@@ -9036,7 +9222,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1103">line 1103</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1149">line 1149</a></li></ul></dd>@@ -9216,7 +9402,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1111">line 1111</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1157">line 1157</a></li></ul></dd>@@ -9309,7 +9495,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line73">line 73</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a></li></ul></dd>@@ -9411,7 +9597,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1172">line 1172</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1227">line 1227</a></li></ul></dd>@@ -9643,7 +9829,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line981">line 981</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1027">line 1027</a></li></ul></dd>@@ -9823,7 +10009,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1087">line 1087</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1133">line 1133</a></li></ul></dd>@@ -9983,7 +10169,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1095">line 1095</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1141">line 1141</a></li></ul></dd>@@ -10225,7 +10411,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1054">line 1054</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1100">line 1100</a></li></ul></dd>@@ -10436,7 +10622,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1070">line 1070</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1116">line 1116</a></li></ul></dd>@@ -10647,7 +10833,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_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1079">line 1079</a>+ <a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1125">line 1125</a></li></ul></dd>diff --git a/docs/backend_api/NoteRevision.html b/docs/backend_api/NoteRevision.htmlindex ad8b80285e..ca0fb5b83d 100644--- a/docs/backend_api/NoteRevision.html+++ b/docs/backend_api/NoteRevision.html@@ -155,6 +155,69 @@ It's used for seamless note versioning.</div>+<h4 class="name" id="becca"><span class="type-signature">(protected) </span>becca<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#becca">AbstractEntity#becca</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>+ </li></ul></dd>++++++++</dl>++++++++<h4 class="name" id="contentLength"><span class="type-signature"></span>contentLength<span class="type-signature"> :number</span></h4>@@ -981,7 +1044,7 @@ It's used for seamless note versioning.</div>- <h4 class="name" id="getContent"><span class="type-signature"></span>getContent<span class="signature">()</span><span class="type-signature"> → {*}</span></h4>+ <h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>@@ -1009,6 +1072,11 @@ It's used for seamless note versioning.</div>+ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#addEntityChange">AbstractEntity#addEntityChange</a>+ </li></ul></dd>+@@ -1029,7 +1097,7 @@ It's used for seamless note versioning.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line79">line 79</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a></li></ul></dd>@@ -1054,24 +1122,95 @@ It's used for seamless note versioning.</div>-<h5>Returns:</h5>--<dl>- <dt>- Type- </dt>- <dd>++-<span class="param-type">*</span>++- </dd>-</dl>++ <h4 class="name" id="beforeSaving"><span class="type-signature">(protected) </span>beforeSaving<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#beforeSaving">AbstractEntity#beforeSaving</a>+ </li></ul></dd>++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++@@ -1083,7 +1222,7 @@ It's used for seamless note versioning.</div>- <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="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>@@ -1111,6 +1250,11 @@ It's used for seamless note versioning.</div>+ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateHash">AbstractEntity#generateHash</a>+ </li></ul></dd>+@@ -1131,7 +1275,7 @@ It's used for seamless note versioning.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line143">line 143</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a></li></ul></dd>@@ -1156,24 +1300,477 @@ It's used for seamless note versioning.</div>-<h5>Returns:</h5>--<dl>- <dt>- Type- </dt>- <dd>++-<span class="param-type">Object</span>+++++ <h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>+- </dd>+++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateIdIfNecessary">AbstractEntity#generateIdIfNecessary</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>+ </li></ul></dd>+++++++</dl>+++++++++++++++++++++++++ <h4 class="name" id="getContent"><span class="type-signature"></span>getContent<span class="signature">()</span><span class="type-signature"> → {*}</span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line79">line 79</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++<h5>Returns:</h5>+++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">*</span>+++ </dd>+</dl>++++++++++++++ <h4 class="name" id="getContentMetadata"><span class="type-signature"></span>getContentMetadata<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>+++++++++++++++++++<dl class="details">+++++++++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_note_revision.js.html">becca/entities/note_revision.js</a>, <a href="becca_entities_note_revision.js.html#line143">line 143</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++<h5>Returns:</h5>+++++<dl>+ <dt>+ Type+ </dt>+ <dd>++<span class="param-type">Object</span>+++ </dd>+</dl>++++++++++++++ <h4 class="name" id="getPojoToSave"><span class="type-signature">(protected) </span>getPojoToSave<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getPojoToSave">AbstractEntity#getPojoToSave</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="getUtcDateChanged"><span class="type-signature">(protected) </span>getUtcDateChanged<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getUtcDateChanged">AbstractEntity#getUtcDateChanged</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++@@ -1414,7 +2011,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line118">line 118</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a></li></ul></dd>@@ -1507,7 +2104,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line73">line 73</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a></li></ul></dd>diff --git a/docs/backend_api/Option.html b/docs/backend_api/Option.htmlindex c812d8ea6d..bd356c3597 100644--- a/docs/backend_api/Option.html+++ b/docs/backend_api/Option.html@@ -154,6 +154,69 @@+<h4 class="name" id="becca"><span class="type-signature">(protected) </span>becca<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#becca">AbstractEntity#becca</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>+ </li></ul></dd>++++++++</dl>++++++++<h4 class="name" id="isSynced"><span class="type-signature"></span>isSynced<span class="type-signature"> :boolean</span></h4>@@ -430,6 +493,540 @@<h3 class="subsection-title">Methods</h3>+++++++ <h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#addEntityChange">AbstractEntity#addEntityChange</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="beforeSaving"><span class="type-signature">(protected) </span>beforeSaving<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#beforeSaving">AbstractEntity#beforeSaving</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateHash">AbstractEntity#generateHash</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateIdIfNecessary">AbstractEntity#generateIdIfNecessary</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="getPojoToSave"><span class="type-signature">(protected) </span>getPojoToSave<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getPojoToSave">AbstractEntity#getPojoToSave</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="getUtcDateChanged"><span class="type-signature">(protected) </span>getUtcDateChanged<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getUtcDateChanged">AbstractEntity#getUtcDateChanged</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++@@ -559,7 +1156,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line118">line 118</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a></li></ul></dd>@@ -652,7 +1249,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line73">line 73</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a></li></ul></dd>diff --git a/docs/backend_api/RecentNote.html b/docs/backend_api/RecentNote.htmlindex 621598ed23..39babc507b 100644--- a/docs/backend_api/RecentNote.html+++ b/docs/backend_api/RecentNote.html@@ -154,6 +154,69 @@+<h4 class="name" id="becca"><span class="type-signature">(protected) </span>becca<span class="type-signature"></span></h4>+++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#becca">AbstractEntity#becca</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line50">line 50</a>+ </li></ul></dd>++++++++</dl>++++++++<h4 class="name" id="noteId"><span class="type-signature"></span>noteId<span class="type-signature"> :string</span></h4>@@ -362,6 +425,540 @@<h3 class="subsection-title">Methods</h3>+++++++ <h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#addEntityChange">AbstractEntity#addEntityChange</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line59">line 59</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="beforeSaving"><span class="type-signature">(protected) </span>beforeSaving<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#beforeSaving">AbstractEntity#beforeSaving</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line18">line 18</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateHash">AbstractEntity#generateHash</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line30">line 30</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#generateIdIfNecessary">AbstractEntity#generateIdIfNecessary</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line23">line 23</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="getPojoToSave"><span class="type-signature">(protected) </span>getPojoToSave<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getPojoToSave">AbstractEntity#getPojoToSave</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line71">line 71</a>+ </li></ul></dd>++++++++</dl>+++++++++++++++++++++++++++ <h4 class="name" id="getUtcDateChanged"><span class="type-signature">(protected) </span>getUtcDateChanged<span class="signature">()</span><span class="type-signature"></span></h4>+++++++++++++++++++<dl class="details">+++++++++ <dt class="tag-overrides">Overrides:</dt>+ <dd class="tag-overrides"><ul class="dummy"><li>+ <a href="AbstractEntity.html#getUtcDateChanged">AbstractEntity#getUtcDateChanged</a>+ </li></ul></dd>++++++++++++++++++++ <dt class="tag-source">Source:</dt>+ <dd class="tag-source"><ul class="dummy"><li>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line45">line 45</a>+ </li></ul></dd>++++++++</dl>++++++++++++++++++++@@ -491,7 +1088,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line118">line 118</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line125">line 125</a></li></ul></dd>@@ -584,7 +1181,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_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line73">line 73</a>+ <a href="becca_entities_abstract_entity.js.html">becca/entities/abstract_entity.js</a>, <a href="becca_entities_abstract_entity.js.html#line80">line 80</a></li></ul></dd>diff --git a/docs/backend_api/becca_entities_abstract_entity.js.html b/docs/backend_api/becca_entities_abstract_entity.js.htmlindex a66b5654a2..5b8a48e51e 100644--- a/docs/backend_api/becca_entities_abstract_entity.js.html+++ b/docs/backend_api/becca_entities_abstract_entity.js.html@@ -42,16 +42,19 @@ let becca = null;* Base class for all backend entities.*/class AbstractEntity {+ /** @protected */beforeSaving() {this.generateIdIfNecessary();}+ /** @protected */generateIdIfNecessary() {if (!this[this.constructor.primaryKeyName]) {this[this.constructor.primaryKeyName] = utils.newEntityId();}}+ /** @protected */generateHash(isDeleted = false) {let contentToHash = "";@@ -66,10 +69,12 @@ class AbstractEntity {return utils.hash(contentToHash).substr(0, 10);}+ /** @protected */getUtcDateChanged() {return this.utcDateModified || this.utcDateCreated;}+ /** @protected */get becca() {if (!becca) {becca = require('../becca');@@ -78,6 +83,7 @@ class AbstractEntity {return becca;}+ /** @protected */addEntityChange(isDeleted = false) {entityChangesService.addEntityChange({entityName: this.constructor.entityName,@@ -89,6 +95,7 @@ class AbstractEntity {});}+ /** @protected */getPojoToSave() {return this.getPojo();}diff --git a/docs/backend_api/becca_entities_attribute.js.html b/docs/backend_api/becca_entities_attribute.js.htmlindex 10515c0652..ac020be8e4 100644--- a/docs/backend_api/becca_entities_attribute.js.html+++ b/docs/backend_api/becca_entities_attribute.js.html@@ -90,6 +90,7 @@ class Attribute extends AbstractEntity {return this;}+init() {if (this.attributeId) {this.becca.attributes[this.attributeId] = this;diff --git a/docs/backend_api/becca_entities_branch.js.html b/docs/backend_api/becca_entities_branch.js.htmlindex 73fd62a3be..d02cd4fb70 100644--- a/docs/backend_api/becca_entities_branch.js.html+++ b/docs/backend_api/becca_entities_branch.js.html@@ -33,9 +33,9 @@ const AbstractEntity = require("./abstract_entity");const sql = require("../../services/sql");const dateUtils = require("../../services/date_utils");const utils = require("../../services/utils.js");-const TaskContext = require("../../services/task_context.js");-const cls = require("../../services/cls.js");-const log = require("../../services/log.js");+const TaskContext = require("../../services/task_context");+const cls = require("../../services/cls");+const log = require("../../services/log");/*** Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple@@ -165,6 +165,18 @@ class Branch extends AbstractEntity {taskContext.increaseProgressCount();+ const note = this.getNote();++ if (!taskContext.noteDeletionHandlerTriggered) {+ const parentBranches = note.getParentBranches();++ if (parentBranches.length === 1 && parentBranches[0] === this) {+ // needs to be run before branches and attributes are deleted and thus attached relations disappear+ const handlers = require("../../services/handlers");+ handlers.runAttachedRelations(note, 'runOnNoteDeletion', note);+ }+ }+if (this.branchId === 'root'|| this.noteId === 'root'|| this.noteId === cls.getHoistedNoteId()) {@@ -174,7 +186,6 @@ class Branch extends AbstractEntity {this.markAsDeleted(deleteId);- const note = this.getNote();const notDeletedBranches = note.getParentBranches();if (notDeletedBranches.length === 0) {diff --git a/docs/backend_api/becca_entities_note.js.html b/docs/backend_api/becca_entities_note.js.htmlindex 57d0527e72..c73b7e3040 100644--- a/docs/backend_api/becca_entities_note.js.html+++ b/docs/backend_api/becca_entities_note.js.html@@ -36,9 +36,10 @@ const dateUtils = require('../../services/date_utils');const entityChangesService = require('../../services/entity_changes');const AbstractEntity = require("./abstract_entity");const NoteRevision = require("./note_revision");-const TaskContext = require("../../services/task_context.js");-const optionService = require("../../services/options.js");-const noteRevisionService = require("../../services/note_revisions.js");+const TaskContext = require("../../services/task_context");+const dayjs = require("dayjs");+const utc = require('dayjs/plugin/utc')+dayjs.extend(utc)const LABEL = 'label';const RELATION = 'relation';@@ -114,13 +115,17 @@ class Note extends AbstractEntity {}init() {- /** @type {Branch[]} */+ /** @type {Branch[]}+ * @private */this.parentBranches = [];- /** @type {Note[]} */+ /** @type {Note[]}+ * @private */this.parents = [];- /** @type {Note[]} */+ /** @type {Note[]}+ * @private*/this.children = [];- /** @type {Attribute[]} */+ /** @type {Attribute[]}+ * @private */this.ownedAttributes = [];/** @type {Attribute[]|null}@@ -130,7 +135,8 @@ class Note extends AbstractEntity {* @private*/this.inheritableAttributeCache = null;- /** @type {Attribute[]} */+ /** @type {Attribute[]}+ * @private*/this.targetRelations = [];this.becca.addNote(this.noteId, this);@@ -144,16 +150,19 @@ class Note extends AbstractEntity {/*** size of the content in bytes* @type {int|null}+ * @private*/this.contentSize = null;/*** size of the content and note revision contents in bytes* @type {int|null}+ * @private*/this.noteSize = null;/*** number of note revisions for this note* @type {int|null}+ * @private*/this.revisionCount = null;}@@ -255,6 +264,22 @@ class Note extends AbstractEntity {WHERE noteId = ?`, [this.noteId]);}+ get dateCreatedObj() {+ return this.dateCreated === null ? null : dayjs(this.dateCreated);+ }++ get utcDateCreatedObj() {+ return this.utcDateCreated === null ? null : dayjs.utc(this.utcDateCreated);+ }++ get dateModifiedObj() {+ return this.dateModified === null ? null : dayjs(this.dateModified);+ }++ get utcDateModifiedObj() {+ return this.utcDateModified === null ? null : dayjs.utc(this.utcDateModified);+ }+/** @returns {*} */getJsonContent() {const content = this.getContent();@@ -380,6 +405,7 @@ class Note extends AbstractEntity {}}+ /** @private */__getAttributes(path) {if (path.includes(this.noteId)) {return [];@@ -402,7 +428,11 @@ class Note extends AbstractEntity {const templateNote = this.becca.notes[ownedAttr.value];if (templateNote) {- templateAttributes.push(...templateNote.__getAttributes(newPath));+ templateAttributes.push(+ ...templateNote.__getAttributes(newPath)+ // template attr is used as a marker for templates, but it's not meant to be inherited+ .filter(attr => !(attr.type === 'label' && attr.name === 'template'))+ );}}}@@ -431,7 +461,10 @@ class Note extends AbstractEntity {return this.__attributeCache;}- /** @returns {Attribute[]} */+ /**+ * @private+ * @returns {Attribute[]}+ */__getInheritableAttributes(path) {if (path.includes(this.noteId)) {return [];@@ -444,8 +477,12 @@ class Note extends AbstractEntity {return this.inheritableAttributeCache;}- hasAttribute(type, name) {- return !!this.getAttributes().find(attr => attr.type === type && attr.name === name);+ hasAttribute(type, name, value) {+ return !!this.getAttributes().find(attr =>+ attr.type === type+ && attr.name === name+ && (value === undefined || value === null || attr.value === value)+ );}getAttributeCaseInsensitive(type, name, value) {@@ -466,27 +503,31 @@ class Note extends AbstractEntity {/*** @param {string} name - label name+ * @param {string} [value] - label value* @returns {boolean} true if label exists (including inherited)*/- hasLabel(name) { return this.hasAttribute(LABEL, name); }+ hasLabel(name, value) { return this.hasAttribute(LABEL, name, value); }/*** @param {string} name - label name+ * @param {string} [value] - label value* @returns {boolean} true if label exists (excluding inherited)*/- hasOwnedLabel(name) { return this.hasOwnedAttribute(LABEL, name); }+ hasOwnedLabel(name, value) { return this.hasOwnedAttribute(LABEL, name, value); }/*** @param {string} name - relation name+ * @param {string} [value] - relation value* @returns {boolean} true if relation exists (including inherited)*/- hasRelation(name) { return this.hasAttribute(RELATION, name); }+ hasRelation(name, value) { return this.hasAttribute(RELATION, name, value); }/*** @param {string} name - relation name+ * @param {string} [value] - relation value* @returns {boolean} true if relation exists (excluding inherited)*/- hasOwnedRelation(name) { return this.hasOwnedAttribute(RELATION, name); }+ hasOwnedRelation(name, value) { return this.hasOwnedAttribute(RELATION, name, value); }/*** @param {string} name - label name@@ -539,10 +580,11 @@ class Note extends AbstractEntity {/*** @param {string} type - attribute type (label, relation, etc.)* @param {string} name - attribute name+ * @param {string} [value] - attribute value* @returns {boolean} true if note has an attribute with given type and name (excluding inherited)*/- hasOwnedAttribute(type, name) {- return !!this.getOwnedAttribute(type, name);+ hasOwnedAttribute(type, name, value) {+ return !!this.getOwnedAttribute(type, name, value);}/**@@ -629,15 +671,19 @@ class Note extends AbstractEntity {/*** @param {string} [type] - (optional) attribute type to filter* @param {string} [name] - (optional) attribute name to filter+ * @param {string} [value] - (optional) attribute value to filter* @returns {Attribute[]} note's "owned" attributes - excluding inherited ones*/- getOwnedAttributes(type, name) {+ getOwnedAttributes(type, name, value) {// it's a common mistake to include # or ~ into attribute nameif (name && ["#", "~"].includes(name[0])) {name = name.substr(1);}- if (type && name) {+ if (type && name && value !== undefined && value !== null) {+ return this.ownedAttributes.filter(attr => attr.type === type && attr.name === name && attr.value === value);+ }+ else if (type && name) {return this.ownedAttributes.filter(attr => attr.type === type && attr.name === name);}else if (type) {@@ -656,8 +702,8 @@ class Note extends AbstractEntity {** This method can be significantly faster than the getAttribute()*/- getOwnedAttribute(type, name) {- const attrs = this.getOwnedAttributes(type, name);+ getOwnedAttribute(type, name, value) {+ const attrs = this.getOwnedAttributes(type, name, value);return attrs.length > 0 ? attrs[0] : null;}@@ -1163,6 +1209,10 @@ class Note extends AbstractEntity {* @param {TaskContext} [taskContext]*/deleteNote(deleteId, taskContext) {+ if (this.isDeleted) {+ return;+ }+if (!deleteId) {deleteId = utils.randomString(10);}@@ -1171,6 +1221,11 @@ class Note extends AbstractEntity {taskContext = new TaskContext('no-progress-reporting');}+ // needs to be run before branches and attributes are deleted and thus attached relations disappear+ const handlers = require("../../services/handlers");+ handlers.runAttachedRelations(this, 'runOnNoteDeletion', this);+ taskContext.noteDeletionHandlerTriggered = true;+for (const branch of this.getParentBranches()) {branch.deleteBranch(deleteId, taskContext);}@@ -1212,7 +1267,7 @@ class Note extends AbstractEntity {title: this.title,type: this.type,mime: this.mime,- isProtected: false, // will be fixed in the protectNoteRevisions() call+ isProtected: this.isProtected,utcDateLastEdited: this.utcDateModified > contentMetadata.utcDateModified? this.utcDateModified: contentMetadata.utcDateModified,diff --git a/docs/backend_api/services_sql.js.html b/docs/backend_api/services_sql.js.htmlindex ccfeaa9845..7af2575ee9 100644--- a/docs/backend_api/services_sql.js.html+++ b/docs/backend_api/services_sql.js.html@@ -270,9 +270,9 @@ function transactional(func) {return ret;}catch (e) {- const entityChanges = cls.getAndClearEntityChangeIds();+ const entityChangeIds = cls.getAndClearEntityChangeIds();- if (entityChanges.length > 0) {+ if (entityChangeIds.length > 0) {log.info("Transaction rollback dirtied the becca, forcing reload.");require('../becca/becca_loader').load();diff --git a/docs/frontend_api/Attribute.html b/docs/frontend_api/Attribute.htmlindex 2dd81757d5..27344c376f 100644--- a/docs/frontend_api/Attribute.html+++ b/docs/frontend_api/Attribute.html@@ -742,7 +742,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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/Branch.html b/docs/frontend_api/Branch.htmlindex 62f0c77229..00f7dbb786 100644--- a/docs/frontend_api/Branch.html+++ b/docs/frontend_api/Branch.html@@ -1056,7 +1056,7 @@ parents.</div></div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/FrontendScriptApi.html b/docs/frontend_api/FrontendScriptApi.htmlindex a6b3044b7b..becbb6eae9 100644--- a/docs/frontend_api/FrontendScriptApi.html+++ b/docs/frontend_api/FrontendScriptApi.html@@ -8009,7 +8009,7 @@ Typical use case is when new note has been created, we should wait until it is s</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/NoteComplement.html b/docs/frontend_api/NoteComplement.htmlindex 53a162fefd..d922a07aee 100644--- a/docs/frontend_api/NoteComplement.html+++ b/docs/frontend_api/NoteComplement.html@@ -775,7 +775,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/NoteShort.html b/docs/frontend_api/NoteShort.htmlindex 9796f8771a..1e7dd6ff47 100644--- a/docs/frontend_api/NoteShort.html+++ b/docs/frontend_api/NoteShort.html@@ -167,7 +167,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line28">line 28</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line29">line 29</a></li></ul></dd>@@ -267,7 +267,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line37">line 37</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line38">line 38</a></li></ul></dd>@@ -335,7 +335,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line45">line 45</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line46">line 46</a></li></ul></dd>@@ -403,7 +403,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line51">line 51</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line52">line 52</a></li></ul></dd>@@ -471,7 +471,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line62">line 62</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line63">line 63</a></li></ul></dd>@@ -543,7 +543,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line72">line 72</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line73">line 73</a></li></ul></dd>@@ -611,7 +611,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line58">line 58</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line59">line 59</a></li></ul></dd>@@ -679,7 +679,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line43">line 43</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line44">line 44</a></li></ul></dd>@@ -747,7 +747,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line48">line 48</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line49">line 49</a></li></ul></dd>@@ -815,7 +815,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line40">line 40</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line41">line 41</a></li></ul></dd>@@ -883,7 +883,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line60">line 60</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line61">line 61</a></li></ul></dd>@@ -955,7 +955,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line67">line 67</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line68">line 68</a></li></ul></dd>@@ -1103,7 +1103,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line499">line 499</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line504">line 504</a></li></ul></dd>@@ -1303,7 +1303,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line237">line 237</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line238">line 238</a></li></ul></dd>@@ -1481,7 +1481,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line521">line 521</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line526">line 526</a></li></ul></dd>@@ -1589,7 +1589,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line162">line 162</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line163">line 163</a></li></ul></dd>@@ -1693,7 +1693,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line145">line 145</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line146">line 146</a></li></ul></dd>@@ -1795,7 +1795,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line172">line 172</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line173">line 173</a></li></ul></dd>@@ -1897,7 +1897,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line210">line 210</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line211">line 211</a></li></ul></dd>@@ -1999,7 +1999,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line215">line 215</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line216">line 216</a></li></ul></dd>@@ -2150,7 +2150,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line561">line 561</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line566">line 566</a></li></ul></dd>@@ -2317,7 +2317,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line385">line 385</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line390">line 390</a></li></ul></dd>@@ -2472,7 +2472,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line585">line 585</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line590">line 590</a></li></ul></dd>@@ -2582,7 +2582,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line707">line 707</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line717">line 717</a></li></ul></dd>@@ -2756,7 +2756,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line488">line 488</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line493">line 493</a></li></ul></dd>@@ -2956,7 +2956,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line224">line 224</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line225">line 225</a></li></ul></dd>@@ -3134,7 +3134,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line510">line 510</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line515">line 515</a></li></ul></dd>@@ -3289,7 +3289,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line555">line 555</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line560">line 560</a></li></ul></dd>@@ -3456,7 +3456,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line377">line 377</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line382">line 382</a></li></ul></dd>@@ -3611,7 +3611,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line579">line 579</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line584">line 584</a></li></ul></dd>@@ -3766,7 +3766,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line567">line 567</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line572">line 572</a></li></ul></dd>@@ -3933,7 +3933,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line453">line 453</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line458">line 458</a></li></ul></dd>@@ -4088,7 +4088,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line591">line 591</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line596">line 596</a></li></ul></dd>@@ -4194,7 +4194,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line152">line 152</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line153">line 153</a></li></ul></dd>@@ -4296,7 +4296,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line137">line 137</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line138">line 138</a></li></ul></dd>@@ -4398,7 +4398,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line180">line 180</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line181">line 181</a></li></ul></dd>@@ -4500,7 +4500,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line185">line 185</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line186">line 186</a></li></ul></dd>@@ -4651,7 +4651,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line573">line 573</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line578">line 578</a></li></ul></dd>@@ -4818,7 +4818,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line461">line 461</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line466">line 466</a></li></ul></dd>@@ -4973,7 +4973,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line603">line 603</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line608">line 608</a></li></ul></dd>@@ -5143,7 +5143,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line613">line 613</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line618">line 618</a></li></ul></dd>@@ -5294,7 +5294,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line597">line 597</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line602">line 602</a></li></ul></dd>@@ -5400,7 +5400,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line751">line 751</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line761">line 761</a></li></ul></dd>@@ -5513,7 +5513,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line686">line 686</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line696">line 696</a></li></ul></dd>@@ -5619,7 +5619,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line696">line 696</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line706">line 706</a></li></ul></dd>@@ -5721,7 +5721,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line627">line 627</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line632">line 632</a></li></ul></dd>@@ -5895,7 +5895,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line470">line 470</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line475">line 475</a></li></ul></dd>@@ -6001,7 +6001,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line167">line 167</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line168">line 168</a></li></ul></dd>@@ -6152,7 +6152,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line537">line 537</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line542">line 542</a></li></ul></dd>@@ -6330,7 +6330,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line479">line 479</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line484">line 484</a></li></ul></dd>@@ -6485,7 +6485,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line531">line 531</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line536">line 536</a></li></ul></dd>@@ -6640,7 +6640,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line543">line 543</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line548">line 548</a></li></ul></dd>@@ -6795,7 +6795,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line549">line 549</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line554">line 554</a></li></ul></dd>@@ -6903,7 +6903,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line679">line 679</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line689">line 689</a></li></ul></dd>@@ -6987,7 +6987,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line746">line 746</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line756">line 756</a></li></ul></dd>@@ -7093,7 +7093,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line738">line 738</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line748">line 748</a></li></ul></dd>@@ -7199,7 +7199,7 @@ This note's representation is used in note tree and is kept in Froca.</div><dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line110">line 110</a>+ <a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line111">line 111</a></li></ul></dd>@@ -7263,7 +7263,7 @@ This note's representation is used in note tree and is kept in Froca.</div></div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/entities_attribute.js.html b/docs/frontend_api/entities_attribute.js.htmlindex 387d4eb2ef..e435854954 100644--- a/docs/frontend_api/entities_attribute.js.html+++ b/docs/frontend_api/entities_attribute.js.html@@ -104,7 +104,7 @@ export default Attribute;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/entities_branch.js.html b/docs/frontend_api/entities_branch.js.htmlindex 0ef296b324..abf328ead1 100644--- a/docs/frontend_api/entities_branch.js.html+++ b/docs/frontend_api/entities_branch.js.html@@ -93,7 +93,7 @@ export default Branch;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/entities_note_complement.js.html b/docs/frontend_api/entities_note_complement.js.htmlindex eb5f6203ac..93cd2ef270 100644--- a/docs/frontend_api/entities_note_complement.js.html+++ b/docs/frontend_api/entities_note_complement.js.html@@ -76,7 +76,7 @@ export default NoteComplement;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/entities_note_short.js.html b/docs/frontend_api/entities_note_short.js.htmlindex 8e27a11a85..323a0ef60d 100644--- a/docs/frontend_api/entities_note_short.js.html+++ b/docs/frontend_api/entities_note_short.js.html@@ -45,7 +45,8 @@ const NOTE_TYPE_ICONS = {"book": "bx bx-book","note-map": "bx bx-map-alt","mermaid": "bx bx-selection",- "canvas": "bx bx-pen"+ "canvas": "bx bx-pen",+ "web-view": "bx bx-globe-alt"};/**@@ -290,7 +291,11 @@ class NoteShort {const templateNote = this.froca.notes[templateAttr.value];if (templateNote && templateNote.noteId !== this.noteId) {- attrArrs.push(templateNote.__getCachedAttributes(newPath));+ attrArrs.push(+ templateNote.__getCachedAttributes(newPath)+ // template attr is used as a marker for templates, but it's not meant to be inherited+ .filter(attr => !(attr.type === 'label' && attr.name === 'template'))+ );}}@@ -663,13 +668,18 @@ class NoteShort {return [];}- return this.getAttributes()+ const promotedAttrs = this.getAttributes().filter(attr => attr.isDefinition()).filter(attr => {const def = attr.getDefinition();return def && def.isPromoted;});++ // attrs are not resorted if position changes after initial load+ promotedAttrs.sort((a, b) => a.position < b.position ? -1 : 1);++ return promotedAttrs;}hasAncestor(ancestorNoteId, visitedNoteIds = null) {@@ -843,7 +853,7 @@ export default NoteShort;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/global.html b/docs/frontend_api/global.htmlindex 8879721e84..30e91a6562 100644--- a/docs/frontend_api/global.html+++ b/docs/frontend_api/global.html@@ -156,7 +156,7 @@<dt class="tag-source">Source:</dt><dd class="tag-source"><ul class="dummy"><li>- <a href="widgets_collapsible_widget.js.html">widgets/collapsible_widget.js</a>, <a href="widgets_collapsible_widget.js.html#line34">line 34</a>+ <a href="widgets_collapsible_widget.js.html">widgets/collapsible_widget.js</a>, <a href="widgets_collapsible_widget.js.html#line37">line 37</a></li></ul></dd>@@ -425,7 +425,7 @@</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/index.html b/docs/frontend_api/index.htmlindex 590530faad..0eb4b2332a 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="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/services_frontend_script_api.js.html b/docs/frontend_api/services_frontend_script_api.js.htmlindex da00296e1f..e27c5db165 100644--- a/docs/frontend_api/services_frontend_script_api.js.html+++ b/docs/frontend_api/services_frontend_script_api.js.html@@ -635,7 +635,7 @@ export default FrontendScriptApi;</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/docs/frontend_api/widgets_collapsible_widget.js.html b/docs/frontend_api/widgets_collapsible_widget.js.htmlindex ed31ad9b3c..0411406f71 100644--- a/docs/frontend_api/widgets_collapsible_widget.js.html+++ b/docs/frontend_api/widgets_collapsible_widget.js.html@@ -37,6 +37,9 @@ const WIDGET_TPL = `</div></div>`;+/**+ * TODO: rename, it's not collapsible anymore+ */export default class CollapsibleWidget extends NoteContextAwareWidget {get widgetTitle() { return "Untitled widget"; }@@ -60,10 +63,6 @@ export default class CollapsibleWidget extends NoteContextAwareWidget {/** for overriding */async doRenderBody() {}-- isExpanded() {- return this.$bodyWrapper.hasClass("show");- }}</code></pre></article>@@ -75,7 +74,7 @@ export default class CollapsibleWidget extends NoteContextAwareWidget {</div><nav>- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul>+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="Branch.html">Branch</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="module.exports.html">exports</a></li><li><a href="NoteComplement.html">NoteComplement</a></li><li><a href="NoteShort.html">NoteShort</a></li></ul><h3>Global</h3><ul><li><a href="global.html#doRenderBody">doRenderBody</a></li></ul></nav><br class="clear">diff --git a/src/becca/entities/note.js b/src/becca/entities/note.jsindex d562b5e5d3..2c6e49df5e 100644--- a/src/becca/entities/note.js+++ b/src/becca/entities/note.js@@ -449,8 +449,18 @@ class Note extends AbstractEntity {return this.inheritableAttributeCache;}- hasAttribute(type, name) {- return !!this.getAttributes().find(attr => attr.type === type && attr.name === name);+ /**+ * @param type+ * @param name+ * @param [value]+ * @returns {boolean}+ */+ hasAttribute(type, name, value) {+ return !!this.getAttributes().find(attr =>+ attr.type === type+ && attr.name === name+ && (value === undefined || value === null || attr.value === value)+ );}getAttributeCaseInsensitive(type, name, value) {@@ -471,27 +481,31 @@ class Note extends AbstractEntity {/*** @param {string} name - label name+ * @param {string} [value] - label value* @returns {boolean} true if label exists (including inherited)*/- hasLabel(name) { return this.hasAttribute(LABEL, name); }+ hasLabel(name, value) { return this.hasAttribute(LABEL, name, value); }/*** @param {string} name - label name+ * @param {string} [value] - label value* @returns {boolean} true if label exists (excluding inherited)*/- hasOwnedLabel(name) { return this.hasOwnedAttribute(LABEL, name); }+ hasOwnedLabel(name, value) { return this.hasOwnedAttribute(LABEL, name, value); }/*** @param {string} name - relation name+ * @param {string} [value] - relation value* @returns {boolean} true if relation exists (including inherited)*/- hasRelation(name) { return this.hasAttribute(RELATION, name); }+ hasRelation(name, value) { return this.hasAttribute(RELATION, name, value); }/*** @param {string} name - relation name+ * @param {string} [value] - relation value* @returns {boolean} true if relation exists (excluding inherited)*/- hasOwnedRelation(name) { return this.hasOwnedAttribute(RELATION, name); }+ hasOwnedRelation(name, value) { return this.hasOwnedAttribute(RELATION, name, value); }/*** @param {string} name - label name@@ -544,10 +558,11 @@ class Note extends AbstractEntity {/*** @param {string} type - attribute type (label, relation, etc.)* @param {string} name - attribute name+ * @param {string} [value] - attribute value* @returns {boolean} true if note has an attribute with given type and name (excluding inherited)*/- hasOwnedAttribute(type, name) {- return !!this.getOwnedAttribute(type, name);+ hasOwnedAttribute(type, name, value) {+ return !!this.getOwnedAttribute(type, name, value);}/**@@ -634,15 +649,19 @@ class Note extends AbstractEntity {/*** @param {string} [type] - (optional) attribute type to filter* @param {string} [name] - (optional) attribute name to filter+ * @param {string} [value] - (optional) attribute value to filter* @returns {Attribute[]} note's "owned" attributes - excluding inherited ones*/- getOwnedAttributes(type, name) {+ getOwnedAttributes(type, name, value) {// it's a common mistake to include # or ~ into attribute nameif (name && ["#", "~"].includes(name[0])) {name = name.substr(1);}- if (type && name) {+ if (type && name && value !== undefined && value !== null) {+ return this.ownedAttributes.filter(attr => attr.type === type && attr.name === name && attr.value === value);+ }+ else if (type && name) {return this.ownedAttributes.filter(attr => attr.type === type && attr.name === name);}else if (type) {@@ -661,8 +680,8 @@ class Note extends AbstractEntity {** This method can be significantly faster than the getAttribute()*/- getOwnedAttribute(type, name) {- const attrs = this.getOwnedAttributes(type, name);+ getOwnedAttribute(type, name, value) {+ const attrs = this.getOwnedAttributes(type, name, value);return attrs.length > 0 ? attrs[0] : null;}diff --git a/src/services/notes.js b/src/services/notes.jsindex e3b14de221..25239e4a0e 100644--- a/src/services/notes.js+++ b/src/services/notes.js@@ -155,16 +155,19 @@ function createNewNote(params) {scanForLinks(note);+ copyChildAttributes(parentNote, note);+if (params.templateNoteId) {if (!becca.getNote(params.templateNoteId)) {throw new Error(`Template note '${params.templateNoteId}' does not exist.`);}- note.addRelation('template', params.templateNoteId);+ // could be already copied from the parent via `child:`, no need to have 2+ if (!note.hasOwnedRelation('template', params.templateNoteId)) {+ note.addRelation('template', params.templateNoteId);+ }}- copyChildAttributes(parentNote, note);-triggerNoteTitleChanged(note);triggerChildNoteCreated(note, parentNote);