Reverting any single of the scripts from standard recommendation pool shows "Standard" selection as selected which is wrong. This commit fixes it, refactors selection handling in a separate class and it also adds missing tests. It removes UserSelection.totalSelected propertty in favor of using UserSelection.selectedScripts.length to provide unified way of accessing the information.
10 lines
507 B
TypeScript
10 lines
507 B
TypeScript
import { ICodeChangedEvent } from '@/application/Context/State/Code/Event/ICodeChangedEvent';
|
|
import { IApplicationCode } from '@/application/Context/State/Code/IApplicationCode';
|
|
import { IEventSource } from '@/infrastructure/Events/IEventSource';
|
|
import { EventSource } from '@/infrastructure/Events/EventSource';
|
|
|
|
export class ApplicationCodeStub implements IApplicationCode {
|
|
public changed: IEventSource<ICodeChangedEvent> = new EventSource<ICodeChangedEvent>();
|
|
public current: string = '';
|
|
}
|