@angular/compiler 14.0.0-next.14 → 14.0.0-next.15
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.
- package/esm2020/src/compiler.mjs +3 -2
- package/esm2020/src/jit_compiler_facade.mjs +9 -13
- package/esm2020/src/render3/partial/class_metadata.mjs +1 -1
- package/esm2020/src/render3/partial/directive.mjs +1 -1
- package/esm2020/src/render3/partial/factory.mjs +1 -1
- package/esm2020/src/render3/partial/injectable.mjs +1 -1
- package/esm2020/src/render3/partial/injector.mjs +1 -1
- package/esm2020/src/render3/partial/ng_module.mjs +1 -1
- package/esm2020/src/render3/partial/pipe.mjs +1 -1
- package/esm2020/src/shadow_css.mjs +291 -12
- package/esm2020/src/util.mjs +8 -8
- package/esm2020/src/version.mjs +1 -1
- package/fesm2015/compiler.mjs +311 -39
- package/fesm2015/compiler.mjs.map +1 -1
- package/fesm2015/testing.mjs +1 -1
- package/fesm2020/compiler.mjs +314 -39
- package/fesm2020/compiler.mjs.map +1 -1
- package/fesm2020/testing.mjs +1 -1
- package/index.d.ts +4964 -5
- package/package.json +3 -3
- package/testing/index.d.ts +22 -5
- package/compiler.d.ts +0 -8
- package/public_api.d.ts +0 -13
- package/src/assertions.d.ts +0 -8
- package/src/chars.d.ts +0 -75
- package/src/compiler.d.ts +0 -77
- package/src/compiler_facade_interface.d.ts +0 -299
- package/src/compiler_util/expression_converter.d.ts +0 -71
- package/src/config.d.ts +0 -25
- package/src/constant_pool.d.ts +0 -37
- package/src/core.d.ts +0 -216
- package/src/expression_parser/ast.d.ts +0 -440
- package/src/expression_parser/lexer.d.ts +0 -47
- package/src/expression_parser/parser.d.ts +0 -315
- package/src/i18n/big_integer.d.ts +0 -108
- package/src/i18n/digest.d.ts +0 -44
- package/src/i18n/extractor_merger.d.ts +0 -27
- package/src/i18n/i18n_ast.d.ts +0 -148
- package/src/i18n/i18n_html_parser.d.ts +0 -19
- package/src/i18n/i18n_parser.d.ts +0 -18
- package/src/i18n/index.d.ts +0 -15
- package/src/i18n/message_bundle.d.ts +0 -28
- package/src/i18n/parse_util.d.ts +0 -14
- package/src/i18n/serializers/placeholder.d.ts +0 -25
- package/src/i18n/serializers/serializer.d.ts +0 -46
- package/src/i18n/serializers/xliff.d.ts +0 -19
- package/src/i18n/serializers/xliff2.d.ts +0 -19
- package/src/i18n/serializers/xmb.d.ts +0 -22
- package/src/i18n/serializers/xml_helper.d.ts +0 -52
- package/src/i18n/serializers/xtb.d.ts +0 -20
- package/src/i18n/translation_bundle.d.ts +0 -27
- package/src/injectable_compiler_2.d.ts +0 -24
- package/src/jit_compiler_facade.d.ts +0 -46
- package/src/ml_parser/ast.d.ts +0 -89
- package/src/ml_parser/entities.d.ts +0 -9
- package/src/ml_parser/html_parser.d.ts +0 -13
- package/src/ml_parser/html_tags.d.ts +0 -33
- package/src/ml_parser/html_whitespaces.d.ts +0 -45
- package/src/ml_parser/icu_ast_expander.d.ts +0 -42
- package/src/ml_parser/interpolation_config.d.ts +0 -14
- package/src/ml_parser/lexer.d.ts +0 -114
- package/src/ml_parser/parser.d.ts +0 -26
- package/src/ml_parser/tags.d.ts +0 -29
- package/src/ml_parser/tokens.d.ts +0 -141
- package/src/ml_parser/xml_parser.d.ts +0 -13
- package/src/ml_parser/xml_tags.d.ts +0 -24
- package/src/output/abstract_emitter.d.ts +0 -66
- package/src/output/abstract_js_emitter.d.ts +0 -19
- package/src/output/map_util.d.ts +0 -18
- package/src/output/output_ast.d.ts +0 -575
- package/src/output/output_jit.d.ts +0 -73
- package/src/output/output_jit_trusted_types.d.ts +0 -43
- package/src/output/source_map.d.ts +0 -29
- package/src/parse_util.d.ts +0 -75
- package/src/render3/partial/api.d.ts +0 -463
- package/src/render3/partial/class_metadata.d.ts +0 -10
- package/src/render3/partial/component.d.ts +0 -39
- package/src/render3/partial/directive.d.ts +0 -13
- package/src/render3/partial/factory.d.ts +0 -3
- package/src/render3/partial/injectable.d.ts +0 -19
- package/src/render3/partial/injector.d.ts +0 -3
- package/src/render3/partial/ng_module.d.ts +0 -3
- package/src/render3/partial/pipe.d.ts +0 -12
- package/src/render3/partial/util.d.ts +0 -33
- package/src/render3/r3_ast.d.ts +0 -211
- package/src/render3/r3_class_metadata_compiler.d.ts +0 -35
- package/src/render3/r3_factory.d.ts +0 -94
- package/src/render3/r3_identifiers.d.ts +0 -183
- package/src/render3/r3_injector_compiler.d.ts +0 -18
- package/src/render3/r3_jit.d.ts +0 -22
- package/src/render3/r3_module_compiler.d.ts +0 -103
- package/src/render3/r3_pipe_compiler.d.ts +0 -50
- package/src/render3/r3_template_transform.d.ts +0 -24
- package/src/render3/util.d.ts +0 -94
- package/src/render3/view/api.d.ts +0 -342
- package/src/render3/view/compiler.d.ts +0 -86
- package/src/render3/view/i18n/context.d.ts +0 -68
- package/src/render3/view/i18n/get_msg_utils.d.ts +0 -47
- package/src/render3/view/i18n/icu_serializer.d.ts +0 -9
- package/src/render3/view/i18n/localize_utils.d.ts +0 -24
- package/src/render3/view/i18n/meta.d.ts +0 -78
- package/src/render3/view/i18n/util.d.ts +0 -78
- package/src/render3/view/style_parser.d.ts +0 -18
- package/src/render3/view/styling_builder.d.ts +0 -211
- package/src/render3/view/t2_api.d.ts +0 -152
- package/src/render3/view/t2_binder.d.ts +0 -57
- package/src/render3/view/template.d.ts +0 -450
- package/src/render3/view/util.d.ts +0 -94
- package/src/resource_loader.d.ts +0 -17
- package/src/schema/dom_element_schema_registry.d.ts +0 -45
- package/src/schema/dom_security_schema.d.ts +0 -11
- package/src/schema/element_schema_registry.d.ts +0 -29
- package/src/schema/trusted_types_sinks.d.ts +0 -15
- package/src/selector.d.ts +0 -105
- package/src/shadow_css.d.ts +0 -76
- package/src/style_url_resolver.d.ts +0 -8
- package/src/template_parser/binding_parser.d.ts +0 -91
- package/src/template_parser/template_preparser.d.ts +0 -24
- package/src/util.d.ts +0 -42
- package/src/version.d.ts +0 -14
- package/testing/package.json +0 -9
- package/testing/public_api.d.ts +0 -13
- package/testing/src/testing.d.ts +0 -23
- package/testing/testing.d.ts +0 -4
|
@@ -1,94 +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 { ConstantPool } from '../../constant_pool';
|
|
9
|
-
import { Interpolation } from '../../expression_parser/ast';
|
|
10
|
-
import * as o from '../../output/output_ast';
|
|
11
|
-
import { ParseSourceSpan } from '../../parse_util';
|
|
12
|
-
import * as t from '../r3_ast';
|
|
13
|
-
import { R3QueryMetadata } from './api';
|
|
14
|
-
/** Name of the temporary to use during data binding */
|
|
15
|
-
export declare const TEMPORARY_NAME = "_t";
|
|
16
|
-
/** Name of the context parameter passed into a template function */
|
|
17
|
-
export declare const CONTEXT_NAME = "ctx";
|
|
18
|
-
/** Name of the RenderFlag passed into a template function */
|
|
19
|
-
export declare const RENDER_FLAGS = "rf";
|
|
20
|
-
/** The prefix reference variables */
|
|
21
|
-
export declare const REFERENCE_PREFIX = "_r";
|
|
22
|
-
/** The name of the implicit context reference */
|
|
23
|
-
export declare const IMPLICIT_REFERENCE = "$implicit";
|
|
24
|
-
/** Non bindable attribute name **/
|
|
25
|
-
export declare const NON_BINDABLE_ATTR = "ngNonBindable";
|
|
26
|
-
/** Name for the variable keeping track of the context returned by `ɵɵrestoreView`. */
|
|
27
|
-
export declare const RESTORED_VIEW_CONTEXT_NAME = "restoredCtx";
|
|
28
|
-
/**
|
|
29
|
-
* Possible types that can be used to generate the parameters of an instruction call.
|
|
30
|
-
* If the parameters are a function, the function will be invoked at the time the instruction
|
|
31
|
-
* is generated.
|
|
32
|
-
*/
|
|
33
|
-
export declare type InstructionParams = (o.Expression | o.Expression[]) | (() => (o.Expression | o.Expression[]));
|
|
34
|
-
/** Necessary information to generate a call to an instruction function. */
|
|
35
|
-
export interface Instruction {
|
|
36
|
-
span: ParseSourceSpan | null;
|
|
37
|
-
reference: o.ExternalReference;
|
|
38
|
-
paramsOrFn?: InstructionParams;
|
|
39
|
-
}
|
|
40
|
-
/** Generates a call to a single instruction. */
|
|
41
|
-
export declare function invokeInstruction(span: ParseSourceSpan | null, reference: o.ExternalReference, params: o.Expression[]): o.Expression;
|
|
42
|
-
/**
|
|
43
|
-
* Creates an allocator for a temporary variable.
|
|
44
|
-
*
|
|
45
|
-
* A variable declaration is added to the statements the first time the allocator is invoked.
|
|
46
|
-
*/
|
|
47
|
-
export declare function temporaryAllocator(statements: o.Statement[], name: string): () => o.ReadVarExpr;
|
|
48
|
-
export declare function invalid<T>(this: t.Visitor, arg: o.Expression | o.Statement | t.Node): never;
|
|
49
|
-
export declare function asLiteral(value: any): o.Expression;
|
|
50
|
-
export declare function conditionallyCreateMapObjectLiteral(keys: {
|
|
51
|
-
[key: string]: string | string[];
|
|
52
|
-
}, keepDeclared?: boolean): o.Expression | null;
|
|
53
|
-
/**
|
|
54
|
-
* Remove trailing null nodes as they are implied.
|
|
55
|
-
*/
|
|
56
|
-
export declare function trimTrailingNulls(parameters: o.Expression[]): o.Expression[];
|
|
57
|
-
export declare function getQueryPredicate(query: R3QueryMetadata, constantPool: ConstantPool): o.Expression;
|
|
58
|
-
/**
|
|
59
|
-
* A representation for an object literal used during codegen of definition objects. The generic
|
|
60
|
-
* type `T` allows to reference a documented type of the generated structure, such that the
|
|
61
|
-
* property names that are set can be resolved to their documented declaration.
|
|
62
|
-
*/
|
|
63
|
-
export declare class DefinitionMap<T = any> {
|
|
64
|
-
values: {
|
|
65
|
-
key: string;
|
|
66
|
-
quoted: boolean;
|
|
67
|
-
value: o.Expression;
|
|
68
|
-
}[];
|
|
69
|
-
set(key: keyof T, value: o.Expression | null): void;
|
|
70
|
-
toLiteralMap(): o.LiteralMapExpr;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Extract a map of properties to values for a given element or template node, which can be used
|
|
74
|
-
* by the directive matching machinery.
|
|
75
|
-
*
|
|
76
|
-
* @param elOrTpl the element or template in question
|
|
77
|
-
* @return an object set up for directive matching. For attributes on the element/template, this
|
|
78
|
-
* object maps a property name to its (static) value. For any bindings, this map simply maps the
|
|
79
|
-
* property name to an empty string.
|
|
80
|
-
*/
|
|
81
|
-
export declare function getAttrsForDirectiveMatching(elOrTpl: t.Element | t.Template): {
|
|
82
|
-
[name: string]: string;
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* Gets the number of arguments expected to be passed to a generated instruction in the case of
|
|
86
|
-
* interpolation instructions.
|
|
87
|
-
* @param interpolation An interpolation ast
|
|
88
|
-
*/
|
|
89
|
-
export declare function getInterpolationArgsLength(interpolation: Interpolation): number;
|
|
90
|
-
/**
|
|
91
|
-
* Generates the final instruction call statements based on the passed in configuration.
|
|
92
|
-
* Will try to chain instructions as much as possible, if chaining is supported.
|
|
93
|
-
*/
|
|
94
|
-
export declare function getInstructionStatements(instructions: Instruction[]): o.Statement[];
|
package/src/resource_loader.d.ts
DELETED
|
@@ -1,17 +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
|
-
* An interface for retrieving documents by URL that the compiler uses to
|
|
10
|
-
* load templates.
|
|
11
|
-
*
|
|
12
|
-
* This is an abstract class, rather than an interface, so that it can be used
|
|
13
|
-
* as injection token.
|
|
14
|
-
*/
|
|
15
|
-
export declare abstract class ResourceLoader {
|
|
16
|
-
abstract get(url: string): Promise<string> | string;
|
|
17
|
-
}
|
|
@@ -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 { SchemaMetadata, SecurityContext } from '../core';
|
|
9
|
-
import { ElementSchemaRegistry } from './element_schema_registry';
|
|
10
|
-
export declare class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
11
|
-
private _schema;
|
|
12
|
-
private _eventSchema;
|
|
13
|
-
constructor();
|
|
14
|
-
hasProperty(tagName: string, propName: string, schemaMetas: SchemaMetadata[]): boolean;
|
|
15
|
-
hasElement(tagName: string, schemaMetas: SchemaMetadata[]): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* securityContext returns the security context for the given property on the given DOM tag.
|
|
18
|
-
*
|
|
19
|
-
* Tag and property name are statically known and cannot change at runtime, i.e. it is not
|
|
20
|
-
* possible to bind a value into a changing attribute or tag name.
|
|
21
|
-
*
|
|
22
|
-
* The filtering is based on a list of allowed tags|attributes. All attributes in the schema
|
|
23
|
-
* above are assumed to have the 'NONE' security context, i.e. that they are safe inert
|
|
24
|
-
* string values. Only specific well known attack vectors are assigned their appropriate context.
|
|
25
|
-
*/
|
|
26
|
-
securityContext(tagName: string, propName: string, isAttribute: boolean): SecurityContext;
|
|
27
|
-
getMappedPropName(propName: string): string;
|
|
28
|
-
getDefaultComponentElementName(): string;
|
|
29
|
-
validateProperty(name: string): {
|
|
30
|
-
error: boolean;
|
|
31
|
-
msg?: string;
|
|
32
|
-
};
|
|
33
|
-
validateAttribute(name: string): {
|
|
34
|
-
error: boolean;
|
|
35
|
-
msg?: string;
|
|
36
|
-
};
|
|
37
|
-
allKnownElementNames(): string[];
|
|
38
|
-
allKnownAttributesOfElement(tagName: string): string[];
|
|
39
|
-
allKnownEventsOfElement(tagName: string): string[];
|
|
40
|
-
normalizeAnimationStyleProperty(propName: string): string;
|
|
41
|
-
normalizeAnimationStyleValue(camelCaseProp: string, userProvidedProp: string, val: string | number): {
|
|
42
|
-
error: string;
|
|
43
|
-
value: string;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
@@ -1,11 +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 { SecurityContext } from '../core';
|
|
9
|
-
export declare function SECURITY_SCHEMA(): {
|
|
10
|
-
[k: string]: SecurityContext;
|
|
11
|
-
};
|
|
@@ -1,29 +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 { SchemaMetadata, SecurityContext } from '../core';
|
|
9
|
-
export declare abstract class ElementSchemaRegistry {
|
|
10
|
-
abstract hasProperty(tagName: string, propName: string, schemaMetas: SchemaMetadata[]): boolean;
|
|
11
|
-
abstract hasElement(tagName: string, schemaMetas: SchemaMetadata[]): boolean;
|
|
12
|
-
abstract securityContext(elementName: string, propName: string, isAttribute: boolean): SecurityContext;
|
|
13
|
-
abstract allKnownElementNames(): string[];
|
|
14
|
-
abstract getMappedPropName(propName: string): string;
|
|
15
|
-
abstract getDefaultComponentElementName(): string;
|
|
16
|
-
abstract validateProperty(name: string): {
|
|
17
|
-
error: boolean;
|
|
18
|
-
msg?: string;
|
|
19
|
-
};
|
|
20
|
-
abstract validateAttribute(name: string): {
|
|
21
|
-
error: boolean;
|
|
22
|
-
msg?: string;
|
|
23
|
-
};
|
|
24
|
-
abstract normalizeAnimationStyleProperty(propName: string): string;
|
|
25
|
-
abstract normalizeAnimationStyleValue(camelCaseProp: string, userProvidedProp: string, val: string | number): {
|
|
26
|
-
error: string;
|
|
27
|
-
value: string;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
@@ -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
|
-
/**
|
|
9
|
-
* isTrustedTypesSink returns true if the given property on the given DOM tag is a Trusted Types
|
|
10
|
-
* sink. In that case, use `ElementSchemaRegistry.securityContext` to determine which particular
|
|
11
|
-
* Trusted Type is required for values passed to the sink:
|
|
12
|
-
* - SecurityContext.HTML corresponds to TrustedHTML
|
|
13
|
-
* - SecurityContext.RESOURCE_URL corresponds to TrustedScriptURL
|
|
14
|
-
*/
|
|
15
|
-
export declare function isTrustedTypesSink(tagName: string, propName: string): boolean;
|
package/src/selector.d.ts
DELETED
|
@@ -1,105 +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
|
-
* A css selector contains an element name,
|
|
10
|
-
* css classes and attribute/value pairs with the purpose
|
|
11
|
-
* of selecting subsets out of them.
|
|
12
|
-
*/
|
|
13
|
-
export declare class CssSelector {
|
|
14
|
-
element: string | null;
|
|
15
|
-
classNames: string[];
|
|
16
|
-
/**
|
|
17
|
-
* The selectors are encoded in pairs where:
|
|
18
|
-
* - even locations are attribute names
|
|
19
|
-
* - odd locations are attribute values.
|
|
20
|
-
*
|
|
21
|
-
* Example:
|
|
22
|
-
* Selector: `[key1=value1][key2]` would parse to:
|
|
23
|
-
* ```
|
|
24
|
-
* ['key1', 'value1', 'key2', '']
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
attrs: string[];
|
|
28
|
-
notSelectors: CssSelector[];
|
|
29
|
-
static parse(selector: string): CssSelector[];
|
|
30
|
-
/**
|
|
31
|
-
* Unescape `\$` sequences from the CSS attribute selector.
|
|
32
|
-
*
|
|
33
|
-
* This is needed because `$` can have a special meaning in CSS selectors,
|
|
34
|
-
* but we might want to match an attribute that contains `$`.
|
|
35
|
-
* [MDN web link for more
|
|
36
|
-
* info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).
|
|
37
|
-
* @param attr the attribute to unescape.
|
|
38
|
-
* @returns the unescaped string.
|
|
39
|
-
*/
|
|
40
|
-
unescapeAttribute(attr: string): string;
|
|
41
|
-
/**
|
|
42
|
-
* Escape `$` sequences from the CSS attribute selector.
|
|
43
|
-
*
|
|
44
|
-
* This is needed because `$` can have a special meaning in CSS selectors,
|
|
45
|
-
* with this method we are escaping `$` with `\$'.
|
|
46
|
-
* [MDN web link for more
|
|
47
|
-
* info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors).
|
|
48
|
-
* @param attr the attribute to escape.
|
|
49
|
-
* @returns the escaped string.
|
|
50
|
-
*/
|
|
51
|
-
escapeAttribute(attr: string): string;
|
|
52
|
-
isElementSelector(): boolean;
|
|
53
|
-
hasElementSelector(): boolean;
|
|
54
|
-
setElement(element?: string | null): void;
|
|
55
|
-
/** Gets a template string for an element that matches the selector. */
|
|
56
|
-
getMatchingElementTemplate(): string;
|
|
57
|
-
getAttrs(): string[];
|
|
58
|
-
addAttribute(name: string, value?: string): void;
|
|
59
|
-
addClassName(name: string): void;
|
|
60
|
-
toString(): string;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Reads a list of CssSelectors and allows to calculate which ones
|
|
64
|
-
* are contained in a given CssSelector.
|
|
65
|
-
*/
|
|
66
|
-
export declare class SelectorMatcher<T = any> {
|
|
67
|
-
static createNotMatcher(notSelectors: CssSelector[]): SelectorMatcher<null>;
|
|
68
|
-
private _elementMap;
|
|
69
|
-
private _elementPartialMap;
|
|
70
|
-
private _classMap;
|
|
71
|
-
private _classPartialMap;
|
|
72
|
-
private _attrValueMap;
|
|
73
|
-
private _attrValuePartialMap;
|
|
74
|
-
private _listContexts;
|
|
75
|
-
addSelectables(cssSelectors: CssSelector[], callbackCtxt?: T): void;
|
|
76
|
-
/**
|
|
77
|
-
* Add an object that can be found later on by calling `match`.
|
|
78
|
-
* @param cssSelector A css selector
|
|
79
|
-
* @param callbackCtxt An opaque object that will be given to the callback of the `match` function
|
|
80
|
-
*/
|
|
81
|
-
private _addSelectable;
|
|
82
|
-
private _addTerminal;
|
|
83
|
-
private _addPartial;
|
|
84
|
-
/**
|
|
85
|
-
* Find the objects that have been added via `addSelectable`
|
|
86
|
-
* whose css selector is contained in the given css selector.
|
|
87
|
-
* @param cssSelector A css selector
|
|
88
|
-
* @param matchedCallback This callback will be called with the object handed into `addSelectable`
|
|
89
|
-
* @return boolean true if a match was found
|
|
90
|
-
*/
|
|
91
|
-
match(cssSelector: CssSelector, matchedCallback: ((c: CssSelector, a: T) => void) | null): boolean;
|
|
92
|
-
}
|
|
93
|
-
export declare class SelectorListContext {
|
|
94
|
-
selectors: CssSelector[];
|
|
95
|
-
alreadyMatched: boolean;
|
|
96
|
-
constructor(selectors: CssSelector[]);
|
|
97
|
-
}
|
|
98
|
-
export declare class SelectorContext<T = any> {
|
|
99
|
-
selector: CssSelector;
|
|
100
|
-
cbContext: T;
|
|
101
|
-
listContext: SelectorListContext;
|
|
102
|
-
notSelectors: CssSelector[];
|
|
103
|
-
constructor(selector: CssSelector, cbContext: T, listContext: SelectorListContext);
|
|
104
|
-
finalize(cssSelector: CssSelector, callback: ((c: CssSelector, a: T) => void) | null): boolean;
|
|
105
|
-
}
|
package/src/shadow_css.d.ts
DELETED
|
@@ -1,76 +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
|
-
* This file is a port of shadowCSS from webcomponents.js to TypeScript.
|
|
10
|
-
*
|
|
11
|
-
* Please make sure to keep to edits in sync with the source file.
|
|
12
|
-
*
|
|
13
|
-
* Source:
|
|
14
|
-
* https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
|
|
15
|
-
*
|
|
16
|
-
* The original file level comment is reproduced below
|
|
17
|
-
*/
|
|
18
|
-
export declare class ShadowCss {
|
|
19
|
-
strictStyling: boolean;
|
|
20
|
-
shimCssText(cssText: string, selector: string, hostSelector?: string): string;
|
|
21
|
-
private _insertDirectives;
|
|
22
|
-
private _insertPolyfillDirectivesInCssText;
|
|
23
|
-
private _insertPolyfillRulesInCssText;
|
|
24
|
-
private _scopeCssText;
|
|
25
|
-
private _extractUnscopedRulesFromCssText;
|
|
26
|
-
private _convertColonHost;
|
|
27
|
-
private _convertColonHostContext;
|
|
28
|
-
private _convertShadowDOMSelectors;
|
|
29
|
-
private _scopeSelectors;
|
|
30
|
-
/**
|
|
31
|
-
* Handle a css text that is within a rule that should not contain scope selectors by simply
|
|
32
|
-
* removing them! An example of such a rule is `@font-face`.
|
|
33
|
-
*
|
|
34
|
-
* `@font-face` rules cannot contain nested selectors. Nor can they be nested under a selector.
|
|
35
|
-
* Normally this would be a syntax error by the author of the styles. But in some rare cases, such
|
|
36
|
-
* as importing styles from a library, and applying `:host ::ng-deep` to the imported styles, we
|
|
37
|
-
* can end up with broken css if the imported styles happen to contain @font-face rules.
|
|
38
|
-
*
|
|
39
|
-
* For example:
|
|
40
|
-
*
|
|
41
|
-
* ```
|
|
42
|
-
* :host ::ng-deep {
|
|
43
|
-
* import 'some/lib/containing/font-face';
|
|
44
|
-
* }
|
|
45
|
-
*
|
|
46
|
-
* Similar logic applies to `@page` rules which can contain a particular set of properties,
|
|
47
|
-
* as well as some specific at-rules. Since they can't be encapsulated, we have to strip
|
|
48
|
-
* any scoping selectors from them. For more information: https://www.w3.org/TR/css-page-3
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
private _stripScopingSelectors;
|
|
52
|
-
private _scopeSelector;
|
|
53
|
-
private _selectorNeedsScoping;
|
|
54
|
-
private _makeScopeMatcher;
|
|
55
|
-
private _applySelectorScope;
|
|
56
|
-
private _applySimpleSelectorScope;
|
|
57
|
-
private _insertPolyfillHostInCssText;
|
|
58
|
-
}
|
|
59
|
-
export declare class CssRule {
|
|
60
|
-
selector: string;
|
|
61
|
-
content: string;
|
|
62
|
-
constructor(selector: string, content: string);
|
|
63
|
-
}
|
|
64
|
-
export declare function processRules(input: string, ruleCallback: (rule: CssRule) => CssRule): string;
|
|
65
|
-
/**
|
|
66
|
-
* Mutate the given `groups` array so that there are `multiples` clones of the original array
|
|
67
|
-
* stored.
|
|
68
|
-
*
|
|
69
|
-
* For example `repeatGroups([a, b], 3)` will result in `[a, b, a, b, a, b]` - but importantly the
|
|
70
|
-
* newly added groups will be clones of the original.
|
|
71
|
-
*
|
|
72
|
-
* @param groups An array of groups of strings that will be repeated. This array is mutated
|
|
73
|
-
* in-place.
|
|
74
|
-
* @param multiples The number of times the current groups should appear.
|
|
75
|
-
*/
|
|
76
|
-
export declare function repeatGroups(groups: string[][], multiples: number): void;
|
|
@@ -1,8 +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 function isStyleUrlResolvable(url: string | null): url is string;
|
|
@@ -1,91 +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 { SecurityContext } from '../core';
|
|
9
|
-
import { ASTWithSource, BindingPipe, BoundElementProperty, ParsedEvent, ParsedProperty, ParsedVariable, RecursiveAstVisitor } from '../expression_parser/ast';
|
|
10
|
-
import { Parser } from '../expression_parser/parser';
|
|
11
|
-
import { InterpolationConfig } from '../ml_parser/interpolation_config';
|
|
12
|
-
import { InterpolatedAttributeToken, InterpolatedTextToken } from '../ml_parser/tokens';
|
|
13
|
-
import { ParseError, ParseSourceSpan } from '../parse_util';
|
|
14
|
-
import { ElementSchemaRegistry } from '../schema/element_schema_registry';
|
|
15
|
-
export interface HostProperties {
|
|
16
|
-
[key: string]: string;
|
|
17
|
-
}
|
|
18
|
-
export interface HostListeners {
|
|
19
|
-
[key: string]: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Parses bindings in templates and in the directive host area.
|
|
23
|
-
*/
|
|
24
|
-
export declare class BindingParser {
|
|
25
|
-
private _exprParser;
|
|
26
|
-
private _interpolationConfig;
|
|
27
|
-
private _schemaRegistry;
|
|
28
|
-
errors: ParseError[];
|
|
29
|
-
constructor(_exprParser: Parser, _interpolationConfig: InterpolationConfig, _schemaRegistry: ElementSchemaRegistry, errors: ParseError[]);
|
|
30
|
-
get interpolationConfig(): InterpolationConfig;
|
|
31
|
-
createBoundHostProperties(properties: HostProperties, sourceSpan: ParseSourceSpan): ParsedProperty[] | null;
|
|
32
|
-
createDirectiveHostEventAsts(hostListeners: HostListeners, sourceSpan: ParseSourceSpan): ParsedEvent[] | null;
|
|
33
|
-
parseInterpolation(value: string, sourceSpan: ParseSourceSpan, interpolatedTokens: InterpolatedAttributeToken[] | InterpolatedTextToken[] | null): ASTWithSource;
|
|
34
|
-
/**
|
|
35
|
-
* Similar to `parseInterpolation`, but treats the provided string as a single expression
|
|
36
|
-
* element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`).
|
|
37
|
-
* This is used for parsing the switch expression in ICUs.
|
|
38
|
-
*/
|
|
39
|
-
parseInterpolationExpression(expression: string, sourceSpan: ParseSourceSpan): ASTWithSource;
|
|
40
|
-
/**
|
|
41
|
-
* Parses the bindings in a microsyntax expression, and converts them to
|
|
42
|
-
* `ParsedProperty` or `ParsedVariable`.
|
|
43
|
-
*
|
|
44
|
-
* @param tplKey template binding name
|
|
45
|
-
* @param tplValue template binding value
|
|
46
|
-
* @param sourceSpan span of template binding relative to entire the template
|
|
47
|
-
* @param absoluteValueOffset start of the tplValue relative to the entire template
|
|
48
|
-
* @param targetMatchableAttrs potential attributes to match in the template
|
|
49
|
-
* @param targetProps target property bindings in the template
|
|
50
|
-
* @param targetVars target variables in the template
|
|
51
|
-
*/
|
|
52
|
-
parseInlineTemplateBinding(tplKey: string, tplValue: string, sourceSpan: ParseSourceSpan, absoluteValueOffset: number, targetMatchableAttrs: string[][], targetProps: ParsedProperty[], targetVars: ParsedVariable[], isIvyAst: boolean): void;
|
|
53
|
-
/**
|
|
54
|
-
* Parses the bindings in a microsyntax expression, e.g.
|
|
55
|
-
* ```
|
|
56
|
-
* <tag *tplKey="let value1 = prop; let value2 = localVar">
|
|
57
|
-
* ```
|
|
58
|
-
*
|
|
59
|
-
* @param tplKey template binding name
|
|
60
|
-
* @param tplValue template binding value
|
|
61
|
-
* @param sourceSpan span of template binding relative to entire the template
|
|
62
|
-
* @param absoluteKeyOffset start of the `tplKey`
|
|
63
|
-
* @param absoluteValueOffset start of the `tplValue`
|
|
64
|
-
*/
|
|
65
|
-
private _parseTemplateBindings;
|
|
66
|
-
parseLiteralAttr(name: string, value: string | null, sourceSpan: ParseSourceSpan, absoluteOffset: number, valueSpan: ParseSourceSpan | undefined, targetMatchableAttrs: string[][], targetProps: ParsedProperty[], keySpan: ParseSourceSpan): void;
|
|
67
|
-
parsePropertyBinding(name: string, expression: string, isHost: boolean, sourceSpan: ParseSourceSpan, absoluteOffset: number, valueSpan: ParseSourceSpan | undefined, targetMatchableAttrs: string[][], targetProps: ParsedProperty[], keySpan: ParseSourceSpan): void;
|
|
68
|
-
parsePropertyInterpolation(name: string, value: string, sourceSpan: ParseSourceSpan, valueSpan: ParseSourceSpan | undefined, targetMatchableAttrs: string[][], targetProps: ParsedProperty[], keySpan: ParseSourceSpan, interpolatedTokens: InterpolatedAttributeToken[] | InterpolatedTextToken[] | null): boolean;
|
|
69
|
-
private _parsePropertyAst;
|
|
70
|
-
private _parseAnimation;
|
|
71
|
-
private _parseBinding;
|
|
72
|
-
createBoundElementProperty(elementSelector: string, boundProp: ParsedProperty, skipValidation?: boolean, mapPropertyName?: boolean): BoundElementProperty;
|
|
73
|
-
parseEvent(name: string, expression: string, isAssignmentEvent: boolean, sourceSpan: ParseSourceSpan, handlerSpan: ParseSourceSpan, targetMatchableAttrs: string[][], targetEvents: ParsedEvent[], keySpan: ParseSourceSpan): void;
|
|
74
|
-
calcPossibleSecurityContexts(selector: string, propName: string, isAttribute: boolean): SecurityContext[];
|
|
75
|
-
private _parseAnimationEvent;
|
|
76
|
-
private _parseRegularEvent;
|
|
77
|
-
private _parseAction;
|
|
78
|
-
private _reportError;
|
|
79
|
-
private _reportExpressionParserErrors;
|
|
80
|
-
/**
|
|
81
|
-
* @param propName the name of the property / attribute
|
|
82
|
-
* @param sourceSpan
|
|
83
|
-
* @param isAttr true when binding to an attribute
|
|
84
|
-
*/
|
|
85
|
-
private _validatePropertyOrAttributeName;
|
|
86
|
-
}
|
|
87
|
-
export declare class PipeCollector extends RecursiveAstVisitor {
|
|
88
|
-
pipes: Map<string, BindingPipe>;
|
|
89
|
-
visitPipe(ast: BindingPipe, context: any): any;
|
|
90
|
-
}
|
|
91
|
-
export declare function calcPossibleSecurityContexts(registry: ElementSchemaRegistry, selector: string, propName: string, isAttribute: boolean): SecurityContext[];
|
|
@@ -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 html from '../ml_parser/ast';
|
|
9
|
-
export declare function preparseElement(ast: html.Element): PreparsedElement;
|
|
10
|
-
export declare enum PreparsedElementType {
|
|
11
|
-
NG_CONTENT = 0,
|
|
12
|
-
STYLE = 1,
|
|
13
|
-
STYLESHEET = 2,
|
|
14
|
-
SCRIPT = 3,
|
|
15
|
-
OTHER = 4
|
|
16
|
-
}
|
|
17
|
-
export declare class PreparsedElement {
|
|
18
|
-
type: PreparsedElementType;
|
|
19
|
-
selectAttr: string;
|
|
20
|
-
hrefAttr: string | null;
|
|
21
|
-
nonBindable: boolean;
|
|
22
|
-
projectAs: string;
|
|
23
|
-
constructor(type: PreparsedElementType, selectAttr: string, hrefAttr: string | null, nonBindable: boolean, projectAs: string);
|
|
24
|
-
}
|
package/src/util.d.ts
DELETED
|
@@ -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
|
-
export declare function dashCaseToCamelCase(input: string): string;
|
|
9
|
-
export declare function splitAtColon(input: string, defaultValues: string[]): string[];
|
|
10
|
-
export declare function splitAtPeriod(input: string, defaultValues: string[]): string[];
|
|
11
|
-
export declare function noUndefined<T>(val: T | undefined): T;
|
|
12
|
-
export declare function error(msg: string): never;
|
|
13
|
-
export declare function escapeRegExp(s: string): string;
|
|
14
|
-
export declare type Byte = number;
|
|
15
|
-
export declare function utf8Encode(str: string): Byte[];
|
|
16
|
-
export declare function stringify(token: any): string;
|
|
17
|
-
export declare class Version {
|
|
18
|
-
full: string;
|
|
19
|
-
readonly major: string;
|
|
20
|
-
readonly minor: string;
|
|
21
|
-
readonly patch: string;
|
|
22
|
-
constructor(full: string);
|
|
23
|
-
}
|
|
24
|
-
export interface Console {
|
|
25
|
-
log(message: string): void;
|
|
26
|
-
warn(message: string): void;
|
|
27
|
-
}
|
|
28
|
-
declare const _global: {
|
|
29
|
-
[name: string]: any;
|
|
30
|
-
};
|
|
31
|
-
export { _global as global };
|
|
32
|
-
export declare function newArray<T = any>(size: number): T[];
|
|
33
|
-
export declare function newArray<T>(size: number, value: T): T[];
|
|
34
|
-
/**
|
|
35
|
-
* Partitions a given array into 2 arrays, based on a boolean value returned by the condition
|
|
36
|
-
* function.
|
|
37
|
-
*
|
|
38
|
-
* @param arr Input array that should be partitioned
|
|
39
|
-
* @param conditionFn Condition function that is called for each item in a given array and returns a
|
|
40
|
-
* boolean value.
|
|
41
|
-
*/
|
|
42
|
-
export declare function partitionArray<T, F = T>(arr: (T | F)[], conditionFn: (value: T | F) => boolean): [T[], F[]];
|
package/src/version.d.ts
DELETED
|
@@ -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
|
-
/**
|
|
9
|
-
* @module
|
|
10
|
-
* @description
|
|
11
|
-
* Entry point for all public APIs of the compiler package.
|
|
12
|
-
*/
|
|
13
|
-
import { Version } from './util';
|
|
14
|
-
export declare const VERSION: Version;
|
package/testing/package.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@angular/compiler/testing",
|
|
3
|
-
"fesm2020": "../fesm2020/testing.mjs",
|
|
4
|
-
"fesm2015": "../fesm2015/testing.mjs",
|
|
5
|
-
"esm2020": "../esm2020/testing/testing.mjs",
|
|
6
|
-
"typings": "./testing.d.ts",
|
|
7
|
-
"module": "../fesm2015/testing.mjs",
|
|
8
|
-
"es2020": "../fesm2020/testing.mjs"
|
|
9
|
-
}
|
package/testing/public_api.d.ts
DELETED
|
@@ -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
|
-
/**
|
|
9
|
-
* @module
|
|
10
|
-
* @description
|
|
11
|
-
* Entry point for all public APIs of this package.
|
|
12
|
-
*/
|
|
13
|
-
export * from './src/testing';
|
package/testing/src/testing.d.ts
DELETED
|
@@ -1,23 +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
|
-
* @module
|
|
10
|
-
* @description
|
|
11
|
-
* Entry point for all APIs of the compiler package.
|
|
12
|
-
*
|
|
13
|
-
* <div class="callout is-critical">
|
|
14
|
-
* <header>Unstable APIs</header>
|
|
15
|
-
* <p>
|
|
16
|
-
* All compiler apis are currently considered experimental and private!
|
|
17
|
-
* </p>
|
|
18
|
-
* <p>
|
|
19
|
-
* We expect the APIs in this package to keep on changing. Do not rely on them.
|
|
20
|
-
* </p>
|
|
21
|
-
* </div>
|
|
22
|
-
*/
|
|
23
|
-
export declare const unusedExport = true;
|
package/testing/testing.d.ts
DELETED