(search: Search, assign: boolean, rebase: boolean)
| 78 | } |
| 79 | |
| 80 | public createUserSelection(search: Search, assign: boolean, rebase: boolean) { |
| 81 | const exec = new Exec(search, this.getColumns()); |
| 82 | const s: UserSelection = { |
| 83 | search, |
| 84 | included: [], |
| 85 | excluded: [], |
| 86 | }; |
| 87 | const data = rebase ? this.data : this.currentData(); |
| 88 | data.forEach(datum => { |
| 89 | if (exec.run(datum)) { |
| 90 | if (assign) { |
| 91 | datum[FieldNames.Selected] = true; |
| 92 | } |
| 93 | s.included.push(datum); |
| 94 | } else { |
| 95 | s.excluded.push(datum); |
| 96 | } |
| 97 | }); |
| 98 | return s; |
| 99 | } |
| 100 | |
| 101 | public deselect() { |
| 102 | this.deactivate(); |
no test coverage detected