mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 01:18:44 +02:00
UI for search actions (WIP)
This commit is contained in:
parent
cb2361e9c4
commit
1f923403de
265
package-lock.json
generated
265
package-lock.json
generated
@ -874,6 +874,12 @@
|
||||
"@xtuc/long": "4.2.2"
|
||||
}
|
||||
},
|
||||
"@webpack-cli/configtest": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.0.tgz",
|
||||
"integrity": "sha512-Un0SdBoN1h4ACnIO7EiCjWuyhNI0Jl96JC+63q6xi4HDUYRZn8Auluea9D+v9NWKc5J4sICVEltdBaVjLX39xw==",
|
||||
"dev": true
|
||||
},
|
||||
"@webpack-cli/info": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.2.1.tgz",
|
||||
@ -884,9 +890,9 @@
|
||||
}
|
||||
},
|
||||
"@webpack-cli/serve": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.2.1.tgz",
|
||||
"integrity": "sha512-Zj1z6AyS+vqV6Hfi7ngCjFGdHV5EwZNIHo6QfFTNe9PyW+zBU1zJ9BiOW1pmUEq950RC4+Dym6flyA/61/vhyw==",
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.2.2.tgz",
|
||||
"integrity": "sha512-03GkWxcgFfm8+WIwcsqJb9agrSDNDDoxaNnexPnCCexP5SCE4IgFd9lNpSy+K2nFqVMpgTFw6SwbmVAVTndVew==",
|
||||
"dev": true
|
||||
},
|
||||
"@xtuc/ieee754": {
|
||||
@ -1763,9 +1769,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001177",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001177.tgz",
|
||||
"integrity": "sha512-6Ld7t3ifCL02jTj3MxPMM5wAYjbo4h/TAQGFTgv1inihP1tWnWp8mxxT4ut4JBEHLbpFXEXJJQ119JCJTBkYDw==",
|
||||
"version": "1.0.30001178",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001178.tgz",
|
||||
"integrity": "sha512-VtdZLC0vsXykKni8Uztx45xynytOi71Ufx9T8kHptSw9AL4dpqailUJJHavttuzUe1KYuBYtChiWv+BAb7mPmQ==",
|
||||
"dev": true
|
||||
},
|
||||
"caseless": {
|
||||
@ -1917,6 +1923,28 @@
|
||||
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
|
||||
"dev": true
|
||||
},
|
||||
"clone-deep": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz",
|
||||
"integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-plain-object": "^2.0.4",
|
||||
"kind-of": "^6.0.2",
|
||||
"shallow-clone": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-plain-object": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
|
||||
"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"isobject": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"clone-response": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz",
|
||||
@ -3698,31 +3726,40 @@
|
||||
}
|
||||
},
|
||||
"find-up": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
|
||||
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
|
||||
"integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"locate-path": "^5.0.0",
|
||||
"locate-path": "^6.0.0",
|
||||
"path-exists": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"locate-path": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
||||
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
|
||||
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-locate": "^4.1.0"
|
||||
"p-locate": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"yocto-queue": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"p-locate": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
|
||||
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
|
||||
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-limit": "^2.2.0"
|
||||
"p-limit": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"path-exists": {
|
||||
@ -3792,29 +3829,29 @@
|
||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "9.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz",
|
||||
"integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==",
|
||||
"version": "9.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
|
||||
"integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
|
||||
"requires": {
|
||||
"at-least-node": "^1.0.0",
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^1.0.0"
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsonfile": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz",
|
||||
"integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==",
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.6",
|
||||
"universalify": "^1.0.0"
|
||||
"universalify": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"universalify": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz",
|
||||
"integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug=="
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
||||
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -4307,6 +4344,51 @@
|
||||
"requires": {
|
||||
"pkg-dir": "^4.2.0",
|
||||
"resolve-cwd": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"find-up": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
|
||||
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"locate-path": "^5.0.0",
|
||||
"path-exists": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
||||
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-locate": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"p-locate": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
|
||||
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-limit": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"path-exists": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
||||
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
|
||||
"dev": true
|
||||
},
|
||||
"pkg-dir": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
|
||||
"integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"find-up": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"imurmurhash": {
|
||||
@ -4493,6 +4575,12 @@
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
|
||||
},
|
||||
"isobject": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
|
||||
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
|
||||
"dev": true
|
||||
},
|
||||
"isstream": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
||||
@ -4517,9 +4605,9 @@
|
||||
}
|
||||
},
|
||||
"jasmine": {
|
||||
"version": "3.6.3",
|
||||
"resolved": "https://registry.npmjs.org/jasmine/-/jasmine-3.6.3.tgz",
|
||||
"integrity": "sha512-Th91zHsbsALWjDUIiU5d/W5zaYQsZFMPTdeNmi8GivZPmAaUAK8MblSG3yQI4VMGC/abF2us7ex60NH1AAIMTA==",
|
||||
"version": "3.6.4",
|
||||
"resolved": "https://registry.npmjs.org/jasmine/-/jasmine-3.6.4.tgz",
|
||||
"integrity": "sha512-hIeOou6y0BgCOKYgXYveQvlY+PTHgDPajFf+vLCYbMTQ+VjAP9+EQv0nuC9+gyCAAWISRFauB1XUb9kFuOKtcQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"glob": "^7.1.6",
|
||||
@ -4760,6 +4848,12 @@
|
||||
"json-buffer": "3.0.0"
|
||||
}
|
||||
},
|
||||
"kind-of": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
|
||||
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
|
||||
"dev": true
|
||||
},
|
||||
"klaw": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz",
|
||||
@ -5390,9 +5484,9 @@
|
||||
}
|
||||
},
|
||||
"node-releases": {
|
||||
"version": "1.1.69",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.69.tgz",
|
||||
"integrity": "sha512-DGIjo79VDEyAnRlfSqYTsy+yoHd2IOjJiKUozD2MV2D85Vso6Bug56mb9tT/fY5Urt0iqk01H7x+llAruDR2zA==",
|
||||
"version": "1.1.70",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.70.tgz",
|
||||
"integrity": "sha512-Slf2s69+2/uAD79pVVQo8uSiC34+g8GWY8UH2Qtqv34ZfhYrxpYpfzs9Js9d6O0mbDmALuxaTlplnBTnSELcrw==",
|
||||
"dev": true
|
||||
},
|
||||
"noop-logger": {
|
||||
@ -5861,12 +5955,12 @@
|
||||
}
|
||||
},
|
||||
"pkg-dir": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
|
||||
"integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz",
|
||||
"integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"find-up": "^4.0.0"
|
||||
"find-up": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"plist": {
|
||||
@ -6716,6 +6810,15 @@
|
||||
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
|
||||
"integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
|
||||
},
|
||||
"shallow-clone": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
|
||||
"integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"kind-of": "^6.0.2"
|
||||
}
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
||||
@ -7577,9 +7680,9 @@
|
||||
"integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w=="
|
||||
},
|
||||
"webpack": {
|
||||
"version": "5.15.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.15.0.tgz",
|
||||
"integrity": "sha512-y/xG+ONDz78yn3VvP6gAvGr1/gkxOgitvHSXBmquyN8KDtrGEyE3K9WkXOPB7QmfcOBCpO4ELXwNcCYQnEmexA==",
|
||||
"version": "5.16.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.16.0.tgz",
|
||||
"integrity": "sha512-QOkctcjYfEGxcYg4AzPJafyAQ7ANc266/URkX881uFA7b2k31E0Dmpy1ExfppHOTp1kHDTsRh9sXojVUvgPF0g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/eslint-scope": "^3.7.0",
|
||||
@ -7614,75 +7717,24 @@
|
||||
"integrity": "sha512-XNP0PqF1XD19ZlLKvB7cMmnZswW4C/03pRHgirB30uSJTaS3A3V1/P4sS3HPvFmjoriPCJQs+JDSbm4bL1TxGQ==",
|
||||
"dev": true
|
||||
},
|
||||
"find-up": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
|
||||
"integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"locate-path": "^6.0.0",
|
||||
"path-exists": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "4.2.4",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
|
||||
"integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==",
|
||||
"dev": true
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
|
||||
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-locate": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"yocto-queue": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"p-locate": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
|
||||
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-limit": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"path-exists": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
||||
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
|
||||
"dev": true
|
||||
},
|
||||
"pkg-dir": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz",
|
||||
"integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"find-up": "^5.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"webpack-cli": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.3.1.tgz",
|
||||
"integrity": "sha512-/F4+9QNZM/qKzzL9/06Am8NXIkGV+/NqQ62Dx7DSqudxxpAgBqYn6V7+zp+0Y7JuWksKUbczRY3wMTd+7Uj6OA==",
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.4.0.tgz",
|
||||
"integrity": "sha512-/Qh07CXfXEkMu5S8wEpjuaw2Zj/CC0hf/qbTDp6N8N7JjdGuaOjZ7kttz+zhuJO/J5m7alQEhNk9lsc4rC6xgQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@discoveryjs/json-ext": "^0.5.0",
|
||||
"@webpack-cli/configtest": "^1.0.0",
|
||||
"@webpack-cli/info": "^1.2.1",
|
||||
"@webpack-cli/serve": "^1.2.1",
|
||||
"@webpack-cli/serve": "^1.2.2",
|
||||
"colorette": "^1.2.1",
|
||||
"commander": "^6.2.0",
|
||||
"enquirer": "^2.3.6",
|
||||
@ -7692,7 +7744,7 @@
|
||||
"interpret": "^2.2.0",
|
||||
"rechoir": "^0.7.0",
|
||||
"v8-compile-cache": "^2.2.0",
|
||||
"webpack-merge": "^4.2.2"
|
||||
"webpack-merge": "^5.7.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
@ -7704,12 +7756,13 @@
|
||||
}
|
||||
},
|
||||
"webpack-merge": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz",
|
||||
"integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==",
|
||||
"version": "5.7.3",
|
||||
"resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.7.3.tgz",
|
||||
"integrity": "sha512-6/JUQv0ELQ1igjGDzHkXbVDRxkfA57Zw7PfiupdLFJYrgFqY5ZP8xxbpp2lU3EPwYx89ht5Z/aDkD40hFCm5AA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash": "^4.17.15"
|
||||
"clone-deep": "^4.0.1",
|
||||
"wildcard": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"webpack-sources": {
|
||||
@ -7822,6 +7875,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"wildcard": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz",
|
||||
"integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==",
|
||||
"dev": true
|
||||
},
|
||||
"word-wrap": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
|
||||
|
@ -40,7 +40,7 @@
|
||||
"electron-window-state": "5.0.3",
|
||||
"express": "4.17.1",
|
||||
"express-session": "1.17.1",
|
||||
"fs-extra": "9.0.1",
|
||||
"fs-extra": "9.1.0",
|
||||
"helmet": "4.4.1",
|
||||
"html": "1.0.0",
|
||||
"html2plaintext": "2.1.2",
|
||||
@ -82,12 +82,12 @@
|
||||
"electron-packager": "15.2.0",
|
||||
"electron-rebuild": "2.3.4",
|
||||
"esm": "3.2.25",
|
||||
"jasmine": "3.6.3",
|
||||
"jasmine": "3.6.4",
|
||||
"jsdoc": "3.6.6",
|
||||
"lorem-ipsum": "2.0.3",
|
||||
"rcedit": "3.0.0",
|
||||
"webpack": "5.15.0",
|
||||
"webpack-cli": "4.3.1"
|
||||
"webpack": "5.16.0",
|
||||
"webpack-cli": "4.4.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"electron-installer-debian": "2.0.1"
|
||||
|
@ -88,6 +88,13 @@ class Attribute {
|
||||
getDefinition() {
|
||||
return promotedAttributeDefinitionParser.parse(this.value);
|
||||
}
|
||||
|
||||
get dto() {
|
||||
const dto = Object.assign({}, this);
|
||||
delete dto.treeCache;
|
||||
|
||||
return dto;
|
||||
}
|
||||
}
|
||||
|
||||
export default Attribute;
|
||||
|
@ -3,6 +3,7 @@ import appContext from "./app_context.js";
|
||||
import utils from './utils.js';
|
||||
import noteCreateService from './note_create.js';
|
||||
import treeService from './tree.js';
|
||||
import treeCache from "./tree_cache.js";
|
||||
|
||||
// this key needs to have this value so it's hit by the tooltip
|
||||
const SELECTED_NOTE_PATH_KEY = "data-note-path";
|
||||
@ -249,6 +250,14 @@ function init() {
|
||||
.find(".go-to-selected-note-button")
|
||||
.toggleClass("disabled", true);
|
||||
}
|
||||
|
||||
$.fn.setNote = async function (noteId) {
|
||||
const note = noteId ? await treeCache.getNote(noteId, true) : null;
|
||||
|
||||
$(this)
|
||||
.val(note ? note.title : "")
|
||||
.setSelectedNotePath(noteId);
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
|
39
src/public/app/widgets/search_actions/abstract_action.js
Normal file
39
src/public/app/widgets/search_actions/abstract_action.js
Normal file
@ -0,0 +1,39 @@
|
||||
import server from "../../services/server.js";
|
||||
import ws from "../../services/ws.js";
|
||||
|
||||
export default class AbstractAction {
|
||||
constructor(attribute, actionDef) {
|
||||
this.attribute = attribute;
|
||||
this.actionDef = actionDef;
|
||||
}
|
||||
|
||||
render() {
|
||||
try {
|
||||
const $rendered = this.doRender();
|
||||
|
||||
$rendered.attr('data-attribute-id', this.attribute.attributeId);
|
||||
|
||||
return $rendered;
|
||||
}
|
||||
catch (e) {
|
||||
logError(`Failed rendering search action: ${JSON.stringify(this.attribute.dto)} with error: ${e.message} ${e.stack}`);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// to be overriden
|
||||
doRender() {}
|
||||
|
||||
async saveAction(data) {
|
||||
const actionObject = Object.assign({ name: this.constructor.actionName }, data);
|
||||
|
||||
await server.put(`notes/${this.attribute.noteId}/attribute`, {
|
||||
attributeId: this.attribute.attributeId,
|
||||
type: 'label',
|
||||
name: 'action',
|
||||
value: JSON.stringify(actionObject)
|
||||
});
|
||||
|
||||
await ws.waitForMaxKnownEntityChangeId();
|
||||
}
|
||||
}
|
37
src/public/app/widgets/search_actions/delete_label.js
Normal file
37
src/public/app/widgets/search_actions/delete_label.js
Normal file
@ -0,0 +1,37 @@
|
||||
import SpacedUpdate from "../../services/spaced_update.js";
|
||||
import AbstractAction from "./abstract_action.js";
|
||||
|
||||
const TPL = `
|
||||
<tr>
|
||||
<td>
|
||||
Delete label:
|
||||
</td>
|
||||
<td>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div style="margin-right: 15px;" class="text-nowrap">Label name:</div>
|
||||
|
||||
<input type="text" class="form-control label-name"/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="bx bx-x icon-action" data-action-conf-del></span>
|
||||
</td>
|
||||
</tr>`;
|
||||
|
||||
export default class DeleteLabelSearchAction extends AbstractAction {
|
||||
static get actionName() { return "deleteLabel"; }
|
||||
|
||||
doRender() {
|
||||
const $action = $(TPL);
|
||||
const $labelName = $action.find('.label-name');
|
||||
$labelName.val(this.actionDef.labelName || "");
|
||||
|
||||
const spacedUpdate = new SpacedUpdate(async () => {
|
||||
await this.saveAction({ labelName: $labelName.val() });
|
||||
}, 1000)
|
||||
|
||||
$labelName.on('input', () => spacedUpdate.scheduleUpdate());
|
||||
|
||||
return $action;
|
||||
}
|
||||
}
|
21
src/public/app/widgets/search_actions/delete_note.js
Normal file
21
src/public/app/widgets/search_actions/delete_note.js
Normal file
@ -0,0 +1,21 @@
|
||||
import AbstractAction from "./abstract_action.js";
|
||||
|
||||
const TPL = `
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<span class="bx bx-trash"></span>
|
||||
|
||||
Delete matched note
|
||||
</td>
|
||||
<td>
|
||||
<span class="bx bx-x icon-action" data-action-conf-del></span>
|
||||
</td>
|
||||
</tr>`;
|
||||
|
||||
export default class DeleteNoteSearchAction extends AbstractAction {
|
||||
static get actionName() { return "deleteNote"; }
|
||||
|
||||
doRender() {
|
||||
return $(TPL);
|
||||
}
|
||||
}
|
37
src/public/app/widgets/search_actions/delete_relation.js
Normal file
37
src/public/app/widgets/search_actions/delete_relation.js
Normal file
@ -0,0 +1,37 @@
|
||||
import SpacedUpdate from "../../services/spaced_update.js";
|
||||
import AbstractAction from "./abstract_action.js";
|
||||
|
||||
const TPL = `
|
||||
<tr>
|
||||
<td>
|
||||
Delete relation:
|
||||
</td>
|
||||
<td>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div style="margin-right: 15px;" class="text-nowrap">Relation name:</div>
|
||||
|
||||
<input type="text" class="form-control relation-name"/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="bx bx-x icon-action" data-action-conf-del></span>
|
||||
</td>
|
||||
</tr>`;
|
||||
|
||||
export default class DeleteRelationSearchAction extends AbstractAction {
|
||||
static get actionName() { return "deleteRelation"; }
|
||||
|
||||
doRender() {
|
||||
const $action = $(TPL);
|
||||
const $relationName = $action.find('.relation-name');
|
||||
$relationName.val(this.actionDef.relationName || "");
|
||||
|
||||
const spacedUpdate = new SpacedUpdate(async () => {
|
||||
await this.saveAction({ relationName: $relationName.val() });
|
||||
}, 1000)
|
||||
|
||||
$relationName.on('input', () => spacedUpdate.scheduleUpdate());
|
||||
|
||||
return $action;
|
||||
}
|
||||
}
|
51
src/public/app/widgets/search_actions/rename_label.js
Normal file
51
src/public/app/widgets/search_actions/rename_label.js
Normal file
@ -0,0 +1,51 @@
|
||||
import SpacedUpdate from "../../services/spaced_update.js";
|
||||
import AbstractAction from "./abstract_action.js";
|
||||
|
||||
const TPL = `
|
||||
<tr>
|
||||
<td>
|
||||
Rename label:
|
||||
</td>
|
||||
<td>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div style="display: flex; align-items: center">
|
||||
<div style="margin-right: 15px;">From:</div>
|
||||
|
||||
<input type="text" class="form-control old-label-name" placeholder="old name"/>
|
||||
|
||||
<div style="margin-right: 15px; margin-left: 15px;">To:</div>
|
||||
|
||||
<input type="text" class="form-control new-label-name" placeholder="new name"/>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="bx bx-x icon-action" data-action-conf-del></span>
|
||||
</td>
|
||||
</tr>`;
|
||||
|
||||
export default class RenameLabelSearchAction extends AbstractAction {
|
||||
static get actionName() { return "renameLabel"; }
|
||||
|
||||
doRender() {
|
||||
const $action = $(TPL);
|
||||
|
||||
const $oldLabelName = $action.find('.old-label-name');
|
||||
$oldLabelName.val(this.actionDef.oldLabelName || "");
|
||||
|
||||
const $newLabelName = $action.find('.new-label-name');
|
||||
$newLabelName.val(this.actionDef.newLabelName || "");
|
||||
|
||||
const spacedUpdate = new SpacedUpdate(async () => {
|
||||
await this.saveAction({
|
||||
oldLabelName: $oldLabelName.val(),
|
||||
newLabelName: $newLabelName.val()
|
||||
});
|
||||
}, 1000)
|
||||
|
||||
$oldLabelName.on('input', () => spacedUpdate.scheduleUpdate());
|
||||
$newLabelName.on('input', () => spacedUpdate.scheduleUpdate());
|
||||
|
||||
return $action;
|
||||
}
|
||||
}
|
51
src/public/app/widgets/search_actions/set_label_value.js
Normal file
51
src/public/app/widgets/search_actions/set_label_value.js
Normal file
@ -0,0 +1,51 @@
|
||||
import SpacedUpdate from "../../services/spaced_update.js";
|
||||
import AbstractAction from "./abstract_action.js";
|
||||
|
||||
const TPL = `
|
||||
<tr>
|
||||
<td>
|
||||
Set label value:
|
||||
</td>
|
||||
<td>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div style="display: flex; align-items: center">
|
||||
<div style="margin-right: 15px;" class="text-nowrap">Set label</div>
|
||||
|
||||
<input type="text" class="form-control label-name" placeholder="label name"/>
|
||||
|
||||
<div style="margin-right: 15px; margin-left: 15px;" class="text-nowrap">to value</div>
|
||||
|
||||
<input type="text" class="form-control label-value" placeholder="new value"/>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="bx bx-x icon-action" data-action-conf-del></span>
|
||||
</td>
|
||||
</tr>`;
|
||||
|
||||
export default class SetLabelValueSearchAction extends AbstractAction {
|
||||
static get actionName() { return "setLabelValue"; }
|
||||
|
||||
doRender() {
|
||||
const $action = $(TPL);
|
||||
|
||||
const $labelName = $action.find('.label-name');
|
||||
$labelName.val(this.actionDef.labelName || "");
|
||||
|
||||
const $labelValue = $action.find('.label-value');
|
||||
$labelValue.val(this.actionDef.labelValue || "");
|
||||
|
||||
const spacedUpdate = new SpacedUpdate(async () => {
|
||||
await this.saveAction({
|
||||
labelName: $labelName.val(),
|
||||
labelValue: $labelValue.val()
|
||||
});
|
||||
}, 1000)
|
||||
|
||||
$labelName.on('input', () => spacedUpdate.scheduleUpdate());
|
||||
$labelValue.on('input', () => spacedUpdate.scheduleUpdate());
|
||||
|
||||
return $action;
|
||||
}
|
||||
}
|
54
src/public/app/widgets/search_actions/set_relation_target.js
Normal file
54
src/public/app/widgets/search_actions/set_relation_target.js
Normal file
@ -0,0 +1,54 @@
|
||||
import SpacedUpdate from "../../services/spaced_update.js";
|
||||
import AbstractAction from "./abstract_action.js";
|
||||
import noteAutocompleteService from "../../services/note_autocomplete.js";
|
||||
|
||||
const TPL = `
|
||||
<tr>
|
||||
<td>
|
||||
Set relation target note:
|
||||
</td>
|
||||
<td>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div style="margin-right: 15px;" class="text-nowrap">Set relation</div>
|
||||
|
||||
<input type="text" class="form-control relation-name" placeholder="relation name"/>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; margin-top: 10px;">
|
||||
<div style="margin-right: 15px;" class="text-nowrap">target to note</div>
|
||||
|
||||
<input type="text" class="form-control target-note"/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="bx bx-x icon-action" data-action-conf-del></span>
|
||||
</td>
|
||||
</tr>`;
|
||||
|
||||
export default class SetRelationTargetSearchAction extends AbstractAction {
|
||||
static get actionName() { return "setLabelValue"; }
|
||||
|
||||
doRender() {
|
||||
const $action = $(TPL);
|
||||
|
||||
const $relationName = $action.find('.relation-name');
|
||||
$relationName.val(this.actionDef.relationName || "");
|
||||
|
||||
const $targetNote = $action.find('.target-note');
|
||||
noteAutocompleteService.initNoteAutocomplete($targetNote);
|
||||
$targetNote.setNote(this.actionDef.targetNoteId);
|
||||
|
||||
$targetNote.on('autocomplete:closed', () => spacedUpdate.scheduleUpdate());
|
||||
|
||||
const spacedUpdate = new SpacedUpdate(async () => {
|
||||
await this.saveAction({
|
||||
relationName: $relationName.val(),
|
||||
targetNoteId: $targetNote.getSelectedNoteId()
|
||||
});
|
||||
}, 1000)
|
||||
|
||||
$relationName.on('input', () => spacedUpdate.scheduleUpdate());
|
||||
$targetNote.on('input', () => spacedUpdate.scheduleUpdate());
|
||||
|
||||
return $action;
|
||||
}
|
||||
}
|
@ -5,6 +5,12 @@ import TabAwareWidget from "./tab_aware_widget.js";
|
||||
import treeCache from "../services/tree_cache.js";
|
||||
import ws from "../services/ws.js";
|
||||
import utils from "../services/utils.js";
|
||||
import DeleteNoteSearchAction from "./search_actions/delete_note.js";
|
||||
import DeleteLabelSearchAction from "./search_actions/delete_label.js";
|
||||
import DeleteRelationSearchAction from "./search_actions/delete_relation.js";
|
||||
import RenameLabelSearchAction from "./search_actions/rename_label.js";
|
||||
import SetLabelValueSearchAction from "./search_actions/set_label_value.js";
|
||||
import SetRelationTargetSearchAction from "./search_actions/set_relation_target.js";
|
||||
|
||||
const TPL = `
|
||||
<div class="search-definition-widget">
|
||||
@ -95,14 +101,18 @@ const TPL = `
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#" data-action-add="deleteNote">
|
||||
Delete note</a>
|
||||
<a class="dropdown-item" href="#" data-action-add="deleteAttribute">
|
||||
Delete attribute</a>
|
||||
<a class="dropdown-item" href="#" data-action-add="renameAttribute">
|
||||
Rename attribute</a>
|
||||
<a class="dropdown-item" href="#" data-action-add="changeLabelValue">
|
||||
Change label value</a>
|
||||
<a class="dropdown-item" href="#" data-action-add="changeRelationTarget">
|
||||
Change relation target</a>
|
||||
<a class="dropdown-item" href="#" data-action-add="deleteLabel">
|
||||
Delete label</a>
|
||||
<a class="dropdown-item" href="#" data-action-add="deleteRelation">
|
||||
Delete relation</a>
|
||||
<a class="dropdown-item" href="#" data-action-add="renameLabel">
|
||||
Rename label</a>
|
||||
<a class="dropdown-item" href="#" data-action-add="renameRelation">
|
||||
Rename relation</a>
|
||||
<a class="dropdown-item" href="#" data-action-add="setLabelValue">
|
||||
Set label value</a>
|
||||
<a class="dropdown-item" href="#" data-action-add="setRelationTarget">
|
||||
Set relation target</a>
|
||||
<a class="dropdown-item" href="#" data-action-add="executeScript">
|
||||
Execute script</a>
|
||||
</div>
|
||||
@ -166,27 +176,7 @@ const TPL = `
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody class="action-options">
|
||||
<tr>
|
||||
<td>
|
||||
Rename attribute name:
|
||||
</td>
|
||||
<td>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div style="margin-right: 15px;">From:</div>
|
||||
|
||||
<input type="text" class="form-control" placeholder="old name"/>
|
||||
|
||||
<div style="margin-right: 15px; margin-left: 15px;">To:</div>
|
||||
|
||||
<input type="text" class="form-control" placeholder="new name"/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="bx bx-x icon-action"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody class="action-options"></tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
@ -210,35 +200,18 @@ const TPL = `
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
const ACTION_TPLS = {
|
||||
deleteNote: `
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<span class="bx bx-trash"></span>
|
||||
|
||||
Delete matched note
|
||||
</td>
|
||||
<td>
|
||||
<span class="bx bx-x icon-action" data-action-conf-del></span>
|
||||
</td>
|
||||
</tr>`,
|
||||
deleteAttribute: `
|
||||
<tr>
|
||||
<td>
|
||||
Delete attribute:
|
||||
</td>
|
||||
<td>
|
||||
<div style="display: flex; align-items: center">
|
||||
<div style="margin-right: 15px;">Attribute name:</div>
|
||||
|
||||
<input type="text" class="form-control"/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span class="bx bx-x icon-action"></span>
|
||||
</td>
|
||||
</tr>`
|
||||
};
|
||||
const ACTION_CLASSES = {};
|
||||
|
||||
for (const clazz of [
|
||||
DeleteNoteSearchAction,
|
||||
DeleteLabelSearchAction,
|
||||
DeleteRelationSearchAction,
|
||||
RenameLabelSearchAction,
|
||||
SetLabelValueSearchAction,
|
||||
SetRelationTargetSearchAction
|
||||
]) {
|
||||
ACTION_CLASSES[clazz.actionName] = clazz;
|
||||
}
|
||||
|
||||
export default class SearchDefinitionWidget extends TabAwareWidget {
|
||||
static getType() { return "search"; }
|
||||
@ -403,11 +376,8 @@ export default class SearchDefinitionWidget extends TabAwareWidget {
|
||||
}
|
||||
|
||||
const ancestorNoteId = this.note.getRelationValue('ancestor');
|
||||
const ancestorNote = ancestorNoteId ? await treeCache.getNote(ancestorNoteId, true) : null;
|
||||
|
||||
this.$ancestor
|
||||
.val(ancestorNote ? ancestorNote.title : "")
|
||||
.setSelectedNotePath(ancestorNoteId);
|
||||
await this.$ancestor.setNote(ancestorNoteId);
|
||||
|
||||
if (note.hasLabel('orderBy')) {
|
||||
this.$orderBy.val(note.getLabelValue('orderBy'));
|
||||
@ -425,14 +395,20 @@ export default class SearchDefinitionWidget extends TabAwareWidget {
|
||||
actionDef = JSON.parse(actionAttr.value);
|
||||
}
|
||||
catch (e) {
|
||||
console.log(`Parsing of attribute: '${actionAttr.value}' failed with error: ${e.message}`);
|
||||
logError(`Parsing of attribute: '${actionAttr.value}' failed with error: ${e.message}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const $actionConf = $(ACTION_TPLS[actionDef.name]);
|
||||
$actionConf.attr('data-attribute-id', actionAttr.attributeId);
|
||||
const ActionClass = ACTION_CLASSES[actionDef.name];
|
||||
|
||||
this.$actionOptions.append($actionConf);
|
||||
if (!ActionClass) {
|
||||
logError(`No action class for '${actionDef.name}' found.`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const action = new ActionClass(actionAttr, actionDef);
|
||||
|
||||
this.$actionOptions.append(action.render());
|
||||
}
|
||||
|
||||
this.$searchAndExecuteButton.css('visibility', actionLabels.length > 0 ? 'visible' : 'hidden');
|
||||
|
Loading…
x
Reference in New Issue
Block a user