refactor(change_detection): add change_detection library file
This commit is contained in:
parent
f06433fb58
commit
739f624cc8
|
@ -1,15 +1,15 @@
|
|||
import {ListWrapper, MapWrapper} from 'facade/collection';
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {reflector} from 'reflection/reflection';
|
||||
import {isPresent} from 'facade/lang';
|
||||
import {document, DOM} from 'facade/dom';
|
||||
|
||||
import {
|
||||
Lexer,
|
||||
Parser,
|
||||
ChangeDetector,
|
||||
ProtoRecordRange,
|
||||
ChangeDispatcher,
|
||||
} from 'change_detection/change_detector';
|
||||
} from 'change_detection/change_detection';
|
||||
|
||||
|
||||
var ITERATIONS = 500000;
|
||||
|
|
|
@ -3,9 +3,7 @@ import {isBlank, Type} from 'facade/lang';
|
|||
import {MapWrapper} from 'facade/collection';
|
||||
import {DirectiveMetadata} from 'core/compiler/directive_metadata';
|
||||
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {ProtoRecordRange} from 'change_detection/record_range';
|
||||
import {Parser, Lexer, ProtoRecordRange} from 'change_detection/change_detection';
|
||||
|
||||
import {Compiler, CompilerCache} from 'core/compiler/compiler';
|
||||
import {DirectiveMetadataReader} from 'core/compiler/directive_metadata_reader';
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import {ChangeDetector} from 'change_detection/change_detector';
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {Parser, Lexer, ChangeDetector} from 'change_detection/change_detection';
|
||||
|
||||
import {bootstrap, Component, Template, TemplateConfig, ViewPort, Compiler} from 'core/core';
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
export {ChangeDetectionError, ChangeDetector} from './change_detector';
|
||||
export {AST, ASTWithSource} from './parser/ast';
|
||||
export {Lexer} from './parser/lexer';
|
||||
export {Parser} from './parser/parser';
|
||||
export {ProtoRecordRange, RecordRange, ChangeDispatcher} from './record_range';
|
||||
export {ProtoRecord, Record} from './record';
|
||||
export {ContextWithVariableBindings} from './parser/context_with_variable_bindings';
|
|
@ -1,7 +1,9 @@
|
|||
import {describe, it, iit, xit, expect, beforeEach, afterEach} from 'test_lib/test_lib';
|
||||
import {ArrayChanges} from 'change_detection/array_changes';
|
||||
|
||||
import {NumberWrapper} from 'facade/lang';
|
||||
import {ListWrapper, MapWrapper} from 'facade/collection';
|
||||
|
||||
import {TestIterable} from './iterable';
|
||||
import {arrayChangesAsString} from './util';
|
||||
|
||||
|
|
|
@ -2,9 +2,10 @@ import {ddescribe, describe, it, iit, xit, expect, beforeEach} from 'test_lib/te
|
|||
|
||||
import {isPresent, isBlank, isJsObject, BaseException} from 'facade/lang';
|
||||
import {List, ListWrapper, MapWrapper} from 'facade/collection';
|
||||
import {ContextWithVariableBindings} from 'change_detection/parser/context_with_variable_bindings';
|
||||
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {ContextWithVariableBindings} from 'change_detection/parser/context_with_variable_bindings';
|
||||
import {arrayChangesAsString, kvChangesAsString} from './util';
|
||||
|
||||
import {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import {ddescribe, describe, it, xit, iit, expect, beforeEach} from 'test_lib/test_lib';
|
||||
|
||||
import {ContextWithVariableBindings} from 'change_detection/parser/context_with_variable_bindings';
|
||||
|
||||
import {BaseException, isBlank, isPresent} from 'facade/lang';
|
||||
import {MapWrapper, ListWrapper} from 'facade/collection';
|
||||
import {ContextWithVariableBindings} from 'change_detection/parser/context_with_variable_bindings';
|
||||
|
||||
export function main() {
|
||||
describe('ContextWithVariableBindings', () => {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import {describe, it, expect} from 'test_lib/test_lib';
|
||||
|
||||
import {Lexer, Token} from 'change_detection/parser/lexer';
|
||||
|
||||
import {List, ListWrapper} from "facade/collection";
|
||||
import {StringWrapper, int} from "facade/lang";
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import {ddescribe, describe, it, iit, xit, expect, beforeEach} from 'test_lib/test_lib';
|
||||
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
|
||||
import {List, ListWrapper, MapWrapper} from 'facade/collection';
|
||||
import {isPresent} from 'facade/lang';
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
|
||||
import {
|
||||
ChangeDetector,
|
||||
|
|
|
@ -4,10 +4,7 @@ import {DOM, Element} from 'facade/dom';
|
|||
import {Compiler, CompilerCache} from './compiler/compiler';
|
||||
import {ProtoView} from './compiler/view';
|
||||
import {Reflector, reflector} from 'reflection/reflection';
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {ChangeDetector} from 'change_detection/change_detector';
|
||||
import {RecordRange} from 'change_detection/record_range';
|
||||
import {Parser, Lexer, ChangeDetector, RecordRange} from 'change_detection/change_detection';
|
||||
import {TemplateLoader} from './compiler/template_loader';
|
||||
import {DirectiveMetadataReader} from './compiler/directive_metadata_reader';
|
||||
import {DirectiveMetadata} from './compiler/directive_metadata';
|
||||
|
|
|
@ -3,7 +3,7 @@ import {Promise, PromiseWrapper} from 'facade/async';
|
|||
import {List, ListWrapper, MapWrapper} from 'facade/collection';
|
||||
import {DOM, Element} from 'facade/dom';
|
||||
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Parser} from 'change_detection/change_detection';
|
||||
|
||||
import {DirectiveMetadataReader} from './directive_metadata_reader';
|
||||
import {ProtoView} from './view';
|
||||
|
|
|
@ -9,7 +9,7 @@ import {ElementBinder} from '../element_binder';
|
|||
import {ProtoElementInjector} from '../element_injector';
|
||||
import {ProtoView} from '../view';
|
||||
|
||||
import {ASTWithSource} from 'change_detection/parser/ast';
|
||||
import {ASTWithSource} from 'change_detection/change_detection';
|
||||
|
||||
/**
|
||||
* Collects all data that is needed to process an element
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Parser} from 'change_detection/change_detection';
|
||||
import {List} from 'facade/collection';
|
||||
|
||||
import {PropertyBindingParser} from './property_binding_parser';
|
||||
|
|
|
@ -4,8 +4,7 @@ import {ListWrapper, List, MapWrapper, StringMapWrapper} from 'facade/collection
|
|||
|
||||
import {reflector} from 'reflection/reflection';
|
||||
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {ProtoRecordRange} from 'change_detection/record_range';
|
||||
import {Parser, ProtoRecordRange} from 'change_detection/change_detection';
|
||||
|
||||
import {Component, Directive} from '../../annotations/annotations';
|
||||
import {DirectiveMetadata} from '../directive_metadata';
|
||||
|
|
|
@ -2,9 +2,7 @@ import {isPresent, isBlank, RegExpWrapper, BaseException} from 'facade/lang';
|
|||
import {MapWrapper} from 'facade/collection';
|
||||
import {TemplateElement} from 'facade/dom';
|
||||
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {AST} from 'change_detection/parser/ast';
|
||||
import {ExpressionWithSource} from 'change_detection/parser/ast';
|
||||
import {Parser, AST, ExpressionWithSource} from 'change_detection/change_detection';
|
||||
|
||||
import {CompileStep} from './compile_step';
|
||||
import {CompileElement} from './compile_element';
|
||||
|
|
|
@ -2,7 +2,7 @@ import {isPresent, BaseException} from 'facade/lang';
|
|||
import {ListWrapper, MapWrapper} from 'facade/collection';
|
||||
|
||||
import {ProtoView} from '../view';
|
||||
import {ProtoRecordRange} from 'change_detection/record_range';
|
||||
import {ProtoRecordRange} from 'change_detection/change_detection';
|
||||
|
||||
import {CompileStep} from './compile_step';
|
||||
import {CompileElement} from './compile_element';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {RegExpWrapper, StringWrapper, isPresent} from 'facade/lang';
|
||||
import {Node, DOM} from 'facade/dom';
|
||||
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Parser} from 'change_detection/change_detection';
|
||||
|
||||
import {CompileStep} from './compile_step';
|
||||
import {CompileElement} from './compile_element';
|
||||
|
|
|
@ -2,7 +2,7 @@ import {isBlank, isPresent} from 'facade/lang';
|
|||
import {DOM, TemplateElement} from 'facade/dom';
|
||||
import {MapWrapper, ListWrapper} from 'facade/collection';
|
||||
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Parser} from 'change_detection/change_detection';
|
||||
|
||||
import {CompileStep} from './compile_step';
|
||||
import {CompileElement} from './compile_element';
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import {DOM, Element, Node, Text, DocumentFragment, TemplateElement} from 'facade/dom';
|
||||
import {ListWrapper, MapWrapper, StringMapWrapper, List} from 'facade/collection';
|
||||
import {ProtoRecordRange, RecordRange, ChangeDispatcher} from 'change_detection/record_range';
|
||||
import {Record} from 'change_detection/record';
|
||||
import {AST} from 'change_detection/parser/ast';
|
||||
import {ProtoRecordRange, RecordRange, Record,
|
||||
ChangeDispatcher, AST, ContextWithVariableBindings} from 'change_detection/change_detection';
|
||||
|
||||
import {ProtoElementInjector, ElementInjector, PreBuiltObjects} from './element_injector';
|
||||
import {ElementBinder} from './element_binder';
|
||||
|
@ -13,7 +12,6 @@ import {Injector} from 'di/di';
|
|||
import {NgElement} from 'core/dom/element';
|
||||
import {ViewPort} from './viewport';
|
||||
import {OnChange} from './interfaces';
|
||||
import {ContextWithVariableBindings} from 'change_detection/parser/context_with_variable_bindings';
|
||||
|
||||
const NG_BINDING_CLASS = 'ng-binding';
|
||||
const NG_BINDING_CLASS_SELECTOR = '.ng-binding';
|
||||
|
|
|
@ -7,9 +7,7 @@ export * from './annotations/template_config';
|
|||
|
||||
export * from './application';
|
||||
|
||||
export * from 'change_detection/change_detector';
|
||||
export * from 'change_detection/record_range';
|
||||
export * from 'change_detection/record';
|
||||
export * from 'change_detection/change_detection';
|
||||
|
||||
export * from './compiler/compiler';
|
||||
export * from './compiler/template_loader';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {FIELD, print} from 'facade/lang';
|
||||
import {ChangeDetector} from 'change_detection/change_detector';
|
||||
import {ChangeDetector} from 'change_detection/change_detection';
|
||||
import {VmTurnZone} from 'core/zone/vm_turn_zone';
|
||||
import {ListWrapper} from 'facade/collection';
|
||||
|
||||
|
|
|
@ -12,8 +12,7 @@ import {CompileElement} from 'core/compiler/pipeline/compile_element';
|
|||
import {CompileStep} from 'core/compiler/pipeline/compile_step'
|
||||
import {CompileControl} from 'core/compiler/pipeline/compile_control';
|
||||
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {Lexer, Parser} from 'change_detection/change_detection';
|
||||
|
||||
export function main() {
|
||||
describe('compiler', function() {
|
||||
|
|
|
@ -5,7 +5,7 @@ import {ProtoElementInjector, PreBuiltObjects} from 'core/compiler/element_injec
|
|||
import {Parent, Ancestor} from 'core/annotations/visibility';
|
||||
import {Injector, Inject, bind} from 'di/di';
|
||||
import {View} from 'core/compiler/view';
|
||||
import {ProtoRecordRange} from 'change_detection/record_range';
|
||||
import {ProtoRecordRange} from 'change_detection/change_detection';
|
||||
import {ViewPort} from 'core/compiler/viewport';
|
||||
import {NgElement} from 'core/dom/element';
|
||||
|
||||
|
|
|
@ -3,9 +3,7 @@ import {describe, xit, it, expect, beforeEach, ddescribe, iit} from 'test_lib/te
|
|||
import {DOM} from 'facade/dom';
|
||||
|
||||
import {Injector} from 'di/di';
|
||||
import {ChangeDetector} from 'change_detection/change_detector';
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {Lexer, Parser, ChangeDetector} from 'change_detection/change_detection';
|
||||
|
||||
import {Compiler, CompilerCache} from 'core/compiler/compiler';
|
||||
import {DirectiveMetadataReader} from 'core/compiler/directive_metadata_reader';
|
||||
|
|
|
@ -12,8 +12,7 @@ import {Decorator} from 'core/annotations/annotations';
|
|||
import {Template} from 'core/annotations/annotations';
|
||||
import {TemplateConfig} from 'core/annotations/template_config';
|
||||
import {DirectiveMetadataReader} from 'core/compiler/directive_metadata_reader';
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {Lexer, Parser} from 'change_detection/change_detection';
|
||||
|
||||
export function main() {
|
||||
describe('DirectiveParser', () => {
|
||||
|
|
|
@ -16,10 +16,7 @@ import {ProtoView, ElementPropertyMemento, DirectivePropertyMemento} from 'core/
|
|||
import {ProtoElementInjector} from 'core/compiler/element_injector';
|
||||
import {DirectiveMetadataReader} from 'core/compiler/directive_metadata_reader';
|
||||
|
||||
import {ProtoRecordRange} from 'change_detection/record_range';
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {ChangeDetector} from 'change_detection/change_detector';
|
||||
import {ChangeDetector, Lexer, Parser, ProtoRecordRange} from 'change_detection/change_detection';
|
||||
import {Injector} from 'di/di';
|
||||
|
||||
export function main() {
|
||||
|
|
|
@ -4,8 +4,7 @@ import {CompilePipeline} from 'core/compiler/pipeline/compile_pipeline';
|
|||
import {DOM} from 'facade/dom';
|
||||
import {MapWrapper} from 'facade/collection';
|
||||
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {Lexer, Parser} from 'change_detection/change_detection';
|
||||
|
||||
export function main() {
|
||||
describe('PropertyBindingParser', () => {
|
||||
|
|
|
@ -4,8 +4,7 @@ import {CompilePipeline} from 'core/compiler/pipeline/compile_pipeline';
|
|||
import {DOM} from 'facade/dom';
|
||||
import {MapWrapper} from 'facade/collection';
|
||||
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {Lexer, Parser} from 'change_detection/change_detection';
|
||||
|
||||
export function main() {
|
||||
describe('TextInterpolationParser', () => {
|
||||
|
|
|
@ -6,8 +6,7 @@ import {ViewSplitter} from 'core/compiler/pipeline/view_splitter';
|
|||
import {CompilePipeline} from 'core/compiler/pipeline/compile_pipeline';
|
||||
import {DOM, TemplateElement} from 'facade/dom';
|
||||
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {Lexer, Parser} from 'change_detection/change_detection';
|
||||
|
||||
export function main() {
|
||||
describe('ViewSplitter', () => {
|
||||
|
|
|
@ -5,11 +5,8 @@ import {ShadowDomEmulated} from 'core/compiler/shadow_dom';
|
|||
import {DirectiveMetadataReader} from 'core/compiler/directive_metadata_reader';
|
||||
import {Component, Decorator, Template} from 'core/annotations/annotations';
|
||||
import {OnChange} from 'core/core';
|
||||
import {ProtoRecordRange} from 'change_detection/record_range';
|
||||
import {ChangeDetector} from 'change_detection/change_detector';
|
||||
import {Lexer, Parser, ProtoRecordRange, ChangeDetector} from 'change_detection/change_detection';
|
||||
import {TemplateConfig} from 'core/annotations/template_config';
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {DOM, Element} from 'facade/dom';
|
||||
import {FIELD} from 'facade/lang';
|
||||
import {Injector} from 'di/di';
|
||||
|
|
|
@ -5,9 +5,7 @@ import {DOM} from 'facade/dom';
|
|||
import {ListWrapper, MapWrapper} from 'facade/collection';
|
||||
import {Injector} from 'di/di';
|
||||
import {ProtoElementInjector, ElementInjector} from 'core/compiler/element_injector';
|
||||
import {ProtoRecordRange} from 'change_detection/record_range';
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {ProtoRecordRange, Lexer, Parser} from 'change_detection/change_detection';
|
||||
|
||||
function createElement(html) {
|
||||
return DOM.createTemplate(html).content.firstChild;
|
||||
|
|
|
@ -3,9 +3,7 @@ import {describe, xit, it, expect, beforeEach, ddescribe, iit} from 'test_lib/te
|
|||
import {DOM} from 'facade/dom';
|
||||
|
||||
import {Injector} from 'di/di';
|
||||
import {ChangeDetector} from 'change_detection/change_detector';
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {Lexer, Parser, ChangeDetector} from 'change_detection/change_detection';
|
||||
|
||||
import {Compiler, CompilerCache} from 'core/compiler/compiler';
|
||||
import {OnChange} from 'core/compiler/interfaces';
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import * as app from './index_common';
|
||||
|
||||
import {Component, Decorator, TemplateConfig, NgElement} from 'core/core';
|
||||
import {Parser} from 'change_detection/parser/parser';
|
||||
import {Lexer} from 'change_detection/parser/lexer';
|
||||
import {Lexer, Parser, ChangeDetector} from 'change_detection/change_detection';
|
||||
import {LifeCycle} from 'core/life_cycle/life_cycle';
|
||||
import {ChangeDetector} from 'change_detection/change_detector';
|
||||
|
||||
import {Compiler, CompilerCache} from 'core/compiler/compiler';
|
||||
import {DirectiveMetadataReader} from 'core/compiler/directive_metadata_reader';
|
||||
|
|
Loading…
Reference in New Issue