@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/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
|
/**
|
|
@@ -19567,14 +19574,14 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
19567
19574
|
if (propMetadata.hasOwnProperty(field)) {
|
|
19568
19575
|
propMetadata[field].forEach(ann => {
|
|
19569
19576
|
if (isInput(ann)) {
|
|
19570
|
-
// TODO(required-inputs): pass required flag
|
|
19571
19577
|
inputsFromType[field] = {
|
|
19572
|
-
bindingPropertyName: ann.
|
|
19573
|
-
classPropertyName: field
|
|
19578
|
+
bindingPropertyName: ann.alias || field,
|
|
19579
|
+
classPropertyName: field,
|
|
19580
|
+
required: ann.required || false
|
|
19574
19581
|
};
|
|
19575
19582
|
}
|
|
19576
19583
|
else if (isOutput(ann)) {
|
|
19577
|
-
outputsFromType[field] = ann.
|
|
19584
|
+
outputsFromType[field] = ann.alias || field;
|
|
19578
19585
|
}
|
|
19579
19586
|
});
|
|
19580
19587
|
}
|
|
@@ -19816,8 +19823,8 @@ function inputsMappingToInputMetadata(inputs) {
|
|
|
19816
19823
|
return Object.keys(inputs).reduce((result, key) => {
|
|
19817
19824
|
const value = inputs[key];
|
|
19818
19825
|
result[key] = typeof value === 'string' ?
|
|
19819
|
-
{ bindingPropertyName: value, classPropertyName: value } :
|
|
19820
|
-
{ bindingPropertyName: value[0], classPropertyName: value[1] };
|
|
19826
|
+
{ bindingPropertyName: value, classPropertyName: value, required: false } :
|
|
19827
|
+
{ bindingPropertyName: value[0], classPropertyName: value[1], required: false };
|
|
19821
19828
|
return result;
|
|
19822
19829
|
}, {});
|
|
19823
19830
|
}
|
|
@@ -19825,13 +19832,13 @@ function parseInputsArray(values) {
|
|
|
19825
19832
|
return values.reduce((results, value) => {
|
|
19826
19833
|
if (typeof value === 'string') {
|
|
19827
19834
|
const [bindingPropertyName, classPropertyName] = parseMappingString(value);
|
|
19828
|
-
results[classPropertyName] = { bindingPropertyName, classPropertyName };
|
|
19835
|
+
results[classPropertyName] = { bindingPropertyName, classPropertyName, required: false };
|
|
19829
19836
|
}
|
|
19830
19837
|
else {
|
|
19831
|
-
// TODO(required-inputs): pass required flag
|
|
19832
19838
|
results[value.name] = {
|
|
19833
19839
|
bindingPropertyName: value.alias || value.name,
|
|
19834
|
-
classPropertyName: value.name
|
|
19840
|
+
classPropertyName: value.name,
|
|
19841
|
+
required: value.required || false
|
|
19835
19842
|
};
|
|
19836
19843
|
}
|
|
19837
19844
|
return results;
|
|
@@ -19839,8 +19846,8 @@ function parseInputsArray(values) {
|
|
|
19839
19846
|
}
|
|
19840
19847
|
function parseMappingStringArray(values) {
|
|
19841
19848
|
return values.reduce((results, value) => {
|
|
19842
|
-
const [
|
|
19843
|
-
results[fieldName] =
|
|
19849
|
+
const [alias, fieldName] = parseMappingString(value);
|
|
19850
|
+
results[fieldName] = alias;
|
|
19844
19851
|
return results;
|
|
19845
19852
|
}, {});
|
|
19846
19853
|
}
|
|
@@ -19886,7 +19893,7 @@ function publishFacade(global) {
|
|
|
19886
19893
|
* @description
|
|
19887
19894
|
* Entry point for all public APIs of the compiler package.
|
|
19888
19895
|
*/
|
|
19889
|
-
const VERSION = new Version('16.0.0-next.
|
|
19896
|
+
const VERSION = new Version('16.0.0-next.4');
|
|
19890
19897
|
|
|
19891
19898
|
class CompilerConfig {
|
|
19892
19899
|
constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, useJit = true, missingTranslation = null, preserveWhitespaces, strictInjectionParameters } = {}) {
|
|
@@ -21812,7 +21819,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
|
|
|
21812
21819
|
function compileDeclareClassMetadata(metadata) {
|
|
21813
21820
|
const definitionMap = new DefinitionMap();
|
|
21814
21821
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
21815
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
21822
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
21816
21823
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
21817
21824
|
definitionMap.set('type', metadata.type);
|
|
21818
21825
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -21916,7 +21923,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
21916
21923
|
var _a;
|
|
21917
21924
|
const definitionMap = new DefinitionMap();
|
|
21918
21925
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
21919
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
21926
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
21920
21927
|
// e.g. `type: MyDirective`
|
|
21921
21928
|
definitionMap.set('type', meta.internalType);
|
|
21922
21929
|
if (meta.isStandalone) {
|
|
@@ -22141,7 +22148,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
22141
22148
|
function compileDeclareFactoryFunction(meta) {
|
|
22142
22149
|
const definitionMap = new DefinitionMap();
|
|
22143
22150
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
22144
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
22151
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
22145
22152
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22146
22153
|
definitionMap.set('type', meta.internalType);
|
|
22147
22154
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -22176,7 +22183,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
22176
22183
|
function createInjectableDefinitionMap(meta) {
|
|
22177
22184
|
const definitionMap = new DefinitionMap();
|
|
22178
22185
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
22179
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
22186
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
22180
22187
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22181
22188
|
definitionMap.set('type', meta.internalType);
|
|
22182
22189
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -22227,7 +22234,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
22227
22234
|
function createInjectorDefinitionMap(meta) {
|
|
22228
22235
|
const definitionMap = new DefinitionMap();
|
|
22229
22236
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
22230
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
22237
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
22231
22238
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22232
22239
|
definitionMap.set('type', meta.internalType);
|
|
22233
22240
|
definitionMap.set('providers', meta.providers);
|
|
@@ -22257,7 +22264,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
|
|
|
22257
22264
|
function createNgModuleDefinitionMap(meta) {
|
|
22258
22265
|
const definitionMap = new DefinitionMap();
|
|
22259
22266
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
22260
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
22267
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
22261
22268
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22262
22269
|
definitionMap.set('type', meta.internalType);
|
|
22263
22270
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -22308,7 +22315,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
22308
22315
|
function createPipeDefinitionMap(meta) {
|
|
22309
22316
|
const definitionMap = new DefinitionMap();
|
|
22310
22317
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
22311
|
-
definitionMap.set('version', literal('16.0.0-next.
|
|
22318
|
+
definitionMap.set('version', literal('16.0.0-next.4'));
|
|
22312
22319
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22313
22320
|
// e.g. `type: MyPipe`
|
|
22314
22321
|
definitionMap.set('type', meta.internalType);
|