Merge remote-tracking branch 'origin/main' into feature/table_view

; Conflicts:
;	pnpm-lock.yaml
This commit is contained in:
Elian Doran
2025-07-04 21:47:26 +03:00
17 changed files with 1300 additions and 1717 deletions

View File

@@ -110,6 +110,11 @@ function getLinkMap(req: Request) {
const ignoreExcludeFromNoteMap = mapRootNote.isLabelTruthy("excludeFromNoteMap");
let unfilteredNotes;
const toSet = (data: unknown) => new Set<string>(data instanceof Array ? data : []);
const excludeRelations = toSet(req.body.excludeRelations);
const includeRelations = toSet(req.body.includeRelations);
if (mapRootNote.type === "search") {
// for search notes, we want to consider the direct search results only without the descendants
unfilteredNotes = mapRootNote.getSearchResultNotes();
@@ -152,6 +157,10 @@ function getLinkMap(req: Request) {
}
return !parentNote.getChildNotes().find((childNote) => childNote.noteId === rel.value);
} else if (includeRelations.size != 0 && !includeRelations.has(rel.name)) {
return false;
} else if (excludeRelations.has(rel.name)) {
return false;
} else {
return true;
}

View File

@@ -45,6 +45,8 @@ export default [
{ type: "label", name: "pageSize" },
{ type: "label", name: "viewType" },
{ type: "label", name: "mapRootNoteId" },
{ type: "label", name: "mapExcludeRelation" },
{ type: "label", name: "mapIncludeRelation" },
{ type: "label", name: "bookmarkFolder" },
{ type: "label", name: "sorted" },
{ type: "label", name: "sortDirection" },