@angular/compiler 14.1.0-next.3 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/src/constant_pool.mjs +2 -2
- package/esm2020/src/jit_compiler_facade.mjs +5 -5
- 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/render3/view/i18n/context.mjs +3 -3
- package/esm2020/src/render3/view/i18n/get_msg_utils.mjs +2 -2
- package/esm2020/src/render3/view/template.mjs +1 -1
- package/esm2020/src/render3/view/util.mjs +4 -9
- package/esm2020/src/version.mjs +1 -1
- package/fesm2015/compiler.mjs +20 -24
- package/fesm2015/compiler.mjs.map +1 -1
- package/fesm2015/testing.mjs +1 -1
- package/fesm2020/compiler.mjs +20 -24
- package/fesm2020/compiler.mjs.map +1 -1
- package/fesm2020/testing.mjs +1 -1
- package/index.d.ts +2 -2
- package/package.json +2 -2
- package/testing/index.d.ts +1 -1
package/fesm2015/testing.mjs
CHANGED
package/fesm2020/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.1.0
|
|
2
|
+
* @license Angular v14.1.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -2600,7 +2600,7 @@ class ConstantPool {
|
|
|
2600
2600
|
}
|
|
2601
2601
|
else {
|
|
2602
2602
|
// Just declare and use the variable directly, without a function call
|
|
2603
|
-
// indirection. This saves a few bytes and avoids an
|
|
2603
|
+
// indirection. This saves a few bytes and avoids an unnecessary call.
|
|
2604
2604
|
definition = variable(name).set(literal);
|
|
2605
2605
|
usage = variable(name);
|
|
2606
2606
|
}
|
|
@@ -4973,7 +4973,6 @@ function conditionallyCreateMapObjectLiteral(keys, keepDeclared) {
|
|
|
4973
4973
|
function mapToExpression(map, keepDeclared) {
|
|
4974
4974
|
return literalMap(Object.getOwnPropertyNames(map).map(key => {
|
|
4975
4975
|
// canonical syntax: `dirProp: publicProp`
|
|
4976
|
-
// if there is no `:`, use dirProp = elProp
|
|
4977
4976
|
const value = map[key];
|
|
4978
4977
|
let declaredName;
|
|
4979
4978
|
let publicName;
|
|
@@ -4985,12 +4984,9 @@ function mapToExpression(map, keepDeclared) {
|
|
|
4985
4984
|
needsDeclaredName = publicName !== declaredName;
|
|
4986
4985
|
}
|
|
4987
4986
|
else {
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
// Otherwise the declared name should be omitted even if it is different from the public name,
|
|
4992
|
-
// as it may have already been minified.
|
|
4993
|
-
needsDeclaredName = publicName !== declaredName && key.includes(':');
|
|
4987
|
+
minifiedName = declaredName = key;
|
|
4988
|
+
publicName = value;
|
|
4989
|
+
needsDeclaredName = false;
|
|
4994
4990
|
}
|
|
4995
4991
|
return {
|
|
4996
4992
|
key: minifiedName,
|
|
@@ -16014,7 +16010,7 @@ function setupRegistry() {
|
|
|
16014
16010
|
*
|
|
16015
16011
|
* @param index Instruction index of i18nStart, which initiates this context
|
|
16016
16012
|
* @param ref Reference to a translation const that represents the content if thus context
|
|
16017
|
-
* @param level
|
|
16013
|
+
* @param level Nesting level defined for child contexts
|
|
16018
16014
|
* @param templateIndex Instruction index of a template which this context belongs to
|
|
16019
16015
|
* @param meta Meta information (id, meaning, description, etc) associated with this context
|
|
16020
16016
|
*/
|
|
@@ -16129,7 +16125,7 @@ class I18nContext {
|
|
|
16129
16125
|
const isTemplateTag = key.endsWith('NG-TEMPLATE');
|
|
16130
16126
|
if (isTemplateTag) {
|
|
16131
16127
|
// current template's content is placed before or after
|
|
16132
|
-
// parent template tag, depending on the open/close
|
|
16128
|
+
// parent template tag, depending on the open/close attribute
|
|
16133
16129
|
phs.splice(tmplIdx + (isCloseTag ? 0 : 1), 0, ...values);
|
|
16134
16130
|
}
|
|
16135
16131
|
else {
|
|
@@ -16824,7 +16820,7 @@ const GOOG_GET_MSG = 'goog.getMsg';
|
|
|
16824
16820
|
* original_code: {
|
|
16825
16821
|
* 'interpolation': '{{ sender }}',
|
|
16826
16822
|
* 'startTagSpan': '<span class="receiver">',
|
|
16827
|
-
* '
|
|
16823
|
+
* 'interpolation_1': '{{ receiver }}',
|
|
16828
16824
|
* 'closeTagSpan': '</span>',
|
|
16829
16825
|
* },
|
|
16830
16826
|
* },
|
|
@@ -19857,10 +19853,10 @@ function isOutput(value) {
|
|
|
19857
19853
|
return value.ngMetadataName === 'Output';
|
|
19858
19854
|
}
|
|
19859
19855
|
function parseInputOutputs(values) {
|
|
19860
|
-
return values.reduce((
|
|
19861
|
-
const [field, property] = value.split(',
|
|
19862
|
-
|
|
19863
|
-
return
|
|
19856
|
+
return values.reduce((results, value) => {
|
|
19857
|
+
const [field, property] = value.split(':', 2).map(str => str.trim());
|
|
19858
|
+
results[field] = property || field;
|
|
19859
|
+
return results;
|
|
19864
19860
|
}, {});
|
|
19865
19861
|
}
|
|
19866
19862
|
function convertDeclarePipeFacadeToMetadata(declaration) {
|
|
@@ -19900,7 +19896,7 @@ function publishFacade(global) {
|
|
|
19900
19896
|
* Use of this source code is governed by an MIT-style license that can be
|
|
19901
19897
|
* found in the LICENSE file at https://angular.io/license
|
|
19902
19898
|
*/
|
|
19903
|
-
const VERSION = new Version('14.1.0
|
|
19899
|
+
const VERSION = new Version('14.1.0');
|
|
19904
19900
|
|
|
19905
19901
|
/**
|
|
19906
19902
|
* @license
|
|
@@ -21933,7 +21929,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
|
|
|
21933
21929
|
function compileDeclareClassMetadata(metadata) {
|
|
21934
21930
|
const definitionMap = new DefinitionMap();
|
|
21935
21931
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
21936
|
-
definitionMap.set('version', literal('14.1.0
|
|
21932
|
+
definitionMap.set('version', literal('14.1.0'));
|
|
21937
21933
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
21938
21934
|
definitionMap.set('type', metadata.type);
|
|
21939
21935
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -22050,7 +22046,7 @@ function compileDeclareDirectiveFromMetadata(meta) {
|
|
|
22050
22046
|
function createDirectiveDefinitionMap(meta) {
|
|
22051
22047
|
const definitionMap = new DefinitionMap();
|
|
22052
22048
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
22053
|
-
definitionMap.set('version', literal('14.1.0
|
|
22049
|
+
definitionMap.set('version', literal('14.1.0'));
|
|
22054
22050
|
// e.g. `type: MyDirective`
|
|
22055
22051
|
definitionMap.set('type', meta.internalType);
|
|
22056
22052
|
if (meta.isStandalone) {
|
|
@@ -22264,7 +22260,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
22264
22260
|
function compileDeclareFactoryFunction(meta) {
|
|
22265
22261
|
const definitionMap = new DefinitionMap();
|
|
22266
22262
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
22267
|
-
definitionMap.set('version', literal('14.1.0
|
|
22263
|
+
definitionMap.set('version', literal('14.1.0'));
|
|
22268
22264
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22269
22265
|
definitionMap.set('type', meta.internalType);
|
|
22270
22266
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -22306,7 +22302,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
22306
22302
|
function createInjectableDefinitionMap(meta) {
|
|
22307
22303
|
const definitionMap = new DefinitionMap();
|
|
22308
22304
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
22309
|
-
definitionMap.set('version', literal('14.1.0
|
|
22305
|
+
definitionMap.set('version', literal('14.1.0'));
|
|
22310
22306
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22311
22307
|
definitionMap.set('type', meta.internalType);
|
|
22312
22308
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -22364,7 +22360,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
22364
22360
|
function createInjectorDefinitionMap(meta) {
|
|
22365
22361
|
const definitionMap = new DefinitionMap();
|
|
22366
22362
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
22367
|
-
definitionMap.set('version', literal('14.1.0
|
|
22363
|
+
definitionMap.set('version', literal('14.1.0'));
|
|
22368
22364
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22369
22365
|
definitionMap.set('type', meta.internalType);
|
|
22370
22366
|
definitionMap.set('providers', meta.providers);
|
|
@@ -22401,7 +22397,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
|
|
|
22401
22397
|
function createNgModuleDefinitionMap(meta) {
|
|
22402
22398
|
const definitionMap = new DefinitionMap();
|
|
22403
22399
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
22404
|
-
definitionMap.set('version', literal('14.1.0
|
|
22400
|
+
definitionMap.set('version', literal('14.1.0'));
|
|
22405
22401
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22406
22402
|
definitionMap.set('type', meta.internalType);
|
|
22407
22403
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -22459,7 +22455,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
22459
22455
|
function createPipeDefinitionMap(meta) {
|
|
22460
22456
|
const definitionMap = new DefinitionMap();
|
|
22461
22457
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
22462
|
-
definitionMap.set('version', literal('14.1.0
|
|
22458
|
+
definitionMap.set('version', literal('14.1.0'));
|
|
22463
22459
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22464
22460
|
// e.g. `type: MyPipe`
|
|
22465
22461
|
definitionMap.set('type', meta.internalType);
|