@angular/compiler 14.0.0-next.9 → 14.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/esm2020/src/compiler.mjs +3 -2
  2. package/esm2020/src/compiler_facade_interface.mjs +7 -1
  3. package/esm2020/src/core.mjs +6 -6
  4. package/esm2020/src/expression_parser/parser.mjs +12 -12
  5. package/esm2020/src/i18n/i18n_parser.mjs +3 -3
  6. package/esm2020/src/jit_compiler_facade.mjs +74 -42
  7. package/esm2020/src/ml_parser/html_whitespaces.mjs +2 -2
  8. package/esm2020/src/ml_parser/lexer.mjs +36 -36
  9. package/esm2020/src/ml_parser/parser.mjs +41 -41
  10. package/esm2020/src/render3/partial/api.mjs +1 -1
  11. package/esm2020/src/render3/partial/class_metadata.mjs +1 -1
  12. package/esm2020/src/render3/partial/component.mjs +28 -37
  13. package/esm2020/src/render3/partial/directive.mjs +6 -3
  14. package/esm2020/src/render3/partial/factory.mjs +1 -1
  15. package/esm2020/src/render3/partial/injectable.mjs +1 -1
  16. package/esm2020/src/render3/partial/injector.mjs +1 -1
  17. package/esm2020/src/render3/partial/ng_module.mjs +3 -3
  18. package/esm2020/src/render3/partial/pipe.mjs +6 -3
  19. package/esm2020/src/render3/r3_ast.mjs +3 -3
  20. package/esm2020/src/render3/r3_factory.mjs +6 -6
  21. package/esm2020/src/render3/r3_identifiers.mjs +2 -1
  22. package/esm2020/src/render3/r3_pipe_compiler.mjs +5 -1
  23. package/esm2020/src/render3/util.mjs +4 -4
  24. package/esm2020/src/render3/view/api.mjs +7 -2
  25. package/esm2020/src/render3/view/compiler.mjs +45 -35
  26. package/esm2020/src/render3/view/i18n/get_msg_utils.mjs +58 -5
  27. package/esm2020/src/render3/view/i18n/meta.mjs +4 -4
  28. package/esm2020/src/render3/view/i18n/util.mjs +2 -2
  29. package/esm2020/src/render3/view/style_parser.mjs +19 -19
  30. package/esm2020/src/render3/view/styling_builder.mjs +6 -6
  31. package/esm2020/src/render3/view/template.mjs +25 -25
  32. package/esm2020/src/render3/view/util.mjs +14 -5
  33. package/esm2020/src/selector.mjs +8 -8
  34. package/esm2020/src/template_parser/binding_parser.mjs +8 -8
  35. package/esm2020/src/util.mjs +8 -8
  36. package/esm2020/src/version.mjs +1 -1
  37. package/fesm2015/compiler.mjs +416 -301
  38. package/fesm2015/compiler.mjs.map +1 -1
  39. package/fesm2015/testing.mjs +1 -1
  40. package/fesm2020/compiler.mjs +424 -314
  41. package/fesm2020/compiler.mjs.map +1 -1
  42. package/fesm2020/testing.mjs +1 -1
  43. package/index.d.ts +4964 -5
  44. package/package.json +3 -3
  45. package/testing/index.d.ts +22 -5
  46. package/compiler.d.ts +0 -8
  47. package/public_api.d.ts +0 -13
  48. package/src/assertions.d.ts +0 -8
  49. package/src/chars.d.ts +0 -75
  50. package/src/compiler.d.ts +0 -77
  51. package/src/compiler_facade_interface.d.ts +0 -284
  52. package/src/compiler_util/expression_converter.d.ts +0 -71
  53. package/src/config.d.ts +0 -25
  54. package/src/constant_pool.d.ts +0 -37
  55. package/src/core.d.ts +0 -216
  56. package/src/expression_parser/ast.d.ts +0 -440
  57. package/src/expression_parser/lexer.d.ts +0 -47
  58. package/src/expression_parser/parser.d.ts +0 -315
  59. package/src/i18n/big_integer.d.ts +0 -108
  60. package/src/i18n/digest.d.ts +0 -44
  61. package/src/i18n/extractor_merger.d.ts +0 -27
  62. package/src/i18n/i18n_ast.d.ts +0 -148
  63. package/src/i18n/i18n_html_parser.d.ts +0 -19
  64. package/src/i18n/i18n_parser.d.ts +0 -18
  65. package/src/i18n/index.d.ts +0 -15
  66. package/src/i18n/message_bundle.d.ts +0 -28
  67. package/src/i18n/parse_util.d.ts +0 -14
  68. package/src/i18n/serializers/placeholder.d.ts +0 -25
  69. package/src/i18n/serializers/serializer.d.ts +0 -46
  70. package/src/i18n/serializers/xliff.d.ts +0 -19
  71. package/src/i18n/serializers/xliff2.d.ts +0 -19
  72. package/src/i18n/serializers/xmb.d.ts +0 -22
  73. package/src/i18n/serializers/xml_helper.d.ts +0 -52
  74. package/src/i18n/serializers/xtb.d.ts +0 -20
  75. package/src/i18n/translation_bundle.d.ts +0 -27
  76. package/src/injectable_compiler_2.d.ts +0 -24
  77. package/src/jit_compiler_facade.d.ts +0 -46
  78. package/src/ml_parser/ast.d.ts +0 -89
  79. package/src/ml_parser/entities.d.ts +0 -9
  80. package/src/ml_parser/html_parser.d.ts +0 -13
  81. package/src/ml_parser/html_tags.d.ts +0 -33
  82. package/src/ml_parser/html_whitespaces.d.ts +0 -45
  83. package/src/ml_parser/icu_ast_expander.d.ts +0 -42
  84. package/src/ml_parser/interpolation_config.d.ts +0 -14
  85. package/src/ml_parser/lexer.d.ts +0 -114
  86. package/src/ml_parser/parser.d.ts +0 -26
  87. package/src/ml_parser/tags.d.ts +0 -29
  88. package/src/ml_parser/tokens.d.ts +0 -141
  89. package/src/ml_parser/xml_parser.d.ts +0 -13
  90. package/src/ml_parser/xml_tags.d.ts +0 -24
  91. package/src/output/abstract_emitter.d.ts +0 -66
  92. package/src/output/abstract_js_emitter.d.ts +0 -19
  93. package/src/output/map_util.d.ts +0 -18
  94. package/src/output/output_ast.d.ts +0 -575
  95. package/src/output/output_jit.d.ts +0 -73
  96. package/src/output/output_jit_trusted_types.d.ts +0 -43
  97. package/src/output/source_map.d.ts +0 -29
  98. package/src/parse_util.d.ts +0 -75
  99. package/src/render3/partial/api.d.ts +0 -441
  100. package/src/render3/partial/class_metadata.d.ts +0 -10
  101. package/src/render3/partial/component.d.ts +0 -39
  102. package/src/render3/partial/directive.d.ts +0 -13
  103. package/src/render3/partial/factory.d.ts +0 -3
  104. package/src/render3/partial/injectable.d.ts +0 -19
  105. package/src/render3/partial/injector.d.ts +0 -3
  106. package/src/render3/partial/ng_module.d.ts +0 -3
  107. package/src/render3/partial/pipe.d.ts +0 -12
  108. package/src/render3/partial/util.d.ts +0 -33
  109. package/src/render3/r3_ast.d.ts +0 -211
  110. package/src/render3/r3_class_metadata_compiler.d.ts +0 -35
  111. package/src/render3/r3_factory.d.ts +0 -94
  112. package/src/render3/r3_identifiers.d.ts +0 -182
  113. package/src/render3/r3_injector_compiler.d.ts +0 -18
  114. package/src/render3/r3_jit.d.ts +0 -22
  115. package/src/render3/r3_module_compiler.d.ts +0 -103
  116. package/src/render3/r3_pipe_compiler.d.ts +0 -50
  117. package/src/render3/r3_template_transform.d.ts +0 -24
  118. package/src/render3/util.d.ts +0 -94
  119. package/src/render3/view/api.d.ts +0 -328
  120. package/src/render3/view/compiler.d.ts +0 -86
  121. package/src/render3/view/i18n/context.d.ts +0 -68
  122. package/src/render3/view/i18n/get_msg_utils.d.ts +0 -13
  123. package/src/render3/view/i18n/icu_serializer.d.ts +0 -9
  124. package/src/render3/view/i18n/localize_utils.d.ts +0 -24
  125. package/src/render3/view/i18n/meta.d.ts +0 -78
  126. package/src/render3/view/i18n/util.d.ts +0 -78
  127. package/src/render3/view/style_parser.d.ts +0 -18
  128. package/src/render3/view/styling_builder.d.ts +0 -211
  129. package/src/render3/view/t2_api.d.ts +0 -152
  130. package/src/render3/view/t2_binder.d.ts +0 -57
  131. package/src/render3/view/template.d.ts +0 -450
  132. package/src/render3/view/util.d.ts +0 -94
  133. package/src/resource_loader.d.ts +0 -17
  134. package/src/schema/dom_element_schema_registry.d.ts +0 -45
  135. package/src/schema/dom_security_schema.d.ts +0 -11
  136. package/src/schema/element_schema_registry.d.ts +0 -29
  137. package/src/schema/trusted_types_sinks.d.ts +0 -15
  138. package/src/selector.d.ts +0 -105
  139. package/src/shadow_css.d.ts +0 -76
  140. package/src/style_url_resolver.d.ts +0 -8
  141. package/src/template_parser/binding_parser.d.ts +0 -91
  142. package/src/template_parser/template_preparser.d.ts +0 -24
  143. package/src/util.d.ts +0 -42
  144. package/src/version.d.ts +0 -14
  145. package/testing/package.json +0 -9
  146. package/testing/public_api.d.ts +0 -13
  147. package/testing/src/testing.d.ts +0 -23
  148. package/testing/testing.d.ts +0 -4
@@ -1,15 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- export { computeMsgId } from './digest';
9
- export { I18NHtmlParser } from './i18n_html_parser';
10
- export { MessageBundle } from './message_bundle';
11
- export { Serializer } from './serializers/serializer';
12
- export { Xliff } from './serializers/xliff';
13
- export { Xliff2 } from './serializers/xliff2';
14
- export { Xmb } from './serializers/xmb';
15
- export { Xtb } from './serializers/xtb';
@@ -1,28 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { HtmlParser } from '../ml_parser/html_parser';
9
- import { InterpolationConfig } from '../ml_parser/interpolation_config';
10
- import { ParseError } from '../parse_util';
11
- import * as i18n from './i18n_ast';
12
- import { Serializer } from './serializers/serializer';
13
- /**
14
- * A container for message extracted from the templates.
15
- */
16
- export declare class MessageBundle {
17
- private _htmlParser;
18
- private _implicitTags;
19
- private _implicitAttrs;
20
- private _locale;
21
- private _messages;
22
- constructor(_htmlParser: HtmlParser, _implicitTags: string[], _implicitAttrs: {
23
- [k: string]: string[];
24
- }, _locale?: string | null);
25
- updateFromTemplate(html: string, url: string, interpolationConfig: InterpolationConfig): ParseError[];
26
- getMessages(): i18n.Message[];
27
- write(serializer: Serializer, filterSources?: (path: string) => string): string;
28
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { ParseError, ParseSourceSpan } from '../parse_util';
9
- /**
10
- * An i18n error.
11
- */
12
- export declare class I18nError extends ParseError {
13
- constructor(span: ParseSourceSpan, msg: string);
14
- }
@@ -1,25 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- /**
9
- * Creates unique names for placeholder with different content.
10
- *
11
- * Returns the same placeholder name when the content is identical.
12
- */
13
- export declare class PlaceholderRegistry {
14
- private _placeHolderNameCounts;
15
- private _signatureToName;
16
- getStartTagPlaceholderName(tag: string, attrs: {
17
- [k: string]: string;
18
- }, isVoid: boolean): string;
19
- getCloseTagPlaceholderName(tag: string): string;
20
- getPlaceholderName(name: string, content: string): string;
21
- getUniquePlaceholder(name: string): string;
22
- private _hashTag;
23
- private _hashClosingTag;
24
- private _generateUniqueName;
25
- }
@@ -1,46 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import * as i18n from '../i18n_ast';
9
- export declare abstract class Serializer {
10
- abstract write(messages: i18n.Message[], locale: string | null): string;
11
- abstract load(content: string, url: string): {
12
- locale: string | null;
13
- i18nNodesByMsgId: {
14
- [msgId: string]: i18n.Node[];
15
- };
16
- };
17
- abstract digest(message: i18n.Message): string;
18
- createNameMapper(message: i18n.Message): PlaceholderMapper | null;
19
- }
20
- /**
21
- * A `PlaceholderMapper` converts placeholder names from internal to serialized representation and
22
- * back.
23
- *
24
- * It should be used for serialization format that put constraints on the placeholder names.
25
- */
26
- export interface PlaceholderMapper {
27
- toPublicName(internalName: string): string | null;
28
- toInternalName(publicName: string): string | null;
29
- }
30
- /**
31
- * A simple mapper that take a function to transform an internal name to a public name
32
- */
33
- export declare class SimplePlaceholderMapper extends i18n.RecurseVisitor implements PlaceholderMapper {
34
- private mapName;
35
- private internalToPublic;
36
- private publicToNextId;
37
- private publicToInternal;
38
- constructor(message: i18n.Message, mapName: (name: string) => string);
39
- toPublicName(internalName: string): string | null;
40
- toInternalName(publicName: string): string | null;
41
- visitText(text: i18n.Text, context?: any): any;
42
- visitTagPlaceholder(ph: i18n.TagPlaceholder, context?: any): any;
43
- visitPlaceholder(ph: i18n.Placeholder, context?: any): any;
44
- visitIcuPlaceholder(ph: i18n.IcuPlaceholder, context?: any): any;
45
- private visitPlaceholderName;
46
- }
@@ -1,19 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import * as i18n from '../i18n_ast';
9
- import { Serializer } from './serializer';
10
- export declare class Xliff extends Serializer {
11
- write(messages: i18n.Message[], locale: string | null): string;
12
- load(content: string, url: string): {
13
- locale: string;
14
- i18nNodesByMsgId: {
15
- [msgId: string]: i18n.Node[];
16
- };
17
- };
18
- digest(message: i18n.Message): string;
19
- }
@@ -1,19 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import * as i18n from '../i18n_ast';
9
- import { Serializer } from './serializer';
10
- export declare class Xliff2 extends Serializer {
11
- write(messages: i18n.Message[], locale: string | null): string;
12
- load(content: string, url: string): {
13
- locale: string;
14
- i18nNodesByMsgId: {
15
- [msgId: string]: i18n.Node[];
16
- };
17
- };
18
- digest(message: i18n.Message): string;
19
- }
@@ -1,22 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import * as i18n from '../i18n_ast';
9
- import { PlaceholderMapper, Serializer } from './serializer';
10
- export declare class Xmb extends Serializer {
11
- write(messages: i18n.Message[], locale: string | null): string;
12
- load(content: string, url: string): {
13
- locale: string;
14
- i18nNodesByMsgId: {
15
- [msgId: string]: i18n.Node[];
16
- };
17
- };
18
- digest(message: i18n.Message): string;
19
- createNameMapper(message: i18n.Message): PlaceholderMapper;
20
- }
21
- export declare function digest(message: i18n.Message): string;
22
- export declare function toPublicName(internalName: string): string;
@@ -1,52 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- export interface IVisitor {
9
- visitTag(tag: Tag): any;
10
- visitText(text: Text): any;
11
- visitDeclaration(decl: Declaration): any;
12
- visitDoctype(doctype: Doctype): any;
13
- }
14
- export declare function serialize(nodes: Node[]): string;
15
- export interface Node {
16
- visit(visitor: IVisitor): any;
17
- }
18
- export declare class Declaration implements Node {
19
- attrs: {
20
- [k: string]: string;
21
- };
22
- constructor(unescapedAttrs: {
23
- [k: string]: string;
24
- });
25
- visit(visitor: IVisitor): any;
26
- }
27
- export declare class Doctype implements Node {
28
- rootTag: string;
29
- dtd: string;
30
- constructor(rootTag: string, dtd: string);
31
- visit(visitor: IVisitor): any;
32
- }
33
- export declare class Tag implements Node {
34
- name: string;
35
- children: Node[];
36
- attrs: {
37
- [k: string]: string;
38
- };
39
- constructor(name: string, unescapedAttrs?: {
40
- [k: string]: string;
41
- }, children?: Node[]);
42
- visit(visitor: IVisitor): any;
43
- }
44
- export declare class Text implements Node {
45
- value: string;
46
- constructor(unescapedValue: string);
47
- visit(visitor: IVisitor): any;
48
- }
49
- export declare class CR extends Text {
50
- constructor(ws?: number);
51
- }
52
- export declare function escapeXml(text: string): string;
@@ -1,20 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import * as i18n from '../i18n_ast';
9
- import { PlaceholderMapper, Serializer } from './serializer';
10
- export declare class Xtb extends Serializer {
11
- write(messages: i18n.Message[], locale: string | null): string;
12
- load(content: string, url: string): {
13
- locale: string;
14
- i18nNodesByMsgId: {
15
- [msgId: string]: i18n.Node[];
16
- };
17
- };
18
- digest(message: i18n.Message): string;
19
- createNameMapper(message: i18n.Message): PlaceholderMapper;
20
- }
@@ -1,27 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { MissingTranslationStrategy } from '../core';
9
- import * as html from '../ml_parser/ast';
10
- import { Console } from '../util';
11
- import * as i18n from './i18n_ast';
12
- import { PlaceholderMapper, Serializer } from './serializers/serializer';
13
- /**
14
- * A container for translated messages
15
- */
16
- export declare class TranslationBundle {
17
- private _i18nNodesByMsgId;
18
- digest: (m: i18n.Message) => string;
19
- mapperFactory?: ((m: i18n.Message) => PlaceholderMapper) | undefined;
20
- private _i18nToHtml;
21
- constructor(_i18nNodesByMsgId: {
22
- [msgId: string]: i18n.Node[];
23
- }, locale: string | null, digest: (m: i18n.Message) => string, mapperFactory?: ((m: i18n.Message) => PlaceholderMapper) | undefined, missingTranslationStrategy?: MissingTranslationStrategy, console?: Console);
24
- static load(content: string, url: string, serializer: Serializer, missingTranslationStrategy: MissingTranslationStrategy, console?: Console): TranslationBundle;
25
- get(srcMsg: i18n.Message): html.Node[];
26
- has(srcMsg: i18n.Message): boolean;
27
- }
@@ -1,24 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import * as o from './output/output_ast';
9
- import { R3DependencyMetadata } from './render3/r3_factory';
10
- import { MaybeForwardRefExpression, R3CompiledExpression, R3Reference } from './render3/util';
11
- export interface R3InjectableMetadata {
12
- name: string;
13
- type: R3Reference;
14
- internalType: o.Expression;
15
- typeArgumentCount: number;
16
- providedIn: MaybeForwardRefExpression;
17
- useClass?: MaybeForwardRefExpression;
18
- useFactory?: o.Expression;
19
- useExisting?: MaybeForwardRefExpression;
20
- useValue?: MaybeForwardRefExpression;
21
- deps?: R3DependencyMetadata[];
22
- }
23
- export declare function compileInjectable(meta: R3InjectableMetadata, resolveForwardRefs: boolean): R3CompiledExpression;
24
- export declare function createInjectableType(meta: R3InjectableMetadata): o.ExpressionType;
@@ -1,46 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { CompilerFacade, CoreEnvironment, R3ComponentMetadataFacade, R3DeclareComponentFacade, R3DeclareDirectiveFacade, R3DeclareFactoryFacade, R3DeclareInjectableFacade, R3DeclareInjectorFacade, R3DeclareNgModuleFacade, R3DeclarePipeFacade, R3DirectiveMetadataFacade, R3FactoryDefMetadataFacade, R3InjectableMetadataFacade, R3InjectorMetadataFacade, R3NgModuleMetadataFacade, R3PipeMetadataFacade } from './compiler_facade_interface';
9
- import { JitEvaluator } from './output/output_jit';
10
- import { ParseSourceSpan } from './parse_util';
11
- import { ResourceLoader } from './resource_loader';
12
- export declare class CompilerFacadeImpl implements CompilerFacade {
13
- private jitEvaluator;
14
- FactoryTarget: any;
15
- ResourceLoader: typeof ResourceLoader;
16
- private elementSchemaRegistry;
17
- constructor(jitEvaluator?: JitEvaluator);
18
- compilePipe(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, facade: R3PipeMetadataFacade): any;
19
- compilePipeDeclaration(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, declaration: R3DeclarePipeFacade): any;
20
- compileInjectable(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, facade: R3InjectableMetadataFacade): any;
21
- compileInjectableDeclaration(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, facade: R3DeclareInjectableFacade): any;
22
- compileInjector(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, facade: R3InjectorMetadataFacade): any;
23
- compileInjectorDeclaration(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, declaration: R3DeclareInjectorFacade): any;
24
- compileNgModule(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, facade: R3NgModuleMetadataFacade): any;
25
- compileNgModuleDeclaration(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, declaration: R3DeclareNgModuleFacade): any;
26
- compileDirective(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, facade: R3DirectiveMetadataFacade): any;
27
- compileDirectiveDeclaration(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, declaration: R3DeclareDirectiveFacade): any;
28
- private compileDirectiveFromMeta;
29
- compileComponent(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, facade: R3ComponentMetadataFacade): any;
30
- compileComponentDeclaration(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, declaration: R3DeclareComponentFacade): any;
31
- private compileComponentFromMeta;
32
- compileFactory(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3FactoryDefMetadataFacade): any;
33
- compileFactoryDeclaration(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DeclareFactoryFacade): any;
34
- createParseSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan;
35
- /**
36
- * JIT compiles an expression and returns the result of executing that expression.
37
- *
38
- * @param def the definition which will be compiled and executed to get the value to patch
39
- * @param context an object map of @angular/core symbol names to symbols which will be available
40
- * in the context of the compiled expression
41
- * @param sourceUrl a URL to use for the source map of the compiled expression
42
- * @param preStatements a collection of statements that should be evaluated before the expression.
43
- */
44
- private jitExpression;
45
- }
46
- export declare function publishFacade(global: any): void;
@@ -1,89 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { I18nMeta } from '../i18n/i18n_ast';
9
- import { ParseSourceSpan } from '../parse_util';
10
- import { InterpolatedAttributeToken, InterpolatedTextToken } from './tokens';
11
- interface BaseNode {
12
- sourceSpan: ParseSourceSpan;
13
- visit(visitor: Visitor, context: any): any;
14
- }
15
- export declare type Node = Attribute | Comment | Element | Expansion | ExpansionCase | Text;
16
- export declare abstract class NodeWithI18n implements BaseNode {
17
- sourceSpan: ParseSourceSpan;
18
- i18n?: I18nMeta | undefined;
19
- constructor(sourceSpan: ParseSourceSpan, i18n?: I18nMeta | undefined);
20
- abstract visit(visitor: Visitor, context: any): any;
21
- }
22
- export declare class Text extends NodeWithI18n {
23
- value: string;
24
- tokens: InterpolatedTextToken[];
25
- constructor(value: string, sourceSpan: ParseSourceSpan, tokens: InterpolatedTextToken[], i18n?: I18nMeta);
26
- visit(visitor: Visitor, context: any): any;
27
- }
28
- export declare class Expansion extends NodeWithI18n {
29
- switchValue: string;
30
- type: string;
31
- cases: ExpansionCase[];
32
- switchValueSourceSpan: ParseSourceSpan;
33
- constructor(switchValue: string, type: string, cases: ExpansionCase[], sourceSpan: ParseSourceSpan, switchValueSourceSpan: ParseSourceSpan, i18n?: I18nMeta);
34
- visit(visitor: Visitor, context: any): any;
35
- }
36
- export declare class ExpansionCase implements BaseNode {
37
- value: string;
38
- expression: Node[];
39
- sourceSpan: ParseSourceSpan;
40
- valueSourceSpan: ParseSourceSpan;
41
- expSourceSpan: ParseSourceSpan;
42
- constructor(value: string, expression: Node[], sourceSpan: ParseSourceSpan, valueSourceSpan: ParseSourceSpan, expSourceSpan: ParseSourceSpan);
43
- visit(visitor: Visitor, context: any): any;
44
- }
45
- export declare class Attribute extends NodeWithI18n {
46
- name: string;
47
- value: string;
48
- readonly keySpan: ParseSourceSpan | undefined;
49
- valueSpan: ParseSourceSpan | undefined;
50
- valueTokens: InterpolatedAttributeToken[] | undefined;
51
- constructor(name: string, value: string, sourceSpan: ParseSourceSpan, keySpan: ParseSourceSpan | undefined, valueSpan: ParseSourceSpan | undefined, valueTokens: InterpolatedAttributeToken[] | undefined, i18n: I18nMeta | undefined);
52
- visit(visitor: Visitor, context: any): any;
53
- }
54
- export declare class Element extends NodeWithI18n {
55
- name: string;
56
- attrs: Attribute[];
57
- children: Node[];
58
- startSourceSpan: ParseSourceSpan;
59
- endSourceSpan: ParseSourceSpan | null;
60
- constructor(name: string, attrs: Attribute[], children: Node[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan?: ParseSourceSpan | null, i18n?: I18nMeta);
61
- visit(visitor: Visitor, context: any): any;
62
- }
63
- export declare class Comment implements BaseNode {
64
- value: string | null;
65
- sourceSpan: ParseSourceSpan;
66
- constructor(value: string | null, sourceSpan: ParseSourceSpan);
67
- visit(visitor: Visitor, context: any): any;
68
- }
69
- export interface Visitor {
70
- visit?(node: Node, context: any): any;
71
- visitElement(element: Element, context: any): any;
72
- visitAttribute(attribute: Attribute, context: any): any;
73
- visitText(text: Text, context: any): any;
74
- visitComment(comment: Comment, context: any): any;
75
- visitExpansion(expansion: Expansion, context: any): any;
76
- visitExpansionCase(expansionCase: ExpansionCase, context: any): any;
77
- }
78
- export declare function visitAll(visitor: Visitor, nodes: Node[], context?: any): any[];
79
- export declare class RecursiveVisitor implements Visitor {
80
- constructor();
81
- visitElement(ast: Element, context: any): any;
82
- visitAttribute(ast: Attribute, context: any): any;
83
- visitText(ast: Text, context: any): any;
84
- visitComment(ast: Comment, context: any): any;
85
- visitExpansion(ast: Expansion, context: any): any;
86
- visitExpansionCase(ast: ExpansionCase, context: any): any;
87
- private visitChildren;
88
- }
89
- export {};
@@ -1,9 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- export declare const NAMED_ENTITIES: Record<string, string>;
9
- export declare const NGSP_UNICODE = "\uE500";
@@ -1,13 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { TokenizeOptions } from './lexer';
9
- import { Parser, ParseTreeResult } from './parser';
10
- export declare class HtmlParser extends Parser {
11
- constructor();
12
- parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult;
13
- }
@@ -1,33 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { TagContentType, TagDefinition } from './tags';
9
- export declare class HtmlTagDefinition implements TagDefinition {
10
- private closedByChildren;
11
- private contentType;
12
- closedByParent: boolean;
13
- implicitNamespacePrefix: string | null;
14
- isVoid: boolean;
15
- ignoreFirstLf: boolean;
16
- canSelfClose: boolean;
17
- preventNamespaceInheritance: boolean;
18
- constructor({ closedByChildren, implicitNamespacePrefix, contentType, closedByParent, isVoid, ignoreFirstLf, preventNamespaceInheritance }?: {
19
- closedByChildren?: string[];
20
- closedByParent?: boolean;
21
- implicitNamespacePrefix?: string;
22
- contentType?: TagContentType | {
23
- default: TagContentType;
24
- [namespace: string]: TagContentType;
25
- };
26
- isVoid?: boolean;
27
- ignoreFirstLf?: boolean;
28
- preventNamespaceInheritance?: boolean;
29
- });
30
- isClosedByChild(name: string): boolean;
31
- getContentType(prefix?: string): TagContentType;
32
- }
33
- export declare function getHtmlTagDefinition(tagName: string): HtmlTagDefinition;
@@ -1,45 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import * as html from './ast';
9
- import { ParseTreeResult } from './parser';
10
- export declare const PRESERVE_WS_ATTR_NAME = "ngPreserveWhitespaces";
11
- /**
12
- * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:
13
- * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32
14
- * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character
15
- * and later on replaced by a space. We are re-implementing the same idea here.
16
- */
17
- export declare function replaceNgsp(value: string): string;
18
- /**
19
- * This visitor can walk HTML parse tree and remove / trim text nodes using the following rules:
20
- * - consider spaces, tabs and new lines as whitespace characters;
21
- * - drop text nodes consisting of whitespace characters only;
22
- * - for all other text nodes replace consecutive whitespace characters with one space;
23
- * - convert &ngsp; pseudo-entity to a single space;
24
- *
25
- * Removal and trimming of whitespaces have positive performance impact (less code to generate
26
- * while compiling templates, faster view creation). At the same time it can be "destructive"
27
- * in some cases (whitespaces can influence layout). Because of the potential of breaking layout
28
- * this visitor is not activated by default in Angular 5 and people need to explicitly opt-in for
29
- * whitespace removal. The default option for whitespace removal will be revisited in Angular 6
30
- * and might be changed to "on" by default.
31
- */
32
- export declare class WhitespaceVisitor implements html.Visitor {
33
- visitElement(element: html.Element, context: any): any;
34
- visitAttribute(attribute: html.Attribute, context: any): any;
35
- visitText(text: html.Text, context: SiblingVisitorContext | null): any;
36
- visitComment(comment: html.Comment, context: any): any;
37
- visitExpansion(expansion: html.Expansion, context: any): any;
38
- visitExpansionCase(expansionCase: html.ExpansionCase, context: any): any;
39
- }
40
- export declare function removeWhitespaces(htmlAstWithErrors: ParseTreeResult): ParseTreeResult;
41
- interface SiblingVisitorContext {
42
- prev: html.Node | undefined;
43
- next: html.Node | undefined;
44
- }
45
- export {};
@@ -1,42 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { ParseError, ParseSourceSpan } from '../parse_util';
9
- import * as html from './ast';
10
- /**
11
- * Expands special forms into elements.
12
- *
13
- * For example,
14
- *
15
- * ```
16
- * { messages.length, plural,
17
- * =0 {zero}
18
- * =1 {one}
19
- * other {more than one}
20
- * }
21
- * ```
22
- *
23
- * will be expanded into
24
- *
25
- * ```
26
- * <ng-container [ngPlural]="messages.length">
27
- * <ng-template ngPluralCase="=0">zero</ng-template>
28
- * <ng-template ngPluralCase="=1">one</ng-template>
29
- * <ng-template ngPluralCase="other">more than one</ng-template>
30
- * </ng-container>
31
- * ```
32
- */
33
- export declare function expandNodes(nodes: html.Node[]): ExpansionResult;
34
- export declare class ExpansionResult {
35
- nodes: html.Node[];
36
- expanded: boolean;
37
- errors: ParseError[];
38
- constructor(nodes: html.Node[], expanded: boolean, errors: ParseError[]);
39
- }
40
- export declare class ExpansionError extends ParseError {
41
- constructor(span: ParseSourceSpan, errorMsg: string);
42
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- export declare class InterpolationConfig {
9
- start: string;
10
- end: string;
11
- static fromArray(markers: [string, string] | null): InterpolationConfig;
12
- constructor(start: string, end: string);
13
- }
14
- export declare const DEFAULT_INTERPOLATION_CONFIG: InterpolationConfig;