mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
Compare commits
344 Commits
v0.61.3-be
...
v0.63.1.1-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bc99fd799 | ||
|
|
f0c3a090a2 | ||
|
|
17e063f01d | ||
|
|
76c9873705 | ||
|
|
2c7b774356 | ||
|
|
390ad6d813 | ||
|
|
77800d073f | ||
|
|
1953c7896f | ||
|
|
dff4f73366 | ||
|
|
cd43752f61 | ||
|
|
23a5cea338 | ||
|
|
e2cb3c0d14 | ||
|
|
d6046efa1b | ||
|
|
ee608fcf46 | ||
|
|
894b08a1b8 | ||
|
|
4e549baedc | ||
|
|
6b6e42e9ba | ||
|
|
0404b78fb8 | ||
|
|
d63d42d87c | ||
|
|
37baa4cd74 | ||
|
|
68e03c434e | ||
|
|
394530921e | ||
|
|
57ccd5a954 | ||
|
|
a28d8843ac | ||
|
|
cb523faaad | ||
|
|
f704cacdee | ||
|
|
8dbc592563 | ||
|
|
439743d2b0 | ||
|
|
a3783131a2 | ||
|
|
33af9a3595 | ||
|
|
30c3c10524 | ||
|
|
df85a5eee4 | ||
|
|
0ac397e7ff | ||
|
|
d243880099 | ||
|
|
2e23c521c3 | ||
|
|
eb761b286f | ||
|
|
d0f6ff5f98 | ||
|
|
c35167f2f5 | ||
|
|
84feaabc52 | ||
|
|
a6036859b8 | ||
|
|
929f7f3114 | ||
|
|
9e914b9016 | ||
|
|
947627d8a0 | ||
|
|
ed00797179 | ||
|
|
93dcce2217 | ||
|
|
686af0c6a1 | ||
|
|
d07f02b95f | ||
|
|
ad74952194 | ||
|
|
10f3df3ed4 | ||
|
|
18e2e6779b | ||
|
|
ed129c307b | ||
|
|
8742e4bfe9 | ||
|
|
3b10bb742b | ||
|
|
1f206a9c24 | ||
|
|
f026646bb5 | ||
|
|
f9bfc8ad86 | ||
|
|
e70539ff48 | ||
|
|
a439be79b3 | ||
|
|
edf2dfe8f9 | ||
|
|
0e4c49ea5b | ||
|
|
52cfd138d1 | ||
|
|
258b97f833 | ||
|
|
837b17d62a | ||
|
|
d82720f62f | ||
|
|
cf99345962 | ||
|
|
9e54496d00 | ||
|
|
8ae6598b8a | ||
|
|
722299dd26 | ||
|
|
e2b1421bf3 | ||
|
|
1f41d39bc7 | ||
|
|
ce39d3b4ce | ||
|
|
ef2ade849b | ||
|
|
88067c071c | ||
|
|
f5018e9820 | ||
|
|
1561f402f0 | ||
|
|
0d7889d212 | ||
|
|
19a10e59e9 | ||
|
|
746abb02d3 | ||
|
|
23351298c8 | ||
|
|
426a8f75aa | ||
|
|
999cf0d9e3 | ||
|
|
0afc41060a | ||
|
|
6e2d76c2b4 | ||
|
|
3abf74a9f3 | ||
|
|
5d52498da1 | ||
|
|
cf068211ff | ||
|
|
0507c46ae9 | ||
|
|
69ed3644f9 | ||
|
|
b0c5894691 | ||
|
|
f10fc7bd7f | ||
|
|
bdbaacaac9 | ||
|
|
2790f52e36 | ||
|
|
6515dd7b23 | ||
|
|
5a38bf78e1 | ||
|
|
4bdb40904f | ||
|
|
e7d98206f9 | ||
|
|
1939375161 | ||
|
|
ec737d02b2 | ||
|
|
927e5ede0c | ||
|
|
3470347523 | ||
|
|
e25c86e947 | ||
|
|
fb1478f2dd | ||
|
|
c8d6f20c3b | ||
|
|
5af1c7756c | ||
|
|
38e6008aa2 | ||
|
|
9a587e8c8c | ||
|
|
30bd216500 | ||
|
|
a3ce5b5d28 | ||
|
|
b17848609b | ||
|
|
e9ece21d20 | ||
|
|
b700f069fe | ||
|
|
40fb6aa168 | ||
|
|
341480e7cf | ||
|
|
bde311fd76 | ||
|
|
f8bc03feaf | ||
|
|
7fc1eb5262 | ||
|
|
531e9d4aff | ||
|
|
e0d4766c2d | ||
|
|
ab4e83771c | ||
|
|
803b6df40c | ||
|
|
1ebdb0f5e1 | ||
|
|
df5951ce46 | ||
|
|
809ffa0c6e | ||
|
|
6dd466ddaf | ||
|
|
a45b801a84 | ||
|
|
f8ade4d0c5 | ||
|
|
889cb1d7b1 | ||
|
|
d3a477b8f2 | ||
|
|
4db042736c | ||
|
|
612e4406b5 | ||
|
|
76f874ef6d | ||
|
|
f37f47ce5b | ||
|
|
45ed436426 | ||
|
|
9314cf87c5 | ||
|
|
0efc42081d | ||
|
|
7d80fe19e0 | ||
|
|
de8c351e25 | ||
|
|
695c9d5cf3 | ||
|
|
8690228d98 | ||
|
|
01093d05d7 | ||
|
|
690caf7da1 | ||
|
|
a9b63111ae | ||
|
|
eb0a68d0ab | ||
|
|
48e98b2ac3 | ||
|
|
ed1a731950 | ||
|
|
4660c154e9 | ||
|
|
ef974ab1f5 | ||
|
|
bacae67374 | ||
|
|
cc20d17bd2 | ||
|
|
494b240015 | ||
|
|
1cd391a132 | ||
|
|
1c15527d95 | ||
|
|
7af79ec33b | ||
|
|
4294c043d8 | ||
|
|
e5b925abf8 | ||
|
|
90c0a4a437 | ||
|
|
692f7868bc | ||
|
|
5282af55f6 | ||
|
|
aefc4c6bd2 | ||
|
|
b39ba76505 | ||
|
|
9d918e7a54 | ||
|
|
4773f9392b | ||
|
|
5c10fc26be | ||
|
|
38db7f9db7 | ||
|
|
5163e50e7d | ||
|
|
5115b33446 | ||
|
|
b01fe5ead9 | ||
|
|
b1d4a258a1 | ||
|
|
ca041bb658 | ||
|
|
52244ddc99 | ||
|
|
87a60e325f | ||
|
|
0a172d8bc1 | ||
|
|
67a12d3c4d | ||
|
|
5b2ba3646d | ||
|
|
148bff9f77 | ||
|
|
2132cf3bdc | ||
|
|
d5271c17e3 | ||
|
|
b764761e58 | ||
|
|
c666fc3b98 | ||
|
|
ba34df2e15 | ||
|
|
840ac2d63e | ||
|
|
5dd4586ebe | ||
|
|
bd7fa16e96 | ||
|
|
846ac9305e | ||
|
|
db8014c0ef | ||
|
|
a3540772dd | ||
|
|
137703ada4 | ||
|
|
ec6b8476f9 | ||
|
|
d09d3f5a96 | ||
|
|
3d15aeae58 | ||
|
|
9765892d18 | ||
|
|
00f5924251 | ||
|
|
99d0f22403 | ||
|
|
78f8a37587 | ||
|
|
86d62866f2 | ||
|
|
1dc3fafcbf | ||
|
|
7f06952d9e | ||
|
|
78b6614eea | ||
|
|
9665e872c2 | ||
|
|
9db0a062ed | ||
|
|
055bb39e4d | ||
|
|
1261a06a30 | ||
|
|
91eb3c45d5 | ||
|
|
3944235592 | ||
|
|
5be61e6142 | ||
|
|
62ccf798ee | ||
|
|
d259931bd2 | ||
|
|
7729aad1e9 | ||
|
|
70d6bd0157 | ||
|
|
e5555beea9 | ||
|
|
9767b6269a | ||
|
|
7e486fda06 | ||
|
|
9f726304aa | ||
|
|
614cc4dd82 | ||
|
|
3e8f09d306 | ||
|
|
613b83e638 | ||
|
|
4ac609ff57 | ||
|
|
c14ce2c428 | ||
|
|
984bd726e9 | ||
|
|
964abf390b | ||
|
|
af24758ad4 | ||
|
|
528d94a8fb | ||
|
|
be918628c3 | ||
|
|
602b9ae64a | ||
|
|
602a166e36 | ||
|
|
2e69cc8331 | ||
|
|
aaad858395 | ||
|
|
b266c327e4 | ||
|
|
149462e3ab | ||
|
|
237d309406 | ||
|
|
48248224f8 | ||
|
|
79e5e3b65f | ||
|
|
d0383f3044 | ||
|
|
62ecd1ad76 | ||
|
|
75b7706c2c | ||
|
|
584b176643 | ||
|
|
a16555bbff | ||
|
|
a749e24147 | ||
|
|
bb81f110dd | ||
|
|
5dd6f49104 | ||
|
|
bc6be44b19 | ||
|
|
8075265753 | ||
|
|
9d69024758 | ||
|
|
40ca949890 | ||
|
|
035113db4d | ||
|
|
4a67f63abd | ||
|
|
d9666210f1 | ||
|
|
925bba134e | ||
|
|
d46801ff1f | ||
|
|
7848c7e319 | ||
|
|
65e53741e7 | ||
|
|
a83e8ff91a | ||
|
|
542e2579df | ||
|
|
81d64e020e | ||
|
|
9413cd2296 | ||
|
|
5b85713bf3 | ||
|
|
15254e2dfc | ||
|
|
5f6d562bf8 | ||
|
|
f37dc66074 | ||
|
|
c881b39860 | ||
|
|
0b84524807 | ||
|
|
5218f7b7a6 | ||
|
|
8062bb7e2a | ||
|
|
806062c8d1 | ||
|
|
83f19c0537 | ||
|
|
0424728012 | ||
|
|
3a83d58b25 | ||
|
|
6fa9d996e8 | ||
|
|
1ea3d238e0 | ||
|
|
eb273b7dbb | ||
|
|
55374ac4d9 | ||
|
|
8070c00b5f | ||
|
|
da8025f1e4 | ||
|
|
d2263c68f8 | ||
|
|
92e43bc051 | ||
|
|
40971afe4f | ||
|
|
90fc4b8293 | ||
|
|
97d8b19868 | ||
|
|
2bc7da91a6 | ||
|
|
2b4cbb5f6b | ||
|
|
72b2a6ecb6 | ||
|
|
7b662b04ff | ||
|
|
f8e4a665bd | ||
|
|
f9a27dd90c | ||
|
|
641985737f | ||
|
|
121e4ba2ea | ||
|
|
01474ecd2d | ||
|
|
82e4e28e7b | ||
|
|
06eb522a8c | ||
|
|
21098be307 | ||
|
|
886ee0dbcb | ||
|
|
6f7fbacca1 | ||
|
|
f5ddabc042 | ||
|
|
8da5b90aea | ||
|
|
23848526c0 | ||
|
|
e7d57bc08f | ||
|
|
041758766a | ||
|
|
69980c798b | ||
|
|
4de6a803e9 | ||
|
|
748c5064b5 | ||
|
|
c6e8966ecd | ||
|
|
8c247ba7c6 | ||
|
|
52b5711ecd | ||
|
|
58fe3a62af | ||
|
|
af4d0c3ba6 | ||
|
|
4bba0aa842 | ||
|
|
ae9af8ea23 | ||
|
|
eea29aba0e | ||
|
|
abbd0b50eb | ||
|
|
739ab28763 | ||
|
|
c551eae651 | ||
|
|
d5aea26960 | ||
|
|
d3730ac1a9 | ||
|
|
f2a510e4c5 | ||
|
|
4717242dc7 | ||
|
|
b5ef09e779 | ||
|
|
d706b3a447 | ||
|
|
6c96cca3a5 | ||
|
|
c1865f8564 | ||
|
|
515c5411a6 | ||
|
|
3f7a5504c7 | ||
|
|
8c7c37cf98 | ||
|
|
d93e00adce | ||
|
|
0e16e48db6 | ||
|
|
c0f48c0e99 | ||
|
|
abedf2bba4 | ||
|
|
bb0137b2fd | ||
|
|
6c54c7d17d | ||
|
|
cd95adcecb | ||
|
|
90255ac55b | ||
|
|
e741c2826c | ||
|
|
026992db78 | ||
|
|
33780c1e17 | ||
|
|
ede9c43f67 | ||
|
|
5c12ac4eee | ||
|
|
522518cf0d | ||
|
|
1d869d25c2 | ||
|
|
a9cdd93cb4 | ||
|
|
4240da349d | ||
|
|
c257bc07a8 | ||
|
|
00eaa16985 | ||
|
|
fefb059564 | ||
|
|
9166765ced | ||
|
|
6ae7661603 |
@@ -75,7 +75,6 @@ module.exports = {
|
|||||||
glob: true,
|
glob: true,
|
||||||
log: true,
|
log: true,
|
||||||
EditorWatchdog: true,
|
EditorWatchdog: true,
|
||||||
// \src\share\canvas_share.js
|
|
||||||
React: true,
|
React: true,
|
||||||
appState: true,
|
appState: true,
|
||||||
ExcalidrawLib: true,
|
ExcalidrawLib: true,
|
||||||
@@ -110,7 +109,9 @@ module.exports = {
|
|||||||
// src\public\app\services\utils.js
|
// src\public\app\services\utils.js
|
||||||
logInfo: true,
|
logInfo: true,
|
||||||
__non_webpack_require__: true,
|
__non_webpack_require__: true,
|
||||||
//
|
describe: true,
|
||||||
|
it: true,
|
||||||
|
expect: true
|
||||||
},
|
},
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: 'latest',
|
ecmaVersion: 'latest',
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -11,5 +11,6 @@ cert.crt
|
|||||||
server-package.json
|
server-package.json
|
||||||
.idea/httpRequests/
|
.idea/httpRequests/
|
||||||
data/
|
data/
|
||||||
|
data-test/
|
||||||
tmp/
|
tmp/
|
||||||
.eslintcache
|
.eslintcache
|
||||||
@@ -2,7 +2,7 @@ image:
|
|||||||
file: .gitpod.dockerfile
|
file: .gitpod.dockerfile
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- before: nvm install 18.16.1 && nvm use 18.16.1
|
- before: nvm install 18.18.2 && nvm use 18.18.2
|
||||||
init: npm install
|
init: npm install
|
||||||
command: npm run start-server
|
command: npm run start-server
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
//https://prettier.io/docs/en/options.html
|
//https://prettier.io/docs/en/options.html
|
||||||
module.exports = {
|
module.exports = {
|
||||||
semi: true,
|
semi: true,
|
||||||
trailingComma: 'es5',
|
trailingComma: 'none',
|
||||||
singleQuote: true,
|
singleQuote: true,
|
||||||
printWidth: 120,
|
printWidth: 100,
|
||||||
tabWidth: 4,
|
tabWidth: 4,
|
||||||
// useTabs: false,
|
useTabs: false,
|
||||||
// bracketSpacing: true,
|
quoteProps: "as-needed",
|
||||||
|
bracketSpacing: true,
|
||||||
|
arrowParens: "avoid"
|
||||||
// htmlWhitespaceSensitivity: 'ignore',
|
// htmlWhitespaceSensitivity: 'ignore',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!
|
# !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!
|
||||||
FROM node:18.16.1-alpine
|
FROM node:18.18.2-alpine
|
||||||
|
|
||||||
# Create app directory
|
# Create app directory
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|||||||
4
LICENSE
4
LICENSE
@@ -643,7 +643,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||||||
GNU Affero General Public License for more details.
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.js.gnu.org/licenses/>.
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
@@ -658,4 +658,4 @@ specific requirements.
|
|||||||
You should also get your employer (if you work as a programmer) or school,
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||||
<http://www.gnu.org/licenses/>.
|
<http://www.js.gnu.org/licenses/>.
|
||||||
|
|||||||
@@ -5,18 +5,3 @@ echo "Packaging debian x64 distribution..."
|
|||||||
VERSION=`jq -r ".version" package.json`
|
VERSION=`jq -r ".version" package.json`
|
||||||
|
|
||||||
./node_modules/.bin/electron-installer-debian --config bin/deb-options.json --options.version=${VERSION} --arch amd64
|
./node_modules/.bin/electron-installer-debian --config bin/deb-options.json --options.version=${VERSION} --arch amd64
|
||||||
|
|
||||||
|
|
||||||
# hacky stop-gag measure to produce debian compatible XZ compressed debs until this is fixed: https://github.com/electron-userland/electron-installer-debian/issues/272
|
|
||||||
cd dist
|
|
||||||
ar x trilium_${VERSION}_amd64.deb
|
|
||||||
rm trilium_${VERSION}_amd64.deb
|
|
||||||
# recompress
|
|
||||||
< control.tar.zst zstd -d | xz > control.tar.xz
|
|
||||||
< data.tar.zst zstd -d | xz > data.tar.xz
|
|
||||||
# create deb archive (I really do not know, what argument "sdsd" is for but something is required for ar to create the archive as desired)
|
|
||||||
ar -m -c -a sdsd trilium_${VERSION}_amd64.deb debian-binary control.tar.xz data.tar.xz
|
|
||||||
|
|
||||||
rm control* data* debian-binary
|
|
||||||
|
|
||||||
echo "Converted to XZ deb"
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
PKG_DIR=dist/trilium-linux-x64-server
|
PKG_DIR=dist/trilium-linux-x64-server
|
||||||
NODE_VERSION=18.16.1
|
NODE_VERSION=18.18.2
|
||||||
|
|
||||||
if [ "$1" != "DONTCOPY" ]
|
if [ "$1" != "DONTCOPY" ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ if [[ $# -eq 0 ]] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
n exec 18.16.1 npm run webpack
|
n exec 18.18.2 npm run webpack
|
||||||
|
|
||||||
DIR=$1
|
DIR=$1
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ cp -r electron.js $DIR/
|
|||||||
cp webpack-* $DIR/
|
cp webpack-* $DIR/
|
||||||
|
|
||||||
# run in subshell (so we return to original dir)
|
# run in subshell (so we return to original dir)
|
||||||
(cd $DIR && n exec 18.16.1 npm install --only=prod)
|
(cd $DIR && n exec 18.18.2 npm install --only=prod)
|
||||||
|
|
||||||
# cleanup of useless files in dependencies
|
# cleanup of useless files in dependencies
|
||||||
rm -r $DIR/node_modules/image-q/demo
|
rm -r $DIR/node_modules/image-q/demo
|
||||||
|
|||||||
2
bin/create-anonymization-script.js
Normal file → Executable file
2
bin/create-anonymization-script.js
Normal file → Executable file
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const anonymizationService = require('../src/services/anonymization');
|
const anonymizationService = require('../src/services/anonymization.js');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"src": "dist/trilium-linux-x64",
|
"src": "dist/trilium-linux-x64",
|
||||||
"dest": "dist/",
|
"dest": "dist/",
|
||||||
|
"compression": "xz",
|
||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"productName": "Trilium Notes",
|
"productName": "Trilium Notes",
|
||||||
"genericName": "Note taker",
|
"genericName": "Note taker",
|
||||||
|
|||||||
@@ -1,160 +1,45 @@
|
|||||||
|
|
||||||
UPDATE etapi_tokens SET tokenHash = 'API token hash value';
|
UPDATE etapi_tokens SET tokenHash = 'API token hash value';
|
||||||
UPDATE notes SET title = 'title' WHERE noteId != 'root' AND noteId NOT LIKE '\_%' ESCAPE '\';
|
UPDATE notes SET title = 'title'
|
||||||
|
WHERE noteId NOT IN ('root', '_hidden', '_share')
|
||||||
|
AND SUBSTR(noteId, 1, 8) != '_options'
|
||||||
|
AND SUBSTR(noteId, 1, 3) != '_lb';
|
||||||
UPDATE blobs SET content = 'text' WHERE content IS NOT NULL;
|
UPDATE blobs SET content = 'text' WHERE content IS NOT NULL;
|
||||||
UPDATE revisions SET title = 'title';
|
UPDATE revisions SET title = 'title';
|
||||||
|
|
||||||
UPDATE attributes SET name = 'name', value = 'value'
|
UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label'
|
||||||
WHERE type = 'label'
|
AND name NOT IN
|
||||||
AND name NOT IN ('inbox',
|
('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss',
|
||||||
'disableVersioning',
|
'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'cssClass', 'iconClass',
|
||||||
'calendarRoot',
|
'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider',
|
||||||
'archived',
|
'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
|
||||||
'excludeFromExport',
|
'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
|
||||||
'disableInclusion',
|
'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
|
||||||
'appCss',
|
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId',
|
||||||
'appTheme',
|
'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
|
||||||
'hidePromotedAttributes',
|
'fullContentWidth', 'shareHiddenFromTree', 'shareExternalLink', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
|
||||||
'readOnly',
|
'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',
|
||||||
'autoReadOnlyDisabled',
|
'template', 'toc', 'color', 'keepCurrentHoisting', 'executeButton', 'executeDescription', 'newNotesOnTop',
|
||||||
'cssClass',
|
'clipperInbox', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation',
|
||||||
'iconClass',
|
'runOnNoteTitleChange', 'runOnNoteChange', 'runOnNoteContentChange', 'runOnNoteDeletion', 'runOnBranchCreation', 'runOnBranchChange',
|
||||||
'keyboardShortcut',
|
'runOnBranchDeletion', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template',
|
||||||
'run',
|
'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareTemplate', 'shareFavicon');
|
||||||
'runOnInstance',
|
UPDATE attributes SET name = 'name' WHERE type = 'relation'
|
||||||
'runAtHour',
|
AND name NOT IN
|
||||||
'customRequestHandler',
|
('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss',
|
||||||
'customResourceProvider',
|
'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'cssClass', 'iconClass',
|
||||||
'widget',
|
'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider',
|
||||||
'noteInfoWidgetDisabled',
|
'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
|
||||||
'linkMapWidgetDisabled',
|
'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
|
||||||
'revisionsWidgetDisabled',
|
'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
|
||||||
'whatLinksHereWidgetDisabled',
|
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId',
|
||||||
'similarNotesWidgetDisabled',
|
'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
|
||||||
'workspace',
|
'fullContentWidth', 'shareHiddenFromTree', 'shareExternalLink', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
|
||||||
'workspaceIconClass',
|
'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',
|
||||||
'workspaceTabBackgroundColor',
|
'template', 'toc', 'color', 'keepCurrentHoisting', 'executeButton', 'executeDescription', 'newNotesOnTop',
|
||||||
'searchHome',
|
'clipperInbox', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation',
|
||||||
'workspaceInbox',
|
'runOnNoteTitleChange', 'runOnNoteChange', 'runOnNoteContentChange', 'runOnNoteDeletion', 'runOnBranchCreation', 'runOnBranchChange',
|
||||||
'workspaceSearchHome',
|
'runOnBranchDeletion', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template',
|
||||||
'sqlConsoleHome',
|
'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareTemplate', 'shareFavicon');
|
||||||
'datePattern',
|
|
||||||
'pageSize',
|
|
||||||
'viewType',
|
|
||||||
'mapRootNoteId',
|
|
||||||
'bookmarkFolder',
|
|
||||||
'sorted',
|
|
||||||
'top',
|
|
||||||
'fullContentWidth',
|
|
||||||
'shareHiddenFromTree',
|
|
||||||
'shareAlias',
|
|
||||||
'shareOmitDefaultCss',
|
|
||||||
'shareRoot',
|
|
||||||
'internalLink',
|
|
||||||
'imageLink',
|
|
||||||
'relationMapLink',
|
|
||||||
'includeMapLink',
|
|
||||||
'runOnNoteCreation',
|
|
||||||
'runOnNoteTitleChange',
|
|
||||||
'runOnNoteContentChange',
|
|
||||||
'runOnNoteChange',
|
|
||||||
'runOnChildNoteCreation',
|
|
||||||
'runOnAttributeCreation',
|
|
||||||
'runOnAttributeChange',
|
|
||||||
'template',
|
|
||||||
'inherit',
|
|
||||||
'widget',
|
|
||||||
'renderNote',
|
|
||||||
'shareCss',
|
|
||||||
'shareJs',
|
|
||||||
'shareFavicon',
|
|
||||||
'executeButton',
|
|
||||||
'keepCurrentHoisting',
|
|
||||||
'color',
|
|
||||||
'toc',
|
|
||||||
'excludeFromNoteMap',
|
|
||||||
'docName',
|
|
||||||
'launcherType',
|
|
||||||
'builtinWidget',
|
|
||||||
'baseSize',
|
|
||||||
'growthFactor'
|
|
||||||
);
|
|
||||||
|
|
||||||
UPDATE attributes SET name = 'name'
|
|
||||||
AND name NOT IN ('inbox',
|
|
||||||
'disableVersioning',
|
|
||||||
'calendarRoot',
|
|
||||||
'archived',
|
|
||||||
'excludeFromExport',
|
|
||||||
'disableInclusion',
|
|
||||||
'appCss',
|
|
||||||
'appTheme',
|
|
||||||
'hidePromotedAttributes',
|
|
||||||
'readOnly',
|
|
||||||
'autoReadOnlyDisabled',
|
|
||||||
'cssClass',
|
|
||||||
'iconClass',
|
|
||||||
'keyboardShortcut',
|
|
||||||
'run',
|
|
||||||
'runOnInstance',
|
|
||||||
'runAtHour',
|
|
||||||
'customRequestHandler',
|
|
||||||
'customResourceProvider',
|
|
||||||
'widget',
|
|
||||||
'noteInfoWidgetDisabled',
|
|
||||||
'linkMapWidgetDisabled',
|
|
||||||
'revisionsWidgetDisabled',
|
|
||||||
'whatLinksHereWidgetDisabled',
|
|
||||||
'similarNotesWidgetDisabled',
|
|
||||||
'workspace',
|
|
||||||
'workspaceIconClass',
|
|
||||||
'workspaceTabBackgroundColor',
|
|
||||||
'searchHome',
|
|
||||||
'workspaceInbox',
|
|
||||||
'workspaceSearchHome',
|
|
||||||
'sqlConsoleHome',
|
|
||||||
'datePattern',
|
|
||||||
'pageSize',
|
|
||||||
'viewType',
|
|
||||||
'mapRootNoteId',
|
|
||||||
'bookmarkFolder',
|
|
||||||
'sorted',
|
|
||||||
'top',
|
|
||||||
'fullContentWidth',
|
|
||||||
'shareHiddenFromTree',
|
|
||||||
'shareAlias',
|
|
||||||
'shareOmitDefaultCss',
|
|
||||||
'shareRoot',
|
|
||||||
'internalLink',
|
|
||||||
'imageLink',
|
|
||||||
'relationMapLink',
|
|
||||||
'includeMapLink',
|
|
||||||
'runOnNoteCreation',
|
|
||||||
'runOnNoteTitleChange',
|
|
||||||
'runOnNoteContentChange',
|
|
||||||
'runOnNoteChange',
|
|
||||||
'runOnChildNoteCreation',
|
|
||||||
'runOnAttributeCreation',
|
|
||||||
'runOnAttributeChange',
|
|
||||||
'template',
|
|
||||||
'inherit',
|
|
||||||
'widget',
|
|
||||||
'renderNote',
|
|
||||||
'shareCss',
|
|
||||||
'shareJs',
|
|
||||||
'shareFavicon',
|
|
||||||
'executeButton',
|
|
||||||
'keepCurrentHoisting',
|
|
||||||
'color',
|
|
||||||
'toc',
|
|
||||||
'excludeFromNoteMap',
|
|
||||||
'docName',
|
|
||||||
'launcherType',
|
|
||||||
'builtinWidget',
|
|
||||||
'baseSize',
|
|
||||||
'growthFactor'
|
|
||||||
);
|
|
||||||
|
|
||||||
UPDATE branches SET prefix = 'prefix' WHERE prefix IS NOT NULL AND prefix != 'recovered';
|
UPDATE branches SET prefix = 'prefix' WHERE prefix IS NOT NULL AND prefix != 'recovered';
|
||||||
UPDATE options SET value = 'anonymized' WHERE name IN
|
UPDATE options SET value = 'anonymized' WHERE name IN
|
||||||
('documentId', 'documentSecret', 'encryptedDataKey',
|
('documentId', 'documentSecret', 'encryptedDataKey',
|
||||||
|
|||||||
BIN
db/demo.zip
BIN
db/demo.zip
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
module.exports = () => console.log("NOOP, moved to migration 0189");
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
-- black theme has been removed, dark is closest replacement
|
|
||||||
UPDATE options SET value = 'dark' WHERE name = 'theme' AND value = 'black';
|
|
||||||
|
|
||||||
UPDATE options SET value = 'light' WHERE name = 'theme' AND value = 'white';
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
ALTER TABLE branches DROP COLUMN utcDateCreated;
|
|
||||||
ALTER TABLE options DROP COLUMN utcDateCreated;
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
CREATE TABLE IF NOT EXISTS "mig_entity_changes" (
|
|
||||||
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
||||||
`entityName` TEXT NOT NULL,
|
|
||||||
`entityId` TEXT NOT NULL,
|
|
||||||
`hash` TEXT NOT NULL,
|
|
||||||
`isErased` INT NOT NULL,
|
|
||||||
`changeId` TEXT NOT NULL,
|
|
||||||
`sourceId` TEXT NOT NULL,
|
|
||||||
`isSynced` INTEGER NOT NULL,
|
|
||||||
`utcDateChanged` TEXT NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
INSERT INTO mig_entity_changes (id, entityName, entityId, hash, isErased, changeId, sourceId, isSynced, utcDateChanged)
|
|
||||||
SELECT id, entityName, entityId, hash, isErased, '', sourceId, isSynced, utcDateChanged FROM entity_changes;
|
|
||||||
|
|
||||||
-- delete duplicates https://github.com/zadam/trilium/issues/2534
|
|
||||||
DELETE FROM mig_entity_changes WHERE isErased = 0 AND id IN (
|
|
||||||
SELECT id FROM mig_entity_changes ec
|
|
||||||
WHERE (
|
|
||||||
SELECT COUNT(*) FROM mig_entity_changes
|
|
||||||
WHERE ec.entityName = mig_entity_changes.entityName
|
|
||||||
AND ec.entityId = mig_entity_changes.entityId
|
|
||||||
) > 1
|
|
||||||
);
|
|
||||||
|
|
||||||
DROP TABLE entity_changes;
|
|
||||||
|
|
||||||
ALTER TABLE mig_entity_changes RENAME TO entity_changes;
|
|
||||||
|
|
||||||
CREATE UNIQUE INDEX `IDX_entityChanges_entityName_entityId` ON "entity_changes" (
|
|
||||||
`entityName`,
|
|
||||||
`entityId`
|
|
||||||
);
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
UPDATE branches SET branchId = 'hidden' where branchId = (
|
|
||||||
SELECT branchId FROM branches
|
|
||||||
WHERE parentNoteId = 'root'
|
|
||||||
AND noteId = 'hidden'
|
|
||||||
AND isDeleted = 0
|
|
||||||
ORDER BY utcDateModified
|
|
||||||
LIMIT 1
|
|
||||||
);
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
DELETE FROM options WHERE name = 'username';
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
CREATE TABLE IF NOT EXISTS "etapi_tokens"
|
|
||||||
(
|
|
||||||
etapiTokenId TEXT PRIMARY KEY NOT NULL,
|
|
||||||
name TEXT NOT NULL,
|
|
||||||
tokenHash TEXT NOT NULL,
|
|
||||||
utcDateCreated TEXT NOT NULL,
|
|
||||||
utcDateModified TEXT NOT NULL,
|
|
||||||
isDeleted INT NOT NULL DEFAULT 0);
|
|
||||||
|
|
||||||
INSERT INTO etapi_tokens (etapiTokenId, name, tokenHash, utcDateCreated, utcDateModified, isDeleted)
|
|
||||||
SELECT apiTokenId, 'Trilium Sender', token, utcDateCreated, utcDateCreated, isDeleted FROM api_tokens;
|
|
||||||
|
|
||||||
DROP TABLE api_tokens;
|
|
||||||
|
|
||||||
UPDATE entity_changes SET entityName = 'etapi_tokens' WHERE entityName = 'api_tokens';
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
module.exports = () => {
|
|
||||||
const sql = require('../../src/services/sql');
|
|
||||||
const crypto = require('crypto');
|
|
||||||
|
|
||||||
for (const {etapiTokenId, token} of sql.getRows("SELECT etapiTokenId, tokenHash AS token FROM etapi_tokens")) {
|
|
||||||
const tokenHash = crypto.createHash('sha256').update(token).digest('base64');
|
|
||||||
|
|
||||||
sql.execute(`UPDATE etapi_tokens SET tokenHash = ? WHERE etapiTokenId = ?`, [tokenHash, etapiTokenId]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
DROP TABLE entity_changes;
|
|
||||||
-- not preserving the data because of https://github.com/zadam/trilium/issues/3447
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS "entity_changes" (
|
|
||||||
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
||||||
`entityName` TEXT NOT NULL,
|
|
||||||
`entityId` TEXT NOT NULL,
|
|
||||||
`hash` TEXT NOT NULL,
|
|
||||||
`isErased` INT NOT NULL,
|
|
||||||
`changeId` TEXT NOT NULL,
|
|
||||||
`componentId` TEXT NOT NULL,
|
|
||||||
`instanceId` TEXT NOT NULL,
|
|
||||||
`isSynced` INTEGER NOT NULL,
|
|
||||||
`utcDateChanged` TEXT NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE UNIQUE INDEX `IDX_entityChanges_entityName_entityId` ON "entity_changes" (
|
|
||||||
`entityName`,
|
|
||||||
`entityId`
|
|
||||||
);
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
CREATE INDEX `IDX_entity_changes_changeId` ON `entity_changes` (`changeId`);
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
const becca = require('../../src/becca/becca');
|
|
||||||
const beccaLoader = require('../../src/becca/becca_loader');
|
|
||||||
const cls = require('../../src/services/cls');
|
|
||||||
|
|
||||||
module.exports = () => {
|
|
||||||
cls.init(() => {
|
|
||||||
beccaLoader.load();
|
|
||||||
|
|
||||||
for (const note of Object.values(becca.notes)) {
|
|
||||||
if (note.hasLabel('calendarRoot')) {
|
|
||||||
note.addLabel('excludeFromNoteMap', "", true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- removing potential remnants of recent notes in entity changes, see https://github.com/zadam/trilium/issues/2842
|
|
||||||
DELETE FROM entity_changes WHERE entityName = 'recent_notes';
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
UPDATE attributes SET value = replace(value, 'setLabelValue', 'updateLabelValue') WHERE name = 'action' AND type = 'label';
|
|
||||||
UPDATE attributes SET value = replace(value, 'setRelationTarget', 'updateRelationTarget') WHERE name = 'action' AND type = 'label';
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
module.exports = () => console.log("NOOP, increased because of protected notes IV change");
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
UPDATE branches SET branchId = '_hidden__search' WHERE parentNoteId = 'hidden' AND noteId = 'search' AND isDeleted = 0;
|
|
||||||
UPDATE branches SET branchId = 'root__globalNoteMap' WHERE parentNoteId = 'singles' AND noteId = 'globalnotemap' AND isDeleted = 0;
|
|
||||||
UPDATE branches SET branchId = '_hidden__sqlConsole' WHERE parentNoteId = 'hidden' AND noteId = 'sqlconsole' AND isDeleted = 0;
|
|
||||||
UPDATE branches SET branchId = 'root__hidden' WHERE parentNoteId = 'root' AND noteId = 'hidden' AND isDeleted = 0;
|
|
||||||
UPDATE branches SET branchId = '_hidden__bulkAction' WHERE parentNoteId = 'hidden' AND noteId = 'bulkaction' AND isDeleted = 0;
|
|
||||||
UPDATE branches SET branchId = '_hidden__share' WHERE parentNoteId = 'root' AND noteId = 'share' AND isDeleted = 0;
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
UPDATE notes SET noteId = '_globalNoteMap', title = 'Note Map' WHERE noteId = 'globalnotemap';
|
|
||||||
UPDATE note_contents SET noteId = '_globalNoteMap' WHERE noteId = 'globalnotemap';
|
|
||||||
UPDATE note_revisions SET noteId = '_globalNoteMap' WHERE noteId = 'globalnotemap';
|
|
||||||
UPDATE branches SET noteId = '_globalNoteMap' WHERE noteId = 'globalnotemap';
|
|
||||||
UPDATE branches SET parentNoteId = '_globalNoteMap' WHERE parentNoteId = 'globalnotemap';
|
|
||||||
UPDATE attributes SET noteId = '_globalNoteMap' WHERE noteId = 'globalnotemap';
|
|
||||||
UPDATE attributes SET value = '_globalNoteMap' WHERE type = 'relation' AND value = 'globalnotemap';
|
|
||||||
UPDATE entity_changes SET entityId = '_globalNoteMap' WHERE entityId = 'globalnotemap';
|
|
||||||
|
|
||||||
UPDATE notes SET noteId = '_bulkAction', title = 'Bulk Action' WHERE noteId = 'bulkaction';
|
|
||||||
UPDATE note_contents SET noteId = '_bulkAction' WHERE noteId = 'bulkaction';
|
|
||||||
UPDATE note_revisions SET noteId = '_bulkAction' WHERE noteId = 'bulkaction';
|
|
||||||
UPDATE branches SET parentNoteId = '_bulkAction' WHERE parentNoteId = 'bulkaction';
|
|
||||||
UPDATE branches SET noteId = '_bulkAction' WHERE noteId = 'bulkaction';
|
|
||||||
UPDATE attributes SET noteId = '_bulkAction' WHERE noteId = 'bulkaction';
|
|
||||||
UPDATE attributes SET value = '_bulkAction' WHERE type = 'relation' AND value = 'bulkaction';
|
|
||||||
UPDATE entity_changes SET entityId = '_bulkAction' WHERE entityId = 'bulkaction';
|
|
||||||
|
|
||||||
UPDATE notes SET noteId = '_sqlConsole', title = 'SQL Console History' WHERE noteId = 'sqlconsole';
|
|
||||||
UPDATE note_contents SET noteId = '_sqlConsole' WHERE noteId = 'sqlconsole';
|
|
||||||
UPDATE note_revisions SET noteId = '_sqlConsole' WHERE noteId = 'sqlconsole';
|
|
||||||
UPDATE branches SET noteId = '_sqlConsole' WHERE noteId = 'sqlconsole';
|
|
||||||
UPDATE branches SET parentNoteId = '_sqlConsole' WHERE parentNoteId = 'sqlconsole';
|
|
||||||
UPDATE attributes SET noteId = '_sqlConsole' WHERE noteId = 'sqlconsole';
|
|
||||||
UPDATE attributes SET value = '_sqlConsole' WHERE type = 'relation' AND value = 'sqlconsole';
|
|
||||||
UPDATE entity_changes SET entityId = '_sqlConsole' WHERE entityId = 'sqlconsole';
|
|
||||||
|
|
||||||
UPDATE notes SET noteId = '_hidden', title = 'Hidden Notes' WHERE noteId = 'hidden';
|
|
||||||
UPDATE note_contents SET noteId = '_hidden' WHERE noteId = 'hidden';
|
|
||||||
UPDATE note_revisions SET noteId = '_hidden' WHERE noteId = 'hidden';
|
|
||||||
UPDATE branches SET noteId = '_hidden', prefix = NULL WHERE noteId = 'hidden';
|
|
||||||
UPDATE branches SET parentNoteId = '_hidden' WHERE parentNoteId = 'hidden';
|
|
||||||
UPDATE attributes SET noteId = '_hidden' WHERE noteId = 'hidden';
|
|
||||||
UPDATE attributes SET value = '_hidden' WHERE type = 'relation' AND value = 'hidden';
|
|
||||||
UPDATE entity_changes SET entityId = '_hidden' WHERE entityId = 'hidden';
|
|
||||||
|
|
||||||
UPDATE notes SET noteId = '_search', title = 'Search History' WHERE noteId = 'search';
|
|
||||||
UPDATE note_contents SET noteId = '_search' WHERE noteId = 'search';
|
|
||||||
UPDATE note_revisions SET noteId = '_search' WHERE noteId = 'search';
|
|
||||||
UPDATE branches SET noteId = '_search' WHERE noteId = 'search';
|
|
||||||
UPDATE branches SET parentNoteId = '_search' WHERE parentNoteId = 'search';
|
|
||||||
UPDATE attributes SET noteId = '_search' WHERE noteId = 'search';
|
|
||||||
UPDATE attributes SET value = '_search' WHERE type = 'relation' AND value = 'search';
|
|
||||||
UPDATE entity_changes SET entityId = '_search' WHERE entityId = 'search';
|
|
||||||
|
|
||||||
UPDATE notes SET noteId = '_share', title = 'Shared Notes' WHERE noteId = 'share';
|
|
||||||
UPDATE note_contents SET noteId = '_share' WHERE noteId = 'share';
|
|
||||||
UPDATE note_revisions SET noteId = '_share' WHERE noteId = 'share';
|
|
||||||
UPDATE branches SET noteId = '_share' WHERE noteId = 'share';
|
|
||||||
UPDATE branches SET parentNoteId = '_share' WHERE parentNoteId = 'share';
|
|
||||||
UPDATE attributes SET noteId = '_share' WHERE noteId = 'share';
|
|
||||||
UPDATE attributes SET value = '_share' WHERE type = 'relation' AND value = 'share';
|
|
||||||
UPDATE entity_changes SET entityId = '_share' WHERE entityId = 'share';
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
module.exports = () => {
|
|
||||||
const hiddenSubtreeService = require('../../src/services/hidden_subtree');
|
|
||||||
const cls = require("../../src/services/cls");
|
|
||||||
const beccaLoader = require("../../src/becca/becca_loader");
|
|
||||||
|
|
||||||
cls.init(() => {
|
|
||||||
beccaLoader.load();
|
|
||||||
// make sure the hidden subtree exists since the subsequent migrations we will move some existing notes into it (share...)
|
|
||||||
// in previous releases hidden subtree was created lazily
|
|
||||||
hiddenSubtreeService.checkHiddenSubtree(true);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
DELETE FROM branches WHERE noteId = '_share' AND parentNoteId != 'root' AND parentNoteId != '_hidden'; -- delete all other branches of _share if any
|
|
||||||
UPDATE branches SET parentNoteId = '_hidden' WHERE noteId = '_share';
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
DELETE FROM branches WHERE noteId = '_globalNoteMap' AND parentNoteId != 'singles' AND parentNoteId != '_hidden'; -- make sure there are no clones which would fail at the next line
|
|
||||||
UPDATE branches SET parentNoteId = '_hidden' WHERE noteId = '_globalNoteMap';
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
DELETE FROM branches WHERE noteId = 'singles';
|
|
||||||
DELETE FROM notes WHERE noteId = 'singles';
|
|
||||||
DELETE FROM note_contents WHERE noteId = 'singles';
|
|
||||||
DELETE FROM note_revisions WHERE noteId = 'singles';
|
|
||||||
DELETE FROM attributes WHERE noteId = 'singles';
|
|
||||||
DELETE FROM entity_changes WHERE entityId = 'singles';
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
module.exports = () => {
|
|
||||||
const cls = require("../../src/services/cls");
|
|
||||||
const cloningService = require("../../src/services/cloning");
|
|
||||||
const beccaLoader = require("../../src/becca/becca_loader");
|
|
||||||
const becca = require("../../src/becca/becca");
|
|
||||||
|
|
||||||
cls.init(() => {
|
|
||||||
beccaLoader.load();
|
|
||||||
|
|
||||||
for (const attr of becca.findAttributes('label','bookmarked')) {
|
|
||||||
cloningService.toggleNoteInParent(true, attr.noteId, '_lbBookmarks');
|
|
||||||
|
|
||||||
attr.markAsDeleted("0204__migrate_bookmarks_to_clones");
|
|
||||||
}
|
|
||||||
|
|
||||||
// bookmarkFolder used to work in 0.57 without the bookmarked label
|
|
||||||
for (const attr of becca.findAttributes('label','bookmarkFolder')) {
|
|
||||||
cloningService.toggleNoteInParent(true, attr.noteId, '_lbBookmarks');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
UPDATE notes SET type = 'relationMap' WHERE type = 'relation-map';
|
|
||||||
UPDATE notes SET type = 'noteMap' WHERE type = 'note-map';
|
|
||||||
UPDATE notes SET type = 'webView' WHERE type = 'web-view';
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
// the history was previously not exposed and the fact they were not cleaned up is rather a side-effect than an intention
|
|
||||||
|
|
||||||
module.exports = () => {
|
|
||||||
const cls = require("../../src/services/cls");
|
|
||||||
const beccaLoader = require("../../src/becca/becca_loader");
|
|
||||||
const becca = require("../../src/becca/becca");
|
|
||||||
|
|
||||||
cls.init(() => {
|
|
||||||
beccaLoader.load();
|
|
||||||
|
|
||||||
// deleting just branches because they might be cloned (and therefore saved) also outside of the hidden subtree
|
|
||||||
|
|
||||||
const searchRoot = becca.getNote('_search');
|
|
||||||
|
|
||||||
for (const searchBranch of searchRoot.getChildBranches()) {
|
|
||||||
const searchNote = searchBranch.getNote();
|
|
||||||
|
|
||||||
if (searchNote.type === 'search') {
|
|
||||||
searchBranch.deleteBranch('0206__delete_search_and_sql_console_history');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const sqlConsoleRoot = becca.getNote('_sqlConsole');
|
|
||||||
|
|
||||||
for (const sqlConsoleBranch of sqlConsoleRoot.getChildBranches()) {
|
|
||||||
const sqlConsoleNote = sqlConsoleBranch.getNote();
|
|
||||||
|
|
||||||
if (sqlConsoleNote.type === 'code' && sqlConsoleNote.mime === 'text/x-sqlite;schema=trilium') {
|
|
||||||
sqlConsoleBranch.deleteBranch('0206__delete_search_and_sql_console_history');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
UPDATE notes SET title = 'SQL Console History' WHERE noteId = '_sqlConsole';
|
|
||||||
UPDATE notes SET title = 'Search History' WHERE noteId = '_search';
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
module.exports = () => {
|
|
||||||
const cls = require("../../src/services/cls");
|
|
||||||
const beccaLoader = require("../../src/becca/becca_loader");
|
|
||||||
const becca = require("../../src/becca/becca");
|
|
||||||
|
|
||||||
cls.init(() => {
|
|
||||||
beccaLoader.load();
|
|
||||||
|
|
||||||
for (const label of becca.getNote('_hidden').getLabels('archived')) {
|
|
||||||
label.markAsDeleted('0208__remove_archived_from_hidden');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
UPDATE attributes SET name = 'workspaceInbox' WHERE type = 'label' AND name = 'hoistedInbox';
|
|
||||||
UPDATE entity_changes SET entityId = 'workspaceInbox' WHERE entityName = 'attributes' AND entityId = 'hoistedInbox';
|
|
||||||
|
|
||||||
UPDATE attributes SET name = 'workspaceSearchHome' WHERE type = 'label' AND name = 'hoistedSearchHome';
|
|
||||||
UPDATE entity_changes SET entityId = 'workspaceSearchHome' WHERE entityName = 'attributes' AND entityId = 'hoistedSearchHome';
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
module.exports = async () => {
|
|
||||||
const cls = require("../../src/services/cls");
|
|
||||||
const beccaLoader = require("../../src/becca/becca_loader");
|
|
||||||
const log = require("../../src/services/log");
|
|
||||||
const consistencyChecks = require("../../src/services/consistency_checks");
|
|
||||||
const eraseService = require("../../src/services/erase");
|
|
||||||
|
|
||||||
await cls.init(async () => {
|
|
||||||
// precaution for the 0211 migration
|
|
||||||
eraseService.eraseDeletedNotesNow();
|
|
||||||
|
|
||||||
beccaLoader.load();
|
|
||||||
|
|
||||||
try {
|
|
||||||
// precaution before running 211 which might produce unique constraint problems if the DB was not consistent
|
|
||||||
consistencyChecks.runOnDemandChecksWithoutExclusiveLock(true);
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
// consistency checks might start failing in the future if there's some incompatible migration down the road
|
|
||||||
// we can optimistically assume the DB is consistent and still continue
|
|
||||||
log.error(`Consistency checks failed in migration 0210: ${e.message} ${e.stack}`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
-- case based on isDeleted is needed, otherwise 2 branches (1 deleted, 1 not) might get the same ID
|
|
||||||
UPDATE entity_changes SET entityId = COALESCE((
|
|
||||||
SELECT
|
|
||||||
CASE isDeleted
|
|
||||||
WHEN 0 THEN parentNoteId || '_' || noteId
|
|
||||||
WHEN 1 THEN branchId
|
|
||||||
END
|
|
||||||
FROM branches WHERE branchId = entityId
|
|
||||||
), entityId)
|
|
||||||
WHERE entityName = 'branches' AND isErased = 0;
|
|
||||||
|
|
||||||
UPDATE branches SET branchId = parentNoteId || '_' || noteId WHERE isDeleted = 0;
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
module.exports = () => {
|
|
||||||
const cls = require("../../src/services/cls");
|
|
||||||
const beccaLoader = require("../../src/becca/becca_loader");
|
|
||||||
const becca = require("../../src/becca/becca");
|
|
||||||
const log = require("../../src/services/log");
|
|
||||||
|
|
||||||
cls.init(() => {
|
|
||||||
beccaLoader.load();
|
|
||||||
|
|
||||||
const hidden = becca.getNote("_hidden");
|
|
||||||
|
|
||||||
if (!hidden) {
|
|
||||||
log.info("MIGRATION 212: no _hidden note, skipping.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const noteId of hidden.getSubtreeNoteIds({includeHidden: true})) {
|
|
||||||
if (noteId.startsWith("_")) { // is "named" note
|
|
||||||
const note = becca.getNote(noteId);
|
|
||||||
|
|
||||||
for (const attr of note.getOwnedAttributes().slice()) {
|
|
||||||
attr.markAsDeleted("0212__delete_all_attributes_of_named_notes");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
module.exports = () => {
|
|
||||||
const beccaLoader = require("../../src/becca/becca_loader");
|
|
||||||
const becca = require("../../src/becca/becca");
|
|
||||||
const cls = require("../../src/services/cls");
|
|
||||||
const log = require("../../src/services/log");
|
|
||||||
|
|
||||||
cls.init(() => {
|
|
||||||
beccaLoader.load();
|
|
||||||
|
|
||||||
for (const note of Object.values(becca.notes)) {
|
|
||||||
try {
|
|
||||||
if (!note.isJavaScript()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!note.mime?.endsWith('env=frontend') && !note.mime?.endsWith('env=backend')) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const origContent = note.getContent().toString();
|
|
||||||
const fixedContent = origContent
|
|
||||||
.replaceAll("runOnServer", "runOnBackend")
|
|
||||||
.replaceAll("api.refreshTree()", "")
|
|
||||||
.replaceAll("addTextToActiveTabEditor", "addTextToActiveContextEditor")
|
|
||||||
.replaceAll("getActiveTabNote", "getActiveContextNote")
|
|
||||||
.replaceAll("getActiveTabTextEditor", "getActiveContextTextEditor")
|
|
||||||
.replaceAll("getActiveTabNotePath", "getActiveContextNotePath")
|
|
||||||
.replaceAll("getDateNote", "getDayNote")
|
|
||||||
.replaceAll("utils.unescapeHtml", "unescapeHtml")
|
|
||||||
.replaceAll("sortNotesByTitle", "sortNotes")
|
|
||||||
.replaceAll("CollapsibleWidget", "RightPanelWidget")
|
|
||||||
.replaceAll("TabAwareWidget", "NoteContextAwareWidget")
|
|
||||||
.replaceAll("TabCachingWidget", "NoteContextAwareWidget")
|
|
||||||
.replaceAll("NoteContextCachingWidget", "NoteContextAwareWidget");
|
|
||||||
|
|
||||||
if (origContent !== fixedContent) {
|
|
||||||
log.info(`Replacing legacy API calls for note '${note.noteId}'`);
|
|
||||||
|
|
||||||
note.saveNoteRevision();
|
|
||||||
note.setContent(fixedContent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
log.error(`Error during migration to 213 for note '${note.noteId}': ${e.message} ${e.stack}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
UPDATE branches SET notePosition = notePosition - 999899999 WHERE parentNoteId = 'root' AND notePosition > 999999999;
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
const sql = require("../../src/services/sql");
|
const sql = require('../../src/services/sql.js');
|
||||||
const utils = require("../../src/services/utils");
|
const utils = require('../../src/services/utils.js');
|
||||||
|
|
||||||
const existingBlobIds = new Set();
|
const existingBlobIds = new Set();
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
const beccaLoader = require("../../src/becca/becca_loader");
|
const beccaLoader = require('../../src/becca/becca_loader.js');
|
||||||
const becca = require("../../src/becca/becca");
|
const becca = require('../../src/becca/becca.js');
|
||||||
const cls = require("../../src/services/cls");
|
const cls = require('../../src/services/cls.js');
|
||||||
const log = require("../../src/services/log");
|
const log = require('../../src/services/log.js');
|
||||||
|
const sql = require('../../src/services/sql.js');
|
||||||
|
|
||||||
cls.init(() => {
|
cls.init(() => {
|
||||||
|
// emergency disabling of image compression since it appears to make problems in migration to 0.61
|
||||||
|
sql.execute(`UPDATE options SET value = 'false' WHERE name = 'compressImages'`);
|
||||||
|
|
||||||
beccaLoader.load();
|
beccaLoader.load();
|
||||||
|
|
||||||
for (const note of Object.values(becca.notes)) {
|
for (const note of Object.values(becca.notes)) {
|
||||||
|
|||||||
1
db/migrations/0226__rename_noteSize_label.sql
Normal file
1
db/migrations/0226__rename_noteSize_label.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
UPDATE attributes SET value = 'contentAndAttachmentsAndRevisionsSize' WHERE name = 'orderBy' AND value = 'noteSize';
|
||||||
2
db/migrations/0227__disable_image_compression.sql
Normal file
2
db/migrations/0227__disable_image_compression.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
-- emergency disabling of image compression since it appears to make problems in migration to 0.61
|
||||||
|
UPDATE options SET value = 'false' WHERE name = 'compressImages';
|
||||||
17
db/migrations/0228__fix_blobIds.sql
Normal file
17
db/migrations/0228__fix_blobIds.sql
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
-- + is normally replaced by X and / by Y, but this can temporarily cause UNIQUE key exception
|
||||||
|
-- this might create blob duplicates, but cleanup will eventually take care of it
|
||||||
|
|
||||||
|
UPDATE blobs SET blobId = REPLACE(blobId, '+', 'A');
|
||||||
|
UPDATE blobs SET blobId = REPLACE(blobId, '/', 'B');
|
||||||
|
|
||||||
|
UPDATE notes SET blobId = REPLACE(blobId, '+', 'A');
|
||||||
|
UPDATE notes SET blobId = REPLACE(blobId, '/', 'B');
|
||||||
|
|
||||||
|
UPDATE attachments SET blobId = REPLACE(blobId, '+', 'A');
|
||||||
|
UPDATE attachments SET blobId = REPLACE(blobId, '/', 'B');
|
||||||
|
|
||||||
|
UPDATE revisions SET blobId = REPLACE(blobId, '+', 'A');
|
||||||
|
UPDATE revisions SET blobId = REPLACE(blobId, '/', 'B');
|
||||||
|
|
||||||
|
UPDATE entity_changes SET entityId = REPLACE(entityId, '+', 'A') WHERE entityName = 'blobs';
|
||||||
|
UPDATE entity_changes SET entityId = REPLACE(entityId, '/', 'B') WHERE entityName = 'blobs';
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Running `docker-compose up` will create/use the "trilium-data" directory in the user home
|
||||||
|
# Run `TRILIUM_DATA_DIR=/path/of/your/choice docker-compose up` to set a different directory
|
||||||
version: '2.1'
|
version: '2.1'
|
||||||
services:
|
services:
|
||||||
trilium:
|
trilium:
|
||||||
@@ -8,7 +10,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- trilium:/home/node/trilium-data
|
- ${TRILIUM_DATA_DIR:-~/trilium-data}:/home/node/trilium-data
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
trilium:
|
trilium:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
const http = require("http");
|
const http = require("http");
|
||||||
const ini = require("ini");
|
const ini = require("ini");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const dataDir = require("./src/services/data_dir");
|
const dataDir = require('./src/services/data_dir.js');
|
||||||
const config = ini.parse(fs.readFileSync(dataDir.CONFIG_INI_PATH, 'utf-8'));
|
const config = ini.parse(fs.readFileSync(dataDir.CONFIG_INI_PATH, 'utf-8'));
|
||||||
|
|
||||||
if (config.Network.https) {
|
if (config.Network.https) {
|
||||||
@@ -10,8 +10,8 @@ if (config.Network.https) {
|
|||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const port = require('./src/services/port');
|
const port = require('./src/services/port.js');
|
||||||
const host = require('./src/services/host');
|
const host = require('./src/services/host.js');
|
||||||
|
|
||||||
const options = { timeout: 2000 };
|
const options = { timeout: 2000 };
|
||||||
|
|
||||||
|
|||||||
@@ -183,7 +183,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line55">line 55</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line35">line 35</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line244">line 244</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line250">line 250</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -364,91 +364,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line124">line 124</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line64">line 64</a>
|
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -568,7 +484,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>
|
<h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -616,7 +532,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line32">line 32</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line59">line 59</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -641,6 +557,22 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">string</span>
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -652,7 +584,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
<h4 class="name" id="getPojo"><span class="type-signature">(abstract, protected) </span>getPojo<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -700,7 +634,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line25">line 25</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line82">line 82</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -784,7 +718,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line76">line 76</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -868,7 +802,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line47">line 47</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line27">line 27</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1022,7 +956,91 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line261">line 261</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line267">line 267</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="putEntityChange"><span class="type-signature">(protected) </span>putEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line44">line 44</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1110,7 +1128,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line85">line 85</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line91">line 91</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1174,7 +1192,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
2894
docs/backend_api/BAttachment.html
Normal file
2894
docs/backend_api/BAttachment.html
Normal file
File diff suppressed because it is too large
Load Diff
@@ -94,7 +94,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line16">line 16</a>
|
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line22">line 22</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line47">line 47</a>
|
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line53">line 53</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -268,7 +268,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line55">line 55</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line35">line 35</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -336,7 +336,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line59">line 59</a>
|
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line65">line 65</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -404,7 +404,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line53">line 53</a>
|
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line59">line 59</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -464,74 +464,6 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line49">line 49</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="position"><span class="type-signature"></span>position<span class="type-signature"> :int</span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h5>Type:</h5>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class="param-type">int</span>
|
|
||||||
|
|
||||||
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -558,7 +490,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4>
|
<h4 class="name" id="position"><span class="type-signature"></span>position<span class="type-signature"> :<a href="global.html#int">int</a></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -569,7 +501,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
<span class="param-type"><a href="global.html#int">int</a></span>
|
||||||
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@@ -608,7 +540,75 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line51">line 51</a>
|
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line61">line 61</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :<a href="global.html#AttributeType">AttributeType</a></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Type:</h5>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class="param-type"><a href="global.html#AttributeType">AttributeType</a></span>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line57">line 57</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -676,7 +676,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line61">line 61</a>
|
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line67">line 67</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -744,7 +744,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line57">line 57</a>
|
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line63">line 63</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -825,7 +825,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line244">line 244</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line250">line 250</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -935,96 +935,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line124">line 124</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-overrides">Overrides:</dt>
|
|
||||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
|
||||||
<a href="AbstractBeccaEntity.html#addEntityChange">AbstractBeccaEntity#addEntityChange</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line64">line 64</a>
|
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1149,7 +1060,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>
|
<h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1202,7 +1113,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line32">line 32</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line59">line 59</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1227,98 +1138,27 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">string</span>
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-overrides">Overrides:</dt>
|
|
||||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
|
||||||
<a href="AbstractBeccaEntity.html#generateIdIfNecessary">AbstractBeccaEntity#generateIdIfNecessary</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line25">line 25</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1375,7 +1215,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line129">line 129</a>
|
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line135">line 135</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1426,6 +1266,95 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="getPojo"><span class="type-signature">(abstract, protected) </span>getPojo<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-overrides">Overrides:</dt>
|
||||||
|
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||||
|
<a href="AbstractBeccaEntity.html#getPojo">AbstractBeccaEntity#getPojo</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line82">line 82</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1485,7 +1414,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line76">line 76</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1569,7 +1498,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line142">line 142</a>
|
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line148">line 148</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1679,7 +1608,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line47">line 47</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line27">line 27</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1763,7 +1692,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line157">line 157</a>
|
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line163">line 163</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1940,7 +1869,96 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line261">line 261</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line267">line 267</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="putEntityChange"><span class="type-signature">(protected) </span>putEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-overrides">Overrides:</dt>
|
||||||
|
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||||
|
<a href="AbstractBeccaEntity.html#putEntityChange">AbstractBeccaEntity#putEntityChange</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line44">line 44</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -2033,7 +2051,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line85">line 85</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line91">line 91</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -2097,7 +2115,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ Always check noteId instead.</div>
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line55">line 55</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line35">line 35</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -549,7 +549,7 @@ of deletion should not act as a clone.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="notePosition"><span class="type-signature"></span>notePosition<span class="type-signature"> :int</span></h4>
|
<h4 class="name" id="notePosition"><span class="type-signature"></span>notePosition<span class="type-signature"> :<a href="global.html#int">int</a></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -560,7 +560,7 @@ of deletion should not act as a clone.
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<span class="param-type">int</span>
|
<span class="param-type"><a href="global.html#int">int</a></span>
|
||||||
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@@ -945,7 +945,7 @@ of deletion should not act as a clone.
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line244">line 244</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line250">line 250</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1055,96 +1055,7 @@ of deletion should not act as a clone.
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line124">line 124</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-overrides">Overrides:</dt>
|
|
||||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
|
||||||
<a href="AbstractBeccaEntity.html#addEntityChange">AbstractBeccaEntity#addEntityChange</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line64">line 64</a>
|
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1473,7 +1384,7 @@ of deletion should not act as a clone.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>
|
<h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1526,7 +1437,7 @@ of deletion should not act as a clone.
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line32">line 32</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line59">line 59</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1551,98 +1462,27 @@ of deletion should not act as a clone.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">string</span>
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-overrides">Overrides:</dt>
|
|
||||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
|
||||||
<a href="AbstractBeccaEntity.html#generateIdIfNecessary">AbstractBeccaEntity#generateIdIfNecessary</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line25">line 25</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1747,6 +1587,95 @@ of deletion should not act as a clone.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="getPojo"><span class="type-signature">(abstract, protected) </span>getPojo<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-overrides">Overrides:</dt>
|
||||||
|
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||||
|
<a href="AbstractBeccaEntity.html#getPojo">AbstractBeccaEntity#getPojo</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line82">line 82</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1806,7 +1735,7 @@ of deletion should not act as a clone.
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line76">line 76</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1895,7 +1824,7 @@ of deletion should not act as a clone.
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line47">line 47</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line27">line 27</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -2054,7 +1983,96 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line261">line 261</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line267">line 267</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="putEntityChange"><span class="type-signature">(protected) </span>putEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-overrides">Overrides:</dt>
|
||||||
|
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||||
|
<a href="AbstractBeccaEntity.html#putEntityChange">AbstractBeccaEntity#putEntityChange</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line44">line 44</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -2147,7 +2165,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line85">line 85</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line91">line 91</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -2211,7 +2229,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ from tokenHash and token.</div>
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line55">line 55</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line35">line 35</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -694,7 +694,7 @@ from tokenHash and token.</div>
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line244">line 244</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line250">line 250</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -804,96 +804,7 @@ from tokenHash and token.</div>
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line124">line 124</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-overrides">Overrides:</dt>
|
|
||||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
|
||||||
<a href="AbstractBeccaEntity.html#addEntityChange">AbstractBeccaEntity#addEntityChange</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line64">line 64</a>
|
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1018,7 +929,7 @@ from tokenHash and token.</div>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>
|
<h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1071,7 +982,7 @@ from tokenHash and token.</div>
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line32">line 32</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line59">line 59</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1096,6 +1007,22 @@ from tokenHash and token.</div>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">string</span>
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1107,7 +1034,9 @@ from tokenHash and token.</div>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
<h4 class="name" id="getPojo"><span class="type-signature">(abstract, protected) </span>getPojo<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1137,7 +1066,7 @@ from tokenHash and token.</div>
|
|||||||
|
|
||||||
<dt class="tag-overrides">Overrides:</dt>
|
<dt class="tag-overrides">Overrides:</dt>
|
||||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||||
<a href="AbstractBeccaEntity.html#generateIdIfNecessary">AbstractBeccaEntity#generateIdIfNecessary</a>
|
<a href="AbstractBeccaEntity.html#getPojo">AbstractBeccaEntity#getPojo</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1160,7 +1089,7 @@ from tokenHash and token.</div>
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line25">line 25</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line82">line 82</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1249,7 +1178,7 @@ from tokenHash and token.</div>
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line76">line 76</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1338,7 +1267,7 @@ from tokenHash and token.</div>
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line47">line 47</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line27">line 27</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1497,7 +1426,96 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line261">line 261</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line267">line 267</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="putEntityChange"><span class="type-signature">(protected) </span>putEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-overrides">Overrides:</dt>
|
||||||
|
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||||
|
<a href="AbstractBeccaEntity.html#putEntityChange">AbstractBeccaEntity#putEntityChange</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line44">line 44</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1590,7 +1608,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line85">line 85</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line91">line 91</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1654,7 +1672,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -199,7 +199,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line55">line 55</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line35">line 35</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -552,7 +552,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line244">line 244</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line250">line 250</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -662,96 +662,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line124">line 124</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-overrides">Overrides:</dt>
|
|
||||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
|
||||||
<a href="AbstractBeccaEntity.html#addEntityChange">AbstractBeccaEntity#addEntityChange</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line64">line 64</a>
|
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -876,7 +787,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>
|
<h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -929,7 +840,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line32">line 32</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line59">line 59</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -954,6 +865,22 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">string</span>
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -965,7 +892,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
<h4 class="name" id="getPojo"><span class="type-signature">(abstract, protected) </span>getPojo<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -995,7 +924,7 @@
|
|||||||
|
|
||||||
<dt class="tag-overrides">Overrides:</dt>
|
<dt class="tag-overrides">Overrides:</dt>
|
||||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||||
<a href="AbstractBeccaEntity.html#generateIdIfNecessary">AbstractBeccaEntity#generateIdIfNecessary</a>
|
<a href="AbstractBeccaEntity.html#getPojo">AbstractBeccaEntity#getPojo</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1018,7 +947,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line25">line 25</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line82">line 82</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1107,7 +1036,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line76">line 76</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1196,7 +1125,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line47">line 47</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line27">line 27</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1355,7 +1284,96 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line261">line 261</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line267">line 267</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="putEntityChange"><span class="type-signature">(protected) </span>putEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-overrides">Overrides:</dt>
|
||||||
|
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||||
|
<a href="AbstractBeccaEntity.html#putEntityChange">AbstractBeccaEntity#putEntityChange</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line44">line 44</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1448,7 +1466,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line85">line 85</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line91">line 91</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1512,7 +1530,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -199,7 +199,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line55">line 55</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line35">line 35</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -484,7 +484,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line244">line 244</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line250">line 250</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -594,96 +594,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line124">line 124</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line128">line 128</a>
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="addEntityChange"><span class="type-signature">(protected) </span>addEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="details">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-overrides">Overrides:</dt>
|
|
||||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
|
||||||
<a href="AbstractBeccaEntity.html#addEntityChange">AbstractBeccaEntity#addEntityChange</a>
|
|
||||||
</li></ul></dd>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line64">line 64</a>
|
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -808,7 +719,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"></span></h4>
|
<h4 class="name" id="generateHash"><span class="type-signature">(protected) </span>generateHash<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -861,7 +772,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line32">line 32</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line59">line 59</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -886,6 +797,22 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">string</span>
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -897,7 +824,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="generateIdIfNecessary"><span class="type-signature">(protected) </span>generateIdIfNecessary<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
||||||
|
|
||||||
|
<h4 class="name" id="getPojo"><span class="type-signature">(abstract, protected) </span>getPojo<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -927,7 +856,7 @@
|
|||||||
|
|
||||||
<dt class="tag-overrides">Overrides:</dt>
|
<dt class="tag-overrides">Overrides:</dt>
|
||||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||||
<a href="AbstractBeccaEntity.html#generateIdIfNecessary">AbstractBeccaEntity#generateIdIfNecessary</a>
|
<a href="AbstractBeccaEntity.html#getPojo">AbstractBeccaEntity#getPojo</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -950,7 +879,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line25">line 25</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line82">line 82</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1039,7 +968,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line76">line 76</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line74">line 74</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1128,7 +1057,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line47">line 47</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line27">line 27</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1287,7 +1216,96 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line261">line 261</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line267">line 267</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="putEntityChange"><span class="type-signature">(protected) </span>putEntityChange<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-overrides">Overrides:</dt>
|
||||||
|
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||||
|
<a href="AbstractBeccaEntity.html#putEntityChange">AbstractBeccaEntity#putEntityChange</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line44">line 44</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1380,7 +1398,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line85">line 85</a>
|
<a href="becca_entities_abstract_becca_entity.js.html">becca/entities/abstract_becca_entity.js</a>, <a href="becca_entities_abstract_becca_entity.js.html#line91">line 91</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1444,7 +1462,7 @@ This is a low-level method, for notes and branches use `note.deleteNote()` and '
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
3243
docs/backend_api/BRevision.html
Normal file
3243
docs/backend_api/BRevision.html
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -46,31 +46,11 @@ let becca = null;
|
|||||||
class AbstractBeccaEntity {
|
class AbstractBeccaEntity {
|
||||||
/** @protected */
|
/** @protected */
|
||||||
beforeSaving() {
|
beforeSaving() {
|
||||||
this.generateIdIfNecessary();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @protected */
|
|
||||||
generateIdIfNecessary() {
|
|
||||||
if (!this[this.constructor.primaryKeyName]) {
|
if (!this[this.constructor.primaryKeyName]) {
|
||||||
this[this.constructor.primaryKeyName] = utils.newEntityId();
|
this[this.constructor.primaryKeyName] = utils.newEntityId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @protected */
|
|
||||||
generateHash(isDeleted = false) {
|
|
||||||
let contentToHash = "";
|
|
||||||
|
|
||||||
for (const propertyName of this.constructor.hashedProperties) {
|
|
||||||
contentToHash += `|${this[propertyName]}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isDeleted) {
|
|
||||||
contentToHash += "|deleted";
|
|
||||||
}
|
|
||||||
|
|
||||||
return utils.hash(contentToHash).substr(0, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @protected */
|
/** @protected */
|
||||||
getUtcDateChanged() {
|
getUtcDateChanged() {
|
||||||
return this.utcDateModified || this.utcDateCreated;
|
return this.utcDateModified || this.utcDateCreated;
|
||||||
@@ -89,8 +69,8 @@ class AbstractBeccaEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @protected */
|
/** @protected */
|
||||||
addEntityChange(isDeleted = false) {
|
putEntityChange(isDeleted) {
|
||||||
entityChangesService.addEntityChange({
|
entityChangesService.putEntityChange({
|
||||||
entityName: this.constructor.entityName,
|
entityName: this.constructor.entityName,
|
||||||
entityId: this[this.constructor.primaryKeyName],
|
entityId: this[this.constructor.primaryKeyName],
|
||||||
hash: this.generateHash(isDeleted),
|
hash: this.generateHash(isDeleted),
|
||||||
@@ -100,11 +80,37 @@ class AbstractBeccaEntity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @protected
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
generateHash(isDeleted) {
|
||||||
|
let contentToHash = "";
|
||||||
|
|
||||||
|
for (const propertyName of this.constructor.hashedProperties) {
|
||||||
|
contentToHash += `|${this[propertyName]}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isDeleted) {
|
||||||
|
contentToHash += "|deleted";
|
||||||
|
}
|
||||||
|
|
||||||
|
return utils.hash(contentToHash).substr(0, 10);
|
||||||
|
}
|
||||||
|
|
||||||
/** @protected */
|
/** @protected */
|
||||||
getPojoToSave() {
|
getPojoToSave() {
|
||||||
return this.getPojo();
|
return this.getPojo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @protected
|
||||||
|
* @abstract
|
||||||
|
*/
|
||||||
|
getPojo() {
|
||||||
|
throw new Error(`Unimplemented getPojo() for entity '${this.constructor.name}'`)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves entity - executes SQL, but doesn't commit the transaction on its own
|
* Saves entity - executes SQL, but doesn't commit the transaction on its own
|
||||||
*
|
*
|
||||||
@@ -116,9 +122,7 @@ class AbstractBeccaEntity {
|
|||||||
|
|
||||||
const isNewEntity = !this[primaryKeyName];
|
const isNewEntity = !this[primaryKeyName];
|
||||||
|
|
||||||
if (this.beforeSaving) {
|
|
||||||
this.beforeSaving(opts);
|
this.beforeSaving(opts);
|
||||||
}
|
|
||||||
|
|
||||||
const pojo = this.getPojoToSave();
|
const pojo = this.getPojoToSave();
|
||||||
|
|
||||||
@@ -129,7 +133,7 @@ class AbstractBeccaEntity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.addEntityChange(false);
|
this.putEntityChange(!!this.isDeleted);
|
||||||
|
|
||||||
if (!cls.isEntityEventsDisabled()) {
|
if (!cls.isEntityEventsDisabled()) {
|
||||||
const eventPayload = {
|
const eventPayload = {
|
||||||
@@ -203,6 +207,8 @@ class AbstractBeccaEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sql.execute("DELETE FROM blobs WHERE blobId = ?", [oldBlobId]);
|
sql.execute("DELETE FROM blobs WHERE blobId = ?", [oldBlobId]);
|
||||||
|
// blobs are not marked as erased in entity_changes, they are just purged completely
|
||||||
|
// this is because technically every keystroke can create a new blob, and there would be just too many
|
||||||
sql.execute("DELETE FROM entity_changes WHERE entityName = 'blobs' AND entityId = ?", [oldBlobId]);
|
sql.execute("DELETE FROM entity_changes WHERE entityName = 'blobs' AND entityId = ?", [oldBlobId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,14 +251,14 @@ class AbstractBeccaEntity {
|
|||||||
// access to the decrypted content
|
// access to the decrypted content
|
||||||
const hash = blobService.calculateContentHash(pojo);
|
const hash = blobService.calculateContentHash(pojo);
|
||||||
|
|
||||||
entityChangesService.addEntityChange({
|
entityChangesService.putEntityChange({
|
||||||
entityName: 'blobs',
|
entityName: 'blobs',
|
||||||
entityId: newBlobId,
|
entityId: newBlobId,
|
||||||
hash: hash,
|
hash: hash,
|
||||||
isErased: false,
|
isErased: false,
|
||||||
utcDateChanged: pojo.utcDateModified,
|
utcDateChanged: pojo.utcDateModified,
|
||||||
isSynced: true,
|
isSynced: true,
|
||||||
// overriding componentId will cause frontend to think the change is coming from a different component
|
// overriding componentId will cause the frontend to think the change is coming from a different component
|
||||||
// and thus reload
|
// and thus reload
|
||||||
componentId: opts.forceFrontendReload ? utils.randomString(10) : null
|
componentId: opts.forceFrontendReload ? utils.randomString(10) : null
|
||||||
});
|
});
|
||||||
@@ -305,7 +311,7 @@ class AbstractBeccaEntity {
|
|||||||
|
|
||||||
log.info(`Marking ${entityName} ${entityId} as deleted`);
|
log.info(`Marking ${entityName} ${entityId} as deleted`);
|
||||||
|
|
||||||
this.addEntityChange(true);
|
this.putEntityChange(true);
|
||||||
|
|
||||||
eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
|
eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
|
||||||
}
|
}
|
||||||
@@ -322,7 +328,7 @@ class AbstractBeccaEntity {
|
|||||||
|
|
||||||
log.info(`Marking ${entityName} ${entityId} as deleted`);
|
log.info(`Marking ${entityName} ${entityId} as deleted`);
|
||||||
|
|
||||||
this.addEntityChange(true);
|
this.putEntityChange(true);
|
||||||
|
|
||||||
eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
|
eventService.emit(eventService.ENTITY_DELETED, { entityName, entityId, entity: this });
|
||||||
}
|
}
|
||||||
@@ -339,7 +345,7 @@ module.exports = AbstractBeccaEntity;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
294
docs/backend_api/becca_entities_battachment.js.html
Normal file
294
docs/backend_api/becca_entities_battachment.js.html
Normal file
@@ -0,0 +1,294 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>JSDoc: Source: becca/entities/battachment.js</title>
|
||||||
|
|
||||||
|
<script src="scripts/prettify/prettify.js"> </script>
|
||||||
|
<script src="scripts/prettify/lang-css.js"> </script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<h1 class="page-title">Source: becca/entities/battachment.js</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<article>
|
||||||
|
<pre class="prettyprint source linenums"><code>"use strict";
|
||||||
|
|
||||||
|
const utils = require('../../services/utils');
|
||||||
|
const dateUtils = require('../../services/date_utils');
|
||||||
|
const AbstractBeccaEntity = require("./abstract_becca_entity");
|
||||||
|
const sql = require("../../services/sql");
|
||||||
|
const protectedSessionService = require("../../services/protected_session");
|
||||||
|
const log = require("../../services/log");
|
||||||
|
|
||||||
|
const attachmentRoleToNoteTypeMapping = {
|
||||||
|
'image': 'image'
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attachment represent data related/attached to the note. Conceptually similar to attributes, but intended for
|
||||||
|
* larger amounts of data and generally not accessible to the user.
|
||||||
|
*
|
||||||
|
* @extends AbstractBeccaEntity
|
||||||
|
*/
|
||||||
|
class BAttachment extends AbstractBeccaEntity {
|
||||||
|
static get entityName() { return "attachments"; }
|
||||||
|
static get primaryKeyName() { return "attachmentId"; }
|
||||||
|
static get hashedProperties() { return ["attachmentId", "ownerId", "role", "mime", "title", "blobId", "utcDateScheduledForErasureSince"]; }
|
||||||
|
|
||||||
|
constructor(row) {
|
||||||
|
super();
|
||||||
|
|
||||||
|
if (!row.ownerId?.trim()) {
|
||||||
|
throw new Error("'ownerId' must be given to initialize a Attachment entity");
|
||||||
|
} else if (!row.role?.trim()) {
|
||||||
|
throw new Error("'role' must be given to initialize a Attachment entity");
|
||||||
|
} else if (!row.mime?.trim()) {
|
||||||
|
throw new Error("'mime' must be given to initialize a Attachment entity");
|
||||||
|
} else if (!row.title?.trim()) {
|
||||||
|
throw new Error("'title' must be given to initialize a Attachment entity");
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @type {string} */
|
||||||
|
this.attachmentId = row.attachmentId;
|
||||||
|
/**
|
||||||
|
* either noteId or revisionId to which this attachment belongs
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
this.ownerId = row.ownerId;
|
||||||
|
/** @type {string} */
|
||||||
|
this.role = row.role;
|
||||||
|
/** @type {string} */
|
||||||
|
this.mime = row.mime;
|
||||||
|
/** @type {string} */
|
||||||
|
this.title = row.title;
|
||||||
|
/** @type {int} */
|
||||||
|
this.position = row.position;
|
||||||
|
/** @type {string} */
|
||||||
|
this.blobId = row.blobId;
|
||||||
|
/** @type {boolean} */
|
||||||
|
this.isProtected = !!row.isProtected;
|
||||||
|
/** @type {string} */
|
||||||
|
this.dateModified = row.dateModified;
|
||||||
|
/** @type {string} */
|
||||||
|
this.utcDateModified = row.utcDateModified;
|
||||||
|
/** @type {string} */
|
||||||
|
this.utcDateScheduledForErasureSince = row.utcDateScheduledForErasureSince;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optionally added to the entity
|
||||||
|
* @type {int}
|
||||||
|
*/
|
||||||
|
this.contentLength = row.contentLength;
|
||||||
|
|
||||||
|
this.decrypt();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {BAttachment} */
|
||||||
|
copy() {
|
||||||
|
return new BAttachment({
|
||||||
|
ownerId: this.ownerId,
|
||||||
|
role: this.role,
|
||||||
|
mime: this.mime,
|
||||||
|
title: this.title,
|
||||||
|
blobId: this.blobId,
|
||||||
|
isProtected: this.isProtected
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {BNote} */
|
||||||
|
getNote() {
|
||||||
|
return this.becca.notes[this.ownerId];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {boolean} true if the note has string content (not binary) */
|
||||||
|
hasStringContent() {
|
||||||
|
return utils.isStringNote(this.type, this.mime);
|
||||||
|
}
|
||||||
|
|
||||||
|
isContentAvailable() {
|
||||||
|
return !this.attachmentId // new attachment which was not encrypted yet
|
||||||
|
|| !this.isProtected
|
||||||
|
|| protectedSessionService.isProtectedSessionAvailable()
|
||||||
|
}
|
||||||
|
|
||||||
|
getTitleOrProtected() {
|
||||||
|
return this.isContentAvailable() ? this.title : '[protected]';
|
||||||
|
}
|
||||||
|
|
||||||
|
decrypt() {
|
||||||
|
if (!this.isProtected || !this.attachmentId) {
|
||||||
|
this.isDecrypted = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.isDecrypted && protectedSessionService.isProtectedSessionAvailable()) {
|
||||||
|
try {
|
||||||
|
this.title = protectedSessionService.decryptString(this.title);
|
||||||
|
this.isDecrypted = true;
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
log.error(`Could not decrypt attachment ${this.attachmentId}: ${e.message} ${e.stack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {string|Buffer} */
|
||||||
|
getContent() {
|
||||||
|
return this._getContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param content
|
||||||
|
* @param {object} [opts]
|
||||||
|
* @param {object} [opts.forceSave=false] - will also save this BAttachment entity
|
||||||
|
* @param {object} [opts.forceFrontendReload=false] - override frontend heuristics on when to reload, instruct to reload
|
||||||
|
*/
|
||||||
|
setContent(content, opts) {
|
||||||
|
this._setContent(content, opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {{note: BNote, branch: BBranch}} */
|
||||||
|
convertToNote() {
|
||||||
|
if (this.type === 'search') {
|
||||||
|
throw new Error(`Note of type search cannot have child notes`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.getNote()) {
|
||||||
|
throw new Error("Cannot find note of this attachment. It is possible that this is note revision's attachment. " +
|
||||||
|
"Converting note revision's attachments to note is not (yet) supported.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(this.role in attachmentRoleToNoteTypeMapping)) {
|
||||||
|
throw new Error(`Mapping from attachment role '${this.role}' to note's type is not defined`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.isContentAvailable()) { // isProtected is the same for attachment
|
||||||
|
throw new Error(`Cannot convert protected attachment outside of protected session`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const noteService = require('../../services/notes');
|
||||||
|
|
||||||
|
const { note, branch } = noteService.createNewNote({
|
||||||
|
parentNoteId: this.ownerId,
|
||||||
|
title: this.title,
|
||||||
|
type: attachmentRoleToNoteTypeMapping[this.role],
|
||||||
|
mime: this.mime,
|
||||||
|
content: this.getContent(),
|
||||||
|
isProtected: this.isProtected
|
||||||
|
});
|
||||||
|
|
||||||
|
this.markAsDeleted();
|
||||||
|
|
||||||
|
const parentNote = this.getNote();
|
||||||
|
|
||||||
|
if (this.role === 'image' && parentNote.type === 'text') {
|
||||||
|
const origContent = parentNote.getContent();
|
||||||
|
const oldAttachmentUrl = `api/attachments/${this.attachmentId}/image/`;
|
||||||
|
const newNoteUrl = `api/images/${note.noteId}/`;
|
||||||
|
|
||||||
|
const fixedContent = utils.replaceAll(origContent, oldAttachmentUrl, newNoteUrl);
|
||||||
|
|
||||||
|
if (fixedContent !== origContent) {
|
||||||
|
parentNote.setContent(fixedContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
noteService.asyncPostProcessContent(note, fixedContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
return { note, branch };
|
||||||
|
}
|
||||||
|
|
||||||
|
getFileName() {
|
||||||
|
const type = this.role === 'image' ? 'image' : 'file';
|
||||||
|
|
||||||
|
return utils.formatDownloadTitle(this.title, type, this.mime);
|
||||||
|
}
|
||||||
|
|
||||||
|
beforeSaving() {
|
||||||
|
super.beforeSaving();
|
||||||
|
|
||||||
|
if (this.position === undefined || this.position === null) {
|
||||||
|
this.position = 10 + sql.getValue(`SELECT COALESCE(MAX(position), 0)
|
||||||
|
FROM attachments
|
||||||
|
WHERE ownerId = ?`, [this.noteId]);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dateModified = dateUtils.localNowDateTime();
|
||||||
|
this.utcDateModified = dateUtils.utcNowDateTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
getPojo() {
|
||||||
|
return {
|
||||||
|
attachmentId: this.attachmentId,
|
||||||
|
ownerId: this.ownerId,
|
||||||
|
role: this.role,
|
||||||
|
mime: this.mime,
|
||||||
|
title: this.title,
|
||||||
|
position: this.position,
|
||||||
|
blobId: this.blobId,
|
||||||
|
isProtected: !!this.isProtected,
|
||||||
|
isDeleted: false,
|
||||||
|
dateModified: this.dateModified,
|
||||||
|
utcDateModified: this.utcDateModified,
|
||||||
|
utcDateScheduledForErasureSince: this.utcDateScheduledForErasureSince,
|
||||||
|
contentLength: this.contentLength
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
getPojoToSave() {
|
||||||
|
const pojo = this.getPojo();
|
||||||
|
delete pojo.contentLength;
|
||||||
|
|
||||||
|
if (pojo.isProtected) {
|
||||||
|
if (this.isDecrypted) {
|
||||||
|
pojo.title = protectedSessionService.encrypt(pojo.title);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// updating protected note outside of protected session means we will keep original ciphertexts
|
||||||
|
delete pojo.title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return pojo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = BAttachment;
|
||||||
|
</code></pre>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<br class="clear">
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script> prettyPrint(); </script>
|
||||||
|
<script src="scripts/linenumber.js"> </script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -35,6 +35,12 @@ const dateUtils = require("../../services/date_utils");
|
|||||||
const promotedAttributeDefinitionParser = require("../../services/promoted_attribute_definition_parser");
|
const promotedAttributeDefinitionParser = require("../../services/promoted_attribute_definition_parser");
|
||||||
const {sanitizeAttributeName} = require("../../services/sanitize_attribute_name");
|
const {sanitizeAttributeName} = require("../../services/sanitize_attribute_name");
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* There are currently only two types of attributes, labels or relations.
|
||||||
|
* @typedef {"label" | "relation"} AttributeType
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attribute is an abstract concept which has two real uses - label (key - value pair)
|
* Attribute is an abstract concept which has two real uses - label (key - value pair)
|
||||||
* and relation (representing named relationship between source and target note)
|
* and relation (representing named relationship between source and target note)
|
||||||
@@ -75,7 +81,7 @@ class BAttribute extends AbstractBeccaEntity {
|
|||||||
this.attributeId = attributeId;
|
this.attributeId = attributeId;
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.noteId = noteId;
|
this.noteId = noteId;
|
||||||
/** @type {string} */
|
/** @type {AttributeType} */
|
||||||
this.type = type;
|
this.type = type;
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.name = name;
|
this.name = name;
|
||||||
@@ -272,7 +278,7 @@ module.exports = BAttribute;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
81
docs/backend_api/becca_entities_bblob.js.html
Normal file
81
docs/backend_api/becca_entities_bblob.js.html
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>JSDoc: Source: becca/entities/bblob.js</title>
|
||||||
|
|
||||||
|
<script src="scripts/prettify/prettify.js"> </script>
|
||||||
|
<script src="scripts/prettify/lang-css.js"> </script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<h1 class="page-title">Source: becca/entities/bblob.js</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<article>
|
||||||
|
<pre class="prettyprint source linenums"><code>class BBlob {
|
||||||
|
static get entityName() { return "blobs"; }
|
||||||
|
static get primaryKeyName() { return "blobId"; }
|
||||||
|
static get hashedProperties() { return ["blobId", "content"]; }
|
||||||
|
|
||||||
|
constructor(row) {
|
||||||
|
/** @type {string} */
|
||||||
|
this.blobId = row.blobId;
|
||||||
|
/** @type {string|Buffer} */
|
||||||
|
this.content = row.content;
|
||||||
|
/** @type {int} */
|
||||||
|
this.contentLength = row.contentLength;
|
||||||
|
/** @type {string} */
|
||||||
|
this.dateModified = row.dateModified;
|
||||||
|
/** @type {string} */
|
||||||
|
this.utcDateModified = row.utcDateModified;
|
||||||
|
}
|
||||||
|
|
||||||
|
getPojo() {
|
||||||
|
return {
|
||||||
|
blobId: this.blobId,
|
||||||
|
content: this.content,
|
||||||
|
contentLength: this.contentLength,
|
||||||
|
dateModified: this.dateModified,
|
||||||
|
utcDateModified: this.utcDateModified
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = BBlob;
|
||||||
|
</code></pre>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<br class="clear">
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script> prettyPrint(); </script>
|
||||||
|
<script src="scripts/linenumber.js"> </script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -318,7 +318,7 @@ module.exports = BBranch;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ module.exports = BEtapiToken;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -45,6 +45,21 @@ dayjs.extend(utc);
|
|||||||
const LABEL = 'label';
|
const LABEL = 'label';
|
||||||
const RELATION = 'relation';
|
const RELATION = 'relation';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* There are many different Note types, some of which are entirely opaque to the
|
||||||
|
* end user. Those types should be used only for checking against, they are
|
||||||
|
* not for direct use.
|
||||||
|
* @typedef {"file" | "image" | "search" | "noteMap" | "launcher" | "doc" | "contentWidget" | "text" | "relationMap" | "render" | "canvas" | "mermaid" | "book" | "webView" | "code"} NoteType
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} NotePathRecord
|
||||||
|
* @property {boolean} isArchived
|
||||||
|
* @property {boolean} isInHoistedSubTree
|
||||||
|
* @property {Array<string>} notePath
|
||||||
|
* @property {boolean} isHidden
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trilium's main entity, which can represent text note, image, code note, file attachment etc.
|
* Trilium's main entity, which can represent text note, image, code note, file attachment etc.
|
||||||
*
|
*
|
||||||
@@ -88,7 +103,7 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
this.noteId = noteId;
|
this.noteId = noteId;
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.title = title;
|
this.title = title;
|
||||||
/** @type {string} */
|
/** @type {NoteType} */
|
||||||
this.type = type;
|
this.type = type;
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.mime = mime;
|
this.mime = mime;
|
||||||
@@ -104,7 +119,10 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
this.utcDateCreated = utcDateCreated || dateUtils.utcNowDateTime();
|
this.utcDateCreated = utcDateCreated || dateUtils.utcNowDateTime();
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.utcDateModified = utcDateModified;
|
this.utcDateModified = utcDateModified;
|
||||||
/** @type {boolean} - set during the deletion operation, before it is completed (removed from becca completely) */
|
/**
|
||||||
|
* set during the deletion operation, before it is completed (removed from becca completely)
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
this.isBeingDeleted = false;
|
this.isBeingDeleted = false;
|
||||||
|
|
||||||
// ------ Derived attributes ------
|
// ------ Derived attributes ------
|
||||||
@@ -160,11 +178,17 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
*/
|
*/
|
||||||
this.contentSize = null;
|
this.contentSize = null;
|
||||||
/**
|
/**
|
||||||
* size of the content and note revision contents in bytes
|
* size of the note content, attachment contents in bytes
|
||||||
* @type {int|null}
|
* @type {int|null}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.noteSize = null;
|
this.contentAndAttachmentsSize = null;
|
||||||
|
/**
|
||||||
|
* size of the note content, attachment contents and revision contents in bytes
|
||||||
|
* @type {int|null}
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
this.contentAndAttachmentsAndRevisionsSize = null;
|
||||||
/**
|
/**
|
||||||
* number of note revisions for this note
|
* number of note revisions for this note
|
||||||
* @type {int|null}
|
* @type {int|null}
|
||||||
@@ -239,12 +263,9 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
return this._getContent();
|
return this._getContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {{dateModified, utcDateModified}} */
|
/**
|
||||||
getContentMetadata() {
|
* @returns {*}
|
||||||
return sql.getRow(`SELECT dateModified, utcDateModified FROM blobs WHERE blobId = ?`, [this.blobId]);
|
* @throws Error in case of invalid JSON */
|
||||||
}
|
|
||||||
|
|
||||||
/** @returns {*} */
|
|
||||||
getJsonContent() {
|
getJsonContent() {
|
||||||
const content = this.getContent();
|
const content = this.getContent();
|
||||||
|
|
||||||
@@ -255,6 +276,16 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
return JSON.parse(content);
|
return JSON.parse(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @returns {*|null} valid object or null if the content cannot be parsed as JSON */
|
||||||
|
getJsonContentSafely() {
|
||||||
|
try {
|
||||||
|
return this.getJsonContent();
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param content
|
* @param content
|
||||||
* @param {object} [opts]
|
* @param {object} [opts]
|
||||||
@@ -753,7 +784,7 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
} else if (a.parentNote?.isHiddenCompletely()) {
|
} else if (a.parentNote?.isHiddenCompletely()) {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -773,7 +804,7 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
const aBranch = becca.getBranchFromChildAndParent(a.noteId, this.noteId);
|
const aBranch = becca.getBranchFromChildAndParent(a.noteId, this.noteId);
|
||||||
const bBranch = becca.getBranchFromChildAndParent(b.noteId, this.noteId);
|
const bBranch = becca.getBranchFromChildAndParent(b.noteId, this.noteId);
|
||||||
|
|
||||||
return aBranch?.notePosition < bBranch?.notePosition ? -1 : 1;
|
return (aBranch?.notePosition - bBranch?.notePosition) || 0;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1158,7 +1189,7 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {BAttachment[]} */
|
/** @returns {BAttachment[]} */
|
||||||
getAttachmentByRole(role) {
|
getAttachmentsByRole(role) {
|
||||||
return sql.getRows(`
|
return sql.getRows(`
|
||||||
SELECT attachments.*
|
SELECT attachments.*
|
||||||
FROM attachments
|
FROM attachments
|
||||||
@@ -1169,6 +1200,12 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
.map(row => new BAttachment(row));
|
.map(row => new BAttachment(row));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @returns {BAttachment} */
|
||||||
|
getAttachmentByTitle(title) {
|
||||||
|
// cannot use SQL to filter by title since it can be encrypted
|
||||||
|
return this.getAttachments().filter(attachment => attachment.title === title)[0];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gives all possible note paths leading to this note. Paths containing search note are ignored (could form cycles)
|
* Gives all possible note paths leading to this note. Paths containing search note are ignored (could form cycles)
|
||||||
*
|
*
|
||||||
@@ -1194,7 +1231,7 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} [hoistedNoteId='root']
|
* @param {string} [hoistedNoteId='root']
|
||||||
* @return {Array<{isArchived: boolean, isInHoistedSubTree: boolean, notePath: Array<string>, isHidden: boolean}>}
|
* @return {Array<NotePathRecord>}
|
||||||
*/
|
*/
|
||||||
getSortedNotePathRecords(hoistedNoteId = 'root') {
|
getSortedNotePathRecords(hoistedNoteId = 'root') {
|
||||||
const isHoistedRoot = hoistedNoteId === 'root';
|
const isHoistedRoot = hoistedNoteId === 'root';
|
||||||
@@ -1599,7 +1636,6 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
saveRevision() {
|
saveRevision() {
|
||||||
return sql.transactional(() => {
|
return sql.transactional(() => {
|
||||||
let noteContent = this.getContent();
|
let noteContent = this.getContent();
|
||||||
const contentMetadata = this.getContentMetadata();
|
|
||||||
|
|
||||||
const revision = new BRevision({
|
const revision = new BRevision({
|
||||||
noteId: this.noteId,
|
noteId: this.noteId,
|
||||||
@@ -1608,29 +1644,21 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
type: this.type,
|
type: this.type,
|
||||||
mime: this.mime,
|
mime: this.mime,
|
||||||
isProtected: this.isProtected,
|
isProtected: this.isProtected,
|
||||||
utcDateLastEdited: this.utcDateModified > contentMetadata.utcDateModified
|
utcDateLastEdited: this.utcDateModified,
|
||||||
? this.utcDateModified
|
|
||||||
: contentMetadata.utcDateModified,
|
|
||||||
utcDateCreated: dateUtils.utcNowDateTime(),
|
utcDateCreated: dateUtils.utcNowDateTime(),
|
||||||
utcDateModified: dateUtils.utcNowDateTime(),
|
utcDateModified: dateUtils.utcNowDateTime(),
|
||||||
dateLastEdited: this.dateModified > contentMetadata.dateModified
|
dateLastEdited: this.dateModified,
|
||||||
? this.dateModified
|
|
||||||
: contentMetadata.dateModified,
|
|
||||||
dateCreated: dateUtils.localNowDateTime()
|
dateCreated: dateUtils.localNowDateTime()
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
revision.save(); // to generate revisionId, which is then used to save attachments
|
revision.save(); // to generate revisionId, which is then used to save attachments
|
||||||
|
|
||||||
if (this.type === 'text') {
|
|
||||||
for (const noteAttachment of this.getAttachments()) {
|
for (const noteAttachment of this.getAttachments()) {
|
||||||
if (noteAttachment.utcDateScheduledForErasureSince) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const revisionAttachment = noteAttachment.copy();
|
const revisionAttachment = noteAttachment.copy();
|
||||||
revisionAttachment.ownerId = revision.revisionId;
|
revisionAttachment.ownerId = revision.revisionId;
|
||||||
revisionAttachment.setContent(noteAttachment.getContent(), {forceSave: true});
|
revisionAttachment.setContent(noteAttachment.getContent(), {forceSave: true});
|
||||||
|
|
||||||
|
if (this.type === 'text') {
|
||||||
// content is rewritten to point to the revision attachments
|
// content is rewritten to point to the revision attachments
|
||||||
noteContent = noteContent.replaceAll(`attachments/${noteAttachment.attachmentId}`,
|
noteContent = noteContent.replaceAll(`attachments/${noteAttachment.attachmentId}`,
|
||||||
`attachments/${revisionAttachment.attachmentId}`);
|
`attachments/${revisionAttachment.attachmentId}`);
|
||||||
@@ -1638,24 +1666,33 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
noteContent = noteContent.replaceAll(new RegExp(`href="[^"]*attachmentId=${noteAttachment.attachmentId}[^"]*"`, 'gi'),
|
noteContent = noteContent.replaceAll(new RegExp(`href="[^"]*attachmentId=${noteAttachment.attachmentId}[^"]*"`, 'gi'),
|
||||||
`href="api/attachments/${revisionAttachment.attachmentId}/download"`);
|
`href="api/attachments/${revisionAttachment.attachmentId}/download"`);
|
||||||
}
|
}
|
||||||
|
|
||||||
revision.setContent(noteContent, {forceSave: true});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
revision.setContent(noteContent);
|
||||||
|
|
||||||
return revision;
|
return revision;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param {string} matchBy - choose by which property we detect if to update an existing attachment.
|
||||||
|
* Supported values are either 'attachmentId' (default) or 'title'
|
||||||
* @returns {BAttachment}
|
* @returns {BAttachment}
|
||||||
*/
|
*/
|
||||||
saveAttachment({attachmentId, role, mime, title, content, position}) {
|
saveAttachment({attachmentId, role, mime, title, content, position}, matchBy = 'attachmentId') {
|
||||||
|
if (!['attachmentId', 'title'].includes(matchBy)) {
|
||||||
|
throw new Error(`Unsupported value '${matchBy}' for matchBy param, has to be either 'attachmentId' or 'title'.`);
|
||||||
|
}
|
||||||
|
|
||||||
let attachment;
|
let attachment;
|
||||||
|
|
||||||
if (attachmentId) {
|
if (matchBy === 'title') {
|
||||||
|
attachment = this.getAttachmentByTitle(title);
|
||||||
|
} else if (matchBy === 'attachmentId' && attachmentId) {
|
||||||
attachment = this.becca.getAttachmentOrThrow(attachmentId);
|
attachment = this.becca.getAttachmentOrThrow(attachmentId);
|
||||||
} else {
|
}
|
||||||
attachment = new BAttachment({
|
|
||||||
|
attachment = attachment || new BAttachment({
|
||||||
ownerId: this.noteId,
|
ownerId: this.noteId,
|
||||||
title,
|
title,
|
||||||
role,
|
role,
|
||||||
@@ -1663,7 +1700,6 @@ class BNote extends AbstractBeccaEntity {
|
|||||||
isProtected: this.isProtected,
|
isProtected: this.isProtected,
|
||||||
position
|
position
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
content = content || "";
|
content = content || "";
|
||||||
attachment.setContent(content, {forceSave: true});
|
attachment.setContent(content, {forceSave: true});
|
||||||
@@ -1728,7 +1764,7 @@ module.exports = BNote;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ module.exports = BOption;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ module.exports = BRecentNote;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
259
docs/backend_api/becca_entities_brevision.js.html
Normal file
259
docs/backend_api/becca_entities_brevision.js.html
Normal file
@@ -0,0 +1,259 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>JSDoc: Source: becca/entities/brevision.js</title>
|
||||||
|
|
||||||
|
<script src="scripts/prettify/prettify.js"> </script>
|
||||||
|
<script src="scripts/prettify/lang-css.js"> </script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<h1 class="page-title">Source: becca/entities/brevision.js</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<article>
|
||||||
|
<pre class="prettyprint source linenums"><code>"use strict";
|
||||||
|
|
||||||
|
const protectedSessionService = require('../../services/protected_session');
|
||||||
|
const utils = require('../../services/utils');
|
||||||
|
const dateUtils = require('../../services/date_utils');
|
||||||
|
const becca = require('../becca');
|
||||||
|
const AbstractBeccaEntity = require("./abstract_becca_entity");
|
||||||
|
const sql = require("../../services/sql");
|
||||||
|
const BAttachment = require("./battachment");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Revision represents a snapshot of note's title and content at some point in the past.
|
||||||
|
* It's used for seamless note versioning.
|
||||||
|
*
|
||||||
|
* @extends AbstractBeccaEntity
|
||||||
|
*/
|
||||||
|
class BRevision extends AbstractBeccaEntity {
|
||||||
|
static get entityName() { return "revisions"; }
|
||||||
|
static get primaryKeyName() { return "revisionId"; }
|
||||||
|
static get hashedProperties() { return ["revisionId", "noteId", "title", "isProtected", "dateLastEdited", "dateCreated",
|
||||||
|
"utcDateLastEdited", "utcDateCreated", "utcDateModified", "blobId"]; }
|
||||||
|
|
||||||
|
constructor(row, titleDecrypted = false) {
|
||||||
|
super();
|
||||||
|
|
||||||
|
/** @type {string} */
|
||||||
|
this.revisionId = row.revisionId;
|
||||||
|
/** @type {string} */
|
||||||
|
this.noteId = row.noteId;
|
||||||
|
/** @type {string} */
|
||||||
|
this.type = row.type;
|
||||||
|
/** @type {string} */
|
||||||
|
this.mime = row.mime;
|
||||||
|
/** @type {boolean} */
|
||||||
|
this.isProtected = !!row.isProtected;
|
||||||
|
/** @type {string} */
|
||||||
|
this.title = row.title;
|
||||||
|
/** @type {string} */
|
||||||
|
this.blobId = row.blobId;
|
||||||
|
/** @type {string} */
|
||||||
|
this.dateLastEdited = row.dateLastEdited;
|
||||||
|
/** @type {string} */
|
||||||
|
this.dateCreated = row.dateCreated;
|
||||||
|
/** @type {string} */
|
||||||
|
this.utcDateLastEdited = row.utcDateLastEdited;
|
||||||
|
/** @type {string} */
|
||||||
|
this.utcDateCreated = row.utcDateCreated;
|
||||||
|
/** @type {string} */
|
||||||
|
this.utcDateModified = row.utcDateModified;
|
||||||
|
/** @type {int} */
|
||||||
|
this.contentLength = row.contentLength;
|
||||||
|
|
||||||
|
if (this.isProtected && !titleDecrypted) {
|
||||||
|
this.title = protectedSessionService.isProtectedSessionAvailable()
|
||||||
|
? protectedSessionService.decryptString(this.title)
|
||||||
|
: "[protected]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getNote() {
|
||||||
|
return becca.notes[this.noteId];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {boolean} true if the note has string content (not binary) */
|
||||||
|
hasStringContent() {
|
||||||
|
return utils.isStringNote(this.type, this.mime);
|
||||||
|
}
|
||||||
|
|
||||||
|
isContentAvailable() {
|
||||||
|
return !this.revisionId // new note which was not encrypted yet
|
||||||
|
|| !this.isProtected
|
||||||
|
|| protectedSessionService.isProtectedSessionAvailable()
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note revision content has quite special handling - it's not a separate entity, but a lazily loaded
|
||||||
|
* part of Revision entity with its own sync. The reason behind this hybrid design is that
|
||||||
|
* content can be quite large, and it's not necessary to load it / fill memory for any note access even
|
||||||
|
* if we don't need a content, especially for bulk operations like search.
|
||||||
|
*
|
||||||
|
* This is the same approach as is used for Note's content.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @returns {string|Buffer} */
|
||||||
|
getContent() {
|
||||||
|
return this._getContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {*}
|
||||||
|
* @throws Error in case of invalid JSON */
|
||||||
|
getJsonContent() {
|
||||||
|
const content = this.getContent();
|
||||||
|
|
||||||
|
if (!content || !content.trim()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.parse(content);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {*|null} valid object or null if the content cannot be parsed as JSON */
|
||||||
|
getJsonContentSafely() {
|
||||||
|
try {
|
||||||
|
return this.getJsonContent();
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param content
|
||||||
|
* @param {object} [opts]
|
||||||
|
* @param {object} [opts.forceSave=false] - will also save this BRevision entity
|
||||||
|
*/
|
||||||
|
setContent(content, opts) {
|
||||||
|
this._setContent(content, opts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {BAttachment[]} */
|
||||||
|
getAttachments() {
|
||||||
|
return sql.getRows(`
|
||||||
|
SELECT attachments.*
|
||||||
|
FROM attachments
|
||||||
|
WHERE ownerId = ?
|
||||||
|
AND isDeleted = 0`, [this.revisionId])
|
||||||
|
.map(row => new BAttachment(row));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {BAttachment|null} */
|
||||||
|
getAttachmentById(attachmentId, opts = {}) {
|
||||||
|
opts.includeContentLength = !!opts.includeContentLength;
|
||||||
|
|
||||||
|
const query = opts.includeContentLength
|
||||||
|
? `SELECT attachments.*, LENGTH(blobs.content) AS contentLength
|
||||||
|
FROM attachments
|
||||||
|
JOIN blobs USING (blobId)
|
||||||
|
WHERE ownerId = ? AND attachmentId = ? AND isDeleted = 0`
|
||||||
|
: `SELECT * FROM attachments WHERE ownerId = ? AND attachmentId = ? AND isDeleted = 0`;
|
||||||
|
|
||||||
|
return sql.getRows(query, [this.revisionId, attachmentId])
|
||||||
|
.map(row => new BAttachment(row))[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {BAttachment[]} */
|
||||||
|
getAttachmentsByRole(role) {
|
||||||
|
return sql.getRows(`
|
||||||
|
SELECT attachments.*
|
||||||
|
FROM attachments
|
||||||
|
WHERE ownerId = ?
|
||||||
|
AND role = ?
|
||||||
|
AND isDeleted = 0
|
||||||
|
ORDER BY position`, [this.revisionId, role])
|
||||||
|
.map(row => new BAttachment(row));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {BAttachment} */
|
||||||
|
getAttachmentByTitle(title) {
|
||||||
|
// cannot use SQL to filter by title since it can be encrypted
|
||||||
|
return this.getAttachments().filter(attachment => attachment.title === title)[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
beforeSaving() {
|
||||||
|
super.beforeSaving();
|
||||||
|
|
||||||
|
this.utcDateModified = dateUtils.utcNowDateTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
getPojo() {
|
||||||
|
return {
|
||||||
|
revisionId: this.revisionId,
|
||||||
|
noteId: this.noteId,
|
||||||
|
type: this.type,
|
||||||
|
mime: this.mime,
|
||||||
|
isProtected: this.isProtected,
|
||||||
|
title: this.title,
|
||||||
|
blobId: this.blobId,
|
||||||
|
dateLastEdited: this.dateLastEdited,
|
||||||
|
dateCreated: this.dateCreated,
|
||||||
|
utcDateLastEdited: this.utcDateLastEdited,
|
||||||
|
utcDateCreated: this.utcDateCreated,
|
||||||
|
utcDateModified: this.utcDateModified,
|
||||||
|
content: this.content, // used when retrieving full note revision to frontend
|
||||||
|
contentLength: this.contentLength
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
getPojoToSave() {
|
||||||
|
const pojo = this.getPojo();
|
||||||
|
delete pojo.content; // not getting persisted
|
||||||
|
delete pojo.contentLength; // not getting persisted
|
||||||
|
|
||||||
|
if (pojo.isProtected) {
|
||||||
|
if (protectedSessionService.isProtectedSessionAvailable()) {
|
||||||
|
pojo.title = protectedSessionService.encrypt(this.title);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// updating protected note outside of protected session means we will keep original ciphertexts
|
||||||
|
delete pojo.title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return pojo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = BRevision;
|
||||||
|
</code></pre>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<br class="clear">
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script> prettyPrint(); </script>
|
||||||
|
<script src="scripts/linenumber.js"> </script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
657
docs/backend_api/global.html
Normal file
657
docs/backend_api/global.html
Normal file
@@ -0,0 +1,657 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>JSDoc: Global</title>
|
||||||
|
|
||||||
|
<script src="scripts/prettify/prettify.js"> </script>
|
||||||
|
<script src="scripts/prettify/lang-css.js"> </script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<h1 class="page-title">Global</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<header>
|
||||||
|
|
||||||
|
<h2></h2>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<article>
|
||||||
|
<div class="container-overview">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3 class="subsection-title">Members</h3>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="api"><span class="type-signature"></span>api<span class="type-signature"> :<a href="BackendScriptApi.html">BackendScriptApi</a></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
An instance of the frontend api available globally.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Type:</h5>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class="param-type"><a href="BackendScriptApi.html">BackendScriptApi</a></span>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<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#line32">line 32</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3 class="subsection-title">Type Definitions</h3>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="AttributeType">AttributeType</h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
There are currently only two types of attributes, labels or relations.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Type:</h5>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class="param-type">"label"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"relation"</span>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="becca_entities_battribute.js.html">becca/entities/battribute.js</a>, <a href="becca_entities_battribute.js.html#line11">line 11</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="NotePathRecord">NotePathRecord</h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Type:</h5>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class="param-type">Object</span>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5 class="subsection-title">Properties:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<table class="props">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<th>Name</th>
|
||||||
|
|
||||||
|
|
||||||
|
<th>Type</th>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<th class="last">Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td class="name"><code>isArchived</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">boolean</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td class="description last"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td class="name"><code>isInHoistedSubTree</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">boolean</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td class="description last"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td class="name"><code>notePath</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">Array.<string></span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td class="description last"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td class="name"><code>isHidden</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">boolean</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="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line27">line 27</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="NoteType">NoteType</h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
There are many different Note types, some of which are entirely opaque to the
|
||||||
|
end user. Those types should be used only for checking against, they are
|
||||||
|
not for direct use.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Type:</h5>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class="param-type">"file"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"image"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"search"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"noteMap"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"launcher"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"doc"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"contentWidget"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"text"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"relationMap"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"render"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"canvas"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"mermaid"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"book"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"webView"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"code"</span>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="becca_entities_bnote.js.html">becca/entities/bnote.js</a>, <a href="becca_entities_bnote.js.html#line20">line 20</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="int">int</h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
A whole number
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Type:</h5>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class="param-type">number</span>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<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#line27">line 27</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<br class="clear">
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script> prettyPrint(); </script>
|
||||||
|
<script src="scripts/linenumber.js"> </script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -250,7 +250,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line364">line 364</a>
|
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line377">line 377</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -430,7 +430,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line355">line 355</a>
|
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line368">line 368</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -632,7 +632,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line345">line 345</a>
|
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line358">line 358</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -834,7 +834,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line321">line 321</a>
|
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line334">line 334</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1036,7 +1036,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line332">line 332</a>
|
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line345">line 345</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1238,7 +1238,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line311">line 311</a>
|
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line324">line 324</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1294,7 +1294,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -47,6 +47,21 @@ const SpacedUpdate = require("./spaced_update");
|
|||||||
const specialNotesService = require("./special_notes");
|
const specialNotesService = require("./special_notes");
|
||||||
const branchService = require("./branches");
|
const branchService = require("./branches");
|
||||||
const exportService = require("./export/zip");
|
const exportService = require("./export/zip");
|
||||||
|
const syncMutex = require("./sync_mutex");
|
||||||
|
const backupService = require("./backup");
|
||||||
|
const optionsService = require("./options");
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A whole number
|
||||||
|
* @typedef {number} int
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An instance of the frontend api available globally.
|
||||||
|
* @global
|
||||||
|
* @var {BackendScriptApi} api
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>This is the main backend API interface for scripts. All the properties and methods are published in the "api" object
|
* <p>This is the main backend API interface for scripts. All the properties and methods are published in the "api" object
|
||||||
@@ -55,11 +70,20 @@ const exportService = require("./export/zip");
|
|||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function BackendScriptApi(currentNote, apiParams) {
|
function BackendScriptApi(currentNote, apiParams) {
|
||||||
/** @property {BNote} note where the script started executing */
|
/**
|
||||||
|
* Note where the script started executing
|
||||||
|
* @type {BNote}
|
||||||
|
*/
|
||||||
this.startNote = apiParams.startNote;
|
this.startNote = apiParams.startNote;
|
||||||
/** @property {BNote} note where the script is currently executing. Don't mix this up with the concept of active note */
|
/**
|
||||||
|
* Note where the script is currently executing. Don't mix this up with the concept of active note
|
||||||
|
* @type {BNote}
|
||||||
|
*/
|
||||||
this.currentNote = currentNote;
|
this.currentNote = currentNote;
|
||||||
/** @property {AbstractBeccaEntity} entity whose event triggered this execution */
|
/**
|
||||||
|
* Entity whose event triggered this execution
|
||||||
|
* @type {AbstractBeccaEntity}
|
||||||
|
*/
|
||||||
this.originEntity = apiParams.originEntity;
|
this.originEntity = apiParams.originEntity;
|
||||||
|
|
||||||
for (const key in apiParams) {
|
for (const key in apiParams) {
|
||||||
@@ -67,13 +91,20 @@ function BackendScriptApi(currentNote, apiParams) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {axios} Axios library for HTTP requests. See {@link https://axios-http.com} for documentation
|
* Axios library for HTTP requests. See {@link https://axios-http.com} for documentation
|
||||||
|
* @type {axios}
|
||||||
* @deprecated use native (browser compatible) fetch() instead
|
* @deprecated use native (browser compatible) fetch() instead
|
||||||
*/
|
*/
|
||||||
this.axios = axios;
|
this.axios = axios;
|
||||||
/** @property {dayjs} day.js library for date manipulation. See {@link https://day.js.org} for documentation */
|
/**
|
||||||
|
* day.js library for date manipulation. See {@link https://day.js.org} for documentation
|
||||||
|
* @type {dayjs}
|
||||||
|
*/
|
||||||
this.dayjs = dayjs;
|
this.dayjs = dayjs;
|
||||||
/** @property {axios} xml2js library for XML parsing. See {@link https://github.com/Leonidas-from-XIV/node-xml2js} for documentation */
|
/**
|
||||||
|
* xml2js library for XML parsing. See {@link https://github.com/Leonidas-from-XIV/node-xml2js} for documentation
|
||||||
|
* @type {xml2js}
|
||||||
|
*/
|
||||||
this.xml2js = xml2js;
|
this.xml2js = xml2js;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -105,6 +136,53 @@ function BackendScriptApi(currentNote, apiParams) {
|
|||||||
*/
|
*/
|
||||||
this.getAttribute = attributeId => becca.getAttribute(attributeId);
|
this.getAttribute = attributeId => becca.getAttribute(attributeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
* @param {string} attachmentId
|
||||||
|
* @returns {BAttachment|null}
|
||||||
|
*/
|
||||||
|
this.getAttachment = attachmentId => becca.getAttachment(attachmentId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
* @param {string} revisionId
|
||||||
|
* @returns {BRevision|null}
|
||||||
|
*/
|
||||||
|
this.getRevision = revisionId => becca.getRevision(revisionId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
* @param {string} etapiTokenId
|
||||||
|
* @returns {BEtapiToken|null}
|
||||||
|
*/
|
||||||
|
this.getEtapiToken = etapiTokenId => becca.getEtapiToken(etapiTokenId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
* @returns {BEtapiToken[]}
|
||||||
|
*/
|
||||||
|
this.getEtapiTokens = () => becca.getEtapiTokens();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
* @param {string} optionName
|
||||||
|
* @returns {BOption|null}
|
||||||
|
*/
|
||||||
|
this.getOption = optionName => becca.getOption(optionName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
* @returns {BOption[]}
|
||||||
|
*/
|
||||||
|
this.getOptions = () => optionsService.getOptions();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
* @param {string} attributeId
|
||||||
|
* @returns {BAttribute|null}
|
||||||
|
*/
|
||||||
|
this.getAttribute = attributeId => becca.getAttribute(attributeId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a powerful search method - you can search by attributes and their values, e.g.:
|
* This is a powerful search method - you can search by attributes and their values, e.g.:
|
||||||
* "#dateModified =* MONTH AND #log". See {@link https://github.com/zadam/trilium/wiki/Search} for full documentation for all options
|
* "#dateModified =* MONTH AND #log". See {@link https://github.com/zadam/trilium/wiki/Search} for full documentation for all options
|
||||||
@@ -234,16 +312,16 @@ function BackendScriptApi(currentNote, apiParams) {
|
|||||||
/**
|
/**
|
||||||
* @method
|
* @method
|
||||||
*
|
*
|
||||||
* @property {object} params
|
* @param {object} params
|
||||||
* @property {string} params.parentNoteId
|
* @param {string} params.parentNoteId
|
||||||
* @property {string} params.title
|
* @param {string} params.title
|
||||||
* @property {string|buffer} params.content
|
* @param {string|Buffer} params.content
|
||||||
* @property {string} params.type - text, code, file, image, search, book, relationMap, canvas
|
* @param {NoteType} params.type - text, code, file, image, search, book, relationMap, canvas
|
||||||
* @property {string} [params.mime] - value is derived from default mimes for type
|
* @param {string} [params.mime] - value is derived from default mimes for type
|
||||||
* @property {boolean} [params.isProtected=false]
|
* @param {boolean} [params.isProtected=false]
|
||||||
* @property {boolean} [params.isExpanded=false]
|
* @param {boolean} [params.isExpanded=false]
|
||||||
* @property {string} [params.prefix='']
|
* @param {string} [params.prefix='']
|
||||||
* @property {int} [params.notePosition] - default is last existing notePosition in a parent + 10
|
* @param {int} [params.notePosition] - default is last existing notePosition in a parent + 10
|
||||||
* @returns {{note: BNote, branch: BBranch}} object contains newly created entities note and branch
|
* @returns {{note: BNote, branch: BBranch}} object contains newly created entities note and branch
|
||||||
*/
|
*/
|
||||||
this.createNewNote = noteService.createNewNote;
|
this.createNewNote = noteService.createNewNote;
|
||||||
@@ -256,14 +334,14 @@ function BackendScriptApi(currentNote, apiParams) {
|
|||||||
* @param {string} title
|
* @param {string} title
|
||||||
* @param {string} [content=""]
|
* @param {string} [content=""]
|
||||||
* @param {object} [extraOptions={}]
|
* @param {object} [extraOptions={}]
|
||||||
* @property {boolean} [extraOptions.json=false] - should the note be JSON
|
* @param {boolean} [extraOptions.json=false] - should the note be JSON
|
||||||
* @property {boolean} [extraOptions.isProtected=false] - should the note be protected
|
* @param {boolean} [extraOptions.isProtected=false] - should the note be protected
|
||||||
* @property {string} [extraOptions.type='text'] - note type
|
* @param {string} [extraOptions.type='text'] - note type
|
||||||
* @property {string} [extraOptions.mime='text/html'] - MIME type of the note
|
* @param {string} [extraOptions.mime='text/html'] - MIME type of the note
|
||||||
* @property {object[]} [extraOptions.attributes=[]] - attributes to be created for this note
|
* @param {object[]} [extraOptions.attributes=[]] - attributes to be created for this note
|
||||||
* @property {string} extraOptions.attributes.type - attribute type - label, relation etc.
|
* @param {AttributeType} extraOptions.attributes.type - attribute type - label, relation etc.
|
||||||
* @property {string} extraOptions.attributes.name - attribute name
|
* @param {string} extraOptions.attributes.name - attribute name
|
||||||
* @property {string} [extraOptions.attributes.value] - attribute value
|
* @param {string} [extraOptions.attributes.value] - attribute value
|
||||||
* @returns {{note: BNote, branch: BBranch}} object contains newly created entities note and branch
|
* @returns {{note: BNote, branch: BBranch}} object contains newly created entities note and branch
|
||||||
*/
|
*/
|
||||||
this.createNote = (parentNoteId, title, content = "", extraOptions= {}) => {
|
this.createNote = (parentNoteId, title, content = "", extraOptions= {}) => {
|
||||||
@@ -373,7 +451,7 @@ function BackendScriptApi(currentNote, apiParams) {
|
|||||||
this.getWeekNote = dateNoteService.getWeekNote;
|
this.getWeekNote = dateNoteService.getWeekNote;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns month note for given date. If such note doesn't exist, it is created.
|
* Returns month note for given date. If such a note doesn't exist, it is created.
|
||||||
*
|
*
|
||||||
* @method
|
* @method
|
||||||
* @param {string} date in YYYY-MM format
|
* @param {string} date in YYYY-MM format
|
||||||
@@ -383,7 +461,7 @@ function BackendScriptApi(currentNote, apiParams) {
|
|||||||
this.getMonthNote = dateNoteService.getMonthNote;
|
this.getMonthNote = dateNoteService.getMonthNote;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns year note for given year. If such note doesn't exist, it is created.
|
* Returns year note for given year. If such a note doesn't exist, it is created.
|
||||||
*
|
*
|
||||||
* @method
|
* @method
|
||||||
* @param {string} year in YYYY format
|
* @param {string} year in YYYY format
|
||||||
@@ -398,10 +476,10 @@ function BackendScriptApi(currentNote, apiParams) {
|
|||||||
* @method
|
* @method
|
||||||
* @param {string} parentNoteId - this note's child notes will be sorted
|
* @param {string} parentNoteId - this note's child notes will be sorted
|
||||||
* @param {object} [sortConfig]
|
* @param {object} [sortConfig]
|
||||||
* @property {string} [sortConfig.sortBy=title] - 'title', 'dateCreated', 'dateModified' or a label name
|
* @param {string} [sortConfig.sortBy=title] - 'title', 'dateCreated', 'dateModified' or a label name
|
||||||
* See {@link https://github.com/zadam/trilium/wiki/Sorting} for details.
|
* See {@link https://github.com/zadam/trilium/wiki/Sorting} for details.
|
||||||
* @property {boolean} [sortConfig.reverse=false]
|
* @param {boolean} [sortConfig.reverse=false]
|
||||||
* @property {boolean} [sortConfig.foldersFirst=false]
|
* @param {boolean} [sortConfig.foldersFirst=false]
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
this.sortNotes = (parentNoteId, sortConfig = {}) => treeService.sortNotes(
|
this.sortNotes = (parentNoteId, sortConfig = {}) => treeService.sortNotes(
|
||||||
@@ -432,7 +510,7 @@ function BackendScriptApi(currentNote, apiParams) {
|
|||||||
*
|
*
|
||||||
* @method
|
* @method
|
||||||
* @param {function} func
|
* @param {function} func
|
||||||
* @returns {?} result of func callback
|
* @returns {any} result of func callback
|
||||||
*/
|
*/
|
||||||
this.transactional = sql.transactional;
|
this.transactional = sql.transactional;
|
||||||
|
|
||||||
@@ -460,7 +538,8 @@ function BackendScriptApi(currentNote, apiParams) {
|
|||||||
this.unescapeHtml = utils.unescapeHtml;
|
this.unescapeHtml = utils.unescapeHtml;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {module:sql} sql
|
* sql
|
||||||
|
* @type {module:sql}
|
||||||
*/
|
*/
|
||||||
this.sql = sql;
|
this.sql = sql;
|
||||||
|
|
||||||
@@ -468,25 +547,25 @@ function BackendScriptApi(currentNote, apiParams) {
|
|||||||
* @method
|
* @method
|
||||||
* @returns {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version
|
* @returns {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version
|
||||||
*/
|
*/
|
||||||
this.getAppInfo = () => appInfo
|
this.getAppInfo = () => appInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.
|
* Creates a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.
|
||||||
*
|
*
|
||||||
* @method
|
* @method
|
||||||
* @param {object} opts
|
* @param {object} opts
|
||||||
* @property {string} opts.id - id of the launcher, only alphanumeric at least 6 characters long
|
* @param {string} opts.id - id of the launcher, only alphanumeric at least 6 characters long
|
||||||
* @property {string} opts.type - one of
|
* @param {"note" | "script" | "customWidget"} opts.type - one of
|
||||||
* * "note" - activating the launcher will navigate to the target note (specified in targetNoteId param)
|
* * "note" - activating the launcher will navigate to the target note (specified in targetNoteId param)
|
||||||
* * "script" - activating the launcher will execute the script (specified in scriptNoteId param)
|
* * "script" - activating the launcher will execute the script (specified in scriptNoteId param)
|
||||||
* * "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)
|
* * "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)
|
||||||
* @property {string} opts.title
|
* @param {string} opts.title
|
||||||
* @property {boolean} [opts.isVisible=false] - if true, will be created in the "Visible launchers", otherwise in "Available launchers"
|
* @param {boolean} [opts.isVisible=false] - if true, will be created in the "Visible launchers", otherwise in "Available launchers"
|
||||||
* @property {string} [opts.icon] - name of the boxicon to be used (e.g. "bx-time")
|
* @param {string} [opts.icon] - name of the boxicon to be used (e.g. "bx-time")
|
||||||
* @property {string} [opts.keyboardShortcut] - will activate the target note/script upon pressing, e.g. "ctrl+e"
|
* @param {string} [opts.keyboardShortcut] - will activate the target note/script upon pressing, e.g. "ctrl+e"
|
||||||
* @property {string} [opts.targetNoteId] - for type "note"
|
* @param {string} [opts.targetNoteId] - for type "note"
|
||||||
* @property {string} [opts.scriptNoteId] - for type "script"
|
* @param {string} [opts.scriptNoteId] - for type "script"
|
||||||
* @property {string} [opts.widgetNoteId] - for type "customWidget"
|
* @param {string} [opts.widgetNoteId] - for type "customWidget"
|
||||||
* @returns {{note: BNote}}
|
* @returns {{note: BNote}}
|
||||||
*/
|
*/
|
||||||
this.createOrUpdateLauncher = opts => {
|
this.createOrUpdateLauncher = opts => {
|
||||||
@@ -557,6 +636,69 @@ function BackendScriptApi(currentNote, apiParams) {
|
|||||||
*/
|
*/
|
||||||
this.exportSubtreeToZipFile = async (noteId, format, zipFilePath) => await exportService.exportToZipFile(noteId, format, zipFilePath);
|
this.exportSubtreeToZipFile = async (noteId, format, zipFilePath) => await exportService.exportToZipFile(noteId, format, zipFilePath);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Executes given anonymous function on the frontend(s).
|
||||||
|
* Internally, this serializes the anonymous function into string and sends it to frontend(s) via WebSocket.
|
||||||
|
* Note that there can be multiple connected frontend instances (e.g. in different tabs). In such case, all
|
||||||
|
* instances execute the given function.
|
||||||
|
*
|
||||||
|
* @method
|
||||||
|
* @param {string} script - script to be executed on the frontend
|
||||||
|
* @param {Array.<?>} params - list of parameters to the anonymous function to be sent to frontend
|
||||||
|
* @returns {undefined} - no return value is provided.
|
||||||
|
*/
|
||||||
|
this.runOnFrontend = async (script, params = []) => {
|
||||||
|
if (typeof script === "function") {
|
||||||
|
script = script.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
ws.sendMessageToAllClients({
|
||||||
|
type: 'execute-script',
|
||||||
|
script: script,
|
||||||
|
params: prepareParams(params),
|
||||||
|
startNoteId: this.startNote.noteId,
|
||||||
|
currentNoteId: this.currentNote.noteId,
|
||||||
|
originEntityName: "notes", // currently there's no other entity on the frontend which can trigger event
|
||||||
|
originEntityId: this.originEntity?.noteId || null
|
||||||
|
});
|
||||||
|
|
||||||
|
function prepareParams(params) {
|
||||||
|
if (!params) {
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
return params.map(p => {
|
||||||
|
if (typeof p === "function") {
|
||||||
|
return `!@#Function: ${p.toString()}`;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sync process can make data intermittently inconsistent. Scripts which require strong data consistency
|
||||||
|
* can use this function to wait for a possible sync process to finish and prevent new sync process from starting
|
||||||
|
* while it is running.
|
||||||
|
*
|
||||||
|
* Because this is an async process, the inner callback doesn't have automatic transaction handling, so in case
|
||||||
|
* you need to make some DB changes, you need to surround your call with api.transactional(...)
|
||||||
|
*
|
||||||
|
* @method
|
||||||
|
* @param {function} callback - function to be executed while sync process is not running
|
||||||
|
* @returns {Promise} - resolves once the callback is finished (callback is awaited)
|
||||||
|
*/
|
||||||
|
this.runOutsideOfSync = syncMutex.doExclusively;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
* @param {string} backupName - If the backupName is e.g. "now", then the backup will be written to "backup-now.db" file
|
||||||
|
* @returns {Promise} - resolves once the backup is finished
|
||||||
|
*/
|
||||||
|
this.backupNow = backupService.backupNow;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This object contains "at your risk" and "no BC guarantees" objects for advanced use cases.
|
* This object contains "at your risk" and "no BC guarantees" objects for advanced use cases.
|
||||||
*
|
*
|
||||||
@@ -578,7 +720,7 @@ module.exports = BackendScriptApi;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ const LOG_ALL_QUERIES = false;
|
|||||||
});
|
});
|
||||||
|
|
||||||
function insert(tableName, rec, replace = false) {
|
function insert(tableName, rec, replace = false) {
|
||||||
const keys = Object.keys(rec);
|
const keys = Object.keys(rec || {});
|
||||||
if (keys.length === 0) {
|
if (keys.length === 0) {
|
||||||
log.error(`Can't insert empty object into table ${tableName}`);
|
log.error(`Can't insert empty object into table ${tableName}`);
|
||||||
return;
|
return;
|
||||||
@@ -81,7 +81,7 @@ function replace(tableName, rec) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function upsert(tableName, primaryKey, rec) {
|
function upsert(tableName, primaryKey, rec) {
|
||||||
const keys = Object.keys(rec);
|
const keys = Object.keys(rec || {});
|
||||||
if (keys.length === 0) {
|
if (keys.length === 0) {
|
||||||
log.error(`Can't upsert empty object into table ${tableName}`);
|
log.error(`Can't upsert empty object into table ${tableName}`);
|
||||||
return;
|
return;
|
||||||
@@ -253,7 +253,7 @@ function wrap(query, func) {
|
|||||||
|
|
||||||
const milliseconds = Date.now() - startTimestamp;
|
const milliseconds = Date.now() - startTimestamp;
|
||||||
|
|
||||||
if (milliseconds >= 20) {
|
if (milliseconds >= 20 && !cls.isSlowQueryLoggingDisabled()) {
|
||||||
if (query.includes("WITH RECURSIVE")) {
|
if (query.includes("WITH RECURSIVE")) {
|
||||||
log.info(`Slow recursive query took ${milliseconds}ms.`);
|
log.info(`Slow recursive query took ${milliseconds}ms.`);
|
||||||
}
|
}
|
||||||
@@ -323,6 +323,19 @@ async function copyDatabase(targetFilePath) {
|
|||||||
await dbConnection.backup(targetFilePath);
|
await dbConnection.backup(targetFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function disableSlowQueryLogging(cb) {
|
||||||
|
const orig = cls.isSlowQueryLoggingDisabled();
|
||||||
|
|
||||||
|
try {
|
||||||
|
cls.disableSlowQueryLogging(true);
|
||||||
|
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
cls.disableSlowQueryLogging(orig);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
dbConnection,
|
dbConnection,
|
||||||
insert,
|
insert,
|
||||||
@@ -395,7 +408,8 @@ module.exports = {
|
|||||||
transactional,
|
transactional,
|
||||||
upsert,
|
upsert,
|
||||||
fillParamList,
|
fillParamList,
|
||||||
copyDatabase
|
copyDatabase,
|
||||||
|
disableSlowQueryLogging
|
||||||
};
|
};
|
||||||
</code></pre>
|
</code></pre>
|
||||||
</article>
|
</article>
|
||||||
@@ -407,7 +421,7 @@ module.exports = {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
426
docs/frontend_api/BasicWidget.html
Normal file
426
docs/frontend_api/BasicWidget.html
Normal file
@@ -0,0 +1,426 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>JSDoc: Class: BasicWidget</title>
|
||||||
|
|
||||||
|
<script src="scripts/prettify/prettify.js"> </script>
|
||||||
|
<script src="scripts/prettify/lang-css.js"> </script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<h1 class="page-title">Class: BasicWidget</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<header>
|
||||||
|
|
||||||
|
<h2><span class="attribs"><span class="type-signature"></span></span>BasicWidget<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||||
|
|
||||||
|
<div class="class-description">This is the base widget for all other widgets.
|
||||||
|
|
||||||
|
For information on using widgets, see the tutorial widget_basics.</div>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<article>
|
||||||
|
<div class="container-overview">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Constructor</h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="BasicWidget"><span class="type-signature"></span>new BasicWidget<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="widgets_basic_widget.js.html">widgets/basic_widget.js</a>, <a href="widgets_basic_widget.js.html#line9">line 9</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3 class="subsection-title">Methods</h3>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="cssBlock"><span class="type-signature"></span>cssBlock<span class="signature">(block)</span><span class="type-signature"> → {this}</span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
Accepts a string of CSS to add with the widget.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Parameters:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
<table class="params">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<th>Name</th>
|
||||||
|
|
||||||
|
|
||||||
|
<th>Type</th>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<th class="last">Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td class="name"><code>block</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">string</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td class="description last"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="widgets_basic_widget.js.html">widgets/basic_widget.js</a>, <a href="widgets_basic_widget.js.html#line78">line 78</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-desc">
|
||||||
|
for chaining
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">this</span>
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="doRender"><span class="type-signature"></span>doRender<span class="signature">()</span><span class="type-signature"></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
Method used for rendering the widget.
|
||||||
|
|
||||||
|
Your class should override this method.
|
||||||
|
The method is expected to create a this.$widget containing jQuery object
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="widgets_basic_widget.js.html">widgets/basic_widget.js</a>, <a href="widgets_basic_widget.js.html#line132">line 132</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<br class="clear">
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script> prettyPrint(); </script>
|
||||||
|
<script src="scripts/linenumber.js"> </script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
1067
docs/frontend_api/FAttachment.html
Normal file
1067
docs/frontend_api/FAttachment.html
Normal file
File diff suppressed because it is too large
Load Diff
@@ -94,7 +94,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line7">line 7</a>
|
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line12">line 12</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line17">line 17</a>
|
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line22">line 22</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line10">line 10</a>
|
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line15">line 15</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -330,7 +330,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line29">line 29</a>
|
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line34">line 34</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -398,7 +398,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line23">line 23</a>
|
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line28">line 28</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -466,7 +466,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line19">line 19</a>
|
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line24">line 24</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -484,7 +484,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="position"><span class="type-signature"></span>position<span class="type-signature"> :int</span></h4>
|
<h4 class="name" id="position"><span class="type-signature"></span>position<span class="type-signature"> :<a href="global.html#int">int</a></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -495,7 +495,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<span class="param-type">int</span>
|
<span class="param-type"><a href="global.html#int">int</a></span>
|
||||||
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@@ -534,7 +534,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line27">line 27</a>
|
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line32">line 32</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -552,7 +552,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4>
|
<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :<a href="global.html#AttributeType">AttributeType</a></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -563,7 +563,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
<span class="param-type"><a href="global.html#AttributeType">AttributeType</a></span>
|
||||||
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@@ -602,7 +602,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line21">line 21</a>
|
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line26">line 26</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -670,7 +670,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line25">line 25</a>
|
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line30">line 30</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -746,7 +746,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line33">line 33</a>
|
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line38">line 38</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -848,7 +848,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line38">line 38</a>
|
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line43">line 43</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -912,7 +912,7 @@ and relation (representing named relationship between source and target note)</d
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -488,7 +488,7 @@ parents.</div>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="notePosition"><span class="type-signature"></span>notePosition<span class="type-signature"> :int</span></h4>
|
<h4 class="name" id="notePosition"><span class="type-signature"></span>notePosition<span class="type-signature"> :<a href="global.html#int">int</a></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -499,7 +499,7 @@ parents.</div>
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<span class="param-type">int</span>
|
<span class="param-type"><a href="global.html#int">int</a></span>
|
||||||
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@@ -1124,7 +1124,7 @@ parents.</div>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -30,6 +30,8 @@
|
|||||||
|
|
||||||
<h2><span class="attribs"><span class="type-signature"></span></span>FNote<span class="signature">(froca, row)</span><span class="type-signature"></span></h2>
|
<h2><span class="attribs"><span class="type-signature"></span></span>FNote<span class="signature">(froca, row)</span><span class="type-signature"></span></h2>
|
||||||
|
|
||||||
|
<div class="class-description">Note is the main node and concept in Trilium.</div>
|
||||||
|
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@@ -39,6 +41,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Constructor</h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="FNote"><span class="type-signature"></span>new FNote<span class="signature">(froca, row)</span><span class="type-signature"></span></h4>
|
<h4 class="name" id="FNote"><span class="type-signature"></span>new FNote<span class="signature">(froca, row)</span><span class="type-signature"></span></h4>
|
||||||
@@ -161,7 +165,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line33">line 33</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line47">line 47</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -264,7 +268,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line55">line 55</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line74">line 74</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -332,7 +336,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line38">line 38</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line57">line 57</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -400,7 +404,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line52">line 52</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line71">line 71</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -468,7 +472,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line46">line 46</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line65">line 65</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -536,7 +540,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line35">line 35</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line54">line 54</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -604,7 +608,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line66">line 66</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line85">line 85</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -676,7 +680,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line76">line 76</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line95">line 95</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -744,7 +748,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line62">line 62</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line81">line 81</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -812,7 +816,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line49">line 49</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line68">line 68</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -880,7 +884,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line44">line 44</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line63">line 63</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -948,7 +952,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line41">line 41</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line60">line 60</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1016,7 +1020,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line64">line 64</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line83">line 83</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1034,13 +1038,13 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4>
|
<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :<a href="global.html#NoteType">NoteType</a></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="description">
|
<div class="description">
|
||||||
one of 'text', 'code', 'file' or 'render'
|
See {@see NoteType} for info on values.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -1049,7 +1053,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
<span class="param-type"><a href="global.html#NoteType">NoteType</a></span>
|
||||||
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@@ -1088,7 +1092,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line71">line 71</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line90">line 90</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1168,7 +1172,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line354">line 354</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line381">line 381</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1274,7 +1278,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line241">line 241</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line268">line 268</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1376,7 +1380,109 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line232">line 232</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line253">line 253</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">Promise.<Array.<<a href="FAttachment.html">FAttachment</a>>></span>
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="getAttachmentsByRole"><span class="type-signature">(async) </span>getAttachmentsByRole<span class="signature">()</span><span class="type-signature"> → {Promise.<Array.<<a href="FAttachment.html">FAttachment</a>>>}</span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line262">line 262</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1476,7 +1582,7 @@
|
|||||||
<td class="type">
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
<span class="param-type"><a href="global.html#AttributeType">AttributeType</a></span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1550,7 +1656,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line617">line 617</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line644">line 644</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1654,7 +1760,7 @@
|
|||||||
<td class="type">
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
<span class="param-type"><a href="global.html#AttributeType">AttributeType</a></span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1728,7 +1834,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line639">line 639</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line666">line 666</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -1928,7 +2034,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line288">line 288</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line315">line 315</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -2107,7 +2213,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line410">line 410</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line437">line 437</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -2286,7 +2392,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line420">line 420</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line447">line 447</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -2392,7 +2498,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line864">line 864</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line891">line 891</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -2496,7 +2602,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line153">line 153</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line174">line 174</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -2600,7 +2706,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line170">line 170</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line191">line 191</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -2702,7 +2808,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line180">line 180</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line201">line 201</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -2804,7 +2910,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line222">line 222</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line243">line 243</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -2906,7 +3012,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line227">line 227</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line248">line 248</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -3057,7 +3163,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line693">line 693</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line720">line 720</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -3212,7 +3318,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line717">line 717</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line744">line 744</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -3379,7 +3485,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line503">line 503</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line530">line 530</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -3437,6 +3543,112 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="getMetadata"><span class="type-signature">(async) </span>getMetadata<span class="signature">()</span><span class="type-signature"> → {Promise.<{dateCreated: string, utcDateCreated: string, dateModified: string, utcDateModified: string}>}</span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
Provides note's date metadata.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line1007">line 1007</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">Promise.<{dateCreated: string, utcDateCreated: string, dateModified: string, utcDateModified: string}></span>
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="getNoteComplement"><span class="type-signature">(async) </span>getNoteComplement<span class="signature">()</span><span class="type-signature"> → {Promise.<FBlob>}</span></h4>
|
<h4 class="name" id="getNoteComplement"><span class="type-signature">(async) </span>getNoteComplement<span class="signature">()</span><span class="type-signature"> → {Promise.<FBlob>}</span></h4>
|
||||||
|
|
||||||
|
|
||||||
@@ -3487,7 +3699,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line859">line 859</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line886">line 886</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -3589,7 +3801,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line759">line 759</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line786">line 786</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -3689,7 +3901,7 @@
|
|||||||
<td class="type">
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
<span class="param-type"><a href="global.html#AttributeType">AttributeType</a></span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3763,7 +3975,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line606">line 606</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line633">line 633</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -3867,7 +4079,7 @@
|
|||||||
<td class="type">
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
<span class="param-type"><a href="global.html#AttributeType">AttributeType</a></span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3941,7 +4153,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line628">line 628</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line655">line 655</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -4141,7 +4353,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line275">line 275</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line302">line 302</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -4296,7 +4508,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line687">line 687</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line714">line 714</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -4451,7 +4663,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line711">line 711</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line738">line 738</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -4618,7 +4830,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line495">line 495</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line522">line 522</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -4773,7 +4985,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line699">line 699</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line726">line 726</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -4928,7 +5140,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line723">line 723</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line750">line 750</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -5095,7 +5307,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line569">line 569</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line596">line 596</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -5201,7 +5413,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line145">line 145</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line166">line 166</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -5303,7 +5515,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line160">line 160</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line181">line 181</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -5405,7 +5617,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line188">line 188</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line209">line 209</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -5507,7 +5719,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line193">line 193</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line214">line 214</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -5658,7 +5870,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line705">line 705</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line732">line 732</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -5813,7 +6025,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line735">line 735</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line762">line 762</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -5983,7 +6195,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line745">line 745</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line772">line 772</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -6134,7 +6346,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line729">line 729</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line756">line 756</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -6301,7 +6513,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line577">line 577</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line604">line 604</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -6407,7 +6619,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line908">line 908</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line935">line 935</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -6468,7 +6680,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="name" id="getSortedNotePathRecords"><span class="type-signature"></span>getSortedNotePathRecords<span class="signature">(hoistedNoteId<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<{isArchived: boolean, isInHoistedSubTree: boolean, isSearch: boolean, notePath: Array.<string>, isHidden: boolean}>}</span></h4>
|
<h4 class="name" id="getSortedNotePathRecords"><span class="type-signature"></span>getSortedNotePathRecords<span class="signature">(hoistedNoteId<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="global.html#NotePathRecord">NotePathRecord</a>>}</span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -6585,7 +6797,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line376">line 376</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line403">line 403</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -6621,7 +6833,7 @@
|
|||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
||||||
<span class="param-type">Array.<{isArchived: boolean, isInHoistedSubTree: boolean, isSearch: boolean, notePath: Array.<string>, isHidden: boolean}></span>
|
<span class="param-type">Array.<<a href="global.html#NotePathRecord">NotePathRecord</a>></span>
|
||||||
|
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
@@ -6691,7 +6903,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line849">line 849</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line876">line 876</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -6797,7 +7009,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line839">line 839</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line866">line 866</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -6897,7 +7109,7 @@
|
|||||||
<td class="type">
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
<span class="param-type"><a href="global.html#AttributeType">AttributeType</a></span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -6971,7 +7183,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line586">line 586</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line613">line 613</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -7077,7 +7289,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line175">line 175</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line196">line 196</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -7228,7 +7440,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line655">line 655</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line682">line 682</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -7332,7 +7544,7 @@
|
|||||||
<td class="type">
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
<span class="param-type">string</span>
|
<span class="param-type"><a href="global.html#AttributeType">AttributeType</a></span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -7406,7 +7618,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line597">line 597</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line624">line 624</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -7561,7 +7773,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line649">line 649</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line676">line 676</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -7716,7 +7928,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line675">line 675</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line702">line 702</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -7871,7 +8083,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line681">line 681</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line708">line 708</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -7979,7 +8191,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line832">line 832</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line859">line 859</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -8063,7 +8275,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line429">line 429</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line456">line 456</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -8157,7 +8369,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line903">line 903</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line930">line 930</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -8263,7 +8475,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line895">line 895</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line922">line 922</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -8369,7 +8581,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line118">line 118</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line140">line 140</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -8520,7 +8732,7 @@
|
|||||||
|
|
||||||
<dt class="tag-source">Source:</dt>
|
<dt class="tag-source">Source:</dt>
|
||||||
<dd class="tag-source"><ul class="dummy"><li>
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line661">line 661</a>
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line688">line 688</a>
|
||||||
</li></ul></dd>
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
@@ -8588,7 +8800,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
1011
docs/frontend_api/NoteContextAwareWidget.html
Normal file
1011
docs/frontend_api/NoteContextAwareWidget.html
Normal file
File diff suppressed because it is too large
Load Diff
1221
docs/frontend_api/RightPanelWidget.html
Normal file
1221
docs/frontend_api/RightPanelWidget.html
Normal file
File diff suppressed because it is too large
Load Diff
102
docs/frontend_api/entities_fattachment.js.html
Normal file
102
docs/frontend_api/entities_fattachment.js.html
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>JSDoc: Source: entities/fattachment.js</title>
|
||||||
|
|
||||||
|
<script src="scripts/prettify/prettify.js"> </script>
|
||||||
|
<script src="scripts/prettify/lang-css.js"> </script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<h1 class="page-title">Source: entities/fattachment.js</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<article>
|
||||||
|
<pre class="prettyprint source linenums"><code>/**
|
||||||
|
* Attachment is a file directly tied into a note without
|
||||||
|
* being a hidden child.
|
||||||
|
*/
|
||||||
|
class FAttachment {
|
||||||
|
constructor(froca, row) {
|
||||||
|
/** @type {Froca} */
|
||||||
|
this.froca = froca;
|
||||||
|
|
||||||
|
this.update(row);
|
||||||
|
}
|
||||||
|
|
||||||
|
update(row) {
|
||||||
|
/** @type {string} */
|
||||||
|
this.attachmentId = row.attachmentId;
|
||||||
|
/** @type {string} */
|
||||||
|
this.ownerId = row.ownerId;
|
||||||
|
/** @type {string} */
|
||||||
|
this.role = row.role;
|
||||||
|
/** @type {string} */
|
||||||
|
this.mime = row.mime;
|
||||||
|
/** @type {string} */
|
||||||
|
this.title = row.title;
|
||||||
|
/** @type {string} */
|
||||||
|
this.dateModified = row.dateModified;
|
||||||
|
/** @type {string} */
|
||||||
|
this.utcDateModified = row.utcDateModified;
|
||||||
|
/** @type {string} */
|
||||||
|
this.utcDateScheduledForErasureSince = row.utcDateScheduledForErasureSince;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optionally added to the entity
|
||||||
|
* @type {int}
|
||||||
|
*/
|
||||||
|
this.contentLength = row.contentLength;
|
||||||
|
|
||||||
|
this.froca.attachments[this.attachmentId] = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {FNote} */
|
||||||
|
getNote() {
|
||||||
|
return this.froca.notes[this.ownerId];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @return {FBlob} */
|
||||||
|
async getBlob() {
|
||||||
|
return await this.froca.getBlob('attachments', this.attachmentId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default FAttachment;
|
||||||
|
</code></pre>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<br class="clear">
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script> prettyPrint(); </script>
|
||||||
|
<script src="scripts/linenumber.js"> </script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -28,6 +28,11 @@
|
|||||||
<article>
|
<article>
|
||||||
<pre class="prettyprint source linenums"><code>import promotedAttributeDefinitionParser from '../services/promoted_attribute_definition_parser.js';
|
<pre class="prettyprint source linenums"><code>import promotedAttributeDefinitionParser from '../services/promoted_attribute_definition_parser.js';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* There are currently only two types of attributes, labels or relations.
|
||||||
|
* @typedef {"label" | "relation"} AttributeType
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attribute is an abstract concept which has two real uses - label (key - value pair)
|
* Attribute is an abstract concept which has two real uses - label (key - value pair)
|
||||||
* and relation (representing named relationship between source and target note)
|
* and relation (representing named relationship between source and target note)
|
||||||
@@ -45,7 +50,7 @@ class FAttribute {
|
|||||||
this.attributeId = row.attributeId;
|
this.attributeId = row.attributeId;
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.noteId = row.noteId;
|
this.noteId = row.noteId;
|
||||||
/** @type {string} */
|
/** @type {AttributeType} */
|
||||||
this.type = row.type;
|
this.type = row.type;
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.name = row.name;
|
this.name = row.name;
|
||||||
@@ -116,7 +121,7 @@ export default FAttribute;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
90
docs/frontend_api/entities_fblob.js.html
Normal file
90
docs/frontend_api/entities_fblob.js.html
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>JSDoc: Source: entities/fblob.js</title>
|
||||||
|
|
||||||
|
<script src="scripts/prettify/prettify.js"> </script>
|
||||||
|
<script src="scripts/prettify/lang-css.js"> </script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<h1 class="page-title">Source: entities/fblob.js</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<article>
|
||||||
|
<pre class="prettyprint source linenums"><code>export default class FBlob {
|
||||||
|
constructor(row) {
|
||||||
|
/** @type {string} */
|
||||||
|
this.blobId = row.blobId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* can either contain the whole content (in e.g. string notes), only part (large text notes) or nothing at all (binary notes, images)
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
this.content = row.content;
|
||||||
|
this.contentLength = row.contentLength;
|
||||||
|
|
||||||
|
/** @type {string} */
|
||||||
|
this.dateModified = row.dateModified;
|
||||||
|
/** @type {string} */
|
||||||
|
this.utcDateModified = row.utcDateModified;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {*}
|
||||||
|
* @throws Error in case of invalid JSON */
|
||||||
|
getJsonContent() {
|
||||||
|
if (!this.content || !this.content.trim()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.parse(this.content);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {*|null} valid object or null if the content cannot be parsed as JSON */
|
||||||
|
getJsonContentSafely() {
|
||||||
|
try {
|
||||||
|
return this.getJsonContent();
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<br class="clear">
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script> prettyPrint(); </script>
|
||||||
|
<script src="scripts/linenumber.js"> </script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -100,7 +100,7 @@ export default FBranch;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -53,6 +53,25 @@ const NOTE_TYPE_ICONS = {
|
|||||||
"contentWidget": "bx bxs-widget"
|
"contentWidget": "bx bxs-widget"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* There are many different Note types, some of which are entirely opaque to the
|
||||||
|
* end user. Those types should be used only for checking against, they are
|
||||||
|
* not for direct use.
|
||||||
|
* @typedef {"file" | "image" | "search" | "noteMap" | "launcher" | "doc" | "contentWidget" | "text" | "relationMap" | "render" | "canvas" | "mermaid" | "book" | "webView" | "code"} NoteType
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} NotePathRecord
|
||||||
|
* @property {boolean} isArchived
|
||||||
|
* @property {boolean} isInHoistedSubTree
|
||||||
|
* @property {boolean} isSearch
|
||||||
|
* @property {Array<string>} notePath
|
||||||
|
* @property {boolean} isHidden
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Note is the main node and concept in Trilium.
|
||||||
|
*/
|
||||||
class FNote {
|
class FNote {
|
||||||
/**
|
/**
|
||||||
* @param {Froca} froca
|
* @param {Froca} froca
|
||||||
@@ -93,8 +112,8 @@ class FNote {
|
|||||||
/** @type {boolean} */
|
/** @type {boolean} */
|
||||||
this.isProtected = !!row.isProtected;
|
this.isProtected = !!row.isProtected;
|
||||||
/**
|
/**
|
||||||
* one of 'text', 'code', 'file' or 'render'
|
* See {@see NoteType} for info on values.
|
||||||
* @type {string}
|
* @type {NoteType}
|
||||||
*/
|
*/
|
||||||
this.type = row.type;
|
this.type = row.type;
|
||||||
/**
|
/**
|
||||||
@@ -102,6 +121,9 @@ class FNote {
|
|||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
this.mime = row.mime;
|
this.mime = row.mime;
|
||||||
|
|
||||||
|
// the main use case to keep this is to detect content change which should trigger refresh
|
||||||
|
this.blobId = row.blobId;
|
||||||
}
|
}
|
||||||
|
|
||||||
addParent(parentNoteId, branchId, sort = true) {
|
addParent(parentNoteId, branchId, sort = true) {
|
||||||
@@ -139,7 +161,7 @@ class FNote {
|
|||||||
branchIdPos[branchId] = this.froca.getBranch(branchId).notePosition;
|
branchIdPos[branchId] = this.froca.getBranch(branchId).notePosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.children.sort((a, b) => branchIdPos[this.childToBranch[a]] < branchIdPos[this.childToBranch[b]] ? -1 : 1);
|
this.children.sort((a, b) => branchIdPos[this.childToBranch[a]] - branchIdPos[this.childToBranch[b]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {boolean} */
|
/** @returns {boolean} */
|
||||||
@@ -148,10 +170,9 @@ class FNote {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getContent() {
|
async getContent() {
|
||||||
// we're not caching content since these objects are in froca and as such pretty long-lived
|
const blob = await this.getBlob();
|
||||||
const note = await server.get(`notes/${this.noteId}`);
|
|
||||||
|
|
||||||
return note.content;
|
return blob?.content;
|
||||||
}
|
}
|
||||||
|
|
||||||
async getJsonContent() {
|
async getJsonContent() {
|
||||||
@@ -238,7 +259,7 @@ class FNote {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return aNoteId < bNoteId ? -1 : 1;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,6 +286,12 @@ class FNote {
|
|||||||
return this.attachments;
|
return this.attachments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @returns {Promise<FAttachment[]>} */
|
||||||
|
async getAttachmentsByRole(role) {
|
||||||
|
return (await this.getAttachments())
|
||||||
|
.filter(attachment => attachment.role === role);
|
||||||
|
}
|
||||||
|
|
||||||
/** @returns {Promise<FAttachment>} */
|
/** @returns {Promise<FAttachment>} */
|
||||||
async getAttachmentById(attachmentId) {
|
async getAttachmentById(attachmentId) {
|
||||||
const attachments = await this.getAttachments();
|
const attachments = await this.getAttachments();
|
||||||
@@ -399,7 +426,7 @@ class FNote {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} [hoistedNoteId='root']
|
* @param {string} [hoistedNoteId='root']
|
||||||
* @return {Array<{isArchived: boolean, isInHoistedSubTree: boolean, isSearch: boolean, notePath: Array<string>, isHidden: boolean}>}
|
* @return {Array<NotePathRecord>}
|
||||||
*/
|
*/
|
||||||
getSortedNotePathRecords(hoistedNoteId = 'root') {
|
getSortedNotePathRecords(hoistedNoteId = 'root') {
|
||||||
const isHoistedRoot = hoistedNoteId === 'root';
|
const isHoistedRoot = hoistedNoteId === 'root';
|
||||||
@@ -478,7 +505,7 @@ class FNote {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {FAttribute[]} attributes
|
* @param {FAttribute[]} attributes
|
||||||
* @param {string} type
|
* @param {AttributeType} type
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
* @return {FAttribute[]}
|
* @return {FAttribute[]}
|
||||||
* @private
|
* @private
|
||||||
@@ -607,7 +634,7 @@ class FNote {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} type - attribute type (label, relation, etc.)
|
* @param {AttributeType} type - attribute type (label, relation, etc.)
|
||||||
* @param {string} name - attribute name
|
* @param {string} name - attribute name
|
||||||
* @returns {boolean} true if note has an attribute with given type and name (including inherited)
|
* @returns {boolean} true if note has an attribute with given type and name (including inherited)
|
||||||
*/
|
*/
|
||||||
@@ -618,7 +645,7 @@ class FNote {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} type - attribute type (label, relation, etc.)
|
* @param {AttributeType} type - attribute type (label, relation, etc.)
|
||||||
* @param {string} name - attribute name
|
* @param {string} name - attribute name
|
||||||
* @returns {boolean} true if note has an attribute with given type and name (including inherited)
|
* @returns {boolean} true if note has an attribute with given type and name (including inherited)
|
||||||
*/
|
*/
|
||||||
@@ -627,7 +654,7 @@ class FNote {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} type - attribute type (label, relation, etc.)
|
* @param {AttributeType} type - attribute type (label, relation, etc.)
|
||||||
* @param {string} name - attribute name
|
* @param {string} name - attribute name
|
||||||
* @returns {FAttribute} attribute of the given type and name. If there are more such attributes, first is returned. Returns null if there's no such attribute belonging to this note.
|
* @returns {FAttribute} attribute of the given type and name. If there are more such attributes, first is returned. Returns null if there's no such attribute belonging to this note.
|
||||||
*/
|
*/
|
||||||
@@ -638,7 +665,7 @@ class FNote {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} type - attribute type (label, relation, etc.)
|
* @param {AttributeType} type - attribute type (label, relation, etc.)
|
||||||
* @param {string} name - attribute name
|
* @param {string} name - attribute name
|
||||||
* @returns {FAttribute} attribute of the given type and name. If there are more such attributes, first is returned. Returns null if there's no such attribute belonging to this note.
|
* @returns {FAttribute} attribute of the given type and name. If there are more such attributes, first is returned. Returns null if there's no such attribute belonging to this note.
|
||||||
*/
|
*/
|
||||||
@@ -649,7 +676,7 @@ class FNote {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} type - attribute type (label, relation, etc.)
|
* @param {AttributeType} type - attribute type (label, relation, etc.)
|
||||||
* @param {string} name - attribute name
|
* @param {string} name - attribute name
|
||||||
* @returns {string} attribute value of the given type and name or null if no such attribute exists.
|
* @returns {string} attribute value of the given type and name or null if no such attribute exists.
|
||||||
*/
|
*/
|
||||||
@@ -660,7 +687,7 @@ class FNote {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} type - attribute type (label, relation, etc.)
|
* @param {AttributeType} type - attribute type (label, relation, etc.)
|
||||||
* @param {string} name - attribute name
|
* @param {string} name - attribute name
|
||||||
* @returns {string} attribute value of the given type and name or null if no such attribute exists.
|
* @returns {string} attribute value of the given type and name or null if no such attribute exists.
|
||||||
*/
|
*/
|
||||||
@@ -999,6 +1026,15 @@ class FNote {
|
|||||||
isOptions() {
|
isOptions() {
|
||||||
return this.noteId.startsWith("_options");
|
return this.noteId.startsWith("_options");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides note's date metadata.
|
||||||
|
*
|
||||||
|
* @returns {Promise<{dateCreated: string, utcDateCreated: string, dateModified: string, utcDateModified: string}>}
|
||||||
|
*/
|
||||||
|
async getMetadata() {
|
||||||
|
return await server.get(`notes/${this.noteId}/metadata`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default FNote;
|
export default FNote;
|
||||||
@@ -1012,7 +1048,7 @@ export default FNote;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
907
docs/frontend_api/global.html
Normal file
907
docs/frontend_api/global.html
Normal file
@@ -0,0 +1,907 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>JSDoc: Global</title>
|
||||||
|
|
||||||
|
<script src="scripts/prettify/prettify.js"> </script>
|
||||||
|
<script src="scripts/prettify/lang-css.js"> </script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<h1 class="page-title">Global</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
|
||||||
|
<header>
|
||||||
|
|
||||||
|
<h2></h2>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<article>
|
||||||
|
<div class="container-overview">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3 class="subsection-title">Members</h3>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="api"><span class="type-signature"></span>api<span class="type-signature"> :<a href="FrontendScriptApi.html">FrontendScriptApi</a></span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
An instance of the frontend api available globally.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Type:</h5>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class="param-type"><a href="FrontendScriptApi.html">FrontendScriptApi</a></span>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<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#line25">line 25</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3 class="subsection-title">Methods</h3>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="getJsonContent"><span class="type-signature"></span>getJsonContent<span class="signature">()</span><span class="type-signature"> → {*}</span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="entities_fblob.js.html">entities/fblob.js</a>, <a href="entities_fblob.js.html#line22">line 22</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Throws:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-desc">
|
||||||
|
|
||||||
|
Error in case of invalid JSON
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">*</span>
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="getJsonContentSafely"><span class="type-signature"></span>getJsonContentSafely<span class="signature">()</span><span class="type-signature"> → {*|null}</span></h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="entities_fblob.js.html">entities/fblob.js</a>, <a href="entities_fblob.js.html#line31">line 31</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Returns:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="param-desc">
|
||||||
|
valid object or null if the content cannot be parsed as JSON
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>
|
||||||
|
Type
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
|
||||||
|
<span class="param-type">*</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">null</span>
|
||||||
|
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3 class="subsection-title">Type Definitions</h3>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="AttributeType">AttributeType</h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
There are currently only two types of attributes, labels or relations.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Type:</h5>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class="param-type">"label"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"relation"</span>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="entities_fattribute.js.html">entities/fattribute.js</a>, <a href="entities_fattribute.js.html#line3">line 3</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="NotePathRecord">NotePathRecord</h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Type:</h5>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class="param-type">Object</span>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5 class="subsection-title">Properties:</h5>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<table class="props">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<th>Name</th>
|
||||||
|
|
||||||
|
|
||||||
|
<th>Type</th>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<th class="last">Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td class="name"><code>isArchived</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">boolean</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td class="description last"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td class="name"><code>isInHoistedSubTree</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">boolean</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td class="description last"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td class="name"><code>isSearch</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">boolean</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td class="description last"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td class="name"><code>notePath</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">Array.<string></span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td class="description last"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td class="name"><code>isHidden</code></td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="type">
|
||||||
|
|
||||||
|
|
||||||
|
<span class="param-type">boolean</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<td class="description last"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line35">line 35</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="NoteType">NoteType</h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
There are many different Note types, some of which are entirely opaque to the
|
||||||
|
end user. Those types should be used only for checking against, they are
|
||||||
|
not for direct use.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Type:</h5>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class="param-type">"file"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"image"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"search"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"noteMap"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"launcher"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"doc"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"contentWidget"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"text"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"relationMap"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"render"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"canvas"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"mermaid"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"book"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"webView"</span>
|
||||||
|
|
|
||||||
|
|
||||||
|
<span class="param-type">"code"</span>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="details">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="tag-source">Source:</dt>
|
||||||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||||||
|
<a href="entities_fnote.js.html">entities/fnote.js</a>, <a href="entities_fnote.js.html#line28">line 28</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="name" id="int">int</h4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="description">
|
||||||
|
A whole number
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5>Type:</h5>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class="param-type">number</span>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<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#line20">line 20</a>
|
||||||
|
</li></ul></dd>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<br class="clear">
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script> prettyPrint(); </script>
|
||||||
|
<script src="scripts/linenumber.js"> </script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
@@ -42,6 +42,19 @@ import NoteContextAwareWidget from "../widgets/note_context_aware_widget.js";
|
|||||||
import BasicWidget from "../widgets/basic_widget.js";
|
import BasicWidget from "../widgets/basic_widget.js";
|
||||||
import SpacedUpdate from "./spaced_update.js";
|
import SpacedUpdate from "./spaced_update.js";
|
||||||
import shortcutService from "./shortcuts.js";
|
import shortcutService from "./shortcuts.js";
|
||||||
|
import dialogService from "./dialog.js";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A whole number
|
||||||
|
* @typedef {number} int
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An instance of the frontend api available globally.
|
||||||
|
* @global
|
||||||
|
* @var {FrontendScriptApi} api
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>This is the main frontend API interface for scripts. All the properties and methods are published in the "api" object
|
* <p>This is the main frontend API interface for scripts. All the properties and methods are published in the "api" object
|
||||||
@@ -50,26 +63,45 @@ import shortcutService from "./shortcuts.js";
|
|||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function FrontendScriptApi(startNote, currentNote, originEntity = null, $container = null) {
|
function FrontendScriptApi(startNote, currentNote, originEntity = null, $container = null) {
|
||||||
/** @property {jQuery} container of all the rendered script content */
|
/**
|
||||||
|
* Container of all the rendered script content
|
||||||
|
* @type {jQuery}
|
||||||
|
* */
|
||||||
this.$container = $container;
|
this.$container = $container;
|
||||||
|
|
||||||
/** @property {object} note where the script started executing */
|
/**
|
||||||
|
* Note where the script started executing, i.e., the (event) entrypoint of the current script execution.
|
||||||
|
* @type {FNote}
|
||||||
|
*/
|
||||||
this.startNote = startNote;
|
this.startNote = startNote;
|
||||||
/** @property {object} note where the script is currently executing */
|
|
||||||
|
/**
|
||||||
|
* Note where the script is currently executing, i.e. the note where the currently executing source code is written.
|
||||||
|
* @type {FNote}
|
||||||
|
*/
|
||||||
this.currentNote = currentNote;
|
this.currentNote = currentNote;
|
||||||
/** @property {object|null} entity whose event triggered this execution */
|
|
||||||
|
/**
|
||||||
|
* Entity whose event triggered this execution.
|
||||||
|
* @type {object|null}
|
||||||
|
*/
|
||||||
this.originEntity = originEntity;
|
this.originEntity = originEntity;
|
||||||
|
|
||||||
/** @property {dayjs} day.js library for date manipulation. See {@link https://day.js.org} for documentation */
|
/**
|
||||||
|
* day.js library for date manipulation.
|
||||||
|
* See {@link https://day.js.org} for documentation
|
||||||
|
* @see https://day.js.org
|
||||||
|
* @type {dayjs}
|
||||||
|
*/
|
||||||
this.dayjs = dayjs;
|
this.dayjs = dayjs;
|
||||||
|
|
||||||
/** @property {RightPanelWidget} */
|
/** @type {RightPanelWidget} */
|
||||||
this.RightPanelWidget = RightPanelWidget;
|
this.RightPanelWidget = RightPanelWidget;
|
||||||
|
|
||||||
/** @property {NoteContextAwareWidget} */
|
/** @type {NoteContextAwareWidget} */
|
||||||
this.NoteContextAwareWidget = NoteContextAwareWidget;
|
this.NoteContextAwareWidget = NoteContextAwareWidget;
|
||||||
|
|
||||||
/** @property {BasicWidget} */
|
/** @type {BasicWidget} */
|
||||||
this.BasicWidget = BasicWidget;
|
this.BasicWidget = BasicWidget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -142,12 +174,12 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
|||||||
* @deprecated you can now create/modify launchers in the top-left Menu -> Configure Launchbar
|
* @deprecated you can now create/modify launchers in the top-left Menu -> Configure Launchbar
|
||||||
* for special needs there's also backend API's createOrUpdateLauncher()
|
* for special needs there's also backend API's createOrUpdateLauncher()
|
||||||
* @param {object} opts
|
* @param {object} opts
|
||||||
* @property {string} [opts.id] - id of the button, used to identify the old instances of this button to be replaced
|
* @param {string} opts.title
|
||||||
|
* @param {function} opts.action - callback handling the click on the button
|
||||||
|
* @param {string} [opts.id] - id of the button, used to identify the old instances of this button to be replaced
|
||||||
* ID is optional because of BC, but not specifying it is deprecated. ID can be alphanumeric only.
|
* ID is optional because of BC, but not specifying it is deprecated. ID can be alphanumeric only.
|
||||||
* @property {string} opts.title
|
* @param {string} [opts.icon] - name of the boxicon to be used (e.g. "time" for "bx-time" icon)
|
||||||
* @property {string} [opts.icon] - name of the boxicon to be used (e.g. "time" for "bx-time" icon)
|
* @param {string} [opts.shortcut] - keyboard shortcut for the button, e.g. "alt+t"
|
||||||
* @property {function} opts.action - callback handling the click on the button
|
|
||||||
* @property {string} [opts.shortcut] - keyboard shortcut for the button, e.g. "alt+t"
|
|
||||||
*/
|
*/
|
||||||
this.addButtonToToolbar = async opts => {
|
this.addButtonToToolbar = async opts => {
|
||||||
console.warn("api.addButtonToToolbar() has been deprecated since v0.58 and may be removed in the future. Use Menu -> Configure Launchbar to create/update launchers instead.");
|
console.warn("api.addButtonToToolbar() has been deprecated since v0.58 and may be removed in the future. Use Menu -> Configure Launchbar to create/update launchers instead.");
|
||||||
@@ -174,36 +206,73 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes given anonymous function on the backend.
|
* @private
|
||||||
* Internally this serializes the anonymous function into string and sends it to backend via AJAX.
|
|
||||||
*
|
|
||||||
* @method
|
|
||||||
* @param {string} script - script to be executed on the backend
|
|
||||||
* @param {Array.<?>} params - list of parameters to the anonymous function to be sent to backend
|
|
||||||
* @returns {Promise<*>} return value of the executed function on the backend
|
|
||||||
*/
|
*/
|
||||||
this.runOnBackend = async (script, params = []) => {
|
this.__runOnBackendInner = async (func, params, transactional) => {
|
||||||
if (typeof script === "function") {
|
if (typeof func === "function") {
|
||||||
script = script.toString();
|
func = func.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
const ret = await server.post('script/exec', {
|
const ret = await server.post('script/exec', {
|
||||||
script: script,
|
script: func,
|
||||||
params: prepareParams(params),
|
params: prepareParams(params),
|
||||||
startNoteId: startNote.noteId,
|
startNoteId: startNote.noteId,
|
||||||
currentNoteId: currentNote.noteId,
|
currentNoteId: currentNote.noteId,
|
||||||
originEntityName: "notes", // currently there's no other entity on the frontend which can trigger event
|
originEntityName: "notes", // currently there's no other entity on the frontend which can trigger event
|
||||||
originEntityId: originEntity ? originEntity.noteId : null
|
originEntityId: originEntity ? originEntity.noteId : null,
|
||||||
|
transactional
|
||||||
}, "script");
|
}, "script");
|
||||||
|
|
||||||
if (ret.success) {
|
if (ret.success) {
|
||||||
await ws.waitForMaxKnownEntityChangeId();
|
await ws.waitForMaxKnownEntityChangeId();
|
||||||
|
|
||||||
return ret.executionResult;
|
return ret.executionResult;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
throw new Error(`server error: ${ret.error}`);
|
throw new Error(`server error: ${ret.error}`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Executes given anonymous function on the backend.
|
||||||
|
* Internally this serializes the anonymous function into string and sends it to backend via AJAX.
|
||||||
|
* Please make sure that the supplied function is synchronous. Only sync functions will work correctly
|
||||||
|
* with transaction management. If you really know what you're doing, you can call api.runAsyncOnBackendWithManualTransactionHandling()
|
||||||
|
*
|
||||||
|
* @method
|
||||||
|
* @param {function|string} func - (synchronous) function to be executed on the backend
|
||||||
|
* @param {Array.<?>} params - list of parameters to the anonymous function to be sent to backend
|
||||||
|
* @returns {Promise<*>} return value of the executed function on the backend
|
||||||
|
*/
|
||||||
|
this.runOnBackend = async (func, params = []) => {
|
||||||
|
if (func?.constructor.name === "AsyncFunction" || func?.startsWith?.("async ")) {
|
||||||
|
toastService.showError("You're passing an async function to api.runOnBackend() which will likely not work as you intended. "
|
||||||
|
+ "Either make the function synchronous (by removing 'async' keyword), or use api.runAsyncOnBackendWithManualTransactionHandling()");
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.__runOnBackendInner(func, params, true);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Executes given anonymous function on the backend.
|
||||||
|
* Internally this serializes the anonymous function into string and sends it to backend via AJAX.
|
||||||
|
* This function is meant for advanced needs where an async function is necessary.
|
||||||
|
* In this case, the automatic request-scoped transaction management is not applied,
|
||||||
|
* and you need to manually define transaction via api.transactional().
|
||||||
|
*
|
||||||
|
* If you have a synchronous function, please use api.runOnBackend().
|
||||||
|
*
|
||||||
|
* @method
|
||||||
|
* @param {function|string} func - (synchronous) function to be executed on the backend
|
||||||
|
* @param {Array.<?>} params - list of parameters to the anonymous function to be sent to backend
|
||||||
|
* @returns {Promise<*>} return value of the executed function on the backend
|
||||||
|
*/
|
||||||
|
this.runAsyncOnBackendWithManualTransactionHandling = async (func, params = []) => {
|
||||||
|
if (func?.constructor.name === "Function" || func?.startsWith?.("function")) {
|
||||||
|
toastService.showError("You're passing a synchronous function to api.runAsyncOnBackendWithManualTransactionHandling(), " +
|
||||||
|
"while you should likely use api.runOnBackend() instead.");
|
||||||
|
}
|
||||||
|
|
||||||
|
return await this.__runOnBackendInner(func, params, false);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -286,7 +355,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
|||||||
this.parseDate = utils.parseDate;
|
this.parseDate = utils.parseDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show an info message to the user.
|
* Show an info toast message to the user.
|
||||||
*
|
*
|
||||||
* @method
|
* @method
|
||||||
* @param {string} message
|
* @param {string} message
|
||||||
@@ -294,13 +363,43 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
|||||||
this.showMessage = toastService.showMessage;
|
this.showMessage = toastService.showMessage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show an error message to the user.
|
* Show an error toast message to the user.
|
||||||
*
|
*
|
||||||
* @method
|
* @method
|
||||||
* @param {string} message
|
* @param {string} message
|
||||||
*/
|
*/
|
||||||
this.showError = toastService.showError;
|
this.showError = toastService.showError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show an info dialog to the user.
|
||||||
|
*
|
||||||
|
* @method
|
||||||
|
* @param {string} message
|
||||||
|
* @returns {Promise}
|
||||||
|
*/
|
||||||
|
this.showInfoDialog = dialogService.info;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show confirm dialog to the user.
|
||||||
|
*
|
||||||
|
* @method
|
||||||
|
* @param {string} message
|
||||||
|
* @returns {Promise<boolean>} promise resolving to true if the user confirmed
|
||||||
|
*/
|
||||||
|
this.showConfirmDialog = dialogService.confirm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show prompt dialog to the user.
|
||||||
|
*
|
||||||
|
* @method
|
||||||
|
* @param {object} props
|
||||||
|
* @param {string} props.title
|
||||||
|
* @param {string} props.message
|
||||||
|
* @param {string} props.defaultValue
|
||||||
|
* @returns {Promise<string>} promise resolving to the answer provided by the user
|
||||||
|
*/
|
||||||
|
this.showPromptDialog = dialogService.prompt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trigger command. This is a very low-level API which should be avoided if possible.
|
* Trigger command. This is a very low-level API which should be avoided if possible.
|
||||||
*
|
*
|
||||||
@@ -328,7 +427,9 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
|||||||
* @param {boolean} [params.showTooltip=true] - enable/disable tooltip on the link
|
* @param {boolean} [params.showTooltip=true] - enable/disable tooltip on the link
|
||||||
* @param {boolean} [params.showNotePath=false] - show also whole note's path as part of the link
|
* @param {boolean} [params.showNotePath=false] - show also whole note's path as part of the link
|
||||||
* @param {boolean} [params.showNoteIcon=false] - show also note icon before the title
|
* @param {boolean} [params.showNoteIcon=false] - show also note icon before the title
|
||||||
|
* @param {string} [params.title] - custom link tile with note's title as default
|
||||||
* @param {string} [params.title=] - custom link tile with note's title as default
|
* @param {string} [params.title=] - custom link tile with note's title as default
|
||||||
|
* @returns {jQuery} - jQuery element with the link (wrapped in <span>)
|
||||||
*/
|
*/
|
||||||
this.createLink = linkService.createLink;
|
this.createLink = linkService.createLink;
|
||||||
|
|
||||||
@@ -345,10 +446,34 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @method
|
* @method
|
||||||
* @returns {FNote} active note (loaded into right pane)
|
* @returns {FNote} active note (loaded into center pane)
|
||||||
*/
|
*/
|
||||||
this.getActiveContextNote = () => appContext.tabManager.getActiveContextNote();
|
this.getActiveContextNote = () => appContext.tabManager.getActiveContextNote();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
* @returns {NoteContext} - returns active context (split)
|
||||||
|
*/
|
||||||
|
this.getActiveContext = () => appContext.tabManager.getActiveContext();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
* @returns {NoteContext} - returns active main context (first split in a tab, represents the tab as a whole)
|
||||||
|
*/
|
||||||
|
this.getActiveMainContext = () => appContext.tabManager.getActiveMainContext();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
* @returns {NoteContext[]} - returns all note contexts (splits) in all tabs
|
||||||
|
*/
|
||||||
|
this.getNoteContexts = () => appContext.tabManager.getNoteContexts();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method
|
||||||
|
* @returns {NoteContext[]} - returns all main contexts representing tabs
|
||||||
|
*/
|
||||||
|
this.getMainNoteContexts = () => appContext.tabManager.getMainNoteContexts();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html for documentation on the returned instance.
|
* See https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor-Editor.html for documentation on the returned instance.
|
||||||
*
|
*
|
||||||
@@ -569,7 +694,7 @@ export default FrontendScriptApi;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li></ul>
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|||||||
231
docs/frontend_api/widgets_basic_widget.js.html
Normal file
231
docs/frontend_api/widgets_basic_widget.js.html
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>JSDoc: Source: widgets/basic_widget.js</title>
|
||||||
|
|
||||||
|
<script src="scripts/prettify/prettify.js"> </script>
|
||||||
|
<script src="scripts/prettify/lang-css.js"> </script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<h1 class="page-title">Source: widgets/basic_widget.js</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<article>
|
||||||
|
<pre class="prettyprint source linenums"><code>import Component from "../components/component.js";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the base widget for all other widgets.
|
||||||
|
*
|
||||||
|
* For information on using widgets, see the tutorial {@tutorial widget_basics}.
|
||||||
|
*/
|
||||||
|
class BasicWidget extends Component {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.attrs = {
|
||||||
|
style: ''
|
||||||
|
};
|
||||||
|
this.classes = [];
|
||||||
|
|
||||||
|
this.children = [];
|
||||||
|
this.childPositionCounter = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
child(...components) {
|
||||||
|
if (!components) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
super.child(...components);
|
||||||
|
|
||||||
|
for (const component of components) {
|
||||||
|
if (component.position === undefined) {
|
||||||
|
component.position = this.childPositionCounter;
|
||||||
|
this.childPositionCounter += 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.children.sort((a, b) => a.position - b.position);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
id(id) {
|
||||||
|
this.attrs.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
class(className) {
|
||||||
|
this.classes.push(className);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
css(name, value) {
|
||||||
|
this.attrs.style += `${name}: ${value};`;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
contentSized() {
|
||||||
|
this.css("contain", "none");
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
collapsible() {
|
||||||
|
this.css('min-height', '0');
|
||||||
|
this.css('min-width', '0');
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
filling() {
|
||||||
|
this.css('flex-grow', '1');
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accepts a string of CSS to add with the widget.
|
||||||
|
* @param {string} block
|
||||||
|
* @returns {this} for chaining
|
||||||
|
*/
|
||||||
|
cssBlock(block) {
|
||||||
|
this.cssEl = block;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
this.doRender();
|
||||||
|
|
||||||
|
this.$widget.attr('data-component-id', this.componentId);
|
||||||
|
this.$widget
|
||||||
|
.addClass('component')
|
||||||
|
.prop('component', this);
|
||||||
|
|
||||||
|
if (!this.isEnabled()) {
|
||||||
|
this.toggleInt(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.cssEl) {
|
||||||
|
const css = this.cssEl.trim().startsWith('<style>') ? this.cssEl : `<style>${this.cssEl}</style>`;
|
||||||
|
|
||||||
|
this.$widget.append(css);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const key in this.attrs) {
|
||||||
|
if (key === 'style') {
|
||||||
|
if (this.attrs[key]) {
|
||||||
|
let style = this.$widget.attr('style');
|
||||||
|
style = style ? `${style}; ${this.attrs[key]}` : this.attrs[key];
|
||||||
|
|
||||||
|
this.$widget.attr(key, style);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.$widget.attr(key, this.attrs[key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const className of this.classes) {
|
||||||
|
this.$widget.addClass(className);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.$widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
isEnabled() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method used for rendering the widget.
|
||||||
|
*
|
||||||
|
* Your class should override this method.
|
||||||
|
* The method is expected to create a this.$widget containing jQuery object
|
||||||
|
*/
|
||||||
|
doRender() {}
|
||||||
|
|
||||||
|
toggleInt(show) {
|
||||||
|
this.$widget.toggleClass('hidden-int', !show);
|
||||||
|
}
|
||||||
|
|
||||||
|
isHiddenInt() {
|
||||||
|
return this.$widget.hasClass('hidden-int');
|
||||||
|
}
|
||||||
|
|
||||||
|
toggleExt(show) {
|
||||||
|
this.$widget.toggleClass('hidden-ext', !show);
|
||||||
|
}
|
||||||
|
|
||||||
|
isHiddenExt() {
|
||||||
|
return this.$widget.hasClass('hidden-ext');
|
||||||
|
}
|
||||||
|
|
||||||
|
canBeShown() {
|
||||||
|
return !this.isHiddenInt() && !this.isHiddenExt();
|
||||||
|
}
|
||||||
|
|
||||||
|
isVisible() {
|
||||||
|
return this.$widget.is(":visible");
|
||||||
|
}
|
||||||
|
|
||||||
|
getPosition() {
|
||||||
|
return this.position;
|
||||||
|
}
|
||||||
|
|
||||||
|
remove() {
|
||||||
|
if (this.$widget) {
|
||||||
|
this.$widget.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getClosestNtxId() {
|
||||||
|
if (this.$widget) {
|
||||||
|
return this.$widget.closest("[data-ntx-id]").attr("data-ntx-id");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default BasicWidget;
|
||||||
|
</code></pre>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<br class="clear">
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script> prettyPrint(); </script>
|
||||||
|
<script src="scripts/linenumber.js"> </script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
173
docs/frontend_api/widgets_note_context_aware_widget.js.html
Normal file
173
docs/frontend_api/widgets_note_context_aware_widget.js.html
Normal file
@@ -0,0 +1,173 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>JSDoc: Source: widgets/note_context_aware_widget.js</title>
|
||||||
|
|
||||||
|
<script src="scripts/prettify/prettify.js"> </script>
|
||||||
|
<script src="scripts/prettify/lang-css.js"> </script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<h1 class="page-title">Source: widgets/note_context_aware_widget.js</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<article>
|
||||||
|
<pre class="prettyprint source linenums"><code>import BasicWidget from "./basic_widget.js";
|
||||||
|
import appContext from "../components/app_context.js";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This widget allows for changing and updating depending on the active note.
|
||||||
|
* @extends {BasicWidget}
|
||||||
|
*/
|
||||||
|
class NoteContextAwareWidget extends BasicWidget {
|
||||||
|
isNoteContext(ntxId) {
|
||||||
|
if (Array.isArray(ntxId)) {
|
||||||
|
return this.noteContext && ntxId.includes(this.noteContext.ntxId);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return this.noteContext && this.noteContext.ntxId === ntxId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
isActiveNoteContext() {
|
||||||
|
return appContext.tabManager.getActiveContext() === this.noteContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
isNote(noteId) {
|
||||||
|
return this.noteId === noteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {FNote|undefined} */
|
||||||
|
get note() {
|
||||||
|
return this.noteContext?.note;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {string|undefined} */
|
||||||
|
get noteId() {
|
||||||
|
return this.note?.noteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {string|undefined} */
|
||||||
|
get notePath() {
|
||||||
|
return this.noteContext?.notePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @returns {string} */
|
||||||
|
get hoistedNoteId() {
|
||||||
|
return this.noteContext?.hoistedNoteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
get ntxId() {
|
||||||
|
return this.noteContext?.ntxId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {boolean} true when an active note exists
|
||||||
|
*/
|
||||||
|
isEnabled() {
|
||||||
|
return !!this.note;
|
||||||
|
}
|
||||||
|
|
||||||
|
async refresh() {
|
||||||
|
if (this.isEnabled()) {
|
||||||
|
this.toggleInt(true);
|
||||||
|
await this.refreshWithNote(this.note);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.toggleInt(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Override this method to be able to refresh your
|
||||||
|
* widget with each note.
|
||||||
|
* @param {FNote} note
|
||||||
|
* @returns {Promise<void>}
|
||||||
|
*/
|
||||||
|
async refreshWithNote(note) {}
|
||||||
|
|
||||||
|
async noteSwitchedEvent({noteContext, notePath}) {
|
||||||
|
// if notePath does not match, then the noteContext has been switched to another note in the meantime
|
||||||
|
if (noteContext.notePath === notePath) {
|
||||||
|
await this.noteSwitched();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async noteSwitched() {
|
||||||
|
await this.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
async activeContextChangedEvent({noteContext}) {
|
||||||
|
this.noteContext = noteContext;
|
||||||
|
|
||||||
|
await this.activeContextChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
async activeContextChanged() {
|
||||||
|
await this.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
// when note is both switched and activated, this should not produce a double refresh
|
||||||
|
async noteSwitchedAndActivatedEvent({noteContext, notePath}) {
|
||||||
|
this.noteContext = noteContext;
|
||||||
|
|
||||||
|
// if notePath does not match, then the noteContext has been switched to another note in the meantime
|
||||||
|
if (this.notePath === notePath) {
|
||||||
|
await this.refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setNoteContextEvent({noteContext}) {
|
||||||
|
/** @var {NoteContext} */
|
||||||
|
this.noteContext = noteContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
async noteTypeMimeChangedEvent({noteId}) {
|
||||||
|
if (this.isNote(noteId)) {
|
||||||
|
await this.refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async frocaReloadedEvent() {
|
||||||
|
await this.refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default NoteContextAwareWidget;
|
||||||
|
</code></pre>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<br class="clear">
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script> prettyPrint(); </script>
|
||||||
|
<script src="scripts/linenumber.js"> </script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
120
docs/frontend_api/widgets_right_panel_widget.js.html
Normal file
120
docs/frontend_api/widgets_right_panel_widget.js.html
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>JSDoc: Source: widgets/right_panel_widget.js</title>
|
||||||
|
|
||||||
|
<script src="scripts/prettify/prettify.js"> </script>
|
||||||
|
<script src="scripts/prettify/lang-css.js"> </script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
|
||||||
|
<h1 class="page-title">Source: widgets/right_panel_widget.js</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<article>
|
||||||
|
<pre class="prettyprint source linenums"><code>import NoteContextAwareWidget from "./note_context_aware_widget.js";
|
||||||
|
|
||||||
|
const WIDGET_TPL = `
|
||||||
|
<div class="card widget">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="card-header-title"></div>
|
||||||
|
<div class="card-header-buttons"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="[to be set]" class="body-wrapper">
|
||||||
|
<div class="card-body"></div>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This widget manages rendering panels in the right-hand pane.
|
||||||
|
* @extends {NoteContextAwareWidget}
|
||||||
|
*/
|
||||||
|
class RightPanelWidget extends NoteContextAwareWidget {
|
||||||
|
/** Title to show in the panel. */
|
||||||
|
get widgetTitle() { return "Untitled widget"; }
|
||||||
|
|
||||||
|
get widgetButtons() { return []; }
|
||||||
|
|
||||||
|
get help() { return {}; }
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.child(...this.widgetButtons);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Do not override this method unless you know what you're doing.
|
||||||
|
* Do not override this method unless you know what you're doing.
|
||||||
|
*/
|
||||||
|
doRender() {
|
||||||
|
this.$widget = $(WIDGET_TPL);
|
||||||
|
this.contentSized();
|
||||||
|
this.$widget.find('[data-target]').attr('data-target', `#${this.componentId}`);
|
||||||
|
|
||||||
|
this.$bodyWrapper = this.$widget.find('.body-wrapper');
|
||||||
|
this.$bodyWrapper.attr('id', this.componentId); // for toggle to work we need id
|
||||||
|
|
||||||
|
this.$body = this.$bodyWrapper.find('.card-body');
|
||||||
|
|
||||||
|
this.$title = this.$widget.find('.card-header .card-header-title');
|
||||||
|
this.$title.text(this.widgetTitle);
|
||||||
|
|
||||||
|
this.$buttons = this.$widget.find('.card-header .card-header-buttons');
|
||||||
|
this.$buttons.empty();
|
||||||
|
|
||||||
|
for (const buttonWidget of this.children) {
|
||||||
|
this.$buttons.append(buttonWidget.render());
|
||||||
|
}
|
||||||
|
|
||||||
|
this.initialized = this.doRenderBody();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method used for rendering the body of the widget (via existing this.$body)
|
||||||
|
*
|
||||||
|
* Your class should override this method.
|
||||||
|
* @returns {Promise|undefined} if widget needs async operation to initialize, it can return a Promise
|
||||||
|
*/
|
||||||
|
async doRenderBody() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default RightPanelWidget;
|
||||||
|
</code></pre>
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BasicWidget.html">BasicWidget</a></li><li><a href="FAttachment.html">FAttachment</a></li><li><a href="FAttribute.html">FAttribute</a></li><li><a href="FBranch.html">FBranch</a></li><li><a href="FNote.html">FNote</a></li><li><a href="FrontendScriptApi.html">FrontendScriptApi</a></li><li><a href="NoteContextAwareWidget.html">NoteContextAwareWidget</a></li><li><a href="RightPanelWidget.html">RightPanelWidget</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li><li><a href="global.html#getJsonContent">getJsonContent</a></li><li><a href="global.html#getJsonContentSafely">getJsonContentSafely</a></li></ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<br class="clear">
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script> prettyPrint(); </script>
|
||||||
|
<script src="scripts/linenumber.js"> </script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
const yargs = require('yargs/yargs')
|
const yargs = require('yargs/yargs')
|
||||||
const { hideBin } = require('yargs/helpers')
|
const { hideBin } = require('yargs/helpers')
|
||||||
const dumpService = require("./inc/dump");
|
const dumpService = require('./inc/dump.js');
|
||||||
|
|
||||||
yargs(hideBin(process.argv))
|
yargs(hideBin(process.argv))
|
||||||
.command('$0 <path_to_document> <target_directory>', 'dump the contents of document.db into the target directory', (yargs) => {
|
.command('$0 <path_to_document> <target_directory>', 'dump the contents of document.db into the target directory', (yargs) => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const crypto = require("crypto");
|
const crypto = require("crypto");
|
||||||
const sql = require("./sql");
|
const sql = require('./sql.js');
|
||||||
const decryptService = require("./decrypt");
|
const decryptService = require('./decrypt.js');
|
||||||
|
|
||||||
function getDataKey(password) {
|
function getDataKey(password) {
|
||||||
if (!password) {
|
if (!password) {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const sanitize = require("sanitize-filename");
|
const sanitize = require("sanitize-filename");
|
||||||
const sql = require("./sql");
|
const sql = require('./sql.js');
|
||||||
const decryptService = require("./decrypt");
|
const decryptService = require('./decrypt.js');
|
||||||
const dataKeyService = require("./data_key");
|
const dataKeyService = require('./data_key.js');
|
||||||
const extensionService = require("./extension");
|
const extensionService = require('./extension.js');
|
||||||
|
|
||||||
function dumpDocument(documentPath, targetPath, options) {
|
function dumpDocument(documentPath, targetPath, options) {
|
||||||
const stats = {
|
const stats = {
|
||||||
|
|||||||
13
electron.js
13
electron.js
@@ -1,10 +1,10 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const {app, globalShortcut, BrowserWindow} = require('electron');
|
const {app, globalShortcut, BrowserWindow} = require('electron');
|
||||||
const sqlInit = require('./src/services/sql_init');
|
const sqlInit = require('./src/services/sql_init.js');
|
||||||
const appIconService = require('./src/services/app_icon');
|
const appIconService = require('./src/services/app_icon.js');
|
||||||
const windowService = require('./src/services/window');
|
const windowService = require('./src/services/window.js');
|
||||||
const tray = require('./src/services/tray');
|
const tray = require('./src/services/tray.js');
|
||||||
|
|
||||||
// Adds debug features like hotkeys for triggering dev tools and reload
|
// Adds debug features like hotkeys for triggering dev tools and reload
|
||||||
require('electron-debug')();
|
require('electron-debug')();
|
||||||
@@ -13,6 +13,9 @@ appIconService.installLocalAppIcon();
|
|||||||
|
|
||||||
require('electron-dl')({ saveAs: true });
|
require('electron-dl')({ saveAs: true });
|
||||||
|
|
||||||
|
// needed for excalidraw export https://github.com/zadam/trilium/issues/4271
|
||||||
|
app.commandLine.appendSwitch("enable-experimental-web-platform-features");
|
||||||
|
|
||||||
// Quit when all windows are closed, except on macOS. There, it's common
|
// Quit when all windows are closed, except on macOS. There, it's common
|
||||||
// for applications and their menu bar to stay active until the user quits
|
// for applications and their menu bar to stay active until the user quits
|
||||||
// explicitly with Cmd + Q.
|
// explicitly with Cmd + Q.
|
||||||
@@ -56,4 +59,4 @@ app.on('will-quit', () => {
|
|||||||
// this is to disable electron warning spam in the dev console (local development only)
|
// this is to disable electron warning spam in the dev console (local development only)
|
||||||
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';
|
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';
|
||||||
|
|
||||||
require('./src/www');
|
require('./src/www.js');
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2015-2021 Aniket Suvarna
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user