refactor(compiler): re-arrange files
This commit is contained in:
@ -14,5 +14,5 @@
|
|||||||
export {COMPILER_PROVIDERS, CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileFactoryMetadata, CompileIdentifierMetadata, CompileMetadataWithIdentifier, CompilePipeMetadata, CompileProviderMetadata, CompileQueryMetadata, CompileTemplateMetadata, CompileTokenMetadata, CompileTypeMetadata, CompilerConfig, DEFAULT_PACKAGE_URL_PROVIDER, DirectiveResolver, NgModuleResolver, OfflineCompiler, PipeResolver, RenderTypes, RuntimeCompiler, SourceModule, TEMPLATE_TRANSFORMS, UrlResolver, XHR, analyzeAppProvidersForDeprecatedConfiguration, createOfflineCompileUrlResolver, platformCoreDynamic} from './src/compiler';
|
export {COMPILER_PROVIDERS, CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileFactoryMetadata, CompileIdentifierMetadata, CompileMetadataWithIdentifier, CompilePipeMetadata, CompileProviderMetadata, CompileQueryMetadata, CompileTemplateMetadata, CompileTokenMetadata, CompileTypeMetadata, CompilerConfig, DEFAULT_PACKAGE_URL_PROVIDER, DirectiveResolver, NgModuleResolver, OfflineCompiler, PipeResolver, RenderTypes, RuntimeCompiler, SourceModule, TEMPLATE_TRANSFORMS, UrlResolver, XHR, analyzeAppProvidersForDeprecatedConfiguration, createOfflineCompileUrlResolver, platformCoreDynamic} from './src/compiler';
|
||||||
export {ElementSchemaRegistry} from './src/schema/element_schema_registry';
|
export {ElementSchemaRegistry} from './src/schema/element_schema_registry';
|
||||||
|
|
||||||
export * from './src/template_ast';
|
export * from './src/template_parser/template_ast';
|
||||||
export * from './private_export';
|
export * from './private_export';
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
import * as directive_normalizer from './src/directive_normalizer';
|
import * as directive_normalizer from './src/directive_normalizer';
|
||||||
import * as lexer from './src/expression_parser/lexer';
|
import * as lexer from './src/expression_parser/lexer';
|
||||||
import * as parser from './src/expression_parser/parser';
|
import * as parser from './src/expression_parser/parser';
|
||||||
import * as html_parser from './src/html_parser';
|
import * as html_parser from './src/html_parser/html_parser';
|
||||||
import * as i18n_html_parser from './src/i18n/i18n_html_parser';
|
import * as i18n_html_parser from './src/i18n/i18n_html_parser';
|
||||||
import * as i18n_message from './src/i18n/message';
|
import * as i18n_message from './src/i18n/message';
|
||||||
import * as i18n_extractor from './src/i18n/message_extractor';
|
import * as i18n_extractor from './src/i18n/message_extractor';
|
||||||
@ -22,7 +22,7 @@ import * as parse_util from './src/parse_util';
|
|||||||
import * as dom_element_schema_registry from './src/schema/dom_element_schema_registry';
|
import * as dom_element_schema_registry from './src/schema/dom_element_schema_registry';
|
||||||
import * as selector from './src/selector';
|
import * as selector from './src/selector';
|
||||||
import * as style_compiler from './src/style_compiler';
|
import * as style_compiler from './src/style_compiler';
|
||||||
import * as template_parser from './src/template_parser';
|
import * as template_parser from './src/template_parser/template_parser';
|
||||||
import * as view_compiler from './src/view_compiler/view_compiler';
|
import * as view_compiler from './src/view_compiler/view_compiler';
|
||||||
|
|
||||||
export namespace __compiler_private__ {
|
export namespace __compiler_private__ {
|
||||||
|
@ -15,7 +15,7 @@ import {BaseException} from '../facade/exceptions';
|
|||||||
import {isArray, isBlank, isPresent} from '../facade/lang';
|
import {isArray, isBlank, isPresent} from '../facade/lang';
|
||||||
import {Identifiers} from '../identifiers';
|
import {Identifiers} from '../identifiers';
|
||||||
import * as o from '../output/output_ast';
|
import * as o from '../output/output_ast';
|
||||||
import * as t from '../template_ast';
|
import * as t from '../template_parser/template_ast';
|
||||||
|
|
||||||
import {AnimationAst, AnimationAstVisitor, AnimationEntryAst, AnimationGroupAst, AnimationKeyframeAst, AnimationSequenceAst, AnimationStateAst, AnimationStateDeclarationAst, AnimationStateTransitionAst, AnimationStepAst, AnimationStylesAst} from './animation_ast';
|
import {AnimationAst, AnimationAstVisitor, AnimationEntryAst, AnimationGroupAst, AnimationKeyframeAst, AnimationSequenceAst, AnimationStateAst, AnimationStateDeclarationAst, AnimationStateTransitionAst, AnimationStepAst, AnimationStylesAst} from './animation_ast';
|
||||||
import {AnimationParseError, ParsedAnimationResult, parseAnimationEntry} from './animation_parser';
|
import {AnimationParseError, ParsedAnimationResult, parseAnimationEntry} from './animation_parser';
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
import {Compiler, CompilerFactory, CompilerOptions, Component, ComponentResolver, Inject, Injectable, NgModule, PLATFORM_DIRECTIVES, PLATFORM_INITIALIZER, PLATFORM_PIPES, PlatformRef, ReflectiveInjector, Type, ViewEncapsulation, createPlatformFactory, disposePlatform, isDevMode, platformCore} from '@angular/core';
|
import {Compiler, CompilerFactory, CompilerOptions, Component, ComponentResolver, Inject, Injectable, NgModule, PLATFORM_DIRECTIVES, PLATFORM_INITIALIZER, PLATFORM_PIPES, PlatformRef, ReflectiveInjector, Type, ViewEncapsulation, createPlatformFactory, disposePlatform, isDevMode, platformCore} from '@angular/core';
|
||||||
|
|
||||||
export * from './template_ast';
|
export * from './template_parser/template_ast';
|
||||||
export {TEMPLATE_TRANSFORMS} from './template_parser';
|
export {TEMPLATE_TRANSFORMS} from './template_parser/template_parser';
|
||||||
export {CompilerConfig, RenderTypes} from './config';
|
export {CompilerConfig, RenderTypes} from './config';
|
||||||
export * from './compile_metadata';
|
export * from './compile_metadata';
|
||||||
export * from './offline_compiler';
|
export * from './offline_compiler';
|
||||||
@ -23,8 +23,8 @@ export {NgModuleResolver} from './ng_module_resolver';
|
|||||||
|
|
||||||
import {stringify} from './facade/lang';
|
import {stringify} from './facade/lang';
|
||||||
import {ListWrapper} from './facade/collection';
|
import {ListWrapper} from './facade/collection';
|
||||||
import {TemplateParser} from './template_parser';
|
import {TemplateParser} from './template_parser/template_parser';
|
||||||
import {HtmlParser} from './html_parser';
|
import {HtmlParser} from './html_parser/html_parser';
|
||||||
import {DirectiveNormalizer} from './directive_normalizer';
|
import {DirectiveNormalizer} from './directive_normalizer';
|
||||||
import {CompileMetadataResolver} from './metadata_resolver';
|
import {CompileMetadataResolver} from './metadata_resolver';
|
||||||
import {StyleCompiler} from './style_compiler';
|
import {StyleCompiler} from './style_compiler';
|
||||||
|
@ -6,8 +6,9 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import {ParseLocation, ParseSourceSpan} from '../parse_util';
|
||||||
|
|
||||||
import {CssToken, CssTokenType} from './css_lexer';
|
import {CssToken, CssTokenType} from './css_lexer';
|
||||||
import {ParseLocation, ParseSourceSpan} from './parse_util';
|
|
||||||
|
|
||||||
export enum BlockType {
|
export enum BlockType {
|
||||||
Import,
|
Import,
|
@ -6,9 +6,9 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as chars from './chars';
|
import * as chars from '../chars';
|
||||||
import {BaseException} from './facade/exceptions';
|
import {BaseException} from '../facade/exceptions';
|
||||||
import {StringWrapper, isPresent, resolveEnumToken} from './facade/lang';
|
import {StringWrapper, isPresent, resolveEnumToken} from '../facade/lang';
|
||||||
|
|
||||||
export enum CssTokenType {
|
export enum CssTokenType {
|
||||||
EOF,
|
EOF,
|
@ -6,11 +6,12 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as chars from './chars';
|
import * as chars from '../chars';
|
||||||
|
import {isPresent} from '../facade/lang';
|
||||||
|
import {ParseError, ParseLocation, ParseSourceFile, ParseSourceSpan} from '../parse_util';
|
||||||
|
|
||||||
import {BlockType, CssAst, CssAtRulePredicateAst, CssBlockAst, CssBlockDefinitionRuleAst, CssBlockRuleAst, CssDefinitionAst, CssInlineRuleAst, CssKeyframeDefinitionAst, CssKeyframeRuleAst, CssMediaQueryRuleAst, CssPseudoSelectorAst, CssRuleAst, CssSelectorAst, CssSelectorRuleAst, CssSimpleSelectorAst, CssStyleSheetAst, CssStyleValueAst, CssStylesBlockAst, CssUnknownRuleAst, CssUnknownTokenListAst, mergeTokens} from './css_ast';
|
import {BlockType, CssAst, CssAtRulePredicateAst, CssBlockAst, CssBlockDefinitionRuleAst, CssBlockRuleAst, CssDefinitionAst, CssInlineRuleAst, CssKeyframeDefinitionAst, CssKeyframeRuleAst, CssMediaQueryRuleAst, CssPseudoSelectorAst, CssRuleAst, CssSelectorAst, CssSelectorRuleAst, CssSimpleSelectorAst, CssStyleSheetAst, CssStyleValueAst, CssStylesBlockAst, CssUnknownRuleAst, CssUnknownTokenListAst, mergeTokens} from './css_ast';
|
||||||
import {CssLexer, CssLexerMode, CssScanner, CssToken, CssTokenType, generateErrorMessage, isNewline} from './css_lexer';
|
import {CssLexer, CssLexerMode, CssScanner, CssToken, CssTokenType, generateErrorMessage, isNewline} from './css_lexer';
|
||||||
import {isPresent} from './facade/lang';
|
|
||||||
import {ParseError, ParseLocation, ParseSourceFile, ParseSourceSpan} from './parse_util';
|
|
||||||
|
|
||||||
const SPACE_OPERATOR = ' ';
|
const SPACE_OPERATOR = ' ';
|
||||||
|
|
||||||
@ -49,10 +50,6 @@ function isSelectorOperatorCharacter(code: number): boolean {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDelimFromToken(token: CssToken): number {
|
|
||||||
return getDelimFromCharacter(token.numValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getDelimFromCharacter(code: number): number {
|
function getDelimFromCharacter(code: number): number {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case chars.$EOF:
|
case chars.$EOF:
|
@ -12,11 +12,11 @@ import {BaseException} from '../src/facade/exceptions';
|
|||||||
import {isBlank, isPresent} from '../src/facade/lang';
|
import {isBlank, isPresent} from '../src/facade/lang';
|
||||||
import {CompileDirectiveMetadata, CompileStylesheetMetadata, CompileTemplateMetadata, CompileTypeMetadata} from './compile_metadata';
|
import {CompileDirectiveMetadata, CompileStylesheetMetadata, CompileTemplateMetadata, CompileTypeMetadata} from './compile_metadata';
|
||||||
import {CompilerConfig} from './config';
|
import {CompilerConfig} from './config';
|
||||||
import {HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst, htmlVisitAll} from './html_ast';
|
import {HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst, htmlVisitAll} from './html_parser/html_ast';
|
||||||
import {HtmlParser} from './html_parser';
|
import {HtmlParser} from './html_parser/html_parser';
|
||||||
import {InterpolationConfig} from './interpolation_config';
|
import {InterpolationConfig} from './html_parser/interpolation_config';
|
||||||
import {extractStyleUrls, isStyleUrlResolvable} from './style_url_resolver';
|
import {extractStyleUrls, isStyleUrlResolvable} from './style_url_resolver';
|
||||||
import {PreparsedElementType, preparseElement} from './template_preparser';
|
import {PreparsedElementType, preparseElement} from './template_parser/template_preparser';
|
||||||
import {UrlResolver} from './url_resolver';
|
import {UrlResolver} from './url_resolver';
|
||||||
import {SyncAsyncResult} from './util';
|
import {SyncAsyncResult} from './util';
|
||||||
import {XHR} from './xhr';
|
import {XHR} from './xhr';
|
||||||
|
@ -12,7 +12,7 @@ import * as chars from '../chars';
|
|||||||
import {ListWrapper} from '../facade/collection';
|
import {ListWrapper} from '../facade/collection';
|
||||||
import {BaseException} from '../facade/exceptions';
|
import {BaseException} from '../facade/exceptions';
|
||||||
import {RegExpWrapper, StringWrapper, escapeRegExp, isBlank, isPresent} from '../facade/lang';
|
import {RegExpWrapper, StringWrapper, escapeRegExp, isBlank, isPresent} from '../facade/lang';
|
||||||
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../interpolation_config';
|
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../html_parser/interpolation_config';
|
||||||
|
|
||||||
import {AST, ASTWithSource, AstVisitor, Binary, BindingPipe, Chain, Conditional, EmptyExpr, FunctionCall, ImplicitReceiver, Interpolation, KeyedRead, KeyedWrite, LiteralArray, LiteralMap, LiteralPrimitive, MethodCall, ParseSpan, ParserError, PrefixNot, PropertyRead, PropertyWrite, Quote, SafeMethodCall, SafePropertyRead, TemplateBinding} from './ast';
|
import {AST, ASTWithSource, AstVisitor, Binary, BindingPipe, Chain, Conditional, EmptyExpr, FunctionCall, ImplicitReceiver, Interpolation, KeyedRead, KeyedWrite, LiteralArray, LiteralMap, LiteralPrimitive, MethodCall, ParseSpan, ParserError, PrefixNot, PropertyRead, PropertyWrite, Quote, SafeMethodCall, SafePropertyRead, TemplateBinding} from './ast';
|
||||||
import {EOF, Lexer, Token, TokenType, isIdentifier, isQuote} from './lexer';
|
import {EOF, Lexer, Token, TokenType, isIdentifier, isQuote} from './lexer';
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import {ParseError, ParseSourceSpan} from '../parse_util';
|
||||||
|
|
||||||
import {HtmlAst, HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst, htmlVisitAll} from './html_ast';
|
import {HtmlAst, HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst, htmlVisitAll} from './html_ast';
|
||||||
import {ParseError, ParseSourceSpan} from './parse_util';
|
|
||||||
|
|
||||||
// http://cldr.unicode.org/index/cldr-spec/plural-rules
|
// http://cldr.unicode.org/index/cldr-spec/plural-rules
|
||||||
const PLURAL_CASES: string[] = ['zero', 'one', 'two', 'few', 'many', 'other'];
|
const PLURAL_CASES: string[] = ['zero', 'one', 'two', 'few', 'many', 'other'];
|
@ -6,9 +6,9 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {isPresent} from '../src/facade/lang';
|
import {isPresent} from '../facade/lang';
|
||||||
|
|
||||||
import {ParseSourceSpan} from './parse_util';
|
import {ParseSourceSpan} from '../parse_util';
|
||||||
|
|
||||||
export interface HtmlAst {
|
export interface HtmlAst {
|
||||||
sourceSpan: ParseSourceSpan;
|
sourceSpan: ParseSourceSpan;
|
@ -6,11 +6,12 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as chars from './chars';
|
import * as chars from '../chars';
|
||||||
import {isBlank, isPresent} from './facade/lang';
|
import {isBlank, isPresent} from '../facade/lang';
|
||||||
|
import {ParseError, ParseLocation, ParseSourceFile, ParseSourceSpan} from '../parse_util';
|
||||||
|
|
||||||
import {HtmlTagContentType, NAMED_ENTITIES, getHtmlTagDefinition} from './html_tags';
|
import {HtmlTagContentType, NAMED_ENTITIES, getHtmlTagDefinition} from './html_tags';
|
||||||
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from './interpolation_config';
|
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from './interpolation_config';
|
||||||
import {ParseError, ParseLocation, ParseSourceFile, ParseSourceSpan} from './parse_util';
|
|
||||||
|
|
||||||
export enum HtmlTokenType {
|
export enum HtmlTokenType {
|
||||||
TAG_OPEN_START,
|
TAG_OPEN_START,
|
@ -6,12 +6,12 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Injectable} from '@angular/core';
|
import {Injectable} from '../../../core/index';
|
||||||
import {isPresent, isBlank,} from '../src/facade/lang';
|
import {isPresent, isBlank,} from '../facade/lang';
|
||||||
import {ListWrapper} from '../src/facade/collection';
|
import {ListWrapper} from '../facade/collection';
|
||||||
import {HtmlAst, HtmlAttrAst, HtmlTextAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst} from './html_ast';
|
import {HtmlAst, HtmlAttrAst, HtmlTextAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst} from './html_ast';
|
||||||
import {HtmlToken, HtmlTokenType, tokenizeHtml} from './html_lexer';
|
import {HtmlToken, HtmlTokenType, tokenizeHtml} from './html_lexer';
|
||||||
import {ParseError, ParseSourceSpan} from './parse_util';
|
import {ParseError, ParseSourceSpan} from '../parse_util';
|
||||||
import {getHtmlTagDefinition, getNsPrefix, mergeNsAndName} from './html_tags';
|
import {getHtmlTagDefinition, getNsPrefix, mergeNsAndName} from './html_tags';
|
||||||
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from './interpolation_config';
|
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from './interpolation_config';
|
||||||
|
|
@ -6,7 +6,7 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {normalizeBool, RegExpWrapper,} from '../src/facade/lang';
|
import {normalizeBool, RegExpWrapper,} from '../facade/lang';
|
||||||
|
|
||||||
// see http://www.w3.org/TR/html51/syntax.html#named-character-references
|
// see http://www.w3.org/TR/html51/syntax.html#named-character-references
|
||||||
// see https://html.spec.whatwg.org/multipage/entities.json
|
// see https://html.spec.whatwg.org/multipage/entities.json
|
@ -6,8 +6,7 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {assertInterpolationSymbols} from './assertions';
|
import {assertInterpolationSymbols} from '../assertions';
|
||||||
import {isBlank} from './facade/lang';
|
|
||||||
|
|
||||||
export class InterpolationConfig {
|
export class InterpolationConfig {
|
||||||
static fromArray(markers: [string, string]): InterpolationConfig {
|
static fromArray(markers: [string, string]): InterpolationConfig {
|
@ -6,8 +6,8 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {HtmlParser} from '../html_parser';
|
import {HtmlParser} from '../html_parser/html_parser';
|
||||||
import {InterpolationConfig} from '../interpolation_config';
|
import {InterpolationConfig} from '../html_parser/interpolation_config';
|
||||||
|
|
||||||
import * as i18nAst from './i18n_ast';
|
import * as i18nAst from './i18n_ast';
|
||||||
import {extractI18nMessages} from './i18n_parser';
|
import {extractI18nMessages} from './i18n_parser';
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {HtmlAst, HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst} from '../html_ast';
|
import {HtmlAst, HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst} from '../html_parser/html_ast';
|
||||||
import {I18nError, I18N_ATTR_PREFIX, getI18nAttr, meaning, description, isOpeningComment, isClosingComment,} from './shared';
|
import {I18nError, I18N_ATTR_PREFIX, getI18nAttr, meaning, description, isOpeningComment, isClosingComment,} from './shared';
|
||||||
import {htmlVisitAll} from '@angular/compiler/src/html_ast';
|
import {htmlVisitAll} from '../html_parser/html_ast';
|
||||||
|
|
||||||
export function extractAstMessages(
|
export function extractAstMessages(
|
||||||
sourceAst: HtmlAst[], implicitTags: string[],
|
sourceAst: HtmlAst[], implicitTags: string[],
|
||||||
|
@ -10,9 +10,9 @@ import {Parser as ExpressionParser} from '../expression_parser/parser';
|
|||||||
import {ListWrapper, StringMapWrapper} from '../facade/collection';
|
import {ListWrapper, StringMapWrapper} from '../facade/collection';
|
||||||
import {BaseException} from '../facade/exceptions';
|
import {BaseException} from '../facade/exceptions';
|
||||||
import {NumberWrapper, RegExpWrapper, isPresent} from '../facade/lang';
|
import {NumberWrapper, RegExpWrapper, isPresent} from '../facade/lang';
|
||||||
import {HtmlAst, HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst, htmlVisitAll} from '../html_ast';
|
import {HtmlAst, HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst, htmlVisitAll} from '../html_parser/html_ast';
|
||||||
import {HtmlParseTreeResult, HtmlParser} from '../html_parser';
|
import {HtmlParseTreeResult, HtmlParser} from '../html_parser/html_parser';
|
||||||
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../interpolation_config';
|
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../html_parser/interpolation_config';
|
||||||
import {ParseError, ParseSourceSpan} from '../parse_util';
|
import {ParseError, ParseSourceSpan} from '../parse_util';
|
||||||
import {Message, id} from './message';
|
import {Message, id} from './message';
|
||||||
import {I18N_ATTR, I18N_ATTR_PREFIX, I18nError, Part, dedupePhName, extractPhNameFromInterpolation, messageFromAttribute, messageFromI18nAttribute, partition} from './shared';
|
import {I18N_ATTR, I18N_ATTR_PREFIX, I18nError, Part, dedupePhName, extractPhNameFromInterpolation, messageFromAttribute, messageFromI18nAttribute, partition} from './shared';
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
import {Lexer as ExpressionLexer} from '../expression_parser/lexer';
|
import {Lexer as ExpressionLexer} from '../expression_parser/lexer';
|
||||||
import {Parser as ExpressionParser} from '../expression_parser/parser';
|
import {Parser as ExpressionParser} from '../expression_parser/parser';
|
||||||
import * as hAst from '../html_ast';
|
import * as hAst from '../html_parser/html_ast';
|
||||||
import {getHtmlTagDefinition} from '../html_tags';
|
import {getHtmlTagDefinition} from '../html_parser/html_tags';
|
||||||
import {InterpolationConfig} from '../interpolation_config';
|
import {InterpolationConfig} from '../html_parser/interpolation_config';
|
||||||
import {ParseSourceSpan} from '../parse_util';
|
import {ParseSourceSpan} from '../parse_util';
|
||||||
|
|
||||||
import {extractAstMessages} from './extractor';
|
import {extractAstMessages} from './extractor';
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
import {Parser as ExpressionParser} from '../expression_parser/parser';
|
import {Parser as ExpressionParser} from '../expression_parser/parser';
|
||||||
import {StringMapWrapper} from '../facade/collection';
|
import {StringMapWrapper} from '../facade/collection';
|
||||||
import {isPresent} from '../facade/lang';
|
import {isPresent} from '../facade/lang';
|
||||||
import {HtmlAst, HtmlElementAst} from '../html_ast';
|
import {HtmlAst, HtmlElementAst} from '../html_parser/html_ast';
|
||||||
import {HtmlParser} from '../html_parser';
|
import {HtmlParser} from '../html_parser/html_parser';
|
||||||
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../interpolation_config';
|
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../html_parser/interpolation_config';
|
||||||
import {ParseError} from '../parse_util';
|
import {ParseError} from '../parse_util';
|
||||||
|
|
||||||
import {Message, id} from './message';
|
import {Message, id} from './message';
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
import {normalizeBlank} from '../../../router-deprecated/src/facade/lang';
|
import {normalizeBlank} from '../../../router-deprecated/src/facade/lang';
|
||||||
import {Parser as ExpressionParser} from '../expression_parser/parser';
|
import {Parser as ExpressionParser} from '../expression_parser/parser';
|
||||||
import {StringWrapper, isBlank, isPresent} from '../facade/lang';
|
import {StringWrapper, isBlank, isPresent} from '../facade/lang';
|
||||||
import {HtmlAst, HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst, htmlVisitAll} from '../html_ast';
|
import {HtmlAst, HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst, htmlVisitAll} from '../html_parser/html_ast';
|
||||||
import {InterpolationConfig} from '../interpolation_config';
|
import {InterpolationConfig} from '../html_parser/interpolation_config';
|
||||||
import {ParseError, ParseSourceSpan} from '../parse_util';
|
import {ParseError, ParseSourceSpan} from '../parse_util';
|
||||||
|
|
||||||
import {Message} from './message';
|
import {Message} from './message';
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {RegExpWrapper, isPresent} from '../facade/lang';
|
import {RegExpWrapper, isPresent} from '../facade/lang';
|
||||||
import {HtmlAst, HtmlElementAst} from '../html_ast';
|
import {HtmlAst, HtmlElementAst} from '../html_parser/html_ast';
|
||||||
import {HtmlParser} from '../html_parser';
|
import {HtmlParser} from '../html_parser/html_parser';
|
||||||
import {ParseError, ParseSourceSpan} from '../parse_util';
|
import {ParseError, ParseSourceSpan} from '../parse_util';
|
||||||
|
|
||||||
import {Message, id} from './message';
|
import {Message, id} from './message';
|
||||||
|
@ -11,7 +11,7 @@ import {AnimationAnimateMetadata, AnimationEntryMetadata, AnimationGroupMetadata
|
|||||||
import {Console, LIFECYCLE_HOOKS_VALUES, ReflectorReader, createProvider, isProviderLiteral, reflector} from '../core_private';
|
import {Console, LIFECYCLE_HOOKS_VALUES, ReflectorReader, createProvider, isProviderLiteral, reflector} from '../core_private';
|
||||||
import {MapWrapper, StringMapWrapper} from '../src/facade/collection';
|
import {MapWrapper, StringMapWrapper} from '../src/facade/collection';
|
||||||
import {BaseException} from '../src/facade/exceptions';
|
import {BaseException} from '../src/facade/exceptions';
|
||||||
import {Type, isArray, isBlank, isPresent, isString, isStringMap, stringify} from '../src/facade/lang';
|
import {Type, isArray, isBlank, isPresent, isString, stringify} from '../src/facade/lang';
|
||||||
|
|
||||||
import {assertArrayOfStrings, assertInterpolationSymbols} from './assertions';
|
import {assertArrayOfStrings, assertInterpolationSymbols} from './assertions';
|
||||||
import * as cpl from './compile_metadata';
|
import * as cpl from './compile_metadata';
|
||||||
|
@ -15,7 +15,7 @@ import * as o from './output/output_ast';
|
|||||||
import {convertValueToOutputAst} from './output/value_util';
|
import {convertValueToOutputAst} from './output/value_util';
|
||||||
import {ParseLocation, ParseSourceFile, ParseSourceSpan} from './parse_util';
|
import {ParseLocation, ParseSourceFile, ParseSourceSpan} from './parse_util';
|
||||||
import {NgModuleProviderAnalyzer} from './provider_analyzer';
|
import {NgModuleProviderAnalyzer} from './provider_analyzer';
|
||||||
import {ProviderAst, ProviderAstType} from './template_ast';
|
import {ProviderAst} from './template_parser/template_ast';
|
||||||
import {createDiTokenExpression} from './util';
|
import {createDiTokenExpression} from './util';
|
||||||
|
|
||||||
export class ComponentFactoryDependency {
|
export class ComponentFactoryDependency {
|
||||||
|
@ -17,7 +17,7 @@ import {NgModuleCompiler} from './ng_module_compiler';
|
|||||||
import {OutputEmitter} from './output/abstract_emitter';
|
import {OutputEmitter} from './output/abstract_emitter';
|
||||||
import * as o from './output/output_ast';
|
import * as o from './output/output_ast';
|
||||||
import {CompiledStylesheet, StyleCompiler} from './style_compiler';
|
import {CompiledStylesheet, StyleCompiler} from './style_compiler';
|
||||||
import {TemplateParser} from './template_parser';
|
import {TemplateParser} from './template_parser/template_parser';
|
||||||
import {ComponentFactoryDependency, ViewCompileResult, ViewCompiler, ViewFactoryDependency} from './view_compiler/view_compiler';
|
import {ComponentFactoryDependency, ViewCompileResult, ViewCompiler, ViewFactoryDependency} from './view_compiler/view_compiler';
|
||||||
|
|
||||||
export class SourceModule {
|
export class SourceModule {
|
||||||
|
@ -13,7 +13,7 @@ import {isArray, isBlank, isPresent, normalizeBlank} from '../src/facade/lang';
|
|||||||
import {CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileIdentifierMap, CompileNgModuleMetadata, CompileProviderMetadata, CompileQueryMetadata, CompileTokenMetadata, CompileTypeMetadata} from './compile_metadata';
|
import {CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileIdentifierMap, CompileNgModuleMetadata, CompileProviderMetadata, CompileQueryMetadata, CompileTokenMetadata, CompileTypeMetadata} from './compile_metadata';
|
||||||
import {Identifiers, identifierToken} from './identifiers';
|
import {Identifiers, identifierToken} from './identifiers';
|
||||||
import {ParseError, ParseSourceSpan} from './parse_util';
|
import {ParseError, ParseSourceSpan} from './parse_util';
|
||||||
import {AttrAst, DirectiveAst, ProviderAst, ProviderAstType, ReferenceAst, VariableAst} from './template_ast';
|
import {AttrAst, DirectiveAst, ProviderAst, ProviderAstType, ReferenceAst, VariableAst} from './template_parser/template_ast';
|
||||||
|
|
||||||
export class ProviderError extends ParseError {
|
export class ProviderError extends ParseError {
|
||||||
constructor(message: string, span: ParseSourceSpan) { super(span, message); }
|
constructor(message: string, span: ParseSourceSpan) { super(span, message); }
|
||||||
|
@ -12,14 +12,12 @@ import {Console} from '../core_private';
|
|||||||
import {BaseException} from '../src/facade/exceptions';
|
import {BaseException} from '../src/facade/exceptions';
|
||||||
import {ConcreteType, IS_DART, Type, isBlank, isString, stringify} from '../src/facade/lang';
|
import {ConcreteType, IS_DART, Type, isBlank, isString, stringify} from '../src/facade/lang';
|
||||||
|
|
||||||
import {ListWrapper,} from '../src/facade/collection';
|
|
||||||
import {PromiseWrapper} from '../src/facade/async';
|
import {PromiseWrapper} from '../src/facade/async';
|
||||||
import {createHostComponentMeta, CompileDirectiveMetadata, CompilePipeMetadata, CompileIdentifierMetadata, CompileNgModuleMetadata} from './compile_metadata';
|
import {createHostComponentMeta, CompileDirectiveMetadata, CompilePipeMetadata, CompileIdentifierMetadata, CompileNgModuleMetadata} from './compile_metadata';
|
||||||
import {TemplateAst,} from './template_ast';
|
import {StyleCompiler, CompiledStylesheet} from './style_compiler';
|
||||||
import {StyleCompiler, StylesCompileDependency, CompiledStylesheet} from './style_compiler';
|
import {ViewCompiler, ViewFactoryDependency, ComponentFactoryDependency} from './view_compiler/view_compiler';
|
||||||
import {ViewCompiler, ViewCompileResult, ViewFactoryDependency, ComponentFactoryDependency} from './view_compiler/view_compiler';
|
|
||||||
import {NgModuleCompiler} from './ng_module_compiler';
|
import {NgModuleCompiler} from './ng_module_compiler';
|
||||||
import {TemplateParser} from './template_parser';
|
import {TemplateParser} from './template_parser/template_parser';
|
||||||
import {DirectiveNormalizer} from './directive_normalizer';
|
import {DirectiveNormalizer} from './directive_normalizer';
|
||||||
import {CompileMetadataResolver} from './metadata_resolver';
|
import {CompileMetadataResolver} from './metadata_resolver';
|
||||||
import {CompilerConfig} from './config';
|
import {CompilerConfig} from './config';
|
||||||
|
@ -6,11 +6,12 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {isPresent} from '../src/facade/lang';
|
import {AST} from '../expression_parser/ast';
|
||||||
import {AST} from './expression_parser/ast';
|
import {isPresent} from '../facade/lang';
|
||||||
import {CompileDirectiveMetadata, CompileTokenMetadata, CompileProviderMetadata,} from './compile_metadata';
|
|
||||||
import {ParseSourceSpan} from './parse_util';
|
import {CompileDirectiveMetadata, CompileTokenMetadata, CompileProviderMetadata,} from '../compile_metadata';
|
||||||
import {SecurityContext} from '@angular/core';
|
import {ParseSourceSpan} from '../parse_util';
|
||||||
|
import {SecurityContext} from '../../../core/index';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An Abstract Syntax Tree node representing part of a parsed Angular template.
|
* An Abstract Syntax Tree node representing part of a parsed Angular template.
|
@ -6,30 +6,31 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Inject, Injectable, OpaqueToken, Optional, SchemaMetadata, SecurityContext} from '@angular/core';
|
import {Inject, Injectable, OpaqueToken, Optional, SecurityContext, SchemaMetadata} from '../../../core/index';
|
||||||
|
import {Console, MAX_INTERPOLATION_VALUES} from '../../core_private';
|
||||||
import {Console, MAX_INTERPOLATION_VALUES} from '../core_private';
|
import {ListWrapper, StringMapWrapper, SetWrapper,} from '../facade/collection';
|
||||||
|
import {RegExpWrapper, isPresent, StringWrapper, isBlank} from '../facade/lang';
|
||||||
import {ListWrapper, StringMapWrapper, SetWrapper,} from '../src/facade/collection';
|
import {BaseException} from '../facade/exceptions';
|
||||||
import {RegExpWrapper, isPresent, StringWrapper, isBlank} from '../src/facade/lang';
|
import {AST, Interpolation, ASTWithSource, TemplateBinding, RecursiveAstVisitor, BindingPipe, ParserError} from '../expression_parser/ast';
|
||||||
import {BaseException} from '../src/facade/exceptions';
|
import {Parser} from '../expression_parser/parser';
|
||||||
import {AST, Interpolation, ASTWithSource, TemplateBinding, RecursiveAstVisitor, BindingPipe, ParserError} from './expression_parser/ast';
|
import {
|
||||||
import {Parser} from './expression_parser/parser';
|
CompileDirectiveMetadata, CompilePipeMetadata, CompileTokenMetadata,
|
||||||
import {CompileDirectiveMetadata, CompilePipeMetadata, CompileMetadataWithIdentifier, CompileTokenMetadata, CompileIdentifierMap, removeIdentifierDuplicates} from './compile_metadata';
|
removeIdentifierDuplicates,
|
||||||
import {HtmlParser, HtmlParseTreeResult} from './html_parser';
|
} from '../compile_metadata';
|
||||||
import {splitNsName, mergeNsAndName} from './html_tags';
|
import {HtmlParser, HtmlParseTreeResult} from '../html_parser/html_parser';
|
||||||
import {ParseSourceSpan, ParseError, ParseErrorLevel} from './parse_util';
|
import {splitNsName, mergeNsAndName} from '../html_parser/html_tags';
|
||||||
import {InterpolationConfig} from './interpolation_config';
|
import {ParseSourceSpan, ParseError, ParseErrorLevel} from '../parse_util';
|
||||||
|
import {InterpolationConfig} from '../html_parser/interpolation_config';
|
||||||
import {ElementAst, BoundElementPropertyAst, BoundEventAst, ReferenceAst, TemplateAst, TemplateAstVisitor, templateVisitAll, TextAst, BoundTextAst, EmbeddedTemplateAst, AttrAst, NgContentAst, PropertyBindingType, DirectiveAst, BoundDirectivePropertyAst, ProviderAst, ProviderAstType, VariableAst} from './template_ast';
|
import {ElementAst, BoundElementPropertyAst, BoundEventAst, ReferenceAst, TemplateAst, TemplateAstVisitor, templateVisitAll, TextAst, BoundTextAst, EmbeddedTemplateAst, AttrAst, NgContentAst, PropertyBindingType, DirectiveAst, BoundDirectivePropertyAst, ProviderAst, ProviderAstType, VariableAst} from './template_ast';
|
||||||
import {CssSelector, SelectorMatcher} from './selector';
|
import {CssSelector, SelectorMatcher} from '../selector';
|
||||||
import {ElementSchemaRegistry} from './schema/element_schema_registry';
|
import {ElementSchemaRegistry} from '../schema/element_schema_registry';
|
||||||
import {preparseElement, PreparsedElementType} from './template_preparser';
|
import {preparseElement, PreparsedElementType} from './template_preparser';
|
||||||
import {isStyleUrlResolvable} from './style_url_resolver';
|
import {isStyleUrlResolvable} from '../style_url_resolver';
|
||||||
import {HtmlAstVisitor, HtmlElementAst, HtmlAttrAst, HtmlTextAst, HtmlCommentAst, HtmlExpansionAst, HtmlExpansionCaseAst, htmlVisitAll} from './html_ast';
|
import {HtmlAstVisitor, HtmlElementAst, HtmlAttrAst, HtmlTextAst, HtmlCommentAst, HtmlExpansionAst, HtmlExpansionCaseAst, htmlVisitAll} from '../html_parser/html_ast';
|
||||||
import {splitAtColon} from './util';
|
import {splitAtColon} from '../util';
|
||||||
import {identifierToken, Identifiers} from './identifiers';
|
import {identifierToken, Identifiers} from '../identifiers';
|
||||||
import {expandNodes} from './expander';
|
import {expandNodes} from '../html_parser/expander';
|
||||||
import {ProviderElementContext, ProviderViewContext} from './provider_analyzer';
|
import {ProviderElementContext, ProviderViewContext} from '../provider_analyzer';
|
||||||
|
|
||||||
// Group 1 = "bind-"
|
// Group 1 = "bind-"
|
||||||
// Group 2 = "var-"
|
// Group 2 = "var-"
|
@ -6,10 +6,10 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {isBlank} from '../src/facade/lang';
|
import {isBlank} from '../facade/lang';
|
||||||
|
|
||||||
import {HtmlElementAst} from './html_ast';
|
import {HtmlElementAst} from '../html_parser/html_ast';
|
||||||
import {splitNsName} from './html_tags';
|
import {splitNsName} from '../html_parser/html_tags';
|
||||||
|
|
||||||
const NG_CONTENT_SELECT_ATTR = 'select';
|
const NG_CONTENT_SELECT_ATTR = 'select';
|
||||||
const NG_CONTENT_ELEMENT = 'ng-content';
|
const NG_CONTENT_ELEMENT = 'ng-content';
|
@ -6,7 +6,7 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {TemplateAst} from '../template_ast';
|
import {TemplateAst} from '../template_parser/template_ast';
|
||||||
|
|
||||||
import {CompileNode} from './compile_element';
|
import {CompileNode} from './compile_element';
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ import {isBlank, isPresent} from '../facade/lang';
|
|||||||
import {Identifiers, identifierToken} from '../identifiers';
|
import {Identifiers, identifierToken} from '../identifiers';
|
||||||
import * as o from '../output/output_ast';
|
import * as o from '../output/output_ast';
|
||||||
import {convertValueToOutputAst} from '../output/value_util';
|
import {convertValueToOutputAst} from '../output/value_util';
|
||||||
import {ProviderAst, ProviderAstType, ReferenceAst, TemplateAst} from '../template_ast';
|
import {ProviderAst, ProviderAstType, ReferenceAst, TemplateAst} from '../template_parser/template_ast';
|
||||||
|
|
||||||
import {CompileView} from './compile_view';
|
import {CompileView} from './compile_view';
|
||||||
import {InjectMethodVars} from './constants';
|
import {InjectMethodVars} from './constants';
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
import {ListWrapper} from '../facade/collection';
|
import {ListWrapper} from '../facade/collection';
|
||||||
import {isPresent} from '../facade/lang';
|
import {isPresent} from '../facade/lang';
|
||||||
import * as o from '../output/output_ast';
|
import * as o from '../output/output_ast';
|
||||||
import {TemplateAst} from '../template_ast';
|
import {TemplateAst} from '../template_parser/template_ast';
|
||||||
|
|
||||||
import {CompileView} from './compile_view';
|
import {CompileView} from './compile_view';
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import {CompileDirectiveMetadata} from '../compile_metadata';
|
|||||||
import {ListWrapper, StringMapWrapper} from '../facade/collection';
|
import {ListWrapper, StringMapWrapper} from '../facade/collection';
|
||||||
import {StringWrapper, isBlank, isPresent} from '../facade/lang';
|
import {StringWrapper, isBlank, isPresent} from '../facade/lang';
|
||||||
import * as o from '../output/output_ast';
|
import * as o from '../output/output_ast';
|
||||||
import {BoundEventAst, DirectiveAst} from '../template_ast';
|
import {BoundEventAst, DirectiveAst} from '../template_parser/template_ast';
|
||||||
|
|
||||||
import {CompileBinding} from './compile_binding';
|
import {CompileBinding} from './compile_binding';
|
||||||
import {CompileElement} from './compile_element';
|
import {CompileElement} from './compile_element';
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
import {LifecycleHooks} from '../../core_private';
|
import {LifecycleHooks} from '../../core_private';
|
||||||
import {CompileDirectiveMetadata, CompilePipeMetadata} from '../compile_metadata';
|
import {CompileDirectiveMetadata, CompilePipeMetadata} from '../compile_metadata';
|
||||||
import * as o from '../output/output_ast';
|
import * as o from '../output/output_ast';
|
||||||
import {DirectiveAst} from '../template_ast';
|
import {DirectiveAst} from '../template_parser/template_ast';
|
||||||
|
|
||||||
import {CompileElement} from './compile_element';
|
import {CompileElement} from './compile_element';
|
||||||
import {CompileView} from './compile_view';
|
import {CompileView} from './compile_view';
|
||||||
|
@ -12,7 +12,7 @@ import {isBlank, isPresent} from '../facade/lang';
|
|||||||
import {Identifiers} from '../identifiers';
|
import {Identifiers} from '../identifiers';
|
||||||
import * as o from '../output/output_ast';
|
import * as o from '../output/output_ast';
|
||||||
import {DetectChangesVars, ViewProperties} from './constants';
|
import {DetectChangesVars, ViewProperties} from './constants';
|
||||||
import {BoundTextAst, BoundElementPropertyAst, DirectiveAst, PropertyBindingType,} from '../template_ast';
|
import {BoundTextAst, BoundElementPropertyAst, DirectiveAst, PropertyBindingType,} from '../template_parser/template_ast';
|
||||||
import {CompileView} from './compile_view';
|
import {CompileView} from './compile_view';
|
||||||
import {CompileElement, CompileNode} from './compile_element';
|
import {CompileElement, CompileNode} from './compile_element';
|
||||||
import {CompileMethod} from './compile_method';
|
import {CompileMethod} from './compile_method';
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {ListWrapper,} from '../facade/collection';
|
import {ListWrapper,} from '../facade/collection';
|
||||||
import {TemplateAst, TemplateAstVisitor, NgContentAst, EmbeddedTemplateAst, ElementAst, ReferenceAst, VariableAst, BoundEventAst, BoundElementPropertyAst, AttrAst, BoundTextAst, TextAst, DirectiveAst, BoundDirectivePropertyAst, templateVisitAll,} from '../template_ast';
|
import {TemplateAst, TemplateAstVisitor, NgContentAst, EmbeddedTemplateAst, ElementAst, ReferenceAst, VariableAst, BoundEventAst, BoundElementPropertyAst, AttrAst, BoundTextAst, TextAst, DirectiveAst, BoundDirectivePropertyAst, templateVisitAll,} from '../template_parser/template_ast';
|
||||||
import {bindRenderText, bindRenderInputs, bindDirectiveInputs, bindDirectiveHostProps} from './property_binder';
|
import {bindRenderText, bindRenderInputs, bindDirectiveInputs, bindDirectiveHostProps} from './property_binder';
|
||||||
import {bindRenderOutputs, collectEventListeners, bindDirectiveOutputs} from './event_binder';
|
import {bindRenderOutputs, collectEventListeners, bindDirectiveOutputs} from './event_binder';
|
||||||
import {bindDirectiveAfterContentLifecycleCallbacks, bindDirectiveAfterViewLifecycleCallbacks, bindDirectiveDestroyLifecycleCallbacks, bindPipeDestroyLifecycleCallbacks, bindDirectiveDetectChangesLifecycleCallbacks} from './lifecycle_binder';
|
import {bindDirectiveAfterContentLifecycleCallbacks, bindDirectiveAfterViewLifecycleCallbacks, bindDirectiveDestroyLifecycleCallbacks, bindPipeDestroyLifecycleCallbacks, bindDirectiveDetectChangesLifecycleCallbacks} from './lifecycle_binder';
|
||||||
|
@ -15,7 +15,7 @@ import {ListWrapper, SetWrapper, StringMapWrapper} from '../facade/collection';
|
|||||||
import {StringWrapper, isPresent} from '../facade/lang';
|
import {StringWrapper, isPresent} from '../facade/lang';
|
||||||
import {Identifiers, identifierToken} from '../identifiers';
|
import {Identifiers, identifierToken} from '../identifiers';
|
||||||
import * as o from '../output/output_ast';
|
import * as o from '../output/output_ast';
|
||||||
import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, ProviderAst, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '../template_ast';
|
import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, ProviderAst, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '../template_parser/template_ast';
|
||||||
import {createDiTokenExpression} from '../util';
|
import {createDiTokenExpression} from '../util';
|
||||||
|
|
||||||
import {CompileElement, CompileNode} from './compile_element';
|
import {CompileElement, CompileNode} from './compile_element';
|
||||||
|
@ -12,7 +12,7 @@ import {AnimationCompiler} from '../animation/animation_compiler';
|
|||||||
import {CompileDirectiveMetadata, CompilePipeMetadata} from '../compile_metadata';
|
import {CompileDirectiveMetadata, CompilePipeMetadata} from '../compile_metadata';
|
||||||
import {CompilerConfig} from '../config';
|
import {CompilerConfig} from '../config';
|
||||||
import * as o from '../output/output_ast';
|
import * as o from '../output/output_ast';
|
||||||
import {TemplateAst} from '../template_ast';
|
import {TemplateAst} from '../template_parser/template_ast';
|
||||||
|
|
||||||
import {CompileElement} from './compile_element';
|
import {CompileElement} from './compile_element';
|
||||||
import {CompileView} from './compile_view';
|
import {CompileView} from './compile_view';
|
||||||
|
@ -6,18 +6,18 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../core/testing/testing_internal';
|
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../../core/testing/testing_internal';
|
||||||
import {CssLexer, CssLexerMode, CssScannerError, CssToken, CssTokenType} from '../src/css_lexer';
|
import {CssLexer, CssLexerMode, CssScannerError, CssToken, CssTokenType} from '../../src/css_parser/css_lexer';
|
||||||
import {isPresent} from '../src/facade/lang';
|
import {isPresent} from '../../src/facade/lang';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
function tokenize(
|
function tokenize(
|
||||||
code: any /** TODO #9100 */, trackComments: boolean = false,
|
code: string, trackComments: boolean = false,
|
||||||
mode: CssLexerMode = CssLexerMode.ALL): CssToken[] {
|
mode: CssLexerMode = CssLexerMode.ALL): CssToken[] {
|
||||||
var scanner = new CssLexer().scan(code, trackComments);
|
const scanner = new CssLexer().scan(code, trackComments);
|
||||||
scanner.setMode(mode);
|
scanner.setMode(mode);
|
||||||
|
|
||||||
var tokens: any[] /** TODO #9100 */ = [];
|
var tokens: CssToken[] = [];
|
||||||
var output = scanner.scan();
|
var output = scanner.scan();
|
||||||
while (output != null) {
|
while (output != null) {
|
||||||
var error = output.error;
|
var error = output.error;
|
||||||
@ -316,7 +316,7 @@ export function main() {
|
|||||||
|
|
||||||
describe('Media Query Mode', () => {
|
describe('Media Query Mode', () => {
|
||||||
it('should validate media queries with a reduced subset of valid characters', () => {
|
it('should validate media queries with a reduced subset of valid characters', () => {
|
||||||
function tokenizeQuery(code: any /** TODO #9100 */) {
|
function tokenizeQuery(code: string) {
|
||||||
return tokenize(code, false, CssLexerMode.MEDIA_QUERY);
|
return tokenize(code, false, CssLexerMode.MEDIA_QUERY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,7 +357,7 @@ export function main() {
|
|||||||
'Style Block Mode', () => {
|
'Style Block Mode', () => {
|
||||||
it('should style blocks with a reduced subset of valid characters',
|
it('should style blocks with a reduced subset of valid characters',
|
||||||
() => {
|
() => {
|
||||||
function tokenizeStyles(code: any /** TODO #9100 */) {
|
function tokenizeStyles(code: string) {
|
||||||
return tokenize(code, false, CssLexerMode.STYLE_BLOCK);
|
return tokenize(code, false, CssLexerMode.STYLE_BLOCK);
|
||||||
}
|
}
|
||||||
|
|
@ -6,11 +6,11 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../core/testing/testing_internal';
|
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../../core/testing/testing_internal';
|
||||||
import {CssBlockAst, CssBlockDefinitionRuleAst, CssBlockRuleAst, CssDefinitionAst, CssInlineRuleAst, CssKeyframeDefinitionAst, CssKeyframeRuleAst, CssMediaQueryRuleAst, CssRuleAst, CssSelectorAst, CssSelectorRuleAst, CssStyleSheetAst, CssStyleValueAst} from '../src/css_ast';
|
import {CssBlockAst, CssBlockDefinitionRuleAst, CssBlockRuleAst, CssDefinitionAst, CssInlineRuleAst, CssKeyframeDefinitionAst, CssKeyframeRuleAst, CssMediaQueryRuleAst, CssSelectorRuleAst, CssStyleSheetAst, CssStyleValueAst} from '../../src/css_parser/css_ast';
|
||||||
import {BlockType, CssParseError, CssParser, CssToken, ParsedCssResult} from '../src/css_parser';
|
import {BlockType, CssParseError, CssParser, CssToken, ParsedCssResult} from '../../src/css_parser/css_parser';
|
||||||
import {BaseException} from '../src/facade/exceptions';
|
import {BaseException} from '../../src/facade/exceptions';
|
||||||
import {ParseLocation} from '../src/parse_util';
|
import {ParseLocation} from '../../src/parse_util';
|
||||||
|
|
||||||
export function assertTokens(tokens: CssToken[], valuesArr: string[]) {
|
export function assertTokens(tokens: CssToken[], valuesArr: string[]) {
|
||||||
for (var i = 0; i < tokens.length; i++) {
|
for (var i = 0; i < tokens.length; i++) {
|
@ -6,11 +6,11 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../core/testing/testing_internal';
|
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../../core/testing/testing_internal';
|
||||||
import {CssAst, CssAstVisitor, CssAtRulePredicateAst, CssBlockAst, CssBlockDefinitionRuleAst, CssBlockRuleAst, CssDefinitionAst, CssInlineRuleAst, CssKeyframeDefinitionAst, CssKeyframeRuleAst, CssMediaQueryRuleAst, CssPseudoSelectorAst, CssRuleAst, CssSelectorAst, CssSelectorRuleAst, CssSimpleSelectorAst, CssStyleSheetAst, CssStyleValueAst, CssStylesBlockAst, CssUnknownRuleAst, CssUnknownTokenListAst} from '../src/css_ast';
|
import {CssAst, CssAstVisitor, CssAtRulePredicateAst, CssBlockAst, CssBlockDefinitionRuleAst, CssBlockRuleAst, CssDefinitionAst, CssInlineRuleAst, CssKeyframeDefinitionAst, CssKeyframeRuleAst, CssMediaQueryRuleAst, CssPseudoSelectorAst, CssRuleAst, CssSelectorAst, CssSelectorRuleAst, CssSimpleSelectorAst, CssStyleSheetAst, CssStyleValueAst, CssStylesBlockAst, CssUnknownRuleAst, CssUnknownTokenListAst} from '../../src/css_parser/css_ast';
|
||||||
import {BlockType, CssParseError, CssParser, CssToken} from '../src/css_parser';
|
import {BlockType, CssParseError, CssParser, CssToken} from '../../src/css_parser/css_parser';
|
||||||
import {BaseException} from '../src/facade/exceptions';
|
import {BaseException} from '../../src/facade/exceptions';
|
||||||
import {isPresent} from '../src/facade/lang';
|
import {isPresent} from '../../src/facade/lang';
|
||||||
|
|
||||||
function _assertTokens(tokens: CssToken[], valuesArr: string[]): void {
|
function _assertTokens(tokens: CssToken[], valuesArr: string[]): void {
|
||||||
expect(tokens.length).toEqual(valuesArr.length);
|
expect(tokens.length).toEqual(valuesArr.length);
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import {AST, AstVisitor, Binary, BindingPipe, Chain, Conditional, EmptyExpr, FunctionCall, ImplicitReceiver, Interpolation, KeyedRead, KeyedWrite, LiteralArray, LiteralMap, LiteralPrimitive, MethodCall, PrefixNot, PropertyRead, PropertyWrite, Quote, SafeMethodCall, SafePropertyRead} from '../../src/expression_parser/ast';
|
import {AST, AstVisitor, Binary, BindingPipe, Chain, Conditional, EmptyExpr, FunctionCall, ImplicitReceiver, Interpolation, KeyedRead, KeyedWrite, LiteralArray, LiteralMap, LiteralPrimitive, MethodCall, PrefixNot, PropertyRead, PropertyWrite, Quote, SafeMethodCall, SafePropertyRead} from '../../src/expression_parser/ast';
|
||||||
import {StringWrapper, isPresent, isString} from '../../src/facade/lang';
|
import {StringWrapper, isPresent, isString} from '../../src/facade/lang';
|
||||||
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../../src/interpolation_config';
|
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../../src/html_parser/interpolation_config';
|
||||||
|
|
||||||
class Unparser implements AstVisitor {
|
class Unparser implements AstVisitor {
|
||||||
private static _quoteRegExp = /"/g;
|
private static _quoteRegExp = /"/g;
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {ddescribe, describe, expect, iit, it} from '../../core/testing/testing_internal';
|
import {ddescribe, describe, expect, iit, it} from '../../../core/testing/testing_internal';
|
||||||
import {ExpansionResult, expandNodes} from '../src/expander';
|
import {ExpansionResult, expandNodes} from '../../src/html_parser/expander';
|
||||||
import {HtmlAttrAst, HtmlElementAst, HtmlTextAst} from '../src/html_ast';
|
import {HtmlAttrAst, HtmlElementAst, HtmlTextAst} from '../../src/html_parser/html_ast';
|
||||||
import {HtmlParser} from '../src/html_parser';
|
import {HtmlParser} from '../../src/html_parser/html_parser';
|
||||||
import {ParseError} from '../src/parse_util';
|
import {ParseError} from '../../src/parse_util';
|
||||||
|
|
||||||
import {humanizeNodes} from './html_ast_spec_utils';
|
import {humanizeNodes} from './html_ast_spec_utils';
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
import {HtmlAst, HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst, htmlVisitAll} from '@angular/compiler/src/html_ast';
|
import {beforeEach, ddescribe, describe, expect, it} from '../../../core/testing/testing_internal';
|
||||||
import {HtmlParser} from '@angular/compiler/src/html_parser';
|
import {HtmlAst, HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst, htmlVisitAll} from '../../src/html_parser/html_ast';
|
||||||
import {beforeEach, ddescribe, describe, expect, it} from '@angular/core/testing/testing_internal';
|
import {HtmlParser} from '../../src/html_parser/html_parser';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('HtmlAst serilaizer', () => {
|
describe('HtmlAst serilaizer', () => {
|
@ -6,11 +6,10 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {HtmlAst, HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst, htmlVisitAll} from '@angular/compiler/src/html_ast';
|
import {BaseException} from '../../src/facade/exceptions';
|
||||||
import {HtmlParseTreeResult} from '@angular/compiler/src/html_parser';
|
import {HtmlAst, HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst, htmlVisitAll} from '../../src/html_parser/html_ast';
|
||||||
import {ParseLocation} from '@angular/compiler/src/parse_util';
|
import {HtmlParseTreeResult} from '../../src/html_parser/html_parser';
|
||||||
|
import {ParseLocation} from '../../src/parse_util';
|
||||||
import {BaseException} from '../src/facade/exceptions';
|
|
||||||
|
|
||||||
export function humanizeDom(
|
export function humanizeDom(
|
||||||
parseResult: HtmlParseTreeResult, addSourceSpan: boolean = false): any[] {
|
parseResult: HtmlParseTreeResult, addSourceSpan: boolean = false): any[] {
|
@ -6,10 +6,10 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {HtmlToken, HtmlTokenError, HtmlTokenType, tokenizeHtml} from '@angular/compiler/src/html_lexer';
|
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../../core/testing/testing_internal';
|
||||||
import {InterpolationConfig} from '@angular/compiler/src/interpolation_config';
|
import {HtmlToken, HtmlTokenError, HtmlTokenType, tokenizeHtml} from '../../src/html_parser/html_lexer';
|
||||||
import {ParseLocation, ParseSourceFile, ParseSourceSpan} from '@angular/compiler/src/parse_util';
|
import {InterpolationConfig} from '../../src/html_parser/interpolation_config';
|
||||||
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '@angular/core/testing/testing_internal';
|
import {ParseLocation, ParseSourceFile, ParseSourceSpan} from '../../src/parse_util';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('HtmlLexer', () => {
|
describe('HtmlLexer', () => {
|
@ -6,11 +6,11 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst} from '@angular/compiler/src/html_ast';
|
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../../core/testing/testing_internal';
|
||||||
import {HtmlTokenType} from '@angular/compiler/src/html_lexer';
|
import {HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst} from '../../src/html_parser/html_ast';
|
||||||
import {HtmlParseTreeResult, HtmlParser, HtmlTreeError} from '@angular/compiler/src/html_parser';
|
import {HtmlTokenType} from '../../src/html_parser/html_lexer';
|
||||||
import {ParseError} from '@angular/compiler/src/parse_util';
|
import {HtmlParseTreeResult, HtmlParser, HtmlTreeError} from '../../src/html_parser/html_parser';
|
||||||
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '@angular/core/testing/testing_internal';
|
import {ParseError} from '../../src/parse_util';
|
||||||
|
|
||||||
import {humanizeDom, humanizeDomSourceSpans, humanizeLineColumn} from './html_ast_spec_utils';
|
import {humanizeDom, humanizeDomSourceSpans, humanizeLineColumn} from './html_ast_spec_utils';
|
||||||
|
|
@ -6,11 +6,12 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {HtmlParser} from '@angular/compiler/src/html_parser';
|
|
||||||
import {Catalog, strHash} from '@angular/compiler/src/i18n/catalog';
|
import {Catalog, strHash} from '@angular/compiler/src/i18n/catalog';
|
||||||
import {DEFAULT_INTERPOLATION_CONFIG} from '@angular/compiler/src/interpolation_config';
|
|
||||||
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
|
import {HtmlParser} from '../../src/html_parser/html_parser';
|
||||||
|
import {DEFAULT_INTERPOLATION_CONFIG} from '../../src/html_parser/interpolation_config';
|
||||||
|
|
||||||
import Serializable = webdriver.Serializable;
|
import Serializable = webdriver.Serializable;
|
||||||
import {Serializer} from '@angular/compiler/src/i18n/serializers/serializer';
|
import {Serializer} from '@angular/compiler/src/i18n/serializers/serializer';
|
||||||
import {serializeAst} from '@angular/compiler/src/i18n/catalog';
|
import {serializeAst} from '@angular/compiler/src/i18n/catalog';
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {HtmlParser} from '@angular/compiler/src/html_parser';
|
|
||||||
import {ExtractionResult, extractAstMessages} from '@angular/compiler/src/i18n/extractor';
|
import {ExtractionResult, extractAstMessages} from '@angular/compiler/src/i18n/extractor';
|
||||||
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
import {serializeAst} from '../html_ast_serializer_spec'
|
import {HtmlParser} from '../../src/html_parser/html_parser';
|
||||||
|
import {serializeAst} from '../html_parser/html_ast_serializer_spec'
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
ddescribe(
|
ddescribe(
|
||||||
|
@ -8,17 +8,17 @@
|
|||||||
|
|
||||||
import {Lexer as ExpressionLexer} from '@angular/compiler/src/expression_parser/lexer';
|
import {Lexer as ExpressionLexer} from '@angular/compiler/src/expression_parser/lexer';
|
||||||
import {Parser as ExpressionParser} from '@angular/compiler/src/expression_parser/parser';
|
import {Parser as ExpressionParser} from '@angular/compiler/src/expression_parser/parser';
|
||||||
import {HtmlAttrAst, HtmlElementAst, HtmlTextAst} from '@angular/compiler/src/html_ast';
|
|
||||||
import {HtmlParseTreeResult, HtmlParser} from '@angular/compiler/src/html_parser';
|
|
||||||
import {I18nHtmlParser} from '@angular/compiler/src/i18n/i18n_html_parser';
|
import {I18nHtmlParser} from '@angular/compiler/src/i18n/i18n_html_parser';
|
||||||
import {Message, id} from '@angular/compiler/src/i18n/message';
|
import {Message, id} from '@angular/compiler/src/i18n/message';
|
||||||
import {deserializeXmb} from '@angular/compiler/src/i18n/xmb_serializer';
|
import {deserializeXmb} from '@angular/compiler/src/i18n/xmb_serializer';
|
||||||
import {InterpolationConfig} from '@angular/compiler/src/interpolation_config';
|
|
||||||
import {ParseError} from '@angular/compiler/src/parse_util';
|
import {ParseError} from '@angular/compiler/src/parse_util';
|
||||||
import {humanizeDom} from '@angular/compiler/test/html_ast_spec_utils';
|
|
||||||
import {ddescribe, describe, expect, iit, it} from '@angular/core/testing/testing_internal';
|
import {ddescribe, describe, expect, iit, it} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
import {StringMapWrapper} from '../../src/facade/collection';
|
import {StringMapWrapper} from '../../src/facade/collection';
|
||||||
|
import {HtmlAttrAst, HtmlElementAst, HtmlTextAst} from '../../src/html_parser/html_ast';
|
||||||
|
import {HtmlParseTreeResult, HtmlParser} from '../../src/html_parser/html_parser';
|
||||||
|
import {InterpolationConfig} from '../../src/html_parser/interpolation_config';
|
||||||
|
import {humanizeDom} from '../html_parser/html_ast_spec_utils';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('I18nHtmlParser', () => {
|
describe('I18nHtmlParser', () => {
|
||||||
|
@ -6,12 +6,13 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {HtmlParser} from '@angular/compiler/src/html_parser';
|
|
||||||
import {serializeAst} from '@angular/compiler/src/i18n/catalog';
|
import {serializeAst} from '@angular/compiler/src/i18n/catalog';
|
||||||
import {extractI18nMessages} from '@angular/compiler/src/i18n/i18n_parser';
|
import {extractI18nMessages} from '@angular/compiler/src/i18n/i18n_parser';
|
||||||
import {DEFAULT_INTERPOLATION_CONFIG} from '@angular/compiler/src/interpolation_config';
|
|
||||||
import {ddescribe, describe, expect, it} from '@angular/core/testing/testing_internal';
|
import {ddescribe, describe, expect, it} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
|
import {HtmlParser} from '../../src/html_parser/html_parser';
|
||||||
|
import {DEFAULT_INTERPOLATION_CONFIG} from '../../src/html_parser/interpolation_config';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
ddescribe('I18nParser', () => {
|
ddescribe('I18nParser', () => {
|
||||||
|
|
||||||
|
@ -8,11 +8,12 @@
|
|||||||
|
|
||||||
import {Lexer as ExpressionLexer} from '@angular/compiler/src/expression_parser/lexer';
|
import {Lexer as ExpressionLexer} from '@angular/compiler/src/expression_parser/lexer';
|
||||||
import {Parser as ExpressionParser} from '@angular/compiler/src/expression_parser/parser';
|
import {Parser as ExpressionParser} from '@angular/compiler/src/expression_parser/parser';
|
||||||
import {HtmlParser} from '@angular/compiler/src/html_parser';
|
|
||||||
import {Message} from '@angular/compiler/src/i18n/message';
|
import {Message} from '@angular/compiler/src/i18n/message';
|
||||||
import {MessageExtractor, removeDuplicates} from '@angular/compiler/src/i18n/message_extractor';
|
import {MessageExtractor, removeDuplicates} from '@angular/compiler/src/i18n/message_extractor';
|
||||||
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
|
import {HtmlParser} from '../../src/html_parser/html_parser';
|
||||||
|
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('MessageExtractor', () => {
|
describe('MessageExtractor', () => {
|
||||||
|
@ -6,12 +6,13 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {HtmlParser} from '@angular/compiler/src/html_parser';
|
|
||||||
import {Catalog} from '@angular/compiler/src/i18n/catalog';
|
import {Catalog} from '@angular/compiler/src/i18n/catalog';
|
||||||
import {XmbSerializer} from '@angular/compiler/src/i18n/serializers/xmb';
|
import {XmbSerializer} from '@angular/compiler/src/i18n/serializers/xmb';
|
||||||
import {DEFAULT_INTERPOLATION_CONFIG} from '@angular/compiler/src/interpolation_config';
|
|
||||||
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
|
import {HtmlParser} from '../../../src/html_parser/html_parser';
|
||||||
|
import {DEFAULT_INTERPOLATION_CONFIG} from '../../../src/html_parser/interpolation_config';
|
||||||
|
|
||||||
|
|
||||||
export function main(): void {
|
export function main(): void {
|
||||||
ddescribe('XMB serializer', () => {
|
ddescribe('XMB serializer', () => {
|
||||||
|
@ -6,12 +6,13 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {HtmlAst} from '@angular/compiler/src/html_ast';
|
|
||||||
import {Message, id} from '@angular/compiler/src/i18n/message';
|
import {Message, id} from '@angular/compiler/src/i18n/message';
|
||||||
import {deserializeXmb, serializeXmb} from '@angular/compiler/src/i18n/xmb_serializer';
|
import {deserializeXmb, serializeXmb} from '@angular/compiler/src/i18n/xmb_serializer';
|
||||||
import {ParseError, ParseSourceSpan} from '@angular/compiler/src/parse_util';
|
import {ParseError, ParseSourceSpan} from '@angular/compiler/src/parse_util';
|
||||||
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
|
import {HtmlAst} from '../../src/html_parser/html_ast';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('Xmb', () => {
|
describe('Xmb', () => {
|
||||||
describe('Xmb Serialization', () => {
|
describe('Xmb Serialization', () => {
|
||||||
|
@ -6,13 +6,14 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {HtmlElementAst} from '@angular/compiler/src/html_ast';
|
|
||||||
import {HtmlParser} from '@angular/compiler/src/html_parser';
|
|
||||||
import {DomElementSchemaRegistry} from '@angular/compiler/src/schema/dom_element_schema_registry';
|
import {DomElementSchemaRegistry} from '@angular/compiler/src/schema/dom_element_schema_registry';
|
||||||
import {CUSTOM_ELEMENTS_SCHEMA, SecurityContext} from '@angular/core';
|
import {CUSTOM_ELEMENTS_SCHEMA, SecurityContext} from '@angular/core';
|
||||||
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||||
import {browserDetection} from '@angular/platform-browser/testing/browser_util';
|
import {browserDetection} from '@angular/platform-browser/testing/browser_util';
|
||||||
|
|
||||||
|
import {HtmlElementAst} from '../../src/html_parser/html_ast';
|
||||||
|
import {HtmlParser} from '../../src/html_parser/html_parser';
|
||||||
|
|
||||||
import {extractSchema} from './schema_extractor';
|
import {extractSchema} from './schema_extractor';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
|
@ -9,19 +9,19 @@
|
|||||||
import {CompileDiDependencyMetadata, CompileDirectiveMetadata, CompilePipeMetadata, CompileProviderMetadata, CompileQueryMetadata, CompileTemplateMetadata, CompileTokenMetadata, CompileTypeMetadata} from '@angular/compiler/src/compile_metadata';
|
import {CompileDiDependencyMetadata, CompileDirectiveMetadata, CompilePipeMetadata, CompileProviderMetadata, CompileQueryMetadata, CompileTemplateMetadata, CompileTokenMetadata, CompileTypeMetadata} from '@angular/compiler/src/compile_metadata';
|
||||||
import {DomElementSchemaRegistry} from '@angular/compiler/src/schema/dom_element_schema_registry';
|
import {DomElementSchemaRegistry} from '@angular/compiler/src/schema/dom_element_schema_registry';
|
||||||
import {ElementSchemaRegistry} from '@angular/compiler/src/schema/element_schema_registry';
|
import {ElementSchemaRegistry} from '@angular/compiler/src/schema/element_schema_registry';
|
||||||
import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, PropertyBindingType, ProviderAstType, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '@angular/compiler/src/template_ast';
|
import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, PropertyBindingType, ProviderAstType, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '@angular/compiler/src/template_parser/template_ast';
|
||||||
import {TEMPLATE_TRANSFORMS, TemplateParser, splitClasses} from '@angular/compiler/src/template_parser';
|
import {TEMPLATE_TRANSFORMS, TemplateParser, splitClasses} from '@angular/compiler/src/template_parser/template_parser';
|
||||||
import {MockSchemaRegistry} from '@angular/compiler/testing';
|
import {MockSchemaRegistry} from '@angular/compiler/testing';
|
||||||
import {SchemaMetadata, SecurityContext} from '@angular/core';
|
import {SchemaMetadata, SecurityContext} from '@angular/core';
|
||||||
import {Console} from '@angular/core/src/console';
|
import {Console} from '@angular/core/src/console';
|
||||||
import {TestBed} from '@angular/core/testing';
|
import {TestBed} from '@angular/core/testing';
|
||||||
import {afterEach, beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
|
import {afterEach, beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal';
|
||||||
|
|
||||||
import {Identifiers, identifierToken} from '../src/identifiers';
|
import {Identifiers, identifierToken} from '../../src/identifiers';
|
||||||
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../src/interpolation_config';
|
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../../src/html_parser/interpolation_config';
|
||||||
|
|
||||||
import {unparse} from './expression_parser/unparser';
|
import {unparse} from '../expression_parser/unparser';
|
||||||
import {TEST_COMPILER_PROVIDERS} from './test_bindings';
|
import {TEST_COMPILER_PROVIDERS} from '../test_bindings';
|
||||||
|
|
||||||
var someModuleUrl = 'package:someModule';
|
var someModuleUrl = 'package:someModule';
|
||||||
|
|
@ -6,17 +6,18 @@
|
|||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {HtmlParser} from '@angular/compiler/src/html_parser';
|
import {afterEach, beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '../../../core/testing/testing_internal';
|
||||||
import {PreparsedElement, PreparsedElementType, preparseElement} from '@angular/compiler/src/template_preparser';
|
import {HtmlElementAst} from '../../src/html_parser/html_ast';
|
||||||
import {afterEach, beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
import {HtmlParser} from '../../src/html_parser/html_parser';
|
||||||
|
import {PreparsedElement, PreparsedElementType, preparseElement} from '../../src/template_parser/template_preparser';
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('preparseElement', () => {
|
describe('preparseElement', () => {
|
||||||
var htmlParser: any /** TODO #9100 */;
|
var htmlParser: HtmlParser;
|
||||||
beforeEach(inject([HtmlParser], (_htmlParser: HtmlParser) => { htmlParser = _htmlParser; }));
|
beforeEach(inject([HtmlParser], (_htmlParser: HtmlParser) => { htmlParser = _htmlParser; }));
|
||||||
|
|
||||||
function preparse(html: string): PreparsedElement {
|
function preparse(html: string): PreparsedElement {
|
||||||
return preparseElement(htmlParser.parse(html, 'TestComp').rootNodes[0]);
|
return preparseElement(htmlParser.parse(html, 'TestComp').rootNodes[0] as HtmlElementAst);
|
||||||
}
|
}
|
||||||
|
|
||||||
it('should detect script elements', inject([HtmlParser], (htmlParser: HtmlParser) => {
|
it('should detect script elements', inject([HtmlParser], (htmlParser: HtmlParser) => {
|
Reference in New Issue
Block a user