@angular/core 18.0.0-rc.2 → 18.0.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/esm2022/primitives/event-dispatch/src/action_resolver.mjs +5 -1
- package/esm2022/primitives/event-dispatch/src/attribute.mjs +4 -15
- package/esm2022/primitives/event-dispatch/src/cache.mjs +2 -35
- package/esm2022/primitives/event-dispatch/src/dispatcher.mjs +15 -28
- package/esm2022/primitives/event-dispatch/src/event_info.mjs +16 -1
- package/esm2022/primitives/event-dispatch/src/property.mjs +1 -7
- package/esm2022/src/change_detection/scheduling/exhaustive_check_no_changes.mjs +5 -5
- package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +8 -2
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/hydration/event_replay.mjs +11 -6
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/instructions/change_detection.mjs +17 -6
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/event-dispatch-contract.min.js +1 -1
- package/fesm2022/core.mjs +38 -16
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +38 -82
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/index.d.ts +4 -3
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +16 -4
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +5 -1
- package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +3 -3
- package/schematics/ng-generate/control-flow-migration/bundle.js +5 -1
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
- package/schematics/ng-generate/standalone-migration/bundle.js +38 -19
- package/schematics/ng-generate/standalone-migration/bundle.js.map +3 -3
- package/testing/index.d.ts +1 -1
- package/esm2022/primitives/event-dispatch/src/legacy_dispatcher.mjs +0 -259
|
@@ -8372,6 +8372,7 @@ function createFactoryFunction(type) {
|
|
|
8372
8372
|
|
|
8373
8373
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/assertions.mjs
|
|
8374
8374
|
var UNUSABLE_INTERPOLATION_REGEXPS = [
|
|
8375
|
+
/@/,
|
|
8375
8376
|
/^\s*$/,
|
|
8376
8377
|
/[<>]/,
|
|
8377
8378
|
/^[{}]$/,
|
|
@@ -24386,6 +24387,9 @@ var HtmlAstToIvyAst = class {
|
|
|
24386
24387
|
const relatedBlocks = [];
|
|
24387
24388
|
for (let i = primaryBlockIndex + 1; i < siblings.length; i++) {
|
|
24388
24389
|
const node = siblings[i];
|
|
24390
|
+
if (node instanceof Comment2) {
|
|
24391
|
+
continue;
|
|
24392
|
+
}
|
|
24389
24393
|
if (node instanceof Text4 && node.value.trim().length === 0) {
|
|
24390
24394
|
this.processedNodes.add(node);
|
|
24391
24395
|
continue;
|
|
@@ -26286,7 +26290,7 @@ function publishFacade(global) {
|
|
|
26286
26290
|
}
|
|
26287
26291
|
|
|
26288
26292
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
26289
|
-
var VERSION2 = new Version("18.0.0
|
|
26293
|
+
var VERSION2 = new Version("18.0.0");
|
|
26290
26294
|
|
|
26291
26295
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
26292
26296
|
var _I18N_ATTR = "i18n";
|
|
@@ -27380,7 +27384,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
|
|
|
27380
27384
|
function compileDeclareClassMetadata(metadata) {
|
|
27381
27385
|
const definitionMap = new DefinitionMap();
|
|
27382
27386
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
27383
|
-
definitionMap.set("version", literal("18.0.0
|
|
27387
|
+
definitionMap.set("version", literal("18.0.0"));
|
|
27384
27388
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27385
27389
|
definitionMap.set("type", metadata.type);
|
|
27386
27390
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -27399,7 +27403,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
27399
27403
|
callbackReturnDefinitionMap.set("ctorParameters", (_a2 = metadata.ctorParameters) != null ? _a2 : literal(null));
|
|
27400
27404
|
callbackReturnDefinitionMap.set("propDecorators", (_b2 = metadata.propDecorators) != null ? _b2 : literal(null));
|
|
27401
27405
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
27402
|
-
definitionMap.set("version", literal("18.0.0
|
|
27406
|
+
definitionMap.set("version", literal("18.0.0"));
|
|
27403
27407
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27404
27408
|
definitionMap.set("type", metadata.type);
|
|
27405
27409
|
definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -27467,7 +27471,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
27467
27471
|
const definitionMap = new DefinitionMap();
|
|
27468
27472
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
27469
27473
|
definitionMap.set("minVersion", literal(minVersion));
|
|
27470
|
-
definitionMap.set("version", literal("18.0.0
|
|
27474
|
+
definitionMap.set("version", literal("18.0.0"));
|
|
27471
27475
|
definitionMap.set("type", meta.type.value);
|
|
27472
27476
|
if (meta.isStandalone) {
|
|
27473
27477
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -27785,7 +27789,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION2 = "12.0.0";
|
|
|
27785
27789
|
function compileDeclareFactoryFunction(meta) {
|
|
27786
27790
|
const definitionMap = new DefinitionMap();
|
|
27787
27791
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION2));
|
|
27788
|
-
definitionMap.set("version", literal("18.0.0
|
|
27792
|
+
definitionMap.set("version", literal("18.0.0"));
|
|
27789
27793
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27790
27794
|
definitionMap.set("type", meta.type.value);
|
|
27791
27795
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -27808,7 +27812,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
27808
27812
|
function createInjectableDefinitionMap(meta) {
|
|
27809
27813
|
const definitionMap = new DefinitionMap();
|
|
27810
27814
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION3));
|
|
27811
|
-
definitionMap.set("version", literal("18.0.0
|
|
27815
|
+
definitionMap.set("version", literal("18.0.0"));
|
|
27812
27816
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27813
27817
|
definitionMap.set("type", meta.type.value);
|
|
27814
27818
|
if (meta.providedIn !== void 0) {
|
|
@@ -27846,7 +27850,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
27846
27850
|
function createInjectorDefinitionMap(meta) {
|
|
27847
27851
|
const definitionMap = new DefinitionMap();
|
|
27848
27852
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION4));
|
|
27849
|
-
definitionMap.set("version", literal("18.0.0
|
|
27853
|
+
definitionMap.set("version", literal("18.0.0"));
|
|
27850
27854
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27851
27855
|
definitionMap.set("type", meta.type.value);
|
|
27852
27856
|
definitionMap.set("providers", meta.providers);
|
|
@@ -27870,7 +27874,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
27870
27874
|
throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
|
|
27871
27875
|
}
|
|
27872
27876
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION5));
|
|
27873
|
-
definitionMap.set("version", literal("18.0.0
|
|
27877
|
+
definitionMap.set("version", literal("18.0.0"));
|
|
27874
27878
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27875
27879
|
definitionMap.set("type", meta.type.value);
|
|
27876
27880
|
if (meta.bootstrap.length > 0) {
|
|
@@ -27905,7 +27909,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
27905
27909
|
function createPipeDefinitionMap(meta) {
|
|
27906
27910
|
const definitionMap = new DefinitionMap();
|
|
27907
27911
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION6));
|
|
27908
|
-
definitionMap.set("version", literal("18.0.0
|
|
27912
|
+
definitionMap.set("version", literal("18.0.0"));
|
|
27909
27913
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27910
27914
|
definitionMap.set("type", meta.type.value);
|
|
27911
27915
|
if (meta.isStandalone) {
|
|
@@ -27922,7 +27926,7 @@ function createPipeDefinitionMap(meta) {
|
|
|
27922
27926
|
publishFacade(_global);
|
|
27923
27927
|
|
|
27924
27928
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/version.mjs
|
|
27925
|
-
var VERSION3 = new Version("18.0.0
|
|
27929
|
+
var VERSION3 = new Version("18.0.0");
|
|
27926
27930
|
|
|
27927
27931
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/emitter.mjs
|
|
27928
27932
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
@@ -45386,7 +45390,10 @@ var TcbIfOp = class extends TcbOp {
|
|
|
45386
45390
|
const expressionScope = Scope3.forNodes(this.tcb, this.scope, branch, [], null);
|
|
45387
45391
|
expressionScope.render().forEach((stmt) => this.scope.addStatement(stmt));
|
|
45388
45392
|
this.expressionScopes.set(branch, expressionScope);
|
|
45389
|
-
|
|
45393
|
+
let expression = tcbExpression(branch.expression, this.tcb, expressionScope);
|
|
45394
|
+
if (branch.expressionAlias !== null) {
|
|
45395
|
+
expression = import_typescript107.default.factory.createBinaryExpression(import_typescript107.default.factory.createParenthesizedExpression(expression), import_typescript107.default.SyntaxKind.AmpersandAmpersandToken, expressionScope.resolve(branch.expressionAlias));
|
|
45396
|
+
}
|
|
45390
45397
|
const bodyScope = this.getBranchScope(expressionScope, branch, index);
|
|
45391
45398
|
return import_typescript107.default.factory.createIfStatement(expression, import_typescript107.default.factory.createBlock(bodyScope.render()), this.generateBranch(index + 1));
|
|
45392
45399
|
}
|
|
@@ -45406,12 +45413,11 @@ var TcbIfOp = class extends TcbOp {
|
|
|
45406
45413
|
}
|
|
45407
45414
|
const expressionScope = this.expressionScopes.get(branch);
|
|
45408
45415
|
let expression;
|
|
45409
|
-
|
|
45410
|
-
|
|
45411
|
-
|
|
45412
|
-
} else {
|
|
45413
|
-
expression = expressionScope.resolve(branch.expressionAlias);
|
|
45416
|
+
expression = tcbExpression(branch.expression, this.tcb, expressionScope);
|
|
45417
|
+
if (branch.expressionAlias !== null) {
|
|
45418
|
+
expression = import_typescript107.default.factory.createBinaryExpression(import_typescript107.default.factory.createParenthesizedExpression(expression), import_typescript107.default.SyntaxKind.AmpersandAmpersandToken, expressionScope.resolve(branch.expressionAlias));
|
|
45414
45419
|
}
|
|
45420
|
+
markIgnoreDiagnostics(expression);
|
|
45415
45421
|
const comparisonExpression = i === index ? expression : import_typescript107.default.factory.createPrefixUnaryExpression(import_typescript107.default.SyntaxKind.ExclamationToken, import_typescript107.default.factory.createParenthesizedExpression(expression));
|
|
45416
45422
|
guard = guard === null ? comparisonExpression : import_typescript107.default.factory.createBinaryExpression(guard, import_typescript107.default.SyntaxKind.AmpersandAmpersandToken, comparisonExpression);
|
|
45417
45423
|
}
|
|
@@ -46763,7 +46769,6 @@ var SymbolBuilder = class {
|
|
|
46763
46769
|
return { kind: SymbolKind.Output, bindings };
|
|
46764
46770
|
}
|
|
46765
46771
|
getSymbolOfInputBinding(binding) {
|
|
46766
|
-
var _a2;
|
|
46767
46772
|
const consumer = this.templateData.boundTarget.getConsumerOfBinding(binding);
|
|
46768
46773
|
if (consumer === null) {
|
|
46769
46774
|
return null;
|
|
@@ -46782,22 +46787,28 @@ var SymbolBuilder = class {
|
|
|
46782
46787
|
continue;
|
|
46783
46788
|
}
|
|
46784
46789
|
const signalInputAssignment = unwrapSignalInputWriteTAccessor(node.left);
|
|
46790
|
+
let fieldAccessExpr;
|
|
46785
46791
|
let symbolInfo = null;
|
|
46786
46792
|
if (signalInputAssignment !== null) {
|
|
46793
|
+
if (import_typescript110.default.isIdentifier(signalInputAssignment.fieldExpr)) {
|
|
46794
|
+
continue;
|
|
46795
|
+
}
|
|
46787
46796
|
const fieldSymbol = this.getSymbolOfTsNode(signalInputAssignment.fieldExpr);
|
|
46788
46797
|
const typeSymbol = this.getSymbolOfTsNode(signalInputAssignment.typeExpr);
|
|
46798
|
+
fieldAccessExpr = signalInputAssignment.fieldExpr;
|
|
46789
46799
|
symbolInfo = fieldSymbol === null || typeSymbol === null ? null : {
|
|
46790
46800
|
tcbLocation: fieldSymbol.tcbLocation,
|
|
46791
46801
|
tsSymbol: fieldSymbol.tsSymbol,
|
|
46792
46802
|
tsType: typeSymbol.tsType
|
|
46793
46803
|
};
|
|
46794
46804
|
} else {
|
|
46805
|
+
fieldAccessExpr = node.left;
|
|
46795
46806
|
symbolInfo = this.getSymbolOfTsNode(node.left);
|
|
46796
46807
|
}
|
|
46797
46808
|
if (symbolInfo === null || symbolInfo.tsSymbol === null) {
|
|
46798
46809
|
continue;
|
|
46799
46810
|
}
|
|
46800
|
-
const target = this.getDirectiveSymbolForAccessExpression(
|
|
46811
|
+
const target = this.getDirectiveSymbolForAccessExpression(fieldAccessExpr, consumer);
|
|
46801
46812
|
if (target === null) {
|
|
46802
46813
|
continue;
|
|
46803
46814
|
}
|
|
@@ -47044,7 +47055,7 @@ function unwrapSignalInputWriteTAccessor(expr) {
|
|
|
47044
47055
|
if (!import_typescript110.default.isIdentifier(expr.argumentExpression.name) || expr.argumentExpression.name.text !== Identifiers.InputSignalBrandWriteType.name) {
|
|
47045
47056
|
return null;
|
|
47046
47057
|
}
|
|
47047
|
-
if (!import_typescript110.default.isPropertyAccessExpression(expr.expression) && !import_typescript110.default.isElementAccessExpression(expr.expression)) {
|
|
47058
|
+
if (!import_typescript110.default.isPropertyAccessExpression(expr.expression) && !import_typescript110.default.isElementAccessExpression(expr.expression) && !import_typescript110.default.isIdentifier(expr.expression)) {
|
|
47048
47059
|
throw new Error("Unexpected expression for signal input write type.");
|
|
47049
47060
|
}
|
|
47050
47061
|
return {
|
|
@@ -47908,6 +47919,14 @@ var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
|
|
|
47908
47919
|
visitNode(ctx, component, node) {
|
|
47909
47920
|
if (node instanceof Interpolation) {
|
|
47910
47921
|
return node.expressions.filter((item) => item instanceof PropertyRead).flatMap((item) => buildDiagnosticForSignal(ctx, item, component));
|
|
47922
|
+
} else if (node instanceof BoundAttribute) {
|
|
47923
|
+
const symbol = ctx.templateTypeChecker.getSymbolOfNode(node, component);
|
|
47924
|
+
if (symbol !== null && symbol.kind === SymbolKind.Input) {
|
|
47925
|
+
return [];
|
|
47926
|
+
}
|
|
47927
|
+
if (node.type === BindingType.Property && node.value instanceof ASTWithSource && node.value.ast instanceof PropertyRead) {
|
|
47928
|
+
return buildDiagnosticForSignal(ctx, node.value.ast, component);
|
|
47929
|
+
}
|
|
47911
47930
|
}
|
|
47912
47931
|
return [];
|
|
47913
47932
|
}
|