diff --git a/package-lock.json b/package-lock.json index d999c8b24..eeeb0c088 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "trilium", "version": "0.62.2", "hasInstallScript": true, "license": "AGPL-3.0-only", @@ -35,7 +34,7 @@ "express-partial-content": "1.0.2", "express-rate-limit": "7.1.4", "express-session": "1.17.3", - "force-graph": "^1.43.4", + "force-graph": "1.43.4", "fs-extra": "11.1.1", "helmet": "7.1.0", "html": "1.0.0", @@ -48,19 +47,19 @@ "is-svg": "4.3.2", "jimp": "0.22.10", "joplin-turndown-plugin-gfm": "1.0.12", - "jquery": "^3.7.1", - "jquery-hotkeys": "^0.2.2", + "jquery": "3.7.1", + "jquery-hotkeys": "0.2.2", "jsdom": "22.1.0", "katex": "0.16.9", "marked": "9.1.6", - "mermaid": "^10.6.1", + "mermaid": "10.6.1", "mime-types": "2.1.35", "multer": "1.4.5-lts.1", "node-abi": "3.51.0", "normalize-strings": "1.1.1", "open": "8.4.1", - "panzoom": "^9.4.3", - "print-this": "^2.0.0", + "panzoom": "9.4.3", + "print-this": "2.0.0", "rand-token": "1.0.1", "react": "18.2.0", "react-dom": "18.2.0", @@ -73,11 +72,11 @@ "semver": "7.5.4", "serve-favicon": "2.5.0", "session-file-store": "1.5.0", - "split.js": "^1.6.5", + "split.js": "1.6.5", "stream-throttle": "0.1.3", "striptags": "3.2.0", "tmp": "0.2.1", - "tree-kill": "^1.2.2", + "tree-kill": "1.2.2", "turndown": "7.1.2", "unescape": "1.0.1", "ws": "8.14.2", diff --git a/src/public/app/menus/tree_context_menu.js b/src/public/app/menus/tree_context_menu.js index 38c245251..feba6d69e 100644 --- a/src/public/app/menus/tree_context_menu.js +++ b/src/public/app/menus/tree_context_menu.js @@ -50,10 +50,10 @@ export default class TreeContextMenu { { title: 'Open in a new tab Ctrl+Click', command: "openInTab", uiIcon: "bx bx-empty", enabled: noSelectedNotes }, { title: 'Open in a new split', command: "openNoteInSplit", uiIcon: "bx bx-dock-right", enabled: noSelectedNotes }, { title: 'Insert note after ', command: "insertNoteAfter", uiIcon: "bx bx-plus", - items: insertNoteAfterEnabled ? await noteTypesService.getNoteTypeItems("insertNoteAfter") : null, + items: insertNoteAfterEnabled ? await noteTypesService.getNoteTypeItems("insertNoteAfter", {removeDeprecatedTypes: true}) : null, enabled: insertNoteAfterEnabled && noSelectedNotes }, { title: 'Insert child note ', command: "insertChildNote", uiIcon: "bx bx-plus", - items: notSearch ? await noteTypesService.getNoteTypeItems("insertChildNote") : null, + items: notSearch ? await noteTypesService.getNoteTypeItems("insertChildNote", {removeDeprecatedTypes: true}) : null, enabled: notSearch && noSelectedNotes }, { title: 'Delete ', command: "deleteNotes", uiIcon: "bx bx-trash", enabled: isNotRoot && !isHoisted && parentNotSearch }, diff --git a/src/public/app/services/note_types.js b/src/public/app/services/note_types.js index 40bc4a88b..6a44e03b3 100644 --- a/src/public/app/services/note_types.js +++ b/src/public/app/services/note_types.js @@ -1,19 +1,21 @@ import server from "./server.js"; import froca from "./froca.js"; -async function getNoteTypeItems(command) { +async function getNoteTypeItems(command, opts = {}) { + const removeDeprecatedTypes = !!opts.removeDeprecatedTypes; + const items = [ { title: "Text", command: command, type: "text", uiIcon: "bx bx-note" }, { title: "Code", command: command, type: "code", uiIcon: "bx bx-code" }, { title: "Saved Search", command: command, type: "search", uiIcon: "bx bx-file-find" }, - { title: "Relation Map", command: command, type: "relationMap", uiIcon: "bx bx-map-alt" }, + { title: "Relation Map", command: command, type: "relationMap", uiIcon: "bx bx-map-alt", deprecated: true }, { title: "Note Map", command: command, type: "noteMap", uiIcon: "bx bx-map-alt" }, { title: "Render Note", command: command, type: "render", uiIcon: "bx bx-extension" }, { title: "Book", command: command, type: "book", uiIcon: "bx bx-book" }, { title: "Mermaid Diagram", command: command, type: "mermaid", uiIcon: "bx bx-selection" }, { title: "Canvas", command: command, type: "canvas", uiIcon: "bx bx-pen" }, { title: "Web View", command: command, type: "webView", uiIcon: "bx bx-globe-alt" }, - ]; + ].filter(item => !removeDeprecatedTypes || !item.deprecated); const templateNoteIds = await server.get("search-templates"); const templateNotes = await froca.getNotes(templateNoteIds); diff --git a/src/public/app/widgets/type_widgets/relation_map.js b/src/public/app/widgets/type_widgets/relation_map.js index beb16ff07..6fea5eb6a 100644 --- a/src/public/app/widgets/type_widgets/relation_map.js +++ b/src/public/app/widgets/type_widgets/relation_map.js @@ -184,6 +184,8 @@ export default class RelationMapTypeWidget extends TypeWidget { } async loadMapData() { + toastService.showMessage("Relation Map has been deprecated since Trilium 0.63 and will be removed in a future version. Migrate your content to some other note type (e.g. canvas) as soon as possible.", 5000); + this.mapData = { notes: [], // it is important to have this exact value here so that initial transform is the same as this