2015-02-05 16:08:05 -05:00
|
|
|
export {AST} from './src/change_detection/parser/ast';
|
|
|
|
export {Lexer} from './src/change_detection/parser/lexer';
|
|
|
|
export {Parser} from './src/change_detection/parser/parser';
|
|
|
|
export {ContextWithVariableBindings}
|
|
|
|
from './src/change_detection/parser/context_with_variable_bindings';
|
|
|
|
export {ExpressionChangedAfterItHasBeenChecked, ChangeDetectionError}
|
|
|
|
from './src/change_detection/exceptions';
|
2015-02-02 20:31:12 -05:00
|
|
|
export {ChangeRecord, ChangeDispatcher, ChangeDetector,
|
2015-02-05 16:08:05 -05:00
|
|
|
CHECK_ONCE, CHECK_ALWAYS, DETACHED, CHECKED} from './src/change_detection/interfaces';
|
|
|
|
export {ProtoChangeDetector, DynamicProtoChangeDetector, JitProtoChangeDetector}
|
|
|
|
from './src/change_detection/proto_change_detector';
|
|
|
|
export {DynamicChangeDetector}
|
|
|
|
from './src/change_detection/dynamic_change_detector';
|
2015-02-12 17:56:41 -05:00
|
|
|
export * from './src/change_detection/pipes/pipe_registry';
|
|
|
|
export * from './src/change_detection/pipes/pipe';
|
|
|
|
|
2015-01-21 15:05:52 -05:00
|
|
|
|
2015-02-05 16:08:05 -05:00
|
|
|
import {ProtoChangeDetector, DynamicProtoChangeDetector, JitProtoChangeDetector}
|
|
|
|
from './src/change_detection/proto_change_detector';
|
2015-02-12 17:56:41 -05:00
|
|
|
import {PipeRegistry} from './src/change_detection/pipes/pipe_registry';
|
2015-02-19 20:47:25 -05:00
|
|
|
import {ArrayChangesFactory} from './src/change_detection/pipes/array_changes';
|
|
|
|
import {NullPipeFactory} from './src/change_detection/pipes/null_pipe';
|
2015-01-21 15:05:52 -05:00
|
|
|
|
|
|
|
export class ChangeDetection {
|
2015-02-12 00:04:52 -05:00
|
|
|
createProtoChangeDetector(name:string):ProtoChangeDetector{
|
|
|
|
// TODO: this should be abstract, once supported in AtScript
|
|
|
|
return null;
|
|
|
|
}
|
2015-01-21 15:05:52 -05:00
|
|
|
}
|
|
|
|
|
2015-02-12 17:56:41 -05:00
|
|
|
export var defaultPipes = {
|
2015-02-19 20:47:25 -05:00
|
|
|
"iterableDiff" : [
|
|
|
|
new ArrayChangesFactory(),
|
|
|
|
new NullPipeFactory()
|
2015-02-12 17:56:41 -05:00
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
var _registry = new PipeRegistry(defaultPipes);
|
|
|
|
|
2015-01-21 15:05:52 -05:00
|
|
|
export class DynamicChangeDetection extends ChangeDetection {
|
|
|
|
createProtoChangeDetector(name:string):ProtoChangeDetector{
|
2015-02-12 17:56:41 -05:00
|
|
|
return new DynamicProtoChangeDetector(_registry);
|
2015-01-21 15:05:52 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class JitChangeDetection extends ChangeDetection {
|
|
|
|
createProtoChangeDetector(name:string):ProtoChangeDetector{
|
2015-02-12 17:56:41 -05:00
|
|
|
return new JitProtoChangeDetector(_registry);
|
2015-01-21 15:05:52 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export var dynamicChangeDetection = new DynamicChangeDetection();
|
|
|
|
export var jitChangeDetection = new JitChangeDetection();
|