Compare commits

..

38 Commits

Author SHA1 Message Date
zadam f97c9e3619 release 0.41.3-beta 2020-04-14 22:19:56 +02:00
zadam 61167f6646 make sure to close sqlite connection on exit 2020-04-14 22:15:55 +02:00
zadam 29cec8112e fix setup of new document, closes #966 2020-04-14 21:57:42 +02:00
zadam 48aadc8309 fix parsing of includeNote, closes #963 2020-04-13 18:12:41 +02:00
zadam b2508db9af release 0.41.2-beta 2020-04-13 10:30:11 +02:00
zadam 87510fd72b include note styling changes 2020-04-13 10:13:03 +02:00
zadam 339f212e4c added webpack 2020-04-12 14:22:51 +02:00
zadam 3c311cd2a4 loading indicator and optimisations for mobile 2020-04-11 22:06:04 +02:00
zadam b5bf581bd9 don't select tree node when dragging 2020-04-11 15:09:38 +02:00
zadam 242f139be4 allow specifying include note widget size 2020-04-11 11:49:58 +02:00
zadam 6c76d862d2 fix creating link with selection -> must by hyper link, closes #959 2020-04-11 09:47:19 +02:00
zadam 62bc05134e sqlite upgrade 2020-04-09 21:20:14 +02:00
zadam 50d3928dd5 release 0.41.1-beta 2020-04-08 22:10:55 +02:00
zadam 44d641617e fix relation map in demo document 2020-04-08 22:09:32 +02:00
zadam f3b84e5185 use ckeditor content styles also for read only notes, tooltips and book notes 2020-04-08 21:38:11 +02:00
zadam 34b8979016 make note paths work better with hoisted note 2020-04-08 20:38:50 +02:00
zadam 6c188982b3 added some logging 2020-04-08 11:07:38 +02:00
zadam 1175a8ee49 display last noteId in the note path widget as well 2020-04-08 10:19:15 +02:00
zadam 9c04ef9fb7 note path widget tweaks 2020-04-08 10:13:11 +02:00
zadam 6cc3e3cdf6 note paths is now on the left side and showing current path 2020-04-07 22:53:03 +02:00
zadam f8bd55374f support for included notes and reference links also in read only text views 2020-04-07 21:28:40 +02:00
zadam 3ccb1c6ac1 refactoring to editable_text 2020-04-07 21:04:28 +02:00
zadam d34d265d01 API docs update 2020-04-07 19:19:20 +02:00
zadam c063f75f48 fix ZIP import of notes with included note 2020-04-06 22:46:11 +02:00
zadam 2d1f3b7633 renamed text preview to read only text 2020-04-06 22:21:09 +02:00
zadam 3772d97dfa basic text preview implemented 2020-04-06 22:08:54 +02:00
zadam 5c0355718f repository has now first level cache 2020-04-06 20:59:04 +02:00
zadam 081693f263 not generating externalLink labels anymore since there can be too many and benefit is too small 2020-04-05 16:06:13 +02:00
zadam 8d312515dd small fixes 2020-04-05 15:35:01 +02:00
zadam 7bd05415fa revert fancytree upgrade which caused some issues (tree duplication) 2020-04-05 12:56:25 +02:00
zadam 8d7687f354 fix copying template's content, closes #943 2020-04-05 12:28:16 +02:00
zadam 42128c007f fix "search in subtree", closes #941 2020-04-04 22:49:30 +02:00
zadam dfb97d64f7 fix showing promoted notes, closes #944 2020-04-04 22:40:32 +02:00
zadam b1bed18331 significantly faster sync with transactions 2020-04-04 21:49:57 +02:00
zadam ae50c9847d sync refactorings, added logging for performance tracking 2020-04-04 14:57:19 +02:00
zadam 6201dd70a0 small fixes in consistency_checks 2020-04-04 09:46:49 +02:00
zadam 451c408063 small fixes 2020-04-03 19:34:22 +02:00
zadam 3bbb213f82 fixes for web clipper 2020-04-02 22:55:11 +02:00
222 changed files with 4094 additions and 1608 deletions
+1
View File
@@ -1,6 +1,7 @@
.DS_Store
node_modules/
dist/
src/public/app-dist/
npm-debug.log
yarn-error.log
*.db
+1 -1
View File
@@ -1,4 +1,4 @@
FROM node:12.16.1-alpine
FROM node:12.16.2-alpine
# Create app directory
WORKDIR /usr/src/app
+2
View File
@@ -12,6 +12,8 @@ echo "Copying required linux-x64 binaries"
rm -r $SRC_DIR/node_modules/sqlite3/lib/binding/*
rm -r $SRC_DIR/node_modules/pngquant-bin/vendor/*
rm -r $SRC_DIR/src/public/dist/*.mobile.*
cp -r bin/deps/linux-x64/sqlite/* $SRC_DIR/node_modules/sqlite3/lib/binding/
cp bin/deps/linux-x64/image/pngquant $SRC_DIR/node_modules/pngquant-bin/vendor/
+2
View File
@@ -19,6 +19,8 @@ cp bin/deps/mac-x64/image/cjpeg $SRC_DIR/node_modules/mozjpeg/vendor/
cp bin/deps/mac-x64/image/pngquant $SRC_DIR/node_modules/pngquant-bin/vendor/
cp bin/deps/mac-x64/image/gifsicle $SRC_DIR/node_modules/giflossy/vendor/
rm -r $SRC_DIR/src/public/dist/*.mobile.*
./node_modules/.bin/electron-packager $SRC_DIR --asar --out=dist --executable-name=trilium --platform=darwin --arch=x64 --overwrite --icon=images/app-icons/mac/icon.icns
BUILD_DIR=./dist/trilium-mac-x64
+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
PKG_DIR=dist/trilium-linux-x64-server
NODE_VERSION=12.16.1
NODE_VERSION=12.16.2
if [ "$1" != "DONTCOPY" ]
then
+2
View File
@@ -19,6 +19,8 @@ cp bin/deps/win-x64/image/cjpeg.exe $SRC_DIR/node_modules/mozjpeg/vendor/
cp bin/deps/win-x64/image/pngquant.exe $SRC_DIR/node_modules/pngquant-bin/vendor/
cp bin/deps/win-x64/image/gifsicle.exe $SRC_DIR/node_modules/giflossy/vendor/
rm -r $SRC_DIR/src/public/dist/*.mobile.*
./node_modules/.bin/electron-packager $SRC_DIR --asar --out=dist --executable-name=trilium --platform=win32 --arch=x64 --overwrite --icon=images/app-icons/win/icon.ico
BUILD_DIR=./dist/trilium-windows-x64
+8 -2
View File
@@ -22,8 +22,14 @@ cp -r README.md $DIR/
cp -r LICENSE $DIR/
cp -r config-sample.ini $DIR/
cp -r electron.js $DIR/
cp webpack-* $DIR/
# run in subshell (so we return to original dir)
(cd $DIR && npm install --only=prod)
(cd $DIR && npm install --only=prod && npm run webpack)
find $DIR/libraries -name "*.map" -type f -delete
find $DIR/libraries -name "*.map" -type f -delete
rm -r $DIR/src/public/app
sed -i -e 's/app\/desktop.js/app-dist\/desktop.js/g' $DIR/src/views/desktop.ejs
sed -i -e 's/app\/mobile.js/app-dist\/mobile.js/g' $DIR/src/views/mobile.ejs
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -293,7 +293,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+3 -3
View File
@@ -595,7 +595,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line58">line 58</a>
<a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line54">line 54</a>
</li></ul></dd>
@@ -697,7 +697,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line77">line 77</a>
<a href="entities_attribute.js.html">entities/attribute.js</a>, <a href="entities_attribute.js.html#line69">line 69</a>
</li></ul></dd>
@@ -767,7 +767,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+88 -65
View File
@@ -351,69 +351,6 @@
<h4 class="name" id="refreshTree"><span class="type-signature"></span>refreshTree<span class="type-signature"></span></h4>
<div class="description">
Trigger tree refresh in all connected clients. This is required when some tree change happens in
the backend.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line395">line 395</a>
</li></ul></dd>
</dl>
<h4 class="name" id="startNote"><span class="type-signature"></span>startNote<span class="type-signature"></span></h4>
@@ -1817,7 +1754,7 @@ JSON MIME type. See also createNewNote() for more options.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line400">line 400</a>
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line398">line 398</a>
</li></ul></dd>
@@ -4321,6 +4258,92 @@ if some action needs to happen on only one specific instance.
<h4 class="name" id="refreshTree"><span class="type-signature"></span>refreshTree<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>- this is now no-op since all the changes should be gracefully handled per widget</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line393">line 393</a>
</li></ul></dd>
</dl>
@@ -5376,7 +5399,7 @@ transactional by default.
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+104 -5
View File
@@ -423,7 +423,7 @@ Each note can have multiple (at least one) branches, meaning it can be placed in
<h4 class="name" id="getNote"><span class="type-signature">(async) </span>getNote<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Note.html">Note</a>|null}</span></h4>
<h4 class="name" id="getNote"><span class="type-signature">(async) </span>getNote<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;(<a href="Note.html">Note</a>|null)>}</span></h4>
@@ -507,10 +507,109 @@ Each note can have multiple (at least one) branches, meaning it can be placed in
</dt>
<dd>
<span class="param-type"><a href="Note.html">Note</a></span>
|
<span class="param-type">Promise.&lt;(<a href="Note.html">Note</a>|null)></span>
<span class="param-type">null</span>
</dd>
</dl>
<h4 class="name" id="getParentNote"><span class="type-signature">(async) </span>getParentNote<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;(<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="entities_branch.js.html">entities/branch.js</a>, <a href="entities_branch.js.html#line37">line 37</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.&lt;(<a href="Note.html">Note</a>|null)></span>
</dd>
@@ -544,7 +643,7 @@ Each note can have multiple (at least one) branches, meaning it can be placed in
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -218,7 +218,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+65 -65
View File
@@ -583,7 +583,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line547">line 547</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line548">line 548</a>
</li></ul></dd>
@@ -685,7 +685,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line877">line 877</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line876">line 876</a>
</li></ul></dd>
@@ -863,7 +863,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line443">line 443</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line444">line 444</a>
</li></ul></dd>
@@ -1063,7 +1063,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line261">line 261</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line262">line 262</a>
</li></ul></dd>
@@ -1241,7 +1241,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line454">line 454</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line455">line 455</a>
</li></ul></dd>
@@ -1347,7 +1347,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line823">line 823</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line822">line 822</a>
</li></ul></dd>
@@ -1449,7 +1449,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line851">line 851</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line850">line 850</a>
</li></ul></dd>
@@ -1555,7 +1555,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line837">line 837</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line836">line 836</a>
</li></ul></dd>
@@ -1763,7 +1763,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line721">line 721</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line722">line 722</a>
</li></ul></dd>
@@ -1996,7 +1996,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line744">line 744</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line745">line 745</a>
</li></ul></dd>
@@ -2194,7 +2194,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line782">line 782</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line783">line 783</a>
</li></ul></dd>
@@ -2392,7 +2392,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line791">line 791</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line792">line 792</a>
</li></ul></dd>
@@ -2494,7 +2494,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line110">line 110</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line111">line 111</a>
</li></ul></dd>
@@ -2645,7 +2645,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line598">line 598</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line599">line 599</a>
</li></ul></dd>
@@ -2812,7 +2812,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line300">line 300</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line301">line 301</a>
</li></ul></dd>
@@ -2979,7 +2979,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line284">line 284</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line285">line 285</a>
</li></ul></dd>
@@ -3134,7 +3134,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line622">line 622</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line623">line 623</a>
</li></ul></dd>
@@ -3246,7 +3246,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line808">line 808</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line809">line 809</a>
</li></ul></dd>
@@ -3348,7 +3348,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line243">line 243</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line244">line 244</a>
</li></ul></dd>
@@ -3555,7 +3555,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line219">line 219</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line220">line 220</a>
</li></ul></dd>
@@ -3733,7 +3733,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line465">line 465</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line466">line 466</a>
</li></ul></dd>
@@ -3888,7 +3888,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line604">line 604</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line605">line 605</a>
</li></ul></dd>
@@ -4055,7 +4055,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line292">line 292</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line293">line 293</a>
</li></ul></dd>
@@ -4210,7 +4210,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line628">line 628</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line629">line 629</a>
</li></ul></dd>
@@ -4365,7 +4365,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line616">line 616</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line617">line 617</a>
</li></ul></dd>
@@ -4532,7 +4532,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line316">line 316</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line317">line 317</a>
</li></ul></dd>
@@ -4687,7 +4687,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line656">line 656</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line657">line 657</a>
</li></ul></dd>
@@ -4845,7 +4845,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line640">line 640</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line641">line 641</a>
</li></ul></dd>
@@ -4951,7 +4951,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line863">line 863</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line862">line 862</a>
</li></ul></dd>
@@ -5106,7 +5106,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line610">line 610</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line611">line 611</a>
</li></ul></dd>
@@ -5273,7 +5273,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line339">line 339</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line340">line 340</a>
</li></ul></dd>
@@ -5440,7 +5440,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line308">line 308</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line309">line 309</a>
</li></ul></dd>
@@ -5595,7 +5595,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line646">line 646</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line647">line 647</a>
</li></ul></dd>
@@ -5765,7 +5765,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line324">line 324</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line325">line 325</a>
</li></ul></dd>
@@ -5916,7 +5916,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line634">line 634</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line635">line 635</a>
</li></ul></dd>
@@ -6026,7 +6026,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line798">line 798</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line799">line 799</a>
</li></ul></dd>
@@ -6128,7 +6128,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line190">line 190</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line191">line 191</a>
</li></ul></dd>
@@ -6234,7 +6234,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line252">line 252</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line253">line 253</a>
</li></ul></dd>
@@ -6412,7 +6412,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line425">line 425</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line426">line 426</a>
</li></ul></dd>
@@ -6518,7 +6518,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line830">line 830</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line829">line 829</a>
</li></ul></dd>
@@ -6673,7 +6673,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line574">line 574</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line575">line 575</a>
</li></ul></dd>
@@ -6851,7 +6851,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line434">line 434</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line435">line 435</a>
</li></ul></dd>
@@ -7006,7 +7006,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line580">line 580</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line581">line 581</a>
</li></ul></dd>
@@ -7161,7 +7161,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line592">line 592</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line593">line 593</a>
</li></ul></dd>
@@ -7316,7 +7316,7 @@ Use when inheritance is not needed and/or in batch/performance sensitive operati
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line586">line 586</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line587">line 587</a>
</li></ul></dd>
@@ -7427,7 +7427,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line347">line 347</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line348">line 348</a>
</li></ul></dd>
@@ -7555,7 +7555,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line898">line 898</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line897">line 897</a>
</li></ul></dd>
@@ -7661,7 +7661,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line180">line 180</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line181">line 181</a>
</li></ul></dd>
@@ -7767,7 +7767,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line172">line 172</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line173">line 173</a>
</li></ul></dd>
@@ -7873,7 +7873,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line167">line 167</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line168">line 168</a>
</li></ul></dd>
@@ -7979,7 +7979,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line162">line 162</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line163">line 163</a>
</li></ul></dd>
@@ -8085,7 +8085,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line185">line 185</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line186">line 186</a>
</li></ul></dd>
@@ -8191,7 +8191,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line353">line 353</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line354">line 354</a>
</li></ul></dd>
@@ -8420,7 +8420,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line531">line 531</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line532">line 532</a>
</li></ul></dd>
@@ -8618,7 +8618,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line707">line 707</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line708">line 708</a>
</li></ul></dd>
@@ -8816,7 +8816,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line716">line 716</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line717">line 717</a>
</li></ul></dd>
@@ -9045,7 +9045,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line497">line 497</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line498">line 498</a>
</li></ul></dd>
@@ -9147,7 +9147,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line121">line 121</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line122">line 122</a>
</li></ul></dd>
@@ -9249,7 +9249,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line157">line 157</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line158">line 158</a>
</li></ul></dd>
@@ -9447,7 +9447,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line689">line 689</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line690">line 690</a>
</li></ul></dd>
@@ -9645,7 +9645,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line698">line 698</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line699">line 699</a>
</li></ul></dd>
@@ -9905,7 +9905,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line480">line 480</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line481">line 481</a>
</li></ul></dd>
@@ -10134,7 +10134,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line670">line 670</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line671">line 671</a>
</li></ul></dd>
@@ -10363,7 +10363,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line680">line 680</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line681">line 681</a>
</li></ul></dd>
@@ -10433,7 +10433,7 @@ Cache is note instance scoped.
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+2 -2
View File
@@ -744,7 +744,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_revision.js.html">entities/note_revision.js</a>, <a href="entities_note_revision.js.html#line104">line 104</a>
<a href="entities_note_revision.js.html">entities/note_revision.js</a>, <a href="entities_note_revision.js.html#line105">line 105</a>
</li></ul></dd>
@@ -814,7 +814,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -316,7 +316,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -293,7 +293,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -75,7 +75,7 @@ module.exports = ApiToken;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+3 -11
View File
@@ -73,11 +73,7 @@ class Attribute extends Entity {
* @returns {Promise&lt;Note|null>}
*/
async getNote() {
if (!this.__note) {
this.__note = await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);
}
return this.__note;
return await repository.getNote(this.noteId);
}
/**
@@ -92,11 +88,7 @@ class Attribute extends Entity {
return null;
}
if (!this.__targetNote) {
this.__targetNote = await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.value]);
}
return this.__targetNote;
return await repository.getNote(this.value);
}
/**
@@ -176,7 +168,7 @@ module.exports = Attribute;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+8 -3
View File
@@ -56,9 +56,14 @@ class Branch extends Entity {
// notePosition is not part of hash because it would produce a lot of updates in case of reordering
static get hashedProperties() { return ["branchId", "noteId", "parentNoteId", "isDeleted", "deleteId", "prefix"]; }
/** @returns {Note|null} */
/** @returns {Promise&lt;Note|null>} */
async getNote() {
return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);
return await repository.getNote(this.noteId);
}
/** @returns {Promise&lt;Note|null>} */
async getParentNote() {
return await repository.getNote(this.parentNoteId);
}
async beforeSaving() {
@@ -116,7 +121,7 @@ module.exports = Branch;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -102,7 +102,7 @@ module.exports = Entity;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+12 -13
View File
@@ -123,15 +123,16 @@ class Note extends Entity {
this.content = "";
}
}
if (this.isStringNote()) {
this.content = this.content === null
? ""
: this.content.toString("UTF-8");
}
}
return this.content;
if (this.isStringNote()) {
return this.content === null
? ""
: this.content.toString("UTF-8");
}
else {
return this.content;
}
}
/** @returns {Promise&lt;*>} */
@@ -838,11 +839,9 @@ class Note extends Entity {
SELECT *
FROM attributes
WHERE noteId = ? AND
isDeleted = 0 AND
((type = 'relation' AND
name IN ('internalLink', 'imageLink', 'relationMapLink', 'includeNoteLink'))
OR
(type = 'label' AND name = 'externalLink'))`, [this.noteId]);
isDeleted = 0 AND
type = 'relation' AND
name IN ('internalLink', 'imageLink', 'relationMapLink', 'includeNoteLink')`, [this.noteId]);
}
/**
@@ -991,7 +990,7 @@ module.exports = Note;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
@@ -76,7 +76,7 @@ class NoteRevision extends Entity {
}
async getNote() {
return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);
return await repository.getNote(this.noteId);
}
/** @returns {boolean} true if the note has string content (not binary) */
@@ -117,15 +117,16 @@ class NoteRevision extends Entity {
this.content = "";
}
}
if (this.isStringNote()) {
this.content = this.content === null
? ""
: this.content.toString("UTF-8");
}
}
return this.content;
if (this.isStringNote()) {
return this.content === null
? ""
: this.content.toString("UTF-8");
}
else {
return this.content;
}
}
/** @returns {Promise} */
@@ -198,7 +199,7 @@ module.exports = NoteRevision;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -82,7 +82,7 @@ module.exports = Option;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
@@ -75,7 +75,7 @@ module.exports = RecentNote;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -1089,7 +1089,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -56,7 +56,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
@@ -415,12 +415,10 @@ function BackendScriptApi(currentNote, apiParams) {
this.sql = sql;
/**
* Trigger tree refresh in all connected clients. This is required when some tree change happens in
* the backend.
*
* @returns {Promise&lt;void>}
* @method
* @deprecated - this is now no-op since all the changes should be gracefully handled per widget
*/
this.refreshTree = ws.refreshTree;
this.refreshTree = () => {};
/**
* @return {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version
@@ -445,7 +443,7 @@ module.exports = BackendScriptApi;
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -885,7 +885,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+360 -62
View File
@@ -81,7 +81,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line21">line 21</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line24">line 24</a>
</li></ul></dd>
@@ -223,7 +223,113 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line25">line 25</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line28">line 28</a>
</li></ul></dd>
</dl>
<h4 class="name" id="BasicWidget"><span class="type-signature"></span>BasicWidget<span class="type-signature"></span></h4>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="type">
<span class="param-type">BasicWidget</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line50">line 50</a>
</li></ul></dd>
@@ -329,7 +435,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line38">line 38</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line41">line 41</a>
</li></ul></dd>
@@ -439,7 +545,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line30">line 30</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line33">line 33</a>
</li></ul></dd>
@@ -552,7 +658,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line32">line 32</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line35">line 35</a>
</li></ul></dd>
@@ -662,7 +768,219 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line28">line 28</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line31">line 31</a>
</li></ul></dd>
</dl>
<h4 class="name" id="TabAwareWidget"><span class="type-signature"></span>TabAwareWidget<span class="type-signature"></span></h4>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="type">
<span class="param-type">TabAwareWidget</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line44">line 44</a>
</li></ul></dd>
</dl>
<h4 class="name" id="TabCachingWidget"><span class="type-signature"></span>TabCachingWidget<span class="type-signature"></span></h4>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="type">
<span class="param-type">TabCachingWidget</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line47">line 47</a>
</li></ul></dd>
@@ -791,7 +1109,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line57">line 57</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line69">line 69</a>
</li></ul></dd>
@@ -946,7 +1264,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line47">line 47</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line59">line 59</a>
</li></ul></dd>
@@ -1101,7 +1419,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line77">line 77</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line89">line 89</a>
</li></ul></dd>
@@ -1238,7 +1556,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line279">line 279</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line289">line 289</a>
</li></ul></dd>
@@ -1394,7 +1712,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line384">line 384</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line394">line 394</a>
</li></ul></dd>
@@ -1574,7 +1892,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line271">line 271</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line281">line 281</a>
</li></ul></dd>
@@ -1707,7 +2025,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line231">line 231</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line243">line 243</a>
</li></ul></dd>
@@ -1813,7 +2131,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line285">line 285</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line295">line 295</a>
</li></ul></dd>
@@ -1919,7 +2237,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line299">line 299</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line309">line 309</a>
</li></ul></dd>
@@ -2073,7 +2391,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line293">line 293</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line303">line 303</a>
</li></ul></dd>
@@ -2210,7 +2528,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line350">line 350</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line360">line 360</a>
</li></ul></dd>
@@ -2317,7 +2635,7 @@ if some action needs to happen on only one specific instance.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line224">line 224</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line236">line 236</a>
</li></ul></dd>
@@ -2472,7 +2790,7 @@ if some action needs to happen on only one specific instance.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line359">line 359</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line369">line 369</a>
</li></ul></dd>
@@ -2628,7 +2946,7 @@ if some action needs to happen on only one specific instance.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line196">line 196</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line208">line 208</a>
</li></ul></dd>
@@ -2829,7 +3147,7 @@ otherwise (by e.g. createNoteLink())
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line208">line 208</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line220">line 220</a>
</li></ul></dd>
@@ -2935,7 +3253,7 @@ otherwise (by e.g. createNoteLink())
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line341">line 341</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line351">line 351</a>
</li></ul></dd>
@@ -3090,7 +3408,7 @@ otherwise (by e.g. createNoteLink())
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line368">line 368</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line378">line 378</a>
</li></ul></dd>
@@ -3241,7 +3559,7 @@ otherwise (by e.g. createNoteLink())
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line238">line 238</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line250">line 250</a>
</li></ul></dd>
@@ -3349,7 +3667,7 @@ otherwise (by e.g. createNoteLink())
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line311">line 311</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line321">line 321</a>
</li></ul></dd>
@@ -3505,7 +3823,7 @@ otherwise (by e.g. createNoteLink())
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line322">line 322</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line332">line 332</a>
</li></ul></dd>
@@ -3661,7 +3979,7 @@ otherwise (by e.g. createNoteLink())
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line331">line 331</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line341">line 341</a>
</li></ul></dd>
@@ -3697,17 +4015,13 @@ otherwise (by e.g. createNoteLink())
<h4 class="name" id="refreshTree"><span class="type-signature"></span>refreshTree<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4>
<h4 class="name" id="refreshTree"><span class="type-signature"></span>refreshTree<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Refresh tree
</div>
@@ -3737,6 +4051,8 @@ otherwise (by e.g. createNoteLink())
<dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>- this is now no-op since all the changes should be gracefully handled per widget</li></ul></dd>
@@ -3749,7 +4065,7 @@ otherwise (by e.g. createNoteLink())
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line262">line 262</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line272">line 272</a>
</li></ul></dd>
@@ -3774,24 +4090,6 @@ otherwise (by e.g. createNoteLink())
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.&lt;void></span>
</dd>
</dl>
@@ -3904,7 +4202,7 @@ otherwise (by e.g. createNoteLink())
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line216">line 216</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line228">line 228</a>
</li></ul></dd>
@@ -4065,7 +4363,7 @@ Internally this serializes the anonymous function into string and sends it to ba
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line127">line 127</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line139">line 139</a>
</li></ul></dd>
@@ -4173,7 +4471,7 @@ Internally this serializes the anonymous function into string and sends it to ba
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line156">line 156</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line168">line 168</a>
</li></ul></dd>
@@ -4311,7 +4609,7 @@ Internally this serializes the anonymous function into string and sends it to ba
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line184">line 184</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line196">line 196</a>
</li></ul></dd>
@@ -4467,7 +4765,7 @@ Internally this serializes the anonymous function into string and sends it to ba
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line166">line 166</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line178">line 178</a>
</li></ul></dd>
@@ -4622,7 +4920,7 @@ Internally this serializes the anonymous function into string and sends it to ba
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line377">line 377</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line387">line 387</a>
</li></ul></dd>
@@ -4773,7 +5071,7 @@ Internally this serializes the anonymous function into string and sends it to ba
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line305">line 305</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line315">line 315</a>
</li></ul></dd>
@@ -4910,7 +5208,7 @@ Internally this serializes the anonymous function into string and sends it to ba
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line254">line 254</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line266">line 266</a>
</li></ul></dd>
@@ -5047,7 +5345,7 @@ Internally this serializes the anonymous function into string and sends it to ba
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line246">line 246</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line258">line 258</a>
</li></ul></dd>
@@ -5139,7 +5437,7 @@ Typical use case is when new note has been created, we should wait until it is s
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line395">line 395</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line405">line 405</a>
</li></ul></dd>
@@ -5191,7 +5489,7 @@ Typical use case is when new note has been created, we should wait until it is s
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -513,7 +513,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+29 -29
View File
@@ -1159,7 +1159,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line295">line 295</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line298">line 298</a>
</li></ul></dd>
@@ -1537,7 +1537,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line317">line 317</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line320">line 320</a>
</li></ul></dd>
@@ -2202,7 +2202,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line357">line 357</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line360">line 360</a>
</li></ul></dd>
@@ -2369,7 +2369,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line233">line 233</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line236">line 236</a>
</li></ul></dd>
@@ -2536,7 +2536,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line225">line 225</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line228">line 228</a>
</li></ul></dd>
@@ -2691,7 +2691,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line381">line 381</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line384">line 384</a>
</li></ul></dd>
@@ -2869,7 +2869,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line284">line 284</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line287">line 287</a>
</li></ul></dd>
@@ -3247,7 +3247,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line306">line 306</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line309">line 309</a>
</li></ul></dd>
@@ -3402,7 +3402,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line351">line 351</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line354">line 354</a>
</li></ul></dd>
@@ -3569,7 +3569,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line217">line 217</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line220">line 220</a>
</li></ul></dd>
@@ -3724,7 +3724,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line375">line 375</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line378">line 378</a>
</li></ul></dd>
@@ -3879,7 +3879,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line363">line 363</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line366">line 366</a>
</li></ul></dd>
@@ -4046,7 +4046,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line241">line 241</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line244">line 244</a>
</li></ul></dd>
@@ -4201,7 +4201,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line387">line 387</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>
@@ -4560,7 +4560,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line369">line 369</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line372">line 372</a>
</li></ul></dd>
@@ -4727,7 +4727,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line257">line 257</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line260">line 260</a>
</li></ul></dd>
@@ -4894,7 +4894,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line249">line 249</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line252">line 252</a>
</li></ul></dd>
@@ -5049,7 +5049,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line399">line 399</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line402">line 402</a>
</li></ul></dd>
@@ -5219,7 +5219,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line409">line 409</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line412">line 412</a>
</li></ul></dd>
@@ -5370,7 +5370,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line393">line 393</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line396">line 396</a>
</li></ul></dd>
@@ -5480,7 +5480,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line433">line 433</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line436">line 436</a>
</li></ul></dd>
@@ -5654,7 +5654,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line266">line 266</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line269">line 269</a>
</li></ul></dd>
@@ -5911,7 +5911,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line333">line 333</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line336">line 336</a>
</li></ul></dd>
@@ -6089,7 +6089,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line275">line 275</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line278">line 278</a>
</li></ul></dd>
@@ -6244,7 +6244,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line327">line 327</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line330">line 330</a>
</li></ul></dd>
@@ -6399,7 +6399,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line339">line 339</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line342">line 342</a>
</li></ul></dd>
@@ -6554,7 +6554,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line345">line 345</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line348">line 348</a>
</li></ul></dd>
@@ -6665,7 +6665,7 @@ Cache is note instance scoped.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line424">line 424</a>
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line427">line 427</a>
</li></ul></dd>
@@ -6819,7 +6819,7 @@ Cache is note instance scoped.
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+10 -1
View File
@@ -55,6 +55,15 @@
return await this.treeCache.getNote(this.noteId);
}
get jsonValue() {
try {
return JSON.parse(this.value);
}
catch (e) {
return null;
}
}
get toString() {
return `Attribute(attributeId=${this.attributeId}, type=${this.type}, name=${this.name}, value=${this.value})`;
}
@@ -76,7 +85,7 @@ export default Attribute;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -87,7 +87,7 @@ export default Branch;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
@@ -67,7 +67,7 @@ export default NoteComplement;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
@@ -211,7 +211,10 @@ class NoteShort {
if (this.noteId !== 'root') {
for (const parentNote of this.getParentNotes()) {
attrArrs.push(parentNote.getInheritableAttributes());
// these virtual parent-child relationships are also loaded into frontend tree cache
if (parentNote.type !== 'search') {
attrArrs.push(parentNote.getInheritableAttributes());
}
}
}
@@ -496,7 +499,7 @@ export default NoteShort;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+2 -2
View File
@@ -303,7 +303,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line64">line 64</a>
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line76">line 76</a>
</li></ul></dd>
@@ -339,7 +339,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -56,7 +56,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
@@ -39,6 +39,9 @@ import CollapsibleWidget from '../widgets/collapsible_widget.js';
import ws from "./ws.js";
import hoistedNoteService from "./hoisted_note.js";
import appContext from "./app_context.js";
import TabAwareWidget from "../widgets/tab_aware_widget.js";
import TabCachingWidget from "../widgets/tab_caching_widget.js";
import BasicWidget from "../widgets/basic_widget.js";
/**
* This is the main frontend API interface for scripts. It's published in the local "api" object.
@@ -65,6 +68,15 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
/** @property {CollapsibleWidget} */
this.CollapsibleWidget = CollapsibleWidget;
/** @property {TabAwareWidget} */
this.TabAwareWidget = TabAwareWidget;
/** @property {TabCachingWidget} */
this.TabCachingWidget = TabCachingWidget;
/** @property {BasicWidget} */
this.BasicWidget = BasicWidget;
/**
* Activates note in the tree and in the note detail.
*
@@ -282,12 +294,10 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
this.showError = toastService.showError;
/**
* Refresh tree
*
* @method
* @returns {Promise&lt;void>}
* @deprecated - this is now no-op since all the changes should be gracefully handled per widget
*/
this.refreshTree = treeService.reload;
this.refreshTree = () => {};
/**
* Create note link (jQuery object) for given note.
@@ -439,7 +449,7 @@ export default FrontendScriptApi;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
</footer>
<script> prettyPrint(); </script>
+173 -178
View File
@@ -1,9 +1,9 @@
/*
* !!!!!!! This stylesheet is heavily modified compared to the original for similarity with in-editor look !!!!!!!
* This is used for printing and tar HTML export
*
* CKEditor 5 (v15.0.0) content styles.
* Generated on Wed, 27 Nov 2019 13:26:13 GMT.
* CKEditor 5 (v17.0.0) content styles.
* Generated on Fri, 13 Mar 2020 13:27:10 GMT.
* For more information, check out https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/content-styles.html
*/
@@ -16,204 +16,71 @@
--ck-highlight-pen-red: #e91313;
--ck-image-style-spacing: 1.5em;
--ck-todo-list-checkmark-size: 16px;
font-family: Arial, Sans-Serif;
}
/* ckeditor5-list/theme/todolist.css */
.todo-list {
list-style: none;
}
/* ckeditor5-list/theme/todolist.css */
.todo-list li {
margin-bottom: 5px;
}
/* ckeditor5-list/theme/todolist.css */
.todo-list li .todo-list {
margin-top: 5px;
}
/* ckeditor5-list/theme/todolist.css */
.todo-list .todo-list__label > input {
-webkit-appearance: none;
display: inline-block;
position: relative;
width: var(--ck-todo-list-checkmark-size);
height: var(--ck-todo-list-checkmark-size);
vertical-align: middle;
border: 0;
left: -25px;
margin-right: -15px;
right: 0;
margin-left: 0;
}
/* ckeditor5-list/theme/todolist.css */
.todo-list .todo-list__label > input::before {
/* ckeditor5-image/theme/imageresize.css */
.ck-content .image.image_resized {
max-width: 100%;
display: block;
position: absolute;
box-sizing: border-box;
content: '';
}
/* ckeditor5-image/theme/imageresize.css */
.ck-content .image.image_resized img {
width: 100%;
height: 100%;
border: 1px solid hsl(0, 0%, 20%);
border-radius: 2px;
transition: 250ms ease-in-out box-shadow, 250ms ease-in-out background, 250ms ease-in-out border;
}
/* ckeditor5-list/theme/todolist.css */
.todo-list .todo-list__label > input::after {
/* ckeditor5-image/theme/imageresize.css */
.ck-content .image.image_resized > figcaption {
display: block;
position: absolute;
box-sizing: content-box;
pointer-events: none;
content: '';
left: calc( var(--ck-todo-list-checkmark-size) / 3 );
top: calc( var(--ck-todo-list-checkmark-size) / 5.3 );
width: calc( var(--ck-todo-list-checkmark-size) / 5.3 );
height: calc( var(--ck-todo-list-checkmark-size) / 2.6 );
border-style: solid;
border-color: transparent;
border-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0;
transform: rotate(45deg);
}
/* ckeditor5-list/theme/todolist.css */
.todo-list .todo-list__label > input[checked]::before {
border-color: hsl(126, 64%, 41%);
}
/* ckeditor5-list/theme/todolist.css */
.todo-list .todo-list__label > input[checked]::after {
border-color: hsl(126, 64%, 41%);
}
/* ckeditor5-list/theme/todolist.css */
.todo-list .todo-list__label .todo-list__label__description {
vertical-align: middle;
/* ckeditor5-basic-styles/theme/code.css */
.ck-content code {
background-color: hsla(0, 0%, 78%, 0.3);
padding: .15em;
border-radius: 2px;
}
/* ckeditor5-image/theme/image.css */
.image {
.ck-content .image {
display: table;
clear: both;
text-align: center;
margin: 1em auto;
}
/* ckeditor5-image/theme/image.css */
.image > img {
.ck-content .image > img {
display: block;
margin: 0 auto;
max-width: 100%;
min-width: 50px;
}
/* ckeditor5-block-quote/theme/blockquote.css */
blockquote {
overflow: hidden;
padding-right: 1.5em;
padding-left: 1.5em;
margin-left: 0;
margin-right: 0;
font-style: italic;
border-left: solid 5px hsl(0, 0%, 80%);
}
/* ckeditor5-block-quote/theme/blockquote.css */
.ck-content[dir="rtl"] blockquote {
border-left: 0;
border-right: solid 5px hsl(0, 0%, 80%);
}
/* ckeditor5-image/theme/imageresize.css */
.image.image_resized {
max-width: 100%;
display: block;
box-sizing: border-box;
}
/* ckeditor5-image/theme/imageresize.css */
.image.image_resized img {
width: 100%;
}
/* ckeditor5-image/theme/imageresize.css */
.image.image_resized > figcaption {
display: block;
}
/* ckeditor5-image/theme/imagestyle.css */
.image-style-side,
.image-style-align-left,
.image-style-align-center,
.image-style-align-right {
.ck-content .image-style-side,
.ck-content .image-style-align-left,
.ck-content .image-style-align-center,
.ck-content .image-style-align-right {
max-width: 50%;
}
/* ckeditor5-image/theme/imagestyle.css */
.image-style-side {
.ck-content .image-style-side {
float: right;
margin-left: var(--ck-image-style-spacing);
}
/* ckeditor5-image/theme/imagestyle.css */
.image-style-align-left {
.ck-content .image-style-align-left {
float: left;
margin-right: var(--ck-image-style-spacing);
}
/* ckeditor5-image/theme/imagestyle.css */
.image-style-align-center {
.ck-content .image-style-align-center {
margin-left: auto;
margin-right: auto;
}
/* ckeditor5-image/theme/imagestyle.css */
.image-style-align-right {
.ck-content .image-style-align-right {
float: right;
margin-left: var(--ck-image-style-spacing);
}
/* ckeditor5-media-embed/theme/mediaembed.css */
.media {
clear: both;
margin: 1em 0;
display: block;
min-width: 15em;
}
/* ckeditor5-table/theme/table.css */
.table {
display: table;
margin: 0;
}
/* ckeditor5-table/theme/table.css */
.table table {
border-collapse: collapse;
border-spacing: 0;
border: 1px double hsl(0, 0%, 70%);
}
/* ckeditor5-table/theme/table.css */
.table table td,
.table table th {
min-width: 2em;
padding: .4em;
border: 1px solid #d9d9d9;
}
/* ckeditor5-table/theme/table.css */
.table table th {
font-weight: bold;
background-color: #f5f5f5;
text-align: left;
}
/* ckeditor5-highlight/theme/highlight.css */
.marker-yellow {
background-color: var(--ck-highlight-marker-yellow);
}
/* ckeditor5-highlight/theme/highlight.css */
.marker-green {
background-color: var(--ck-highlight-marker-green);
}
/* ckeditor5-highlight/theme/highlight.css */
.marker-pink {
background-color: var(--ck-highlight-marker-pink);
}
/* ckeditor5-highlight/theme/highlight.css */
.marker-blue {
background-color: var(--ck-highlight-marker-blue);
}
/* ckeditor5-highlight/theme/highlight.css */
.pen-red {
color: var(--ck-highlight-pen-red);
background-color: transparent;
}
/* ckeditor5-highlight/theme/highlight.css */
.pen-green {
color: var(--ck-highlight-pen-green);
background-color: transparent;
}
/* ckeditor5-page-break/theme/pagebreak.css */
.page-break {
.ck-content .page-break {
position: relative;
clear: both;
padding: 5px 0;
@@ -222,14 +89,14 @@ blockquote {
justify-content: center;
}
/* ckeditor5-page-break/theme/pagebreak.css */
.page-break::after {
.ck-content .page-break::after {
content: '';
position: absolute;
border-bottom: 2px dashed hsl(0, 0%, 77%);
width: 100%;
}
/* ckeditor5-page-break/theme/pagebreak.css */
.page-break__label {
.ck-content .page-break__label {
position: relative;
z-index: 1;
padding: .3em .6em;
@@ -248,14 +115,122 @@ blockquote {
-ms-user-select: none;
user-select: none;
}
/* ckeditor5-basic-styles/theme/code.css */
code {
background-color: hsla(0, 0%, 78%, 0.3);
padding: .15em;
/* ckeditor5-block-quote/theme/blockquote.css */
.ck-content blockquote {
overflow: hidden;
padding-right: 1.5em;
padding-left: 1.5em;
margin-left: 0;
margin-right: 0;
font-style: italic;
border-left: solid 5px hsl(0, 0%, 80%);
}
/* ckeditor5-block-quote/theme/blockquote.css */
.ck-content[dir="rtl"] blockquote {
border-left: 0;
border-right: solid 5px hsl(0, 0%, 80%);
}
/* ckeditor5-media-embed/theme/mediaembed.css */
.ck-content .media {
clear: both;
margin: 1em 0;
display: block;
min-width: 15em;
}
/* ckeditor5-table/theme/table.css */
.ck-content .table {
margin: 1em auto;
display: table;
}
/* ckeditor5-table/theme/table.css */
.ck-content .table table {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
height: 100%;
border: 1px double hsl(0, 0%, 70%);
}
/* ckeditor5-table/theme/table.css */
.ck-content .table table td,
.ck-content .table table th {
min-width: 2em;
padding: .4em;
border-color: hsl(0, 0%, 75%);
}
/* ckeditor5-table/theme/table.css */
.ck-content .table table th {
font-weight: bold;
background: hsla(0, 0%, 0%, 5%);
}
/* ckeditor5-list/theme/todolist.css */
.ck-content .todo-list {
list-style: none;
}
/* ckeditor5-list/theme/todolist.css */
.ck-content .todo-list li {
margin-bottom: 5px;
}
/* ckeditor5-list/theme/todolist.css */
.ck-content .todo-list li .todo-list {
margin-top: 5px;
}
/* ckeditor5-list/theme/todolist.css */
.ck-content .todo-list .todo-list__label > input {
-webkit-appearance: none;
display: inline-block;
position: relative;
width: var(--ck-todo-list-checkmark-size);
height: var(--ck-todo-list-checkmark-size);
vertical-align: middle;
border: 0;
left: -25px;
margin-right: -15px;
right: 0;
margin-left: 0;
}
/* ckeditor5-list/theme/todolist.css */
.ck-content .todo-list .todo-list__label > input::before {
display: block;
position: absolute;
box-sizing: border-box;
content: '';
width: 100%;
height: 100%;
border: 1px solid hsl(0, 0%, 20%);
border-radius: 2px;
transition: 250ms ease-in-out box-shadow, 250ms ease-in-out background, 250ms ease-in-out border;
}
/* ckeditor5-list/theme/todolist.css */
.ck-content .todo-list .todo-list__label > input::after {
display: block;
position: absolute;
box-sizing: content-box;
pointer-events: none;
content: '';
left: calc( var(--ck-todo-list-checkmark-size) / 3 );
top: calc( var(--ck-todo-list-checkmark-size) / 5.3 );
width: calc( var(--ck-todo-list-checkmark-size) / 5.3 );
height: calc( var(--ck-todo-list-checkmark-size) / 2.6 );
border-style: solid;
border-color: transparent;
border-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0;
transform: rotate(45deg);
}
/* ckeditor5-list/theme/todolist.css */
.ck-content .todo-list .todo-list__label > input[checked]::before {
background: hsl(126, 64%, 41%);
border-color: hsl(126, 64%, 41%);
}
/* ckeditor5-list/theme/todolist.css */
.ck-content .todo-list .todo-list__label > input[checked]::after {
border-color: hsl(0, 0%, 100%);
}
/* ckeditor5-list/theme/todolist.css */
.ck-content .todo-list .todo-list__label .todo-list__label__description {
vertical-align: middle;
}
/* ckeditor5-image/theme/imagecaption.css */
.image > figcaption {
.ck-content .image > figcaption {
display: table-caption;
caption-side: bottom;
word-break: break-word;
@@ -265,15 +240,41 @@ code {
font-size: .75em;
outline-offset: -1px;
}
/* ckeditor5-highlight/theme/highlight.css */
.ck-content .marker-yellow {
background-color: var(--ck-highlight-marker-yellow);
}
/* ckeditor5-highlight/theme/highlight.css */
.ck-content .marker-green {
background-color: var(--ck-highlight-marker-green);
}
/* ckeditor5-highlight/theme/highlight.css */
.ck-content .marker-pink {
background-color: var(--ck-highlight-marker-pink);
}
/* ckeditor5-highlight/theme/highlight.css */
.ck-content .marker-blue {
background-color: var(--ck-highlight-marker-blue);
}
/* ckeditor5-highlight/theme/highlight.css */
.ck-content .pen-red {
color: var(--ck-highlight-pen-red);
background-color: transparent;
}
/* ckeditor5-highlight/theme/highlight.css */
.ck-content .pen-green {
color: var(--ck-highlight-pen-green);
background-color: transparent;
}
/* ckeditor5-horizontal-line/theme/horizontalline.css */
hr {
.ck-content hr {
border-width: 1px 0 0;
border-style: solid;
border-color: hsl(0, 0%, 37%);
margin: 0;
}
/* ckeditor5-code-block/theme/codeblock.css */
pre {
.ck-content pre {
padding: 1em;
color: #353535;
background: hsla(0, 0%, 78%, 0.3);
@@ -287,24 +288,18 @@ pre {
min-width: 200px;
}
/* ckeditor5-code-block/theme/codeblock.css */
pre code {
.ck-content pre code {
background: unset;
padding: 0;
border-radius: 0;
}
.ck-widget__selection-handle {
display: none;
}
@media print {
/* ckeditor5-page-break/theme/pagebreak.css */
.page-break {
.ck-content .page-break {
padding: 0;
}
/* ckeditor5-page-break/theme/pagebreak.css */
.page-break::after {
.ck-content .page-break::after {
display: none;
}
}
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+262 -300
View File
@@ -1,6 +1,6 @@
/*! jQuery Fancytree Plugin - 2.35.0 - 2020-03-27T22:41:58Z
/*! jQuery Fancytree Plugin - 2.34.0 - 2019-12-26T14:16:19Z
* https://github.com/mar10/fancytree
* Copyright (c) 2020 Martin Wendt; Licensed MIT
* Copyright (c) 2019 Martin Wendt; Licensed MIT
*/
/*! jQuery UI - v1.12.1 - 2018-05-20
* http://jqueryui.com
@@ -1361,12 +1361,12 @@ var uniqueId = $.fn.extend( {
* Tree view control with support for lazy loading and much more.
* https://github.com/mar10/fancytree/
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
*/
/** Core Fancytree module.
@@ -1405,7 +1405,7 @@ var uniqueId = $.fn.extend( {
REX_HTML = /[&<>"'/]/g, // Escape those characters
REX_TOOLTIP = /[<>"'/]/g, // Don't escape `&` in tooltips
RECURSIVE_REQUEST_ERROR = "$recursive_request",
INVALID_REQUEST_TARGET_ERROR = "$request_target_invalid",
// CLIPBOARD = null,
ENTITY_MAP = {
"&": "&amp;",
"<": "&lt;",
@@ -2206,7 +2206,7 @@ var uniqueId = $.fn.extend( {
*
* @param {FancytreeNode} node source node
* @param {string} [mode=child] 'before' | 'after' | 'child'
* @param {Function} [map] callback function(NodeData, FancytreeNode) that could modify the new node
* @param {Function} [map] callback function(NodeData) that could modify the new node
* @returns {FancytreeNode} new
*/
copyTo: function(node, mode, map) {
@@ -2970,9 +2970,10 @@ var uniqueId = $.fn.extend( {
* @deprecated since 2014-02-16: use load() instead.
*/
lazyLoad: function(discard) {
$.error(
this.warn(
"FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead."
);
return this.load(discard);
},
/**
* Load all children of a lazy node if neccessary. The <i>expanded</i> state is maintained.
@@ -3495,9 +3496,9 @@ var uniqueId = $.fn.extend( {
// this.debug("scrollIntoView(), scrollTop=" + scrollTop, opts.scrollOfs);
// _assert($(this.span).is(":visible"), "scrollIntoView node is invisible"); // otherwise we cannot calc offsets
if (this.isRootNode() || !this.isVisible()) {
if (!this.isVisible()) {
// We cannot calc offsets for hidden elements
this.info("scrollIntoView(): node is invisible.");
this.warn("scrollIntoView(): node is invisible.");
return _getResolvedPromise();
}
if (isParentWindow) {
@@ -3609,7 +3610,7 @@ var uniqueId = $.fn.extend( {
return this.tree._callHook("nodeSetSelected", this, flag, opts);
},
/**Mark a lazy node as 'error', 'loading', 'nodata', or 'ok'.
* @param {string} status 'error'|'loading'|'nodata'|'ok'
* @param {string} status 'error'|'empty'|'ok'
* @param {string} [message]
* @param {string} [details]
*/
@@ -3670,7 +3671,7 @@ var uniqueId = $.fn.extend( {
*
* @param {boolean} [recursive=false] include child nodes
* @param {function} [callback] callback(dict, node) is called for every node, in order to allow modifications.
* Return `false` to ignore this node or `"skip"` to include this node without its children.
* Return `false` to ignore this node or "skip" to include this node without its children.
* @returns {NodeData}
*/
toDict: function(recursive, callback) {
@@ -3702,7 +3703,7 @@ var uniqueId = $.fn.extend( {
}
}
if (recursive) {
if ($.isArray(this.children)) {
if (this.hasChildren()) {
dict.children = [];
for (i = 0, l = this.children.length; i < l; i++) {
node = this.children[i];
@@ -4327,8 +4328,8 @@ var uniqueId = $.fn.extend( {
// case "copy":
// clipboard = {
// mode: cmd,
// data: node.toDict(function(d, n) {
// delete d.key;
// data: node.toDict(function(n) {
// delete n.key;
// }),
// };
// break;
@@ -5612,16 +5613,12 @@ var uniqueId = $.fn.extend( {
nodeLoadChildren: function(ctx, source) {
var ajax,
delay,
ajaxDfd = null,
resultDfd,
isAsync = true,
dfd,
res,
tree = ctx.tree,
node = ctx.node,
nodePrevParent = node.parent,
tag = "nodeLoadChildren",
requestId = Date.now();
// `source` is a callback: use the returned result instead:
if ($.isFunction(source)) {
source = source.call(tree, { type: "source" }, ctx);
_assert(
@@ -5629,15 +5626,23 @@ var uniqueId = $.fn.extend( {
"source callback must not return another function"
);
}
// `source` is already a promise:
if ($.isFunction(source.then)) {
// _assert($.isFunction(source.always), "Expected jQuery?");
ajaxDfd = source;
} else if (source.url) {
if (source.url) {
if (node._requestId) {
node.warn(
"Recursive load request #" +
requestId +
" while #" +
node._requestId +
" is pending."
);
// } else {
// node.debug("Send load request #" + requestId);
}
// `source` is an Ajax options object
ajax = $.extend({}, ctx.options.ajax, source);
node._requestId = requestId;
if (ajax.debugDelay) {
// Simulate a slow server
// simulate a slow server
delay = ajax.debugDelay;
delete ajax.debugDelay; // remove debug option
if ($.isArray(delay)) {
@@ -5651,74 +5656,30 @@ var uniqueId = $.fn.extend( {
Math.round(delay) +
" ms ..."
);
ajaxDfd = $.Deferred(function(ajaxDfd) {
dfd = $.Deferred(function(dfd) {
setTimeout(function() {
$.ajax(ajax)
.done(function() {
ajaxDfd.resolveWith(this, arguments);
dfd.resolveWith(this, arguments);
})
.fail(function() {
ajaxDfd.rejectWith(this, arguments);
dfd.rejectWith(this, arguments);
});
}, delay);
});
} else {
ajaxDfd = $.ajax(ajax);
dfd = $.ajax(ajax);
}
} else if ($.isPlainObject(source) || $.isArray(source)) {
// `source` is already a constant dict or list, but we convert
// to a thenable for unified processing.
// 2020-01-03: refactored.
// `ajaxDfd = $.when(source)` would do the trick, but the returned
// promise will resolve async, which broke some tests and
// would probably also break current implementations out there.
// So we mock-up a thenable that resolves synchronously:
ajaxDfd = {
then: function(resolve, reject) {
resolve(source, null, null);
},
};
isAsync = false;
} else {
$.error("Invalid source type: " + source);
}
// Check for overlapping requests
if (node._requestId) {
node.warn(
"Recursive load request #" +
requestId +
" while #" +
node._requestId +
" is pending."
);
node._requestId = requestId;
// node.debug("Send load request #" + requestId);
}
if (isAsync) {
tree.debugTime(tag);
tree.nodeSetStatus(ctx, "loading");
}
// The async Ajax request has now started...
// Defer the deferred:
// we want to be able to reject invalid responses, even if
// the raw HTTP Ajax XHR resolved as Ok.
// We use the ajaxDfd.then() syntax here, which is compatible with
// jQuery and ECMA6.
// However resultDfd is a jQuery deferred, which is currently the
// expected result type of nodeLoadChildren()
resultDfd = new $.Deferred();
ajaxDfd.then(
function(data, textStatus, jqXHR) {
// ajaxDfd was resolved, but we reject or resolve resultDfd
// depending on the response data
// Defer the deferred: we want to be able to reject, even if ajax
// resolved ok.
source = new $.Deferred();
dfd.done(function(data, textStatus, jqXHR) {
var errorObj, res;
if (
(source.dataType === "json" ||
source.dataType === "jsonp") &&
(this.dataType === "json" ||
this.dataType === "jsonp") &&
typeof data === "string"
) {
$.error(
@@ -5729,28 +5690,21 @@ var uniqueId = $.fn.extend( {
// The expected request time stamp is later than `requestId`
// (which was kept as as closure variable to this handler function)
// node.warn("Ignored load response for obsolete request #" + requestId + " (expected #" + node._requestId + ")");
resultDfd.rejectWith(this, [
RECURSIVE_REQUEST_ERROR,
]);
source.rejectWith(this, [RECURSIVE_REQUEST_ERROR]);
return;
// } else {
// node.debug("Response returned for load request #" + requestId);
}
if (node.parent === null && nodePrevParent !== null) {
resultDfd.rejectWith(this, [
INVALID_REQUEST_TARGET_ERROR,
]);
return;
}
// Allow to adjust the received response data in the `postProcess` event.
// postProcess is similar to the standard ajax dataFilter hook,
// but it is also called for JSONP
if (ctx.options.postProcess) {
// The handler may either
// - modify `ctx.response` in-place (and leave `ctx.result` undefined)
// => res = undefined
// - return a replacement in `ctx.result`
// => res = <new data>
// If res contains an `error` property, an error status is displayed
try {
// The handler may either
// - modify `ctx.response` in-place (and leave `ctx.result` undefined)
// => res = undefined
// - return a replacement in `ctx.result`
// => res = <new data>
// If res contains an `error` property, an error status is displayed
res = tree._triggerNodeEvent(
"postProcess",
ctx,
@@ -5758,7 +5712,7 @@ var uniqueId = $.fn.extend( {
{
response: data,
error: null,
dataType: source.dataType,
dataType: this.dataType,
}
);
} catch (e) {
@@ -5769,8 +5723,6 @@ var uniqueId = $.fn.extend( {
};
}
if (res.error) {
// Either postProcess failed with an exception, or the returned
// result object has an 'error' property attached:
errorObj = $.isPlainObject(res.error)
? res.error
: { message: res.error };
@@ -5779,7 +5731,7 @@ var uniqueId = $.fn.extend( {
null,
errorObj
);
resultDfd.rejectWith(this, [errorObj]);
source.rejectWith(this, [errorObj]);
return;
}
if (
@@ -5797,158 +5749,175 @@ var uniqueId = $.fn.extend( {
ctx.options.enableAspx
) {
// Process ASPX WebMethod JSON object inside "d" property
// (only if no postProcess event was defined)
if (ctx.options.enableAspx === 42) {
tree.warn(
"The default for enableAspx will change to `false` in the fututure. " +
"Pass `enableAspx: true` or implement postProcess to silence this warning."
);
}
data =
typeof data.d === "string"
? $.parseJSON(data.d)
: data.d;
}
resultDfd.resolveWith(this, [data]);
},
function(jqXHR, textStatus, errorThrown) {
// ajaxDfd was rejected, so we reject resultDfd as well
source.resolveWith(this, [data]);
}).fail(function(jqXHR, textStatus, errorThrown) {
var errorObj = tree._makeHookContext(node, null, {
error: jqXHR,
args: Array.prototype.slice.call(arguments),
message: errorThrown,
details: jqXHR.status + ": " + errorThrown,
});
resultDfd.rejectWith(this, [errorObj]);
}
);
// The async Ajax request has now started.
// resultDfd will be resolved/rejected after the response arrived,
// was postProcessed, and checked.
// Now we implement the UI update and add the data to the tree.
// We also return this promise to the caller.
resultDfd
.done(function(data) {
tree.nodeSetStatus(ctx, "ok");
var children, metaData, noDataRes;
if ($.isPlainObject(data)) {
// We got {foo: 'abc', children: [...]}
// Copy extra properties to tree.data.foo
_assert(
node.isRootNode(),
"source may only be an object for root nodes (expecting an array of child objects otherwise)"
);
_assert(
$.isArray(data.children),
"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"
);
metaData = data;
children = data.children;
delete metaData.children;
// Copy some attributes to tree.data
$.each(TREE_ATTRS, function(i, attr) {
if (metaData[attr] !== undefined) {
tree[attr] = metaData[attr];
delete metaData[attr];
}
});
// Copy all other attributes to tree.data.NAME
$.extend(tree.data, metaData);
} else {
children = data;
}
_assert(
$.isArray(children),
"expected array of children"
);
node._setChildren(children);
if (tree.options.nodata && children.length === 0) {
if ($.isFunction(tree.options.nodata)) {
noDataRes = tree.options.nodata.call(
tree,
{ type: "nodata" },
ctx
);
} else if (
tree.options.nodata === true &&
node.isRootNode()
) {
noDataRes = tree.options.strings.noData;
} else if (
typeof tree.options.nodata === "string" &&
node.isRootNode()
) {
noDataRes = tree.options.nodata;
}
if (noDataRes) {
node.setStatus("nodata", noDataRes);
}
}
// trigger fancytreeloadchildren
tree._triggerNodeEvent("loadChildren", node);
})
.fail(function(error) {
var ctxErr;
if (error === RECURSIVE_REQUEST_ERROR) {
node.warn(
"Ignored response for obsolete load request #" +
requestId +
" (expected #" +
node._requestId +
")"
);
return;
} else if (error === INVALID_REQUEST_TARGET_ERROR) {
node.warn(
"Lazy parent node was removed while loading: discarding response."
);
return;
} else if (error.node && error.error && error.message) {
// error is already a context object
ctxErr = error;
} else {
ctxErr = tree._makeHookContext(node, null, {
error: error, // it can be jqXHR or any custom error
args: Array.prototype.slice.call(arguments),
message: error
? error.message || error.toString()
: "",
});
if (ctxErr.message === "[object Object]") {
ctxErr.message = "";
}
}
node.warn(
"Load children failed (" + ctxErr.message + ")",
ctxErr
);
if (
tree._triggerNodeEvent(
"loadError",
ctxErr,
null
) !== false
) {
tree.nodeSetStatus(
ctx,
"error",
ctxErr.message,
ctxErr.details
);
}
})
.always(function() {
node._requestId = null;
if (isAsync) {
tree.debugTimeEnd(tag);
}
source.rejectWith(this, [errorObj]);
});
}
// #383: accept and convert ECMAScript 6 Promise
if ($.isFunction(source.then) && $.isFunction(source.catch)) {
dfd = source;
source = new $.Deferred();
dfd.then(
function(value) {
source.resolve(value);
},
function(reason) {
source.reject(reason);
}
);
}
if ($.isFunction(source.promise)) {
// `source` is a deferred, i.e. ajax request
// _assert(!node.isLoading(), "recursive load");
tree.nodeSetStatus(ctx, "loading");
return resultDfd.promise();
source
.done(function(children) {
tree.nodeSetStatus(ctx, "ok");
node._requestId = null;
})
.fail(function(error) {
var ctxErr;
if (error === RECURSIVE_REQUEST_ERROR) {
node.warn(
"Ignored response for obsolete load request #" +
requestId +
" (expected #" +
node._requestId +
")"
);
return;
} else if (
error.node &&
error.error &&
error.message
) {
// error is already a context object
ctxErr = error;
} else {
ctxErr = tree._makeHookContext(node, null, {
error: error, // it can be jqXHR or any custom error
args: Array.prototype.slice.call(arguments),
message: error
? error.message || error.toString()
: "",
});
if (ctxErr.message === "[object Object]") {
ctxErr.message = "";
}
}
node.warn(
"Load children failed (" + ctxErr.message + ")",
ctxErr
);
if (
tree._triggerNodeEvent(
"loadError",
ctxErr,
null
) !== false
) {
tree.nodeSetStatus(
ctx,
"error",
ctxErr.message,
ctxErr.details
);
}
});
} else {
if (ctx.options.postProcess) {
// #792: Call postProcess for non-deferred source
res = tree._triggerNodeEvent(
"postProcess",
ctx,
ctx.originalEvent,
{
response: source,
error: null,
dataType: typeof source,
}
);
if (
$.isArray(res) ||
($.isPlainObject(res) && $.isArray(res.children))
) {
// Use `ctx.result` if valid
// (otherwise use existing data, which may have been modified in-place)
source = res;
}
}
}
// $.when(source) resolves also for non-deferreds
return $.when(source).done(function(children) {
var metaData, noDataRes;
if ($.isPlainObject(children)) {
// We got {foo: 'abc', children: [...]}
// Copy extra properties to tree.data.foo
_assert(
node.isRootNode(),
"source may only be an object for root nodes (expecting an array of child objects otherwise)"
);
_assert(
$.isArray(children.children),
"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"
);
metaData = children;
children = children.children;
delete metaData.children;
// Copy some attributes to tree.data
$.each(TREE_ATTRS, function(i, attr) {
if (metaData[attr] !== undefined) {
tree[attr] = metaData[attr];
delete metaData[attr];
}
});
// Copy all other attributes to tree.data.NAME
$.extend(tree.data, metaData);
}
_assert($.isArray(children), "expected array of children");
node._setChildren(children);
if (tree.options.nodata && children.length === 0) {
if ($.isFunction(tree.options.nodata)) {
noDataRes = tree.options.nodata.call(
tree,
{ type: "nodata" },
ctx
);
} else if (
tree.options.nodata === true &&
node.isRootNode()
) {
noDataRes = tree.options.strings.nodata;
} else if (
typeof tree.options.nodata === "string" &&
node.isRootNode()
) {
noDataRes = tree.options.nodata;
}
if (noDataRes) {
node.setStatus("nodata", noDataRes);
}
}
// trigger fancytreeloadchildren
tree._triggerNodeEvent("loadChildren", node);
});
},
/** [Not Implemented] */
nodeLoadKeyPath: function(ctx, keyPathList) {
@@ -7622,7 +7591,7 @@ var uniqueId = $.fn.extend( {
clickFolderMode: 4,
debugLevel: null, // 0..4 (null: use global setting $.ui.fancytree.debugLevel)
disabled: false, // TODO: required anymore?
enableAspx: 42, // TODO: this is truethy, but distinguishable from true: default will change to false in the future
enableAspx: true,
escapeTitles: false,
extensions: [],
// fx: { height: "toggle", duration: 200 },
@@ -8059,7 +8028,7 @@ var uniqueId = $.fn.extend( {
{
/** Version number `"MAJOR.MINOR.PATCH"`
* @type {string} */
version: "2.35.0", // Set to semver by 'grunt release'
version: "2.34.0", // Set to semver by 'grunt release'
/** @type {string}
* @description `"production" for release builds` */
buildType: "production", // Set to 'production' by 'grunt build'
@@ -8689,13 +8658,13 @@ var uniqueId = $.fn.extend( {
* Add a child counter bubble to tree nodes.
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
*/
// To keep the global namespace clean, we wrap everything in a closure.
@@ -8776,7 +8745,7 @@ var uniqueId = $.fn.extend( {
} else {
$badge.remove();
}
if (extOpts.deep && !node.isTopLevel() && !node.isRootNode()) {
if (extOpts.deep && !node.isTopLevel() && !node.isRoot()) {
node.parent.updateCounters();
}
};
@@ -8814,7 +8783,7 @@ var uniqueId = $.fn.extend( {
// Every extension must be registered by a unique name.
name: "childcounter",
// Version information should be compliant with [semver](http://semver.org)
version: "2.35.0",
version: "2.34.0",
// Extension specific options and their defaults.
// This options will be available as `tree.options.childcounter.hideExpanded`
@@ -8920,13 +8889,13 @@ var uniqueId = $.fn.extend( {
* Support faster lookup of nodes by key and shared ref-ids.
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
*/
(function(factory) {
@@ -9284,7 +9253,7 @@ var uniqueId = $.fn.extend( {
*/
$.ui.fancytree.registerExtension({
name: "clones",
version: "2.35.0",
version: "2.34.0",
// Default options for this extension.
options: {
highlightActiveClones: true, // set 'fancytree-active-clone' on active clones and all peers
@@ -9441,13 +9410,13 @@ var uniqueId = $.fn.extend( {
* Drag-and-drop support (native HTML5).
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
*/
/*
@@ -10232,10 +10201,6 @@ var uniqueId = $.fn.extend( {
node.debug("Reject dropping below own ancestor.");
DRAG_ENTER_RESPONSE = false;
break;
} else if (dndOpts.preventLazyParents && !node.isLoaded()) {
node.warn("Drop over unloaded target node prevented.");
DRAG_ENTER_RESPONSE = false;
break;
}
$dropMarker.show();
@@ -10244,7 +10209,6 @@ var uniqueId = $.fn.extend( {
r = dndOpts.dragEnter(node, data);
res = normalizeDragEnterResponse(r);
// alert("res:" + JSON.stringify(res))
DRAG_ENTER_RESPONSE = res;
allowDrop = res && (res.over || res.before || res.after);
@@ -10290,7 +10254,6 @@ var uniqueId = $.fn.extend( {
} else if (
dndOpts.autoExpandMS &&
Date.now() - DRAG_OVER_STAMP > dndOpts.autoExpandMS &&
!node.isLoading() &&
(!dndOpts.dragExpand ||
dndOpts.dragExpand(node, data) !== false)
) {
@@ -10457,7 +10420,7 @@ var uniqueId = $.fn.extend( {
$.ui.fancytree.registerExtension({
name: "dnd5",
version: "2.35.0",
version: "2.34.0",
// Default options for this extension.
options: {
autoExpandMS: 1500, // Expand nodes after n milliseconds of hovering
@@ -10468,7 +10431,6 @@ var uniqueId = $.fn.extend( {
// dropEffect: "auto", // 'copy'|'link'|'move'|'auto'(calculate from `effectAllowed`+modifier keys) or callback(node, data) that returns such string.
dropEffectDefault: "move", // Default dropEffect ('copy', 'link', or 'move') when no modifier is pressed (overide in dragDrag, dragOver).
preventForeignNodes: false, // Prevent dropping nodes from different Fancytrees
preventLazyParents: true, // Prevent dropping items on unloaded lazy Fancytree nodes
preventNonNodes: false, // Prevent dropping items other than Fancytree nodes
preventRecursion: true, // Prevent dropping nodes on own descendants
preventSameParent: false, // Prevent dropping nodes under same direct parent
@@ -10586,13 +10548,13 @@ var uniqueId = $.fn.extend( {
* Make node titles editable.
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
*/
(function(factory) {
@@ -10794,7 +10756,7 @@ var uniqueId = $.fn.extend( {
// Re-enable mouse and keyboard handling
tree.widget._bind();
if (node && local.lastDraggableAttrValue) {
if (local.lastDraggableAttrValue) {
node.span.draggable = true;
}
@@ -10884,7 +10846,7 @@ var uniqueId = $.fn.extend( {
*/
$.ui.fancytree.registerExtension({
name: "edit",
version: "2.35.0",
version: "2.34.0",
// Default options for this extension.
options: {
adjustWidthOfs: 4, // null: don't adjust input size to content
@@ -10990,13 +10952,13 @@ var uniqueId = $.fn.extend( {
* Remove or highlight tree nodes, based on a filter.
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
*/
(function(factory) {
@@ -11334,7 +11296,7 @@ var uniqueId = $.fn.extend( {
*/
$.ui.fancytree.registerExtension({
name: "filter",
version: "2.35.0",
version: "2.34.0",
// Default options for this extension.
options: {
autoApply: true, // Re-apply last filter if lazy data is loaded
@@ -11449,13 +11411,13 @@ var uniqueId = $.fn.extend( {
* Use glyph-fonts, ligature-fonts, or SVG icons instead of icon sprites.
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
*/
(function(factory) {
@@ -11638,7 +11600,7 @@ var uniqueId = $.fn.extend( {
$.ui.fancytree.registerExtension({
name: "glyph",
version: "2.35.0",
version: "2.34.0",
// Default options for this extension.
options: {
preset: null, // 'awesome3', 'awesome4', 'bootstrap3', 'material'
@@ -11672,7 +11634,7 @@ var uniqueId = $.fn.extend( {
res = this._super(ctx);
if (node.isRootNode()) {
if (node.isRoot()) {
return res;
}
span = $span.children("span.fancytree-expander").get(0);
@@ -11787,13 +11749,13 @@ var uniqueId = $.fn.extend( {
* Support keyboard navigation for trees with embedded input controls.
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
*/
(function(factory) {
@@ -11910,7 +11872,7 @@ var uniqueId = $.fn.extend( {
*/
$.ui.fancytree.registerExtension({
name: "gridnav",
version: "2.35.0",
version: "2.34.0",
// Default options for this extension.
options: {
autofocusInput: false, // Focus first embedded input if node gets activated
@@ -12012,13 +11974,13 @@ var uniqueId = $.fn.extend( {
* Allow multiple selection of nodes by mouse or keyboard.
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
*/
(function(factory) {
@@ -12047,7 +12009,7 @@ var uniqueId = $.fn.extend( {
*/
$.ui.fancytree.registerExtension({
name: "multi",
version: "2.35.0",
version: "2.34.0",
// Default options for this extension.
options: {
allowNoSelect: false, //
@@ -12144,13 +12106,13 @@ var uniqueId = $.fn.extend( {
*
* @depends: js-cookie or jquery-cookie
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
*/
(function(factory) {
@@ -12350,7 +12312,7 @@ var uniqueId = $.fn.extend( {
*/
$.ui.fancytree.registerExtension({
name: "persist",
version: "2.35.0",
version: "2.34.0",
// Default options for this extension.
options: {
cookieDelimiter: "~",
@@ -12638,13 +12600,13 @@ var uniqueId = $.fn.extend( {
* Render tree as table (aka 'tree grid', 'table tree').
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
*/
(function(factory) {
@@ -12727,7 +12689,7 @@ var uniqueId = $.fn.extend( {
$.ui.fancytree.registerExtension({
name: "table",
version: "2.35.0",
version: "2.34.0",
// Default options for this extension.
options: {
checkboxColumnIdx: null, // render the checkboxes into the this column index (default: nodeColumnIdx)
@@ -13188,13 +13150,13 @@ var uniqueId = $.fn.extend( {
*
* @see http://jqueryui.com/themeroller/
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
*/
(function(factory) {
@@ -13217,7 +13179,7 @@ var uniqueId = $.fn.extend( {
*/
$.ui.fancytree.registerExtension({
name: "themeroller",
version: "2.35.0",
version: "2.34.0",
// Default options for this extension.
options: {
activeClass: "ui-state-active", // Class added to active node
@@ -13308,13 +13270,13 @@ var uniqueId = $.fn.extend( {
* Support for 100% wide selection bars.
* (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
*
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
*/
(function(factory) {
@@ -13444,7 +13406,7 @@ var uniqueId = $.fn.extend( {
*/
$.ui.fancytree.registerExtension({
name: "wide",
version: "2.35.0",
version: "2.34.0",
// Default options for this extension.
options: {
iconWidth: null, // Adjust this if @fancy-icon-width != "16px"
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -9,12 +9,12 @@
*
* This section is automatically generated from the `skin-common.less` template.
*
* Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)
* Copyright (c) 2008-2019, Martin Wendt (https://wwWendt.de)
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.35.0
* @date 2020-03-27T22:41:58Z
* @version 2.34.0
* @date 2019-12-26T14:16:19Z
******************************************************************************/
/*------------------------------------------------------------------------------
* Helpers
+1887 -265
View File
File diff suppressed because it is too large Load Diff
+14 -11
View File
@@ -2,7 +2,7 @@
"name": "trilium",
"productName": "Trilium Notes",
"description": "Trilium Notes",
"version": "0.41.0-beta",
"version": "0.41.3-beta",
"license": "AGPL-3.0-only",
"main": "electron.js",
"bin": {
@@ -16,18 +16,19 @@
"start-server": "TRILIUM_ENV=dev node ./src/www",
"start-electron": "TRILIUM_ENV=dev electron .",
"build-backend-docs": "./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/backend_api src/entities/*.js src/services/backend_script_api.js",
"build-frontend-docs": "./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/javascripts/entities/*.js src/public/javascripts/services/frontend_script_api.js",
"build-docs": "npm run build-backend-docs && npm run build-frontend-docs"
"build-frontend-docs": "./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js",
"build-docs": "npm run build-backend-docs && npm run build-frontend-docs",
"webpack": "npx webpack -c webpack-desktop.config.js && npx webpack -c webpack-mobile.config.js && npx webpack -c webpack-setup.config.js"
},
"dependencies": {
"async-mutex": "0.1.4",
"async-mutex": "0.2.1",
"axios": "0.19.2",
"body-parser": "1.19.0",
"cls-hooked": "4.2.2",
"commonmark": "0.29.1",
"cookie-parser": "1.4.5",
"csurf": "1.11.0",
"dayjs": "1.8.23",
"dayjs": "1.8.24",
"debug": "4.1.1",
"ejs": "3.0.2",
"electron-debug": "3.0.1",
@@ -50,7 +51,7 @@
"imagemin-pngquant": "8.0.0",
"ini": "1.3.5",
"is-svg": "4.2.1",
"jimp": "0.10.0",
"jimp": "0.10.2",
"mime-types": "2.1.26",
"multer": "1.4.2",
"node-abi": "2.15.0",
@@ -61,11 +62,11 @@
"rimraf": "3.0.2",
"sanitize-filename": "1.6.3",
"sax": "1.2.4",
"semver": "7.1.3",
"semver": "7.3.2",
"serve-favicon": "2.5.0",
"session-file-store": "1.4.0",
"simple-node-logger": "18.12.24",
"sqlite": "3.0.6",
"sqlite": "4.0.7",
"sqlite3": "4.1.1",
"string-similarity": "4.0.1",
"tar-stream": "2.1.2",
@@ -77,12 +78,14 @@
"yazl": "^2.5.1"
},
"devDependencies": {
"electron": "9.0.0-beta.12",
"electron": "9.0.0-beta.16",
"electron-builder": "22.4.1",
"electron-packager": "14.2.1",
"electron-rebuild": "1.10.1",
"jsdoc": "3.6.3",
"lorem-ipsum": "2.0.3"
"jsdoc": "3.6.4",
"lorem-ipsum": "2.0.3",
"webpack": "5.0.0-beta.14",
"webpack-cli": "4.0.0-beta.8"
},
"optionalDependencies": {
"electron-installer-debian": "2.0.1"
+2 -10
View File
@@ -45,11 +45,7 @@ class Attribute extends Entity {
* @returns {Promise<Note|null>}
*/
async getNote() {
if (!this.__note) {
this.__note = await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);
}
return this.__note;
return await repository.getNote(this.noteId);
}
/**
@@ -64,11 +60,7 @@ class Attribute extends Entity {
return null;
}
if (!this.__targetNote) {
this.__targetNote = await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.value]);
}
return this.__targetNote;
return await repository.getNote(this.value);
}
/**
+7 -2
View File
@@ -28,9 +28,14 @@ class Branch extends Entity {
// notePosition is not part of hash because it would produce a lot of updates in case of reordering
static get hashedProperties() { return ["branchId", "noteId", "parentNoteId", "isDeleted", "deleteId", "prefix"]; }
/** @returns {Note|null} */
/** @returns {Promise<Note|null>} */
async getNote() {
return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);
return await repository.getNote(this.noteId);
}
/** @returns {Promise<Note|null>} */
async getParentNote() {
return await repository.getNote(this.parentNoteId);
}
async beforeSaving() {
+9
View File
@@ -6,6 +6,7 @@ const RecentNote = require('../entities/recent_note');
const ApiToken = require('../entities/api_token');
const Option = require('../entities/option');
const repository = require('../services/repository');
const cls = require('../services/cls');
const ENTITY_NAME_TO_ENTITY = {
"attributes": Attribute,
@@ -32,9 +33,13 @@ function createEntityFromRow(row) {
if (row.attributeId) {
entity = new Attribute(row);
cls.setEntityToCache('attributes', row.attributeId, entity);
}
else if (row.noteRevisionId) {
entity = new NoteRevision(row);
cls.setEntityToCache('note_revisions', row.noteRevisionId, entity);
}
else if (row.branchId && row.notePath) {
entity = new RecentNote(row);
@@ -44,9 +49,13 @@ function createEntityFromRow(row) {
}
else if (row.branchId) {
entity = new Branch(row);
cls.setEntityToCache('branches', row.branchId, entity);
}
else if (row.noteId) {
entity = new Note(row);
cls.setEntityToCache('notes', row.noteId, entity);
}
else if (row.name) {
entity = new Option(row);
+3 -5
View File
@@ -811,11 +811,9 @@ class Note extends Entity {
SELECT *
FROM attributes
WHERE noteId = ? AND
isDeleted = 0 AND
((type = 'relation' AND
name IN ('internalLink', 'imageLink', 'relationMapLink', 'includeNoteLink'))
OR
(type = 'label' AND name = 'externalLink'))`, [this.noteId]);
isDeleted = 0 AND
type = 'relation' AND
name IN ('internalLink', 'imageLink', 'relationMapLink', 'includeNoteLink')`, [this.noteId]);
}
/**
+1 -1
View File
@@ -48,7 +48,7 @@ class NoteRevision extends Entity {
}
async getNote() {
return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);
return await repository.getNote(this.noteId);
}
/** @returns {boolean} true if the note has string content (not binary) */
@@ -1,76 +1,17 @@
import glob from './services/glob.js';
import link from './services/link.js';
import ws from './services/ws.js';
import noteType from './widgets/note_type.js';
import protectedSessionService from './services/protected_session.js';
import protectedSessionHolder from './services/protected_session_holder.js';
import FrontendScriptApi from './services/frontend_script_api.js';
import ScriptContext from './services/script_context.js';
import sync from './services/sync.js';
import treeService from './services/tree.js';
import branchService from './services/branches.js';
import appContext from "./services/app_context.js";
import utils from './services/utils.js';
import server from './services/server.js';
import Entrypoints from './services/entrypoints.js';
import noteTooltipService from './services/note_tooltip.js';
import bundle from "./services/bundle.js";
import treeCache from "./services/tree_cache.js";
import libraryLoader from "./services/library_loader.js";
import hoistedNoteService from './services/hoisted_note.js';
import noteTypeService from './widgets/note_type.js';
import linkService from './services/link.js';
import bundleService from "./services/bundle.js";
import noteAutocompleteService from './services/note_autocomplete.js';
import macInit from './services/mac_init.js';
import dateNoteService from './services/date_notes.js';
import importService from './services/import.js';
import keyboardActionService from "./services/keyboard_actions.js";
import splitService from "./services/split.js";
import options from "./services/options.js";
import noteContentRenderer from "./services/note_content_renderer.js";
import appContext from "./services/app_context.js";
import FlexContainer from "./widgets/flex_container.js";
import GlobalMenuWidget from "./widgets/global_menu.js";
import TabRowWidget from "./widgets/tab_row.js";
import TitleBarButtonsWidget from "./widgets/title_bar_buttons.js";
import StandardTopWidget from "./widgets/standard_top_widget.js";
import SidePaneContainer from "./widgets/side_pane_container.js";
import GlobalButtonsWidget from "./widgets/global_buttons.js";
import SearchBoxWidget from "./widgets/search_box.js";
import SearchResultsWidget from "./widgets/search_results.js";
import NoteTreeWidget from "./widgets/note_tree.js";
import TabCachingWidget from "./widgets/tab_caching_widget.js";
import NotePathsWidget from "./widgets/note_paths.js";
import NoteTitleWidget from "./widgets/note_title.js";
import RunScriptButtonsWidget from "./widgets/run_script_buttons.js";
import ProtectedNoteSwitchWidget from "./widgets/protected_note_switch.js";
import NoteTypeWidget from "./widgets/note_type.js";
import NoteActionsWidget from "./widgets/note_actions.js";
import PromotedAttributesWidget from "./widgets/promoted_attributes.js";
import NoteDetailWidget from "./widgets/note_detail.js";
import NoteInfoWidget from "./widgets/note_info.js";
import CalendarWidget from "./widgets/calendar.js";
import AttributesWidget from "./widgets/attributes.js";
import LinkMapWidget from "./widgets/link_map.js";
import NoteRevisionsWidget from "./widgets/note_revisions.js";
import SimilarNotesWidget from "./widgets/similar_notes.js";
import WhatLinksHereWidget from "./widgets/what_links_here.js";
import SidePaneToggles from "./widgets/side_pane_toggles.js";
import EmptyTypeWidget from "./widgets/type_widgets/empty.js";
import TextTypeWidget from "./widgets/type_widgets/text.js";
import CodeTypeWidget from "./widgets/type_widgets/code.js";
import FileTypeWidget from "./widgets/type_widgets/file.js";
import ImageTypeWidget from "./widgets/type_widgets/image.js";
import SearchTypeWidget from "./widgets/type_widgets/search.js";
import RenderTypeWidget from "./widgets/type_widgets/render.js";
import RelationMapTypeWidget from "./widgets/type_widgets/relation_map.js";
import ProtectedSessionTypeWidget from "./widgets/type_widgets/protected_session.js";
import BookTypeWidget from "./widgets/type_widgets/book.js";
import contextMenu from "./services/context_menu.js";
import DesktopLayout from "./widgets/desktop_layout.js";
import bundleService from "./services/bundle.js";
import glob from "./services/glob.js";
glob.setupGlobs();
if (utils.isElectron()) {
require('electron').ipcRenderer.on('globalShortcut', async function(event, actionName) {
utils.dynamicRequire('electron').ipcRenderer.on('globalShortcut', async function(event, actionName) {
appContext.triggerCommand(actionName);
});
}
@@ -93,7 +34,7 @@ noteTooltipService.setupGlobalTooltip();
noteAutocompleteService.init();
if (utils.isElectron()) {
const electron = require('electron');
const electron = utils.dynamicRequire('electron');
const {webContents} = electron.remote.getCurrentWindow();
webContents.on('context-menu', (event, params) => {
@@ -20,6 +20,14 @@ export async function showDialog(widget) {
updateTitleFormGroupVisibility();
$addLinkTitleSettings.find('input[type=radio]').on('change', updateTitleFormGroupVisibility);
// with selection hyper link is implied
if (textTypeWidget.hasSelection()) {
$addLinkTitleSettings.find("input[value='hyper-link']").prop("checked", true);
}
else {
$addLinkTitleSettings.find("input[value='reference-link']").prop("checked", true);
}
utils.openDialog($dialog);
$autoComplete.val('').trigger('focus');
@@ -25,13 +25,15 @@ async function includeNote(notePath) {
const noteId = treeService.getNoteIdFromNotePath(notePath);
const note = await treeCache.getNote(noteId);
const boxSize = $("input[name='include-note-box-size']:checked").val();
if (note.type === 'image') {
// there's no benefit to use insert note functionlity for images
// so we'll just add an IMG tag
textTypeWidget.addImage(noteId);
}
else {
textTypeWidget.addIncludeNote(noteId);
textTypeWidget.addIncludeNote(noteId, boxSize);
}
}
@@ -34,7 +34,7 @@ export async function importMarkdownInline() {
}
if (utils.isElectron()) {
const {clipboard} = require('electron');
const {clipboard} = utils.dynamicRequire('electron');
const text = clipboard.readText();
convertMarkdownToHtml(text);
@@ -27,6 +27,15 @@ class Attribute {
return await this.treeCache.getNote(this.noteId);
}
get jsonValue() {
try {
return JSON.parse(this.value);
}
catch (e) {
return null;
}
}
get toString() {
return `Attribute(attributeId=${this.attributeId}, type=${this.type}, name=${this.name}, value=${this.value})`;
}
+8
View File
@@ -0,0 +1,8 @@
import appContext from "./services/app_context.js";
import MobileLayout from "./widgets/mobile_layout.js";
import glob from "./services/glob.js";
glob.setupGlobs();
appContext.setLayout(new MobileLayout());
appContext.start();
@@ -20,11 +20,15 @@ class AppContext extends Component {
async start() {
await Promise.all([treeCache.initializedPromise, options.initializedPromise]);
$("#loading-indicator").hide();
this.showWidgets();
this.tabManager.loadTabs();
setTimeout(() => bundleService.executeStartupBundles(), 2000);
if (utils.isDesktop()) {
setTimeout(() => bundleService.executeStartupBundles(), 2000);
}
}
showWidgets() {
@@ -1,8 +1,6 @@
import utils from "./utils.js";
import treeService from "./tree.js";
import dateNoteService from "./date_notes.js";
import hoistedNoteService from "./hoisted_note.js";
import treeCache from "./tree_cache.js";
import server from "./server.js";
import appContext from "./app_context.js";
import Component from "../widgets/component.js";
@@ -36,7 +34,7 @@ export default class Entrypoints extends Component {
openDevToolsCommand() {
if (utils.isElectron()) {
require('electron').remote.getCurrentWindow().toggleDevTools();
utils.dynamicRequire('electron').remote.getCurrentWindow().toggleDevTools();
}
}
@@ -45,8 +43,8 @@ export default class Entrypoints extends Component {
return;
}
const {remote} = require('electron');
const {FindInPage} = require('electron-find');
const {remote} = utils.dynamicRequire('electron');
const {FindInPage} = utils.dynamicRequire('electron-find');
const findInPage = new FindInPage(remote.getCurrentWebContents(), {
offsetTop: 10,
offsetRight: 10,
@@ -98,7 +96,7 @@ export default class Entrypoints extends Component {
toggleFullscreenCommand() {
if (utils.isElectron()) {
const win = require('electron').remote.getCurrentWindow();
const win = utils.dynamicRequire('electron').remote.getCurrentWindow();
if (win.isFullScreenable()) {
win.setFullScreen(!win.isFullScreen());
@@ -139,7 +137,7 @@ export default class Entrypoints extends Component {
backInNoteHistoryCommand() {
if (utils.isElectron()) {
// standard JS version does not work completely correctly in electron
const webContents = require('electron').remote.getCurrentWebContents();
const webContents = utils.dynamicRequire('electron').remote.getCurrentWebContents();
const activeIndex = parseInt(webContents.getActiveIndex());
webContents.goToIndex(activeIndex - 1);
@@ -152,7 +150,7 @@ export default class Entrypoints extends Component {
forwardInNoteHistoryCommand() {
if (utils.isElectron()) {
// standard JS version does not work completely correctly in electron
const webContents = require('electron').remote.getCurrentWebContents();
const webContents = utils.dynamicRequire('electron').remote.getCurrentWebContents();
const activeIndex = parseInt(webContents.getActiveIndex());
webContents.goToIndex(activeIndex + 1);
@@ -266,12 +266,10 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
this.showError = toastService.showError;
/**
* Refresh tree
*
* @method
* @returns {Promise<void>}
* @deprecated - this is now no-op since all the changes should be gracefully handled per widget
*/
this.refreshTree = treeService.reload;
this.refreshTree = () => {};
/**
* Create note link (jQuery object) for given note.

Some files were not shown because too many files have changed in this diff Show More