@angular/compiler 14.0.0-next.12 → 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/compiler_facade_interface.mjs +7 -1
- package/esm2020/src/jit_compiler_facade.mjs +69 -37
- package/esm2020/src/render3/partial/api.mjs +1 -1
- package/esm2020/src/render3/partial/class_metadata.mjs +1 -1
- package/esm2020/src/render3/partial/component.mjs +27 -36
- package/esm2020/src/render3/partial/directive.mjs +5 -2
- 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 +5 -2
- package/esm2020/src/render3/r3_identifiers.mjs +2 -1
- package/esm2020/src/render3/r3_pipe_compiler.mjs +2 -1
- package/esm2020/src/render3/view/api.mjs +7 -2
- package/esm2020/src/render3/view/compiler.mjs +15 -15
- package/esm2020/src/render3/view/i18n/get_msg_utils.mjs +58 -5
- package/esm2020/src/render3/view/i18n/util.mjs +2 -2
- package/esm2020/src/render3/view/template.mjs +4 -4
- package/esm2020/src/render3/view/util.mjs +11 -2
- 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 +495 -117
- package/fesm2015/compiler.mjs.map +1 -1
- package/fesm2015/testing.mjs +1 -1
- package/fesm2020/compiler.mjs +504 -128
- 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 -284
- 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 -441
- 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 -182
- 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 -328
- 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 -13
- 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
package/fesm2015/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-next.
|
|
2
|
+
* @license Angular v14.0.0-next.15
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -756,13 +756,13 @@ class Version {
|
|
|
756
756
|
this.patch = splits.slice(2).join('.');
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
759
|
+
// Check `global` first, because in Node tests both `global` and `window` may be defined and our
|
|
760
|
+
// `_global` variable should point to the NodeJS `global` in that case. Note: Typeof/Instanceof
|
|
761
|
+
// checks are considered side-effects in Terser. We explicitly mark this as side-effect free:
|
|
762
|
+
// https://github.com/terser/terser/issues/250.
|
|
763
|
+
const _global = ( /* @__PURE__ */(() => (typeof global !== 'undefined' && global) || (typeof window !== 'undefined' && window) ||
|
|
764
|
+
(typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
|
|
765
|
+
self instanceof WorkerGlobalScope && self))());
|
|
766
766
|
function newArray(size, value) {
|
|
767
767
|
const list = [];
|
|
768
768
|
for (let i = 0; i < size; i++) {
|
|
@@ -2924,6 +2924,7 @@ Identifiers.contentQuery = { name: 'ɵɵcontentQuery', moduleName: CORE };
|
|
|
2924
2924
|
Identifiers.NgOnChangesFeature = { name: 'ɵɵNgOnChangesFeature', moduleName: CORE };
|
|
2925
2925
|
Identifiers.InheritDefinitionFeature = { name: 'ɵɵInheritDefinitionFeature', moduleName: CORE };
|
|
2926
2926
|
Identifiers.CopyDefinitionFeature = { name: 'ɵɵCopyDefinitionFeature', moduleName: CORE };
|
|
2927
|
+
Identifiers.StandaloneFeature = { name: 'ɵɵStandaloneFeature', moduleName: CORE };
|
|
2927
2928
|
Identifiers.ProvidersFeature = { name: 'ɵɵProvidersFeature', moduleName: CORE };
|
|
2928
2929
|
Identifiers.listener = { name: 'ɵɵlistener', moduleName: CORE };
|
|
2929
2930
|
Identifiers.getInheritedFactory = {
|
|
@@ -4795,7 +4796,7 @@ function assembleBoundTextPlaceholders(meta, bindingStartIndex = 0, contextId =
|
|
|
4795
4796
|
* @param useCamelCase whether to camelCase the placeholder name when formatting.
|
|
4796
4797
|
* @returns A new map of formatted placeholder names to expressions.
|
|
4797
4798
|
*/
|
|
4798
|
-
function
|
|
4799
|
+
function formatI18nPlaceholderNamesInMap(params = {}, useCamelCase) {
|
|
4799
4800
|
const _params = {};
|
|
4800
4801
|
if (params && Object.keys(params).length) {
|
|
4801
4802
|
Object.keys(params).forEach(key => _params[formatI18nPlaceholderName(key, useCamelCase)] = params[key]);
|
|
@@ -4878,6 +4879,12 @@ const IMPLICIT_REFERENCE = '$implicit';
|
|
|
4878
4879
|
const NON_BINDABLE_ATTR = 'ngNonBindable';
|
|
4879
4880
|
/** Name for the variable keeping track of the context returned by `ɵɵrestoreView`. */
|
|
4880
4881
|
const RESTORED_VIEW_CONTEXT_NAME = 'restoredCtx';
|
|
4882
|
+
/**
|
|
4883
|
+
* Maximum length of a single instruction chain. Because our output AST uses recursion, we're
|
|
4884
|
+
* limited in how many expressions we can nest before we reach the call stack limit. This
|
|
4885
|
+
* length is set very conservatively in order to reduce the chance of problems.
|
|
4886
|
+
*/
|
|
4887
|
+
const MAX_CHAIN_LENGTH = 500;
|
|
4881
4888
|
/** Instructions that support chaining. */
|
|
4882
4889
|
const CHAINABLE_INSTRUCTIONS = new Set([
|
|
4883
4890
|
Identifiers.element,
|
|
@@ -5104,15 +5111,17 @@ function getInstructionStatements(instructions) {
|
|
|
5104
5111
|
const statements = [];
|
|
5105
5112
|
let pendingExpression = null;
|
|
5106
5113
|
let pendingExpressionType = null;
|
|
5114
|
+
let chainLength = 0;
|
|
5107
5115
|
for (const current of instructions) {
|
|
5108
5116
|
const resolvedParams = (_a = (typeof current.paramsOrFn === 'function' ? current.paramsOrFn() : current.paramsOrFn)) !== null && _a !== void 0 ? _a : [];
|
|
5109
5117
|
const params = Array.isArray(resolvedParams) ? resolvedParams : [resolvedParams];
|
|
5110
5118
|
// If the current instruction is the same as the previous one
|
|
5111
5119
|
// and it can be chained, add another call to the chain.
|
|
5112
|
-
if (pendingExpressionType === current.reference &&
|
|
5120
|
+
if (chainLength < MAX_CHAIN_LENGTH && pendingExpressionType === current.reference &&
|
|
5113
5121
|
CHAINABLE_INSTRUCTIONS.has(pendingExpressionType)) {
|
|
5114
5122
|
// We'll always have a pending expression when there's a pending expression type.
|
|
5115
5123
|
pendingExpression = pendingExpression.callFn(params, pendingExpression.sourceSpan);
|
|
5124
|
+
chainLength++;
|
|
5116
5125
|
}
|
|
5117
5126
|
else {
|
|
5118
5127
|
if (pendingExpression !== null) {
|
|
@@ -5120,6 +5129,7 @@ function getInstructionStatements(instructions) {
|
|
|
5120
5129
|
}
|
|
5121
5130
|
pendingExpression = invokeInstruction(current.span, current.reference, params);
|
|
5122
5131
|
pendingExpressionType = current.reference;
|
|
5132
|
+
chainLength = 0;
|
|
5123
5133
|
}
|
|
5124
5134
|
}
|
|
5125
5135
|
// Since the current instruction adds the previous one to the statements,
|
|
@@ -6153,9 +6163,24 @@ function createPipeType(metadata) {
|
|
|
6153
6163
|
return new ExpressionType(importExpr(Identifiers.PipeDeclaration, [
|
|
6154
6164
|
typeWithParameters(metadata.type.type, metadata.typeArgumentCount),
|
|
6155
6165
|
new ExpressionType(new LiteralExpr(metadata.pipeName)),
|
|
6166
|
+
new ExpressionType(new LiteralExpr(metadata.isStandalone)),
|
|
6156
6167
|
]));
|
|
6157
6168
|
}
|
|
6158
6169
|
|
|
6170
|
+
/**
|
|
6171
|
+
* @license
|
|
6172
|
+
* Copyright Google LLC All Rights Reserved.
|
|
6173
|
+
*
|
|
6174
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6175
|
+
* found in the LICENSE file at https://angular.io/license
|
|
6176
|
+
*/
|
|
6177
|
+
var R3TemplateDependencyKind;
|
|
6178
|
+
(function (R3TemplateDependencyKind) {
|
|
6179
|
+
R3TemplateDependencyKind[R3TemplateDependencyKind["Directive"] = 0] = "Directive";
|
|
6180
|
+
R3TemplateDependencyKind[R3TemplateDependencyKind["Pipe"] = 1] = "Pipe";
|
|
6181
|
+
R3TemplateDependencyKind[R3TemplateDependencyKind["NgModule"] = 2] = "NgModule";
|
|
6182
|
+
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
6183
|
+
|
|
6159
6184
|
/**
|
|
6160
6185
|
* @license
|
|
6161
6186
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -7653,7 +7678,26 @@ class BuiltinFunctionCall extends Call {
|
|
|
7653
7678
|
* found in the LICENSE file at https://angular.io/license
|
|
7654
7679
|
*/
|
|
7655
7680
|
/**
|
|
7656
|
-
*
|
|
7681
|
+
* The following set contains all keywords that can be used in the animation css shorthand
|
|
7682
|
+
* property and is used during the scoping of keyframes to make sure such keywords
|
|
7683
|
+
* are not modified.
|
|
7684
|
+
*/
|
|
7685
|
+
const animationKeywords = new Set([
|
|
7686
|
+
// global values
|
|
7687
|
+
'inherit', 'initial', 'revert', 'unset',
|
|
7688
|
+
// animation-direction
|
|
7689
|
+
'alternate', 'alternate-reverse', 'normal', 'reverse',
|
|
7690
|
+
// animation-fill-mode
|
|
7691
|
+
'backwards', 'both', 'forwards', 'none',
|
|
7692
|
+
// animation-play-state
|
|
7693
|
+
'paused', 'running',
|
|
7694
|
+
// animation-timing-function
|
|
7695
|
+
'ease', 'ease-in', 'ease-in-out', 'ease-out', 'linear', 'step-start', 'step-end',
|
|
7696
|
+
// `steps()` function
|
|
7697
|
+
'end', 'jump-both', 'jump-end', 'jump-none', 'jump-start', 'start'
|
|
7698
|
+
]);
|
|
7699
|
+
/**
|
|
7700
|
+
* The following class is a port of shadowCSS from webcomponents.js to TypeScript.
|
|
7657
7701
|
*
|
|
7658
7702
|
* Please make sure to keep to edits in sync with the source file.
|
|
7659
7703
|
*
|
|
@@ -7779,6 +7823,21 @@ class BuiltinFunctionCall extends Call {
|
|
|
7779
7823
|
class ShadowCss {
|
|
7780
7824
|
constructor() {
|
|
7781
7825
|
this.strictStyling = true;
|
|
7826
|
+
/**
|
|
7827
|
+
* Regular expression used to extrapolate the possible keyframes from an
|
|
7828
|
+
* animation declaration (with possibly multiple animation definitions)
|
|
7829
|
+
*
|
|
7830
|
+
* The regular expression can be divided in three parts
|
|
7831
|
+
* - (^|\s+)
|
|
7832
|
+
* simply captures how many (if any) leading whitespaces are present
|
|
7833
|
+
* - (?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))
|
|
7834
|
+
* captures two different possible keyframes, ones which are quoted or ones which are valid css
|
|
7835
|
+
* idents (custom properties excluded)
|
|
7836
|
+
* - (?=[,\s;]|$)
|
|
7837
|
+
* simply matches the end of the possible keyframe, valid endings are: a comma, a space, a
|
|
7838
|
+
* semicolon or the end of the string
|
|
7839
|
+
*/
|
|
7840
|
+
this._animationDeclarationKeyframesRe = /(^|\s+)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;
|
|
7782
7841
|
}
|
|
7783
7842
|
/*
|
|
7784
7843
|
* Shim some cssText with the given selector. Returns cssText that can
|
|
@@ -7799,6 +7858,140 @@ class ShadowCss {
|
|
|
7799
7858
|
cssText = this._insertPolyfillDirectivesInCssText(cssText);
|
|
7800
7859
|
return this._insertPolyfillRulesInCssText(cssText);
|
|
7801
7860
|
}
|
|
7861
|
+
/**
|
|
7862
|
+
* Process styles to add scope to keyframes.
|
|
7863
|
+
*
|
|
7864
|
+
* Modify both the names of the keyframes defined in the component styles and also the css
|
|
7865
|
+
* animation rules using them.
|
|
7866
|
+
*
|
|
7867
|
+
* Animation rules using keyframes defined elsewhere are not modified to allow for globally
|
|
7868
|
+
* defined keyframes.
|
|
7869
|
+
*
|
|
7870
|
+
* For example, we convert this css:
|
|
7871
|
+
*
|
|
7872
|
+
* ```
|
|
7873
|
+
* .box {
|
|
7874
|
+
* animation: box-animation 1s forwards;
|
|
7875
|
+
* }
|
|
7876
|
+
*
|
|
7877
|
+
* @keyframes box-animation {
|
|
7878
|
+
* to {
|
|
7879
|
+
* background-color: green;
|
|
7880
|
+
* }
|
|
7881
|
+
* }
|
|
7882
|
+
* ```
|
|
7883
|
+
*
|
|
7884
|
+
* to this:
|
|
7885
|
+
*
|
|
7886
|
+
* ```
|
|
7887
|
+
* .box {
|
|
7888
|
+
* animation: scopeName_box-animation 1s forwards;
|
|
7889
|
+
* }
|
|
7890
|
+
*
|
|
7891
|
+
* @keyframes scopeName_box-animation {
|
|
7892
|
+
* to {
|
|
7893
|
+
* background-color: green;
|
|
7894
|
+
* }
|
|
7895
|
+
* }
|
|
7896
|
+
* ```
|
|
7897
|
+
*
|
|
7898
|
+
* @param cssText the component's css text that needs to be scoped.
|
|
7899
|
+
* @param scopeSelector the component's scope selector.
|
|
7900
|
+
*
|
|
7901
|
+
* @returns the scoped css text.
|
|
7902
|
+
*/
|
|
7903
|
+
_scopeKeyframesRelatedCss(cssText, scopeSelector) {
|
|
7904
|
+
const unscopedKeyframesSet = new Set();
|
|
7905
|
+
const scopedKeyframesCssText = processRules(cssText, rule => this._scopeLocalKeyframeDeclarations(rule, scopeSelector, unscopedKeyframesSet));
|
|
7906
|
+
return processRules(scopedKeyframesCssText, rule => this._scopeAnimationRule(rule, scopeSelector, unscopedKeyframesSet));
|
|
7907
|
+
}
|
|
7908
|
+
/**
|
|
7909
|
+
* Scopes local keyframes names, returning the updated css rule and it also
|
|
7910
|
+
* adds the original keyframe name to a provided set to collect all keyframes names
|
|
7911
|
+
* so that it can later be used to scope the animation rules.
|
|
7912
|
+
*
|
|
7913
|
+
* For example, it takes a rule such as:
|
|
7914
|
+
*
|
|
7915
|
+
* ```
|
|
7916
|
+
* @keyframes box-animation {
|
|
7917
|
+
* to {
|
|
7918
|
+
* background-color: green;
|
|
7919
|
+
* }
|
|
7920
|
+
* }
|
|
7921
|
+
* ```
|
|
7922
|
+
*
|
|
7923
|
+
* and returns:
|
|
7924
|
+
*
|
|
7925
|
+
* ```
|
|
7926
|
+
* @keyframes scopeName_box-animation {
|
|
7927
|
+
* to {
|
|
7928
|
+
* background-color: green;
|
|
7929
|
+
* }
|
|
7930
|
+
* }
|
|
7931
|
+
* ```
|
|
7932
|
+
* and as a side effect it adds "box-animation" to the `unscopedKeyframesSet` set
|
|
7933
|
+
*
|
|
7934
|
+
* @param cssRule the css rule to process.
|
|
7935
|
+
* @param scopeSelector the component's scope selector.
|
|
7936
|
+
* @param unscopedKeyframesSet the set of unscoped keyframes names (which can be
|
|
7937
|
+
* modified as a side effect)
|
|
7938
|
+
*
|
|
7939
|
+
* @returns the css rule modified with the scoped keyframes name.
|
|
7940
|
+
*/
|
|
7941
|
+
_scopeLocalKeyframeDeclarations(rule, scopeSelector, unscopedKeyframesSet) {
|
|
7942
|
+
return Object.assign(Object.assign({}, rule), { selector: rule.selector.replace(/(^@(?:-webkit-)?keyframes(?:\s+))(['"]?)(.+)\2(\s*)$/, (_, start, quote, keyframeName, endSpaces) => {
|
|
7943
|
+
unscopedKeyframesSet.add(unescapeQuotes(keyframeName, quote));
|
|
7944
|
+
return `${start}${quote}${scopeSelector}_${keyframeName}${quote}${endSpaces}`;
|
|
7945
|
+
}) });
|
|
7946
|
+
}
|
|
7947
|
+
/**
|
|
7948
|
+
* Function used to scope a keyframes name (obtained from an animation declaration)
|
|
7949
|
+
* using an existing set of unscopedKeyframes names to discern if the scoping needs to be
|
|
7950
|
+
* performed (keyframes names of keyframes not defined in the component's css need not to be
|
|
7951
|
+
* scoped).
|
|
7952
|
+
*
|
|
7953
|
+
* @param keyframe the keyframes name to check.
|
|
7954
|
+
* @param scopeSelector the component's scope selector.
|
|
7955
|
+
* @param unscopedKeyframesSet the set of unscoped keyframes names.
|
|
7956
|
+
*
|
|
7957
|
+
* @returns the scoped name of the keyframe, or the original name is the name need not to be
|
|
7958
|
+
* scoped.
|
|
7959
|
+
*/
|
|
7960
|
+
_scopeAnimationKeyframe(keyframe, scopeSelector, unscopedKeyframesSet) {
|
|
7961
|
+
return keyframe.replace(/^(\s*)(['"]?)(.+?)\2(\s*)$/, (_, spaces1, quote, name, spaces2) => {
|
|
7962
|
+
name = `${unscopedKeyframesSet.has(unescapeQuotes(name, quote)) ? scopeSelector + '_' : ''}${name}`;
|
|
7963
|
+
return `${spaces1}${quote}${name}${quote}${spaces2}`;
|
|
7964
|
+
});
|
|
7965
|
+
}
|
|
7966
|
+
/**
|
|
7967
|
+
* Scope an animation rule so that the keyframes mentioned in such rule
|
|
7968
|
+
* are scoped if defined in the component's css and left untouched otherwise.
|
|
7969
|
+
*
|
|
7970
|
+
* It can scope values of both the 'animation' and 'animation-name' properties.
|
|
7971
|
+
*
|
|
7972
|
+
* @param rule css rule to scope.
|
|
7973
|
+
* @param scopeSelector the component's scope selector.
|
|
7974
|
+
* @param unscopedKeyframesSet the set of unscoped keyframes names.
|
|
7975
|
+
*
|
|
7976
|
+
* @returns the updated css rule.
|
|
7977
|
+
**/
|
|
7978
|
+
_scopeAnimationRule(rule, scopeSelector, unscopedKeyframesSet) {
|
|
7979
|
+
let content = rule.content.replace(/((?:^|\s+)(?:-webkit-)?animation(?:\s*):(?:\s*))([^;]+)/g, (_, start, animationDeclarations) => start +
|
|
7980
|
+
animationDeclarations.replace(this._animationDeclarationKeyframesRe, (original, leadingSpaces, quote = '', quotedName, nonQuotedName) => {
|
|
7981
|
+
if (quotedName) {
|
|
7982
|
+
return `${leadingSpaces}${this._scopeAnimationKeyframe(`${quote}${quotedName}${quote}`, scopeSelector, unscopedKeyframesSet)}`;
|
|
7983
|
+
}
|
|
7984
|
+
else {
|
|
7985
|
+
return animationKeywords.has(nonQuotedName) ?
|
|
7986
|
+
original :
|
|
7987
|
+
`${leadingSpaces}${this._scopeAnimationKeyframe(nonQuotedName, scopeSelector, unscopedKeyframesSet)}`;
|
|
7988
|
+
}
|
|
7989
|
+
}));
|
|
7990
|
+
content = content.replace(/((?:^|\s+)(?:-webkit-)?animation-name(?:\s*):(?:\s*))([^;]+)/g, (_match, start, commaSeparatedKeyframes) => `${start}${commaSeparatedKeyframes.split(',')
|
|
7991
|
+
.map((keyframe) => this._scopeAnimationKeyframe(keyframe, scopeSelector, unscopedKeyframesSet))
|
|
7992
|
+
.join(',')}`);
|
|
7993
|
+
return Object.assign(Object.assign({}, rule), { content });
|
|
7994
|
+
}
|
|
7802
7995
|
/*
|
|
7803
7996
|
* Process styles to convert native ShadowDOM rules that will trip
|
|
7804
7997
|
* up the css parser; we rely on decorating the stylesheet with inert rules.
|
|
@@ -7857,6 +8050,7 @@ class ShadowCss {
|
|
|
7857
8050
|
cssText = this._convertColonHostContext(cssText);
|
|
7858
8051
|
cssText = this._convertShadowDOMSelectors(cssText);
|
|
7859
8052
|
if (scopeSelector) {
|
|
8053
|
+
cssText = this._scopeKeyframesRelatedCss(cssText, scopeSelector);
|
|
7860
8054
|
cssText = this._scopeSelectors(cssText, scopeSelector, hostSelector);
|
|
7861
8055
|
}
|
|
7862
8056
|
cssText = cssText + '\n' + unscopedRules;
|
|
@@ -8229,11 +8423,14 @@ function extractCommentsWithHash(input) {
|
|
|
8229
8423
|
return input.match(_commentWithHashRe) || [];
|
|
8230
8424
|
}
|
|
8231
8425
|
const BLOCK_PLACEHOLDER = '%BLOCK%';
|
|
8232
|
-
const QUOTE_PLACEHOLDER = '%QUOTED%';
|
|
8233
8426
|
const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
|
|
8234
|
-
const _quotedRe = /%QUOTED%/g;
|
|
8235
8427
|
const CONTENT_PAIRS = new Map([['{', '}']]);
|
|
8236
|
-
const
|
|
8428
|
+
const COMMA_IN_PLACEHOLDER = '%COMMA_IN_PLACEHOLDER%';
|
|
8429
|
+
const SEMI_IN_PLACEHOLDER = '%SEMI_IN_PLACEHOLDER%';
|
|
8430
|
+
const COLON_IN_PLACEHOLDER = '%COLON_IN_PLACEHOLDER%';
|
|
8431
|
+
const _cssCommaInPlaceholderReGlobal = new RegExp(COMMA_IN_PLACEHOLDER, 'g');
|
|
8432
|
+
const _cssSemiInPlaceholderReGlobal = new RegExp(SEMI_IN_PLACEHOLDER, 'g');
|
|
8433
|
+
const _cssColonInPlaceholderReGlobal = new RegExp(COLON_IN_PLACEHOLDER, 'g');
|
|
8237
8434
|
class CssRule {
|
|
8238
8435
|
constructor(selector, content) {
|
|
8239
8436
|
this.selector = selector;
|
|
@@ -8241,12 +8438,10 @@ class CssRule {
|
|
|
8241
8438
|
}
|
|
8242
8439
|
}
|
|
8243
8440
|
function processRules(input, ruleCallback) {
|
|
8244
|
-
const
|
|
8245
|
-
const inputWithEscapedBlocks = escapeBlocks(
|
|
8441
|
+
const escaped = escapeInStrings(input);
|
|
8442
|
+
const inputWithEscapedBlocks = escapeBlocks(escaped, CONTENT_PAIRS, BLOCK_PLACEHOLDER);
|
|
8246
8443
|
let nextBlockIndex = 0;
|
|
8247
|
-
|
|
8248
|
-
return inputWithEscapedBlocks.escapedString
|
|
8249
|
-
.replace(_ruleRe, (...m) => {
|
|
8444
|
+
const escapedResult = inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
|
|
8250
8445
|
const selector = m[2];
|
|
8251
8446
|
let content = '';
|
|
8252
8447
|
let suffix = m[4];
|
|
@@ -8258,8 +8453,8 @@ function processRules(input, ruleCallback) {
|
|
|
8258
8453
|
}
|
|
8259
8454
|
const rule = ruleCallback(new CssRule(selector, content));
|
|
8260
8455
|
return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
|
|
8261
|
-
})
|
|
8262
|
-
|
|
8456
|
+
});
|
|
8457
|
+
return unescapeInStrings(escapedResult);
|
|
8263
8458
|
}
|
|
8264
8459
|
class StringWithEscapedBlocks {
|
|
8265
8460
|
constructor(escapedString, blocks) {
|
|
@@ -8310,6 +8505,112 @@ function escapeBlocks(input, charPairs, placeholder) {
|
|
|
8310
8505
|
}
|
|
8311
8506
|
return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks);
|
|
8312
8507
|
}
|
|
8508
|
+
/**
|
|
8509
|
+
* Object containing as keys characters that should be substituted by placeholders
|
|
8510
|
+
* when found in strings during the css text parsing, and as values the respective
|
|
8511
|
+
* placeholders
|
|
8512
|
+
*/
|
|
8513
|
+
const ESCAPE_IN_STRING_MAP = {
|
|
8514
|
+
';': SEMI_IN_PLACEHOLDER,
|
|
8515
|
+
',': COMMA_IN_PLACEHOLDER,
|
|
8516
|
+
':': COLON_IN_PLACEHOLDER
|
|
8517
|
+
};
|
|
8518
|
+
/**
|
|
8519
|
+
* Parse the provided css text and inside strings (meaning, inside pairs of unescaped single or
|
|
8520
|
+
* double quotes) replace specific characters with their respective placeholders as indicated
|
|
8521
|
+
* by the `ESCAPE_IN_STRING_MAP` map.
|
|
8522
|
+
*
|
|
8523
|
+
* For example convert the text
|
|
8524
|
+
* `animation: "my-anim:at\"ion" 1s;`
|
|
8525
|
+
* to
|
|
8526
|
+
* `animation: "my-anim%COLON_IN_PLACEHOLDER%at\"ion" 1s;`
|
|
8527
|
+
*
|
|
8528
|
+
* This is necessary in order to remove the meaning of some characters when found inside strings
|
|
8529
|
+
* (for example `;` indicates the end of a css declaration, `,` the sequence of values and `:` the
|
|
8530
|
+
* division between property and value during a declaration, none of these meanings apply when such
|
|
8531
|
+
* characters are within strings and so in order to prevent parsing issues they need to be replaced
|
|
8532
|
+
* with placeholder text for the duration of the css manipulation process).
|
|
8533
|
+
*
|
|
8534
|
+
* @param input the original css text.
|
|
8535
|
+
*
|
|
8536
|
+
* @returns the css text with specific characters in strings replaced by placeholders.
|
|
8537
|
+
**/
|
|
8538
|
+
function escapeInStrings(input) {
|
|
8539
|
+
let result = input;
|
|
8540
|
+
let currentQuoteChar = null;
|
|
8541
|
+
for (let i = 0; i < result.length; i++) {
|
|
8542
|
+
const char = result[i];
|
|
8543
|
+
if (char === '\\') {
|
|
8544
|
+
i++;
|
|
8545
|
+
}
|
|
8546
|
+
else {
|
|
8547
|
+
if (currentQuoteChar !== null) {
|
|
8548
|
+
// index i is inside a quoted sub-string
|
|
8549
|
+
if (char === currentQuoteChar) {
|
|
8550
|
+
currentQuoteChar = null;
|
|
8551
|
+
}
|
|
8552
|
+
else {
|
|
8553
|
+
const placeholder = ESCAPE_IN_STRING_MAP[char];
|
|
8554
|
+
if (placeholder) {
|
|
8555
|
+
result = `${result.substr(0, i)}${placeholder}${result.substr(i + 1)}`;
|
|
8556
|
+
i += placeholder.length - 1;
|
|
8557
|
+
}
|
|
8558
|
+
}
|
|
8559
|
+
}
|
|
8560
|
+
else if (char === '\'' || char === '"') {
|
|
8561
|
+
currentQuoteChar = char;
|
|
8562
|
+
}
|
|
8563
|
+
}
|
|
8564
|
+
}
|
|
8565
|
+
return result;
|
|
8566
|
+
}
|
|
8567
|
+
/**
|
|
8568
|
+
* Replace in a string all occurrences of keys in the `ESCAPE_IN_STRING_MAP` map with their
|
|
8569
|
+
* original representation, this is simply used to revert the changes applied by the
|
|
8570
|
+
* escapeInStrings function.
|
|
8571
|
+
*
|
|
8572
|
+
* For example it reverts the text:
|
|
8573
|
+
* `animation: "my-anim%COLON_IN_PLACEHOLDER%at\"ion" 1s;`
|
|
8574
|
+
* to it's original form of:
|
|
8575
|
+
* `animation: "my-anim:at\"ion" 1s;`
|
|
8576
|
+
*
|
|
8577
|
+
* Note: For the sake of simplicity this function does not check that the placeholders are
|
|
8578
|
+
* actually inside strings as it would anyway be extremely unlikely to find them outside of strings.
|
|
8579
|
+
*
|
|
8580
|
+
* @param input the css text containing the placeholders.
|
|
8581
|
+
*
|
|
8582
|
+
* @returns the css text without the placeholders.
|
|
8583
|
+
*/
|
|
8584
|
+
function unescapeInStrings(input) {
|
|
8585
|
+
let result = input.replace(_cssCommaInPlaceholderReGlobal, ',');
|
|
8586
|
+
result = result.replace(_cssSemiInPlaceholderReGlobal, ';');
|
|
8587
|
+
result = result.replace(_cssColonInPlaceholderReGlobal, ':');
|
|
8588
|
+
return result;
|
|
8589
|
+
}
|
|
8590
|
+
/**
|
|
8591
|
+
* Unescape all quotes present in a string, but only if the string was actually already
|
|
8592
|
+
* quoted.
|
|
8593
|
+
*
|
|
8594
|
+
* This generates a "canonical" representation of strings which can be used to match strings
|
|
8595
|
+
* which would otherwise only differ because of differently escaped quotes.
|
|
8596
|
+
*
|
|
8597
|
+
* For example it converts the string (assumed to be quoted):
|
|
8598
|
+
* `this \\"is\\" a \\'\\\\'test`
|
|
8599
|
+
* to:
|
|
8600
|
+
* `this "is" a '\\\\'test`
|
|
8601
|
+
* (note that the latter backslashes are not removed as they are not actually escaping the single
|
|
8602
|
+
* quote)
|
|
8603
|
+
*
|
|
8604
|
+
*
|
|
8605
|
+
* @param input the string possibly containing escaped quotes.
|
|
8606
|
+
* @param isQuoted boolean indicating whether the string was quoted inside a bigger string (if not
|
|
8607
|
+
* then it means that it doesn't represent an inner string and thus no unescaping is required)
|
|
8608
|
+
*
|
|
8609
|
+
* @returns the string in the "canonical" representation without escaped quotes.
|
|
8610
|
+
*/
|
|
8611
|
+
function unescapeQuotes(str, isQuoted) {
|
|
8612
|
+
return !isQuoted ? str : str.replace(/((?:^|[^\\])(?:\\\\)*)\\(?=['"])/g, '$1');
|
|
8613
|
+
}
|
|
8313
8614
|
/**
|
|
8314
8615
|
* Combine the `contextSelectors` with the `hostMarker` and the `otherSelectors`
|
|
8315
8616
|
* to create a selector that matches the same as `:host-context()`.
|
|
@@ -16763,11 +17064,64 @@ function i18nMetaToJSDoc(meta) {
|
|
|
16763
17064
|
|
|
16764
17065
|
/** Closure uses `goog.getMsg(message)` to lookup translations */
|
|
16765
17066
|
const GOOG_GET_MSG = 'goog.getMsg';
|
|
16766
|
-
|
|
17067
|
+
/**
|
|
17068
|
+
* Generates a `goog.getMsg()` statement and reassignment. The template:
|
|
17069
|
+
*
|
|
17070
|
+
* ```html
|
|
17071
|
+
* <div i18n>Sent from {{ sender }} to <span class="receiver">{{ receiver }}</span></div>
|
|
17072
|
+
* ```
|
|
17073
|
+
*
|
|
17074
|
+
* Generates:
|
|
17075
|
+
*
|
|
17076
|
+
* ```typescript
|
|
17077
|
+
* const MSG_FOO = goog.getMsg(
|
|
17078
|
+
* // Message template.
|
|
17079
|
+
* 'Sent from {$interpolation} to {$startTagSpan}{$interpolation_1}{$closeTagSpan}.',
|
|
17080
|
+
* // Placeholder values, set to magic strings which get replaced by the Angular runtime.
|
|
17081
|
+
* {
|
|
17082
|
+
* 'interpolation': '\uFFFD0\uFFFD',
|
|
17083
|
+
* 'startTagSpan': '\uFFFD1\uFFFD',
|
|
17084
|
+
* 'interpolation_1': '\uFFFD2\uFFFD',
|
|
17085
|
+
* 'closeTagSpan': '\uFFFD3\uFFFD',
|
|
17086
|
+
* },
|
|
17087
|
+
* // Options bag.
|
|
17088
|
+
* {
|
|
17089
|
+
* // Maps each placeholder to the original Angular source code which generates it's value.
|
|
17090
|
+
* original_code: {
|
|
17091
|
+
* 'interpolation': '{{ sender }}',
|
|
17092
|
+
* 'startTagSpan': '<span class="receiver">',
|
|
17093
|
+
* 'interploation_1': '{{ receiver }}',
|
|
17094
|
+
* 'closeTagSpan': '</span>',
|
|
17095
|
+
* },
|
|
17096
|
+
* },
|
|
17097
|
+
* );
|
|
17098
|
+
* const I18N_0 = MSG_FOO;
|
|
17099
|
+
* ```
|
|
17100
|
+
*/
|
|
17101
|
+
function createGoogleGetMsgStatements(variable$1, message, closureVar, placeholderValues) {
|
|
16767
17102
|
const messageString = serializeI18nMessageForGetMsg(message);
|
|
16768
17103
|
const args = [literal(messageString)];
|
|
16769
|
-
if (Object.keys(
|
|
16770
|
-
|
|
17104
|
+
if (Object.keys(placeholderValues).length) {
|
|
17105
|
+
// Message template parameters containing the magic strings replaced by the Angular runtime with
|
|
17106
|
+
// real data, e.g. `{'interpolation': '\uFFFD0\uFFFD'}`.
|
|
17107
|
+
args.push(mapLiteral(formatI18nPlaceholderNamesInMap(placeholderValues, true /* useCamelCase */), true /* quoted */));
|
|
17108
|
+
// Message options object, which contains original source code for placeholders (as they are
|
|
17109
|
+
// present in a template, e.g.
|
|
17110
|
+
// `{original_code: {'interpolation': '{{ name }}', 'startTagSpan': '<span>'}}`.
|
|
17111
|
+
args.push(mapLiteral({
|
|
17112
|
+
original_code: literalMap(Object.keys(placeholderValues)
|
|
17113
|
+
.map((param) => ({
|
|
17114
|
+
key: formatI18nPlaceholderName(param),
|
|
17115
|
+
quoted: true,
|
|
17116
|
+
value: message.placeholders[param] ?
|
|
17117
|
+
// Get source span for typical placeholder if it exists.
|
|
17118
|
+
literal(message.placeholders[param].sourceSpan.toString()) :
|
|
17119
|
+
// Otherwise must be an ICU expression, get it's source span.
|
|
17120
|
+
literal(message.placeholderToMessage[param]
|
|
17121
|
+
.nodes.map((node) => node.sourceSpan.toString())
|
|
17122
|
+
.join('')),
|
|
17123
|
+
}))),
|
|
17124
|
+
}));
|
|
16771
17125
|
}
|
|
16772
17126
|
// /**
|
|
16773
17127
|
// * @desc description of message
|
|
@@ -17721,7 +18075,7 @@ class TemplateDefinitionBuilder {
|
|
|
17721
18075
|
// - all ICU vars (such as `VAR_SELECT` or `VAR_PLURAL`) are replaced with correct values
|
|
17722
18076
|
const transformFn = (raw) => {
|
|
17723
18077
|
const params = Object.assign(Object.assign({}, vars), placeholders);
|
|
17724
|
-
const formatted =
|
|
18078
|
+
const formatted = formatI18nPlaceholderNamesInMap(params, /* useCamelCase */ false);
|
|
17725
18079
|
return invokeInstruction(null, Identifiers.i18nPostprocess, [raw, mapLiteral(formatted, true)]);
|
|
17726
18080
|
};
|
|
17727
18081
|
// in case the whole i18n message is a single ICU - we do not need to
|
|
@@ -18642,7 +18996,7 @@ const NG_I18N_CLOSURE_MODE = 'ngI18nClosureMode';
|
|
|
18642
18996
|
function getTranslationDeclStmts(message, variable, closureVar, params = {}, transformFn) {
|
|
18643
18997
|
const statements = [
|
|
18644
18998
|
declareI18nVariable(variable),
|
|
18645
|
-
ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable, message, closureVar,
|
|
18999
|
+
ifStmt(createClosureModeGuard(), createGoogleGetMsgStatements(variable, message, closureVar, params), createLocalizeStatements(variable, message, formatI18nPlaceholderNamesInMap(params, /* useCamelCase */ false))),
|
|
18646
19000
|
];
|
|
18647
19001
|
if (transformFn) {
|
|
18648
19002
|
statements.push(new ExpressionStatement(variable.set(transformFn(variable))));
|
|
@@ -18736,6 +19090,10 @@ function addFeatures(definitionMap, meta) {
|
|
|
18736
19090
|
if (meta.lifecycle.usesOnChanges) {
|
|
18737
19091
|
features.push(importExpr(Identifiers.NgOnChangesFeature));
|
|
18738
19092
|
}
|
|
19093
|
+
// TODO: better way of differentiating component vs directive metadata.
|
|
19094
|
+
if (meta.hasOwnProperty('template') && meta.isStandalone) {
|
|
19095
|
+
features.push(importExpr(Identifiers.StandaloneFeature));
|
|
19096
|
+
}
|
|
18739
19097
|
if (features.length) {
|
|
18740
19098
|
definitionMap.set('features', literalArr(features));
|
|
18741
19099
|
}
|
|
@@ -18799,17 +19157,8 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
18799
19157
|
definitionMap.set('consts', constsExpr);
|
|
18800
19158
|
}
|
|
18801
19159
|
definitionMap.set('template', templateFunctionExpression);
|
|
18802
|
-
|
|
18803
|
-
|
|
18804
|
-
const directivesList = literalArr(meta.directives.map(dir => dir.type));
|
|
18805
|
-
const directivesExpr = compileDeclarationList(directivesList, meta.declarationListEmitMode);
|
|
18806
|
-
definitionMap.set('directives', directivesExpr);
|
|
18807
|
-
}
|
|
18808
|
-
// e.g. `pipes: [MyPipe]`
|
|
18809
|
-
if (meta.pipes.size > 0) {
|
|
18810
|
-
const pipesList = literalArr(Array.from(meta.pipes.values()));
|
|
18811
|
-
const pipesExpr = compileDeclarationList(pipesList, meta.declarationListEmitMode);
|
|
18812
|
-
definitionMap.set('pipes', pipesExpr);
|
|
19160
|
+
if (meta.declarations.length > 0) {
|
|
19161
|
+
definitionMap.set('dependencies', compileDeclarationList(literalArr(meta.declarations.map(decl => decl.type)), meta.declarationListEmitMode));
|
|
18813
19162
|
}
|
|
18814
19163
|
if (meta.encapsulation === null) {
|
|
18815
19164
|
meta.encapsulation = ViewEncapsulation.Emulated;
|
|
@@ -18847,8 +19196,9 @@ function compileComponentFromMetadata(meta, constantPool, bindingParser) {
|
|
|
18847
19196
|
* to be consumed by upstream compilations.
|
|
18848
19197
|
*/
|
|
18849
19198
|
function createComponentType(meta) {
|
|
18850
|
-
const typeParams =
|
|
19199
|
+
const typeParams = createBaseDirectiveTypeParams(meta);
|
|
18851
19200
|
typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));
|
|
19201
|
+
typeParams.push(expressionType(literal(meta.isStandalone)));
|
|
18852
19202
|
return expressionType(importExpr(Identifiers.ComponentDeclaration, typeParams));
|
|
18853
19203
|
}
|
|
18854
19204
|
/**
|
|
@@ -18939,7 +19289,7 @@ function stringArrayAsType(arr) {
|
|
|
18939
19289
|
return arr.length > 0 ? expressionType(literalArr(arr.map(value => literal(value)))) :
|
|
18940
19290
|
NONE_TYPE;
|
|
18941
19291
|
}
|
|
18942
|
-
function
|
|
19292
|
+
function createBaseDirectiveTypeParams(meta) {
|
|
18943
19293
|
// On the type side, remove newlines from the selector as it will need to fit into a TypeScript
|
|
18944
19294
|
// string literal, which must be on one line.
|
|
18945
19295
|
const selectorForType = meta.selector !== null ? meta.selector.replace(/\n/g, '') : null;
|
|
@@ -18957,7 +19307,11 @@ function createDirectiveTypeParams(meta) {
|
|
|
18957
19307
|
* to be consumed by upstream compilations.
|
|
18958
19308
|
*/
|
|
18959
19309
|
function createDirectiveType(meta) {
|
|
18960
|
-
const typeParams =
|
|
19310
|
+
const typeParams = createBaseDirectiveTypeParams(meta);
|
|
19311
|
+
// Directives have no NgContentSelectors slot, but instead express a `never` type
|
|
19312
|
+
// so that future fields align.
|
|
19313
|
+
typeParams.push(NONE_TYPE);
|
|
19314
|
+
typeParams.push(expressionType(literal(meta.isStandalone)));
|
|
18961
19315
|
return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));
|
|
18962
19316
|
}
|
|
18963
19317
|
// Define and update any view queries
|
|
@@ -19320,10 +19674,10 @@ class CompilerFacadeImpl {
|
|
|
19320
19674
|
internalType: new WrappedNodeExpr(facade.type),
|
|
19321
19675
|
typeArgumentCount: facade.typeArgumentCount,
|
|
19322
19676
|
providedIn: computeProvidedIn(facade.providedIn),
|
|
19323
|
-
useClass: convertToProviderExpression(facade,
|
|
19324
|
-
useFactory: wrapExpression(facade,
|
|
19325
|
-
useValue: convertToProviderExpression(facade,
|
|
19326
|
-
useExisting: convertToProviderExpression(facade,
|
|
19677
|
+
useClass: convertToProviderExpression(facade, 'useClass'),
|
|
19678
|
+
useFactory: wrapExpression(facade, 'useFactory'),
|
|
19679
|
+
useValue: convertToProviderExpression(facade, 'useValue'),
|
|
19680
|
+
useExisting: convertToProviderExpression(facade, 'useExisting'),
|
|
19327
19681
|
deps: (_a = facade.deps) === null || _a === void 0 ? void 0 : _a.map(convertR3DependencyMetadata),
|
|
19328
19682
|
},
|
|
19329
19683
|
/* resolveForwardRefs */ true);
|
|
@@ -19337,10 +19691,10 @@ class CompilerFacadeImpl {
|
|
|
19337
19691
|
internalType: new WrappedNodeExpr(facade.type),
|
|
19338
19692
|
typeArgumentCount: 0,
|
|
19339
19693
|
providedIn: computeProvidedIn(facade.providedIn),
|
|
19340
|
-
useClass: convertToProviderExpression(facade,
|
|
19341
|
-
useFactory: wrapExpression(facade,
|
|
19342
|
-
useValue: convertToProviderExpression(facade,
|
|
19343
|
-
useExisting: convertToProviderExpression(facade,
|
|
19694
|
+
useClass: convertToProviderExpression(facade, 'useClass'),
|
|
19695
|
+
useFactory: wrapExpression(facade, 'useFactory'),
|
|
19696
|
+
useValue: convertToProviderExpression(facade, 'useValue'),
|
|
19697
|
+
useExisting: convertToProviderExpression(facade, 'useExisting'),
|
|
19344
19698
|
deps: (_a = facade.deps) === null || _a === void 0 ? void 0 : _a.map(convertR3DeclareDependencyMetadata),
|
|
19345
19699
|
},
|
|
19346
19700
|
/* resolveForwardRefs */ true);
|
|
@@ -19402,7 +19756,7 @@ class CompilerFacadeImpl {
|
|
|
19402
19756
|
// Parse the template and check for errors.
|
|
19403
19757
|
const { template, interpolation } = parseJitTemplate(facade.template, facade.name, sourceMapUrl, facade.preserveWhitespaces, facade.interpolation);
|
|
19404
19758
|
// Compile the component metadata, including template, into an expression.
|
|
19405
|
-
const meta = Object.assign(Object.assign(Object.assign({}, facade), convertDirectiveFacadeToMetadata(facade)), { selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(), template, declarationListEmitMode: 0 /* Direct */, styles: [...facade.styles, ...template.styles], encapsulation: facade.encapsulation, interpolation, changeDetection: facade.changeDetection, animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null, viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) :
|
|
19759
|
+
const meta = Object.assign(Object.assign(Object.assign({}, facade), convertDirectiveFacadeToMetadata(facade)), { selector: facade.selector || this.elementSchemaRegistry.getDefaultComponentElementName(), template, declarations: facade.declarations.map(convertDeclarationFacadeToMetadata), declarationListEmitMode: 0 /* Direct */, styles: [...facade.styles, ...template.styles], encapsulation: facade.encapsulation, interpolation, changeDetection: facade.changeDetection, animations: facade.animations != null ? new WrappedNodeExpr(facade.animations) : null, viewProviders: facade.viewProviders != null ? new WrappedNodeExpr(facade.viewProviders) :
|
|
19406
19760
|
null, relativeContextFilePath: '', i18nUseExternalIds: true });
|
|
19407
19761
|
const jitExpressionSourceMap = `ng:///${facade.name}.js`;
|
|
19408
19762
|
return this.compileComponentFromMeta(angularCoreEnv, jitExpressionSourceMap, meta);
|
|
@@ -19465,10 +19819,6 @@ class CompilerFacadeImpl {
|
|
|
19465
19819
|
return res['$def'];
|
|
19466
19820
|
}
|
|
19467
19821
|
}
|
|
19468
|
-
const USE_CLASS = Object.keys({ useClass: null })[0];
|
|
19469
|
-
const USE_FACTORY = Object.keys({ useFactory: null })[0];
|
|
19470
|
-
const USE_VALUE = Object.keys({ useValue: null })[0];
|
|
19471
|
-
const USE_EXISTING = Object.keys({ useExisting: null })[0];
|
|
19472
19822
|
function convertToR3QueryMetadata(facade) {
|
|
19473
19823
|
return Object.assign(Object.assign({}, facade), { predicate: convertQueryPredicate(facade.predicate), read: facade.read ? new WrappedNodeExpr(facade.read) : null, static: facade.static, emitDistinctChangesOnly: facade.emitDistinctChangesOnly });
|
|
19474
19824
|
}
|
|
@@ -19555,19 +19905,43 @@ function convertOpaqueValuesToExpressions(obj) {
|
|
|
19555
19905
|
}
|
|
19556
19906
|
return result;
|
|
19557
19907
|
}
|
|
19558
|
-
function convertDeclareComponentFacadeToMetadata(
|
|
19559
|
-
var _a, _b, _c, _d
|
|
19560
|
-
const { template, interpolation } = parseJitTemplate(
|
|
19561
|
-
|
|
19562
|
-
|
|
19563
|
-
|
|
19564
|
-
|
|
19565
|
-
|
|
19566
|
-
|
|
19567
|
-
|
|
19568
|
-
|
|
19908
|
+
function convertDeclareComponentFacadeToMetadata(decl, typeSourceSpan, sourceMapUrl) {
|
|
19909
|
+
var _a, _b, _c, _d;
|
|
19910
|
+
const { template, interpolation } = parseJitTemplate(decl.template, decl.type.name, sourceMapUrl, (_a = decl.preserveWhitespaces) !== null && _a !== void 0 ? _a : false, decl.interpolation);
|
|
19911
|
+
const declarations = [];
|
|
19912
|
+
if (decl.dependencies) {
|
|
19913
|
+
for (const innerDep of decl.dependencies) {
|
|
19914
|
+
switch (innerDep.kind) {
|
|
19915
|
+
case 'directive':
|
|
19916
|
+
case 'component':
|
|
19917
|
+
declarations.push(convertDirectiveDeclarationToMetadata(innerDep));
|
|
19918
|
+
break;
|
|
19919
|
+
case 'pipe':
|
|
19920
|
+
declarations.push(convertPipeDeclarationToMetadata(innerDep));
|
|
19921
|
+
break;
|
|
19922
|
+
}
|
|
19923
|
+
}
|
|
19924
|
+
}
|
|
19925
|
+
else if (decl.components || decl.directives || decl.pipes) {
|
|
19926
|
+
// Existing declarations on NPM may not be using the new `dependencies` merged field, and may
|
|
19927
|
+
// have separate fields for dependencies instead. Unify them for JIT compilation.
|
|
19928
|
+
decl.components &&
|
|
19929
|
+
declarations.push(...decl.components.map(dir => convertDirectiveDeclarationToMetadata(dir, /* isComponent */ true)));
|
|
19930
|
+
decl.directives &&
|
|
19931
|
+
declarations.push(...decl.directives.map(dir => convertDirectiveDeclarationToMetadata(dir)));
|
|
19932
|
+
decl.pipes && declarations.push(...convertPipeMapToMetadata(decl.pipes));
|
|
19933
|
+
}
|
|
19934
|
+
return Object.assign(Object.assign({}, convertDeclareDirectiveFacadeToMetadata(decl, typeSourceSpan)), { template, styles: (_b = decl.styles) !== null && _b !== void 0 ? _b : [], declarations, viewProviders: decl.viewProviders !== undefined ? new WrappedNodeExpr(decl.viewProviders) :
|
|
19935
|
+
null, animations: decl.animations !== undefined ? new WrappedNodeExpr(decl.animations) : null, changeDetection: (_c = decl.changeDetection) !== null && _c !== void 0 ? _c : ChangeDetectionStrategy.Default, encapsulation: (_d = decl.encapsulation) !== null && _d !== void 0 ? _d : ViewEncapsulation.Emulated, interpolation, declarationListEmitMode: 2 /* ClosureResolved */, relativeContextFilePath: '', i18nUseExternalIds: true });
|
|
19936
|
+
}
|
|
19937
|
+
function convertDeclarationFacadeToMetadata(declaration) {
|
|
19938
|
+
return Object.assign(Object.assign({}, declaration), { type: new WrappedNodeExpr(declaration.type) });
|
|
19939
|
+
}
|
|
19940
|
+
function convertDirectiveDeclarationToMetadata(declaration, isComponent = null) {
|
|
19569
19941
|
var _a, _b, _c;
|
|
19570
19942
|
return {
|
|
19943
|
+
kind: R3TemplateDependencyKind.Directive,
|
|
19944
|
+
isComponent: isComponent || declaration.kind === 'component',
|
|
19571
19945
|
selector: declaration.selector,
|
|
19572
19946
|
type: new WrappedNodeExpr(declaration.type),
|
|
19573
19947
|
inputs: (_a = declaration.inputs) !== null && _a !== void 0 ? _a : [],
|
|
@@ -19575,16 +19949,24 @@ function convertUsedDirectiveDeclarationToMetadata(declaration) {
|
|
|
19575
19949
|
exportAs: (_c = declaration.exportAs) !== null && _c !== void 0 ? _c : null,
|
|
19576
19950
|
};
|
|
19577
19951
|
}
|
|
19578
|
-
function
|
|
19579
|
-
|
|
19580
|
-
|
|
19581
|
-
return pipes;
|
|
19582
|
-
}
|
|
19583
|
-
for (const pipeName of Object.keys(declaredPipes)) {
|
|
19584
|
-
const pipeType = declaredPipes[pipeName];
|
|
19585
|
-
pipes.set(pipeName, new WrappedNodeExpr(pipeType));
|
|
19952
|
+
function convertPipeMapToMetadata(pipes) {
|
|
19953
|
+
if (!pipes) {
|
|
19954
|
+
return [];
|
|
19586
19955
|
}
|
|
19587
|
-
return pipes
|
|
19956
|
+
return Object.keys(pipes).map(name => {
|
|
19957
|
+
return {
|
|
19958
|
+
kind: R3TemplateDependencyKind.Pipe,
|
|
19959
|
+
name,
|
|
19960
|
+
type: new WrappedNodeExpr(pipes[name]),
|
|
19961
|
+
};
|
|
19962
|
+
});
|
|
19963
|
+
}
|
|
19964
|
+
function convertPipeDeclarationToMetadata(pipe) {
|
|
19965
|
+
return {
|
|
19966
|
+
kind: R3TemplateDependencyKind.Pipe,
|
|
19967
|
+
name: pipe.name,
|
|
19968
|
+
type: new WrappedNodeExpr(pipe.type),
|
|
19969
|
+
};
|
|
19588
19970
|
}
|
|
19589
19971
|
function parseJitTemplate(template, typeName, sourceMapUrl, preserveWhitespaces, interpolation) {
|
|
19590
19972
|
const interpolationConfig = interpolation ? InterpolationConfig.fromArray(interpolation) : DEFAULT_INTERPOLATION_CONFIG;
|
|
@@ -19733,7 +20115,7 @@ function publishFacade(global) {
|
|
|
19733
20115
|
* Use of this source code is governed by an MIT-style license that can be
|
|
19734
20116
|
* found in the LICENSE file at https://angular.io/license
|
|
19735
20117
|
*/
|
|
19736
|
-
const VERSION = new Version('14.0.0-next.
|
|
20118
|
+
const VERSION = new Version('14.0.0-next.15');
|
|
19737
20119
|
|
|
19738
20120
|
/**
|
|
19739
20121
|
* @license
|
|
@@ -21760,7 +22142,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
|
|
|
21760
22142
|
function compileDeclareClassMetadata(metadata) {
|
|
21761
22143
|
const definitionMap = new DefinitionMap();
|
|
21762
22144
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
21763
|
-
definitionMap.set('version', literal('14.0.0-next.
|
|
22145
|
+
definitionMap.set('version', literal('14.0.0-next.15'));
|
|
21764
22146
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
21765
22147
|
definitionMap.set('type', metadata.type);
|
|
21766
22148
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -21877,9 +22259,12 @@ function compileDeclareDirectiveFromMetadata(meta) {
|
|
|
21877
22259
|
function createDirectiveDefinitionMap(meta) {
|
|
21878
22260
|
const definitionMap = new DefinitionMap();
|
|
21879
22261
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
21880
|
-
definitionMap.set('version', literal('14.0.0-next.
|
|
22262
|
+
definitionMap.set('version', literal('14.0.0-next.15'));
|
|
21881
22263
|
// e.g. `type: MyDirective`
|
|
21882
22264
|
definitionMap.set('type', meta.internalType);
|
|
22265
|
+
if (meta.isStandalone) {
|
|
22266
|
+
definitionMap.set('isStandalone', literal(meta.isStandalone));
|
|
22267
|
+
}
|
|
21883
22268
|
// e.g. `selector: 'some-dir'`
|
|
21884
22269
|
if (meta.selector !== null) {
|
|
21885
22270
|
definitionMap.set('selector', literal(meta.selector));
|
|
@@ -21984,9 +22369,7 @@ function createComponentDefinitionMap(meta, template, templateInfo) {
|
|
|
21984
22369
|
definitionMap.set('isInline', literal(true));
|
|
21985
22370
|
}
|
|
21986
22371
|
definitionMap.set('styles', toOptionalLiteralArray(meta.styles, literal));
|
|
21987
|
-
definitionMap.set('
|
|
21988
|
-
definitionMap.set('directives', compileUsedDirectiveMetadata(meta, directive => directive.isComponent !== true));
|
|
21989
|
-
definitionMap.set('pipes', compileUsedPipeMetadata(meta));
|
|
22372
|
+
definitionMap.set('dependencies', compileUsedDependenciesMetadata(meta));
|
|
21990
22373
|
definitionMap.set('viewProviders', meta.viewProviders);
|
|
21991
22374
|
definitionMap.set('animations', meta.animations);
|
|
21992
22375
|
if (meta.changeDetection !== undefined) {
|
|
@@ -22042,43 +22425,35 @@ function computeEndLocation(file, contents) {
|
|
|
22042
22425
|
} while (lineStart !== -1);
|
|
22043
22426
|
return new ParseLocation(file, length, line, length - lastLineStart);
|
|
22044
22427
|
}
|
|
22045
|
-
|
|
22046
|
-
* Compiles the directives as registered in the component metadata into an array literal of the
|
|
22047
|
-
* individual directives. If the component does not use any directives, then null is returned.
|
|
22048
|
-
*/
|
|
22049
|
-
function compileUsedDirectiveMetadata(meta, predicate) {
|
|
22428
|
+
function compileUsedDependenciesMetadata(meta) {
|
|
22050
22429
|
const wrapType = meta.declarationListEmitMode !== 0 /* Direct */ ?
|
|
22051
22430
|
generateForwardRef :
|
|
22052
22431
|
(expr) => expr;
|
|
22053
|
-
|
|
22054
|
-
|
|
22055
|
-
|
|
22056
|
-
|
|
22057
|
-
|
|
22058
|
-
|
|
22059
|
-
|
|
22060
|
-
|
|
22061
|
-
|
|
22432
|
+
return toOptionalLiteralArray(meta.declarations, decl => {
|
|
22433
|
+
switch (decl.kind) {
|
|
22434
|
+
case R3TemplateDependencyKind.Directive:
|
|
22435
|
+
const dirMeta = new DefinitionMap();
|
|
22436
|
+
dirMeta.set('kind', literal(decl.isComponent ? 'component' : 'directive'));
|
|
22437
|
+
dirMeta.set('type', wrapType(decl.type));
|
|
22438
|
+
dirMeta.set('selector', literal(decl.selector));
|
|
22439
|
+
dirMeta.set('inputs', toOptionalLiteralArray(decl.inputs, literal));
|
|
22440
|
+
dirMeta.set('outputs', toOptionalLiteralArray(decl.outputs, literal));
|
|
22441
|
+
dirMeta.set('exportAs', toOptionalLiteralArray(decl.exportAs, literal));
|
|
22442
|
+
return dirMeta.toLiteralMap();
|
|
22443
|
+
case R3TemplateDependencyKind.Pipe:
|
|
22444
|
+
const pipeMeta = new DefinitionMap();
|
|
22445
|
+
pipeMeta.set('kind', literal('pipe'));
|
|
22446
|
+
pipeMeta.set('type', wrapType(decl.type));
|
|
22447
|
+
pipeMeta.set('name', literal(decl.name));
|
|
22448
|
+
return pipeMeta.toLiteralMap();
|
|
22449
|
+
case R3TemplateDependencyKind.NgModule:
|
|
22450
|
+
const ngModuleMeta = new DefinitionMap();
|
|
22451
|
+
ngModuleMeta.set('kind', literal('ngmodule'));
|
|
22452
|
+
ngModuleMeta.set('type', wrapType(decl.type));
|
|
22453
|
+
return ngModuleMeta.toLiteralMap();
|
|
22454
|
+
}
|
|
22062
22455
|
});
|
|
22063
22456
|
}
|
|
22064
|
-
/**
|
|
22065
|
-
* Compiles the pipes as registered in the component metadata into an object literal, where the
|
|
22066
|
-
* pipe's name is used as key and a reference to its type as value. If the component does not use
|
|
22067
|
-
* any pipes, then null is returned.
|
|
22068
|
-
*/
|
|
22069
|
-
function compileUsedPipeMetadata(meta) {
|
|
22070
|
-
if (meta.pipes.size === 0) {
|
|
22071
|
-
return null;
|
|
22072
|
-
}
|
|
22073
|
-
const wrapType = meta.declarationListEmitMode !== 0 /* Direct */ ?
|
|
22074
|
-
generateForwardRef :
|
|
22075
|
-
(expr) => expr;
|
|
22076
|
-
const entries = [];
|
|
22077
|
-
for (const [name, pipe] of meta.pipes) {
|
|
22078
|
-
entries.push({ key: name, value: wrapType(pipe), quoted: true });
|
|
22079
|
-
}
|
|
22080
|
-
return literalMap(entries);
|
|
22081
|
-
}
|
|
22082
22457
|
|
|
22083
22458
|
/**
|
|
22084
22459
|
* @license
|
|
@@ -22098,7 +22473,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
22098
22473
|
function compileDeclareFactoryFunction(meta) {
|
|
22099
22474
|
const definitionMap = new DefinitionMap();
|
|
22100
22475
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
22101
|
-
definitionMap.set('version', literal('14.0.0-next.
|
|
22476
|
+
definitionMap.set('version', literal('14.0.0-next.15'));
|
|
22102
22477
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22103
22478
|
definitionMap.set('type', meta.internalType);
|
|
22104
22479
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -22140,7 +22515,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
22140
22515
|
function createInjectableDefinitionMap(meta) {
|
|
22141
22516
|
const definitionMap = new DefinitionMap();
|
|
22142
22517
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
22143
|
-
definitionMap.set('version', literal('14.0.0-next.
|
|
22518
|
+
definitionMap.set('version', literal('14.0.0-next.15'));
|
|
22144
22519
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22145
22520
|
definitionMap.set('type', meta.internalType);
|
|
22146
22521
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -22198,7 +22573,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
22198
22573
|
function createInjectorDefinitionMap(meta) {
|
|
22199
22574
|
const definitionMap = new DefinitionMap();
|
|
22200
22575
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
22201
|
-
definitionMap.set('version', literal('14.0.0-next.
|
|
22576
|
+
definitionMap.set('version', literal('14.0.0-next.15'));
|
|
22202
22577
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22203
22578
|
definitionMap.set('type', meta.internalType);
|
|
22204
22579
|
definitionMap.set('providers', meta.providers);
|
|
@@ -22235,7 +22610,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
|
|
|
22235
22610
|
function createNgModuleDefinitionMap(meta) {
|
|
22236
22611
|
const definitionMap = new DefinitionMap();
|
|
22237
22612
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
22238
|
-
definitionMap.set('version', literal('14.0.0-next.
|
|
22613
|
+
definitionMap.set('version', literal('14.0.0-next.15'));
|
|
22239
22614
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22240
22615
|
definitionMap.set('type', meta.internalType);
|
|
22241
22616
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -22293,10 +22668,13 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
22293
22668
|
function createPipeDefinitionMap(meta) {
|
|
22294
22669
|
const definitionMap = new DefinitionMap();
|
|
22295
22670
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
22296
|
-
definitionMap.set('version', literal('14.0.0-next.
|
|
22671
|
+
definitionMap.set('version', literal('14.0.0-next.15'));
|
|
22297
22672
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22298
22673
|
// e.g. `type: MyPipe`
|
|
22299
22674
|
definitionMap.set('type', meta.internalType);
|
|
22675
|
+
if (meta.isStandalone) {
|
|
22676
|
+
definitionMap.set('isStandalone', literal(meta.isStandalone));
|
|
22677
|
+
}
|
|
22300
22678
|
// e.g. `name: "myPipe"`
|
|
22301
22679
|
definitionMap.set('name', literal(meta.pipeName));
|
|
22302
22680
|
if (meta.pure === false) {
|
|
@@ -22343,5 +22721,5 @@ publishFacade(_global);
|
|
|
22343
22721
|
* found in the LICENSE file at https://angular.io/license
|
|
22344
22722
|
*/
|
|
22345
22723
|
|
|
22346
|
-
export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser$1 as Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3SelectorScopeMode, R3TargetBinder, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BoundAttribute as TmplAstBoundAttribute, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, Element$1 as TmplAstElement, Icu$1 as TmplAstIcu, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, Variable as TmplAstVariable, Token, TokenType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, compileClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compilePipeFromMetadata, computeMsgId, core, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, verifyHostBindings, visitAll };
|
|
22724
|
+
export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser$1 as Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3SelectorScopeMode, R3TargetBinder, R3TemplateDependencyKind, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BoundAttribute as TmplAstBoundAttribute, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, Element$1 as TmplAstElement, Icu$1 as TmplAstIcu, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, Variable as TmplAstVariable, Token, TokenType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, compileClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compilePipeFromMetadata, computeMsgId, core, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, verifyHostBindings, visitAll };
|
|
22347
22725
|
//# sourceMappingURL=compiler.mjs.map
|