@angular/compiler 16.0.0-next.3 → 16.0.0-next.4
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_facade_interface.mjs +1 -1
- package/esm2020/src/core.mjs +1 -1
- package/esm2020/src/jit_compiler_facade.mjs +12 -12
- 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/api.mjs +1 -1
- package/esm2020/src/render3/view/compiler.mjs +10 -3
- package/esm2020/src/version.mjs +1 -1
- package/fesm2015/compiler.mjs +29 -22
- package/fesm2015/compiler.mjs.map +1 -1
- package/fesm2015/testing.mjs +1 -1
- package/fesm2020/compiler.mjs +29 -22
- package/fesm2020/compiler.mjs.map +1 -1
- package/fesm2020/testing.mjs +1 -1
- package/index.d.ts +5 -3
- 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 v16.0.0-next.
|
|
2
|
+
* @license Angular v16.0.0-next.4
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -18945,9 +18945,16 @@ function createBaseDirectiveTypeParams(meta) {
|
|
|
18945
18945
|
];
|
|
18946
18946
|
}
|
|
18947
18947
|
function getInputsTypeExpression(meta) {
|
|
18948
|
-
// TODO(required-inputs): expand this to generate the new object literal syntax.
|
|
18949
18948
|
return literalMap(Object.keys(meta.inputs).map(key => {
|
|
18950
|
-
|
|
18949
|
+
const value = meta.inputs[key];
|
|
18950
|
+
return {
|
|
18951
|
+
key,
|
|
18952
|
+
value: literalMap([
|
|
18953
|
+
{ key: 'alias', value: literal(value.bindingPropertyName), quoted: true },
|
|
18954
|
+
{ key: 'required', value: literal(value.required), quoted: true }
|
|
18955
|
+
]),
|
|
18956
|
+
quoted: true
|
|
18957
|
+
};
|
|
18951
18958
|
}));
|
|
18952
18959
|
}
|
|
18953
18960
|
/**
|
|
@@ -19584,14 +19591,14 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
19584
19591
|
if (propMetadata.hasOwnProperty(field)) {
|
|
19585
19592
|
propMetadata[field].forEach(ann => {
|
|
19586
19593
|
if (isInput(ann)) {
|
|
19587
|
-
// TODO(required-inputs): pass required flag
|
|
19588
19594
|
inputsFromType[field] = {
|
|
19589
|
-
bindingPropertyName: ann.
|
|
19590
|
-
classPropertyName: field
|
|
19595
|
+
bindingPropertyName: ann.alias || field,
|
|
19596
|
+
classPropertyName: field,
|
|
19597
|
+
required: ann.required || false
|
|
19591
19598
|
};
|
|
19592
19599
|
}
|
|
19593
19600
|
else if (isOutput(ann)) {
|
|
19594
|
-
outputsFromType[field] = ann.
|
|
19601
|
+
outputsFromType[field] = ann.alias || field;
|
|
19595
19602
|
}
|
|
19596
19603
|
});
|
|
19597
19604
|
}
|
|
@@ -19858,8 +19865,8 @@ function inputsMappingToInputMetadata(inputs) {
|
|
|
19858
19865
|
return Object.keys(inputs).reduce((result, key) => {
|
|
19859
19866
|
const value = inputs[key];
|
|
19860
19867
|
result[key] = typeof value === 'string' ?
|
|
19861
|
-
{ bindingPropertyName: value, classPropertyName: value } :
|
|
19862
|
-
{ bindingPropertyName: value[0], classPropertyName: value[1] };
|
|
19868
|
+
{ bindingPropertyName: value, classPropertyName: value, required: false } :
|
|
19869
|
+
{ bindingPropertyName: value[0], classPropertyName: value[1], required: false };
|
|
19863
19870
|
return result;
|
|
19864
19871
|
}, {});
|
|
19865
19872
|
}
|
|
@@ -19867,13 +19874,13 @@ function parseInputsArray(values) {
|
|
|
19867
19874
|
return values.reduce((results, value) => {
|
|
19868
19875
|
if (typeof value === 'string') {
|
|
19869
19876
|
const [bindingPropertyName, classPropertyName] = parseMappingString(value);
|
|
19870
|
-
results[classPropertyName] = { bindingPropertyName, classPropertyName };
|
|
19877
|
+
results[classPropertyName] = { bindingPropertyName, classPropertyName, required: false };
|
|
19871
19878
|
}
|
|
19872
19879
|
else {
|
|
19873
|
-
// TODO(required-inputs): pass required flag
|
|
19874
19880
|
results[value.name] = {
|
|
19875
19881
|
bindingPropertyName: value.alias || value.name,
|
|
19876
|
-
classPropertyName: value.name
|
|
19882
|
+
classPropertyName: value.name,
|
|
19883
|
+
required: value.required || false
|
|
19877
19884
|
};
|
|
19878
19885
|
}
|
|
19879
19886
|
return results;
|
|
@@ -19881,8 +19888,8 @@ function parseInputsArray(values) {
|
|
|
19881
19888
|
}
|
|
19882
19889
|
function parseMappingStringArray(values) {
|
|
19883
19890
|
return values.reduce((results, value) => {
|
|
19884
|
-
const [
|
|
19885
|
-
results[fieldName] =
|
|
19891
|
+
const [alias, fieldName] = parseMappingString(value);
|
|
19892
|
+
results[fieldName] = alias;
|
|
19886
19893
|
return results;
|
|
19887
19894
|
}, {});
|
|
19888
19895
|
}
|
|
@@ -19927,7 +19934,7 @@ function publishFacade(global) {
|
|
|
19927
19934
|
* @description
|
|
19928
19935
|
* Entry point for all public APIs of the compiler package.
|
|
19929
19936
|
*/
|
|
19930
|
-
const VERSION = new Version('16.0.0-next.
|
|
19937
|
+
const VERSION = new Version('16.0.0-next.4');
|
|
19931
19938
|
|
|
19932
19939
|
class CompilerConfig {
|
|
19933
19940
|
constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, useJit = true, missingTranslation = null, preserveWhitespaces, strictInjectionParameters } = {}) {
|
|
@@ -21851,7 +21858,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
|
|
|
21851
21858
|
function compileDeclareClassMetadata(metadata) {
|
|
21852
21859
|
const definitionMap = new DefinitionMap();
|
|
21853
21860
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
21854
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
21861
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
21855
21862
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
21856
21863
|
definitionMap.set('type', metadata.type);
|
|
21857
21864
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -21954,7 +21961,7 @@ function compileDeclareDirectiveFromMetadata(meta) {
|
|
|
21954
21961
|
function createDirectiveDefinitionMap(meta) {
|
|
21955
21962
|
const definitionMap = new DefinitionMap();
|
|
21956
21963
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
21957
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
21964
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
21958
21965
|
// e.g. `type: MyDirective`
|
|
21959
21966
|
definitionMap.set('type', meta.internalType);
|
|
21960
21967
|
if (meta.isStandalone) {
|
|
@@ -22179,7 +22186,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
22179
22186
|
function compileDeclareFactoryFunction(meta) {
|
|
22180
22187
|
const definitionMap = new DefinitionMap();
|
|
22181
22188
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
22182
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
22189
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
22183
22190
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22184
22191
|
definitionMap.set('type', meta.internalType);
|
|
22185
22192
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -22214,7 +22221,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
22214
22221
|
function createInjectableDefinitionMap(meta) {
|
|
22215
22222
|
const definitionMap = new DefinitionMap();
|
|
22216
22223
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
22217
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
22224
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
22218
22225
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22219
22226
|
definitionMap.set('type', meta.internalType);
|
|
22220
22227
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -22265,7 +22272,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
22265
22272
|
function createInjectorDefinitionMap(meta) {
|
|
22266
22273
|
const definitionMap = new DefinitionMap();
|
|
22267
22274
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
22268
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
22275
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
22269
22276
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22270
22277
|
definitionMap.set('type', meta.internalType);
|
|
22271
22278
|
definitionMap.set('providers', meta.providers);
|
|
@@ -22295,7 +22302,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
|
|
|
22295
22302
|
function createNgModuleDefinitionMap(meta) {
|
|
22296
22303
|
const definitionMap = new DefinitionMap();
|
|
22297
22304
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
22298
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
22305
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
22299
22306
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22300
22307
|
definitionMap.set('type', meta.internalType);
|
|
22301
22308
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -22346,7 +22353,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
22346
22353
|
function createPipeDefinitionMap(meta) {
|
|
22347
22354
|
const definitionMap = new DefinitionMap();
|
|
22348
22355
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
22349
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
22356
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
22350
22357
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22351
22358
|
// e.g. `type: MyPipe`
|
|
22352
22359
|
definitionMap.set('type', meta.internalType);
|