mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 07:46:30 +01:00
Compare commits
284 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a98fd509c6 | ||
|
|
a3149aecf4 | ||
|
|
ef825371cf | ||
|
|
b567775129 | ||
|
|
58d71bf8e3 | ||
|
|
9fd0b85ff2 | ||
|
|
98620887d4 | ||
|
|
9eff08144c | ||
|
|
4ba72bc8d3 | ||
|
|
743979266a | ||
|
|
4f98c960ec | ||
|
|
424b624ea9 | ||
|
|
a004a8b092 | ||
|
|
df0f52aff9 | ||
|
|
f7bd72ba2f | ||
|
|
038c0e78a6 | ||
|
|
2a2cbcd68b | ||
|
|
14da697a4e | ||
|
|
2525857c20 | ||
|
|
8eaef3e1d8 | ||
|
|
082caf98e8 | ||
|
|
60602a2264 | ||
|
|
9479f1c1a1 | ||
|
|
88bc7402a2 | ||
|
|
e7b3c3239b | ||
|
|
4f4c3ef3f3 | ||
|
|
decfeb366c | ||
|
|
420175f5ef | ||
|
|
bdfdc0402d | ||
|
|
bb8496cb3f | ||
|
|
4bdb94fbaa | ||
|
|
5bf9c253f2 | ||
|
|
b0cc177d84 | ||
|
|
c60f25fb7c | ||
|
|
571cb6d0eb | ||
|
|
f738787202 | ||
|
|
4ae1b6e07b | ||
|
|
41b8f6882c | ||
|
|
43c5163f66 | ||
|
|
8a2a9b2ea6 | ||
|
|
c70272e756 | ||
|
|
843f5d0da1 | ||
|
|
f86fb0d0a2 | ||
|
|
218f526a92 | ||
|
|
161b45aa12 | ||
|
|
397629587c | ||
|
|
034098fd06 | ||
|
|
e03cc01e15 | ||
|
|
0995c56506 | ||
|
|
3a5fa2954d | ||
|
|
398480415e | ||
|
|
81013ed21a | ||
|
|
53360c147a | ||
|
|
9e47da3f03 | ||
|
|
faefe10c15 | ||
|
|
a4d3150a24 | ||
|
|
e1f0676891 | ||
|
|
792ac9b77d | ||
|
|
bbbd2f7e82 | ||
|
|
d910191e83 | ||
|
|
e8a9389e6d | ||
|
|
6dce13bc34 | ||
|
|
71cdea3902 | ||
|
|
85a6e8b47e | ||
|
|
f02ad63e97 | ||
|
|
977399a73e | ||
|
|
291ef87c9b | ||
|
|
115bf0af4d | ||
|
|
e40f1fd11a | ||
|
|
797ddf6205 | ||
|
|
ca4e1c19a7 | ||
|
|
dd82b0f958 | ||
|
|
f150c223bc | ||
|
|
4f771cfa7a | ||
|
|
aa3b26c965 | ||
|
|
f4cf04232f | ||
|
|
d36cf47974 | ||
|
|
f809da58ec | ||
|
|
ff1f01be8c | ||
|
|
0ddaa8f5c2 | ||
|
|
620bed73bb | ||
|
|
c177d2b97b | ||
|
|
0758c82983 | ||
|
|
ecc2ed7d73 | ||
|
|
4b779d7512 | ||
|
|
701911b766 | ||
|
|
7a8bbdced8 | ||
|
|
affd8062e2 | ||
|
|
2cfc43a4fd | ||
|
|
fb789b7bd8 | ||
|
|
b906efb23b | ||
|
|
f249d6cb26 | ||
|
|
afb6e860ea | ||
|
|
435e042ae9 | ||
|
|
d64df5e3e7 | ||
|
|
bd59802ca4 | ||
|
|
7c98ade72b | ||
|
|
c6485f8e03 | ||
|
|
a083917db1 | ||
|
|
3b5f2b86d5 | ||
|
|
f08fbf7bca | ||
|
|
e2b227df34 | ||
|
|
4c51588270 | ||
|
|
b13ea72152 | ||
|
|
5a2907b670 | ||
|
|
b6f7c604c7 | ||
|
|
c5fb2cccd5 | ||
|
|
1d1e6ae782 | ||
|
|
bff33932d9 | ||
|
|
392b89e6dd | ||
|
|
5ae0a5cf1e | ||
|
|
1a1fb126c1 | ||
|
|
5c4db266a4 | ||
|
|
e5e0add1a2 | ||
|
|
e1d20b8ff8 | ||
|
|
c6a05d8853 | ||
|
|
c34bccf7e8 | ||
|
|
0441e7396a | ||
|
|
698eb53006 | ||
|
|
3804d2df8c | ||
|
|
7147cc267e | ||
|
|
29713de6cd | ||
|
|
46f40ee534 | ||
|
|
a882ad41c5 | ||
|
|
062e8c4b84 | ||
|
|
0f0ca51bd6 | ||
|
|
af654a171f | ||
|
|
186e06bc01 | ||
|
|
4cc9bdf5e4 | ||
|
|
e05e4bec32 | ||
|
|
5a3882f388 | ||
|
|
8ec2547b4a | ||
|
|
059c339c09 | ||
|
|
724f99f17c | ||
|
|
1b24276a4a | ||
|
|
ea006993f6 | ||
|
|
7a46159539 | ||
|
|
50faa40bad | ||
|
|
9d9305300c | ||
|
|
c89455f93f | ||
|
|
7c6d67f1ad | ||
|
|
8c4dda45ef | ||
|
|
db5e76fe8c | ||
|
|
5413a1aa79 | ||
|
|
e41104208a | ||
|
|
5fca606730 | ||
|
|
0de0b6fd06 | ||
|
|
db6dbc7821 | ||
|
|
e5171e434b | ||
|
|
2df7d99a91 | ||
|
|
6def541e78 | ||
|
|
5af506e268 | ||
|
|
967919b400 | ||
|
|
575f09d97f | ||
|
|
c28383de4f | ||
|
|
c496519095 | ||
|
|
ecaa9a1d56 | ||
|
|
d34a0a9fc0 | ||
|
|
b202b43bf5 | ||
|
|
648dd73fa1 | ||
|
|
1640a8aa7d | ||
|
|
698a6bf91c | ||
|
|
c409d7ff2a | ||
|
|
f8dd175837 | ||
|
|
195c6a4089 | ||
|
|
6c431ae5ed | ||
|
|
8c01a77a7a | ||
|
|
239c68a33c | ||
|
|
df3212c304 | ||
|
|
4026c2be4f | ||
|
|
c6614bc85b | ||
|
|
31b3af4129 | ||
|
|
c4b0c44919 | ||
|
|
223ca95829 | ||
|
|
b9ae68d559 | ||
|
|
e7470e31a0 | ||
|
|
1b6d0c9bbc | ||
|
|
75639c53f0 | ||
|
|
587387dd46 | ||
|
|
f739259407 | ||
|
|
173b28062e | ||
|
|
4f51f73b89 | ||
|
|
ca968a9e31 | ||
|
|
2957e1d78a | ||
|
|
d1b989ac12 | ||
|
|
e3047ee450 | ||
|
|
f45478260e | ||
|
|
bbdb7375ff | ||
|
|
23322455a3 | ||
|
|
c1d4d3fc8a | ||
|
|
fc40e54261 | ||
|
|
87e833d373 | ||
|
|
dcfa9c4c0b | ||
|
|
c231b3cb79 | ||
|
|
1f468f81cc | ||
|
|
494f8d2153 | ||
|
|
0f822b2761 | ||
|
|
5ac332960e | ||
|
|
dfb462cf35 | ||
|
|
342ae6e5e2 | ||
|
|
eaf195e0c8 | ||
|
|
9460cfdc55 | ||
|
|
c44bc60667 | ||
|
|
8d6801bb85 | ||
|
|
c22b6b29e0 | ||
|
|
44997f5cd1 | ||
|
|
95f4195ca7 | ||
|
|
73eb585398 | ||
|
|
e5ba6ff496 | ||
|
|
653f80f7d8 | ||
|
|
d06d4ba437 | ||
|
|
2a68bdb690 | ||
|
|
5f6a10ef22 | ||
|
|
2ad19ddd36 | ||
|
|
5fc9f5f3f9 | ||
|
|
b9632a7814 | ||
|
|
f336435adb | ||
|
|
9e83368f87 | ||
|
|
d619a7a2d7 | ||
|
|
012fb1f50b | ||
|
|
d64b575e60 | ||
|
|
aec2c2d5cd | ||
|
|
74fdaad032 | ||
|
|
d3bf0c1d8e | ||
|
|
27ce273d29 | ||
|
|
cd60ad4267 | ||
|
|
56e01046c8 | ||
|
|
29923af17d | ||
|
|
99a5774148 | ||
|
|
b85f335561 | ||
|
|
7b36709e18 | ||
|
|
0d50cdb0f5 | ||
|
|
eec2ff043e | ||
|
|
0e68e8069b | ||
|
|
7aa801fc1f | ||
|
|
fc080f785b | ||
|
|
1a6c9be065 | ||
|
|
b55c2d3dbc | ||
|
|
720fb0f73e | ||
|
|
0985314fb7 | ||
|
|
e759b4846a | ||
|
|
eecfce3cc9 | ||
|
|
a459230aa9 | ||
|
|
e4f57ab2fe | ||
|
|
6a9ac6f90a | ||
|
|
6883b71ce7 | ||
|
|
70552d58ac | ||
|
|
c7bda4d0be | ||
|
|
e4e20c8007 | ||
|
|
2fbcd9aaf7 | ||
|
|
723db97094 | ||
|
|
65be882b49 | ||
|
|
48765cc87d | ||
|
|
e2f6191229 | ||
|
|
19126b7c6d | ||
|
|
c92b451033 | ||
|
|
3122d0cc6b | ||
|
|
06e6fec4ca | ||
|
|
12943cc808 | ||
|
|
6ec734df13 | ||
|
|
657c54efd4 | ||
|
|
4f1f632a7d | ||
|
|
7e83d3a54d | ||
|
|
8d30d5d689 | ||
|
|
c16f7a5e02 | ||
|
|
5705efc998 | ||
|
|
2694bcff67 | ||
|
|
df7c089344 | ||
|
|
616e2c1c29 | ||
|
|
3c26e00fe1 | ||
|
|
fc920becac | ||
|
|
8d608c3c1c | ||
|
|
08aa65bddb | ||
|
|
54900b35dc | ||
|
|
7696702a2a | ||
|
|
42cade17cb | ||
|
|
7565458332 | ||
|
|
b86dbc088d | ||
|
|
82c596d1e3 | ||
|
|
b3097b59c7 | ||
|
|
5ec359e929 | ||
|
|
dff2d3e989 | ||
|
|
53affed8d3 | ||
|
|
102bfcebd0 |
8
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
8
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -7,7 +7,7 @@ body:
|
||||
attributes:
|
||||
label: Trilium Version
|
||||
description: What version of Trilium are you using?
|
||||
placeholder: 0.48.0-beta
|
||||
placeholder: 0.57.0-beta
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
@@ -44,3 +44,9 @@ body:
|
||||
description: A clear and concise description of the bug and any additional information.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Error logs
|
||||
description: Please provide error logs, see [wiki page](https://github.com/zadam/trilium/wiki/Error-logs) for instructions on how to submit them.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -11,3 +11,4 @@ cert.crt
|
||||
server-package.json
|
||||
.idea/httpRequests/
|
||||
data/
|
||||
tmp/
|
||||
|
||||
@@ -2,7 +2,7 @@ image:
|
||||
file: .gitpod.dockerfile
|
||||
|
||||
tasks:
|
||||
- before: nvm install 16.18.0 && nvm use 16.18.0
|
||||
- before: nvm install 16.19.0 && nvm use 16.19.0
|
||||
init: npm install
|
||||
command: npm run start-server
|
||||
|
||||
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -3,7 +3,7 @@
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="openjdk-18" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="openjdk-16" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
@@ -9,7 +9,8 @@
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"env": {
|
||||
"TRILIUM_ENV": "dev"
|
||||
"TRILIUM_ENV": "dev",
|
||||
"TRILIUM_DATA_DIR": "./data"
|
||||
},
|
||||
"outputCapture": "std",
|
||||
"program": "${workspaceFolder}/src/www"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!
|
||||
FROM node:16.18.0-alpine
|
||||
FROM node:16.19.0-alpine
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /usr/src/app
|
||||
@@ -25,12 +25,8 @@ RUN set -x \
|
||||
&& apk del .build-dependencies \
|
||||
&& npm run webpack \
|
||||
&& npm prune --omit=dev \
|
||||
# Set the path to the newly created webpack bundle
|
||||
&& sed -i -e 's/app\/desktop.js/app-dist\/desktop.js/g' src/views/desktop.ejs \
|
||||
&& sed -i -e 's/app\/mobile.js/app-dist\/mobile.js/g' src/views/mobile.ejs \
|
||||
&& sed -i -e 's/app\/setup.js/app-dist\/setup.js/g' src/views/setup.ejs \
|
||||
&& sed -i -e 's/app\/share.js/app-dist\/share.js/g' src/views/share/*.ejs \
|
||||
&& cp src/public/app/share.js src/public/app-dist/. \
|
||||
&& cp -r src/public/app/doc_notes src/public/app-dist/. \
|
||||
&& rm -rf src/public/app
|
||||
|
||||
# Some setup tools need to be kept
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Trilium笔记
|
||||
# Trilium Notes
|
||||
|
||||
[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md)
|
||||
|
||||
[](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
Trilium Notes是一个分层的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://github.com/zadam/trilium/wiki/Screenshot-tour)以快速了解:
|
||||
Trilium Notes 是一个层次化的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://github.com/zadam/trilium/wiki/Screenshot-tour)以快速了解:
|
||||
|
||||

|
||||
|
||||
@@ -14,36 +14,43 @@ Ukraine is currently suffering from Russian aggression, please consider donating
|
||||
## 特性
|
||||
|
||||
* 笔记可以排列成任意深的树。单个笔记可以放在树中的多个位置(请参阅[克隆](https://github.com/zadam/trilium/wiki/Cloning-notes))
|
||||
* 丰富的所见即所得笔记编辑功能,包括带有markdown[自动格式化功能的](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)表格,图像和[数学](https://github.com/zadam/trilium/wiki/Text-notes#math-support)
|
||||
* 丰富的所见即所得笔记编辑功能,包括带有 Markdown [自动格式化功能的](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)表格,图像和[数学](https://github.com/zadam/trilium/wiki/Text-notes#math-support)
|
||||
* 支持编辑[使用源代码的笔记](https://github.com/zadam/trilium/wiki/Code-notes),包括语法高亮显示
|
||||
* 笔记之间快速[导航](https://github.com/zadam/trilium/wiki/Note-navigation),全文搜索和[笔记挂起](https://github.com/zadam/trilium/wiki/Note-hoisting)
|
||||
* 笔记之间快速[导航](https://github.com/zadam/trilium/wiki/Note-navigation),全文搜索和[笔记聚焦](https://github.com/zadam/trilium/wiki/Note-hoisting)
|
||||
* 无缝[笔记版本控制](https://github.com/zadam/trilium/wiki/Note-revisions)
|
||||
* 笔记[属性](https://github.com/zadam/trilium/wiki/Attributes)可用于笔记组织,查询和高级[脚本编写](https://github.com/zadam/trilium/wiki/Scripts)
|
||||
* [同步](https://github.com/zadam/trilium/wiki/Synchronization)与自托管同步服务器
|
||||
* 有一个[第三方提供的同步服务器托管服务](https://trilium.cc/paid-hosting)
|
||||
* 公开地[分享](https://github.com/zadam/trilium/wiki/Sharing)(发布)笔记到互联网
|
||||
* 具有按笔记粒度的强大的[笔记加密](https://github.com/zadam/trilium/wiki/Protected-notes)
|
||||
* 使用自带的 Excalidraw 来绘制图表(笔记类型“画布”)
|
||||
* [关系图](https://github.com/zadam/trilium/wiki/Relation-map)和[链接图](https://github.com/zadam/trilium/wiki/Link-map),用于可视化笔记及其关系
|
||||
* [脚本](https://github.com/zadam/trilium/wiki/Scripts)-请参阅[高级展示](https://github.com/zadam/trilium/wiki/Advanced-showcases)
|
||||
* 可用性和性能均能很好地扩展至超过10万个笔记
|
||||
* 针对智能手机和平板电脑进行触摸优化的[移动前端](https://github.com/zadam/trilium/wiki/Mobile-frontend)
|
||||
* [脚本](https://github.com/zadam/trilium/wiki/Scripts) - 请参阅[高级功能展示](https://github.com/zadam/trilium/wiki/Advanced-showcases)
|
||||
* 在拥有超过 10 万条笔记时仍能保持良好的可用性和性能
|
||||
* 针对智能手机和平板电脑进行优化的[用于移动设备的前端](https://github.com/zadam/trilium/wiki/Mobile-frontend)
|
||||
* [夜间主题](https://github.com/zadam/trilium/wiki/Themes)
|
||||
* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import)和[Markdown导入导出](https://github.com/zadam/trilium/wiki/Markdown)
|
||||
* [Web Clipper](https://github.com/zadam/trilium/wiki/Web-clipper)可轻松保存Web内容
|
||||
* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) 和 [Markdown 导入导出](https://github.com/zadam/trilium/wiki/Markdown)功能
|
||||
* 使用[网页剪藏](https://github.com/zadam/trilium/wiki/Web-clipper)轻松保存互联网上的内容
|
||||
|
||||
## 构建
|
||||
|
||||
Trilium是作为桌面应用程序(Linux和Windows)或服务器上托管的Web应用程序(Linux)提供的。Mac OS桌面版本可用,但[不受支持](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support)。
|
||||
Trilium 可以用作桌面应用程序(Linux 和 Windows)或服务器(Linux)上托管的 Web 应用程序。虽然有 macOS 版本的桌面应用程序,但它[不受支持](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support)。
|
||||
|
||||
* 如果要在桌面上使用Trilium,请从[最新版本](https://github.com/zadam/trilium/releases/latest)下载适用于您平台的二进制[版本](https://github.com/zadam/trilium/releases/latest),解压缩该软件包并运行`trilium`可执行文件。
|
||||
* 如果要在服务器上安装Trilium,请遵循[此页面](https://github.com/zadam/trilium/wiki/Server-installation)。
|
||||
* 当前仅支持(经过测试)最新的Chrome和Firefox浏览器。
|
||||
* 如果要在桌面上使用 Trilium,请从[最新版本](https://github.com/zadam/trilium/releases/latest)下载适用于您平台的二进制版本,解压缩该软件包并运行`trilium`可执行文件。
|
||||
* 如果要在服务器上安装 Trilium,请参考[此页面](https://github.com/zadam/trilium/wiki/Server-installation)。
|
||||
* 当前仅支持(测试过)最近发布的 Chrome 和 Firefox 浏览器。
|
||||
|
||||
Trilium 也提供 Flatpak:
|
||||
|
||||
[<img width="240" src="https://flathub.org/assets/badges/flathub-badge-en.png">](https://flathub.org/apps/details/com.github.zadam.trilium)
|
||||
|
||||
## 文档
|
||||
|
||||
[有关文档页面的完整列表,请参见Wiki。](https://github.com/zadam/trilium/wiki/)
|
||||
[有关文档页面的完整列表,请参见 Wiki。](https://github.com/zadam/trilium/wiki/)
|
||||
|
||||
[中文Wiki在这里](https://github.com/baddate/trilium/wiki/)
|
||||
* [Wiki 的中文翻译版本](https://github.com/baddate/trilium/wiki/)
|
||||
|
||||
您还可以阅读[个人知识库模式](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base),以获取有关如何使用Trilium的灵感。
|
||||
您还可以阅读[个人知识库模式](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base),以获取有关如何使用 Trilium 的灵感。
|
||||
|
||||
## 贡献
|
||||
|
||||
@@ -51,7 +58,7 @@ Trilium是作为桌面应用程序(Linux和Windows)或服务器上托管的W
|
||||
|
||||
[](https://gitpod.io/#https://github.com/zadam/trilium)
|
||||
|
||||
或在本地克隆并运行
|
||||
或者克隆本仓库到本地,并运行
|
||||
|
||||
```
|
||||
npm install
|
||||
@@ -60,7 +67,15 @@ npm run start-server
|
||||
|
||||
## 致谢
|
||||
|
||||
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - 市场上最好的所见即所得编辑器,互动性强且聆听能力强的团队
|
||||
* [FancyTree](https://github.com/mar10/fancytree) - 一个非常丰富的关于树的库,强大的没有对手。没有它,Trilium Notes将不会如此。
|
||||
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - 市面上最好的所见即所得编辑器,拥有互动性强且聆听能力强的团队
|
||||
* [FancyTree](https://github.com/mar10/fancytree) - 一个非常丰富的关于树的库,强大到没有对手。没有它,Trilium Notes 将不会如此。
|
||||
* [CodeMirror](https://github.com/codemirror/CodeMirror) - 支持大量语言的代码编辑器
|
||||
* [jsPlumb](https://github.com/jsplumb/jsplumb)强大的可视化连接库。- 用于[关系图](https://github.com/zadam/trilium/wiki/Relation-map)和[链接图](https://github.com/zadam/trilium/wiki/Link-map)
|
||||
* [jsPlumb](https://github.com/jsplumb/jsplumb) - 强大的可视化连接库。用于[关系图](https://github.com/zadam/trilium/wiki/Relation-map)和[链接图](https://github.com/zadam/trilium/wiki/Link-map)
|
||||
|
||||
## 捐赠
|
||||
|
||||
你可以通过 GitHub Sponsors,[PayPal](https://paypal.me/za4am) 或者比特币 (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2) 来捐赠。
|
||||
|
||||
## 许可证
|
||||
|
||||
本程序是自由软件:你可以再发布本软件和/或修改本软件,只要你遵循 Free Software Foundation 发布的 GNU Affero General Public License 的第三版或者任何(由你选择)更晚的版本。
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PKG_DIR=dist/trilium-linux-x64-server
|
||||
NODE_VERSION=16.18.0
|
||||
NODE_VERSION=16.19.0
|
||||
|
||||
if [ "$1" != "DONTCOPY" ]
|
||||
then
|
||||
|
||||
@@ -30,7 +30,7 @@ cp bin/tpl/anonymize-database.sql $BUILD_DIR/
|
||||
cp -r dump-db $BUILD_DIR/
|
||||
rm -rf $BUILD_DIR/dump-db/node_modules
|
||||
|
||||
cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.{bat,ps1} $BUILD_DIR/
|
||||
cp bin/tpl/trilium-{portable,no-cert-check,safe-mode}.bat $BUILD_DIR/
|
||||
|
||||
echo "Zipping windows x64 electron distribution..."
|
||||
VERSION=`jq -r ".version" package.json`
|
||||
|
||||
@@ -5,7 +5,7 @@ if [[ $# -eq 0 ]] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
n exec 16.18.0 npm run webpack
|
||||
n exec 16.19.0 npm run webpack
|
||||
|
||||
DIR=$1
|
||||
|
||||
@@ -27,7 +27,7 @@ cp -r electron.js $DIR/
|
||||
cp webpack-* $DIR/
|
||||
|
||||
# run in subshell (so we return to original dir)
|
||||
(cd $DIR && n exec 16.18.0 npm install --only=prod)
|
||||
(cd $DIR && n exec 16.19.0 npm install --only=prod)
|
||||
|
||||
# cleanup of useless files in dependencies
|
||||
rm -r $DIR/node_modules/image-q/demo
|
||||
@@ -45,10 +45,6 @@ find $DIR/node_modules -name demo -exec rm -rf {} \;
|
||||
find $DIR/libraries -name "*.map" -type f -delete
|
||||
|
||||
cp $DIR/src/public/app/share.js $DIR/src/public/app-dist/
|
||||
cp -r $DIR/src/public/app/doc_notes $DIR/src/public/app-dist/
|
||||
|
||||
rm -rf $DIR/src/public/app
|
||||
|
||||
sed -i -e 's/app\/desktop.js/app-dist\/desktop.js/g' $DIR/src/views/desktop.ejs
|
||||
sed -i -e 's/app\/mobile.js/app-dist\/mobile.js/g' $DIR/src/views/mobile.ejs
|
||||
sed -i -e 's/app\/setup.js/app-dist\/setup.js/g' $DIR/src/views/setup.ejs
|
||||
sed -i -e 's/app\/share.js/app-dist\/share.js/g' $DIR/src/views/share/*.ejs
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
|
||||
UPDATE etapi_tokens SET tokenHash = 'API token hash value';
|
||||
UPDATE notes SET title = 'title' WHERE title NOT IN ('root', 'hidden', 'share');
|
||||
UPDATE notes SET title = 'title' WHERE title NOT IN ('root', '_hidden', '_share');
|
||||
UPDATE note_contents SET content = 'text' WHERE content IS NOT NULL;
|
||||
UPDATE note_revisions SET title = 'title';
|
||||
UPDATE note_revision_contents SET content = 'text' WHERE content IS NOT NULL;
|
||||
|
||||
UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label' AND name NOT IN('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss', 'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'hoistedCssClass', 'cssClass', 'iconClass', 'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider', 'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'noteRevisionsWidgetDisabled', 'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass', 'workspaceTabBackgroundColor', 'searchHome', 'hoistedInbox', 'hoistedSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId', 'bookmarked', 'bookmarkFolder', 'sorted', 'top', 'fullContentWidth', 'shareHiddenFromTree', 'shareAlias', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation', 'runOnNoteTitleChange', 'runOnNoteChange', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');
|
||||
UPDATE attributes SET name = 'name' WHERE type = 'relation' AND name NOT IN ('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss', 'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'hoistedCssClass', 'cssClass', 'iconClass', 'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider', 'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'noteRevisionsWidgetDisabled', 'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass', 'workspaceTabBackgroundColor', 'searchHome', 'hoistedInbox', 'hoistedSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId', 'bookmarked', 'bookmarkFolder', 'sorted', 'top', 'fullContentWidth', 'shareHiddenFromTree', 'shareAlias', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation', 'runOnNoteTitleChange', 'runOnNoteChange', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');
|
||||
UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label' 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', 'noteRevisionsWidgetDisabled', 'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass', 'workspaceTabBackgroundColor', 'searchHome', 'workspaceInbox', 'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId', 'bookmarkFolder', 'sorted', 'top', 'fullContentWidth', 'shareHiddenFromTree', 'shareAlias', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation', 'runOnNoteTitleChange', 'runOnNoteContentChange', 'runOnNoteChange', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');
|
||||
UPDATE attributes SET name = 'name' WHERE type = 'relation' 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', 'noteRevisionsWidgetDisabled', 'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass', 'workspaceTabBackgroundColor', 'searchHome', 'workspaceInbox', 'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId', 'bookmarkFolder', 'sorted', 'top', 'fullContentWidth', 'shareHiddenFromTree', 'shareAlias', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation', 'runOnNoteTitleChange', 'runOnNoteContentChange', 'runOnNoteChange', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');
|
||||
UPDATE branches SET prefix = 'prefix' WHERE prefix IS NOT NULL AND prefix != 'recovered';
|
||||
UPDATE options SET value = 'anonymized' WHERE name IN
|
||||
('documentId', 'documentSecret', 'encryptedDataKey',
|
||||
'passwordVerificationHash', 'passwordVerificationSalt',
|
||||
'passwordDerivedKeySalt', 'username', 'syncServerHost', 'syncProxy')
|
||||
('documentId', 'documentSecret', 'encryptedDataKey',
|
||||
'passwordVerificationHash', 'passwordVerificationSalt',
|
||||
'passwordDerivedKeySalt', 'username', 'syncServerHost', 'syncProxy')
|
||||
AND value != '';
|
||||
|
||||
VACUUM;
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
@echo off
|
||||
:: Try to get powershell to launch Trilium since it deals with UTF-8 characters in current path
|
||||
:: If there's no powershell available, fallback to unicode enabled command interpreter
|
||||
|
||||
WHERE powershell.exe > NUL 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO BATCH ELSE GOTO POWERSHELL
|
||||
|
||||
:POWERSHELL
|
||||
powershell -ExecutionPolicy Bypass -NonInteractive -NoLogo "Set-Item -Path Env:NODE_TLS_REJECT_UNAUTHORIZED -Value 0; ./trilium.exe"
|
||||
GOTO END
|
||||
|
||||
:BATCH
|
||||
:: Make sure we support UTF-8 characters
|
||||
chcp 65001
|
||||
|
||||
:: Get Current Trilium executable directory and compute data directory
|
||||
SET DIR=%~dp0
|
||||
set NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||
cd %DIR%
|
||||
WHERE powershell.exe
|
||||
IF %ERRORLEVEL% NEQ 0 (start trilium.exe) ELSE (powershell.exe ./trilium-no-cert-check.ps1)
|
||||
start trilium.exe
|
||||
GOTO END
|
||||
|
||||
:END
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
Set-Item -Path Env:NODE_TLS_REJECT_UNAUTHORIZED -Value 0
|
||||
./trilium.exe
|
||||
@@ -1,5 +1,23 @@
|
||||
@echo off
|
||||
:: Try to get powershell to launch Trilium since it deals with UTF-8 characters in current path
|
||||
:: If there's no powershell available, fallback to unicode enabled command interpreter
|
||||
|
||||
WHERE powershell.exe > NUL 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO BATCH ELSE GOTO POWERSHELL
|
||||
|
||||
:POWERSHELL
|
||||
powershell -ExecutionPolicy Bypass -NonInteractive -NoLogo "Set-Item -Path Env:TRILIUM_DATA_DIR -Value './trilium-data'; ./trilium.exe"
|
||||
GOTO END
|
||||
|
||||
:BATCH
|
||||
:: Make sure we support UTF-8 characters
|
||||
chcp 65001
|
||||
|
||||
:: Get Current Trilium executable directory and compute data directory
|
||||
SET DIR=%~dp0
|
||||
SET TRILIUM_DATA_DIR=%DIR%\trilium-data
|
||||
cd %DIR%
|
||||
WHERE powershell.exe
|
||||
IF %ERRORLEVEL% NEQ 0 (start trilium.exe) ELSE (powershell.exe ./trilium-portable.ps1)
|
||||
start trilium.exe
|
||||
GOTO END
|
||||
|
||||
:END
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
Set-Item -Path Env:TRILIUM_DATA_DIR -Value './trilium-data'
|
||||
./trilium.exe
|
||||
@@ -1,5 +1,23 @@
|
||||
@echo off
|
||||
:: Try to get powershell to launch Trilium since it deals with UTF-8 characters in current path
|
||||
:: If there's no powershell available, fallback to unicode enabled command interpreter
|
||||
|
||||
WHERE powershell.exe > NUL 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 GOTO BATCH ELSE GOTO POWERSHELL
|
||||
|
||||
:POWERSHELL
|
||||
powershell -ExecutionPolicy Bypass -NonInteractive -NoLogo "Set-Item -Path Env:TRILIUM_SAFE_MODE -Value 1; ./trilium.exe --disable-gpu"
|
||||
GOTO END
|
||||
|
||||
:BATCH
|
||||
:: Make sure we support UTF-8 characters
|
||||
chcp 65001
|
||||
|
||||
:: Get Current Trilium executable directory and compute data directory
|
||||
SET DIR=%~dp0
|
||||
SET TRILIUM_SAFE_MODE=1
|
||||
cd %DIR%
|
||||
WHERE powershell.exe
|
||||
IF %ERRORLEVEL% NEQ 0 (start trilium.exe --disable-gpu) ELSE (powershell.exe ./trilium-safe-mode.ps1)
|
||||
start trilium.exe --disable-gpu
|
||||
GOTO END
|
||||
|
||||
:END
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
Set-Item -Path Env:TRILIUM_SAFE_MODE -Value 1
|
||||
./trilium.exe --disable-gpu
|
||||
BIN
db/demo.zip
BIN
db/demo.zip
Binary file not shown.
@@ -1,4 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS "mig_entity_changes" (
|
||||
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,
|
||||
@@ -11,13 +14,6 @@ CREATE TABLE IF NOT EXISTS "mig_entity_changes" (
|
||||
`utcDateChanged` TEXT NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO mig_entity_changes (id, entityName, entityId, hash, isErased, changeId, componentId, instanceId, isSynced, utcDateChanged)
|
||||
SELECT id, entityName, entityId, hash, isErased, changeId, '', '', isSynced, utcDateChanged FROM entity_changes;
|
||||
|
||||
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`
|
||||
|
||||
6
db/migrations/0198__rename_branchIds.sql
Normal file
6
db/migrations/0198__rename_branchIds.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
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;
|
||||
53
db/migrations/0199__rename_ids.sql
Normal file
53
db/migrations/0199__rename_ids.sql
Normal file
@@ -0,0 +1,53 @@
|
||||
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';
|
||||
12
db/migrations/0200__create_hidden_subtree.js
Normal file
12
db/migrations/0200__create_hidden_subtree.js
Normal file
@@ -0,0 +1,12 @@
|
||||
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);
|
||||
});
|
||||
};
|
||||
2
db/migrations/0201__move_share_under_hidden.sql
Normal file
2
db/migrations/0201__move_share_under_hidden.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
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';
|
||||
@@ -0,0 +1,2 @@
|
||||
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';
|
||||
6
db/migrations/0203__delete_singles_special_note.sql
Normal file
6
db/migrations/0203__delete_singles_special_note.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
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';
|
||||
21
db/migrations/0204__migrate_bookmarks_to_clones.js
Normal file
21
db/migrations/0204__migrate_bookmarks_to_clones.js
Normal file
@@ -0,0 +1,21 @@
|
||||
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');
|
||||
}
|
||||
});
|
||||
};
|
||||
3
db/migrations/0205__rename_note_types.sql
Normal file
3
db/migrations/0205__rename_note_types.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
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';
|
||||
33
db/migrations/0206__delete_search_and_sql_console_history.js
Normal file
33
db/migrations/0206__delete_search_and_sql_console_history.js
Normal file
@@ -0,0 +1,33 @@
|
||||
// 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');
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
2
db/migrations/0207__rename_search_and_sql_console.sql
Normal file
2
db/migrations/0207__rename_search_and_sql_console.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
UPDATE notes SET title = 'SQL Console History' WHERE noteId = '_sqlConsole';
|
||||
UPDATE notes SET title = 'Search History' WHERE noteId = '_search';
|
||||
13
db/migrations/0208__remove_archived_from_hidden.js
Normal file
13
db/migrations/0208__remove_archived_from_hidden.js
Normal file
@@ -0,0 +1,13 @@
|
||||
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');
|
||||
}
|
||||
});
|
||||
};
|
||||
5
db/migrations/0209__rename_hoisted_labels.sql
Normal file
5
db/migrations/0209__rename_hoisted_labels.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
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';
|
||||
24
db/migrations/0210__consistency_checks.js
Normal file
24
db/migrations/0210__consistency_checks.js
Normal file
@@ -0,0 +1,24 @@
|
||||
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 noteService = require("../../src/services/notes");
|
||||
|
||||
await cls.init(async () => {
|
||||
// precaution for the 0211 migration
|
||||
noteService.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}`);
|
||||
}
|
||||
});
|
||||
};
|
||||
12
db/migrations/0211__rename_branchIds.sql
Normal file
12
db/migrations/0211__rename_branchIds.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- 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;
|
||||
21
db/migrations/0212__delete_all_attributes_of_named_notes.js
Normal file
21
db/migrations/0212__delete_all_attributes_of_named_notes.js
Normal file
@@ -0,0 +1,21 @@
|
||||
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();
|
||||
|
||||
const hidden = becca.getNote("_hidden");
|
||||
|
||||
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()) {
|
||||
attr.markAsDeleted("0212__delete_all_attributes_of_named_notes");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -94,7 +94,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line15">line 15</a>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line16">line 16</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line46">line 46</a>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line47">line 47</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -336,7 +336,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line58">line 58</a>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line59">line 59</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line52">line 52</a>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line53">line 53</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -472,7 +472,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line48">line 48</a>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line49">line 49</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -540,7 +540,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line54">line 54</a>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line55">line 55</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -608,7 +608,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line50">line 50</a>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line51">line 51</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -676,7 +676,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line60">line 60</a>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line61">line 61</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -744,7 +744,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line56">line 56</a>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line57">line 57</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1176,7 +1176,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line115">line 115</a>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line129">line 129</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1370,7 +1370,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line122">line 122</a>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line142">line 142</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1564,7 +1564,7 @@ and relation (representing named relationship between source and target note)</d
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line137">line 137</a>
|
||||
<a href="becca_entities_attribute.js.html">becca/entities/attribute.js</a>, <a href="becca_entities_attribute.js.html#line157">line 157</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<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#line26">line 26</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line28">line 28</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
<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#line465">line 465</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line570">line 570</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
|
||||
<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#line39">line 39</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line41">line 41</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -405,7 +405,7 @@
|
||||
|
||||
<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#line30">line 30</a>
|
||||
<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>
|
||||
|
||||
|
||||
@@ -515,7 +515,7 @@
|
||||
|
||||
<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#line41">line 41</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line43">line 43</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -625,7 +625,7 @@
|
||||
|
||||
<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>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line34">line 34</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -735,7 +735,7 @@
|
||||
|
||||
<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#line447">line 447</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line472">line 472</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -845,7 +845,7 @@
|
||||
|
||||
<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#line28">line 28</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line30">line 30</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -955,7 +955,7 @@
|
||||
|
||||
<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#line43">line 43</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line45">line 45</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1131,7 +1131,7 @@ JSON MIME type. See also createNewNote() for more options.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line202">line 202</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line204">line 204</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1298,7 +1298,7 @@ JSON MIME type. See also createNewNote() for more options.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line229">line 229</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line231">line 231</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1584,7 +1584,7 @@ JSON MIME type. See also createNewNote() for more options.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line257">line 257</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line259">line 259</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1636,6 +1636,143 @@ JSON MIME type. See also createNewNote() for more options.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="createOrUpdateLauncher"><span class="type-signature"></span>createOrUpdateLauncher<span class="signature">(opts)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Creates a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.
|
||||
</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>opts</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type"><a href="global.html#CreateOrUpdateLauncher">CreateOrUpdateLauncher</a></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line508">line 508</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1789,7 +1926,7 @@ JSON MIME type. See also createNewNote() for more options.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line186">line 186</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line188">line 188</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1971,7 +2108,7 @@ JSON MIME type. See also createNewNote() for more options.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line157">line 157</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line159">line 159</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2172,7 +2309,7 @@ JSON MIME type. See also createNewNote() for more options.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line147">line 147</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line149">line 149</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2323,7 +2460,7 @@ JSON MIME type. See also createNewNote() for more options.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line435">line 435</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line460">line 460</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2429,7 +2566,7 @@ JSON MIME type. See also createNewNote() for more options.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line458">line 458</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line485">line 485</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2587,7 +2724,7 @@ JSON MIME type. See also createNewNote() for more options.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line77">line 77</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line79">line 79</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2741,7 +2878,7 @@ JSON MIME type. See also createNewNote() for more options.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line70">line 70</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line72">line 72</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2944,7 +3081,7 @@ JSON MIME type. See also createNewNote() for more options.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line339">line 339</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line341">line 341</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3145,7 +3282,7 @@ JSON MIME type. See also createNewNote() for more options.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line349">line 349</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line351">line 351</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3255,7 +3392,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line56">line 56</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line58">line 58</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3456,7 +3593,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line379">line 379</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line381">line 381</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3610,7 +3747,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line63">line 63</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line65">line 65</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3811,7 +3948,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line136">line 136</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line138">line 138</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4012,7 +4149,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line126">line 126</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line128">line 128</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4118,7 +4255,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line328">line 328</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line330">line 330</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4288,7 +4425,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line358">line 358</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line360">line 360</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4522,7 +4659,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line369">line 369</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line371">line 371</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4723,7 +4860,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line389">line 389</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line391">line 391</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4876,7 +5013,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line301">line 301</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line303">line 303</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5013,7 +5150,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line428">line 428</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line453">line 453</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5121,7 +5258,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line453">line 453</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line478">line 478</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5302,7 +5439,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line112">line 112</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line114">line 114</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5504,7 +5641,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line88">line 88</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line90">line 90</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5713,7 +5850,187 @@ This method looks similar to toggleNoteInParent() but differs because we're look
|
||||
|
||||
<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#line409">line 409</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line434">line 434</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="sortNotes"><span class="type-signature"></span>sortNotes<span class="signature">(parentNoteId, sortConfig<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Sort child notes of a given note.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Parameters:</h5>
|
||||
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
<th>Attributes</th>
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>parentNoteId</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">this note's child notes will be sorted</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>sortConfig</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type"><a href="global.html#SortConfig">SortConfig</a></span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line415">line 415</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5834,6 +6151,8 @@ This method looks similar to toggleNoteInParent() but differs because we're look
|
||||
|
||||
|
||||
|
||||
<dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>- use sortNotes instead</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5846,7 +6165,7 @@ This method looks similar to toggleNoteInParent() but differs because we're look
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line395">line 395</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line398">line 398</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6052,7 +6371,7 @@ This method looks similar to toggleNoteInParent() but differs because we're look
|
||||
|
||||
<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#line169">line 169</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line171">line 171</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6208,7 +6527,7 @@ exists, then we'll use that transaction.
|
||||
|
||||
<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#line419">line 419</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line444">line 444</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6363,7 +6682,7 @@ exists, then we'll use that transaction.
|
||||
|
||||
<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#line442">line 442</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line467">line 467</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,10 @@
|
||||
<h2><span class="attribs"><span class="type-signature"></span></span>Branch<span class="signature">()</span><span class="type-signature"></span></h2>
|
||||
|
||||
<div class="class-description">Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
|
||||
parents.</div>
|
||||
parents.
|
||||
|
||||
Note that you should not rely on the branch's identity, since it can change easily with a note's move.
|
||||
Always check noteId instead.</div>
|
||||
|
||||
|
||||
</header>
|
||||
@@ -94,7 +97,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line18">line 18</a>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line20">line 20</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -268,7 +271,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line49">line 49</a>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line51">line 51</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -326,7 +329,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line95">line 95</a>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line97">line 97</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -394,7 +397,73 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line59">line 59</a>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line61">line 61</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="isWeak"><span class="type-signature"></span>isWeak<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Branch is weak when its existence should not hinder deletion of its note.
|
||||
As a result, note with only weak branches should be immediately deleted.
|
||||
An example is shared or bookmarked clones - they are created automatically and exist for technical reasons,
|
||||
not as user-intended actions. From user perspective, they don't count as real clones and for the purpose
|
||||
of deletion should not act as a clone.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line133">line 133</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -462,7 +531,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line51">line 51</a>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line53">line 53</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -530,7 +599,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line57">line 57</a>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line59">line 59</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -588,7 +657,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line109">line 109</a>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line111">line 111</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -656,7 +725,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line53">line 53</a>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line55">line 55</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -724,7 +793,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line55">line 55</a>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line57">line 57</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -792,7 +861,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line61">line 61</a>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line63">line 63</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1144,7 +1213,7 @@ parents.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line130">line 130</a>
|
||||
<a href="becca_entities_branch.js.html">becca/entities/branch.js</a>, <a href="becca_entities_branch.js.html#line145">line 145</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line25">line 25</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line24">line 24</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line69">line 69</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line68">line 68</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line71">line 71</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line70">line 70</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -406,7 +406,79 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line85">line 85</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line86">line 86</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="isBeingDeleted"><span class="type-signature"></span>isBeingDeleted<span class="type-signature"> :boolean</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
- set during the deletion operation, before it is completed (removed from becca completely)
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h5>Type:</h5>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<span class="param-type">boolean</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line76">line 76</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -474,7 +546,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line80">line 80</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line81">line 81</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -542,7 +614,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line63">line 63</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line62">line 62</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -610,7 +682,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line67">line 67</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line66">line 66</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -678,7 +750,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line59">line 59</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line58">line 58</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -746,7 +818,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line61">line 61</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line60">line 60</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -814,7 +886,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line65">line 65</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line64">line 64</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -882,7 +954,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line73">line 73</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line72">line 72</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -950,7 +1022,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line75">line 75</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line74">line 74</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1154,7 +1226,7 @@ See addLabel, addRelation for more specific methods.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1151">line 1151</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1177">line 1177</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1441,7 +1513,7 @@ See addLabel, addRelation for more specific methods.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1172">line 1172</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1198">line 1198</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1620,7 +1692,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1185">line 1185</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1211">line 1211</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1855,7 +1927,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1270">line 1270</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1296">line 1296</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2055,7 +2127,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1284">line 1284</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1310">line 1310</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2317,7 +2389,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1066">line 1066</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1092">line 1092</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2423,7 +2495,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line986">line 986</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1008">line 1008</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2597,7 +2669,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line574">line 574</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line600">line 600</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2775,7 +2847,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line585">line 585</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line611">line 611</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2978,7 +3050,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line364">line 364</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line374">line 374</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3086,7 +3158,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line162">line 162</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line172">line 172</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3188,7 +3260,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line182">line 182</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line192">line 192</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3290,7 +3362,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line172">line 172</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line182">line 182</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3392,7 +3464,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line196">line 196</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line206">line 206</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3494,7 +3566,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line230">line 230</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line240">line 240</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3602,7 +3674,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line717">line 717</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line740">line 740</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3708,7 +3780,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line257">line 257</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line267">line 267</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3859,7 +3931,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line515">line 515</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line541">line 541</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4017,7 +4089,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line539">line 539</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line565">line 565</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4187,7 +4259,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line614">line 614</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line640">line 640</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4354,7 +4426,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line606">line 606</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line632">line 632</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4460,7 +4532,7 @@ returned.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line684">line 684</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line707">line 707</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4640,7 +4712,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line596">line 596</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line622">line 622</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4733,6 +4805,8 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
|
||||
|
||||
<th>Default</th>
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
@@ -4750,6 +4824,9 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
|
||||
|
||||
<span class="param-type">null</span>
|
||||
|
||||
|
||||
|
||||
@@ -4768,6 +4845,12 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
null
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">(optional) attribute type to filter</td>
|
||||
</tr>
|
||||
@@ -4783,6 +4866,9 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
|
||||
|
||||
<span class="param-type">null</span>
|
||||
|
||||
|
||||
|
||||
@@ -4801,6 +4887,12 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
null
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">(optional) attribute name to filter</td>
|
||||
</tr>
|
||||
@@ -4816,6 +4908,9 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
|
||||
|
||||
<span class="param-type">null</span>
|
||||
|
||||
|
||||
|
||||
@@ -4834,6 +4929,12 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
null
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">(optional) attribute value to filter</td>
|
||||
</tr>
|
||||
@@ -4876,7 +4977,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line656">line 656</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line682">line 682</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5031,7 +5132,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line521">line 521</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line547">line 547</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5189,7 +5290,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line545">line 545</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line571">line 571</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5359,7 +5460,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line630">line 630</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line656">line 656</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5526,7 +5627,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line622">line 622</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line648">line 648</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5681,7 +5782,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line533">line 533</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line559">line 559</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5839,7 +5940,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line557">line 557</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line583">line 583</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6009,7 +6110,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line646">line 646</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line672">line 672</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6115,7 +6216,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line154">line 154</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line155">line 155</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6217,7 +6318,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line167">line 167</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line177">line 177</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6457,7 +6558,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line527">line 527</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line553">line 553</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6615,7 +6716,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line551">line 551</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line577">line 577</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6785,7 +6886,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line638">line 638</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line664">line 664</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6891,7 +6992,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line343">line 343</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line353">line 353</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7000,7 +7101,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line844">line 844</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line867">line 867</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7054,6 +7155,112 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="getStrongParentBranches"><span class="type-signature"></span>getStrongParentBranches<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="Branch.html">Branch</a>>}</span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="description">
|
||||
Returns <i>strong</i> (as opposed to <i>weak</i>) parent branches. See isWeak for details.
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line164">line 164</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5>Returns:</h5>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>
|
||||
Type
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">Array.<<a href="Branch.html">Branch</a>></span>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="getSubtree"><span class="type-signature"></span>getSubtree<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>
|
||||
|
||||
|
||||
@@ -7102,7 +7309,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line867">line 867</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line890">line 890</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7204,7 +7411,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line927">line 927</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line949">line 949</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7306,7 +7513,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line813">line 813</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line836">line 836</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7408,7 +7615,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1028">line 1028</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1054">line 1054</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7604,7 +7811,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1012">line 1012</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1034">line 1034</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7690,6 +7897,8 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
|
||||
|
||||
<th>Default</th>
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
@@ -7718,6 +7927,10 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
@@ -7744,6 +7957,10 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
@@ -7772,6 +7989,12 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
null
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
@@ -7814,7 +8037,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line459">line 459</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line485">line 485</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7916,7 +8139,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line177">line 177</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line187">line 187</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -8110,7 +8333,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line488">line 488</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line514">line 514</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -8339,7 +8562,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line565">line 565</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line591">line 591</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -8537,7 +8760,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line495">line 495</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line521">line 521</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -8735,7 +8958,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line509">line 509</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line535">line 535</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -8933,7 +9156,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line502">line 502</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line528">line 528</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -9083,7 +9306,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1087">line 1087</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1113">line 1113</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -9189,7 +9412,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line332">line 332</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line342">line 342</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -9295,7 +9518,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line324">line 324</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line334">line 334</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -9401,7 +9624,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line319">line 319</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line329">line 329</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -9507,7 +9730,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line314">line 314</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line324">line 324</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -9613,7 +9836,7 @@ This method can be significantly faster than the getAttribute()
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line338">line 338</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line348">line 348</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -10005,7 +10228,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1131">line 1131</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1157">line 1157</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -10185,7 +10408,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1246">line 1246</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1272">line 1272</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -10365,7 +10588,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1254">line 1254</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1280">line 1280</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -10560,7 +10783,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1328">line 1328</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1362">line 1362</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -10792,7 +11015,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1100">line 1100</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1126">line 1126</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -10972,7 +11195,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1230">line 1230</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1256">line 1256</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -11132,7 +11355,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1238">line 1238</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1264">line 1264</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -11374,7 +11597,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1197">line 1197</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1223">line 1223</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -11585,7 +11808,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1213">line 1213</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1239">line 1239</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -11796,7 +12019,7 @@ This is a low level method, for notes and branches use `note.deleteNote()` and '
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1222">line 1222</a>
|
||||
<a href="becca_entities_note.js.html">becca/entities/note.js</a>, <a href="becca_entities_note.js.html#line1248">line 1248</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class AbstractEntity {
|
||||
let contentToHash = "";
|
||||
|
||||
for (const propertyName of this.constructor.hashedProperties) {
|
||||
contentToHash += "|" + this[propertyName];
|
||||
contentToHash += `|${this[propertyName]}`;
|
||||
}
|
||||
|
||||
if (isDeleted) {
|
||||
|
||||
@@ -33,6 +33,7 @@ const AbstractEntity = require("./abstract_entity");
|
||||
const sql = require("../../services/sql");
|
||||
const dateUtils = require("../../services/date_utils");
|
||||
const promotedAttributeDefinitionParser = require("../../services/promoted_attribute_definition_parser");
|
||||
const {sanitizeAttributeName} = require("../../services/sanitize_attribute_name");
|
||||
|
||||
/**
|
||||
* Attribute is an abstract concept which has two real uses - label (key - value pair)
|
||||
@@ -90,7 +91,6 @@ class Attribute extends AbstractEntity {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
init() {
|
||||
if (this.attributeId) {
|
||||
this.becca.attributes[this.attributeId] = this;
|
||||
@@ -114,6 +114,20 @@ class Attribute extends AbstractEntity {
|
||||
}
|
||||
}
|
||||
|
||||
validate() {
|
||||
if (!["label", "relation"].includes(this.type)) {
|
||||
throw new Error(`Invalid attribute type '${this.type}' in attribute '${this.attributeId}' of note '${this.noteId}'`);
|
||||
}
|
||||
|
||||
if (!this.name?.trim()) {
|
||||
throw new Error(`Invalid empty name in attribute '${this.attributeId}' of note '${this.noteId}'`);
|
||||
}
|
||||
|
||||
if (this.type === 'relation' && !(this.value in this.becca.notes)) {
|
||||
throw new Error(`Cannot save relation '${this.name}' of note '${this.noteId}' since it target not existing note '${this.value}'.`);
|
||||
}
|
||||
}
|
||||
|
||||
get isAffectingSubtree() {
|
||||
return this.isInheritable
|
||||
|| (this.type === 'relation' && this.name === 'template');
|
||||
@@ -141,7 +155,13 @@ class Attribute extends AbstractEntity {
|
||||
* @returns {Note|null}
|
||||
*/
|
||||
getNote() {
|
||||
return this.becca.getNote(this.noteId);
|
||||
const note = this.becca.getNote(this.noteId);
|
||||
|
||||
if (!note) {
|
||||
throw new Error(`Note '${this.noteId}' of attribute '${this.attributeId}', type '${this.type}', name '${this.name}' does not exist.`);
|
||||
}
|
||||
|
||||
return note;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -185,11 +205,11 @@ class Attribute extends AbstractEntity {
|
||||
}
|
||||
|
||||
beforeSaving() {
|
||||
if (!this.value) {
|
||||
if (this.type === 'relation') {
|
||||
throw new Error(`Cannot save relation ${this.name} since it does not target any note.`);
|
||||
}
|
||||
this.validate();
|
||||
|
||||
this.name = sanitizeAttributeName(this.name);
|
||||
|
||||
if (!this.value) {
|
||||
// null value isn't allowed
|
||||
this.value = "";
|
||||
}
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
|
||||
const Note = require('./note');
|
||||
const AbstractEntity = require("./abstract_entity");
|
||||
const sql = require("../../services/sql");
|
||||
const dateUtils = require("../../services/date_utils");
|
||||
const utils = require("../../services/utils.js");
|
||||
const utils = require("../../services/utils");
|
||||
const TaskContext = require("../../services/task_context");
|
||||
const cls = require("../../services/cls");
|
||||
const log = require("../../services/log");
|
||||
@@ -41,6 +40,9 @@ const log = require("../../services/log");
|
||||
* Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
|
||||
* parents.
|
||||
*
|
||||
* Note that you should not rely on the branch's identity, since it can change easily with a note's move.
|
||||
* Always check noteId instead.
|
||||
*
|
||||
* @extends AbstractEntity
|
||||
*/
|
||||
class Branch extends AbstractEntity {
|
||||
@@ -147,6 +149,19 @@ class Branch extends AbstractEntity {
|
||||
return !(this.branchId in this.becca.branches);
|
||||
}
|
||||
|
||||
/**
|
||||
* Branch is weak when its existence should not hinder deletion of its note.
|
||||
* As a result, note with only weak branches should be immediately deleted.
|
||||
* An example is shared or bookmarked clones - they are created automatically and exist for technical reasons,
|
||||
* not as user-intended actions. From user perspective, they don't count as real clones and for the purpose
|
||||
* of deletion should not act as a clone.
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
get isWeak() {
|
||||
return ['_share', '_lbBookmarks'].includes(this.parentNoteId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a branch. If this is a last note's branch, delete the note as well.
|
||||
*
|
||||
@@ -187,20 +202,22 @@ class Branch extends AbstractEntity {
|
||||
|
||||
this.markAsDeleted(deleteId);
|
||||
|
||||
const notDeletedBranches = note.getParentBranches();
|
||||
const notDeletedBranches = note.getStrongParentBranches();
|
||||
|
||||
if (notDeletedBranches.length === 0) {
|
||||
for (const weakBranch of note.getParentBranches()) {
|
||||
weakBranch.markAsDeleted(deleteId);
|
||||
}
|
||||
|
||||
for (const childBranch of note.getChildBranches()) {
|
||||
childBranch.deleteBranch(deleteId, taskContext);
|
||||
}
|
||||
|
||||
// first delete children and then parent - this will show up better in recent changes
|
||||
|
||||
log.info("Deleting note " + note.noteId);
|
||||
log.info(`Deleting note ${note.noteId}`);
|
||||
|
||||
// marking note as deleted as a signal to event handlers that the note is being deleted
|
||||
// (isDeleted is being checked against becca)
|
||||
delete this.becca.notes[note.noteId];
|
||||
this.becca.notes[note.noteId].isBeingDeleted = true;
|
||||
|
||||
for (const attribute of note.getOwnedAttributes()) {
|
||||
attribute.markAsDeleted(deleteId);
|
||||
@@ -221,9 +238,15 @@ class Branch extends AbstractEntity {
|
||||
|
||||
beforeSaving() {
|
||||
if (this.notePosition === undefined || this.notePosition === null) {
|
||||
// TODO finding new position can be refactored into becca
|
||||
const maxNotePos = sql.getValue('SELECT MAX(notePosition) FROM branches WHERE parentNoteId = ? AND isDeleted = 0', [this.parentNoteId]);
|
||||
this.notePosition = maxNotePos === null ? 0 : maxNotePos + 10;
|
||||
let maxNotePos = 0;
|
||||
|
||||
for (const childBranch of this.parentNote.getChildBranches()) {
|
||||
if (maxNotePos < childBranch.notePosition && childBranch.noteId !== '_hidden') {
|
||||
maxNotePos = childBranch.notePosition;
|
||||
}
|
||||
}
|
||||
|
||||
this.notePosition = maxNotePos + 10;
|
||||
}
|
||||
|
||||
if (!this.isExpanded) {
|
||||
|
||||
@@ -39,7 +39,6 @@ const NoteRevision = require("./note_revision");
|
||||
const TaskContext = require("../../services/task_context");
|
||||
const dayjs = require("dayjs");
|
||||
const utc = require('dayjs/plugin/utc');
|
||||
const searchService = require("../../services/search/services/search.js");
|
||||
dayjs.extend(utc)
|
||||
|
||||
const LABEL = 'label';
|
||||
@@ -101,6 +100,8 @@ class Note extends AbstractEntity {
|
||||
this.utcDateCreated = utcDateCreated || dateUtils.utcNowDateTime();
|
||||
/** @type {string} */
|
||||
this.utcDateModified = utcDateModified;
|
||||
/** @type {boolean} - set during the deletion operation, before it is completed (removed from becca completely) */
|
||||
this.isBeingDeleted = false;
|
||||
|
||||
// ------ Derived attributes ------
|
||||
|
||||
@@ -183,6 +184,15 @@ class Note extends AbstractEntity {
|
||||
return this.parentBranches;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <i>strong</i> (as opposed to <i>weak</i>) parent branches. See isWeak for details.
|
||||
*
|
||||
* @returns {Branch[]}
|
||||
*/
|
||||
getStrongParentBranches() {
|
||||
return this.getParentBranches().filter(branch => !branch.isWeak);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Branch[]}
|
||||
* @deprecated use getParentBranches() instead
|
||||
@@ -229,7 +239,7 @@ class Note extends AbstractEntity {
|
||||
return undefined;
|
||||
}
|
||||
else {
|
||||
throw new Error("Cannot find note content for noteId=" + this.noteId);
|
||||
throw new Error(`Cannot find note content for noteId=${this.noteId}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,7 +332,7 @@ class Note extends AbstractEntity {
|
||||
|
||||
sql.upsert("note_contents", "noteId", pojo);
|
||||
|
||||
const hash = utils.hash(this.noteId + "|" + pojo.content.toString());
|
||||
const hash = utils.hash(`${this.noteId}|${pojo.content.toString()}`);
|
||||
|
||||
entityChangesService.addEntityChange({
|
||||
entityName: 'note_contents',
|
||||
@@ -350,7 +360,7 @@ class Note extends AbstractEntity {
|
||||
|
||||
/** @returns {boolean} true if this note is JavaScript (code or attachment) */
|
||||
isJavaScript() {
|
||||
return (this.type === "code" || this.type === "file")
|
||||
return (this.type === "code" || this.type === "file" || this.type === 'launcher')
|
||||
&& (this.mime.startsWith("application/javascript")
|
||||
|| this.mime === "application/x-javascript"
|
||||
|| this.mime === "text/javascript");
|
||||
@@ -390,6 +400,8 @@ class Note extends AbstractEntity {
|
||||
* @returns {Attribute[]} all note's attributes, including inherited ones
|
||||
*/
|
||||
getAttributes(type, name) {
|
||||
this.__validateTypeName(type, name);
|
||||
|
||||
this.__getAttributes([]);
|
||||
|
||||
if (type && name) {
|
||||
@@ -402,7 +414,8 @@ class Note extends AbstractEntity {
|
||||
return this.__attributeCache.filter(attr => attr.name === name);
|
||||
}
|
||||
else {
|
||||
return this.__attributeCache.slice();
|
||||
// a bit unsafe to return the original array, but defensive copy would be costly
|
||||
return this.__attributeCache;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,13 +491,26 @@ class Note extends AbstractEntity {
|
||||
return this.inheritableAttributeCache;
|
||||
}
|
||||
|
||||
__validateTypeName(type, name) {
|
||||
if (type && type !== 'label' && type !== 'relation') {
|
||||
throw new Error(`Unrecognized attribute type '${type}'. Only 'label' and 'relation' are possible values.`);
|
||||
}
|
||||
|
||||
if (name) {
|
||||
const firstLetter = name.charAt(0);
|
||||
if (firstLetter === '#' || firstLetter === '~') {
|
||||
throw new Error(`Detect '#' or '~' in the attribute's name. In the API, attribute names should be set without these characters.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* @param name
|
||||
* @param [value]
|
||||
* @returns {boolean}
|
||||
*/
|
||||
hasAttribute(type, name, value) {
|
||||
hasAttribute(type, name, value = null) {
|
||||
return !!this.getAttributes().find(attr =>
|
||||
attr.type === type
|
||||
&& attr.name === name
|
||||
@@ -676,16 +702,13 @@ class Note extends AbstractEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} [type] - (optional) attribute type to filter
|
||||
* @param {string} [name] - (optional) attribute name to filter
|
||||
* @param {string} [value] - (optional) attribute value to filter
|
||||
* @param {string|null} [type] - (optional) attribute type to filter
|
||||
* @param {string|null} [name] - (optional) attribute name to filter
|
||||
* @param {string|null} [value] - (optional) attribute value to filter
|
||||
* @returns {Attribute[]} note's "owned" attributes - excluding inherited ones
|
||||
*/
|
||||
getOwnedAttributes(type, name, value) {
|
||||
// it's a common mistake to include # or ~ into attribute name
|
||||
if (name && ["#", "~"].includes(name[0])) {
|
||||
name = name.substr(1);
|
||||
}
|
||||
getOwnedAttributes(type = null, name = null, value = null) {
|
||||
this.__validateTypeName(type, name);
|
||||
|
||||
if (type && name && value !== undefined && value !== null) {
|
||||
return this.ownedAttributes.filter(attr => attr.type === type && attr.name === name && attr.value === value);
|
||||
@@ -709,7 +732,7 @@ class Note extends AbstractEntity {
|
||||
*
|
||||
* This method can be significantly faster than the getAttribute()
|
||||
*/
|
||||
getOwnedAttribute(type, name, value) {
|
||||
getOwnedAttribute(type, name, value = null) {
|
||||
const attrs = this.getOwnedAttributes(type, name, value);
|
||||
|
||||
return attrs.length > 0 ? attrs[0] : null;
|
||||
@@ -744,22 +767,22 @@ class Note extends AbstractEntity {
|
||||
*/
|
||||
getFlatText() {
|
||||
if (!this.flatTextCache) {
|
||||
this.flatTextCache = this.noteId + ' ' + this.type + ' ' + this.mime + ' ';
|
||||
this.flatTextCache = `${this.noteId} ${this.type} ${this.mime} `;
|
||||
|
||||
for (const branch of this.parentBranches) {
|
||||
if (branch.prefix) {
|
||||
this.flatTextCache += branch.prefix + ' ';
|
||||
this.flatTextCache += `${branch.prefix} `;
|
||||
}
|
||||
}
|
||||
|
||||
this.flatTextCache += this.title + ' ';
|
||||
this.flatTextCache += `${this.title} `;
|
||||
|
||||
for (const attr of this.getAttributes()) {
|
||||
// it's best to use space as separator since spaces are filtered from the search string by the tokenization into words
|
||||
this.flatTextCache += (attr.type === 'label' ? '#' : '~') + attr.name;
|
||||
this.flatTextCache += `${attr.type === 'label' ? '#' : '~'}${attr.name}`;
|
||||
|
||||
if (attr.value) {
|
||||
this.flatTextCache += '=' + attr.value;
|
||||
this.flatTextCache += `=${attr.value}`;
|
||||
}
|
||||
|
||||
this.flatTextCache += ' ';
|
||||
@@ -892,7 +915,7 @@ class Note extends AbstractEntity {
|
||||
/**
|
||||
* @returns {{notes: Note[], relationships: Array.<{parentNoteId: string, childNoteId: string}>}}
|
||||
*/
|
||||
getSubtree({includeArchived = true, resolveSearch = false} = {}) {
|
||||
getSubtree({includeArchived = true, includeHidden = false, resolveSearch = false} = {}) {
|
||||
const noteSet = new Set();
|
||||
const relationships = []; // list of tuples parentNoteId -> childNoteId
|
||||
|
||||
@@ -908,8 +931,7 @@ class Note extends AbstractEntity {
|
||||
}
|
||||
|
||||
function addSubtreeNotesInner(note, parentNote = null) {
|
||||
// share can be removed after 0.57 since it will be put under hidden
|
||||
if (note.noteId === 'hidden' || note.noteId === 'share') {
|
||||
if (note.noteId === '_hidden' && !includeHidden) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1047,6 +1069,10 @@ class Note extends AbstractEntity {
|
||||
return false;
|
||||
}
|
||||
|
||||
isInHiddenSubtree() {
|
||||
return this.noteId === '_hidden' || this.hasAncestor('_hidden');
|
||||
}
|
||||
|
||||
getTargetRelations() {
|
||||
return this.targetRelations;
|
||||
}
|
||||
@@ -1129,7 +1155,7 @@ class Note extends AbstractEntity {
|
||||
const attributes = this.getOwnedAttributes();
|
||||
const attr = attributes.find(attr => attr.type === type && attr.name === name);
|
||||
|
||||
value = value !== null && value !== undefined ? value.toString() : "";
|
||||
value = value?.toString() || "";
|
||||
|
||||
if (attr) {
|
||||
if (attr.value !== value) {
|
||||
@@ -1346,8 +1372,16 @@ class Note extends AbstractEntity {
|
||||
}
|
||||
}
|
||||
|
||||
isLaunchBarConfig() {
|
||||
return this.type === 'launcher' || ['_lbRoot', '_lbAvailableLaunchers', '_lbVisibleLaunchers'].includes(this.noteId);
|
||||
}
|
||||
|
||||
isOptions() {
|
||||
return this.noteId.startsWith("options");
|
||||
}
|
||||
|
||||
get isDeleted() {
|
||||
return !(this.noteId in this.becca.notes);
|
||||
return !(this.noteId in this.becca.notes) || this.isBeingDeleted;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -109,7 +109,7 @@ class NoteRevision extends AbstractEntity {
|
||||
return undefined;
|
||||
}
|
||||
else {
|
||||
throw new Error("Cannot find note revision content for noteRevisionId=" + this.noteRevisionId);
|
||||
throw new Error(`Cannot find note revision content for noteRevisionId=${this.noteRevisionId}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ class NoteRevision extends AbstractEntity {
|
||||
|
||||
sql.upsert("note_revision_contents", "noteRevisionId", pojo);
|
||||
|
||||
const hash = utils.hash(this.noteRevisionId + "|" + pojo.content.toString());
|
||||
const hash = utils.hash(`${this.noteRevisionId}|${pojo.content.toString()}`);
|
||||
|
||||
entityChangesService.addEntityChange({
|
||||
entityName: 'note_revision_contents',
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
|
||||
|
||||
|
||||
<td class="description last">text, code, file, image, search, book, relation-map, canvas - MANDATORY</td>
|
||||
<td class="description last">text, code, file, image, search, book, relationMap, canvas - MANDATORY</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
|
||||
<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#line210">line 210</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line212">line 212</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -579,7 +579,7 @@
|
||||
|
||||
<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#line171">line 171</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line173">line 173</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -767,7 +767,7 @@
|
||||
|
||||
<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#line231">line 231</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line233">line 233</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1053,7 +1053,635 @@
|
||||
|
||||
<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#line238">line 238</a>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line240">line 240</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="CreateOrUpdateLauncher">CreateOrUpdateLauncher</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>Attributes</th>
|
||||
|
||||
|
||||
|
||||
<th>Default</th>
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>id</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">id of the launcher, only alphanumeric at least 6 characters long</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>type</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">one of
|
||||
* "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)
|
||||
* "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>title</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>isVisible</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">boolean</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
false
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">if true, will be created in the "Visible launchers", otherwise in "Available launchers"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>icon</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">name of the boxicon to be used (e.g. "bx-time")</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>keyboardShortcut</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">will activate the target note/script upon pressing, e.g. "ctrl+e"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>targetNoteId</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">for type "note"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>scriptNoteId</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">for type "script"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>widgetNoteId</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">for type "customWidget"</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<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#line487">line 487</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="SortConfig">SortConfig</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>Attributes</th>
|
||||
|
||||
|
||||
|
||||
<th>Default</th>
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>sortBy</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
title
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last">'title', 'dateCreated', 'dateModified' or a label name
|
||||
see https://github.com/zadam/trilium/wiki/Sorting for details.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>reverse</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">boolean</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
false
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>foldersFirst</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">boolean</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="default">
|
||||
|
||||
false
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_backend_script_api.js.html">services/backend_script_api.js</a>, <a href="services_backend_script_api.js.html#line400">line 400</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<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#line361">line 361</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line346">line 346</a>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line352">line 352</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -632,7 +632,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line336">line 336</a>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line342">line 342</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -834,7 +834,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line312">line 312</a>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line318">line 318</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1036,7 +1036,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line323">line 323</a>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line329">line 329</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1238,7 +1238,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line302">line 302</a>
|
||||
<a href="services_sql.js.html">services/sql.js</a>, <a href="services_sql.js.html#line308">line 308</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ const SearchContext = require("./search/search_context");
|
||||
const becca = require("../becca/becca");
|
||||
const ws = require("./ws");
|
||||
const SpacedUpdate = require("./spaced_update");
|
||||
const specialNotesService = require("./special_notes");
|
||||
const branchService = require("./branches.js");
|
||||
|
||||
/**
|
||||
* This is the main backend API interface for scripts. It's published in the local "api" object.
|
||||
@@ -240,7 +242,7 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
* @property {string} parentNoteId - MANDATORY
|
||||
* @property {string} title - MANDATORY
|
||||
* @property {string|buffer} content - MANDATORY
|
||||
* @property {string} type - text, code, file, image, search, book, relation-map, canvas - MANDATORY
|
||||
* @property {string} type - text, code, file, image, search, book, relationMap, canvas - MANDATORY
|
||||
* @property {string} mime - value is derived from default mimes for type
|
||||
* @property {boolean} isProtected - default is false
|
||||
* @property {boolean} isExpanded - default is false
|
||||
@@ -418,10 +420,33 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @deprecated - use sortNotes instead
|
||||
* @param {string} parentNoteId - this note's child notes will be sorted
|
||||
*/
|
||||
this.sortNotesByTitle = parentNoteId => treeService.sortNotes(parentNoteId);
|
||||
|
||||
/**
|
||||
* @typedef {Object} SortConfig
|
||||
* @property {string} [sortBy=title] - 'title', 'dateCreated', 'dateModified' or a label name
|
||||
* see https://github.com/zadam/trilium/wiki/Sorting for details.
|
||||
* @property {boolean} [reverse=false]
|
||||
* @property {boolean} [foldersFirst=false]
|
||||
*/
|
||||
|
||||
/**
|
||||
* Sort child notes of a given note.
|
||||
*
|
||||
* @method
|
||||
* @param {string} parentNoteId - this note's child notes will be sorted
|
||||
* @param {SortConfig} [sortConfig]
|
||||
*/
|
||||
this.sortNotes = (parentNoteId, sortConfig = {}) => treeService.sortNotes(
|
||||
parentNoteId,
|
||||
sortConfig.sortBy || "title",
|
||||
!!sortConfig.reverse,
|
||||
!!sortConfig.foldersFirst
|
||||
);
|
||||
|
||||
/**
|
||||
* This method finds note by its noteId and prefix and either sets it to the given parentNoteId
|
||||
* or removes the branch (if parentNoteId is not given).
|
||||
@@ -478,13 +503,93 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
* @method
|
||||
* @deprecated - this is now no-op since all the changes should be gracefully handled per widget
|
||||
*/
|
||||
this.refreshTree = () => {};
|
||||
this.refreshTree = () => {
|
||||
console.warn("api.refreshTree() is a NO-OP and can be removed from your script.")
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version
|
||||
*/
|
||||
this.getAppInfo = () => appInfo
|
||||
|
||||
/**
|
||||
* @typedef {Object} CreateOrUpdateLauncher
|
||||
* @property {string} id - id of the launcher, only alphanumeric at least 6 characters long
|
||||
* @property {string} type - one of
|
||||
* * "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)
|
||||
* * "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)
|
||||
* @property {string} title
|
||||
* @property {boolean} [isVisible=false] - if true, will be created in the "Visible launchers", otherwise in "Available launchers"
|
||||
* @property {string} [icon] - name of the boxicon to be used (e.g. "bx-time")
|
||||
* @property {string} [keyboardShortcut] - will activate the target note/script upon pressing, e.g. "ctrl+e"
|
||||
* @property {string} [targetNoteId] - for type "note"
|
||||
* @property {string} [scriptNoteId] - for type "script"
|
||||
* @property {string} [widgetNoteId] - for type "customWidget"
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.
|
||||
*
|
||||
* @param {CreateOrUpdateLauncher} opts
|
||||
*/
|
||||
this.createOrUpdateLauncher = opts => {
|
||||
if (!opts.id) { throw new Error("ID is a mandatory parameter for api.createOrUpdateLauncher(opts)"); }
|
||||
if (!opts.id.match(/[a-z0-9]{6,1000}/i)) { throw new Error(`ID must be an alphanumeric string at least 6 characters long.`); }
|
||||
if (!opts.type) { throw new Error("Launcher Type is a mandatory parameter for api.createOrUpdateLauncher(opts)"); }
|
||||
if (!["note", "script", "customWidget"].includes(opts.type)) { throw new Error(`Given launcher type '${opts.type}'`); }
|
||||
if (!opts.title?.trim()) { throw new Error("Title is a mandatory parameter for api.createOrUpdateLauncher(opts)"); }
|
||||
if (opts.type === 'note' && !opts.targetNoteId) { throw new Error("targetNoteId is mandatory for launchers of type 'note'"); }
|
||||
if (opts.type === 'script' && !opts.scriptNoteId) { throw new Error("scriptNoteId is mandatory for launchers of type 'script'"); }
|
||||
if (opts.type === 'customWidget' && !opts.widgetNoteId) { throw new Error("widgetNoteId is mandatory for launchers of type 'customWidget'"); }
|
||||
|
||||
const parentNoteId = !!opts.isVisible ? '_lbVisibleLaunchers' : '_lbAvailableLaunchers';
|
||||
const noteId = 'al_' + opts.id;
|
||||
|
||||
const launcherNote =
|
||||
becca.getNote(opts.id) ||
|
||||
specialNotesService.createLauncher({
|
||||
noteId: noteId,
|
||||
parentNoteId: parentNoteId,
|
||||
launcherType: opts.type,
|
||||
}).note;
|
||||
|
||||
if (launcherNote.title !== opts.title) {
|
||||
launcherNote.title = opts.title;
|
||||
launcherNote.save();
|
||||
}
|
||||
|
||||
if (launcherNote.getParentBranches().length === 1) {
|
||||
const branch = launcherNote.getParentBranches()[0];
|
||||
|
||||
if (branch.parentNoteId !== parentNoteId) {
|
||||
branchService.moveBranchToNote(branch, parentNoteId);
|
||||
}
|
||||
}
|
||||
|
||||
if (opts.type === 'note') {
|
||||
launcherNote.setRelation('target', opts.targetNoteId);
|
||||
} else if (opts.type === 'script') {
|
||||
launcherNote.setRelation('script', opts.scriptNoteId);
|
||||
} else if (opts.type === 'customWidget') {
|
||||
launcherNote.setRelation('widget', opts.widgetNoteId);
|
||||
} else {
|
||||
throw new Error(`Unrecognized launcher type '${opts.type}'`);
|
||||
}
|
||||
|
||||
if (opts.keyboardShortcut) {
|
||||
launcherNote.setLabel('keyboardShortcut', opts.keyboardShortcut);
|
||||
} else {
|
||||
launcherNote.removeLabel('keyboardShortcut');
|
||||
}
|
||||
|
||||
if (opts.icon) {
|
||||
launcherNote.setLabel('iconClass', `bx ${opts.icon}`);
|
||||
} else {
|
||||
launcherNote.removeLabel('keyboardShortcut');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* This object contains "at your risk" and "no BC guarantees" objects for advanced use cases.
|
||||
*
|
||||
|
||||
@@ -56,14 +56,20 @@ const LOG_ALL_QUERIES = false;
|
||||
function insert(tableName, rec, replace = false) {
|
||||
const keys = Object.keys(rec);
|
||||
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;
|
||||
}
|
||||
|
||||
const columns = keys.join(", ");
|
||||
const questionMarks = keys.map(p => "?").join(", ");
|
||||
|
||||
const query = "INSERT " + (replace ? "OR REPLACE" : "") + " INTO " + tableName + "(" + columns + ") VALUES (" + questionMarks + ")";
|
||||
const query = `INSERT
|
||||
${replace ? "OR REPLACE" : ""} INTO
|
||||
${tableName}
|
||||
(
|
||||
${columns}
|
||||
)
|
||||
VALUES (${questionMarks})`;
|
||||
|
||||
const res = execute(query, Object.values(rec));
|
||||
|
||||
@@ -77,13 +83,13 @@ function replace(tableName, rec) {
|
||||
function upsert(tableName, primaryKey, rec) {
|
||||
const keys = Object.keys(rec);
|
||||
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;
|
||||
}
|
||||
|
||||
const columns = keys.join(", ");
|
||||
|
||||
const questionMarks = keys.map(colName => "@" + colName).join(", ");
|
||||
const questionMarks = keys.map(colName => `@${colName}`).join(", ");
|
||||
|
||||
const updateMarks = keys.map(colName => `${colName} = @${colName}`).join(", ");
|
||||
|
||||
@@ -300,7 +306,7 @@ function fillParamList(paramIds, truncate = true) {
|
||||
}
|
||||
|
||||
// doing it manually to avoid this showing up on the sloq query list
|
||||
const s = stmt(`INSERT INTO param_list VALUES ` + paramIds.map(paramId => `(?)`).join(','), paramIds);
|
||||
const s = stmt(`INSERT INTO param_list VALUES ${paramIds.map(paramId => `(?)`).join(',')}`, paramIds);
|
||||
|
||||
s.run(paramIds);
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line28">line 28</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line26">line 26</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -329,7 +329,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line62">line 62</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line45">line 45</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line41">line 41</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line39">line 39</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -541,329 +541,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line50">line 50</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="NoteContextCachingWidget"><span class="type-signature"></span>NoteContextCachingWidget<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5 class="subsection-title">Properties:</h5>
|
||||
|
||||
|
||||
|
||||
<table class="props">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">NoteContextAwareWidget</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line59">line 59</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="TabAwareWidget"><span class="type-signature"></span>TabAwareWidget<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5 class="subsection-title">Properties:</h5>
|
||||
|
||||
|
||||
|
||||
<table class="props">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">NoteContextAwareWidget</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>use NoteContextAwareWidget instead</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line47">line 47</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="TabCachingWidget"><span class="type-signature"></span>TabCachingWidget<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h5 class="subsection-title">Properties:</h5>
|
||||
|
||||
|
||||
|
||||
<table class="props">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">NoteContextCachingWidget</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>use NoteContextCachingWidget instead</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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#line56">line 56</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line42">line 42</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -973,7 +651,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line33">line 33</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line31">line 31</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1086,7 +764,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line35">line 35</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line33">line 33</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1196,7 +874,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line31">line 31</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line29">line 29</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1325,7 +1003,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line81">line 81</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line64">line 64</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1480,7 +1158,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line71">line 71</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line54">line 54</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1542,7 +1220,7 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
Adds new button to the plugin area.
|
||||
Adds a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1584,7 +1262,7 @@
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type"><a href="global.html#ToolbarButtonOptions">ToolbarButtonOptions</a></span>
|
||||
<span class="param-type"><a href="global.html#AddButtonToToolbarOptions">AddButtonToToolbarOptions</a></span>
|
||||
|
||||
|
||||
|
||||
@@ -1623,6 +1301,9 @@
|
||||
|
||||
|
||||
|
||||
<dt class="important tag-deprecated">Deprecated:</dt><dd><ul class="dummy"><li>you can now create/modify launchers in the top-left Menu -> Configure Launchbar
|
||||
for special needs there's also backend API's createOrUpdateLauncher()</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1635,7 +1316,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line138">line 138</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line125">line 125</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1772,7 +1453,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line379">line 379</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line335">line 335</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1911,7 +1592,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line367">line 367</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line323">line 323</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1947,7 +1628,7 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="bindGlobalShortcut"><span class="type-signature"></span>bindGlobalShortcut<span class="signature">(keyboardShortcut, handler)</span><span class="type-signature"></span></h4>
|
||||
<h4 class="name" id="bindGlobalShortcut"><span class="type-signature"></span>bindGlobalShortcut<span class="signature">(keyboardShortcut, handler, namespace<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -1975,6 +1656,8 @@
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
<th>Attributes</th>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2000,6 +1683,14 @@
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2023,6 +1714,14 @@
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2030,6 +1729,40 @@
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>namespace</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">specify namespace of the handler for the cases where call for bind may be repeated.
|
||||
If a handler with this ID exists, it's replaced by the new handler.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -2067,7 +1800,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line570">line 570</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line528">line 528</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2431,7 +2164,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line358">line 358</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line314">line 314</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2564,7 +2297,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line298">line 298</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line254">line 254</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2674,7 +2407,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line425">line 425</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line381">line 381</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2780,7 +2513,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line396">line 396</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line352">line 352</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2886,7 +2619,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line451">line 451</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line407">line 407</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2996,7 +2729,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line417">line 417</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line373">line 373</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3107,7 +2840,7 @@ implementation of actual widget type.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line434">line 434</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line390">line 390</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3211,7 +2944,7 @@ implementation of actual widget type.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line386">line 386</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line342">line 342</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3319,7 +3052,7 @@ implementation of actual widget type.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line441">line 441</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line397">line 397</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3487,7 +3220,7 @@ implementation of actual widget type.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line405">line 405</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line361">line 361</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3624,7 +3357,7 @@ implementation of actual widget type.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line460">line 460</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line416">line 416</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3781,7 +3514,7 @@ implementation of actual widget type.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line512">line 512</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line468">line 468</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3936,7 +3669,7 @@ implementation of actual widget type.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line521">line 521</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line477">line 477</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4043,7 +3776,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line291">line 291</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line247">line 247</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4198,7 +3931,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line539">line 539</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line495">line 495</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4354,7 +4087,7 @@ if some action needs to happen on only one specific instance.
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line263">line 263</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line219">line 219</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4555,7 +4288,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line275">line 275</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line231">line 231</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4661,7 +4394,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line502">line 502</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line458">line 458</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4816,7 +4549,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line530">line 530</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line486">line 486</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4971,7 +4704,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line548">line 548</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line504">line 504</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5121,7 +4854,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line607">line 607</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line565">line 565</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5281,7 +5014,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line112">line 112</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line95">line 95</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5459,7 +5192,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line95">line 95</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line78">line 78</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5610,7 +5343,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line305">line 305</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line261">line 261</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5718,7 +5451,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line472">line 472</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line428">line 428</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5874,7 +5607,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line483">line 483</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line439">line 439</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6030,7 +5763,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line492">line 492</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line448">line 448</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6167,7 +5900,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line597">line 597</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line555">line 555</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6321,7 +6054,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line588">line 588</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line546">line 546</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6407,7 +6140,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line345">line 345</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line301">line 301</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6544,7 +6277,7 @@ otherwise (by e.g. createNoteLink())
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line283">line 283</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line239">line 239</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6705,7 +6438,7 @@ Internally this serializes the anonymous function into string and sends it to ba
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line201">line 201</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line157">line 157</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6813,7 +6546,7 @@ Internally this serializes the anonymous function into string and sends it to ba
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line229">line 229</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line185">line 185</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6951,7 +6684,7 @@ Internally this serializes the anonymous function into string and sends it to ba
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line251">line 251</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line207">line 207</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7107,7 +6840,7 @@ Internally this serializes the anonymous function into string and sends it to ba
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line239">line 239</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line195">line 195</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7262,7 +6995,7 @@ Internally this serializes the anonymous function into string and sends it to ba
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line557">line 557</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line513">line 513</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7413,7 +7146,7 @@ Internally this serializes the anonymous function into string and sends it to ba
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line466">line 466</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line422">line 422</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7550,7 +7283,7 @@ Internally this serializes the anonymous function into string and sends it to ba
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line321">line 321</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line277">line 277</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7687,7 +7420,7 @@ Internally this serializes the anonymous function into string and sends it to ba
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line313">line 313</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line269">line 269</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7847,7 +7580,7 @@ Internally this serializes the anonymous function into string and sends it to ba
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line330">line 330</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line286">line 286</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -8007,7 +7740,7 @@ Internally this serializes the anonymous function into string and sends it to ba
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line339">line 339</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line295">line 295</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -8099,7 +7832,7 @@ Typical use case is when new note has been created, we should wait until it is s
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line581">line 581</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line539">line 539</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line31">line 31</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line34">line 34</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line40">line 40</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line43">line 43</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line54">line 54</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line57">line 57</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -403,7 +403,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line48">line 48</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line51">line 51</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -471,7 +471,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line65">line 65</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line68">line 68</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -543,7 +543,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line75">line 75</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line78">line 78</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -611,7 +611,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line61">line 61</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line64">line 64</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -679,7 +679,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line51">line 51</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line54">line 54</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -747,7 +747,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line46">line 46</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line49">line 49</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -815,7 +815,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line43">line 43</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line46">line 46</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -883,7 +883,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line63">line 63</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line66">line 66</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -955,7 +955,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line70">line 70</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line73">line 73</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1103,7 +1103,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line511">line 511</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line531">line 531</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1281,7 +1281,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line533">line 533</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line553">line 553</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1481,7 +1481,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line240">line 240</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line243">line 243</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1589,7 +1589,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line148">line 148</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line151">line 151</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1693,7 +1693,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line165">line 165</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line168">line 168</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1795,7 +1795,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line175">line 175</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line178">line 178</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1897,7 +1897,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line213">line 213</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line216">line 216</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -1999,7 +1999,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line218">line 218</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line221">line 221</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2150,7 +2150,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line573">line 573</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line593">line 593</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2305,7 +2305,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line597">line 597</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line617">line 617</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2472,7 +2472,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line392">line 392</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line412">line 412</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2582,7 +2582,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line724">line 724</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line748">line 748</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2756,7 +2756,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line500">line 500</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line520">line 520</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -2934,7 +2934,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line522">line 522</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line542">line 542</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3134,7 +3134,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line227">line 227</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line230">line 230</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3289,7 +3289,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line567">line 567</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line587">line 587</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3444,7 +3444,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line591">line 591</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line611">line 611</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3611,7 +3611,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line384">line 384</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line404">line 404</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3766,7 +3766,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line579">line 579</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line599">line 599</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -3921,7 +3921,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line603">line 603</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line623">line 623</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4088,7 +4088,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line465">line 465</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line485">line 485</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4194,7 +4194,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line140">line 140</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line143">line 143</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4296,7 +4296,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line155">line 155</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line158">line 158</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4398,7 +4398,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line183">line 183</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line186">line 186</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4500,7 +4500,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line188">line 188</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line191">line 191</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4651,7 +4651,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line585">line 585</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line605">line 605</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4806,7 +4806,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line615">line 615</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line635">line 635</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -4976,7 +4976,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line625">line 625</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line645">line 645</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5127,7 +5127,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line609">line 609</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line629">line 629</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5294,7 +5294,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line473">line 473</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line493">line 493</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5400,7 +5400,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line768">line 768</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line792">line 792</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5513,7 +5513,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line713">line 713</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line737">line 737</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5619,7 +5619,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line703">line 703</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line727">line 727</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5721,7 +5721,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line639">line 639</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line659">line 659</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -5895,7 +5895,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line482">line 482</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line502">line 502</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6001,7 +6001,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line170">line 170</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line173">line 173</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6152,7 +6152,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line549">line 549</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line569">line 569</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6330,7 +6330,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line491">line 491</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line511">line 511</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6485,7 +6485,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line543">line 543</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line563">line 563</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6640,7 +6640,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line555">line 555</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line575">line 575</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6795,7 +6795,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line561">line 561</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line581">line 581</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6903,7 +6903,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line696">line 696</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line720">line 720</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -6987,7 +6987,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line763">line 763</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line787">line 787</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7093,7 +7093,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line755">line 755</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line779">line 779</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -7199,7 +7199,7 @@ This note's representation is used in note tree and is kept in Froca.</div>
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line113">line 113</a>
|
||||
<a href="entities_note_short.js.html">entities/note_short.js</a>, <a href="entities_note_short.js.html#line116">line 116</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
@@ -43,12 +43,15 @@ const NOTE_TYPE_ICONS = {
|
||||
"code": "bx bx-code",
|
||||
"render": "bx bx-extension",
|
||||
"search": "bx bx-file-find",
|
||||
"relation-map": "bx bx-map-alt",
|
||||
"relationMap": "bx bx-map-alt",
|
||||
"book": "bx bx-book",
|
||||
"note-map": "bx bx-map-alt",
|
||||
"noteMap": "bx bx-map-alt",
|
||||
"mermaid": "bx bx-selection",
|
||||
"canvas": "bx bx-pen",
|
||||
"web-view": "bx bx-globe-alt"
|
||||
"webView": "bx bx-globe-alt",
|
||||
"launcher": "bx bx-link",
|
||||
"doc": "bx bxs-file-doc",
|
||||
"contentWidget": "bx bxs-widget"
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -144,7 +147,7 @@ class NoteShort {
|
||||
|
||||
async getContent() {
|
||||
// we're not caching content since these objects are in froca and as such pretty long lived
|
||||
const note = await server.get("notes/" + this.noteId);
|
||||
const note = await server.get(`notes/${this.noteId}`);
|
||||
|
||||
return note.content;
|
||||
}
|
||||
@@ -317,7 +320,7 @@ class NoteShort {
|
||||
}
|
||||
|
||||
isRoot() {
|
||||
return this.noted
|
||||
return this.noteId === 'root';
|
||||
}
|
||||
|
||||
getAllNotePaths(encounteredNoteIds = null) {
|
||||
@@ -369,7 +372,7 @@ class NoteShort {
|
||||
isInHoistedSubTree: path.includes(hoistedNotePath),
|
||||
isArchived: path.find(noteId => froca.notes[noteId].hasLabel('archived')),
|
||||
isSearch: path.find(noteId => froca.notes[noteId].type === 'search'),
|
||||
isHidden: path.includes("hidden")
|
||||
isHidden: path.includes('_hidden')
|
||||
}));
|
||||
|
||||
notePaths.sort((a, b) => {
|
||||
@@ -379,6 +382,8 @@ class NoteShort {
|
||||
return a.isSearch ? 1 : -1;
|
||||
} else if (a.isArchived !== b.isArchived) {
|
||||
return a.isArchived ? 1 : -1;
|
||||
} else if (a.isHidden !== b.isHidden) {
|
||||
return a.isHidden ? 1 : -1;
|
||||
} else {
|
||||
return a.notePath.length - b.notePath.length;
|
||||
}
|
||||
@@ -388,6 +393,8 @@ class NoteShort {
|
||||
}
|
||||
|
||||
__filterAttrs(attributes, type, name) {
|
||||
this.__validateTypeName(type, name);
|
||||
|
||||
if (!type && !name) {
|
||||
return attributes;
|
||||
} else if (type && name) {
|
||||
@@ -405,6 +412,19 @@ class NoteShort {
|
||||
return attrs.filter(attr => attr.isInheritable);
|
||||
}
|
||||
|
||||
__validateTypeName(type, name) {
|
||||
if (type && type !== 'label' && type !== 'relation') {
|
||||
throw new Error(`Unrecognized attribute type '${type}'. Only 'label' and 'relation' are possible values.`);
|
||||
}
|
||||
|
||||
if (name) {
|
||||
const firstLetter = name.charAt(0);
|
||||
if (firstLetter === '#' || firstLetter === '~') {
|
||||
throw new Error(`Detect '#' or '~' in the attribute's name. In the API, attribute names should be set without these characters.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} [name] - label name to filter
|
||||
* @returns {Attribute[]} all note's labels (attributes with type label), including inherited ones
|
||||
@@ -434,7 +454,7 @@ class NoteShort {
|
||||
else if (this.noteId === 'root') {
|
||||
return "bx bx-chevrons-right";
|
||||
}
|
||||
if (this.noteId === 'share') {
|
||||
if (this.noteId === '_share') {
|
||||
return "bx bx-share-alt";
|
||||
}
|
||||
else if (this.type === 'text') {
|
||||
@@ -718,6 +738,10 @@ class NoteShort {
|
||||
return false;
|
||||
}
|
||||
|
||||
isInHiddenSubtree() {
|
||||
return this.noteId === '_hidden' || this.hasAncestor('_hidden');
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated NOOP
|
||||
*/
|
||||
@@ -781,7 +805,7 @@ class NoteShort {
|
||||
|
||||
/** @returns {boolean} true if this note is JavaScript (code or attachment) */
|
||||
isJavaScript() {
|
||||
return (this.type === "code" || this.type === "file")
|
||||
return (this.type === "code" || this.type === "file" || this.type === 'launcher')
|
||||
&& (this.mime.startsWith("application/javascript")
|
||||
|| this.mime === "application/x-javascript"
|
||||
|| this.mime === "text/javascript");
|
||||
@@ -818,10 +842,10 @@ class NoteShort {
|
||||
|
||||
if (env === "frontend") {
|
||||
const bundleService = (await import("../services/bundle.js")).default;
|
||||
await bundleService.getAndExecuteBundle(this.noteId);
|
||||
return await bundleService.getAndExecuteBundle(this.noteId);
|
||||
}
|
||||
else if (env === "backend") {
|
||||
await server.post('script/run/' + this.noteId);
|
||||
const resp = await server.post(`script/run/${this.noteId}`);
|
||||
}
|
||||
else {
|
||||
throw new Error(`Unrecognized env type ${env} for note ${this.noteId}`);
|
||||
@@ -840,7 +864,7 @@ class NoteShort {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (parentNote.noteId === 'share' || parentNote.isShared()) {
|
||||
if (parentNote.noteId === '_share' || parentNote.isShared()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -851,6 +875,14 @@ class NoteShort {
|
||||
isContentAvailable() {
|
||||
return !this.isProtected || protectedSessionHolder.isProtectedSessionAvailable()
|
||||
}
|
||||
|
||||
isLaunchBarConfig() {
|
||||
return this.type === 'launcher' || ['_lbRoot', '_lbAvailableLaunchers', '_lbVisibleLaunchers'].includes(this.noteId);
|
||||
}
|
||||
|
||||
isOptions() {
|
||||
return this.noteId.startsWith("options");
|
||||
}
|
||||
}
|
||||
|
||||
export default NoteShort;
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id="ToolbarButtonOptions">ToolbarButtonOptions</h4>
|
||||
<h4 class="name" id="AddButtonToToolbarOptions">AddButtonToToolbarOptions</h4>
|
||||
|
||||
|
||||
|
||||
@@ -241,6 +241,38 @@
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>id</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">string</span>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td class="attributes">
|
||||
|
||||
<optional><br>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last">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.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>title</code></td>
|
||||
@@ -395,7 +427,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line125">line 125</a>
|
||||
<a href="services_frontend_script_api.js.html">services/frontend_script_api.js</a>, <a href="services_frontend_script_api.js.html#line108">line 108</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
@@ -37,11 +37,11 @@ import dateNotesService from './date_notes.js';
|
||||
import searchService from './search.js';
|
||||
import CollapsibleWidget from '../widgets/collapsible_widget.js';
|
||||
import ws from "./ws.js";
|
||||
import appContext from "./app_context.js";
|
||||
import appContext from "../components/app_context.js";
|
||||
import NoteContextAwareWidget from "../widgets/note_context_aware_widget.js";
|
||||
import NoteContextCachingWidget from "../widgets/note_context_caching_widget.js";
|
||||
import BasicWidget from "../widgets/basic_widget.js";
|
||||
import SpacedUpdate from "./spaced_update.js";
|
||||
import shortcutService from "./shortcuts.js";
|
||||
|
||||
/**
|
||||
* This is the main frontend API interface for scripts. It's published in the local "api" object.
|
||||
@@ -50,8 +50,6 @@ import SpacedUpdate from "./spaced_update.js";
|
||||
* @hideconstructor
|
||||
*/
|
||||
function FrontendScriptApi(startNote, currentNote, originEntity = null, $container = null) {
|
||||
const $pluginButtons = $("#plugin-buttons");
|
||||
|
||||
/** @property {jQuery} container of all the rendered script content */
|
||||
this.$container = $container;
|
||||
|
||||
@@ -68,24 +66,9 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
||||
/** @property {CollapsibleWidget} */
|
||||
this.CollapsibleWidget = CollapsibleWidget;
|
||||
|
||||
/**
|
||||
* @property {NoteContextAwareWidget}
|
||||
* @deprecated use NoteContextAwareWidget instead
|
||||
*/
|
||||
this.TabAwareWidget = NoteContextAwareWidget;
|
||||
|
||||
/** @property {NoteContextAwareWidget} */
|
||||
this.NoteContextAwareWidget = NoteContextAwareWidget;
|
||||
|
||||
/**
|
||||
* @property {NoteContextCachingWidget}
|
||||
* @deprecated use NoteContextCachingWidget instead
|
||||
*/
|
||||
this.TabCachingWidget = NoteContextCachingWidget;
|
||||
|
||||
/** @property {NoteContextAwareWidget} */
|
||||
this.NoteContextCachingWidget = NoteContextCachingWidget;
|
||||
|
||||
/** @property {BasicWidget} */
|
||||
this.BasicWidget = BasicWidget;
|
||||
|
||||
@@ -151,7 +134,9 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
||||
};
|
||||
|
||||
/**
|
||||
* @typedef {Object} ToolbarButtonOptions
|
||||
* @typedef {Object} AddButtonToToolbarOptions
|
||||
* @property {string} [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.
|
||||
* @property {string} title
|
||||
* @property {string} [icon] - name of the boxicon to be used (e.g. "time" for "bx-time" icon)
|
||||
* @property {function} action - callback handling the click on the button
|
||||
@@ -159,48 +144,19 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
||||
*/
|
||||
|
||||
/**
|
||||
* Adds new button to the plugin area.
|
||||
* Adds a new launcher to the launchbar. If the launcher (id) already exists, it will be updated.
|
||||
*
|
||||
* @param {ToolbarButtonOptions} opts
|
||||
* @deprecated you can now create/modify launchers in the top-left Menu -> Configure Launchbar
|
||||
* for special needs there's also backend API's createOrUpdateLauncher()
|
||||
* @param {AddButtonToToolbarOptions} opts
|
||||
*/
|
||||
this.addButtonToToolbar = opts => {
|
||||
const buttonId = "toolbar-button-" + opts.title.replace(/\s/g, "-");
|
||||
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.");
|
||||
|
||||
let button;
|
||||
if (utils.isMobile()) {
|
||||
$('#plugin-buttons-placeholder').remove();
|
||||
button = $('<a class="dropdown-item" href="#">')
|
||||
.on('click', () => {
|
||||
setTimeout(() => $pluginButtons.dropdown('hide'), 0);
|
||||
});
|
||||
const {action, ...reqBody} = opts;
|
||||
reqBody.action = action.toString();
|
||||
|
||||
if (opts.icon) {
|
||||
button.append($("<span>").addClass("bx bx-" + opts.icon))
|
||||
.append("&nbsp;");
|
||||
}
|
||||
|
||||
button.append($("<span>").text(opts.title));
|
||||
} else {
|
||||
button = $('<span class="button-widget icon-action bx" data-toggle="tooltip" title="" data-placement="right"></span>')
|
||||
.addClass("bx bx-" + (opts.icon || "question-mark"));
|
||||
|
||||
button.attr("title", opts.title);
|
||||
button.tooltip({html: true});
|
||||
}
|
||||
|
||||
button = button.on('click', opts.action);
|
||||
|
||||
button.attr('id', buttonId);
|
||||
|
||||
if ($("#" + buttonId).replaceWith(button).length === 0) {
|
||||
$pluginButtons.append(button);
|
||||
}
|
||||
|
||||
if (opts.shortcut) {
|
||||
utils.bindGlobalShortcut(opts.shortcut, opts.action);
|
||||
|
||||
button.attr("title", "Shortcut " + opts.shortcut);
|
||||
}
|
||||
await server.put('special-notes/api-script-launcher', reqBody);
|
||||
};
|
||||
|
||||
function prepareParams(params) {
|
||||
@@ -210,7 +166,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
||||
|
||||
return params.map(p => {
|
||||
if (typeof p === "function") {
|
||||
return "!@#Function: " + p.toString();
|
||||
return `!@#Function: ${p.toString()}`;
|
||||
}
|
||||
else {
|
||||
return p;
|
||||
@@ -246,7 +202,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
||||
return ret.executionResult;
|
||||
}
|
||||
else {
|
||||
throw new Error("server error: " + ret.error);
|
||||
throw new Error(`server error: ${ret.error}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -594,8 +550,10 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
||||
* @method
|
||||
* @param {string} keyboardShortcut - e.g. "ctrl+shift+a"
|
||||
* @param {function} handler
|
||||
* @param {string} [namespace] - specify namespace of the handler for the cases where call for bind may be repeated.
|
||||
* If a handler with this ID exists, it's replaced by the new handler.
|
||||
*/
|
||||
this.bindGlobalShortcut = utils.bindGlobalShortcut;
|
||||
this.bindGlobalShortcut = shortcutService.bindGlobalShortcut;
|
||||
|
||||
/**
|
||||
* Trilium runs in backend and frontend process, when something is changed on the backend from script,
|
||||
@@ -635,7 +593,7 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, $contain
|
||||
this.log = message => {
|
||||
const {noteId} = this.startNote;
|
||||
|
||||
message = utils.now() + ": " + message;
|
||||
message = `${utils.now()}: ${message}`;
|
||||
|
||||
console.log(`Script ${noteId}: ${message}`);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ export default class CollapsibleWidget extends NoteContextAwareWidget {
|
||||
doRender() {
|
||||
this.$widget = $(WIDGET_TPL);
|
||||
this.contentSized();
|
||||
this.$widget.find('[data-target]').attr('data-target', "#" + this.componentId);
|
||||
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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
const yargs = require('yargs/yargs')
|
||||
const { hideBin } = require('yargs/helpers')
|
||||
const dumpService = require("./inc/dump.js");
|
||||
const dumpService = require("./inc/dump");
|
||||
|
||||
yargs(hideBin(process.argv))
|
||||
.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 sql = require("./sql.js");
|
||||
const decryptService = require("./decrypt.js");
|
||||
const sql = require("./sql");
|
||||
const decryptService = require("./decrypt");
|
||||
|
||||
function getDataKey(password) {
|
||||
if (!password) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
const fs = require("fs");
|
||||
const sanitize = require("sanitize-filename");
|
||||
const sql = require("./sql.js");
|
||||
const decryptService = require("./decrypt.js");
|
||||
const dataKeyService = require("./data_key.js");
|
||||
const extensionService = require("./extension.js");
|
||||
const sql = require("./sql");
|
||||
const decryptService = require("./decrypt");
|
||||
const dataKeyService = require("./data_key");
|
||||
const extensionService = require("./extension");
|
||||
|
||||
function dumpDocument(documentPath, targetPath, options) {
|
||||
const stats = {
|
||||
|
||||
15
dump-db/package-lock.json
generated
15
dump-db/package-lock.json
generated
@@ -387,9 +387,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
|
||||
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/mkdirp-classic": {
|
||||
"version": "0.5.3",
|
||||
@@ -1163,9 +1166,9 @@
|
||||
"integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
|
||||
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g=="
|
||||
},
|
||||
"mkdirp-classic": {
|
||||
"version": "0.5.3",
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
}
|
||||
|
||||
/*
|
||||
* CKEditor 5 (v35.2.1) content styles.
|
||||
* Generated on Fri, 14 Oct 2022 09:47:42 GMT.
|
||||
* CKEditor 5 (v35.4.0) content styles.
|
||||
* Generated on Wed, 14 Dec 2022 12:53:04 GMT.
|
||||
* For more information, check out https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/content-styles.html
|
||||
*/
|
||||
|
||||
@@ -34,21 +34,6 @@
|
||||
padding: .15em;
|
||||
border-radius: 2px;
|
||||
}
|
||||
/* ckeditor5-block-quote/theme/blockquote.css */
|
||||
.ck-content blockquote {
|
||||
overflow: hidden;
|
||||
padding-right: 1.5em;
|
||||
padding-left: 1.5em;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
font-style: italic;
|
||||
border-left: solid 5px hsl(0, 0%, 80%);
|
||||
}
|
||||
/* ckeditor5-block-quote/theme/blockquote.css */
|
||||
.ck-content[dir="rtl"] blockquote {
|
||||
border-left: 0;
|
||||
border-right: solid 5px hsl(0, 0%, 80%);
|
||||
}
|
||||
/* ckeditor5-font/theme/fontsize.css */
|
||||
.ck-content .text-tiny {
|
||||
font-size: .7em;
|
||||
@@ -65,6 +50,21 @@
|
||||
.ck-content .text-huge {
|
||||
font-size: 1.8em;
|
||||
}
|
||||
/* ckeditor5-block-quote/theme/blockquote.css */
|
||||
.ck-content blockquote {
|
||||
overflow: hidden;
|
||||
padding-right: 1.5em;
|
||||
padding-left: 1.5em;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
font-style: italic;
|
||||
border-left: solid 5px hsl(0, 0%, 80%);
|
||||
}
|
||||
/* ckeditor5-block-quote/theme/blockquote.css */
|
||||
.ck-content[dir="rtl"] blockquote {
|
||||
border-left: 0;
|
||||
border-right: solid 5px hsl(0, 0%, 80%);
|
||||
}
|
||||
/* ckeditor5-highlight/theme/highlight.css */
|
||||
.ck-content .marker-yellow {
|
||||
background-color: var(--ck-highlight-marker-yellow);
|
||||
@@ -328,18 +328,6 @@
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
/* ckeditor5-table/theme/tablecaption.css */
|
||||
.ck-content .table > figcaption {
|
||||
display: table-caption;
|
||||
caption-side: top;
|
||||
word-break: break-word;
|
||||
text-align: center;
|
||||
color: var(--ck-color-table-caption-text);
|
||||
background-color: var(--ck-color-table-caption-background);
|
||||
padding: .6em;
|
||||
font-size: .75em;
|
||||
outline-offset: -1px;
|
||||
}
|
||||
/* ckeditor5-table/theme/table.css */
|
||||
.ck-content .table {
|
||||
margin: 0.9em auto;
|
||||
@@ -386,6 +374,18 @@
|
||||
.ck-content .table th {
|
||||
position: relative;
|
||||
}
|
||||
/* ckeditor5-table/theme/tablecaption.css */
|
||||
.ck-content .table > figcaption {
|
||||
display: table-caption;
|
||||
caption-side: top;
|
||||
word-break: break-word;
|
||||
text-align: center;
|
||||
color: var(--ck-color-table-caption-text);
|
||||
background-color: var(--ck-color-table-caption-background);
|
||||
padding: .6em;
|
||||
font-size: .75em;
|
||||
outline-offset: -1px;
|
||||
}
|
||||
/* ckeditor5-code-block/theme/codeblock.css */
|
||||
.ck-content pre {
|
||||
padding: 1em;
|
||||
|
||||
4
libraries/ckeditor/ckeditor.js
vendored
4
libraries/ckeditor/ckeditor.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
214
libraries/jquery.js
vendored
214
libraries/jquery.js
vendored
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.6.0
|
||||
* jQuery JavaScript Library v3.6.1
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
@@ -9,7 +9,7 @@
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2021-03-02T17:08Z
|
||||
* Date: 2022-08-26T17:52Z
|
||||
*/
|
||||
( function( global, factory ) {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// (such as Node.js), expose a factory as module.exports.
|
||||
// This accentuates the need for the creation of a real `window`.
|
||||
// e.g. var jQuery = require("jquery")(window);
|
||||
// See ticket #14549 for more info.
|
||||
// See ticket trac-14549 for more info.
|
||||
module.exports = global.document ?
|
||||
factory( global, true ) :
|
||||
function( w ) {
|
||||
@@ -151,7 +151,7 @@ function toType( obj ) {
|
||||
|
||||
|
||||
var
|
||||
version = "3.6.0",
|
||||
version = "3.6.1",
|
||||
|
||||
// Define a local copy of jQuery
|
||||
jQuery = function( selector, context ) {
|
||||
@@ -3129,8 +3129,8 @@ jQuery.fn.extend( {
|
||||
var rootjQuery,
|
||||
|
||||
// A simple way to check for HTML strings
|
||||
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
|
||||
// Strict HTML recognition (#11290: must start with <)
|
||||
// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)
|
||||
// Strict HTML recognition (trac-11290: must start with <)
|
||||
// Shortcut simple #id case for speed
|
||||
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
|
||||
|
||||
@@ -4087,7 +4087,7 @@ jQuery.extend( {
|
||||
isReady: false,
|
||||
|
||||
// A counter to track how many items to wait for before
|
||||
// the ready event fires. See #6781
|
||||
// the ready event fires. See trac-6781
|
||||
readyWait: 1,
|
||||
|
||||
// Handle when the DOM is ready
|
||||
@@ -4215,7 +4215,7 @@ function fcamelCase( _all, letter ) {
|
||||
|
||||
// Convert dashed to camelCase; used by the css and data modules
|
||||
// Support: IE <=9 - 11, Edge 12 - 15
|
||||
// Microsoft forgot to hump their vendor prefix (#9572)
|
||||
// Microsoft forgot to hump their vendor prefix (trac-9572)
|
||||
function camelCase( string ) {
|
||||
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
||||
}
|
||||
@@ -4251,7 +4251,7 @@ Data.prototype = {
|
||||
value = {};
|
||||
|
||||
// We can accept data for non-element nodes in modern browsers,
|
||||
// but we should not, see #8335.
|
||||
// but we should not, see trac-8335.
|
||||
// Always return an empty object.
|
||||
if ( acceptData( owner ) ) {
|
||||
|
||||
@@ -4490,7 +4490,7 @@ jQuery.fn.extend( {
|
||||
while ( i-- ) {
|
||||
|
||||
// Support: IE 11 only
|
||||
// The attrs elements can be null (#14894)
|
||||
// The attrs elements can be null (trac-14894)
|
||||
if ( attrs[ i ] ) {
|
||||
name = attrs[ i ].name;
|
||||
if ( name.indexOf( "data-" ) === 0 ) {
|
||||
@@ -4913,9 +4913,9 @@ var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
|
||||
input = document.createElement( "input" );
|
||||
|
||||
// Support: Android 4.0 - 4.3 only
|
||||
// Check state lost if the name is set (#11217)
|
||||
// Check state lost if the name is set (trac-11217)
|
||||
// Support: Windows Web Apps (WWA)
|
||||
// `name` and `type` must use .setAttribute for WWA (#14901)
|
||||
// `name` and `type` must use .setAttribute for WWA (trac-14901)
|
||||
input.setAttribute( "type", "radio" );
|
||||
input.setAttribute( "checked", "checked" );
|
||||
input.setAttribute( "name", "t" );
|
||||
@@ -4939,7 +4939,7 @@ var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );
|
||||
} )();
|
||||
|
||||
|
||||
// We have to close these tags to support XHTML (#13200)
|
||||
// We have to close these tags to support XHTML (trac-13200)
|
||||
var wrapMap = {
|
||||
|
||||
// XHTML parsers do not magically insert elements in the
|
||||
@@ -4965,7 +4965,7 @@ if ( !support.option ) {
|
||||
function getAll( context, tag ) {
|
||||
|
||||
// Support: IE <=9 - 11 only
|
||||
// Use typeof to avoid zero-argument method invocation on host objects (#15151)
|
||||
// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)
|
||||
var ret;
|
||||
|
||||
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
||||
@@ -5048,7 +5048,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
||||
// Remember the top-level container
|
||||
tmp = fragment.firstChild;
|
||||
|
||||
// Ensure the created nodes are orphaned (#12392)
|
||||
// Ensure the created nodes are orphaned (trac-12392)
|
||||
tmp.textContent = "";
|
||||
}
|
||||
}
|
||||
@@ -5469,15 +5469,15 @@ jQuery.event = {
|
||||
|
||||
for ( ; cur !== this; cur = cur.parentNode || this ) {
|
||||
|
||||
// Don't check non-elements (#13208)
|
||||
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
|
||||
// Don't check non-elements (trac-13208)
|
||||
// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)
|
||||
if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
|
||||
matchedHandlers = [];
|
||||
matchedSelectors = {};
|
||||
for ( i = 0; i < delegateCount; i++ ) {
|
||||
handleObj = handlers[ i ];
|
||||
|
||||
// Don't conflict with Object.prototype properties (#13203)
|
||||
// Don't conflict with Object.prototype properties (trac-13203)
|
||||
sel = handleObj.selector + " ";
|
||||
|
||||
if ( matchedSelectors[ sel ] === undefined ) {
|
||||
@@ -5731,7 +5731,7 @@ jQuery.Event = function( src, props ) {
|
||||
|
||||
// Create target properties
|
||||
// Support: Safari <=6 - 7 only
|
||||
// Target should not be a text node (#504, #13143)
|
||||
// Target should not be a text node (trac-504, trac-13143)
|
||||
this.target = ( src.target && src.target.nodeType === 3 ) ?
|
||||
src.target.parentNode :
|
||||
src.target;
|
||||
@@ -5854,10 +5854,10 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp
|
||||
return true;
|
||||
},
|
||||
|
||||
// Suppress native focus or blur as it's already being fired
|
||||
// in leverageNative.
|
||||
_default: function() {
|
||||
return true;
|
||||
// Suppress native focus or blur if we're currently inside
|
||||
// a leveraged native-event stack
|
||||
_default: function( event ) {
|
||||
return dataPriv.get( event.target, type );
|
||||
},
|
||||
|
||||
delegateType: delegateType
|
||||
@@ -5956,7 +5956,8 @@ var
|
||||
|
||||
// checked="checked" or checked
|
||||
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
||||
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
|
||||
|
||||
rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g;
|
||||
|
||||
// Prefer a tbody over its parent table for containing new rows
|
||||
function manipulationTarget( elem, content ) {
|
||||
@@ -6070,7 +6071,7 @@ function domManip( collection, args, callback, ignored ) {
|
||||
|
||||
// Use the original fragment for the last item
|
||||
// instead of the first because it can end up
|
||||
// being emptied incorrectly in certain situations (#8070).
|
||||
// being emptied incorrectly in certain situations (trac-8070).
|
||||
for ( ; i < l; i++ ) {
|
||||
node = fragment;
|
||||
|
||||
@@ -6111,6 +6112,12 @@ function domManip( collection, args, callback, ignored ) {
|
||||
}, doc );
|
||||
}
|
||||
} else {
|
||||
|
||||
// Unwrap a CDATA section containing script contents. This shouldn't be
|
||||
// needed as in XML documents they're already not visible when
|
||||
// inspecting element contents and in HTML documents they have no
|
||||
// meaning but we're preserving that logic for backwards compatibility.
|
||||
// This will be removed completely in 4.0. See gh-4904.
|
||||
DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );
|
||||
}
|
||||
}
|
||||
@@ -6393,9 +6400,12 @@ jQuery.each( {
|
||||
} );
|
||||
var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
|
||||
|
||||
var rcustomProp = /^--/;
|
||||
|
||||
|
||||
var getStyles = function( elem ) {
|
||||
|
||||
// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
|
||||
// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)
|
||||
// IE throws on elements created in popups
|
||||
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
|
||||
var view = elem.ownerDocument.defaultView;
|
||||
@@ -6430,6 +6440,15 @@ var swap = function( elem, options, callback ) {
|
||||
|
||||
var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
||||
|
||||
var whitespace = "[\\x20\\t\\r\\n\\f]";
|
||||
|
||||
|
||||
var rtrimCSS = new RegExp(
|
||||
"^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
|
||||
"g"
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
( function() {
|
||||
@@ -6495,7 +6514,7 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
||||
}
|
||||
|
||||
// Support: IE <=9 - 11 only
|
||||
// Style of cloned element affects source element cloned (#8908)
|
||||
// Style of cloned element affects source element cloned (trac-8908)
|
||||
div.style.backgroundClip = "content-box";
|
||||
div.cloneNode( true ).style.backgroundClip = "";
|
||||
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
||||
@@ -6575,6 +6594,7 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
||||
|
||||
function curCSS( elem, name, computed ) {
|
||||
var width, minWidth, maxWidth, ret,
|
||||
isCustomProp = rcustomProp.test( name ),
|
||||
|
||||
// Support: Firefox 51+
|
||||
// Retrieving style before computed somehow
|
||||
@@ -6585,11 +6605,22 @@ function curCSS( elem, name, computed ) {
|
||||
computed = computed || getStyles( elem );
|
||||
|
||||
// getPropertyValue is needed for:
|
||||
// .css('filter') (IE 9 only, #12537)
|
||||
// .css('--customProperty) (#3144)
|
||||
// .css('filter') (IE 9 only, trac-12537)
|
||||
// .css('--customProperty) (gh-3144)
|
||||
if ( computed ) {
|
||||
ret = computed.getPropertyValue( name ) || computed[ name ];
|
||||
|
||||
// trim whitespace for custom property (issue gh-4926)
|
||||
if ( isCustomProp ) {
|
||||
|
||||
// rtrim treats U+000D CARRIAGE RETURN and U+000C FORM FEED
|
||||
// as whitespace while CSS does not, but this is not a problem
|
||||
// because CSS preprocessing replaces them with U+000A LINE FEED
|
||||
// (which *is* CSS whitespace)
|
||||
// https://www.w3.org/TR/css-syntax-3/#input-preprocessing
|
||||
ret = ret.replace( rtrimCSS, "$1" );
|
||||
}
|
||||
|
||||
if ( ret === "" && !isAttached( elem ) ) {
|
||||
ret = jQuery.style( elem, name );
|
||||
}
|
||||
@@ -6685,7 +6716,6 @@ var
|
||||
// except "table", "table-cell", or "table-caption"
|
||||
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
|
||||
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
||||
rcustomProp = /^--/,
|
||||
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
||||
cssNormalTransform = {
|
||||
letterSpacing: "0",
|
||||
@@ -6921,15 +6951,15 @@ jQuery.extend( {
|
||||
if ( value !== undefined ) {
|
||||
type = typeof value;
|
||||
|
||||
// Convert "+=" or "-=" to relative numbers (#7345)
|
||||
// Convert "+=" or "-=" to relative numbers (trac-7345)
|
||||
if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
|
||||
value = adjustCSS( elem, name, ret );
|
||||
|
||||
// Fixes bug #9237
|
||||
// Fixes bug trac-9237
|
||||
type = "number";
|
||||
}
|
||||
|
||||
// Make sure that null and NaN values aren't set (#7116)
|
||||
// Make sure that null and NaN values aren't set (trac-7116)
|
||||
if ( value == null || value !== value ) {
|
||||
return;
|
||||
}
|
||||
@@ -7553,7 +7583,7 @@ function Animation( elem, properties, options ) {
|
||||
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
|
||||
|
||||
// Support: Android 2.3 only
|
||||
// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
|
||||
// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)
|
||||
temp = remaining / animation.duration || 0,
|
||||
percent = 1 - temp,
|
||||
index = 0,
|
||||
@@ -7943,7 +7973,6 @@ jQuery.fx.speeds = {
|
||||
|
||||
|
||||
// Based off of the plugin by Clint Helfers, with permission.
|
||||
// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
|
||||
jQuery.fn.delay = function( time, type ) {
|
||||
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
||||
type = type || "fx";
|
||||
@@ -8168,8 +8197,7 @@ jQuery.extend( {
|
||||
// Support: IE <=9 - 11 only
|
||||
// elem.tabIndex doesn't always return the
|
||||
// correct value when it hasn't been explicitly set
|
||||
// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
||||
// Use proper attribute retrieval(#12072)
|
||||
// Use proper attribute retrieval (trac-12072)
|
||||
var tabindex = jQuery.find.attr( elem, "tabindex" );
|
||||
|
||||
if ( tabindex ) {
|
||||
@@ -8273,8 +8301,7 @@ function classesToArray( value ) {
|
||||
|
||||
jQuery.fn.extend( {
|
||||
addClass: function( value ) {
|
||||
var classes, elem, cur, curValue, clazz, j, finalValue,
|
||||
i = 0;
|
||||
var classNames, cur, curValue, className, i, finalValue;
|
||||
|
||||
if ( isFunction( value ) ) {
|
||||
return this.each( function( j ) {
|
||||
@@ -8282,36 +8309,35 @@ jQuery.fn.extend( {
|
||||
} );
|
||||
}
|
||||
|
||||
classes = classesToArray( value );
|
||||
classNames = classesToArray( value );
|
||||
|
||||
if ( classes.length ) {
|
||||
while ( ( elem = this[ i++ ] ) ) {
|
||||
curValue = getClass( elem );
|
||||
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
||||
if ( classNames.length ) {
|
||||
return this.each( function() {
|
||||
curValue = getClass( this );
|
||||
cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
||||
|
||||
if ( cur ) {
|
||||
j = 0;
|
||||
while ( ( clazz = classes[ j++ ] ) ) {
|
||||
if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
|
||||
cur += clazz + " ";
|
||||
for ( i = 0; i < classNames.length; i++ ) {
|
||||
className = classNames[ i ];
|
||||
if ( cur.indexOf( " " + className + " " ) < 0 ) {
|
||||
cur += className + " ";
|
||||
}
|
||||
}
|
||||
|
||||
// Only assign if different to avoid unneeded rendering.
|
||||
finalValue = stripAndCollapse( cur );
|
||||
if ( curValue !== finalValue ) {
|
||||
elem.setAttribute( "class", finalValue );
|
||||
this.setAttribute( "class", finalValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
removeClass: function( value ) {
|
||||
var classes, elem, cur, curValue, clazz, j, finalValue,
|
||||
i = 0;
|
||||
var classNames, cur, curValue, className, i, finalValue;
|
||||
|
||||
if ( isFunction( value ) ) {
|
||||
return this.each( function( j ) {
|
||||
@@ -8323,45 +8349,42 @@ jQuery.fn.extend( {
|
||||
return this.attr( "class", "" );
|
||||
}
|
||||
|
||||
classes = classesToArray( value );
|
||||
classNames = classesToArray( value );
|
||||
|
||||
if ( classes.length ) {
|
||||
while ( ( elem = this[ i++ ] ) ) {
|
||||
curValue = getClass( elem );
|
||||
if ( classNames.length ) {
|
||||
return this.each( function() {
|
||||
curValue = getClass( this );
|
||||
|
||||
// This expression is here for better compressibility (see addClass)
|
||||
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
||||
cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
||||
|
||||
if ( cur ) {
|
||||
j = 0;
|
||||
while ( ( clazz = classes[ j++ ] ) ) {
|
||||
for ( i = 0; i < classNames.length; i++ ) {
|
||||
className = classNames[ i ];
|
||||
|
||||
// Remove *all* instances
|
||||
while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
|
||||
cur = cur.replace( " " + clazz + " ", " " );
|
||||
while ( cur.indexOf( " " + className + " " ) > -1 ) {
|
||||
cur = cur.replace( " " + className + " ", " " );
|
||||
}
|
||||
}
|
||||
|
||||
// Only assign if different to avoid unneeded rendering.
|
||||
finalValue = stripAndCollapse( cur );
|
||||
if ( curValue !== finalValue ) {
|
||||
elem.setAttribute( "class", finalValue );
|
||||
this.setAttribute( "class", finalValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
toggleClass: function( value, stateVal ) {
|
||||
var type = typeof value,
|
||||
var classNames, className, i, self,
|
||||
type = typeof value,
|
||||
isValidValue = type === "string" || Array.isArray( value );
|
||||
|
||||
if ( typeof stateVal === "boolean" && isValidValue ) {
|
||||
return stateVal ? this.addClass( value ) : this.removeClass( value );
|
||||
}
|
||||
|
||||
if ( isFunction( value ) ) {
|
||||
return this.each( function( i ) {
|
||||
jQuery( this ).toggleClass(
|
||||
@@ -8371,17 +8394,20 @@ jQuery.fn.extend( {
|
||||
} );
|
||||
}
|
||||
|
||||
return this.each( function() {
|
||||
var className, i, self, classNames;
|
||||
if ( typeof stateVal === "boolean" && isValidValue ) {
|
||||
return stateVal ? this.addClass( value ) : this.removeClass( value );
|
||||
}
|
||||
|
||||
classNames = classesToArray( value );
|
||||
|
||||
return this.each( function() {
|
||||
if ( isValidValue ) {
|
||||
|
||||
// Toggle individual class names
|
||||
i = 0;
|
||||
self = jQuery( this );
|
||||
classNames = classesToArray( value );
|
||||
|
||||
while ( ( className = classNames[ i++ ] ) ) {
|
||||
for ( i = 0; i < classNames.length; i++ ) {
|
||||
className = classNames[ i ];
|
||||
|
||||
// Check each className given, space separated list
|
||||
if ( self.hasClass( className ) ) {
|
||||
@@ -8515,7 +8541,7 @@ jQuery.extend( {
|
||||
val :
|
||||
|
||||
// Support: IE <=10 - 11 only
|
||||
// option.text throws exceptions (#14686, #14858)
|
||||
// option.text throws exceptions (trac-14686, trac-14858)
|
||||
// Strip and collapse whitespace
|
||||
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
|
||||
stripAndCollapse( jQuery.text( elem ) );
|
||||
@@ -8542,7 +8568,7 @@ jQuery.extend( {
|
||||
option = options[ i ];
|
||||
|
||||
// Support: IE <=9 only
|
||||
// IE8-9 doesn't update selected after form reset (#2551)
|
||||
// IE8-9 doesn't update selected after form reset (trac-2551)
|
||||
if ( ( option.selected || i === index ) &&
|
||||
|
||||
// Don't return options that are disabled or in a disabled optgroup
|
||||
@@ -8685,8 +8711,8 @@ jQuery.extend( jQuery.event, {
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine event propagation path in advance, per W3C events spec (#9951)
|
||||
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
|
||||
// Determine event propagation path in advance, per W3C events spec (trac-9951)
|
||||
// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)
|
||||
if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {
|
||||
|
||||
bubbleType = special.delegateType || type;
|
||||
@@ -8738,7 +8764,7 @@ jQuery.extend( jQuery.event, {
|
||||
acceptData( elem ) ) {
|
||||
|
||||
// Call a native DOM method on the target with the same name as the event.
|
||||
// Don't do default actions on window, that's where global variables be (#6170)
|
||||
// Don't do default actions on window, that's where global variables be (trac-6170)
|
||||
if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {
|
||||
|
||||
// Don't re-trigger an onFOO event when we call its FOO() method
|
||||
@@ -9012,7 +9038,7 @@ var
|
||||
rantiCache = /([?&])_=[^&]*/,
|
||||
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
|
||||
|
||||
// #7653, #8125, #8152: local protocol detection
|
||||
// trac-7653, trac-8125, trac-8152: local protocol detection
|
||||
rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
|
||||
rnoContent = /^(?:GET|HEAD)$/,
|
||||
rprotocol = /^\/\//,
|
||||
@@ -9035,7 +9061,7 @@ var
|
||||
*/
|
||||
transports = {},
|
||||
|
||||
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
|
||||
// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression
|
||||
allTypes = "*/".concat( "*" ),
|
||||
|
||||
// Anchor tag for parsing the document origin
|
||||
@@ -9106,7 +9132,7 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX
|
||||
|
||||
// A special extend for ajax options
|
||||
// that takes "flat" options (not to be deep extended)
|
||||
// Fixes #9887
|
||||
// Fixes trac-9887
|
||||
function ajaxExtend( target, src ) {
|
||||
var key, deep,
|
||||
flatOptions = jQuery.ajaxSettings.flatOptions || {};
|
||||
@@ -9517,12 +9543,12 @@ jQuery.extend( {
|
||||
deferred.promise( jqXHR );
|
||||
|
||||
// Add protocol if not provided (prefilters might expect it)
|
||||
// Handle falsy url in the settings object (#10093: consistency with old signature)
|
||||
// Handle falsy url in the settings object (trac-10093: consistency with old signature)
|
||||
// We also use the url parameter if available
|
||||
s.url = ( ( url || s.url || location.href ) + "" )
|
||||
.replace( rprotocol, location.protocol + "//" );
|
||||
|
||||
// Alias method option to type as per ticket #12004
|
||||
// Alias method option to type as per ticket trac-12004
|
||||
s.type = options.method || options.type || s.method || s.type;
|
||||
|
||||
// Extract dataTypes list
|
||||
@@ -9565,7 +9591,7 @@ jQuery.extend( {
|
||||
}
|
||||
|
||||
// We can fire global events as of now if asked to
|
||||
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
|
||||
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)
|
||||
fireGlobals = jQuery.event && s.global;
|
||||
|
||||
// Watch for a new set of requests
|
||||
@@ -9594,7 +9620,7 @@ jQuery.extend( {
|
||||
if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
|
||||
cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
|
||||
|
||||
// #9682: remove data so that it's not used in an eventual retry
|
||||
// trac-9682: remove data so that it's not used in an eventual retry
|
||||
delete s.data;
|
||||
}
|
||||
|
||||
@@ -9867,7 +9893,7 @@ jQuery._evalUrl = function( url, options, doc ) {
|
||||
return jQuery.ajax( {
|
||||
url: url,
|
||||
|
||||
// Make this explicit, since user can override this through ajaxSetup (#11264)
|
||||
// Make this explicit, since user can override this through ajaxSetup (trac-11264)
|
||||
type: "GET",
|
||||
dataType: "script",
|
||||
cache: true,
|
||||
@@ -9976,7 +10002,7 @@ var xhrSuccessStatus = {
|
||||
0: 200,
|
||||
|
||||
// Support: IE <=9 only
|
||||
// #1450: sometimes IE returns 1223 when it should be 204
|
||||
// trac-1450: sometimes IE returns 1223 when it should be 204
|
||||
1223: 204
|
||||
},
|
||||
xhrSupported = jQuery.ajaxSettings.xhr();
|
||||
@@ -10048,7 +10074,7 @@ jQuery.ajaxTransport( function( options ) {
|
||||
} else {
|
||||
complete(
|
||||
|
||||
// File: protocol always yields status 0; see #8605, #14207
|
||||
// File: protocol always yields status 0; see trac-8605, trac-14207
|
||||
xhr.status,
|
||||
xhr.statusText
|
||||
);
|
||||
@@ -10109,7 +10135,7 @@ jQuery.ajaxTransport( function( options ) {
|
||||
xhr.send( options.hasContent && options.data || null );
|
||||
} catch ( e ) {
|
||||
|
||||
// #14683: Only rethrow if this hasn't been notified as an error yet
|
||||
// trac-14683: Only rethrow if this hasn't been notified as an error yet
|
||||
if ( callback ) {
|
||||
throw e;
|
||||
}
|
||||
@@ -10753,7 +10779,9 @@ jQuery.each(
|
||||
|
||||
// Support: Android <=4.0 only
|
||||
// Make sure we trim BOM and NBSP
|
||||
var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
||||
// Require that the "whitespace run" starts from a non-whitespace
|
||||
// to avoid O(N^2) behavior when the engine would try matching "\s+$" at each space position.
|
||||
var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;
|
||||
|
||||
// Bind a function to a context, optionally partially applying any
|
||||
// arguments.
|
||||
@@ -10820,7 +10848,7 @@ jQuery.isNumeric = function( obj ) {
|
||||
jQuery.trim = function( text ) {
|
||||
return text == null ?
|
||||
"" :
|
||||
( text + "" ).replace( rtrim, "" );
|
||||
( text + "" ).replace( rtrim, "$1" );
|
||||
};
|
||||
|
||||
|
||||
@@ -10868,8 +10896,8 @@ jQuery.noConflict = function( deep ) {
|
||||
};
|
||||
|
||||
// Expose jQuery and $ identifiers, even in AMD
|
||||
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
|
||||
// and CommonJS for browser emulators (#13566)
|
||||
// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)
|
||||
// and CommonJS for browser emulators (trac-13566)
|
||||
if ( typeof noGlobal === "undefined" ) {
|
||||
window.jQuery = window.$ = jQuery;
|
||||
}
|
||||
|
||||
4
libraries/jquery.min.js
vendored
4
libraries/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1287
libraries/mermaid.min.js
vendored
1287
libraries/mermaid.min.js
vendored
File diff suppressed because one or more lines are too long
1327
package-lock.json
generated
1327
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
45
package.json
45
package.json
@@ -2,7 +2,7 @@
|
||||
"name": "trilium",
|
||||
"productName": "Trilium Notes",
|
||||
"description": "Trilium Notes",
|
||||
"version": "0.57.5",
|
||||
"version": "0.58.7",
|
||||
"license": "AGPL-3.0-only",
|
||||
"main": "electron.js",
|
||||
"bin": {
|
||||
@@ -13,12 +13,14 @@
|
||||
"url": "https://github.com/zadam/trilium.git"
|
||||
},
|
||||
"scripts": {
|
||||
"start-server": "cross-env TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev node ./src/www",
|
||||
"start-electron": "cross-env TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev electron --inspect=5858 .",
|
||||
"switch-server": "rm -r ./node_modules/better-sqlite3 && npm install",
|
||||
"switch-electron": "rm -r ./node_modules/better-sqlite3 && npm install && ./node_modules/.bin/electron-rebuild",
|
||||
"build-backend-docs": "rm -r ./docs/backend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/backend_api src/becca/entities/*.js src/services/backend_script_api.js src/services/sql.js",
|
||||
"build-frontend-docs": "rm -r ./docs/frontend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/collapsible_widget.js",
|
||||
"start-server": "cross-env TRILIUM_DATA_DIR=./data TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 node ./src/www",
|
||||
"start-server-no-dir": "cross-env TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 node ./src/www",
|
||||
"start-electron": "cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron --inspect=5858 .",
|
||||
"start-electron-no-dir": "cross-env TRILIUM_ENV=dev TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 electron --inspect=5858 .",
|
||||
"switch-server": "rm -rf ./node_modules/better-sqlite3 && npm install",
|
||||
"switch-electron": "rm -rf ./node_modules/better-sqlite3 && npm install && ./node_modules/.bin/electron-rebuild",
|
||||
"build-backend-docs": "rm -rf ./docs/backend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/backend_api src/becca/entities/*.js src/services/backend_script_api.js src/services/sql.js",
|
||||
"build-frontend-docs": "rm -rf ./docs/frontend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/collapsible_widget.js",
|
||||
"build-docs": "npm run build-backend-docs && npm run build-frontend-docs",
|
||||
"webpack": "npx webpack -c webpack-desktop.config.js && npx webpack -c webpack-mobile.config.js && npx webpack -c webpack-setup.config.js",
|
||||
"test-jasmine": "jasmine",
|
||||
@@ -27,11 +29,12 @@
|
||||
"postinstall": "rimraf ./node_modules/canvas"
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron/remote": "2.0.8",
|
||||
"@excalidraw/excalidraw": "0.12.0",
|
||||
"@braintree/sanitize-url": "^6.0.2",
|
||||
"@electron/remote": "2.0.9",
|
||||
"@excalidraw/excalidraw": "0.13.0",
|
||||
"archiver": "5.3.1",
|
||||
"async-mutex": "0.4.0",
|
||||
"axios": "1.1.3",
|
||||
"axios": "1.2.2",
|
||||
"better-sqlite3": "7.4.5",
|
||||
"chokidar": "3.5.3",
|
||||
"cls-hooked": "4.2.2",
|
||||
@@ -39,18 +42,20 @@
|
||||
"compression": "1.7.4",
|
||||
"cookie-parser": "1.4.6",
|
||||
"csurf": "1.11.0",
|
||||
"dayjs": "1.11.6",
|
||||
"dayjs": "1.11.7",
|
||||
"dayjs-plugin-utc": "^0.1.2",
|
||||
"debounce": "^1.2.1",
|
||||
"ejs": "3.1.8",
|
||||
"electron-debug": "3.2.0",
|
||||
"electron-dl": "3.4.1",
|
||||
"electron-dl": "3.5.0",
|
||||
"electron-window-state": "5.0.3",
|
||||
"escape-html": "1.0.3",
|
||||
"express": "4.18.2",
|
||||
"express-partial-content": "1.0.2",
|
||||
"express-rate-limit": "6.6.0",
|
||||
"express-rate-limit": "6.7.0",
|
||||
"express-session": "1.17.3",
|
||||
"fs-extra": "10.1.0",
|
||||
"helmet": "6.0.0",
|
||||
"fs-extra": "11.1.0",
|
||||
"helmet": "6.0.1",
|
||||
"html": "1.0.0",
|
||||
"html2plaintext": "2.1.4",
|
||||
"http-proxy-agent": "5.0.0",
|
||||
@@ -61,10 +66,10 @@
|
||||
"is-svg": "4.3.2",
|
||||
"jimp": "0.16.2",
|
||||
"joplin-turndown-plugin-gfm": "1.0.12",
|
||||
"jsdom": "20.0.2",
|
||||
"jsdom": "20.0.3",
|
||||
"mime-types": "2.1.35",
|
||||
"multer": "1.4.5-lts.1",
|
||||
"node-abi": "3.28.0",
|
||||
"node-abi": "3.30.0",
|
||||
"normalize-strings": "1.1.1",
|
||||
"open": "8.4.0",
|
||||
"rand-token": "1.0.1",
|
||||
@@ -74,7 +79,7 @@
|
||||
"rimraf": "3.0.2",
|
||||
"safe-compare": "1.1.4",
|
||||
"sanitize-filename": "1.6.3",
|
||||
"sanitize-html": "2.7.3",
|
||||
"sanitize-html": "2.8.1",
|
||||
"sax": "1.2.4",
|
||||
"semver": "7.3.8",
|
||||
"serve-favicon": "2.5.0",
|
||||
@@ -98,8 +103,8 @@
|
||||
"jsdoc": "4.0.0",
|
||||
"lorem-ipsum": "2.0.8",
|
||||
"rcedit": "3.0.1",
|
||||
"webpack": "5.74.0",
|
||||
"webpack-cli": "4.10.0"
|
||||
"webpack": "5.75.0",
|
||||
"webpack-cli": "5.0.1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"electron-installer-debian": "3.1.0"
|
||||
|
||||
@@ -4,7 +4,7 @@ const Branch = require('../../src/becca/entities/branch');
|
||||
const SearchContext = require('../../src/services/search/search_context');
|
||||
const dateUtils = require('../../src/services/date_utils');
|
||||
const becca = require('../../src/becca/becca');
|
||||
const {NoteBuilder, findNoteByTitle, note} = require('./becca_mocking.js');
|
||||
const {NoteBuilder, findNoteByTitle, note} = require('./becca_mocking');
|
||||
|
||||
describe("Search", () => {
|
||||
let rootNote;
|
||||
@@ -13,7 +13,7 @@ describe("Search", () => {
|
||||
becca.reset();
|
||||
|
||||
rootNote = new NoteBuilder(new Note({noteId: 'root', title: 'root', type: 'text'}));
|
||||
new Branch({branchId: 'root', noteId: 'root', parentNoteId: 'none', notePosition: 10});
|
||||
new Branch({branchId: 'none_root', noteId: 'root', parentNoteId: 'none', notePosition: 10});
|
||||
});
|
||||
|
||||
it("simple path match", () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const {note} = require('./becca_mocking.js');
|
||||
const {note} = require('./becca_mocking');
|
||||
const ValueExtractor = require('../../src/services/search/value_extractor');
|
||||
const becca = require('../../src/becca/becca');
|
||||
const SearchContext = require("../../src/services/search/search_context");
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
const backupService = require('./services/backup');
|
||||
const anonymizationService = require('./services/anonymization');
|
||||
const sqlInit = require('./services/sql_init');
|
||||
require('./entities/entity_constructor');
|
||||
require('./becca/entity_constructor');
|
||||
|
||||
sqlInit.dbReady.then(async () => {
|
||||
try {
|
||||
console.log("Starting anonymization...");
|
||||
|
||||
const resp = await backupService.anonymize();
|
||||
const resp = await anonymizationService.createAnonymizedCopy('full');
|
||||
|
||||
if (resp.success) {
|
||||
console.log("Anonymized file has been saved to: " + resp.anonymizedFilePath);
|
||||
console.log(`Anonymized file has been saved to: ${resp.anonymizedFilePath}`);
|
||||
|
||||
process.exit(0);
|
||||
} else {
|
||||
|
||||
@@ -66,12 +66,12 @@ const sessionParser = session({
|
||||
name: 'trilium.sid',
|
||||
store: new FileStore({
|
||||
ttl: 30 * 24 * 3600,
|
||||
path: dataDir.TRILIUM_DATA_DIR + '/sessions'
|
||||
path: `${dataDir.TRILIUM_DATA_DIR}/sessions`
|
||||
})
|
||||
});
|
||||
app.use(sessionParser);
|
||||
|
||||
app.use(favicon(__dirname + '/../images/app-icons/win/icon.ico'));
|
||||
app.use(favicon(`${__dirname}/../images/app-icons/win/icon.ico`));
|
||||
|
||||
require('./routes/routes').register(app);
|
||||
|
||||
@@ -91,7 +91,7 @@ app.use((err, req, res, next) => {
|
||||
|
||||
// catch 404 and forward to error handler
|
||||
app.use((req, res, next) => {
|
||||
const err = new Error('Router not found for request ' + req.url);
|
||||
const err = new Error(`Router not found for request ${req.url}`);
|
||||
err.status = 404;
|
||||
next(err);
|
||||
});
|
||||
|
||||
@@ -32,6 +32,10 @@ class Becca {
|
||||
this.loaded = false;
|
||||
}
|
||||
|
||||
getRoot() {
|
||||
return this.getNote('root');
|
||||
}
|
||||
|
||||
/** @returns {Attribute[]} */
|
||||
findAttributes(type, name) {
|
||||
name = name.trim().toLowerCase();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const becca = require('./becca.js');
|
||||
const becca = require('./becca');
|
||||
const cls = require('../services/cls');
|
||||
const protectedSessionService = require('../services/protected_session');
|
||||
const log = require('../services/log');
|
||||
@@ -75,7 +75,7 @@ function getNoteTitle(childNoteId, parentNoteId) {
|
||||
|
||||
const branch = parentNote ? becca.getBranchFromChildAndParent(childNote.noteId, parentNote.noteId) : null;
|
||||
|
||||
return ((branch && branch.prefix) ? `${branch.prefix} - ` : '') + title;
|
||||
return `${(branch && branch.prefix) ? `${branch.prefix} - ` : ''}${title}`;
|
||||
}
|
||||
|
||||
function getNoteTitleArrayForPath(notePathArray) {
|
||||
@@ -83,8 +83,8 @@ function getNoteTitleArrayForPath(notePathArray) {
|
||||
throw new Error(`${notePathArray} is not an array.`);
|
||||
}
|
||||
|
||||
if (notePathArray.length === 1 && notePathArray[0] === cls.getHoistedNoteId()) {
|
||||
return [getNoteTitle(cls.getHoistedNoteId())];
|
||||
if (notePathArray.length === 1) {
|
||||
return [getNoteTitle(notePathArray[0])];
|
||||
}
|
||||
|
||||
const titles = [];
|
||||
@@ -92,6 +92,10 @@ function getNoteTitleArrayForPath(notePathArray) {
|
||||
let parentNoteId = 'root';
|
||||
let hoistedNotePassed = false;
|
||||
|
||||
// this is a notePath from outside of hoisted subtree so full title path needs to be returned
|
||||
const hoistedNoteId = cls.getHoistedNoteId();
|
||||
const outsideOfHoistedSubtree = !notePathArray.includes(hoistedNoteId);
|
||||
|
||||
for (const noteId of notePathArray) {
|
||||
// start collecting path segment titles only after hoisted note
|
||||
if (hoistedNotePassed) {
|
||||
@@ -100,7 +104,7 @@ function getNoteTitleArrayForPath(notePathArray) {
|
||||
titles.push(title);
|
||||
}
|
||||
|
||||
if (noteId === cls.getHoistedNoteId()) {
|
||||
if (!hoistedNotePassed && (noteId === hoistedNoteId || outsideOfHoistedSubtree)) {
|
||||
hoistedNotePassed = true;
|
||||
}
|
||||
|
||||
@@ -124,8 +128,9 @@ function getNoteTitleForPath(notePathArray) {
|
||||
*/
|
||||
function getSomePath(note, path = []) {
|
||||
// first try to find note within hoisted note, otherwise take any existing note path
|
||||
return getSomePathInner(note, path, true)
|
||||
|| getSomePathInner(note, path, false);
|
||||
// each branch needs a separate copy since it's mutable
|
||||
return getSomePathInner(note, [...path], true)
|
||||
|| getSomePathInner(note, [...path], false);
|
||||
}
|
||||
|
||||
function getSomePathInner(note, path, respectHoisting) {
|
||||
@@ -174,7 +179,7 @@ function getNotePath(noteId) {
|
||||
let branchId;
|
||||
|
||||
if (note.isRoot()) {
|
||||
branchId = 'root';
|
||||
branchId = 'none_root';
|
||||
}
|
||||
else {
|
||||
const parentNote = note.parents[0];
|
||||
|
||||
@@ -31,7 +31,7 @@ class AbstractEntity {
|
||||
let contentToHash = "";
|
||||
|
||||
for (const propertyName of this.constructor.hashedProperties) {
|
||||
contentToHash += "|" + this[propertyName];
|
||||
contentToHash += `|${this[propertyName]}`;
|
||||
}
|
||||
|
||||
if (isDeleted) {
|
||||
@@ -46,7 +46,10 @@ class AbstractEntity {
|
||||
return this.utcDateModified || this.utcDateCreated;
|
||||
}
|
||||
|
||||
/** @protected */
|
||||
/**
|
||||
* @protected
|
||||
* @returns {Becca}
|
||||
*/
|
||||
get becca() {
|
||||
if (!becca) {
|
||||
becca = require('../becca');
|
||||
@@ -75,7 +78,7 @@ class AbstractEntity {
|
||||
/**
|
||||
* Saves entity - executes SQL, but doesn't commit the transaction on its own
|
||||
*
|
||||
* @returns {AbstractEntity}
|
||||
* @returns {this}
|
||||
*/
|
||||
save() {
|
||||
const entityName = this.constructor.entityName;
|
||||
|
||||
@@ -5,6 +5,7 @@ const AbstractEntity = require("./abstract_entity");
|
||||
const sql = require("../../services/sql");
|
||||
const dateUtils = require("../../services/date_utils");
|
||||
const promotedAttributeDefinitionParser = require("../../services/promoted_attribute_definition_parser");
|
||||
const {sanitizeAttributeName} = require("../../services/sanitize_attribute_name");
|
||||
|
||||
/**
|
||||
* Attribute is an abstract concept which has two real uses - label (key - value pair)
|
||||
@@ -62,7 +63,6 @@ class Attribute extends AbstractEntity {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
init() {
|
||||
if (this.attributeId) {
|
||||
this.becca.attributes[this.attributeId] = this;
|
||||
@@ -86,6 +86,20 @@ class Attribute extends AbstractEntity {
|
||||
}
|
||||
}
|
||||
|
||||
validate() {
|
||||
if (!["label", "relation"].includes(this.type)) {
|
||||
throw new Error(`Invalid attribute type '${this.type}' in attribute '${this.attributeId}' of note '${this.noteId}'`);
|
||||
}
|
||||
|
||||
if (!this.name?.trim()) {
|
||||
throw new Error(`Invalid empty name in attribute '${this.attributeId}' of note '${this.noteId}'`);
|
||||
}
|
||||
|
||||
if (this.type === 'relation' && !(this.value in this.becca.notes)) {
|
||||
throw new Error(`Cannot save relation '${this.name}' of note '${this.noteId}' since it target not existing note '${this.value}'.`);
|
||||
}
|
||||
}
|
||||
|
||||
get isAffectingSubtree() {
|
||||
return this.isInheritable
|
||||
|| (this.type === 'relation' && this.name === 'template');
|
||||
@@ -113,7 +127,13 @@ class Attribute extends AbstractEntity {
|
||||
* @returns {Note|null}
|
||||
*/
|
||||
getNote() {
|
||||
return this.becca.getNote(this.noteId);
|
||||
const note = this.becca.getNote(this.noteId);
|
||||
|
||||
if (!note) {
|
||||
throw new Error(`Note '${this.noteId}' of attribute '${this.attributeId}', type '${this.type}', name '${this.name}' does not exist.`);
|
||||
}
|
||||
|
||||
return note;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -157,11 +177,11 @@ class Attribute extends AbstractEntity {
|
||||
}
|
||||
|
||||
beforeSaving() {
|
||||
if (!this.value) {
|
||||
if (this.type === 'relation') {
|
||||
throw new Error(`Cannot save relation ${this.name} since it does not target any note.`);
|
||||
}
|
||||
this.validate();
|
||||
|
||||
this.name = sanitizeAttributeName(this.name);
|
||||
|
||||
if (!this.value) {
|
||||
// null value isn't allowed
|
||||
this.value = "";
|
||||
}
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
const Note = require('./note');
|
||||
const AbstractEntity = require("./abstract_entity");
|
||||
const sql = require("../../services/sql");
|
||||
const dateUtils = require("../../services/date_utils");
|
||||
const utils = require("../../services/utils.js");
|
||||
const utils = require("../../services/utils");
|
||||
const TaskContext = require("../../services/task_context");
|
||||
const cls = require("../../services/cls");
|
||||
const log = require("../../services/log");
|
||||
@@ -13,6 +12,9 @@ const log = require("../../services/log");
|
||||
* Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
|
||||
* parents.
|
||||
*
|
||||
* Note that you should not rely on the branch's identity, since it can change easily with a note's move.
|
||||
* Always check noteId instead.
|
||||
*
|
||||
* @extends AbstractEntity
|
||||
*/
|
||||
class Branch extends AbstractEntity {
|
||||
@@ -76,7 +78,7 @@ class Branch extends AbstractEntity {
|
||||
childNote.parentBranches.push(this);
|
||||
}
|
||||
|
||||
if (this.branchId === 'root') {
|
||||
if (this.noteId === 'root') {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -119,6 +121,19 @@ class Branch extends AbstractEntity {
|
||||
return !(this.branchId in this.becca.branches);
|
||||
}
|
||||
|
||||
/**
|
||||
* Branch is weak when its existence should not hinder deletion of its note.
|
||||
* As a result, note with only weak branches should be immediately deleted.
|
||||
* An example is shared or bookmarked clones - they are created automatically and exist for technical reasons,
|
||||
* not as user-intended actions. From user perspective, they don't count as real clones and for the purpose
|
||||
* of deletion should not act as a clone.
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
get isWeak() {
|
||||
return ['_share', '_lbBookmarks'].includes(this.parentNoteId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a branch. If this is a last note's branch, delete the note as well.
|
||||
*
|
||||
@@ -150,8 +165,7 @@ class Branch extends AbstractEntity {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.branchId === 'root'
|
||||
|| this.noteId === 'root'
|
||||
if (this.noteId === 'root'
|
||||
|| this.noteId === cls.getHoistedNoteId()) {
|
||||
|
||||
throw new Error("Can't delete root or hoisted branch/note");
|
||||
@@ -159,20 +173,22 @@ class Branch extends AbstractEntity {
|
||||
|
||||
this.markAsDeleted(deleteId);
|
||||
|
||||
const notDeletedBranches = note.getParentBranches();
|
||||
const notDeletedBranches = note.getStrongParentBranches();
|
||||
|
||||
if (notDeletedBranches.length === 0) {
|
||||
for (const weakBranch of note.getParentBranches()) {
|
||||
weakBranch.markAsDeleted(deleteId);
|
||||
}
|
||||
|
||||
for (const childBranch of note.getChildBranches()) {
|
||||
childBranch.deleteBranch(deleteId, taskContext);
|
||||
}
|
||||
|
||||
// first delete children and then parent - this will show up better in recent changes
|
||||
|
||||
log.info("Deleting note " + note.noteId);
|
||||
log.info(`Deleting note ${note.noteId}`);
|
||||
|
||||
// marking note as deleted as a signal to event handlers that the note is being deleted
|
||||
// (isDeleted is being checked against becca)
|
||||
delete this.becca.notes[note.noteId];
|
||||
this.becca.notes[note.noteId].isBeingDeleted = true;
|
||||
|
||||
for (const attribute of note.getOwnedAttributes()) {
|
||||
attribute.markAsDeleted(deleteId);
|
||||
@@ -192,16 +208,34 @@ class Branch extends AbstractEntity {
|
||||
}
|
||||
|
||||
beforeSaving() {
|
||||
if (!this.noteId || !this.parentNoteId) {
|
||||
throw new Error(`noteId and parentNoteId are mandatory properties for Branch`);
|
||||
}
|
||||
|
||||
this.branchId = `${this.parentNoteId}_${this.noteId}`;
|
||||
|
||||
if (this.notePosition === undefined || this.notePosition === null) {
|
||||
// TODO finding new position can be refactored into becca
|
||||
const maxNotePos = sql.getValue('SELECT MAX(notePosition) FROM branches WHERE parentNoteId = ? AND isDeleted = 0', [this.parentNoteId]);
|
||||
this.notePosition = maxNotePos === null ? 0 : maxNotePos + 10;
|
||||
let maxNotePos = 0;
|
||||
|
||||
for (const childBranch of this.parentNote.getChildBranches()) {
|
||||
if (maxNotePos < childBranch.notePosition
|
||||
&& childBranch.noteId !== '_hidden' // hidden has very large notePosition to always stay last
|
||||
) {
|
||||
maxNotePos = childBranch.notePosition;
|
||||
}
|
||||
}
|
||||
|
||||
this.notePosition = maxNotePos + 10;
|
||||
}
|
||||
|
||||
if (!this.isExpanded) {
|
||||
this.isExpanded = false;
|
||||
}
|
||||
|
||||
if (!this.prefix?.trim()) {
|
||||
this.prefix = null;
|
||||
}
|
||||
|
||||
this.utcDateModified = dateUtils.utcNowDateTime();
|
||||
|
||||
super.beforeSaving();
|
||||
@@ -223,13 +257,20 @@ class Branch extends AbstractEntity {
|
||||
}
|
||||
|
||||
createClone(parentNoteId, notePosition) {
|
||||
return new Branch({
|
||||
noteId: this.noteId,
|
||||
parentNoteId: parentNoteId,
|
||||
notePosition: notePosition,
|
||||
prefix: this.prefix,
|
||||
isExpanded: this.isExpanded
|
||||
});
|
||||
const existingBranch = this.becca.getBranchFromChildAndParent(this.noteId, parentNoteId);
|
||||
|
||||
if (existingBranch) {
|
||||
existingBranch.notePosition = notePosition;
|
||||
return existingBranch;
|
||||
} else {
|
||||
return new Branch({
|
||||
noteId: this.noteId,
|
||||
parentNoteId: parentNoteId,
|
||||
notePosition: notePosition,
|
||||
prefix: this.prefix,
|
||||
isExpanded: this.isExpanded
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ const NoteRevision = require("./note_revision");
|
||||
const TaskContext = require("../../services/task_context");
|
||||
const dayjs = require("dayjs");
|
||||
const utc = require('dayjs/plugin/utc');
|
||||
const searchService = require("../../services/search/services/search.js");
|
||||
const eventService = require("../../services/events");
|
||||
dayjs.extend(utc)
|
||||
|
||||
const LABEL = 'label';
|
||||
@@ -73,6 +73,8 @@ class Note extends AbstractEntity {
|
||||
this.utcDateCreated = utcDateCreated || dateUtils.utcNowDateTime();
|
||||
/** @type {string} */
|
||||
this.utcDateModified = utcDateModified;
|
||||
/** @type {boolean} - set during the deletion operation, before it is completed (removed from becca completely) */
|
||||
this.isBeingDeleted = false;
|
||||
|
||||
// ------ Derived attributes ------
|
||||
|
||||
@@ -155,6 +157,15 @@ class Note extends AbstractEntity {
|
||||
return this.parentBranches;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <i>strong</i> (as opposed to <i>weak</i>) parent branches. See isWeak for details.
|
||||
*
|
||||
* @returns {Branch[]}
|
||||
*/
|
||||
getStrongParentBranches() {
|
||||
return this.getParentBranches().filter(branch => !branch.isWeak);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Branch[]}
|
||||
* @deprecated use getParentBranches() instead
|
||||
@@ -201,7 +212,7 @@ class Note extends AbstractEntity {
|
||||
return undefined;
|
||||
}
|
||||
else {
|
||||
throw new Error("Cannot find note content for noteId=" + this.noteId);
|
||||
throw new Error(`Cannot find note content for noteId=${this.noteId}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,7 +305,7 @@ class Note extends AbstractEntity {
|
||||
|
||||
sql.upsert("note_contents", "noteId", pojo);
|
||||
|
||||
const hash = utils.hash(this.noteId + "|" + pojo.content.toString());
|
||||
const hash = utils.hash(`${this.noteId}|${pojo.content.toString()}`);
|
||||
|
||||
entityChangesService.addEntityChange({
|
||||
entityName: 'note_contents',
|
||||
@@ -304,6 +315,11 @@ class Note extends AbstractEntity {
|
||||
utcDateChanged: pojo.utcDateModified,
|
||||
isSynced: true
|
||||
});
|
||||
|
||||
eventService.emit(eventService.ENTITY_CHANGED, {
|
||||
entityName: 'note_contents',
|
||||
entity: this
|
||||
});
|
||||
}
|
||||
|
||||
setJsonContent(content) {
|
||||
@@ -322,7 +338,7 @@ class Note extends AbstractEntity {
|
||||
|
||||
/** @returns {boolean} true if this note is JavaScript (code or attachment) */
|
||||
isJavaScript() {
|
||||
return (this.type === "code" || this.type === "file")
|
||||
return (this.type === "code" || this.type === "file" || this.type === 'launcher')
|
||||
&& (this.mime.startsWith("application/javascript")
|
||||
|| this.mime === "application/x-javascript"
|
||||
|| this.mime === "text/javascript");
|
||||
@@ -362,6 +378,8 @@ class Note extends AbstractEntity {
|
||||
* @returns {Attribute[]} all note's attributes, including inherited ones
|
||||
*/
|
||||
getAttributes(type, name) {
|
||||
this.__validateTypeName(type, name);
|
||||
|
||||
this.__getAttributes([]);
|
||||
|
||||
if (type && name) {
|
||||
@@ -374,7 +392,8 @@ class Note extends AbstractEntity {
|
||||
return this.__attributeCache.filter(attr => attr.name === name);
|
||||
}
|
||||
else {
|
||||
return this.__attributeCache.slice();
|
||||
// a bit unsafe to return the original array, but defensive copy would be costly
|
||||
return this.__attributeCache;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -450,13 +469,26 @@ class Note extends AbstractEntity {
|
||||
return this.inheritableAttributeCache;
|
||||
}
|
||||
|
||||
__validateTypeName(type, name) {
|
||||
if (type && type !== 'label' && type !== 'relation') {
|
||||
throw new Error(`Unrecognized attribute type '${type}'. Only 'label' and 'relation' are possible values.`);
|
||||
}
|
||||
|
||||
if (name) {
|
||||
const firstLetter = name.charAt(0);
|
||||
if (firstLetter === '#' || firstLetter === '~') {
|
||||
throw new Error(`Detect '#' or '~' in the attribute's name. In the API, attribute names should be set without these characters.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* @param name
|
||||
* @param [value]
|
||||
* @returns {boolean}
|
||||
*/
|
||||
hasAttribute(type, name, value) {
|
||||
hasAttribute(type, name, value = null) {
|
||||
return !!this.getAttributes().find(attr =>
|
||||
attr.type === type
|
||||
&& attr.name === name
|
||||
@@ -648,16 +680,13 @@ class Note extends AbstractEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} [type] - (optional) attribute type to filter
|
||||
* @param {string} [name] - (optional) attribute name to filter
|
||||
* @param {string} [value] - (optional) attribute value to filter
|
||||
* @param {string|null} [type] - (optional) attribute type to filter
|
||||
* @param {string|null} [name] - (optional) attribute name to filter
|
||||
* @param {string|null} [value] - (optional) attribute value to filter
|
||||
* @returns {Attribute[]} note's "owned" attributes - excluding inherited ones
|
||||
*/
|
||||
getOwnedAttributes(type, name, value) {
|
||||
// it's a common mistake to include # or ~ into attribute name
|
||||
if (name && ["#", "~"].includes(name[0])) {
|
||||
name = name.substr(1);
|
||||
}
|
||||
getOwnedAttributes(type = null, name = null, value = null) {
|
||||
this.__validateTypeName(type, name);
|
||||
|
||||
if (type && name && value !== undefined && value !== null) {
|
||||
return this.ownedAttributes.filter(attr => attr.type === type && attr.name === name && attr.value === value);
|
||||
@@ -681,7 +710,7 @@ class Note extends AbstractEntity {
|
||||
*
|
||||
* This method can be significantly faster than the getAttribute()
|
||||
*/
|
||||
getOwnedAttribute(type, name, value) {
|
||||
getOwnedAttribute(type, name, value = null) {
|
||||
const attrs = this.getOwnedAttributes(type, name, value);
|
||||
|
||||
return attrs.length > 0 ? attrs[0] : null;
|
||||
@@ -716,22 +745,22 @@ class Note extends AbstractEntity {
|
||||
*/
|
||||
getFlatText() {
|
||||
if (!this.flatTextCache) {
|
||||
this.flatTextCache = this.noteId + ' ' + this.type + ' ' + this.mime + ' ';
|
||||
this.flatTextCache = `${this.noteId} ${this.type} ${this.mime} `;
|
||||
|
||||
for (const branch of this.parentBranches) {
|
||||
if (branch.prefix) {
|
||||
this.flatTextCache += branch.prefix + ' ';
|
||||
this.flatTextCache += `${branch.prefix} `;
|
||||
}
|
||||
}
|
||||
|
||||
this.flatTextCache += this.title + ' ';
|
||||
this.flatTextCache += `${this.title} `;
|
||||
|
||||
for (const attr of this.getAttributes()) {
|
||||
// it's best to use space as separator since spaces are filtered from the search string by the tokenization into words
|
||||
this.flatTextCache += (attr.type === 'label' ? '#' : '~') + attr.name;
|
||||
this.flatTextCache += `${attr.type === 'label' ? '#' : '~'}${attr.name}`;
|
||||
|
||||
if (attr.value) {
|
||||
this.flatTextCache += '=' + attr.value;
|
||||
this.flatTextCache += `=${attr.value}`;
|
||||
}
|
||||
|
||||
this.flatTextCache += ' ';
|
||||
@@ -864,7 +893,7 @@ class Note extends AbstractEntity {
|
||||
/**
|
||||
* @returns {{notes: Note[], relationships: Array.<{parentNoteId: string, childNoteId: string}>}}
|
||||
*/
|
||||
getSubtree({includeArchived = true, resolveSearch = false} = {}) {
|
||||
getSubtree({includeArchived = true, includeHidden = false, resolveSearch = false} = {}) {
|
||||
const noteSet = new Set();
|
||||
const relationships = []; // list of tuples parentNoteId -> childNoteId
|
||||
|
||||
@@ -880,8 +909,7 @@ class Note extends AbstractEntity {
|
||||
}
|
||||
|
||||
function addSubtreeNotesInner(note, parentNote = null) {
|
||||
// share can be removed after 0.57 since it will be put under hidden
|
||||
if (note.noteId === 'hidden' || note.noteId === 'share') {
|
||||
if (note.noteId === '_hidden' && !includeHidden) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -923,13 +951,14 @@ class Note extends AbstractEntity {
|
||||
};
|
||||
}
|
||||
|
||||
/** @returns {String[]} */
|
||||
getSubtreeNoteIds({includeArchived = true, resolveSearch = false} = {}) {
|
||||
return this.getSubtree({includeArchived, resolveSearch})
|
||||
/** @returns {String[]} - includes the subtree node as well */
|
||||
getSubtreeNoteIds({includeArchived = true, includeHidden = false, resolveSearch = false} = {}) {
|
||||
return this.getSubtree({includeArchived, includeHidden, resolveSearch})
|
||||
.notes
|
||||
.map(note => note.noteId);
|
||||
}
|
||||
|
||||
/** @deprecated use getSubtreeNoteIds() instead */
|
||||
getDescendantNoteIds() {
|
||||
return this.getSubtreeNoteIds();
|
||||
}
|
||||
@@ -1019,6 +1048,10 @@ class Note extends AbstractEntity {
|
||||
return false;
|
||||
}
|
||||
|
||||
isInHiddenSubtree() {
|
||||
return this.noteId === '_hidden' || this.hasAncestor('_hidden');
|
||||
}
|
||||
|
||||
getTargetRelations() {
|
||||
return this.targetRelations;
|
||||
}
|
||||
@@ -1080,6 +1113,13 @@ class Note extends AbstractEntity {
|
||||
return notePaths;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean - true if there's no non-hidden path, note is not cloned to the visible tree
|
||||
*/
|
||||
isHiddenCompletely() {
|
||||
return !this.getAllNotePaths().find(notePathArr => !notePathArr.includes('_hidden'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ancestorNoteId
|
||||
* @return {boolean} - true if ancestorNoteId occurs in at least one of the note's paths
|
||||
@@ -1101,7 +1141,7 @@ class Note extends AbstractEntity {
|
||||
const attributes = this.getOwnedAttributes();
|
||||
const attr = attributes.find(attr => attr.type === type && attr.name === name);
|
||||
|
||||
value = value !== null && value !== undefined ? value.toString() : "";
|
||||
value = value?.toString() || "";
|
||||
|
||||
if (attr) {
|
||||
if (attr.value !== value) {
|
||||
@@ -1145,7 +1185,8 @@ class Note extends AbstractEntity {
|
||||
* @param {string} type - attribute type (label / relation)
|
||||
* @param {string} name - name of the attribute, not including the leading ~/#
|
||||
* @param {string} [value] - value of the attribute - text for labels, target note ID for relations; optional.
|
||||
*
|
||||
* @param {boolean} [isInheritable=false]
|
||||
* @param {int} [position]
|
||||
* @return {Attribute}
|
||||
*/
|
||||
addAttribute(type, name, value = "", isInheritable = false, position = 1000) {
|
||||
@@ -1166,7 +1207,7 @@ class Note extends AbstractEntity {
|
||||
*
|
||||
* @param {string} name - name of the label, not including the leading #
|
||||
* @param {string} [value] - text value of the label; optional
|
||||
*
|
||||
* @param {boolean} [isInheritable=false]
|
||||
* @return {Attribute}
|
||||
*/
|
||||
addLabel(name, value = "", isInheritable = false) {
|
||||
@@ -1178,8 +1219,8 @@ class Note extends AbstractEntity {
|
||||
* returned.
|
||||
*
|
||||
* @param {string} name - name of the relation, not including the leading ~
|
||||
* @param {string} value - ID of the target note of the relation
|
||||
*
|
||||
* @param {string} targetNoteId
|
||||
* @param {boolean} [isInheritable=false]
|
||||
* @return {Attribute}
|
||||
*/
|
||||
addRelation(name, targetNoteId, isInheritable = false) {
|
||||
@@ -1318,8 +1359,16 @@ class Note extends AbstractEntity {
|
||||
}
|
||||
}
|
||||
|
||||
isLaunchBarConfig() {
|
||||
return this.type === 'launcher' || ['_lbRoot', '_lbAvailableLaunchers', '_lbVisibleLaunchers'].includes(this.noteId);
|
||||
}
|
||||
|
||||
isOptions() {
|
||||
return this.noteId.startsWith("_options");
|
||||
}
|
||||
|
||||
get isDeleted() {
|
||||
return !(this.noteId in this.becca.notes);
|
||||
return !(this.noteId in this.becca.notes) || this.isBeingDeleted;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -81,7 +81,7 @@ class NoteRevision extends AbstractEntity {
|
||||
return undefined;
|
||||
}
|
||||
else {
|
||||
throw new Error("Cannot find note revision content for noteRevisionId=" + this.noteRevisionId);
|
||||
throw new Error(`Cannot find note revision content for noteRevisionId=${this.noteRevisionId}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ class NoteRevision extends AbstractEntity {
|
||||
|
||||
sql.upsert("note_revision_contents", "noteRevisionId", pojo);
|
||||
|
||||
const hash = utils.hash(this.noteRevisionId + "|" + pojo.content.toString());
|
||||
const hash = utils.hash(`${this.noteRevisionId}|${pojo.content.toString()}`);
|
||||
|
||||
entityChangesService.addEntityChange({
|
||||
entityName: 'note_revision_contents',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const becca = require('./becca');
|
||||
const log = require('../services/log');
|
||||
const beccaService = require('./becca_service.js');
|
||||
const beccaService = require('./becca_service');
|
||||
const dateUtils = require('../services/date_utils');
|
||||
const { JSDOM } = require("jsdom");
|
||||
|
||||
|
||||
7
src/errors/not_found_error.js
Normal file
7
src/errors/not_found_error.js
Normal file
@@ -0,0 +1,7 @@
|
||||
class NotFoundError {
|
||||
constructor(message) {
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = NotFoundError;
|
||||
7
src/errors/validation_error.js
Normal file
7
src/errors/validation_error.js
Normal file
@@ -0,0 +1,7 @@
|
||||
class ValidationError {
|
||||
constructor(message) {
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ValidationError;
|
||||
@@ -1,5 +1,5 @@
|
||||
const appInfo = require('../services/app_info');
|
||||
const eu = require("./etapi_utils.js");
|
||||
const eu = require("./etapi_utils");
|
||||
|
||||
function register(router) {
|
||||
eu.route(router, 'get', '/etapi/app-info', (req, res, next) => {
|
||||
|
||||
@@ -35,15 +35,14 @@ function register(router) {
|
||||
existing.save();
|
||||
|
||||
return res.status(200).json(mappers.mapBranchToPojo(existing));
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
const branch = new Branch(params).save();
|
||||
|
||||
try {
|
||||
const branch = new Branch(params).save();
|
||||
|
||||
res.status(201).json(mappers.mapBranchToPojo(branch));
|
||||
}
|
||||
catch (e) {
|
||||
throw new eu.EtapiError(400, eu.GENERIC_CODE, e.message);
|
||||
res.status(201).json(mappers.mapBranchToPojo(branch));
|
||||
} catch (e) {
|
||||
throw new eu.EtapiError(400, eu.GENERIC_CODE, e.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -291,6 +291,33 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/notes/{noteId}/note-revision:
|
||||
parameters:
|
||||
- name: noteId
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/components/schemas/EntityId'
|
||||
- name: format
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
enum:
|
||||
- html
|
||||
- markdown
|
||||
default: html
|
||||
post:
|
||||
description: Create a note revision for the given note
|
||||
operationId: createNoteRevision
|
||||
responses:
|
||||
'204':
|
||||
description: revision has been created
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/branches/{branchId}:
|
||||
parameters:
|
||||
- name: branchId
|
||||
@@ -709,7 +736,7 @@ components:
|
||||
- image
|
||||
- search
|
||||
- book
|
||||
- relation-map
|
||||
- relationMap
|
||||
- render
|
||||
mime:
|
||||
type: string
|
||||
@@ -747,7 +774,7 @@ components:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
enum: [text, code, render, file, image, search, relation-map, book, note-map, mermaid]
|
||||
enum: [text, code, render, file, image, search, relationMap, book, noteMap, mermaid, webView, shortcut]
|
||||
mime:
|
||||
type: string
|
||||
isProtected:
|
||||
|
||||
@@ -8,6 +8,7 @@ const v = require("./validators");
|
||||
const searchService = require("../services/search/services/search");
|
||||
const SearchContext = require("../services/search/search_context");
|
||||
const zipExportService = require("../services/export/zip");
|
||||
const noteRevisionService = require("../services/note_revisions.js");
|
||||
|
||||
function register(router) {
|
||||
eu.route(router, 'get', '/etapi/notes', (req, res, next) => {
|
||||
@@ -122,6 +123,8 @@ function register(router) {
|
||||
|
||||
note.setContent(req.body);
|
||||
|
||||
noteService.scanForLinks(note);
|
||||
|
||||
return res.sendStatus(204);
|
||||
});
|
||||
|
||||
@@ -143,18 +146,26 @@ function register(router) {
|
||||
|
||||
zipExportService.exportToZip(taskContext, branch, format, res);
|
||||
});
|
||||
|
||||
eu.route(router, 'post' ,'/etapi/notes/:noteId/note-revision', (req, res, next) => {
|
||||
const note = eu.getAndCheckNote(req.params.noteId);
|
||||
|
||||
note.saveNoteRevision();
|
||||
|
||||
return res.sendStatus(204);
|
||||
});
|
||||
}
|
||||
|
||||
function parseSearchParams(req) {
|
||||
const rawSearchParams = {
|
||||
'fastSearch': parseBoolean(req.query, 'fastSearch'),
|
||||
'includeArchivedNotes': parseBoolean(req.query, 'includeArchivedNotes'),
|
||||
'ancestorNoteId': req.query['ancestorNoteId'],
|
||||
'ancestorDepth': parseInteger(req.query, 'ancestorDepth'),
|
||||
'orderBy': req.query['orderBy'],
|
||||
'orderDirection': parseOrderDirection(req.query, 'orderDirection'),
|
||||
'limit': parseInteger(req.query, 'limit'),
|
||||
'debug': parseBoolean(req.query, 'debug')
|
||||
fastSearch: parseBoolean(req.query, 'fastSearch'),
|
||||
includeArchivedNotes: parseBoolean(req.query, 'includeArchivedNotes'),
|
||||
ancestorNoteId: req.query['ancestorNoteId'],
|
||||
ancestorDepth: req.query['ancestorDepth'], // e.g. "eq5"
|
||||
orderBy: req.query['orderBy'],
|
||||
orderDirection: parseOrderDirection(req.query, 'orderDirection'),
|
||||
limit: parseInteger(req.query, 'limit'),
|
||||
debug: parseBoolean(req.query, 'debug')
|
||||
};
|
||||
|
||||
const searchParams = {};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const noteTypes = require("../services/note_types");
|
||||
const noteTypeService = require("../services/note_types");
|
||||
|
||||
function mandatory(obj) {
|
||||
if (obj === undefined ) {
|
||||
@@ -16,7 +16,7 @@ function isString(obj) {
|
||||
if (obj === undefined || obj === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (typeof obj !== 'string') {
|
||||
return `'${obj}' is not a string`;
|
||||
}
|
||||
@@ -26,7 +26,7 @@ function isBoolean(obj) {
|
||||
if (obj === undefined || obj === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (typeof obj !== 'boolean') {
|
||||
return `'${obj}' is not a boolean`;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ function isInteger(obj) {
|
||||
if (obj === undefined || obj === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!Number.isInteger(obj)) {
|
||||
return `'${obj}' is not an integer`;
|
||||
}
|
||||
@@ -46,13 +46,13 @@ function isNoteId(obj) {
|
||||
if (obj === undefined || obj === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const becca = require('../becca/becca');
|
||||
|
||||
|
||||
if (typeof obj !== 'string') {
|
||||
return `'${obj}' is not a valid noteId`;
|
||||
}
|
||||
|
||||
|
||||
if (!(obj in becca.notes)) {
|
||||
return `Note '${obj}' does not exist`;
|
||||
}
|
||||
@@ -63,8 +63,10 @@ function isNoteType(obj) {
|
||||
return;
|
||||
}
|
||||
|
||||
const noteTypes = noteTypeService.getNoteTypeNames();
|
||||
|
||||
if (!noteTypes.includes(obj)) {
|
||||
return `'${obj}' is not a valid note type, allowed types are: ` + noteTypes.join(", ");
|
||||
return `'${obj}' is not a valid note type, allowed types are: ${noteTypes.join(", ")}`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,8 +84,8 @@ function isValidEntityId(obj) {
|
||||
if (obj === undefined || obj === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof obj !== 'string' || !/^[A-Za-z0-9]{4,32}$/.test(obj)) {
|
||||
|
||||
if (typeof obj !== 'string' || !/^[A-Za-z0-9_]{4,128}$/.test(obj)) {
|
||||
return `'${obj}' is not a valid entityId. Only alphanumeric characters are allowed of length 4 to 32.`;
|
||||
}
|
||||
}
|
||||
@@ -98,4 +100,4 @@ module.exports = {
|
||||
isNoteType,
|
||||
isAttributeType,
|
||||
isValidEntityId
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
import froca from "./froca.js";
|
||||
import bundleService from "./bundle.js";
|
||||
import froca from "../services/froca.js";
|
||||
import bundleService from "../services/bundle.js";
|
||||
import RootCommandExecutor from "./root_command_executor.js";
|
||||
import Entrypoints from "./entrypoints.js";
|
||||
import options from "./options.js";
|
||||
import utils from "./utils.js";
|
||||
import zoomService from "./zoom.js";
|
||||
import options from "../services/options.js";
|
||||
import utils from "../services/utils.js";
|
||||
import zoomComponent from "./zoom.js";
|
||||
import TabManager from "./tab_manager.js";
|
||||
import treeService from "./tree.js";
|
||||
import Component from "../widgets/component.js";
|
||||
import keyboardActionsService from "./keyboard_actions.js";
|
||||
import MobileScreenSwitcherExecutor from "../widgets/mobile_widgets/mobile_screen_switcher.js";
|
||||
import treeService from "../services/tree.js";
|
||||
import Component from "./component.js";
|
||||
import keyboardActionsService from "../services/keyboard_actions.js";
|
||||
import MobileScreenSwitcherExecutor from "./mobile_screen_switcher.js";
|
||||
import MainTreeExecutors from "./main_tree_executors.js";
|
||||
import toast from "./toast.js";
|
||||
import toast from "../services/toast.js";
|
||||
import ShortcutComponent from "./shortcut_component.js";
|
||||
|
||||
class AppContext extends Component {
|
||||
constructor(isMainWindow) {
|
||||
super();
|
||||
|
||||
this.isMainWindow = isMainWindow;
|
||||
this.executors = [];
|
||||
// non-widget/layout components needed for the application
|
||||
this.components = [];
|
||||
this.beforeUnloadListeners = [];
|
||||
}
|
||||
|
||||
@@ -27,16 +29,45 @@ class AppContext extends Component {
|
||||
}
|
||||
|
||||
async start() {
|
||||
await Promise.all([froca.initializedPromise, options.initializedPromise]);
|
||||
this.initComponents();
|
||||
|
||||
this.showWidgets();
|
||||
// options are often needed for isEnabled()
|
||||
await options.initializedPromise;
|
||||
|
||||
this.renderWidgets();
|
||||
|
||||
await froca.initializedPromise;
|
||||
|
||||
this.tabManager.loadTabs();
|
||||
|
||||
setTimeout(() => bundleService.executeStartupBundles(), 2000);
|
||||
}
|
||||
|
||||
showWidgets() {
|
||||
initComponents() {
|
||||
this.tabManager = new TabManager();
|
||||
|
||||
this.components = [
|
||||
this.tabManager,
|
||||
new RootCommandExecutor(),
|
||||
new Entrypoints(),
|
||||
new MainTreeExecutors(),
|
||||
new ShortcutComponent()
|
||||
];
|
||||
|
||||
if (utils.isMobile()) {
|
||||
this.components.push(new MobileScreenSwitcherExecutor());
|
||||
}
|
||||
|
||||
for (const component of this.components) {
|
||||
this.child(component);
|
||||
}
|
||||
|
||||
if (utils.isElectron()) {
|
||||
this.child(zoomComponent);
|
||||
}
|
||||
}
|
||||
|
||||
renderWidgets() {
|
||||
const rootWidget = this.layout.getRootWidget(this);
|
||||
const $renderedWidget = rootWidget.render();
|
||||
|
||||
@@ -52,29 +83,8 @@ class AppContext extends Component {
|
||||
component.triggerCommand(commandName, {$el: $(this)});
|
||||
});
|
||||
|
||||
this.tabManager = new TabManager();
|
||||
|
||||
this.executors = [
|
||||
this.tabManager,
|
||||
new RootCommandExecutor(),
|
||||
new Entrypoints(),
|
||||
new MainTreeExecutors()
|
||||
];
|
||||
|
||||
if (utils.isMobile()) {
|
||||
this.executors.push(new MobileScreenSwitcherExecutor());
|
||||
}
|
||||
|
||||
this.child(rootWidget);
|
||||
|
||||
for (const executor of this.executors) {
|
||||
this.child(executor);
|
||||
}
|
||||
|
||||
if (utils.isElectron()) {
|
||||
this.child(zoomService);
|
||||
}
|
||||
|
||||
this.triggerEvent('initialRenderComplete');
|
||||
}
|
||||
|
||||
@@ -85,8 +95,8 @@ class AppContext extends Component {
|
||||
|
||||
/** @returns {Promise} */
|
||||
triggerCommand(name, data = {}) {
|
||||
for (const executor of this.executors) {
|
||||
const fun = executor[name + "Command"];
|
||||
for (const executor of this.components) {
|
||||
const fun = executor[`${name}Command`];
|
||||
|
||||
if (fun) {
|
||||
return executor.callMethod(fun, data);
|
||||
@@ -143,19 +153,11 @@ $(window).on('beforeunload', () => {
|
||||
}
|
||||
});
|
||||
|
||||
function isNotePathInAddress() {
|
||||
const [notePath, ntxId] = treeService.getHashValueFromAddress();
|
||||
|
||||
return notePath.startsWith("root")
|
||||
// empty string is for empty/uninitialized tab
|
||||
|| (notePath === '' && !!ntxId);
|
||||
}
|
||||
|
||||
$(window).on('hashchange', function() {
|
||||
if (isNotePathInAddress()) {
|
||||
if (treeService.isNotePathInAddress()) {
|
||||
const [notePath, ntxId] = treeService.getHashValueFromAddress();
|
||||
|
||||
if (!notePath) {
|
||||
if (!notePath && !ntxId) {
|
||||
console.log(`Invalid hash value "${document.location.hash}", ignoring.`);
|
||||
return;
|
||||
}
|
||||
@@ -13,7 +13,7 @@ import utils from '../services/utils.js';
|
||||
*/
|
||||
export default class Component {
|
||||
constructor() {
|
||||
this.componentId = `comp-` + this.sanitizedClassName + '-' + utils.randomString(8);
|
||||
this.componentId = `${this.sanitizedClassName}-${utils.randomString(8)}`;
|
||||
/** @type Component[] */
|
||||
this.children = [];
|
||||
this.initialized = null;
|
||||
@@ -42,16 +42,23 @@ export default class Component {
|
||||
|
||||
/** @returns {Promise} */
|
||||
handleEvent(name, data) {
|
||||
const callMethodPromise = this.initialized
|
||||
? this.initialized.then(() => this.callMethod(this[name + 'Event'], data))
|
||||
: this.callMethod(this[name + 'Event'], data);
|
||||
try {
|
||||
const callMethodPromise = this.initialized
|
||||
? this.initialized.then(() => this.callMethod(this[`${name}Event`], data))
|
||||
: this.callMethod(this[`${name}Event`], data);
|
||||
|
||||
const childrenPromise = this.handleEventInChildren(name, data);
|
||||
const childrenPromise = this.handleEventInChildren(name, data);
|
||||
|
||||
// don't create promises if not needed (optimization)
|
||||
return callMethodPromise && childrenPromise
|
||||
? Promise.all([callMethodPromise, childrenPromise])
|
||||
: (callMethodPromise || childrenPromise);
|
||||
// don't create promises if not needed (optimization)
|
||||
return callMethodPromise && childrenPromise
|
||||
? Promise.all([callMethodPromise, childrenPromise])
|
||||
: (callMethodPromise || childrenPromise);
|
||||
}
|
||||
catch (e) {
|
||||
console.error(`Handling of event '${name}' failed in ${this.constructor.name} with error ${e.message} ${e.stack}`);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** @returns {Promise} */
|
||||
@@ -77,7 +84,7 @@ export default class Component {
|
||||
|
||||
/** @returns {Promise} */
|
||||
triggerCommand(name, data = {}) {
|
||||
const fun = this[name + 'Command'];
|
||||
const fun = this[`${name}Command`];
|
||||
|
||||
if (fun) {
|
||||
return this.callMethod(fun, data);
|
||||
@@ -1,13 +1,13 @@
|
||||
import utils from "./utils.js";
|
||||
import dateNoteService from "./date_notes.js";
|
||||
import protectedSessionHolder from './protected_session_holder.js';
|
||||
import server from "./server.js";
|
||||
import utils from "../services/utils.js";
|
||||
import dateNoteService from "../services/date_notes.js";
|
||||
import protectedSessionHolder from '../services/protected_session_holder.js';
|
||||
import server from "../services/server.js";
|
||||
import appContext from "./app_context.js";
|
||||
import Component from "../widgets/component.js";
|
||||
import toastService from "./toast.js";
|
||||
import ws from "./ws.js";
|
||||
import bundleService from "./bundle.js";
|
||||
import froca from "./froca.js";
|
||||
import Component from "./component.js";
|
||||
import toastService from "../services/toast.js";
|
||||
import ws from "../services/ws.js";
|
||||
import bundleService from "../services/bundle.js";
|
||||
import froca from "../services/froca.js";
|
||||
|
||||
export default class Entrypoints extends Component {
|
||||
constructor() {
|
||||
@@ -38,11 +38,7 @@ export default class Entrypoints extends Component {
|
||||
|
||||
await ws.waitForMaxKnownEntityChangeId();
|
||||
|
||||
const hoistedNoteId = appContext.tabManager.getActiveContext()
|
||||
? appContext.tabManager.getActiveContext().hoistedNoteId
|
||||
: 'root';
|
||||
|
||||
await appContext.tabManager.openContextWithNote(note.noteId, true, null, hoistedNoteId);
|
||||
await appContext.tabManager.openTabWithNoteWithHoisting(note.noteId, true);
|
||||
|
||||
appContext.triggerEvent('focusAndSelectTitle', {isNewNote: true});
|
||||
}
|
||||
@@ -86,11 +82,7 @@ export default class Entrypoints extends Component {
|
||||
if (win.isFullScreenable()) {
|
||||
win.setFullScreen(!win.isFullScreen());
|
||||
}
|
||||
}
|
||||
else {
|
||||
// outside of electron this is handled by the browser
|
||||
this.$widget.find(".toggle-fullscreen-button").hide();
|
||||
}
|
||||
} // outside of electron this is handled by the browser
|
||||
}
|
||||
|
||||
reloadFrontendAppCommand() {
|
||||
@@ -99,7 +91,7 @@ export default class Entrypoints extends Component {
|
||||
|
||||
logoutCommand() {
|
||||
const $logoutForm = $('<form action="logout" method="POST">')
|
||||
.append($(`<input type="hidden" name="_csrf" value="${glob.csrfToken}"/>`));
|
||||
.append($(`<input type='_hidden' name="_csrf" value="${glob.csrfToken}"/>`));
|
||||
|
||||
$("body").append($logoutForm);
|
||||
$logoutForm.trigger('submit');
|
||||
@@ -154,7 +146,7 @@ export default class Entrypoints extends Component {
|
||||
ipcRenderer.send('create-extra-window', {notePath, hoistedNoteId});
|
||||
}
|
||||
else {
|
||||
const url = window.location.protocol + '//' + window.location.host + window.location.pathname + '?extra=1#' + notePath;
|
||||
const url = `${window.location.protocol}//${window.location.host}${window.location.pathname}?extra=1#${notePath}`;
|
||||
|
||||
window.open(url, '', 'width=1000,height=800');
|
||||
}
|
||||
@@ -176,12 +168,12 @@ export default class Entrypoints extends Component {
|
||||
if (note.mime.endsWith("env=frontend")) {
|
||||
await bundleService.getAndExecuteBundle(note.noteId);
|
||||
} else if (note.mime.endsWith("env=backend")) {
|
||||
await server.post('script/run/' + note.noteId);
|
||||
await server.post(`script/run/${note.noteId}`);
|
||||
} else if (note.mime === 'text/x-sqlite;schema=trilium') {
|
||||
const resp = await server.post("sql/execute/" + note.noteId);
|
||||
const resp = await server.post(`sql/execute/${note.noteId}`);
|
||||
|
||||
if (!resp.success) {
|
||||
toastService.showError("Error occurred while executing SQL query: " + resp.message);
|
||||
toastService.showError(`Error occurred while executing SQL query: ${resp.message}`);
|
||||
}
|
||||
|
||||
await appContext.triggerEvent('sqlQueryResults', {ntxId: ntxId, results: resp.results});
|
||||
@@ -190,16 +182,20 @@ export default class Entrypoints extends Component {
|
||||
toastService.showMessage("Note executed");
|
||||
}
|
||||
|
||||
hideAllTooltips() {
|
||||
hideAllPopups() {
|
||||
$(".tooltip").removeClass("show");
|
||||
|
||||
if (utils.isDesktop()) {
|
||||
$(".aa-input").autocomplete("close");
|
||||
}
|
||||
}
|
||||
|
||||
noteSwitchedEvent() {
|
||||
this.hideAllTooltips();
|
||||
this.hideAllPopups();
|
||||
}
|
||||
|
||||
activeContextChangedEvent() {
|
||||
this.hideAllTooltips();
|
||||
this.hideAllPopups();
|
||||
}
|
||||
|
||||
async forceSaveNoteRevisionCommand() {
|
||||
@@ -1,8 +1,8 @@
|
||||
import appContext from "./app_context.js";
|
||||
import noteCreateService from "./note_create.js";
|
||||
import treeService from "./tree.js";
|
||||
import hoistedNoteService from "./hoisted_note.js";
|
||||
import Component from "../widgets/component.js";
|
||||
import noteCreateService from "../services/note_create.js";
|
||||
import treeService from "../services/tree.js";
|
||||
import hoistedNoteService from "../services/hoisted_note.js";
|
||||
import Component from "./component.js";
|
||||
|
||||
/**
|
||||
* This class contains command executors which logically belong to the NoteTree widget, but for better user experience
|
||||
@@ -11,7 +11,7 @@ import Component from "../widgets/component.js";
|
||||
*/
|
||||
export default class MainTreeExecutors extends Component {
|
||||
get tree() {
|
||||
return appContext.mainTreeWidget;
|
||||
return appContext.noteTreeWidget;
|
||||
}
|
||||
|
||||
async cloneNotesToCommand() {
|
||||
@@ -1,15 +1,18 @@
|
||||
import Component from "../component.js";
|
||||
import Component from "./component.js";
|
||||
import appContext from "./app_context.js";
|
||||
|
||||
export default class MobileScreenSwitcherExecutor extends Component {
|
||||
setActiveScreenCommand({screen}) {
|
||||
if (screen !== this.activeScreen) {
|
||||
this.activeScreen = screen;
|
||||
|
||||
if (screen === 'tree') {
|
||||
const activeNoteContext = appContext.tabManager.getActiveContext();
|
||||
|
||||
activeNoteContext.setEmpty();
|
||||
}
|
||||
|
||||
this.triggerEvent('activeScreenChanged', {activeScreen: screen});
|
||||
}
|
||||
}
|
||||
|
||||
initialRenderCompleteEvent() {
|
||||
this.setActiveScreenCommand({screen: 'tree'});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
import protectedSessionHolder from "./protected_session_holder.js";
|
||||
import server from "./server.js";
|
||||
import utils from "./utils.js";
|
||||
import protectedSessionHolder from "../services/protected_session_holder.js";
|
||||
import server from "../services/server.js";
|
||||
import utils from "../services/utils.js";
|
||||
import appContext from "./app_context.js";
|
||||
import treeService from "./tree.js";
|
||||
import Component from "../widgets/component.js";
|
||||
import froca from "./froca.js";
|
||||
import hoistedNoteService from "./hoisted_note.js";
|
||||
import options from "./options.js";
|
||||
import treeService from "../services/tree.js";
|
||||
import Component from "./component.js";
|
||||
import froca from "../services/froca.js";
|
||||
import hoistedNoteService from "../services/hoisted_note.js";
|
||||
import options from "../services/options.js";
|
||||
|
||||
class NoteContext extends Component {
|
||||
/**
|
||||
@@ -24,7 +24,7 @@ class NoteContext extends Component {
|
||||
this.notePath = null;
|
||||
this.noteId = null;
|
||||
this.parentNoteId = null;
|
||||
this.hoistedNoteId = 'root';
|
||||
// hoisted note is kept intentionally
|
||||
|
||||
this.triggerEvent('noteSwitched', {
|
||||
noteContext: this,
|
||||
@@ -32,6 +32,10 @@ class NoteContext extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
isEmpty() {
|
||||
return !this.noteId;
|
||||
}
|
||||
|
||||
async setNote(inputNotePath, triggerSwitchEvent = true) {
|
||||
const resolvedNotePath = await this.getResolvedNotePath(inputNotePath);
|
||||
|
||||
@@ -59,9 +63,25 @@ class NoteContext extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
if (utils.isDesktop()) {
|
||||
// close dangling autocompletes after closing the tab
|
||||
$(".aa-input").autocomplete("close");
|
||||
if (this.hoistedNoteId === 'root'
|
||||
&& this.notePath.startsWith("root/_hidden")
|
||||
&& !this.note.hasLabel("keepCurrentHoisting")
|
||||
) {
|
||||
// hidden subtree displays only when hoisted, so it doesn't make sense to keep root as hoisted note
|
||||
|
||||
let hoistedNoteId = '_hidden';
|
||||
|
||||
if (this.note.isLaunchBarConfig()) {
|
||||
hoistedNoteId = '_lbRoot';
|
||||
} else if (this.note.isOptions()) {
|
||||
hoistedNoteId = '_options';
|
||||
}
|
||||
|
||||
await this.setHoistedNoteId(hoistedNoteId);
|
||||
}
|
||||
|
||||
if (utils.isMobile()) {
|
||||
this.triggerCommand('setActiveScreen', {screen: 'detail'});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +168,8 @@ class NoteContext extends Component {
|
||||
}
|
||||
|
||||
getTabState() {
|
||||
if (!this.notePath) {
|
||||
if (!this.notePath && this.hoistedNoteId === 'root') {
|
||||
// keeping empty hoisted tab is esp. important for mobile (e.g. opened launcher config)
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -166,9 +187,13 @@ class NoteContext extends Component {
|
||||
}
|
||||
|
||||
async setHoistedNoteId(noteIdToHoist) {
|
||||
if (this.hoistedNoteId === noteIdToHoist) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.hoistedNoteId = noteIdToHoist;
|
||||
|
||||
if (!this.notePathArray?.includes(noteIdToHoist)) {
|
||||
if (!this.notePathArray?.includes(noteIdToHoist) && !utils.isMobile()) {
|
||||
await this.setNote(noteIdToHoist);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import Component from "../widgets/component.js";
|
||||
import Component from "./component.js";
|
||||
import appContext from "./app_context.js";
|
||||
import dateNoteService from "../services/date_notes.js";
|
||||
import treeService from "../services/tree.js";
|
||||
import openService from "./open.js";
|
||||
import protectedSessionService from "./protected_session.js";
|
||||
import options from "./options.js";
|
||||
import froca from "./froca.js";
|
||||
import openService from "../services/open.js";
|
||||
import protectedSessionService from "../services/protected_session.js";
|
||||
import options from "../services/options.js";
|
||||
import froca from "../services/froca.js";
|
||||
|
||||
export default class RootCommandExecutor extends Component {
|
||||
editReadOnlyNoteCommand() {
|
||||
@@ -46,7 +46,7 @@ export default class RootCommandExecutor extends Component {
|
||||
openNoteExternallyCommand() {
|
||||
const noteId = appContext.tabManager.getActiveContextNoteId();
|
||||
const mime = appContext.tabManager.getActiveContextNoteMime()
|
||||
|
||||
|
||||
if (noteId) {
|
||||
openService.openNoteExternally(noteId, mime);
|
||||
}
|
||||
@@ -71,4 +71,36 @@ export default class RootCommandExecutor extends Component {
|
||||
toggleLeftPaneCommand() {
|
||||
options.toggle('leftPaneVisible');
|
||||
}
|
||||
|
||||
async showBackendLogCommand() {
|
||||
await appContext.tabManager.openContextWithNote('_backendLog', true);
|
||||
}
|
||||
|
||||
async showLaunchBarSubtreeCommand() {
|
||||
await this.showAndHoistSubtree('_lbRoot');
|
||||
}
|
||||
|
||||
async showShareSubtreeCommand() {
|
||||
await this.showAndHoistSubtree('_share');
|
||||
}
|
||||
|
||||
async showHiddenSubtreeCommand() {
|
||||
await this.showAndHoistSubtree('_hidden');
|
||||
}
|
||||
|
||||
async showOptionsCommand() {
|
||||
await this.showAndHoistSubtree('_options');
|
||||
}
|
||||
|
||||
async showSQLConsoleHistoryCommand() {
|
||||
await this.showAndHoistSubtree('_sqlConsole');
|
||||
}
|
||||
|
||||
async showSearchHistoryCommand() {
|
||||
await this.showAndHoistSubtree('_search');
|
||||
}
|
||||
|
||||
async showAndHoistSubtree(subtreeNoteId) {
|
||||
await appContext.tabManager.openContextWithNote(subtreeNoteId, true, null, subtreeNoteId);
|
||||
}
|
||||
}
|
||||
40
src/public/app/components/shortcut_component.js
Normal file
40
src/public/app/components/shortcut_component.js
Normal file
@@ -0,0 +1,40 @@
|
||||
import appContext from "./app_context.js";
|
||||
import shortcutService from "../services/shortcuts.js";
|
||||
import server from "../services/server.js";
|
||||
import Component from "./component.js";
|
||||
import froca from "../services/froca.js";
|
||||
|
||||
export default class ShortcutComponent extends Component {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
server.get('keyboard-shortcuts-for-notes').then(shortcutAttributes => {
|
||||
for (const attr of shortcutAttributes) {
|
||||
this.bindNoteShortcutHandler(attr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
bindNoteShortcutHandler(label) {
|
||||
const handler = () => appContext.tabManager.getActiveContext().setNote(label.noteId);
|
||||
const namespace = label.attributeId;
|
||||
|
||||
if (label.isDeleted) {
|
||||
shortcutService.removeGlobalShortcut(namespace);
|
||||
} else {
|
||||
shortcutService.bindGlobalShortcut(label.value, handler, namespace);
|
||||
}
|
||||
}
|
||||
|
||||
async entitiesReloadedEvent({loadResults}) {
|
||||
for (const attr of loadResults.getAttributes()) {
|
||||
if (attr.type === 'label' && attr.name === 'keyboardShortcut') {
|
||||
const note = await froca.getNote(attr.noteId);
|
||||
// launcher shortcuts are handled specifically
|
||||
if (note && note.type !== 'launcher') {
|
||||
this.bindNoteShortcutHandler(attr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
import Component from "../widgets/component.js";
|
||||
import SpacedUpdate from "./spaced_update.js";
|
||||
import server from "./server.js";
|
||||
import options from "./options.js";
|
||||
import froca from "./froca.js";
|
||||
import treeService from "./tree.js";
|
||||
import utils from "./utils.js";
|
||||
import Component from "./component.js";
|
||||
import SpacedUpdate from "../services/spaced_update.js";
|
||||
import server from "../services/server.js";
|
||||
import options from "../services/options.js";
|
||||
import froca from "../services/froca.js";
|
||||
import treeService from "../services/tree.js";
|
||||
import utils from "../services/utils.js";
|
||||
import NoteContext from "./note_context.js";
|
||||
import appContext from "./app_context.js";
|
||||
import Mutex from "../utils/mutex.js";
|
||||
@@ -48,69 +48,72 @@ export default class TabManager extends Component {
|
||||
}
|
||||
|
||||
async loadTabs() {
|
||||
const tabsToOpen = appContext.isMainWindow
|
||||
? (options.getJson('openTabs') || [])
|
||||
: [];
|
||||
try {
|
||||
const tabsToOpen = appContext.isMainWindow
|
||||
? (options.getJson('openTabs') || [])
|
||||
: [];
|
||||
|
||||
// if there's notePath in the URL, make sure it's open and active
|
||||
// (useful, among others, for opening clipped notes from clipper)
|
||||
if (window.location.hash) {
|
||||
const notePath = window.location.hash.substr(1);
|
||||
const noteId = treeService.getNoteIdFromNotePath(notePath);
|
||||
let filteredTabs = [];
|
||||
|
||||
if (noteId && await froca.noteExists(noteId)) {
|
||||
for (const tab of tabsToOpen) {
|
||||
tab.active = false;
|
||||
// preload all notes at once
|
||||
await froca.getNotes([
|
||||
...tabsToOpen.map(tab => treeService.getNoteIdFromNotePath(tab.notePath)),
|
||||
...tabsToOpen.map(tab => tab.hoistedNoteId),
|
||||
], true);
|
||||
|
||||
for (const openTab of tabsToOpen) {
|
||||
if (openTab.notePath && !(treeService.getNoteIdFromNotePath(openTab.notePath) in froca.notes)) {
|
||||
// note doesn't exist so don't try to open tab for it
|
||||
continue;
|
||||
}
|
||||
|
||||
const foundTab = tabsToOpen.find(tab => noteId === treeService.getNoteIdFromNotePath(tab.notePath));
|
||||
|
||||
if (foundTab) {
|
||||
foundTab.active = true;
|
||||
if (!(openTab.hoistedNoteId in froca.notes)) {
|
||||
openTab.hoistedNoteId = 'root';
|
||||
}
|
||||
else {
|
||||
tabsToOpen.push({
|
||||
notePath: notePath,
|
||||
active: true,
|
||||
hoistedNoteId: glob.extraHoistedNoteId || 'root'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let filteredTabs = [];
|
||||
|
||||
for (const openTab of tabsToOpen) {
|
||||
const noteId = treeService.getNoteIdFromNotePath(openTab.notePath);
|
||||
|
||||
if (await froca.noteExists(noteId)) {
|
||||
// note doesn't exist so don't try to open tab for it
|
||||
filteredTabs.push(openTab);
|
||||
}
|
||||
}
|
||||
|
||||
if (utils.isMobile()) {
|
||||
// mobile frontend doesn't have tabs so show only the active tab
|
||||
filteredTabs = filteredTabs.filter(tab => tab.active);
|
||||
}
|
||||
|
||||
if (filteredTabs.length === 0) {
|
||||
filteredTabs.push({
|
||||
notePath: this.isMainWindow ? 'root' : '',
|
||||
active: true,
|
||||
extraHoistedNoteId: glob.extraHoistedNoteId || 'root'
|
||||
});
|
||||
}
|
||||
|
||||
if (!filteredTabs.find(tab => tab.active)) {
|
||||
filteredTabs[0].active = true;
|
||||
}
|
||||
|
||||
await this.tabsUpdate.allowUpdateWithoutChange(async () => {
|
||||
for (const tab of filteredTabs) {
|
||||
await this.openContextWithNote(tab.notePath, tab.active, tab.ntxId, tab.hoistedNoteId, tab.mainNtxId);
|
||||
if (utils.isMobile()) {
|
||||
// mobile frontend doesn't have tabs so show only the active tab
|
||||
filteredTabs = filteredTabs.filter(tab => tab.active);
|
||||
}
|
||||
});
|
||||
|
||||
if (filteredTabs.length === 0) {
|
||||
const [notePath] = treeService.getHashValueFromAddress();
|
||||
|
||||
filteredTabs.push({
|
||||
notePath: notePath || 'root',
|
||||
active: true,
|
||||
hoistedNoteId: glob.extraHoistedNoteId || 'root'
|
||||
});
|
||||
}
|
||||
|
||||
if (!filteredTabs.find(tab => tab.active)) {
|
||||
filteredTabs[0].active = true;
|
||||
}
|
||||
|
||||
await this.tabsUpdate.allowUpdateWithoutChange(async () => {
|
||||
for (const tab of filteredTabs) {
|
||||
|
||||
await this.openContextWithNote(tab.notePath, tab.active, tab.ntxId, tab.hoistedNoteId, tab.mainNtxId);
|
||||
}
|
||||
});
|
||||
|
||||
// if there's notePath in the URL, make sure it's open and active
|
||||
// (useful, for e.g. opening clipped notes from clipper or opening link in an extra window)
|
||||
if (treeService.isNotePathInAddress()) {
|
||||
const [notePath, ntxId] = treeService.getHashValueFromAddress();
|
||||
|
||||
await appContext.tabManager.switchToNoteContext(ntxId, notePath);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
logError(`Loading tabs '${options.get('openTabs')}' failed: ${e.message} ${e.stack}`);
|
||||
|
||||
// try to recover
|
||||
await this.openEmptyTab();
|
||||
}
|
||||
}
|
||||
|
||||
noteSwitchedEvent({noteContext}) {
|
||||
@@ -126,7 +129,7 @@ export default class TabManager extends Component {
|
||||
|
||||
if (window.history.length === 0 // first history entry
|
||||
|| (activeNoteContext && activeNoteContext.notePath !== treeService.getHashValueFromAddress()[0])) {
|
||||
const url = '#' + (activeNoteContext.notePath || "") + "-" + activeNoteContext.ntxId;
|
||||
const url = `#${activeNoteContext.notePath || ""}-${activeNoteContext.ntxId}`;
|
||||
|
||||
// using pushState instead of directly modifying document.location because it does not trigger hashchange
|
||||
window.history.pushState(null, "", url);
|
||||
@@ -208,8 +211,11 @@ export default class TabManager extends Component {
|
||||
const noteContext = this.noteContexts.find(nc => nc.ntxId === ntxId)
|
||||
|| await this.openEmptyTab();
|
||||
|
||||
this.activateNoteContext(noteContext.ntxId);
|
||||
await noteContext.setNote(notePath);
|
||||
await this.activateNoteContext(noteContext.ntxId);
|
||||
|
||||
if (notePath) {
|
||||
await noteContext.setNote(notePath);
|
||||
}
|
||||
}
|
||||
|
||||
async openAndActivateEmptyTab() {
|
||||
@@ -223,9 +229,19 @@ export default class TabManager extends Component {
|
||||
async openEmptyTab(ntxId = null, hoistedNoteId = 'root', mainNtxId = null) {
|
||||
const noteContext = new NoteContext(ntxId, hoistedNoteId, mainNtxId);
|
||||
|
||||
const existingNoteContext = this.children.find(nc => nc.ntxId === noteContext.ntxId);
|
||||
let existingNoteContext;
|
||||
|
||||
if (utils.isMobile()) {
|
||||
// kind of hacky way to enforce a single tab on mobile interface - all requests to create a new one
|
||||
// are forced to reuse the existing ab instead
|
||||
existingNoteContext = this.getActiveContext();
|
||||
} else {
|
||||
existingNoteContext = this.children.find(nc => nc.ntxId === noteContext.ntxId);
|
||||
}
|
||||
|
||||
if (existingNoteContext) {
|
||||
await existingNoteContext.setHoistedNoteId(hoistedNoteId);
|
||||
|
||||
return existingNoteContext;
|
||||
}
|
||||
|
||||
@@ -236,6 +252,18 @@ export default class TabManager extends Component {
|
||||
return noteContext;
|
||||
}
|
||||
|
||||
async openInNewTab(targetNoteId, hoistedNoteId = null) {
|
||||
const noteContext = await this.openEmptyTab(null, hoistedNoteId || this.getActiveContext().hoistedNoteId);
|
||||
|
||||
await noteContext.setNote(targetNoteId);
|
||||
}
|
||||
|
||||
async openInSameTab(targetNoteId, hoistedNoteId = null) {
|
||||
const activeContext = this.getActiveContext();
|
||||
await activeContext.setHoistedNoteId(hoistedNoteId || activeContext.hoistedNoteId);
|
||||
await activeContext.setNote(targetNoteId);
|
||||
}
|
||||
|
||||
/**
|
||||
* If the requested notePath is within current note hoisting scope then keep the note hoisting also for the new tab.
|
||||
*/
|
||||
@@ -246,7 +274,7 @@ export default class TabManager extends Component {
|
||||
if (noteContext) {
|
||||
const resolvedNotePath = await treeService.resolveNotePath(notePath, noteContext.hoistedNoteId);
|
||||
|
||||
if (resolvedNotePath.includes(noteContext.hoistedNoteId) || resolvedNotePath.includes("hidden")) {
|
||||
if (resolvedNotePath.includes(noteContext.hoistedNoteId) || resolvedNotePath.includes('_hidden')) {
|
||||
hoistedNoteId = noteContext.hoistedNoteId;
|
||||
}
|
||||
}
|
||||
@@ -324,14 +352,16 @@ export default class TabManager extends Component {
|
||||
}
|
||||
|
||||
if (noteContextToRemove.isMainContext()) {
|
||||
// forbid removing last main note context
|
||||
// this was previously allowed (was replaced with empty tab) but this proved to be prone to race conditions
|
||||
const mainNoteContexts = this.getNoteContexts().filter(nc => nc.isMainContext());
|
||||
|
||||
if (mainNoteContexts.length === 1) {
|
||||
await this.clearLastMainNoteContext(noteContextToRemove);
|
||||
if (noteContextToRemove.isEmpty()) {
|
||||
// this is already the empty note context, no point in closing it and replacing with another
|
||||
// empty tab
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
await this.openEmptyTab();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,35 +396,26 @@ export default class TabManager extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
async clearLastMainNoteContext(noteContextToClear) {
|
||||
noteContextToClear.setEmpty();
|
||||
|
||||
// activate main split
|
||||
await this.activateNoteContext(noteContextToClear.ntxId);
|
||||
|
||||
// remove all other splits
|
||||
const noteContextsToRemove = noteContextToClear.getSubContexts()
|
||||
.filter(ntx => ntx.ntxId !== noteContextToClear.ntxId);
|
||||
|
||||
const ntxIdsToRemove = noteContextsToRemove.map(ntx => ntx.ntxId);
|
||||
|
||||
await this.triggerEvent('beforeNoteContextRemove', {ntxIds: ntxIdsToRemove});
|
||||
|
||||
this.removeNoteContexts(noteContextsToRemove);
|
||||
}
|
||||
|
||||
removeNoteContexts(noteContextsToRemove) {
|
||||
const ntxIdsToRemove = noteContextsToRemove.map(nc => nc.ntxId);
|
||||
|
||||
this.children = this.children.filter(nc => !ntxIdsToRemove.includes(nc.ntxId));
|
||||
|
||||
this.recentlyClosedTabs.push(noteContextsToRemove);
|
||||
this.addToRecentlyClosedTabs(noteContextsToRemove);
|
||||
|
||||
this.triggerEvent('noteContextRemoved', {ntxIds: ntxIdsToRemove});
|
||||
|
||||
this.tabsUpdate.scheduleUpdate();
|
||||
}
|
||||
|
||||
addToRecentlyClosedTabs(noteContexts) {
|
||||
if (noteContexts.length === 1 && noteContexts[0].isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.recentlyClosedTabs.push(noteContexts);
|
||||
}
|
||||
|
||||
tabReorderEvent({ntxIdsInOrder}) {
|
||||
const order = {};
|
||||
|
||||
@@ -456,13 +477,13 @@ export default class TabManager extends Component {
|
||||
this.openAndActivateEmptyTab();
|
||||
}
|
||||
|
||||
async removeAllTabsCommand() {
|
||||
async closeAllTabsCommand() {
|
||||
for (const ntxIdToRemove of this.mainNoteContexts.map(nc => nc.ntxId)) {
|
||||
await this.removeNoteContext(ntxIdToRemove);
|
||||
}
|
||||
}
|
||||
|
||||
async removeAllTabsExceptForThisCommand({ntxId}) {
|
||||
async closeOtherTabsCommand({ntxId}) {
|
||||
for (const ntxIdToRemove of this.mainNoteContexts.map(nc => nc.ntxId)) {
|
||||
if (ntxIdToRemove !== ntxId) {
|
||||
await this.removeNoteContext(ntxIdToRemove);
|
||||
@@ -470,6 +491,10 @@ export default class TabManager extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
async closeTabCommand({ntxId}) {
|
||||
await this.removeNoteContext(ntxId);
|
||||
}
|
||||
|
||||
async moveTabToNewWindowCommand({ntxId}) {
|
||||
const {notePath, hoistedNoteId} = this.getNoteContextById(ntxId);
|
||||
|
||||
@@ -481,7 +506,18 @@ export default class TabManager extends Component {
|
||||
}
|
||||
|
||||
async reopenLastTabCommand() {
|
||||
if (this.recentlyClosedTabs.length > 0) {
|
||||
let closeLastEmptyTab = null;
|
||||
|
||||
await this.mutex.runExclusively(async () => {
|
||||
if (this.recentlyClosedTabs.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.noteContexts.length === 1 && this.noteContexts[0].isEmpty()) {
|
||||
// new empty tab is created after closing the last tab, this reverses the empty tab creation
|
||||
closeLastEmptyTab = this.noteContexts[0];
|
||||
}
|
||||
|
||||
const noteContexts = this.recentlyClosedTabs.pop();
|
||||
|
||||
for (const noteContext of noteContexts) {
|
||||
@@ -494,12 +530,16 @@ export default class TabManager extends Component {
|
||||
? noteContexts[0]
|
||||
: noteContexts.find(nc => nc.isMainContext());
|
||||
|
||||
this.activateNoteContext(noteContextToActivate.ntxId);
|
||||
await this.activateNoteContext(noteContextToActivate.ntxId);
|
||||
|
||||
await this.triggerEvent('noteSwitched', {
|
||||
noteContext: noteContextToActivate,
|
||||
notePath: noteContextToActivate.notePath
|
||||
});
|
||||
});
|
||||
|
||||
if (closeLastEmptyTab) {
|
||||
await this.removeNoteContext(closeLastEmptyTab.ntxId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import options from "./options.js";
|
||||
import Component from "../widgets/component.js";
|
||||
import options from "../services/options.js";
|
||||
import Component from "./component.js";
|
||||
import utils from "../services/utils.js";
|
||||
|
||||
const MIN_ZOOM = 0.5;
|
||||
const MAX_ZOOM = 2.0;
|
||||
|
||||
class ZoomService extends Component {
|
||||
class ZoomComponent extends Component {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
@@ -31,7 +31,7 @@ class ZoomService extends Component {
|
||||
|
||||
async setZoomFactorAndSave(zoomFactor) {
|
||||
if (zoomFactor >= MIN_ZOOM && zoomFactor <= MAX_ZOOM) {
|
||||
zoomFactor = Math.round(zoomFactor * 1000) / 1000;
|
||||
zoomFactor = Math.round(zoomFactor * 10) / 10;
|
||||
|
||||
this.setZoomFactor(zoomFactor);
|
||||
|
||||
@@ -59,6 +59,6 @@ class ZoomService extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
const zoomService = new ZoomService();
|
||||
const zoomService = new ZoomComponent();
|
||||
|
||||
export default zoomService;
|
||||
@@ -1,13 +1,18 @@
|
||||
import appContext from "./services/app_context.js";
|
||||
import appContext from "./components/app_context.js";
|
||||
import utils from './services/utils.js';
|
||||
import noteTooltipService from './services/note_tooltip.js';
|
||||
import bundleService from "./services/bundle.js";
|
||||
import noteAutocompleteService from './services/note_autocomplete.js';
|
||||
import macInit from './services/mac_init.js';
|
||||
import contextMenu from "./services/context_menu.js";
|
||||
import contextMenu from "./menus/context_menu.js";
|
||||
import DesktopLayout from "./layouts/desktop_layout.js";
|
||||
import glob from "./services/glob.js";
|
||||
import zoomService from './services/zoom.js';
|
||||
import zoomService from './components/zoom.js';
|
||||
|
||||
bundleService.getWidgetBundlesByParent().then(widgetBundles => {
|
||||
appContext.setLayout(new DesktopLayout(widgetBundles));
|
||||
appContext.start();
|
||||
});
|
||||
|
||||
glob.setupGlobs();
|
||||
|
||||
@@ -17,17 +22,8 @@ if (utils.isElectron()) {
|
||||
});
|
||||
}
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip({
|
||||
html: true
|
||||
});
|
||||
|
||||
macInit.init();
|
||||
|
||||
bundleService.getWidgetBundlesByParent().then(widgetBundles => {
|
||||
appContext.setLayout(new DesktopLayout(widgetBundles));
|
||||
appContext.start();
|
||||
});
|
||||
|
||||
noteTooltipService.setupGlobalTooltip();
|
||||
|
||||
noteAutocompleteService.init();
|
||||
@@ -116,7 +112,7 @@ if (utils.isElectron()) {
|
||||
|
||||
if (hasText) {
|
||||
const shortenedSelection = params.selectionText.length > 15
|
||||
? (params.selectionText.substr(0, 13) + "…")
|
||||
? (`${params.selectionText.substr(0, 13)}…`)
|
||||
: params.selectionText;
|
||||
|
||||
items.push({
|
||||
|
||||
3
src/public/app/doc_notes/hidden.html
Normal file
3
src/public/app/doc_notes/hidden.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<p>Hidden tree is used to record various application-level data which can stay most of the time hidden from the user view.</p>
|
||||
|
||||
<p>Make sure you know what you're doing. Incorrect changes in this subtree might potentially crash the application.</p>
|
||||
1
src/public/app/doc_notes/launchbar_command_launcher.html
Normal file
1
src/public/app/doc_notes/launchbar_command_launcher.html
Normal file
@@ -0,0 +1 @@
|
||||
<p>Keyboard launcher for this launcher action can be configured in Options -> Launchers.</p>
|
||||
@@ -0,0 +1,3 @@
|
||||
<p>Back and Forward buttons allow you to move in the navigation history.</p>
|
||||
|
||||
<p>These launchers are active only in the desktop build and will be ignored in the server edition where you can use the native browser navigation buttons instead.</p>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user