2023-01-13 10:09:41 +01:00
|
|
|
"use strict";
|
|
|
|
|
2024-02-18 00:36:37 +02:00
|
|
|
const Expression = require('./expression');
|
2024-02-17 11:54:55 +02:00
|
|
|
const NoteSet = require('../note_set');
|
2023-01-13 10:09:41 +01:00
|
|
|
|
|
|
|
/**
|
2023-05-05 23:41:11 +02:00
|
|
|
* Note is hidden when all its note paths start in hidden subtree (i.e., the note is not cloned into visible tree)
|
2023-01-13 10:09:41 +01:00
|
|
|
*/
|
|
|
|
class IsHiddenExp extends Expression {
|
|
|
|
execute(inputNoteSet, executionContext, searchContext) {
|
|
|
|
const resultNoteSet = new NoteSet();
|
|
|
|
|
|
|
|
for (const note of inputNoteSet.notes) {
|
|
|
|
if (note.isHiddenCompletely()) {
|
|
|
|
resultNoteSet.add(note);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return resultNoteSet;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = IsHiddenExp;
|