repackaging: all the repackaging changes squashed
This commit is contained in:
@ -3,9 +3,8 @@
|
||||
* @description
|
||||
* Starting point to import all compiler APIs.
|
||||
*/
|
||||
export {ElementSchemaRegistry} from './src/schema/element_schema_registry';
|
||||
export {
|
||||
PLATFORM_DIRECTIVES,
|
||||
PLATFORM_PIPES,
|
||||
COMPILER_PROVIDERS,
|
||||
TEMPLATE_TRANSFORMS,
|
||||
CompilerConfig,
|
||||
@ -32,6 +31,7 @@ export {
|
||||
CompileTemplateMetadata,
|
||||
CompileDirectiveMetadata,
|
||||
CompilePipeMetadata
|
||||
} from 'angular2/src/compiler/compiler';
|
||||
} from './src/compiler';
|
||||
|
||||
export * from 'angular2/src/compiler/template_ast';
|
||||
export * from './src/template_ast';
|
||||
export * from './private_export';
|
||||
|
1
modules/@angular/compiler/core_private.dart
Normal file
1
modules/@angular/compiler/core_private.dart
Normal file
@ -0,0 +1 @@
|
||||
export '../core/private_export.dart';
|
52
modules/@angular/compiler/core_private.ts
Normal file
52
modules/@angular/compiler/core_private.ts
Normal file
@ -0,0 +1,52 @@
|
||||
import {__core_private__ as r, __core_private_types__ as t} from '@angular/core';
|
||||
|
||||
export var isDefaultChangeDetectionStrategy: typeof t.isDefaultChangeDetectionStrategy = r.isDefaultChangeDetectionStrategy;
|
||||
export type ChangeDetectorState = t.ChangeDetectorState;
|
||||
export var ChangeDetectorState: typeof t.ChangeDetectorState = r.ChangeDetectorState;
|
||||
export var CHANGE_DETECTION_STRATEGY_VALUES: typeof t.CHANGE_DETECTION_STRATEGY_VALUES = r.CHANGE_DETECTION_STRATEGY_VALUES;
|
||||
export var constructDependencies: typeof t.constructDependencies = r.constructDependencies;
|
||||
export type LifecycleHooks = t.LifecycleHooks;
|
||||
export var LifecycleHooks: typeof t.LifecycleHooks = r.LifecycleHooks;
|
||||
export var LIFECYCLE_HOOKS_VALUES: typeof t.LIFECYCLE_HOOKS_VALUES = r.LIFECYCLE_HOOKS_VALUES;
|
||||
export type ReflectorReader = t.ReflectorReader;
|
||||
export var ReflectorReader: typeof t.ReflectorReader = r.ReflectorReader;
|
||||
export var ReflectorComponentResolver: typeof t.ReflectorComponentResolver = r.ReflectorComponentResolver;
|
||||
export type AppElement = t.AppElement;
|
||||
export var AppElement: typeof t.AppElement = r.AppElement;
|
||||
export var AppView: typeof t.AppView = r.AppView;
|
||||
export type DebugAppView<T> = t.DebugAppView<T>;
|
||||
export var DebugAppView: typeof t.DebugAppView = r.DebugAppView;
|
||||
export type ViewType = t.ViewType;
|
||||
export var ViewType: typeof t.ViewType = r.ViewType;
|
||||
export var MAX_INTERPOLATION_VALUES: typeof t.MAX_INTERPOLATION_VALUES = r.MAX_INTERPOLATION_VALUES;
|
||||
export var checkBinding: typeof t.checkBinding = r.checkBinding;
|
||||
export var flattenNestedViewRenderNodes: typeof t.flattenNestedViewRenderNodes = r.flattenNestedViewRenderNodes;
|
||||
export var interpolate: typeof t.interpolate = r.interpolate;
|
||||
export var ViewUtils: typeof t.ViewUtils = r.ViewUtils;
|
||||
export var VIEW_ENCAPSULATION_VALUES: typeof t.VIEW_ENCAPSULATION_VALUES = r.VIEW_ENCAPSULATION_VALUES;
|
||||
export var DebugContext: typeof t.DebugContext = r.DebugContext;
|
||||
export var StaticNodeDebugInfo: typeof t.StaticNodeDebugInfo = r.StaticNodeDebugInfo;
|
||||
export var devModeEqual: typeof t.devModeEqual = r.devModeEqual;
|
||||
export var uninitialized: typeof t.uninitialized = r.uninitialized;
|
||||
export var ValueUnwrapper: typeof t.ValueUnwrapper = r.ValueUnwrapper;
|
||||
export var TemplateRef_: typeof t.TemplateRef_ = r.TemplateRef_;
|
||||
export type RenderDebugInfo = t.RenderDebugInfo;
|
||||
export var RenderDebugInfo: typeof t.RenderDebugInfo = r.RenderDebugInfo;
|
||||
export var createProvider: typeof t.createProvider = r.createProvider;
|
||||
export var isProviderLiteral: typeof t.isProviderLiteral = r.isProviderLiteral;
|
||||
export var EMPTY_ARRAY: typeof t.EMPTY_ARRAY = r.EMPTY_ARRAY;
|
||||
export var EMPTY_MAP: typeof t.EMPTY_MAP = r.EMPTY_MAP;
|
||||
export var pureProxy1: typeof t.pureProxy1 = r.pureProxy1;
|
||||
export var pureProxy2: typeof t.pureProxy2 = r.pureProxy2;
|
||||
export var pureProxy3: typeof t.pureProxy3 = r.pureProxy3;
|
||||
export var pureProxy4: typeof t.pureProxy4 = r.pureProxy4;
|
||||
export var pureProxy5: typeof t.pureProxy5 = r.pureProxy5;
|
||||
export var pureProxy6: typeof t.pureProxy6 = r.pureProxy6;
|
||||
export var pureProxy7: typeof t.pureProxy7 = r.pureProxy7;
|
||||
export var pureProxy8: typeof t.pureProxy8 = r.pureProxy8;
|
||||
export var pureProxy9: typeof t.pureProxy9 = r.pureProxy9;
|
||||
export var pureProxy10: typeof t.pureProxy10 = r.pureProxy10;
|
||||
export var castByValue: typeof t.castByValue = r.castByValue;
|
||||
export type Console = t.Console;
|
||||
export var Console: typeof t.Console = r.Console;
|
||||
|
1
modules/@angular/compiler/index.ts
Normal file
1
modules/@angular/compiler/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './compiler';
|
13
modules/@angular/compiler/package.json
Normal file
13
modules/@angular/compiler/package.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "@angular/compiler",
|
||||
"version": "$$ANGULAR_VERSION$$",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"jsnext:main": "esm/index.js",
|
||||
"typings": "index.d.ts",
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@angular/core": "$$ANGULAR_VERSION$$"
|
||||
}
|
||||
}
|
1
modules/@angular/compiler/private_export.dart
Normal file
1
modules/@angular/compiler/private_export.dart
Normal file
@ -0,0 +1 @@
|
||||
export './src/core/change_detection/constants.dart' show SelectorMatcher, CssSelector;
|
9
modules/@angular/compiler/private_export.ts
Normal file
9
modules/@angular/compiler/private_export.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import * as selector from './src/selector';
|
||||
|
||||
export namespace __compiler_private__ {
|
||||
export type SelectorMatcher = selector.SelectorMatcher;
|
||||
export var SelectorMatcher = selector.SelectorMatcher;
|
||||
|
||||
export type CssSelector = selector.CssSelector;
|
||||
export var CssSelector = selector.CssSelector;
|
||||
}
|
18
modules/@angular/compiler/rollup.config.js
Normal file
18
modules/@angular/compiler/rollup.config.js
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/compiler/esm/index.js',
|
||||
dest: '../../../dist/packages-dist/compiler/esm/compiler.umd.js',
|
||||
sourceMap: true,
|
||||
format: 'umd',
|
||||
moduleName: 'ng.compiler',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'rxjs/Subject': 'Rx',
|
||||
'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update.
|
||||
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
|
||||
'rxjs/Observable': 'Rx'
|
||||
},
|
||||
plugins: [
|
||||
// nodeResolve({ jsnext: true, main: true }),
|
||||
]
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import {isArray, isString, isBlank, assertionsEnabled} from '../facade/lang';
|
||||
import {BaseException} from '../facade/exceptions';
|
||||
import {isArray, isString, isBlank, assertionsEnabled} from '../src/facade/lang';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
|
||||
export function assertArrayOfStrings(identifier: string, value: any) {
|
||||
if (!assertionsEnabled() || isBlank(value)) {
|
||||
|
@ -1,3 +1,11 @@
|
||||
import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
import {
|
||||
CHANGE_DETECTION_STRATEGY_VALUES,
|
||||
VIEW_ENCAPSULATION_VALUES,
|
||||
LifecycleHooks,
|
||||
LIFECYCLE_HOOKS_VALUES
|
||||
} from '../core_private';
|
||||
|
||||
import {
|
||||
isPresent,
|
||||
isBlank,
|
||||
@ -9,24 +17,14 @@ import {
|
||||
Type,
|
||||
isString,
|
||||
RegExpWrapper,
|
||||
StringWrapper,
|
||||
isArray
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {unimplemented, BaseException} from 'angular2/src/facade/exceptions';
|
||||
} from '../src/facade/lang';
|
||||
import {unimplemented, BaseException} from '../src/facade/exceptions';
|
||||
import {
|
||||
StringMapWrapper,
|
||||
MapWrapper,
|
||||
SetWrapper,
|
||||
ListWrapper
|
||||
} from 'angular2/src/facade/collection';
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
CHANGE_DETECTION_STRATEGY_VALUES
|
||||
} from 'angular2/src/core/change_detection/change_detection';
|
||||
import {ViewEncapsulation, VIEW_ENCAPSULATION_VALUES} from 'angular2/src/core/metadata/view';
|
||||
import {CssSelector} from 'angular2/src/compiler/selector';
|
||||
} from '../src/facade/collection';
|
||||
import {CssSelector} from './selector';
|
||||
import {splitAtColon, sanitizeIdentifier} from './util';
|
||||
import {LifecycleHooks, LIFECYCLE_HOOKS_VALUES} from 'angular2/src/core/metadata/lifecycle_hooks';
|
||||
import {getUrlScheme} from './url_resolver';
|
||||
|
||||
// group 1: "property" from "[property]"
|
||||
@ -318,9 +316,7 @@ export class CompileTokenMetadata implements CompileMetadataWithIdentifier {
|
||||
(isPresent(ak) && ak == token2.assetCacheKey);
|
||||
}
|
||||
|
||||
get name(): string {
|
||||
return isPresent(this.value) ? sanitizeIdentifier(this.value) : this.identifier.name;
|
||||
}
|
||||
get name(): string { return isPresent(this.value) ? sanitizeIdentifier(this.value) : this.identifier.name; }
|
||||
}
|
||||
|
||||
export class CompileTokenMap<VALUE> {
|
||||
|
@ -1,30 +1,30 @@
|
||||
export {PLATFORM_DIRECTIVES, PLATFORM_PIPES} from 'angular2/src/core/platform_directives_and_pipes';
|
||||
export * from 'angular2/src/compiler/template_ast';
|
||||
export {TEMPLATE_TRANSFORMS} from 'angular2/src/compiler/template_parser';
|
||||
import {ComponentResolver, Type} from '@angular/core';
|
||||
import {assertionsEnabled} from '../src/facade/lang';
|
||||
|
||||
export * from './template_ast';
|
||||
export {TEMPLATE_TRANSFORMS} from './template_parser';
|
||||
export {CompilerConfig, RenderTypes} from './config';
|
||||
export * from './compile_metadata';
|
||||
export * from './offline_compiler';
|
||||
export {RuntimeCompiler} from './runtime_compiler';
|
||||
export * from 'angular2/src/compiler/url_resolver';
|
||||
export * from 'angular2/src/compiler/xhr';
|
||||
export * from './url_resolver';
|
||||
export * from './xhr';
|
||||
|
||||
export {ViewResolver} from './view_resolver';
|
||||
export {DirectiveResolver} from './directive_resolver';
|
||||
export {PipeResolver} from './pipe_resolver';
|
||||
|
||||
import {assertionsEnabled, Type} from 'angular2/src/facade/lang';
|
||||
import {TemplateParser} from 'angular2/src/compiler/template_parser';
|
||||
import {HtmlParser} from 'angular2/src/compiler/html_parser';
|
||||
import {DirectiveNormalizer} from 'angular2/src/compiler/directive_normalizer';
|
||||
import {CompileMetadataResolver} from 'angular2/src/compiler/metadata_resolver';
|
||||
import {StyleCompiler} from 'angular2/src/compiler/style_compiler';
|
||||
import {ViewCompiler} from 'angular2/src/compiler/view_compiler/view_compiler';
|
||||
import {TemplateParser} from './template_parser';
|
||||
import {HtmlParser} from './html_parser';
|
||||
import {DirectiveNormalizer} from './directive_normalizer';
|
||||
import {CompileMetadataResolver} from './metadata_resolver';
|
||||
import {StyleCompiler} from './style_compiler';
|
||||
import {ViewCompiler} from './view_compiler/view_compiler';
|
||||
import {CompilerConfig} from './config';
|
||||
import {ComponentResolver} from 'angular2/src/core/linker/component_resolver';
|
||||
import {RuntimeCompiler} from 'angular2/src/compiler/runtime_compiler';
|
||||
import {ElementSchemaRegistry} from 'angular2/src/compiler/schema/element_schema_registry';
|
||||
import {DomElementSchemaRegistry} from 'angular2/src/compiler/schema/dom_element_schema_registry';
|
||||
import {UrlResolver, DEFAULT_PACKAGE_URL_PROVIDER} from 'angular2/src/compiler/url_resolver';
|
||||
import {RuntimeCompiler} from './runtime_compiler';
|
||||
import {ElementSchemaRegistry} from './schema/element_schema_registry';
|
||||
import {DomElementSchemaRegistry} from './schema/dom_element_schema_registry';
|
||||
import {UrlResolver, DEFAULT_PACKAGE_URL_PROVIDER} from './url_resolver';
|
||||
import {Parser} from './expression_parser/parser';
|
||||
import {Lexer} from './expression_parser/lexer';
|
||||
import {ViewResolver} from './view_resolver';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {isBlank} from 'angular2/src/facade/lang';
|
||||
import {unimplemented} from 'angular2/src/facade/exceptions';
|
||||
import {isBlank} from '../src/facade/lang';
|
||||
import {unimplemented} from '../src/facade/exceptions';
|
||||
import {Identifiers} from './identifiers';
|
||||
import {CompileIdentifierMetadata} from './compile_metadata';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {NumberWrapper, StringWrapper, isPresent, resolveEnumToken} from "angular2/src/facade/lang";
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {NumberWrapper, StringWrapper, isPresent, resolveEnumToken} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
|
||||
import {
|
||||
isWhitespace,
|
||||
@ -44,7 +44,7 @@ import {
|
||||
$CR,
|
||||
$LF,
|
||||
$VTAB
|
||||
} from "angular2/src/compiler/chars";
|
||||
} from '@angular/compiler/src/chars';
|
||||
|
||||
export {
|
||||
$EOF,
|
||||
@ -59,7 +59,7 @@ export {
|
||||
$COLON,
|
||||
$SEMICOLON,
|
||||
isWhitespace
|
||||
} from "angular2/src/compiler/chars";
|
||||
} from '@angular/compiler/src/chars';
|
||||
|
||||
export enum CssTokenType {
|
||||
EOF,
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
ParseSourceFile,
|
||||
ParseLocation,
|
||||
ParseError
|
||||
} from "angular2/src/compiler/parse_util";
|
||||
} from '@angular/compiler/src/parse_util';
|
||||
|
||||
import {
|
||||
bitWiseOr,
|
||||
@ -11,7 +11,7 @@ import {
|
||||
NumberWrapper,
|
||||
StringWrapper,
|
||||
isPresent
|
||||
} from "angular2/src/facade/lang";
|
||||
} from '../../src/facade/lang';
|
||||
|
||||
import {
|
||||
CssLexerMode,
|
||||
@ -32,9 +32,9 @@ import {
|
||||
$COLON,
|
||||
$SEMICOLON,
|
||||
isNewline
|
||||
} from "angular2/src/compiler/css/lexer";
|
||||
} from '@angular/compiler/src/css/lexer';
|
||||
|
||||
export {CssToken} from "angular2/src/compiler/css/lexer";
|
||||
export {CssToken} from '@angular/compiler/src/css/lexer';
|
||||
|
||||
export enum BlockType {
|
||||
Import,
|
||||
|
@ -1,5 +1,7 @@
|
||||
import {Type} from 'angular2/src/facade/lang';
|
||||
import {LifecycleHooks} from 'angular2/src/core/metadata/lifecycle_hooks';
|
||||
import {LifecycleHooks} from '../core_private';
|
||||
|
||||
import {Type} from '../src/facade/lang';
|
||||
|
||||
|
||||
export function hasLifecycleHook(lcInterface: LifecycleHooks, token): boolean {
|
||||
if (!(token instanceof Type)) return false;
|
||||
|
@ -1,27 +1,23 @@
|
||||
import {Injectable, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {isPresent} from '../src/facade/lang';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
import {PromiseWrapper} from '../src/facade/async';
|
||||
|
||||
import {
|
||||
CompileTypeMetadata,
|
||||
CompileDirectiveMetadata,
|
||||
CompileTemplateMetadata,
|
||||
CompileProviderMetadata,
|
||||
CompileTokenMetadata
|
||||
} from './compile_metadata';
|
||||
import {isPresent, isBlank, isArray} from 'angular2/src/facade/lang';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {PromiseWrapper} from 'angular2/src/facade/async';
|
||||
|
||||
import {XHR} from 'angular2/src/compiler/xhr';
|
||||
import {UrlResolver} from 'angular2/src/compiler/url_resolver';
|
||||
import {XHR} from './xhr';
|
||||
import {UrlResolver} from './url_resolver';
|
||||
import {extractStyleUrls, isStyleUrlResolvable} from './style_url_resolver';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||
|
||||
|
||||
import {
|
||||
HtmlAstVisitor,
|
||||
HtmlElementAst,
|
||||
HtmlTextAst,
|
||||
HtmlAttrAst,
|
||||
HtmlAst,
|
||||
HtmlCommentAst,
|
||||
HtmlExpansionAst,
|
||||
HtmlExpansionCaseAst,
|
||||
@ -29,7 +25,8 @@ import {
|
||||
} from './html_ast';
|
||||
import {HtmlParser} from './html_parser';
|
||||
|
||||
import {preparseElement, PreparsedElement, PreparsedElementType} from './template_preparser';
|
||||
import {preparseElement, PreparsedElementType} from './template_preparser';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class DirectiveNormalizer {
|
||||
|
@ -1,9 +1,6 @@
|
||||
import {resolveForwardRef, Injectable} from 'angular2/src/core/di';
|
||||
import {Type, isPresent, isBlank, stringify} from 'angular2/src/facade/lang';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
|
||||
import {
|
||||
resolveForwardRef,
|
||||
Injectable,
|
||||
DirectiveMetadata,
|
||||
ComponentMetadata,
|
||||
InputMetadata,
|
||||
@ -13,10 +10,15 @@ import {
|
||||
ContentChildrenMetadata,
|
||||
ViewChildrenMetadata,
|
||||
ContentChildMetadata,
|
||||
ViewChildMetadata
|
||||
} from 'angular2/src/core/metadata';
|
||||
import {reflector} from 'angular2/src/core/reflection/reflection';
|
||||
import {ReflectorReader} from 'angular2/src/core/reflection/reflector_reader';
|
||||
ViewChildMetadata,
|
||||
reflector
|
||||
} from '@angular/core';
|
||||
import {ReflectorReader} from '../core_private';
|
||||
|
||||
import {Type, isPresent, stringify} from '../src/facade/lang';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
import {ListWrapper, StringMapWrapper} from '../src/facade/collection';
|
||||
|
||||
|
||||
function _isDirectiveMetadata(type: any): boolean {
|
||||
return type instanceof DirectiveMetadata;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {ListWrapper} from "angular2/src/facade/collection";
|
||||
import {ListWrapper} from '../../src/facade/collection';
|
||||
|
||||
export class AST {
|
||||
visit(visitor: AstVisitor, context: any = null): any { return null; }
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {Injectable} from 'angular2/src/core/di/decorators';
|
||||
import {ListWrapper, SetWrapper} from "angular2/src/facade/collection";
|
||||
import {NumberWrapper, StringJoiner, StringWrapper, isPresent} from "angular2/src/facade/lang";
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {SetWrapper} from '../../src/facade/collection';
|
||||
import {NumberWrapper, StringJoiner, StringWrapper, isPresent} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
|
||||
export enum TokenType {
|
||||
Character,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {Injectable} from 'angular2/src/core/di/decorators';
|
||||
import {isBlank, isPresent, StringWrapper} from 'angular2/src/facade/lang';
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {isBlank, isPresent, StringWrapper} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
import {ListWrapper} from '../../src/facade/collection';
|
||||
import {
|
||||
Lexer,
|
||||
EOF,
|
||||
|
1
modules/@angular/compiler/src/facade
Symbolic link
1
modules/@angular/compiler/src/facade
Symbolic link
@ -0,0 +1 @@
|
||||
../../facade/src
|
@ -1,4 +1,4 @@
|
||||
import {isPresent} from 'angular2/src/facade/lang';
|
||||
import {isPresent} from '../src/facade/lang';
|
||||
|
||||
import {ParseSourceSpan} from './parse_util';
|
||||
|
||||
|
@ -4,8 +4,8 @@ import {
|
||||
isPresent,
|
||||
isBlank,
|
||||
serializeEnum
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
} from '../src/facade/lang';
|
||||
import {ListWrapper} from '../src/facade/collection';
|
||||
import {ParseLocation, ParseError, ParseSourceFile, ParseSourceSpan} from './parse_util';
|
||||
import {getHtmlTagDefinition, HtmlTagContentType, NAMED_ENTITIES} from './html_tags';
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
import {
|
||||
isPresent,
|
||||
isBlank,
|
||||
StringWrapper,
|
||||
stringify,
|
||||
assertionsEnabled,
|
||||
StringJoiner,
|
||||
serializeEnum,
|
||||
} from 'angular2/src/facade/lang';
|
||||
} from '../src/facade/lang';
|
||||
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {ListWrapper} from '../src/facade/collection';
|
||||
|
||||
import {
|
||||
HtmlAst,
|
||||
@ -20,10 +17,9 @@ import {
|
||||
HtmlExpansionCaseAst
|
||||
} from './html_ast';
|
||||
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {HtmlToken, HtmlTokenType, tokenizeHtml} from './html_lexer';
|
||||
import {ParseError, ParseLocation, ParseSourceSpan} from './parse_util';
|
||||
import {HtmlTagDefinition, getHtmlTagDefinition, getNsPrefix, mergeNsAndName} from './html_tags';
|
||||
import {ParseError, ParseSourceSpan} from './parse_util';
|
||||
import {getHtmlTagDefinition, getNsPrefix, mergeNsAndName} from './html_tags';
|
||||
|
||||
export class HtmlTreeError extends ParseError {
|
||||
static create(elementName: string, span: ParseSourceSpan, msg: string): HtmlTreeError {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
isBlank,
|
||||
normalizeBool,
|
||||
RegExpWrapper,
|
||||
} from 'angular2/src/facade/lang';
|
||||
} from '../src/facade/lang';
|
||||
|
||||
// see http://www.w3.org/TR/html51/syntax.html#named-character-references
|
||||
// see https://html.spec.whatwg.org/multipage/entities.json
|
||||
|
@ -8,9 +8,9 @@ import {
|
||||
HtmlExpansionAst,
|
||||
HtmlExpansionCaseAst,
|
||||
htmlVisitAll
|
||||
} from 'angular2/src/compiler/html_ast';
|
||||
} from '../html_ast';
|
||||
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
|
||||
|
||||
/**
|
||||
@ -113,4 +113,4 @@ function _expandDefaultForm(ast: HtmlExpansionAst): HtmlElementAst {
|
||||
let switchAttr = new HtmlAttrAst("[ngSwitch]", ast.switchValue, ast.switchValueSourceSpan);
|
||||
return new HtmlElementAst("ul", [switchAttr], children, ast.sourceSpan, ast.sourceSpan,
|
||||
ast.sourceSpan);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {HtmlParser, HtmlParseTreeResult} from 'angular2/src/compiler/html_parser';
|
||||
import {ParseSourceSpan, ParseError} from 'angular2/src/compiler/parse_util';
|
||||
import {HtmlParser, HtmlParseTreeResult} from '../html_parser';
|
||||
import {ParseSourceSpan, ParseError} from '../parse_util';
|
||||
import {
|
||||
HtmlAst,
|
||||
HtmlAstVisitor,
|
||||
@ -10,12 +10,12 @@ import {
|
||||
HtmlExpansionAst,
|
||||
HtmlExpansionCaseAst,
|
||||
htmlVisitAll
|
||||
} from 'angular2/src/compiler/html_ast';
|
||||
import {ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {RegExpWrapper, NumberWrapper, isPresent} from 'angular2/src/facade/lang';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {Parser} from 'angular2/src/compiler/expression_parser/parser';
|
||||
import {Message, id} from './message';
|
||||
} from '../html_ast';
|
||||
import {ListWrapper, StringMapWrapper} from '../../src/facade/collection';
|
||||
import {RegExpWrapper, NumberWrapper, isPresent} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
import {Parser} from '../expression_parser/parser';
|
||||
import {id} from './message';
|
||||
import {expandNodes} from './expander';
|
||||
import {
|
||||
messageFromAttribute,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {isPresent, escape} from 'angular2/src/facade/lang';
|
||||
import {isPresent, escape} from '../../src/facade/lang';
|
||||
|
||||
/**
|
||||
* A message extracted from a template.
|
||||
@ -18,4 +18,4 @@ export function id(m: Message): string {
|
||||
let meaning = isPresent(m.meaning) ? m.meaning : "";
|
||||
let content = isPresent(m.content) ? m.content : "";
|
||||
return escape(`$ng|${meaning}|${content}`);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {HtmlParser} from 'angular2/src/compiler/html_parser';
|
||||
import {ParseSourceSpan, ParseError} from 'angular2/src/compiler/parse_util';
|
||||
import {HtmlParser} from '../html_parser';
|
||||
import {ParseSourceSpan, ParseError} from '../parse_util';
|
||||
import {
|
||||
HtmlAst,
|
||||
HtmlAstVisitor,
|
||||
@ -8,10 +8,10 @@ import {
|
||||
HtmlTextAst,
|
||||
HtmlCommentAst,
|
||||
htmlVisitAll
|
||||
} from 'angular2/src/compiler/html_ast';
|
||||
import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {Parser} from 'angular2/src/compiler/expression_parser/parser';
|
||||
} from '../html_ast';
|
||||
import {isPresent} from '../../src/facade/lang';
|
||||
import {StringMapWrapper} from '../../src/facade/collection';
|
||||
import {Parser} from '../expression_parser/parser';
|
||||
import {Message, id} from './message';
|
||||
import {expandNodes} from './expander';
|
||||
import {
|
||||
@ -175,4 +175,4 @@ export class MessageExtractor {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {ParseSourceSpan, ParseError} from 'angular2/src/compiler/parse_util';
|
||||
import {ParseSourceSpan, ParseError} from '../parse_util';
|
||||
import {
|
||||
HtmlAst,
|
||||
HtmlAstVisitor,
|
||||
@ -9,10 +9,10 @@ import {
|
||||
HtmlExpansionAst,
|
||||
HtmlExpansionCaseAst,
|
||||
htmlVisitAll
|
||||
} from 'angular2/src/compiler/html_ast';
|
||||
import {isPresent, isBlank, StringWrapper} from 'angular2/src/facade/lang';
|
||||
} from '../html_ast';
|
||||
import {isPresent, isBlank, StringWrapper} from '../../src/facade/lang';
|
||||
import {Message} from './message';
|
||||
import {Parser} from 'angular2/src/compiler/expression_parser/parser';
|
||||
import {Parser} from '../expression_parser/parser';
|
||||
|
||||
export const I18N_ATTR = "i18n";
|
||||
export const I18N_ATTR_PREFIX = "i18n-";
|
||||
|
@ -1,8 +1,8 @@
|
||||
import {isPresent, isBlank, RegExpWrapper} from 'angular2/src/facade/lang';
|
||||
import {HtmlAst, HtmlElementAst} from 'angular2/src/compiler/html_ast';
|
||||
import {isPresent, isBlank, RegExpWrapper} from '../../src/facade/lang';
|
||||
import {HtmlAst, HtmlElementAst} from '../html_ast';
|
||||
import {Message, id} from './message';
|
||||
import {HtmlParser} from 'angular2/src/compiler/html_parser';
|
||||
import {ParseSourceSpan, ParseError} from 'angular2/src/compiler/parse_util';
|
||||
import {HtmlParser} from '../html_parser';
|
||||
import {ParseSourceSpan, ParseError} from '../parse_util';
|
||||
|
||||
let _PLACEHOLDER_REGEXP = RegExpWrapper.create(`\\<ph(\\s)+name=("(\\w)+")\\/\\>`);
|
||||
const _ID_ATTR = "id";
|
||||
|
@ -1,11 +1,33 @@
|
||||
import {CompileIdentifierMetadata, CompileTokenMetadata} from './compile_metadata';
|
||||
import {AppView, DebugAppView} from 'angular2/src/core/linker/view';
|
||||
import {StaticNodeDebugInfo, DebugContext} from 'angular2/src/core/linker/debug_context';
|
||||
import {
|
||||
ViewUtils,
|
||||
SimpleChange,
|
||||
ChangeDetectorRef,
|
||||
ChangeDetectionStrategy,
|
||||
ElementRef,
|
||||
ViewContainerRef,
|
||||
Renderer,
|
||||
RenderComponentType,
|
||||
Injector,
|
||||
QueryList,
|
||||
ViewEncapsulation,
|
||||
TemplateRef
|
||||
} from '@angular/core';
|
||||
import {
|
||||
AppElement,
|
||||
AppView,
|
||||
DebugAppView,
|
||||
ChangeDetectorState,
|
||||
checkBinding,
|
||||
DebugContext,
|
||||
devModeEqual,
|
||||
flattenNestedViewRenderNodes,
|
||||
interpolate,
|
||||
checkBinding,
|
||||
RenderDebugInfo,
|
||||
StaticNodeDebugInfo,
|
||||
TemplateRef_,
|
||||
uninitialized,
|
||||
ValueUnwrapper,
|
||||
ViewType,
|
||||
ViewUtils,
|
||||
castByValue,
|
||||
EMPTY_ARRAY,
|
||||
EMPTY_MAP,
|
||||
@ -19,30 +41,14 @@ import {
|
||||
pureProxy8,
|
||||
pureProxy9,
|
||||
pureProxy10
|
||||
} from 'angular2/src/core/linker/view_utils';
|
||||
import {
|
||||
uninitialized,
|
||||
devModeEqual,
|
||||
SimpleChange,
|
||||
ValueUnwrapper,
|
||||
ChangeDetectorRef,
|
||||
ChangeDetectorState,
|
||||
ChangeDetectionStrategy
|
||||
} from 'angular2/src/core/change_detection/change_detection';
|
||||
import {AppElement} from 'angular2/src/core/linker/element';
|
||||
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
||||
import {ViewContainerRef} from 'angular2/src/core/linker/view_container_ref';
|
||||
import {Renderer, RenderComponentType, RenderDebugInfo} from 'angular2/src/core/render/api';
|
||||
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||
import {ViewType} from 'angular2/src/core/linker/view_type';
|
||||
import {QueryList} from 'angular2/src/core/linker';
|
||||
import {Injector} from 'angular2/src/core/di/injector';
|
||||
import {TemplateRef, TemplateRef_} from 'angular2/src/core/linker/template_ref';
|
||||
import {MODULE_SUFFIX} from './util';
|
||||
} from '../core_private';
|
||||
|
||||
var APP_VIEW_MODULE_URL = 'asset:angular2/lib/src/core/linker/view' + MODULE_SUFFIX;
|
||||
var VIEW_UTILS_MODULE_URL = 'asset:angular2/lib/src/core/linker/view_utils' + MODULE_SUFFIX;
|
||||
var CD_MODULE_URL = 'asset:angular2/lib/src/core/change_detection/change_detection' + MODULE_SUFFIX;
|
||||
import {CompileIdentifierMetadata, CompileTokenMetadata} from './compile_metadata';
|
||||
import {assetUrl} from './util';
|
||||
|
||||
var APP_VIEW_MODULE_URL = assetUrl('core', 'linker/view');
|
||||
var VIEW_UTILS_MODULE_URL = assetUrl('core', 'linker/view_utils');
|
||||
var CD_MODULE_URL = assetUrl('core', 'change_detection/change_detection');
|
||||
|
||||
// Reassign the imports to different variables so we can
|
||||
// define static variables with the name of the import.
|
||||
@ -80,7 +86,7 @@ var impEMPTY_MAP = EMPTY_MAP;
|
||||
export class Identifiers {
|
||||
static ViewUtils = new CompileIdentifierMetadata({
|
||||
name: 'ViewUtils',
|
||||
moduleUrl: 'asset:angular2/lib/src/core/linker/view_utils' + MODULE_SUFFIX,
|
||||
moduleUrl: assetUrl('core', 'linker/view_utils'),
|
||||
runtime: impViewUtils
|
||||
});
|
||||
static AppView = new CompileIdentifierMetadata(
|
||||
@ -89,59 +95,59 @@ export class Identifiers {
|
||||
{name: 'DebugAppView', moduleUrl: APP_VIEW_MODULE_URL, runtime: impDebugAppView});
|
||||
static AppElement = new CompileIdentifierMetadata({
|
||||
name: 'AppElement',
|
||||
moduleUrl: 'asset:angular2/lib/src/core/linker/element' + MODULE_SUFFIX,
|
||||
moduleUrl: assetUrl('core', 'linker/element'),
|
||||
runtime: impAppElement
|
||||
});
|
||||
static ElementRef = new CompileIdentifierMetadata({
|
||||
name: 'ElementRef',
|
||||
moduleUrl: 'asset:angular2/lib/src/core/linker/element_ref' + MODULE_SUFFIX,
|
||||
moduleUrl: assetUrl('core', 'linker/element_ref'),
|
||||
runtime: impElementRef
|
||||
});
|
||||
static ViewContainerRef = new CompileIdentifierMetadata({
|
||||
name: 'ViewContainerRef',
|
||||
moduleUrl: 'asset:angular2/lib/src/core/linker/view_container_ref' + MODULE_SUFFIX,
|
||||
moduleUrl: assetUrl('core', 'linker/view_container_ref'),
|
||||
runtime: impViewContainerRef
|
||||
});
|
||||
static ChangeDetectorRef = new CompileIdentifierMetadata({
|
||||
name: 'ChangeDetectorRef',
|
||||
moduleUrl: 'asset:angular2/lib/src/core/change_detection/change_detector_ref' + MODULE_SUFFIX,
|
||||
moduleUrl: assetUrl('core', 'change_detection/change_detector_ref'),
|
||||
runtime: impChangeDetectorRef
|
||||
});
|
||||
static RenderComponentType = new CompileIdentifierMetadata({
|
||||
name: 'RenderComponentType',
|
||||
moduleUrl: 'asset:angular2/lib/src/core/render/api' + MODULE_SUFFIX,
|
||||
moduleUrl: assetUrl('core', 'render/api'),
|
||||
runtime: impRenderComponentType
|
||||
});
|
||||
static QueryList = new CompileIdentifierMetadata({
|
||||
name: 'QueryList',
|
||||
moduleUrl: 'asset:angular2/lib/src/core/linker/query_list' + MODULE_SUFFIX,
|
||||
moduleUrl: assetUrl('core', 'linker/query_list'),
|
||||
runtime: impQueryList
|
||||
});
|
||||
static TemplateRef = new CompileIdentifierMetadata({
|
||||
name: 'TemplateRef',
|
||||
moduleUrl: 'asset:angular2/lib/src/core/linker/template_ref' + MODULE_SUFFIX,
|
||||
moduleUrl: assetUrl('core', 'linker/template_ref'),
|
||||
runtime: impTemplateRef
|
||||
});
|
||||
static TemplateRef_ = new CompileIdentifierMetadata({
|
||||
name: 'TemplateRef_',
|
||||
moduleUrl: 'asset:angular2/lib/src/core/linker/template_ref' + MODULE_SUFFIX,
|
||||
moduleUrl: assetUrl('core', 'linker/template_ref'),
|
||||
runtime: impTemplateRef_
|
||||
});
|
||||
static ValueUnwrapper = new CompileIdentifierMetadata(
|
||||
{name: 'ValueUnwrapper', moduleUrl: CD_MODULE_URL, runtime: impValueUnwrapper});
|
||||
static Injector = new CompileIdentifierMetadata({
|
||||
name: 'Injector',
|
||||
moduleUrl: `asset:angular2/lib/src/core/di/injector${MODULE_SUFFIX}`,
|
||||
moduleUrl: assetUrl('core', 'di/injector'),
|
||||
runtime: impInjector
|
||||
});
|
||||
static ViewEncapsulation = new CompileIdentifierMetadata({
|
||||
name: 'ViewEncapsulation',
|
||||
moduleUrl: 'asset:angular2/lib/src/core/metadata/view' + MODULE_SUFFIX,
|
||||
moduleUrl: assetUrl('core', 'metadata/view'),
|
||||
runtime: impViewEncapsulation
|
||||
});
|
||||
static ViewType = new CompileIdentifierMetadata({
|
||||
name: 'ViewType',
|
||||
moduleUrl: `asset:angular2/lib/src/core/linker/view_type${MODULE_SUFFIX}`,
|
||||
moduleUrl: assetUrl('core', 'linker/view_type'),
|
||||
runtime: impViewType
|
||||
});
|
||||
static ChangeDetectionStrategy = new CompileIdentifierMetadata({
|
||||
@ -151,17 +157,17 @@ export class Identifiers {
|
||||
});
|
||||
static StaticNodeDebugInfo = new CompileIdentifierMetadata({
|
||||
name: 'StaticNodeDebugInfo',
|
||||
moduleUrl: `asset:angular2/lib/src/core/linker/debug_context${MODULE_SUFFIX}`,
|
||||
moduleUrl: assetUrl('core', 'linker/debug_context'),
|
||||
runtime: impStaticNodeDebugInfo
|
||||
});
|
||||
static DebugContext = new CompileIdentifierMetadata({
|
||||
name: 'DebugContext',
|
||||
moduleUrl: `asset:angular2/lib/src/core/linker/debug_context${MODULE_SUFFIX}`,
|
||||
moduleUrl: assetUrl('core', 'linker/debug_context'),
|
||||
runtime: impDebugContext
|
||||
});
|
||||
static Renderer = new CompileIdentifierMetadata({
|
||||
name: 'Renderer',
|
||||
moduleUrl: 'asset:angular2/lib/src/core/render/api' + MODULE_SUFFIX,
|
||||
moduleUrl: assetUrl('core', 'render/api'),
|
||||
runtime: impRenderer
|
||||
});
|
||||
static SimpleChange = new CompileIdentifierMetadata(
|
||||
|
@ -1,6 +1,11 @@
|
||||
import {Injectable, Provider, provide} from 'angular2/src/core/di';
|
||||
import {Injectable, Provider, provide} from '@angular/core';
|
||||
|
||||
import {StringWrapper, RegExpWrapper, isBlank, isPresent} from 'angular2/src/facade/lang';
|
||||
import {
|
||||
StringWrapper,
|
||||
RegExpWrapper,
|
||||
isBlank,
|
||||
isPresent
|
||||
} from '../src/facade/lang';
|
||||
|
||||
import {
|
||||
HtmlAstVisitor,
|
||||
|
@ -1,4 +1,26 @@
|
||||
import {resolveForwardRef} from 'angular2/src/core/di';
|
||||
import {
|
||||
AttributeMetadata,
|
||||
ReflectiveDependency,
|
||||
OptionalMetadata,
|
||||
ComponentMetadata,
|
||||
SelfMetadata,
|
||||
HostMetadata,
|
||||
SkipSelfMetadata,
|
||||
Provider,
|
||||
PLATFORM_DIRECTIVES, PLATFORM_PIPES,
|
||||
reflector,
|
||||
Injectable, Inject, Optional,
|
||||
ViewMetadata,
|
||||
NoAnnotationError,
|
||||
QueryMetadata,
|
||||
resolveForwardRef,
|
||||
InjectMetadata,
|
||||
ViewQueryMetadata
|
||||
} from '@angular/core';
|
||||
import {
|
||||
constructDependencies,
|
||||
LIFECYCLE_HOOKS_VALUES, ReflectorReader
|
||||
} from '../core_private';
|
||||
import {
|
||||
Type,
|
||||
isBlank,
|
||||
@ -6,38 +28,20 @@ import {
|
||||
isArray,
|
||||
stringify,
|
||||
isString,
|
||||
isStringMap,
|
||||
RegExpWrapper,
|
||||
StringWrapper
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
isStringMap
|
||||
} from '../src/facade/lang';
|
||||
import {StringMapWrapper} from '../src/facade/collection';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
import * as cpl from './compile_metadata';
|
||||
import * as md from 'angular2/src/core/metadata/directives';
|
||||
import * as dimd from 'angular2/src/core/metadata/di';
|
||||
import {DirectiveResolver} from './directive_resolver';
|
||||
import {PipeResolver} from './pipe_resolver';
|
||||
import {ViewResolver} from './view_resolver';
|
||||
import {ViewMetadata} from 'angular2/src/core/metadata/view';
|
||||
import {hasLifecycleHook} from './directive_lifecycle_reflector';
|
||||
import {LifecycleHooks, LIFECYCLE_HOOKS_VALUES} from 'angular2/src/core/metadata/lifecycle_hooks';
|
||||
import {reflector} from 'angular2/src/core/reflection/reflection';
|
||||
import {Injectable, Inject, Optional} from 'angular2/src/core/di';
|
||||
import {PLATFORM_DIRECTIVES, PLATFORM_PIPES} from 'angular2/src/core/platform_directives_and_pipes';
|
||||
import {MODULE_SUFFIX, sanitizeIdentifier, ValueTransformer, visitValue} from './util';
|
||||
import {assertArrayOfStrings} from './assertions';
|
||||
import {getUrlScheme} from 'angular2/src/compiler/url_resolver';
|
||||
import {Provider} from 'angular2/src/core/di/provider';
|
||||
import {
|
||||
OptionalMetadata,
|
||||
SelfMetadata,
|
||||
HostMetadata,
|
||||
SkipSelfMetadata,
|
||||
InjectMetadata
|
||||
} from 'angular2/src/core/di/metadata';
|
||||
import {AttributeMetadata, QueryMetadata} from 'angular2/src/core/metadata/di';
|
||||
import {ReflectorReader} from 'angular2/src/core/reflection/reflector_reader';
|
||||
import {isProviderLiteral, createProvider} from '../core/di/provider_util';
|
||||
import {getUrlScheme} from './url_resolver';
|
||||
import {createProvider, isProviderLiteral} from "../core_private";
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class CompileMetadataResolver {
|
||||
@ -81,9 +85,9 @@ export class CompileMetadataResolver {
|
||||
var changeDetectionStrategy = null;
|
||||
var viewProviders = [];
|
||||
|
||||
if (dirMeta instanceof md.ComponentMetadata) {
|
||||
if (dirMeta instanceof ComponentMetadata) {
|
||||
assertArrayOfStrings('styles', dirMeta.styles);
|
||||
var cmpMeta = <md.ComponentMetadata>dirMeta;
|
||||
var cmpMeta = <ComponentMetadata>dirMeta;
|
||||
var viewMeta = this._viewResolver.resolve(directiveType);
|
||||
assertArrayOfStrings('styles', viewMeta.styles);
|
||||
templateMeta = new cpl.CompileTemplateMetadata({
|
||||
@ -219,8 +223,8 @@ export class CompileMetadataResolver {
|
||||
let isSelf = false;
|
||||
let isSkipSelf = false;
|
||||
let isOptional = false;
|
||||
let query: dimd.QueryMetadata = null;
|
||||
let viewQuery: dimd.ViewQueryMetadata = null;
|
||||
let query: QueryMetadata = null;
|
||||
let viewQuery: ViewQueryMetadata = null;
|
||||
var token = null;
|
||||
if (isArray(param)) {
|
||||
(<any[]>param)
|
||||
@ -326,7 +330,7 @@ export class CompileMetadataResolver {
|
||||
});
|
||||
}
|
||||
|
||||
getQueriesMetadata(queries: {[key: string]: dimd.QueryMetadata},
|
||||
getQueriesMetadata(queries: {[key: string]: QueryMetadata},
|
||||
isViewQuery: boolean): cpl.CompileQueryMetadata[] {
|
||||
var compileQueries = [];
|
||||
StringMapWrapper.forEach(queries, (query, propertyName) => {
|
||||
@ -337,7 +341,7 @@ export class CompileMetadataResolver {
|
||||
return compileQueries;
|
||||
}
|
||||
|
||||
getQueryMetadata(q: dimd.QueryMetadata, propertyName: string): cpl.CompileQueryMetadata {
|
||||
getQueryMetadata(q: QueryMetadata, propertyName: string): cpl.CompileQueryMetadata {
|
||||
var selectors;
|
||||
if (q.isVarBindingQuery) {
|
||||
selectors = q.varBindings.map(varName => this.getTokenMetadata(varName));
|
||||
@ -399,9 +403,8 @@ function staticTypeModuleUrl(value: any): string {
|
||||
return isStaticType(value) ? value['moduleId'] : null;
|
||||
}
|
||||
|
||||
|
||||
function calcTemplateBaseUrl(reflector: ReflectorReader, type: any,
|
||||
cmpMetadata: md.ComponentMetadata): string {
|
||||
cmpMetadata: ComponentMetadata): string {
|
||||
if (isStaticType(type)) {
|
||||
return type['filePath'];
|
||||
}
|
||||
@ -410,7 +413,7 @@ function calcTemplateBaseUrl(reflector: ReflectorReader, type: any,
|
||||
var moduleId = cmpMetadata.moduleId;
|
||||
var scheme = getUrlScheme(moduleId);
|
||||
return isPresent(scheme) && scheme.length > 0 ? moduleId :
|
||||
`package:${moduleId}${MODULE_SUFFIX}`;
|
||||
`package:${moduleId}${MODULE_SUFFIX}`;
|
||||
}
|
||||
|
||||
return reflector.importUri(type);
|
||||
|
@ -1,3 +1,5 @@
|
||||
import {ComponentFactory} from '@angular/core';
|
||||
|
||||
import {
|
||||
CompileDirectiveMetadata,
|
||||
CompileIdentifierMetadata,
|
||||
@ -5,24 +7,23 @@ import {
|
||||
createHostComponentMeta
|
||||
} from './compile_metadata';
|
||||
|
||||
import {BaseException, unimplemented} from 'angular2/src/facade/exceptions';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {StyleCompiler, StylesCompileDependency, StylesCompileResult} from './style_compiler';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
import {ListWrapper} from '../src/facade/collection';
|
||||
import {StyleCompiler, StylesCompileResult} from './style_compiler';
|
||||
import {ViewCompiler, ViewCompileResult} from './view_compiler/view_compiler';
|
||||
import {TemplateParser} from './template_parser';
|
||||
import {DirectiveNormalizer} from './directive_normalizer';
|
||||
import {OutputEmitter} from './output/abstract_emitter';
|
||||
import * as o from './output/output_ast';
|
||||
import {ComponentFactory} from 'angular2/src/core/linker/component_factory';
|
||||
|
||||
import {
|
||||
MODULE_SUFFIX,
|
||||
MODULE_SUFFIX, assetUrl,
|
||||
} from './util';
|
||||
|
||||
var _COMPONENT_FACTORY_IDENTIFIER = new CompileIdentifierMetadata({
|
||||
name: 'ComponentFactory',
|
||||
runtime: ComponentFactory,
|
||||
moduleUrl: `asset:angular2/lib/src/core/linker/component_factory${MODULE_SUFFIX}`
|
||||
moduleUrl: assetUrl('core', 'linker/component_factory')
|
||||
});
|
||||
|
||||
export class SourceModule {
|
||||
|
@ -2,12 +2,9 @@ import {
|
||||
isPresent,
|
||||
isBlank,
|
||||
isString,
|
||||
evalExpression,
|
||||
RegExpWrapper,
|
||||
StringWrapper
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {BaseException, unimplemented} from 'angular2/src/facade/exceptions';
|
||||
} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
import * as o from './output_ast';
|
||||
|
||||
var _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {isPresent} from 'angular2/src/facade/lang';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {isPresent} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
import * as o from './output_ast';
|
||||
import {
|
||||
EmitterVisitorContext,
|
||||
|
@ -1,14 +1,9 @@
|
||||
import {
|
||||
StringWrapper,
|
||||
RegExpWrapper,
|
||||
isPresent,
|
||||
isBlank,
|
||||
Math,
|
||||
isString,
|
||||
isArray
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
import {CompileIdentifierMetadata} from '../compile_metadata';
|
||||
import * as o from './output_ast';
|
||||
import {
|
||||
@ -17,7 +12,6 @@ import {
|
||||
AbstractEmitterVisitor,
|
||||
CATCH_ERROR_VAR,
|
||||
CATCH_STACK_VAR,
|
||||
escapeSingleQuoteString
|
||||
} from './abstract_emitter';
|
||||
import {getImportModulePath, ImportEnv} from './path_util';
|
||||
|
||||
@ -381,4 +375,4 @@ function getSuperConstructorCallExpr(stmt: o.Statement): o.Expression {
|
||||
|
||||
function isConstType(type: o.Type): boolean {
|
||||
return isPresent(type) && type.hasModifier(o.TypeModifier.Const);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {isPresent} from 'angular2/src/facade/lang';
|
||||
import {AppView, DebugAppView} from 'angular2/src/core/linker/view';
|
||||
import {AppElement} from 'angular2/src/core/linker/element';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {AppElement, AppView, DebugAppView} from '../../core_private';
|
||||
|
||||
import {isPresent} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
import {InstanceFactory, DynamicInstance} from './output_interpreter';
|
||||
|
||||
export class InterpretiveAppViewInstanceFactory implements InstanceFactory {
|
||||
|
@ -6,8 +6,8 @@ import {
|
||||
evalExpression,
|
||||
RegExpWrapper,
|
||||
StringWrapper
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
} from '../facade/lang';
|
||||
import {BaseException} from '@angular/core';
|
||||
import {OutputEmitter, EmitterVisitorContext} from './abstract_emitter';
|
||||
import {AbstractJsEmitterVisitor} from './abstract_js_emitter';
|
||||
import {getImportModulePath, ImportEnv} from './path_util';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {isString, isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {isString, isPresent, isBlank} from '../../src/facade/lang';
|
||||
import {CompileIdentifierMetadata} from '../compile_metadata';
|
||||
|
||||
//// Types
|
||||
@ -401,7 +401,6 @@ export class LiteralArrayExpr extends Expression {
|
||||
|
||||
export class LiteralMapExpr extends Expression {
|
||||
public valueType: Type = null;
|
||||
;
|
||||
constructor(public entries: Array<Array<string | Expression>>, type: MapType = null) {
|
||||
super(type);
|
||||
if (isPresent(type)) {
|
||||
|
@ -1,16 +1,14 @@
|
||||
import {reflector} from '@angular/core';
|
||||
import {
|
||||
isPresent,
|
||||
isBlank,
|
||||
isString,
|
||||
evalExpression,
|
||||
IS_DART,
|
||||
FunctionWrapper
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {ObservableWrapper} from 'angular2/src/facade/async';
|
||||
} from '../../src/facade/lang';
|
||||
import {ObservableWrapper} from '../../src/facade/async';
|
||||
import {BaseException, unimplemented} from '../../src/facade/exceptions';
|
||||
import {ListWrapper} from '../../src/facade/collection';
|
||||
|
||||
import * as o from './output_ast';
|
||||
import {reflector} from 'angular2/src/core/reflection/reflection';
|
||||
import {BaseException, unimplemented} from 'angular2/src/facade/exceptions';
|
||||
import {MapWrapper, ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {debugOutputAstAsDart} from './dart_emitter';
|
||||
import {debugOutputAstAsTypeScript} from './ts_emitter';
|
||||
|
||||
@ -419,4 +417,4 @@ function _declareFn(varNames: string[], statements: o.Statement[], ctx: _Executi
|
||||
}
|
||||
|
||||
var CATCH_ERROR_VAR = 'error';
|
||||
var CATCH_STACK_VAR = 'stack';
|
||||
var CATCH_STACK_VAR = 'stack';
|
||||
|
@ -1,11 +1,7 @@
|
||||
import {
|
||||
isPresent,
|
||||
isBlank,
|
||||
isString,
|
||||
evalExpression,
|
||||
RegExpWrapper,
|
||||
StringWrapper
|
||||
} from 'angular2/src/facade/lang';
|
||||
} from '../../src/facade/lang';
|
||||
import * as o from './output_ast';
|
||||
import {EmitterVisitorContext} from './abstract_emitter';
|
||||
import {AbstractJsEmitterVisitor} from './abstract_js_emitter';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {isPresent, isBlank, RegExpWrapper, Math} from 'angular2/src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
import {isPresent, isBlank, RegExpWrapper, Math} from '../../src/facade/lang';
|
||||
|
||||
// asset:<package-name>/<realm>/<path-to-module>
|
||||
var _ASSET_URL_RE = /asset:([^\/]+)\/([^\/]+)\/(.+)/g;
|
||||
|
@ -2,14 +2,10 @@ import * as o from './output_ast';
|
||||
import {
|
||||
isPresent,
|
||||
isBlank,
|
||||
isString,
|
||||
evalExpression,
|
||||
RegExpWrapper,
|
||||
StringWrapper,
|
||||
isArray
|
||||
} from 'angular2/src/facade/lang';
|
||||
} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
import {CompileIdentifierMetadata} from '../compile_metadata';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {
|
||||
OutputEmitter,
|
||||
EmitterVisitorContext,
|
||||
|
@ -1,9 +1,11 @@
|
||||
import {resolveForwardRef, Injectable} from 'angular2/src/core/di';
|
||||
import {Type, isPresent, stringify} from 'angular2/src/facade/lang';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {PipeMetadata} from 'angular2/src/core/metadata';
|
||||
import {ReflectorReader} from 'angular2/src/core/reflection/reflector_reader';
|
||||
import {reflector} from 'angular2/src/core/reflection/reflection';
|
||||
import {resolveForwardRef, Injectable, PipeMetadata, reflector} from '@angular/core';
|
||||
|
||||
import {
|
||||
ReflectorReader
|
||||
} from '../core_private';
|
||||
|
||||
import {Type, isPresent, stringify} from '../src/facade/lang';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
|
||||
function _isPipeMetadata(type: any): boolean {
|
||||
return type instanceof PipeMetadata;
|
||||
|
@ -1,23 +1,11 @@
|
||||
import {isPresent, isBlank, isArray, normalizeBlank} from 'angular2/src/facade/lang';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {isPresent, isBlank, isArray, normalizeBlank} from '../src/facade/lang';
|
||||
import {ListWrapper} from '../src/facade/collection';
|
||||
import {
|
||||
TemplateAst,
|
||||
TemplateAstVisitor,
|
||||
NgContentAst,
|
||||
EmbeddedTemplateAst,
|
||||
ElementAst,
|
||||
ReferenceAst,
|
||||
BoundEventAst,
|
||||
BoundElementPropertyAst,
|
||||
VariableAst,
|
||||
AttrAst,
|
||||
BoundTextAst,
|
||||
TextAst,
|
||||
DirectiveAst,
|
||||
BoundDirectivePropertyAst,
|
||||
templateVisitAll,
|
||||
PropertyBindingType,
|
||||
ProviderAst,
|
||||
ProviderAstType
|
||||
ProviderAstType, ReferenceAst
|
||||
} from './template_ast';
|
||||
import {
|
||||
CompileTypeMetadata,
|
||||
@ -29,7 +17,7 @@ import {
|
||||
CompileDiDependencyMetadata
|
||||
} from './compile_metadata';
|
||||
import {Identifiers, identifierToken} from './identifiers';
|
||||
import {ParseSourceSpan, ParseError, ParseLocation} from './parse_util';
|
||||
import {ParseSourceSpan, ParseError} from './parse_util';
|
||||
|
||||
export class ProviderError extends ParseError {
|
||||
constructor(message: string, span: ParseSourceSpan) { super(span, message); }
|
||||
|
@ -1,63 +1,35 @@
|
||||
import {Injectable, ComponentFactory, ComponentResolver} from '@angular/core';
|
||||
|
||||
import {
|
||||
IS_DART,
|
||||
Type,
|
||||
Json,
|
||||
isBlank,
|
||||
isPresent,
|
||||
stringify,
|
||||
evalExpression
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
} from '../src/facade/lang';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
import {
|
||||
ListWrapper,
|
||||
SetWrapper,
|
||||
MapWrapper,
|
||||
StringMapWrapper
|
||||
} from 'angular2/src/facade/collection';
|
||||
import {PromiseWrapper} from 'angular2/src/facade/async';
|
||||
} from '../src/facade/collection';
|
||||
import {PromiseWrapper} from '../src/facade/async';
|
||||
import {
|
||||
createHostComponentMeta,
|
||||
CompileDirectiveMetadata,
|
||||
CompileTypeMetadata,
|
||||
CompileTemplateMetadata,
|
||||
CompilePipeMetadata,
|
||||
CompileMetadataWithType,
|
||||
CompileIdentifierMetadata
|
||||
} from './compile_metadata';
|
||||
import {
|
||||
TemplateAst,
|
||||
TemplateAstVisitor,
|
||||
NgContentAst,
|
||||
EmbeddedTemplateAst,
|
||||
ElementAst,
|
||||
BoundEventAst,
|
||||
BoundElementPropertyAst,
|
||||
AttrAst,
|
||||
BoundTextAst,
|
||||
TextAst,
|
||||
DirectiveAst,
|
||||
BoundDirectivePropertyAst,
|
||||
templateVisitAll
|
||||
} from './template_ast';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {StyleCompiler, StylesCompileDependency, StylesCompileResult} from './style_compiler';
|
||||
import {ViewCompiler} from './view_compiler/view_compiler';
|
||||
import {TemplateParser} from './template_parser';
|
||||
import {DirectiveNormalizer} from './directive_normalizer';
|
||||
import {CompileMetadataResolver} from './metadata_resolver';
|
||||
import {ComponentFactory} from 'angular2/src/core/linker/component_factory';
|
||||
import {
|
||||
ComponentResolver,
|
||||
ReflectorComponentResolver
|
||||
} from 'angular2/src/core/linker/component_resolver';
|
||||
|
||||
import {CompilerConfig} from './config';
|
||||
import * as ir from './output/output_ast';
|
||||
import {jitStatements} from './output/output_jit';
|
||||
import {interpretStatements} from './output/output_interpreter';
|
||||
import {InterpretiveAppViewInstanceFactory} from './output/interpretive_view';
|
||||
|
||||
import {XHR} from 'angular2/src/compiler/xhr';
|
||||
import {XHR} from './xhr';
|
||||
|
||||
/**
|
||||
* An internal module of the Angular compiler that begins with component types,
|
||||
|
@ -1,29 +1,243 @@
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {splitNsName} from 'angular2/src/compiler/html_tags';
|
||||
|
||||
import {Injectable} from '@angular/core';
|
||||
import {isPresent} from '../facade/lang';
|
||||
import {StringMapWrapper} from '../facade/collection';
|
||||
import {ElementSchemaRegistry} from './element_schema_registry';
|
||||
|
||||
const NAMESPACE_URIS =
|
||||
/*@ts2dart_const*/
|
||||
{'xlink': 'http://www.w3.org/1999/xlink', 'svg': 'http://www.w3.org/2000/svg'};
|
||||
const EVENT = 'event';
|
||||
const BOOLEAN = 'boolean';
|
||||
const NUMBER = 'number';
|
||||
const STRING = 'string';
|
||||
const OBJECT = 'object';
|
||||
|
||||
/**
|
||||
* This array represents the DOM schema. It encodes inheritance, properties, and events.
|
||||
*
|
||||
* ## Overview
|
||||
*
|
||||
* Each line represents one kind of element. The `element_inheritance` and properties are joined
|
||||
* using `element_inheritance|preperties` syntax.
|
||||
*
|
||||
* ## Element Inheritance
|
||||
*
|
||||
* The `element_inheritance` can be further subdivided as `element1,element2,...^parentElement`.
|
||||
* Here the individual elements are separated by `,` (commas). Every element in the list
|
||||
* has identical properties.
|
||||
*
|
||||
* An `element` may inherit additional properties from `parentElement` If no `^parentElement` is
|
||||
* specified then `""` (blank) element is assumed.
|
||||
*
|
||||
* NOTE: The blank element inherits from root `*` element, the super element of all elements.
|
||||
*
|
||||
* NOTE an element prefix such as `@svg:` has no special meaning to the schema.
|
||||
*
|
||||
* ## Properties
|
||||
*
|
||||
* Each element has a set of properties separated by `,` (commas). Each property can be prefixed
|
||||
* by a special character designating its type:
|
||||
*
|
||||
* - (no prefix): property is a string.
|
||||
* - `*`: property represents an event.
|
||||
* - `!`: property is a boolean.
|
||||
* - `#`: property is a number.
|
||||
* - `%`: property is an object.
|
||||
*
|
||||
* ## Query
|
||||
*
|
||||
* The class creates an internal squas representaino which allows to easily answer the query of
|
||||
* if a given property exist on a given element.
|
||||
*
|
||||
* NOTE: We don't yet support querying for types or events.
|
||||
* NOTE: This schema is auto extracted from `schema_extractor.ts` located in the test folder.
|
||||
*/
|
||||
const SCHEMA: string[] =
|
||||
/*@ts2dart_const*/ ([
|
||||
'*|%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop',
|
||||
'^*|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*autocomplete,*autocompleteerror,*beforecopy,*beforecut,*beforepaste,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*message,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*paste,*pause,*play,*playing,*progress,*ratechange,*reset,*resize,*scroll,*search,*seeked,*seeking,*select,*selectstart,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate',
|
||||
'media|!autoplay,!controls,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,#playbackRate,preload,src,#volume',
|
||||
'@svg:^*|*abort,*autocomplete,*autocompleteerror,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex',
|
||||
'@svg:graphics^@svg:|',
|
||||
'@svg:animation^@svg:|*begin,*end,*repeat',
|
||||
'@svg:geometry^@svg:|',
|
||||
'@svg:componentTransferFunction^@svg:|',
|
||||
'@svg:gradient^@svg:|',
|
||||
'@svg:textContent^@svg:graphics|',
|
||||
'@svg:textPositioning^@svg:textContent|',
|
||||
'a|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,rel,rev,search,shape,target,text,type,username',
|
||||
'area|alt,coords,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,search,shape,target,username',
|
||||
'audio^media|',
|
||||
'br|clear',
|
||||
'base|href,target',
|
||||
'body|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink',
|
||||
'button|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value',
|
||||
'canvas|#height,#width',
|
||||
'content|select',
|
||||
'dl|!compact',
|
||||
'datalist|',
|
||||
'details|!open',
|
||||
'dialog|!open,returnValue',
|
||||
'dir|!compact',
|
||||
'div|align',
|
||||
'embed|align,height,name,src,type,width',
|
||||
'fieldset|!disabled,name',
|
||||
'font|color,face,size',
|
||||
'form|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target',
|
||||
'frame|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src',
|
||||
'frameset|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows',
|
||||
'hr|align,color,!noShade,size,width',
|
||||
'head|',
|
||||
'h1,h2,h3,h4,h5,h6|align',
|
||||
'html|version',
|
||||
'iframe|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,%sandbox,scrolling,src,srcdoc,width',
|
||||
'img|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,sizes,src,srcset,useMap,#vspace,#width',
|
||||
'input|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width',
|
||||
'keygen|!autofocus,challenge,!disabled,keytype,name',
|
||||
'li|type,#value',
|
||||
'label|htmlFor',
|
||||
'legend|align',
|
||||
'link|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,rel,%relList,rev,%sizes,target,type',
|
||||
'map|name',
|
||||
'marquee|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width',
|
||||
'menu|!compact',
|
||||
'meta|content,httpEquiv,name,scheme',
|
||||
'meter|#high,#low,#max,#min,#optimum,#value',
|
||||
'ins,del|cite,dateTime',
|
||||
'ol|!compact,!reversed,#start,type',
|
||||
'object|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width',
|
||||
'optgroup|!disabled,label',
|
||||
'option|!defaultSelected,!disabled,label,!selected,text,value',
|
||||
'output|defaultValue,%htmlFor,name,value',
|
||||
'p|align',
|
||||
'param|name,type,value,valueType',
|
||||
'picture|',
|
||||
'pre|#width',
|
||||
'progress|#max,#value',
|
||||
'q,blockquote,cite|',
|
||||
'script|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type',
|
||||
'select|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value',
|
||||
'shadow|',
|
||||
'source|media,sizes,src,srcset,type',
|
||||
'span|',
|
||||
'style|!disabled,media,type',
|
||||
'caption|align',
|
||||
'th,td|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width',
|
||||
'col,colgroup|align,ch,chOff,#span,vAlign,width',
|
||||
'table|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width',
|
||||
'tr|align,bgColor,ch,chOff,vAlign',
|
||||
'tfoot,thead,tbody|align,ch,chOff,vAlign',
|
||||
'template|',
|
||||
'textarea|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap',
|
||||
'title|text',
|
||||
'track|!default,kind,label,src,srclang',
|
||||
'ul|!compact,type',
|
||||
'unknown|',
|
||||
'video^media|#height,poster,#width',
|
||||
'@svg:a^@svg:graphics|',
|
||||
'@svg:animate^@svg:animation|',
|
||||
'@svg:animateMotion^@svg:animation|',
|
||||
'@svg:animateTransform^@svg:animation|',
|
||||
'@svg:circle^@svg:geometry|',
|
||||
'@svg:clipPath^@svg:graphics|',
|
||||
'@svg:cursor^@svg:|',
|
||||
'@svg:defs^@svg:graphics|',
|
||||
'@svg:desc^@svg:|',
|
||||
'@svg:discard^@svg:|',
|
||||
'@svg:ellipse^@svg:geometry|',
|
||||
'@svg:feBlend^@svg:|',
|
||||
'@svg:feColorMatrix^@svg:|',
|
||||
'@svg:feComponentTransfer^@svg:|',
|
||||
'@svg:feComposite^@svg:|',
|
||||
'@svg:feConvolveMatrix^@svg:|',
|
||||
'@svg:feDiffuseLighting^@svg:|',
|
||||
'@svg:feDisplacementMap^@svg:|',
|
||||
'@svg:feDistantLight^@svg:|',
|
||||
'@svg:feDropShadow^@svg:|',
|
||||
'@svg:feFlood^@svg:|',
|
||||
'@svg:feFuncA^@svg:componentTransferFunction|',
|
||||
'@svg:feFuncB^@svg:componentTransferFunction|',
|
||||
'@svg:feFuncG^@svg:componentTransferFunction|',
|
||||
'@svg:feFuncR^@svg:componentTransferFunction|',
|
||||
'@svg:feGaussianBlur^@svg:|',
|
||||
'@svg:feImage^@svg:|',
|
||||
'@svg:feMerge^@svg:|',
|
||||
'@svg:feMergeNode^@svg:|',
|
||||
'@svg:feMorphology^@svg:|',
|
||||
'@svg:feOffset^@svg:|',
|
||||
'@svg:fePointLight^@svg:|',
|
||||
'@svg:feSpecularLighting^@svg:|',
|
||||
'@svg:feSpotLight^@svg:|',
|
||||
'@svg:feTile^@svg:|',
|
||||
'@svg:feTurbulence^@svg:|',
|
||||
'@svg:filter^@svg:|',
|
||||
'@svg:foreignObject^@svg:graphics|',
|
||||
'@svg:g^@svg:graphics|',
|
||||
'@svg:image^@svg:graphics|',
|
||||
'@svg:line^@svg:geometry|',
|
||||
'@svg:linearGradient^@svg:gradient|',
|
||||
'@svg:mpath^@svg:|',
|
||||
'@svg:marker^@svg:|',
|
||||
'@svg:mask^@svg:|',
|
||||
'@svg:metadata^@svg:|',
|
||||
'@svg:path^@svg:geometry|',
|
||||
'@svg:pattern^@svg:|',
|
||||
'@svg:polygon^@svg:geometry|',
|
||||
'@svg:polyline^@svg:geometry|',
|
||||
'@svg:radialGradient^@svg:gradient|',
|
||||
'@svg:rect^@svg:geometry|',
|
||||
'@svg:svg^@svg:graphics|#currentScale,#zoomAndPan',
|
||||
'@svg:script^@svg:|type',
|
||||
'@svg:set^@svg:animation|',
|
||||
'@svg:stop^@svg:|',
|
||||
'@svg:style^@svg:|!disabled,media,title,type',
|
||||
'@svg:switch^@svg:graphics|',
|
||||
'@svg:symbol^@svg:|',
|
||||
'@svg:tspan^@svg:textPositioning|',
|
||||
'@svg:text^@svg:textPositioning|',
|
||||
'@svg:textPath^@svg:textContent|',
|
||||
'@svg:title^@svg:|',
|
||||
'@svg:use^@svg:graphics|',
|
||||
'@svg:view^@svg:|#zoomAndPan'
|
||||
]);
|
||||
|
||||
var attrToPropMap: {[name: string]: string} = <any>{
|
||||
'class': 'className',
|
||||
'innerHtml': 'innerHTML',
|
||||
'readonly': 'readOnly',
|
||||
'tabindex': 'tabIndex'
|
||||
};
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
||||
private _protoElements = new Map<string, Element>();
|
||||
export class DomElementSchemaRegistry implements ElementSchemaRegistry {
|
||||
schema = <{[element: string]: {[property: string]: string}}>{};
|
||||
|
||||
private _getProtoElement(tagName: string): Element {
|
||||
var element = this._protoElements.get(tagName);
|
||||
if (isBlank(element)) {
|
||||
var nsAndName = splitNsName(tagName);
|
||||
element = isPresent(nsAndName[0]) ?
|
||||
DOM.createElementNS(NAMESPACE_URIS[nsAndName[0]], nsAndName[1]) :
|
||||
DOM.createElement(nsAndName[1]);
|
||||
this._protoElements.set(tagName, element);
|
||||
}
|
||||
return element;
|
||||
constructor() {
|
||||
SCHEMA.forEach(encodedType => {
|
||||
var parts = encodedType.split('|');
|
||||
var properties = parts[1].split(',');
|
||||
var typeParts = (parts[0] + '^').split('^');
|
||||
var typeName = typeParts[0];
|
||||
var type = <{[property: string]: string}>{};
|
||||
typeName.split(',').forEach(tag => this.schema[tag] = type);
|
||||
var superType = this.schema[typeParts[1]];
|
||||
if (isPresent(superType)) {
|
||||
StringMapWrapper.forEach(superType, (v, k) => type[k] = v);
|
||||
}
|
||||
properties.forEach((property: string) => {
|
||||
if (property == '') {
|
||||
} else if (property.startsWith('*')) {
|
||||
// We don't yet support events.
|
||||
// type[property.substring(1)] = EVENT;
|
||||
} else if (property.startsWith('!')) {
|
||||
type[property.substring(1)] = BOOLEAN;
|
||||
} else if (property.startsWith('#')) {
|
||||
type[property.substring(1)] = NUMBER;
|
||||
} else if (property.startsWith('%')) {
|
||||
type[property.substring(1)] = OBJECT;
|
||||
} else {
|
||||
type[property] = STRING;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
hasProperty(tagName: string, propName: string): boolean {
|
||||
@ -32,13 +246,16 @@ export class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
||||
// once it is instantiated
|
||||
return true;
|
||||
} else {
|
||||
var elm = this._getProtoElement(tagName);
|
||||
return DOM.hasProperty(elm, propName);
|
||||
var elementProperties = this.schema[tagName.toLowerCase()];
|
||||
if (!isPresent(elementProperties)) {
|
||||
elementProperties = this.schema['unknown'];
|
||||
}
|
||||
return isPresent(elementProperties[propName]);
|
||||
}
|
||||
}
|
||||
|
||||
getMappedPropName(propName: string): string {
|
||||
var mappedPropName = StringMapWrapper.get(DOM.attrToPropMap, propName);
|
||||
var mappedPropName = StringMapWrapper.get(attrToPropMap, propName);
|
||||
return isPresent(mappedPropName) ? mappedPropName : propName;
|
||||
}
|
||||
}
|
||||
|
@ -2,3 +2,4 @@ export class ElementSchemaRegistry {
|
||||
hasProperty(tagName: string, propName: string): boolean { return true; }
|
||||
getMappedPropName(propName: string): string { return propName; }
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
import {Map, ListWrapper, MapWrapper} from 'angular2/src/facade/collection';
|
||||
import {Map, ListWrapper} from '../src/facade/collection';
|
||||
import {
|
||||
isPresent,
|
||||
isBlank,
|
||||
RegExpWrapper,
|
||||
RegExpMatcherWrapper,
|
||||
StringWrapper
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
} from '../src/facade/lang';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
|
||||
const _EMPTY_ATTR_VALUE = /*@ts2dart_const*/ '';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {ListWrapper} from '../src/facade/collection';
|
||||
import {
|
||||
StringWrapper,
|
||||
RegExp,
|
||||
@ -6,7 +6,7 @@ import {
|
||||
RegExpMatcherWrapper,
|
||||
isPresent,
|
||||
isBlank
|
||||
} from 'angular2/src/facade/lang';
|
||||
} from '../src/facade/lang';
|
||||
|
||||
/**
|
||||
* This file is a port of shadowCSS from webcomponents.js to TypeScript.
|
||||
|
@ -1,15 +1,13 @@
|
||||
import {ViewEncapsulation, Injectable} from '@angular/core';
|
||||
import {
|
||||
CompileTemplateMetadata,
|
||||
CompileIdentifierMetadata,
|
||||
CompileDirectiveMetadata
|
||||
} from './compile_metadata';
|
||||
import * as o from './output/output_ast';
|
||||
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||
import {ShadowCss} from 'angular2/src/compiler/shadow_css';
|
||||
import {UrlResolver} from 'angular2/src/compiler/url_resolver';
|
||||
import {ShadowCss} from './shadow_css';
|
||||
import {UrlResolver} from './url_resolver';
|
||||
import {extractStyleUrls} from './style_url_resolver';
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {isPresent} from 'angular2/src/facade/lang';
|
||||
import {isPresent} from '../src/facade/lang';
|
||||
|
||||
const COMPONENT_VARIABLE = '%COMP%';
|
||||
const HOST_ATTR = /*@ts2dart_const*/ `_nghost-${COMPONENT_VARIABLE}`;
|
||||
@ -74,4 +72,4 @@ function getStylesVarName(component: CompileDirectiveMetadata): string {
|
||||
result += `_${component.type.name}`;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
// Some of the code comes from WebComponents.JS
|
||||
// https://github.com/webcomponents/webcomponentsjs/blob/master/src/HTMLImports/path.js
|
||||
|
||||
import {RegExp, RegExpWrapper, StringWrapper, isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {UrlResolver} from 'angular2/src/compiler/url_resolver';
|
||||
import {RegExpWrapper, StringWrapper, isPresent, isBlank} from '../src/facade/lang';
|
||||
import {UrlResolver} from './url_resolver';
|
||||
|
||||
export class StyleWithImports {
|
||||
constructor(public style: string, public styleUrls: string[]) {}
|
||||
|
@ -1,11 +1,9 @@
|
||||
import {AST} from './expression_parser/ast';
|
||||
import {isPresent} from 'angular2/src/facade/lang';
|
||||
import {isPresent} from '../src/facade/lang';
|
||||
import {
|
||||
CompileDirectiveMetadata,
|
||||
CompileTokenMetadata,
|
||||
CompileProviderMetadata,
|
||||
CompileTokenMap,
|
||||
CompileQueryMetadata
|
||||
} from './compile_metadata';
|
||||
import {ParseSourceSpan} from './parse_util';
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
import {Injectable, Inject, OpaqueToken, Optional} from '@angular/core';
|
||||
import {MAX_INTERPOLATION_VALUES, Console} from '../core_private';
|
||||
|
||||
import {
|
||||
ListWrapper,
|
||||
StringMapWrapper,
|
||||
SetWrapper,
|
||||
MapWrapper
|
||||
} from 'angular2/src/facade/collection';
|
||||
import {RegExpWrapper, isPresent, StringWrapper, isBlank, isArray} from 'angular2/src/facade/lang';
|
||||
import {Injectable, Inject, OpaqueToken, Optional} from 'angular2/core';
|
||||
import {Console} from 'angular2/src/core/console';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
} from '../src/facade/collection';
|
||||
import {RegExpWrapper, isPresent, StringWrapper, isBlank, isArray} from '../src/facade/lang';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
import {
|
||||
AST,
|
||||
Interpolation,
|
||||
@ -18,18 +18,13 @@ import {
|
||||
} from './expression_parser/ast';
|
||||
import {Parser} from './expression_parser/parser';
|
||||
import {
|
||||
CompileTokenMap,
|
||||
CompileDirectiveMetadata,
|
||||
CompilePipeMetadata,
|
||||
CompileMetadataWithType,
|
||||
CompileProviderMetadata,
|
||||
CompileTokenMetadata,
|
||||
CompileTypeMetadata
|
||||
} from './compile_metadata';
|
||||
import {HtmlParser} from './html_parser';
|
||||
import {splitNsName, mergeNsAndName} from './html_tags';
|
||||
import {ParseSourceSpan, ParseError, ParseLocation, ParseErrorLevel} from './parse_util';
|
||||
import {MAX_INTERPOLATION_VALUES} from 'angular2/src/core/linker/view_utils';
|
||||
|
||||
import {
|
||||
ElementAst,
|
||||
@ -51,16 +46,15 @@ import {
|
||||
ProviderAstType,
|
||||
VariableAst
|
||||
} from './template_ast';
|
||||
import {CssSelector, SelectorMatcher} from 'angular2/src/compiler/selector';
|
||||
import {CssSelector, SelectorMatcher} from './selector';
|
||||
|
||||
import {ElementSchemaRegistry} from 'angular2/src/compiler/schema/element_schema_registry';
|
||||
import {preparseElement, PreparsedElement, PreparsedElementType} from './template_preparser';
|
||||
import {ElementSchemaRegistry} from './schema/element_schema_registry';
|
||||
import {preparseElement, PreparsedElementType} from './template_preparser';
|
||||
|
||||
import {isStyleUrlResolvable} from './style_url_resolver';
|
||||
|
||||
import {
|
||||
HtmlAstVisitor,
|
||||
HtmlAst,
|
||||
HtmlElementAst,
|
||||
HtmlAttrAst,
|
||||
HtmlTextAst,
|
||||
|
@ -1,5 +1,6 @@
|
||||
import {isBlank} from '../src/facade/lang';
|
||||
|
||||
import {HtmlElementAst} from './html_ast';
|
||||
import {isBlank, isPresent} from 'angular2/src/facade/lang';
|
||||
import {splitNsName} from './html_tags';
|
||||
|
||||
const NG_CONTENT_SELECT_ATTR = 'select';
|
||||
|
@ -1,14 +1,11 @@
|
||||
import {Provider, Injectable, Inject} from 'angular2/src/core/di';
|
||||
import {Injectable, Inject, PACKAGE_ROOT_URL} from '@angular/core';
|
||||
import {
|
||||
StringWrapper,
|
||||
isPresent,
|
||||
isBlank,
|
||||
RegExpWrapper,
|
||||
normalizeBlank
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {BaseException, WrappedException} from 'angular2/src/facade/exceptions';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {PACKAGE_ROOT_URL} from 'angular2/src/core/application_tokens';
|
||||
} from '../src/facade/lang';
|
||||
|
||||
|
||||
const _ASSET_SCHEME = 'asset:';
|
||||
|
||||
|
@ -6,8 +6,8 @@ import {
|
||||
isArray,
|
||||
isStrictStringMap,
|
||||
isPrimitive
|
||||
} from 'angular2/src/facade/lang';
|
||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
} from './facade/lang';
|
||||
import {StringMapWrapper} from './facade/collection';
|
||||
|
||||
export var MODULE_SUFFIX = IS_DART ? '.dart' : '';
|
||||
|
||||
@ -69,3 +69,19 @@ export class ValueTransformer implements ValueVisitor {
|
||||
visitPrimitive(value: any, context: any): any { return value; }
|
||||
visitOther(value: any, context: any): any { return value; }
|
||||
}
|
||||
|
||||
export function assetUrl(pkg: string, path: string = null, type:string = 'src'): string {
|
||||
if (IS_DART) {
|
||||
if (path == null) {
|
||||
return `asset:angular2/${pkg}/${pkg}.dart`;
|
||||
} else {
|
||||
return `asset:angular2/lib/${pkg}/src/${path}.dart`;
|
||||
}
|
||||
} else {
|
||||
if (path == null) {
|
||||
return `asset:@angular/lib/${pkg}/index`;
|
||||
} else {
|
||||
return `asset:@angular/lib/${pkg}/src/${path}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {BaseException} from '@angular/core';
|
||||
import {isPresent, isBlank} from '../../src/facade/lang';
|
||||
import {ListWrapper, StringMapWrapper} from '../../src/facade/collection';
|
||||
|
||||
import * as o from '../output/output_ast';
|
||||
import {Identifiers, identifierToken} from '../identifiers';
|
||||
import {InjectMethodVars} from './constants';
|
||||
import {CompileView} from './compile_view';
|
||||
import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {TemplateAst, ProviderAst, ProviderAstType, ReferenceAst} from '../template_ast';
|
||||
import {
|
||||
CompileTokenMap,
|
||||
@ -14,7 +15,6 @@ import {
|
||||
CompileProviderMetadata,
|
||||
CompileDiDependencyMetadata,
|
||||
CompileIdentifierMetadata,
|
||||
CompileTypeMetadata,
|
||||
} from '../compile_metadata';
|
||||
import {getPropertyInView, createDiTokenExpression, injectFromViewParentInjector} from './util';
|
||||
import {CompileQuery, createQueryList, addQueryToTokenMap} from './compile_query';
|
||||
@ -424,4 +424,4 @@ class _ValueOutputAstTransformer extends ValueTransformer {
|
||||
throw new BaseException(`Illegal state: Don't now how to compile value ${value}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {MapWrapper, ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {isPresent} from '../../src/facade/lang';
|
||||
import {ListWrapper} from '../../src/facade/collection';
|
||||
|
||||
import * as o from '../output/output_ast';
|
||||
import {TemplateAst} from '../template_ast';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {isBlank, isPresent} from 'angular2/src/facade/lang';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {isBlank, isPresent} from '../facade/lang';
|
||||
import {BaseException} from '../facade/exceptions';
|
||||
import * as o from '../output/output_ast';
|
||||
import {CompileView} from './compile_view';
|
||||
import {CompilePipeMetadata} from '../compile_metadata';
|
||||
|
@ -1,12 +1,11 @@
|
||||
import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
import {isPresent, isBlank} from '../../src/facade/lang';
|
||||
import {ListWrapper} from '../../src/facade/collection';
|
||||
|
||||
import * as o from '../output/output_ast';
|
||||
import {Identifiers} from '../identifiers';
|
||||
|
||||
import {
|
||||
CompileQueryMetadata,
|
||||
CompileIdentifierMetadata,
|
||||
CompileTokenMap
|
||||
} from '../compile_metadata';
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {ListWrapper, StringMapWrapper, MapWrapper} from 'angular2/src/facade/collection';
|
||||
import {ViewType} from '../../core_private';
|
||||
|
||||
import {isPresent, isBlank} from '../../src/facade/lang';
|
||||
import {ListWrapper} from '../../src/facade/collection';
|
||||
|
||||
import * as o from '../output/output_ast';
|
||||
import {EventHandlerVars} from './constants';
|
||||
@ -8,7 +10,6 @@ import {NameResolver} from './expression_converter';
|
||||
import {CompileElement, CompileNode} from './compile_element';
|
||||
import {CompileMethod} from './compile_method';
|
||||
import {CompilePipe} from './compile_pipe';
|
||||
import {ViewType} from 'angular2/src/core/linker/view_type';
|
||||
import {
|
||||
CompileDirectiveMetadata,
|
||||
CompilePipeMetadata,
|
||||
@ -19,8 +20,7 @@ import {
|
||||
getViewFactoryName,
|
||||
injectFromViewParentInjector,
|
||||
createDiTokenExpression,
|
||||
getPropertyInView,
|
||||
createPureProxy
|
||||
getPropertyInView, createPureProxy
|
||||
} from './util';
|
||||
import {CompilerConfig} from '../config';
|
||||
import {CompileBinding} from './compile_binding';
|
||||
|
@ -1,11 +1,8 @@
|
||||
import {serializeEnum, isBlank, resolveEnumToken} from 'angular2/src/facade/lang';
|
||||
import {CompileIdentifierMetadata, CompileTokenMetadata} from '../compile_metadata';
|
||||
import {
|
||||
ChangeDetectorState,
|
||||
ChangeDetectionStrategy
|
||||
} from 'angular2/src/core/change_detection/change_detection';
|
||||
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||
import {ViewType} from 'angular2/src/core/linker/view_type';
|
||||
import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
import {ChangeDetectorState, ViewType} from '../../core_private';
|
||||
|
||||
import {isBlank, resolveEnumToken} from '../../src/facade/lang';
|
||||
import {CompileIdentifierMetadata} from '../compile_metadata';
|
||||
import * as o from '../output/output_ast';
|
||||
import {Identifiers} from '../identifiers';
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import {isBlank, isPresent, StringWrapper} from 'angular2/src/facade/lang';
|
||||
import {ListWrapper, StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {isBlank, isPresent, StringWrapper} from '../../src/facade/lang';
|
||||
import {ListWrapper, StringMapWrapper} from '../../src/facade/collection';
|
||||
|
||||
import {EventHandlerVars, ViewProperties} from './constants';
|
||||
|
||||
import * as o from '../output/output_ast';
|
||||
|
@ -1,10 +1,10 @@
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
import {isBlank, isPresent, isArray} from '../../src/facade/lang';
|
||||
|
||||
import * as cdAst from '../expression_parser/ast';
|
||||
import * as o from '../output/output_ast';
|
||||
import {Identifiers} from '../identifiers';
|
||||
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {isBlank, isPresent, isArray} from 'angular2/src/facade/lang';
|
||||
|
||||
var IMPLICIT_RECEIVER = o.variable('#implicit');
|
||||
|
||||
export interface NameResolver {
|
||||
|
@ -1,12 +1,13 @@
|
||||
import {LifecycleHooks} from '../../core_private';
|
||||
import * as o from '../output/output_ast';
|
||||
import {DetectChangesVars, ChangeDetectorStateEnum} from './constants';
|
||||
import {LifecycleHooks} from 'angular2/src/core/metadata/lifecycle_hooks';
|
||||
|
||||
import {CompileDirectiveMetadata, CompilePipeMetadata} from '../compile_metadata';
|
||||
import {DirectiveAst} from '../template_ast';
|
||||
import {CompileElement} from './compile_element';
|
||||
import {CompileView} from './compile_view';
|
||||
|
||||
|
||||
|
||||
var STATE_IS_NEVER_CHECKED =
|
||||
o.THIS_EXPR.prop('cdState').identical(ChangeDetectorStateEnum.NeverChecked);
|
||||
var NOT_THROW_ON_CHANGES = o.not(DetectChangesVars.throwOnChange);
|
||||
|
@ -1,3 +1,7 @@
|
||||
import {LifecycleHooks, isDefaultChangeDetectionStrategy} from '../../core_private';
|
||||
|
||||
import {isBlank, isPresent} from '../../src/facade/lang';
|
||||
|
||||
import * as cdAst from '../expression_parser/ast';
|
||||
import * as o from '../output/output_ast';
|
||||
import {Identifiers} from '../identifiers';
|
||||
@ -8,23 +12,19 @@ import {
|
||||
BoundElementPropertyAst,
|
||||
DirectiveAst,
|
||||
PropertyBindingType,
|
||||
TemplateAst
|
||||
} from '../template_ast';
|
||||
|
||||
import {isBlank, isPresent, isArray} from 'angular2/src/facade/lang';
|
||||
|
||||
import {CompileView} from './compile_view';
|
||||
import {CompileElement, CompileNode} from './compile_element';
|
||||
import {CompileMethod} from './compile_method';
|
||||
|
||||
import {LifecycleHooks} from 'angular2/src/core/metadata/lifecycle_hooks';
|
||||
import {isDefaultChangeDetectionStrategy} from 'angular2/src/core/change_detection/constants';
|
||||
import {camelCaseToDashCase} from '../util';
|
||||
|
||||
import {convertCdExpressionToIr} from './expression_converter';
|
||||
|
||||
import {CompileBinding} from './compile_binding';
|
||||
|
||||
|
||||
function createBindFieldExpr(exprIndex: number): o.ReadPropExpr {
|
||||
return o.THIS_EXPR.prop(`_expr_${exprIndex}`);
|
||||
}
|
||||
|
@ -1,11 +1,10 @@
|
||||
import {isPresent, isBlank} from 'angular2/src/facade/lang';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {isPresent, isBlank} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
|
||||
import * as o from '../output/output_ast';
|
||||
import {
|
||||
CompileTokenMetadata,
|
||||
CompileDirectiveMetadata,
|
||||
CompileIdentifierMetadata
|
||||
} from '../compile_metadata';
|
||||
import {CompileView} from './compile_view';
|
||||
import {Identifiers} from '../identifiers';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {
|
||||
ListWrapper,
|
||||
} from 'angular2/src/facade/collection';
|
||||
} from '../../src/facade/collection';
|
||||
import {
|
||||
TemplateAst,
|
||||
TemplateAstVisitor,
|
||||
@ -17,8 +17,6 @@ import {
|
||||
DirectiveAst,
|
||||
BoundDirectivePropertyAst,
|
||||
templateVisitAll,
|
||||
PropertyBindingType,
|
||||
ProviderAst
|
||||
} from '../template_ast';
|
||||
import {
|
||||
bindRenderText,
|
||||
|
@ -1,5 +1,8 @@
|
||||
import {isPresent, isBlank, StringWrapper} from 'angular2/src/facade/lang';
|
||||
import {ListWrapper, StringMapWrapper, SetWrapper} from 'angular2/src/facade/collection';
|
||||
import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';
|
||||
import {isDefaultChangeDetectionStrategy, ViewType} from '../../core_private';
|
||||
|
||||
import {isPresent, StringWrapper} from '../../src/facade/lang';
|
||||
import {ListWrapper, StringMapWrapper, SetWrapper} from '../../src/facade/collection';
|
||||
|
||||
import * as o from '../output/output_ast';
|
||||
import {Identifiers, identifierToken} from '../identifiers';
|
||||
@ -12,10 +15,6 @@ import {
|
||||
ChangeDetectionStrategyEnum,
|
||||
ViewProperties
|
||||
} from './constants';
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
isDefaultChangeDetectionStrategy
|
||||
} from 'angular2/src/core/change_detection/change_detection';
|
||||
|
||||
import {CompileView} from './compile_view';
|
||||
import {CompileElement, CompileNode} from './compile_element';
|
||||
@ -36,15 +35,10 @@ import {
|
||||
DirectiveAst,
|
||||
BoundDirectivePropertyAst,
|
||||
templateVisitAll,
|
||||
PropertyBindingType,
|
||||
ProviderAst
|
||||
} from '../template_ast';
|
||||
|
||||
import {getViewFactoryName, createFlatArray, createDiTokenExpression} from './util';
|
||||
|
||||
import {ViewType} from 'angular2/src/core/linker/view_type';
|
||||
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||
|
||||
import {
|
||||
CompileIdentifierMetadata,
|
||||
CompileDirectiveMetadata,
|
||||
|
@ -1,13 +1,10 @@
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
|
||||
import {Injectable} from '@angular/core';
|
||||
import * as o from '../output/output_ast';
|
||||
import {CompileElement} from './compile_element';
|
||||
import {CompileView} from './compile_view';
|
||||
import {buildView, finishView, ViewCompileDependency} from './view_builder';
|
||||
import {bindView} from './view_binder';
|
||||
|
||||
import {CompileDirectiveMetadata, CompilePipeMetadata} from '../compile_metadata';
|
||||
|
||||
import {TemplateAst} from '../template_ast';
|
||||
import {CompilerConfig} from '../config';
|
||||
|
||||
|
@ -1,13 +1,17 @@
|
||||
import {Injectable} from 'angular2/src/core/di';
|
||||
import {ViewMetadata} from 'angular2/src/core/metadata/view';
|
||||
import {ComponentMetadata} from 'angular2/src/core/metadata/directives';
|
||||
import {
|
||||
Injectable,
|
||||
ViewMetadata,
|
||||
ComponentMetadata,
|
||||
reflector,
|
||||
} from '@angular/core';
|
||||
|
||||
import {Type, stringify, isBlank, isPresent} from 'angular2/src/facade/lang';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {Map} from 'angular2/src/facade/collection';
|
||||
import {
|
||||
ReflectorReader
|
||||
} from '../core_private';
|
||||
|
||||
import {ReflectorReader} from 'angular2/src/core/reflection/reflector_reader';
|
||||
import {reflector} from 'angular2/src/core/reflection/reflection';
|
||||
import {Type, stringify, isBlank, isPresent} from '../src/facade/lang';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
import {Map} from '../src/facade/collection';
|
||||
|
||||
/**
|
||||
* Resolves types to {@link ViewMetadata}.
|
||||
|
@ -1,16 +1,13 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
describe,
|
||||
el,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
it,
|
||||
xit,
|
||||
TestComponentBuilder
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {
|
||||
CompileDirectiveMetadata,
|
||||
@ -22,10 +19,10 @@ import {
|
||||
CompileIdentifierMetadata,
|
||||
CompileFactoryMetadata,
|
||||
CompileTokenMetadata
|
||||
} from 'angular2/src/compiler/compile_metadata';
|
||||
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||
import {ChangeDetectionStrategy} from 'angular2/src/core/change_detection';
|
||||
import {LifecycleHooks} from 'angular2/src/core/metadata/lifecycle_hooks';
|
||||
} from '@angular/compiler/src/compile_metadata';
|
||||
import {ViewEncapsulation} from '@angular/core/src/metadata/view';
|
||||
import {ChangeDetectionStrategy} from '@angular/core/src/change_detection';
|
||||
import {LifecycleHooks} from '@angular/core/src/metadata/lifecycle_hooks';
|
||||
|
||||
export function main() {
|
||||
describe('CompileMetadata', () => {
|
||||
|
@ -7,9 +7,9 @@ import {
|
||||
expect,
|
||||
beforeEach,
|
||||
afterEach
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {isPresent} from "angular2/src/facade/lang";
|
||||
import {isPresent} from '../../src/facade/lang';
|
||||
|
||||
import {
|
||||
CssToken,
|
||||
@ -17,7 +17,7 @@ import {
|
||||
CssLexer,
|
||||
CssLexerMode,
|
||||
CssTokenType
|
||||
} from 'angular2/src/compiler/css/lexer';
|
||||
} from '@angular/compiler/src/css/lexer';
|
||||
|
||||
export function main() {
|
||||
function tokenize(code, trackComments: boolean = false,
|
||||
|
@ -7,9 +7,9 @@ import {
|
||||
expect,
|
||||
beforeEach,
|
||||
afterEach
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
|
||||
import {
|
||||
ParsedCssResult,
|
||||
@ -29,9 +29,9 @@ import {
|
||||
CssRuleAST,
|
||||
CssBlockAST,
|
||||
CssParseError
|
||||
} from 'angular2/src/compiler/css/parser';
|
||||
} from '@angular/compiler/src/css/parser';
|
||||
|
||||
import {CssLexer} from 'angular2/src/compiler/css/lexer';
|
||||
import {CssLexer} from '@angular/compiler/src/css/lexer';
|
||||
|
||||
export function assertTokens(tokens, valuesArr) {
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
|
@ -7,10 +7,10 @@ import {
|
||||
expect,
|
||||
beforeEach,
|
||||
afterEach
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {NumberWrapper, StringWrapper, isPresent} from "angular2/src/facade/lang";
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
import {NumberWrapper, StringWrapper, isPresent} from '../../src/facade/lang';
|
||||
import {BaseException} from '../../src/facade/exceptions';
|
||||
|
||||
import {
|
||||
CssToken,
|
||||
@ -33,9 +33,9 @@ import {
|
||||
CssBlockAST,
|
||||
CssASTVisitor,
|
||||
CssUnknownTokenListAST
|
||||
} from 'angular2/src/compiler/css/parser';
|
||||
} from '@angular/compiler/src/css/parser';
|
||||
|
||||
import {CssLexer} from 'angular2/src/compiler/css/lexer';
|
||||
import {CssLexer} from '@angular/compiler/src/css/lexer';
|
||||
|
||||
function _assertTokens(tokens, valuesArr) {
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
|
@ -1,20 +1,16 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
xdescribe,
|
||||
ddescribe,
|
||||
describe,
|
||||
el,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
it,
|
||||
SpyObject,
|
||||
proxy
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {hasLifecycleHook} from 'angular2/src/compiler/directive_lifecycle_reflector';
|
||||
import {LifecycleHooks} from 'angular2/src/core/metadata/lifecycle_hooks';
|
||||
import {hasLifecycleHook} from '@angular/compiler/src/directive_lifecycle_reflector';
|
||||
import {LifecycleHooks} from '@angular/core/src/metadata/lifecycle_hooks';
|
||||
|
||||
export function main() {
|
||||
describe('Create DirectiveMetadata', () => {
|
||||
|
@ -1,24 +1,21 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
describe,
|
||||
el,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
it,
|
||||
xit,
|
||||
TestComponentBuilder,
|
||||
beforeEachProviders
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {AsyncTestCompleter} from '@angular/core/testing/testing_internal';
|
||||
import {CompileTypeMetadata, CompileTemplateMetadata} from '@angular/compiler/src/compile_metadata';
|
||||
import {ViewEncapsulation} from '@angular/core/src/metadata/view';
|
||||
|
||||
import {CompileTypeMetadata, CompileTemplateMetadata} from 'angular2/src/compiler/compile_metadata';
|
||||
import {ViewEncapsulation} from 'angular2/src/core/metadata/view';
|
||||
|
||||
import {DirectiveNormalizer} from 'angular2/src/compiler/directive_normalizer';
|
||||
import {XHR} from 'angular2/src/compiler/xhr';
|
||||
import {MockXHR} from 'angular2/src/compiler/xhr_mock';
|
||||
import {DirectiveNormalizer} from '@angular/compiler/src/directive_normalizer';
|
||||
import {XHR} from '@angular/compiler/src/xhr';
|
||||
import {MockXHR} from '@angular/compiler/testing';
|
||||
import {TEST_PROVIDERS} from './test_bindings';
|
||||
|
||||
export function main() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {ddescribe, describe, it, iit, expect, beforeEach} from 'angular2/testing_internal';
|
||||
import {DirectiveResolver} from 'angular2/src/compiler/directive_resolver';
|
||||
import {ddescribe, describe, it, iit, expect, beforeEach} from '@angular/core/testing';
|
||||
import {DirectiveResolver} from '@angular/compiler/src/directive_resolver';
|
||||
import {
|
||||
DirectiveMetadata,
|
||||
Directive,
|
||||
@ -15,7 +15,7 @@ import {
|
||||
ContentChildMetadata,
|
||||
ViewChild,
|
||||
ViewChildMetadata
|
||||
} from 'angular2/src/core/metadata';
|
||||
} from '@angular/core/src/metadata';
|
||||
|
||||
@Directive({selector: 'someDirective'})
|
||||
class SomeDirective {
|
||||
|
@ -1,8 +1,8 @@
|
||||
import {ddescribe, describe, it, expect} from 'angular2/testing_internal';
|
||||
import {ddescribe, describe, it, expect} from '@angular/core/testing';
|
||||
|
||||
import {Lexer, Token} from 'angular2/src/compiler/expression_parser/lexer';
|
||||
import {Lexer, Token} from '@angular/compiler/src/expression_parser/lexer';
|
||||
|
||||
import {StringWrapper} from "angular2/src/facade/lang";
|
||||
import {StringWrapper} from '../../src/facade/lang';
|
||||
|
||||
function lex(text: string): any[] {
|
||||
return new Lexer().tokenize(text);
|
||||
|
@ -1,9 +1,9 @@
|
||||
import {ddescribe, describe, it, xit, iit, expect, beforeEach} from 'angular2/testing_internal';
|
||||
import {isBlank, isPresent} from 'angular2/src/facade/lang';
|
||||
import {Parser} from 'angular2/src/compiler/expression_parser/parser';
|
||||
import {ddescribe, describe, it, xit, iit, expect, beforeEach} from '@angular/core/testing';
|
||||
import {isBlank, isPresent} from '../../src/facade/lang';
|
||||
import {Parser} from '@angular/compiler/src/expression_parser/parser';
|
||||
import {Unparser} from './unparser';
|
||||
import {Lexer} from 'angular2/src/compiler/expression_parser/lexer';
|
||||
import {BindingPipe, LiteralPrimitive, AST} from 'angular2/src/compiler/expression_parser/ast';
|
||||
import {Lexer} from '@angular/compiler/src/expression_parser/lexer';
|
||||
import {BindingPipe, LiteralPrimitive, AST} from '@angular/compiler/src/expression_parser/ast';
|
||||
|
||||
export function main() {
|
||||
function createParser() { return new Parser(new Lexer()); }
|
||||
|
@ -21,10 +21,10 @@ import {
|
||||
Quote,
|
||||
SafePropertyRead,
|
||||
SafeMethodCall
|
||||
} from 'angular2/src/compiler/expression_parser/ast';
|
||||
} from '../../src/expression_parser/ast';
|
||||
|
||||
|
||||
import {StringWrapper, isPresent, isString} from 'angular2/src/facade/lang';
|
||||
import {StringWrapper, isPresent, isString} from '../../src/facade/lang';
|
||||
|
||||
export class Unparser implements AstVisitor {
|
||||
private static _quoteRegExp = /"/g;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {HtmlParser, HtmlParseTreeResult, HtmlTreeError} from 'angular2/src/compiler/html_parser';
|
||||
import {HtmlParser, HtmlParseTreeResult, HtmlTreeError} from '@angular/compiler/src/html_parser';
|
||||
import {
|
||||
HtmlAst,
|
||||
HtmlAstVisitor,
|
||||
@ -9,9 +9,9 @@ import {
|
||||
HtmlExpansionAst,
|
||||
HtmlExpansionCaseAst,
|
||||
htmlVisitAll
|
||||
} from 'angular2/src/compiler/html_ast';
|
||||
import {ParseError, ParseLocation} from 'angular2/src/compiler/parse_util';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
} from '@angular/compiler/src/html_ast';
|
||||
import {ParseError, ParseLocation} from '@angular/compiler/src/parse_util';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
|
||||
export function humanizeDom(parseResult: HtmlParseTreeResult): any[] {
|
||||
if (parseResult.errors.length > 0) {
|
||||
|
@ -7,16 +7,16 @@ import {
|
||||
expect,
|
||||
beforeEach,
|
||||
afterEach
|
||||
} from 'angular2/testing_internal';
|
||||
import {BaseException} from 'angular2/src/facade/exceptions';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
|
||||
import {
|
||||
tokenizeHtml,
|
||||
HtmlToken,
|
||||
HtmlTokenType,
|
||||
HtmlTokenError
|
||||
} from 'angular2/src/compiler/html_lexer';
|
||||
import {ParseSourceSpan, ParseLocation, ParseSourceFile} from 'angular2/src/compiler/parse_util';
|
||||
} from '@angular/compiler/src/html_lexer';
|
||||
import {ParseSourceSpan, ParseLocation, ParseSourceFile} from '@angular/compiler/src/parse_util';
|
||||
|
||||
export function main() {
|
||||
describe('HtmlLexer', () => {
|
||||
|
@ -7,10 +7,10 @@ import {
|
||||
expect,
|
||||
beforeEach,
|
||||
afterEach
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {HtmlTokenType} from 'angular2/src/compiler/html_lexer';
|
||||
import {HtmlParser, HtmlParseTreeResult, HtmlTreeError} from 'angular2/src/compiler/html_parser';
|
||||
import {HtmlTokenType} from '@angular/compiler/src/html_lexer';
|
||||
import {HtmlParser, HtmlParseTreeResult, HtmlTreeError} from '@angular/compiler/src/html_parser';
|
||||
import {
|
||||
HtmlAst,
|
||||
HtmlAstVisitor,
|
||||
@ -21,8 +21,8 @@ import {
|
||||
htmlVisitAll,
|
||||
HtmlExpansionAst,
|
||||
HtmlExpansionCaseAst
|
||||
} from 'angular2/src/compiler/html_ast';
|
||||
import {ParseError, ParseLocation} from 'angular2/src/compiler/parse_util';
|
||||
} from '@angular/compiler/src/html_ast';
|
||||
import {ParseError, ParseLocation} from '@angular/compiler/src/parse_util';
|
||||
import {humanizeDom, humanizeDomSourceSpans, humanizeLineColumn} from './html_ast_spec_utils';
|
||||
|
||||
export function main() {
|
||||
@ -389,4 +389,4 @@ export function humanizeErrors(errors: ParseError[]): any[] {
|
||||
// Tokenizer errors
|
||||
return [(<any>error).tokenType, error.msg, humanizeLineColumn(error.span.start)];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
describe,
|
||||
@ -9,15 +8,15 @@ import {
|
||||
it,
|
||||
xdescribe,
|
||||
xit
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {I18nHtmlParser} from 'angular2/src/i18n/i18n_html_parser';
|
||||
import {Message, id} from 'angular2/src/i18n/message';
|
||||
import {Parser} from 'angular2/src/compiler/expression_parser/parser';
|
||||
import {Lexer} from 'angular2/src/compiler/expression_parser/lexer';
|
||||
import {I18nHtmlParser} from '@angular/compiler/src/i18n/i18n_html_parser';
|
||||
import {Message, id} from '@angular/compiler/src/i18n/message';
|
||||
import {Parser} from '@angular/compiler/src/expression_parser/parser';
|
||||
import {Lexer} from '@angular/compiler/src/expression_parser/lexer';
|
||||
|
||||
import {StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
import {HtmlParser, HtmlParseTreeResult} from 'angular2/src/compiler/html_parser';
|
||||
import {StringMapWrapper} from '../../src/facade/collection';
|
||||
import {HtmlParser, HtmlParseTreeResult} from '@angular/compiler/src/html_parser';
|
||||
import {
|
||||
HtmlAst,
|
||||
HtmlAstVisitor,
|
||||
@ -26,10 +25,10 @@ import {
|
||||
HtmlTextAst,
|
||||
HtmlCommentAst,
|
||||
htmlVisitAll
|
||||
} from 'angular2/src/compiler/html_ast';
|
||||
import {serializeXmb, deserializeXmb} from 'angular2/src/i18n/xmb_serializer';
|
||||
import {ParseError, ParseLocation} from 'angular2/src/compiler/parse_util';
|
||||
import {humanizeDom} from '../../test/compiler/html_ast_spec_utils';
|
||||
} from '@angular/compiler/src/html_ast';
|
||||
import {serializeXmb, deserializeXmb} from '@angular/compiler/src/i18n/xmb_serializer';
|
||||
import {ParseError, ParseLocation} from '@angular/compiler/src/parse_util';
|
||||
import {humanizeDom} from '@angular/compiler/test/html_ast_spec_utils';
|
||||
|
||||
export function main() {
|
||||
describe('I18nHtmlParser', () => {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
describe,
|
||||
ddescribe,
|
||||
@ -9,13 +8,13 @@ import {
|
||||
it,
|
||||
xdescribe,
|
||||
xit
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {HtmlParser} from 'angular2/src/compiler/html_parser';
|
||||
import {MessageExtractor, removeDuplicates} from 'angular2/src/i18n/message_extractor';
|
||||
import {Message} from 'angular2/src/i18n/message';
|
||||
import {Parser} from 'angular2/src/compiler/expression_parser/parser';
|
||||
import {Lexer} from 'angular2/src/compiler/expression_parser/lexer';
|
||||
import {HtmlParser} from '@angular/compiler/src/html_parser';
|
||||
import {MessageExtractor, removeDuplicates} from '@angular/compiler/src/i18n/message_extractor';
|
||||
import {Message} from '@angular/compiler/src/i18n/message';
|
||||
import {Parser} from '@angular/compiler/src/expression_parser/parser';
|
||||
import {Lexer} from '@angular/compiler/src/expression_parser/lexer';
|
||||
|
||||
export function main() {
|
||||
describe('MessageExtractor', () => {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
describe,
|
||||
@ -9,9 +8,9 @@ import {
|
||||
it,
|
||||
xdescribe,
|
||||
xit
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {Message, id} from 'angular2/src/i18n/message';
|
||||
import {Message, id} from '@angular/compiler/src/i18n/message';
|
||||
|
||||
export function main() {
|
||||
describe('Message', () => {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
describe,
|
||||
@ -9,12 +8,12 @@ import {
|
||||
it,
|
||||
xdescribe,
|
||||
xit
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {HtmlAst} from 'angular2/src/compiler/html_ast';
|
||||
import {Message, id} from 'angular2/src/i18n/message';
|
||||
import {serializeXmb, deserializeXmb} from 'angular2/src/i18n/xmb_serializer';
|
||||
import {ParseSourceSpan, ParseError} from 'angular2/src/compiler/parse_util';
|
||||
import {HtmlAst} from '@angular/compiler/src/html_ast';
|
||||
import {Message, id} from '@angular/compiler/src/i18n/message';
|
||||
import {serializeXmb, deserializeXmb} from '@angular/compiler/src/i18n/xmb_serializer';
|
||||
import {ParseSourceSpan, ParseError} from '@angular/compiler/src/parse_util';
|
||||
|
||||
export function main() {
|
||||
describe("Xmb", () => {
|
||||
@ -114,4 +113,4 @@ function _serialize(nodes: HtmlAst[]): string {
|
||||
|
||||
function _serializeErrors(errors: ParseError[]): string[] {
|
||||
return errors.map(e => e.msg);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
import {
|
||||
TestComponentBuilder,
|
||||
AsyncTestCompleter,
|
||||
ddescribe,
|
||||
describe,
|
||||
it,
|
||||
@ -11,7 +9,7 @@ import {
|
||||
afterEach,
|
||||
beforeEachProviders,
|
||||
inject
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {
|
||||
HtmlAst,
|
||||
@ -20,9 +18,9 @@ import {
|
||||
HtmlAttrAst,
|
||||
HtmlTextAst,
|
||||
htmlVisitAll
|
||||
} from 'angular2/src/compiler/html_ast';
|
||||
} from '@angular/compiler/src/html_ast';
|
||||
|
||||
import {LegacyHtmlAstTransformer} from 'angular2/src/compiler/legacy_template';
|
||||
import {LegacyHtmlAstTransformer} from '@angular/compiler/src/legacy_template';
|
||||
|
||||
export function main() {
|
||||
describe('Support for legacy template', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component} from 'angular2/core';
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({styles:<any>('foo'), template: ''})
|
||||
export class MalformedStylesComponent {
|
||||
|
@ -8,14 +8,13 @@ import {
|
||||
expect,
|
||||
beforeEach,
|
||||
afterEach,
|
||||
AsyncTestCompleter,
|
||||
inject,
|
||||
beforeEachProviders
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {IS_DART, stringify} from 'angular2/src/facade/lang';
|
||||
import {CompileMetadataResolver} from 'angular2/src/compiler/metadata_resolver';
|
||||
import {LifecycleHooks, LIFECYCLE_HOOKS_VALUES} from 'angular2/src/core/metadata/lifecycle_hooks';
|
||||
import {IS_DART, stringify} from '../src/facade/lang';
|
||||
import {CompileMetadataResolver} from '../src/metadata_resolver';
|
||||
import {LifecycleHooks, LIFECYCLE_HOOKS_VALUES} from '@angular/core/src/metadata/lifecycle_hooks';
|
||||
import {
|
||||
Component,
|
||||
Directive,
|
||||
@ -31,11 +30,11 @@ import {
|
||||
AfterViewChecked,
|
||||
SimpleChange,
|
||||
provide
|
||||
} from 'angular2/core';
|
||||
} from '@angular/core';
|
||||
|
||||
import {TEST_PROVIDERS} from './test_bindings';
|
||||
import {MODULE_SUFFIX} from 'angular2/src/compiler/util';
|
||||
import {PLATFORM_DIRECTIVES} from 'angular2/src/core/platform_directives_and_pipes';
|
||||
import {MODULE_SUFFIX} from '@angular/compiler/src/util';
|
||||
import {PLATFORM_DIRECTIVES} from '@angular/core/src/platform_directives_and_pipes';
|
||||
import {MalformedStylesComponent} from './metadata_resolver_fixture';
|
||||
|
||||
export function main() {
|
||||
|
@ -1,18 +1,22 @@
|
||||
// ATTENTION: This file will be overwritten with generated code by main()
|
||||
import {print, IS_DART} from 'angular2/src/facade/lang';
|
||||
import {TypeScriptEmitter} from 'angular2/src/compiler/output/ts_emitter';
|
||||
import {DartEmitter} from 'angular2/src/compiler/output/dart_emitter';
|
||||
import {print, IS_DART} from '../src/facade/lang';
|
||||
import {TypeScriptEmitter} from '@angular/compiler/src/output/ts_emitter';
|
||||
import {DartEmitter} from '@angular/compiler/src/output/dart_emitter';
|
||||
import * as o from '@angular/compiler/src/output/output_ast';
|
||||
import {compileComp, compAMetadata} from './offline_compiler_util';
|
||||
import {ComponentFactory} from 'angular2/src/core/linker/component_factory';
|
||||
import {ComponentFactory} from '@angular/core/src/linker/component_factory';
|
||||
import {CompA} from './offline_compiler_util';
|
||||
|
||||
export const CompANgFactory: ComponentFactory<CompA> = null;
|
||||
|
||||
export function emit(): Promise<string> {
|
||||
var emitter = IS_DART ? new DartEmitter() : new TypeScriptEmitter();
|
||||
return compileComp(emitter, compAMetadata);
|
||||
}
|
||||
|
||||
// Generator
|
||||
export function main(args: string[]) {
|
||||
var emitter = IS_DART ? new DartEmitter() : new TypeScriptEmitter();
|
||||
compileComp(emitter, compAMetadata)
|
||||
.then((source) => {
|
||||
emit().then((source) => {
|
||||
// debug: console.error(source);
|
||||
print(source);
|
||||
});
|
||||
|
@ -1,17 +1,20 @@
|
||||
// ATTENTION: This file will be overwritten with generated code by main()
|
||||
import {print} from 'angular2/src/facade/lang';
|
||||
import {JavaScriptEmitter} from 'angular2/src/compiler/output/js_emitter';
|
||||
import {print} from '../src/facade/lang';
|
||||
import {JavaScriptEmitter} from '@angular/compiler/src/output/js_emitter';
|
||||
import {compileComp, compAMetadata} from './offline_compiler_util';
|
||||
import {ComponentFactory} from 'angular2/src/core/linker/component_factory';
|
||||
import {ComponentFactory} from '@angular/core/src/linker/component_factory';
|
||||
import {CompA} from './offline_compiler_util';
|
||||
|
||||
export const CompANgFactory: ComponentFactory<CompA> = null;
|
||||
|
||||
export function emit() {
|
||||
var emitter = new JavaScriptEmitter();
|
||||
return compileComp(emitter, compAMetadata);
|
||||
}
|
||||
|
||||
// Generator
|
||||
export function main(args: string[]) {
|
||||
var emitter = new JavaScriptEmitter();
|
||||
compileComp(emitter, compAMetadata)
|
||||
.then((source) => {
|
||||
emit().then((source) => {
|
||||
// debug: console.error(source);
|
||||
print(source);
|
||||
});
|
||||
|
@ -8,21 +8,19 @@ import {
|
||||
expect,
|
||||
beforeEach,
|
||||
afterEach,
|
||||
AsyncTestCompleter,
|
||||
inject,
|
||||
beforeEachProviders,
|
||||
el
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {IS_DART} from 'angular2/src/facade/lang';
|
||||
import {Injector} from 'angular2/core';
|
||||
import {IS_DART} from '../src/facade/lang';
|
||||
import {Injector} from '@angular/core';
|
||||
|
||||
import {ComponentFactory} from 'angular2/src/core/linker/component_factory';
|
||||
import {ComponentFactory} from '@angular/core/src/linker/component_factory';
|
||||
import * as typed from './offline_compiler_codegen_typed';
|
||||
import * as untyped from './offline_compiler_codegen_untyped';
|
||||
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {SharedStylesHost} from "angular2/src/platform/dom/shared_styles_host";
|
||||
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||
import {SharedStylesHost} from '@angular/platform-browser/src/dom/shared_styles_host';
|
||||
|
||||
import {CompA} from './offline_compiler_util';
|
||||
|
||||
@ -31,13 +29,13 @@ export function main() {
|
||||
var untypedComponentFactory = untyped.CompANgFactory;
|
||||
var fixtures: TestFixture[] = [];
|
||||
|
||||
if (IS_DART || !DOM.supportsDOMEvents()) {
|
||||
if (IS_DART || !getDOM().supportsDOMEvents()) {
|
||||
// Our generator only works on node.js and Dart...
|
||||
fixtures.push(new TestFixture(typedComponentFactory, 'typed'));
|
||||
}
|
||||
if (!IS_DART) {
|
||||
// Our generator only works on node.js and Dart...
|
||||
if (!DOM.supportsDOMEvents()) {
|
||||
if (!getDOM().supportsDOMEvents()) {
|
||||
fixtures.push(new TestFixture(untypedComponentFactory, 'untyped'));
|
||||
}
|
||||
}
|
||||
@ -66,4 +64,4 @@ export function main() {
|
||||
|
||||
class TestFixture {
|
||||
constructor(public compFactory: ComponentFactory<CompA>, public name: string) {}
|
||||
}
|
||||
}
|
||||
|
@ -1,30 +1,31 @@
|
||||
import {print, IS_DART} from 'angular2/src/facade/lang';
|
||||
import {OutputEmitter} from 'angular2/src/compiler/output/abstract_emitter';
|
||||
import {Console} from 'angular2/src/core/console';
|
||||
import {print, IS_DART} from '../src/facade/lang';
|
||||
import {OutputEmitter} from '@angular/compiler/src/output/abstract_emitter';
|
||||
import {Console} from '../core_private';
|
||||
|
||||
import {
|
||||
OfflineCompiler,
|
||||
NormalizedComponentWithViewDirectives,
|
||||
SourceModule
|
||||
} from 'angular2/src/compiler/offline_compiler';
|
||||
import {TemplateParser} from 'angular2/src/compiler/template_parser';
|
||||
import {Parser} from 'angular2/src/compiler/expression_parser/parser';
|
||||
import {Lexer} from 'angular2/src/compiler/expression_parser/lexer';
|
||||
import {HtmlParser} from 'angular2/src/compiler/html_parser';
|
||||
import {StyleCompiler} from 'angular2/src/compiler/style_compiler';
|
||||
import {ViewCompiler} from 'angular2/src/compiler/view_compiler/view_compiler';
|
||||
import {DirectiveNormalizer} from 'angular2/src/compiler/directive_normalizer';
|
||||
import {CompilerConfig} from 'angular2/src/compiler/config';
|
||||
import {createOfflineCompileUrlResolver} from 'angular2/src/compiler/url_resolver';
|
||||
import {MockSchemaRegistry} from './schema_registry_mock';
|
||||
import {MODULE_SUFFIX} from 'angular2/src/compiler/util';
|
||||
import {MockXHR} from 'angular2/src/compiler/xhr_mock';
|
||||
} from '@angular/compiler/src/offline_compiler';
|
||||
import {TemplateParser} from '@angular/compiler/src/template_parser';
|
||||
import {Parser} from '@angular/compiler/src/expression_parser/parser';
|
||||
import {Lexer} from '@angular/compiler/src/expression_parser/lexer';
|
||||
import {HtmlParser} from '@angular/compiler/src/html_parser';
|
||||
import {StyleCompiler} from '@angular/compiler/src/style_compiler';
|
||||
import {ViewCompiler} from '@angular/compiler/src/view_compiler/view_compiler';
|
||||
import {DirectiveNormalizer} from '@angular/compiler/src/directive_normalizer';
|
||||
import {CompilerConfig} from '@angular/compiler/src/config';
|
||||
import {createOfflineCompileUrlResolver} from '@angular/compiler/src/url_resolver';
|
||||
import {MockSchemaRegistry} from '../testing/schema_registry_mock';
|
||||
import {MODULE_SUFFIX} from '@angular/compiler/src/util';
|
||||
import {MockXHR} from '../testing/xhr_mock';
|
||||
|
||||
import {
|
||||
CompileDirectiveMetadata,
|
||||
CompileTypeMetadata,
|
||||
CompileTemplateMetadata
|
||||
} from 'angular2/src/compiler/compile_metadata';
|
||||
} from '@angular/compiler/src/compile_metadata';
|
||||
|
||||
|
||||
export class CompA { user: string; }
|
||||
|
||||
|
@ -1,18 +1,15 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
describe,
|
||||
el,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
it,
|
||||
xit,
|
||||
TestComponentBuilder
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {escapeSingleQuoteString} from 'angular2/src/compiler/output/abstract_emitter';
|
||||
import {escapeSingleQuoteString} from '@angular/compiler/src/output/abstract_emitter';
|
||||
|
||||
export function main() {
|
||||
describe('AbstractEmitter', () => {
|
||||
|
@ -1,21 +1,18 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
describe,
|
||||
el,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
it,
|
||||
xit,
|
||||
TestComponentBuilder
|
||||
} from 'angular2/testing_internal';
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {isBlank} from 'angular2/src/facade/lang';
|
||||
import {DartEmitter} from 'angular2/src/compiler/output/dart_emitter';
|
||||
import {CompileIdentifierMetadata} from 'angular2/src/compiler/compile_metadata';
|
||||
import * as o from 'angular2/src/compiler/output/output_ast';
|
||||
import {isBlank} from '../../src/facade/lang';
|
||||
import {DartEmitter} from '@angular/compiler/src/output/dart_emitter';
|
||||
import {CompileIdentifierMetadata} from '@angular/compiler/src/compile_metadata';
|
||||
import * as o from '@angular/compiler/src/output/output_ast';
|
||||
|
||||
var someModuleUrl = 'asset:somePackage/lib/somePath';
|
||||
var anotherModuleUrl = 'asset:somePackage/lib/someOtherPath';
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user