@angular/core 17.2.3 → 17.2.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.
Files changed (38) hide show
  1. package/esm2022/rxjs-interop/src/to_observable.mjs +1 -1
  2. package/esm2022/src/application/application_ref.mjs +4 -2
  3. package/esm2022/src/authoring/input/input_type_checking.mjs +1 -1
  4. package/esm2022/src/authoring/model/model_signal.mjs +3 -2
  5. package/esm2022/src/di/interface/provider.mjs +1 -1
  6. package/esm2022/src/di/metadata.mjs +1 -1
  7. package/esm2022/src/di/r3_injector.mjs +26 -15
  8. package/esm2022/src/event_emitter.mjs +9 -2
  9. package/esm2022/src/render3/after_render_hooks.mjs +2 -2
  10. package/esm2022/src/render3/component_ref.mjs +103 -93
  11. package/esm2022/src/render3/instructions/listener.mjs +4 -1
  12. package/esm2022/src/render3/instructions/render.mjs +3 -2
  13. package/esm2022/src/render3/node_manipulation.mjs +13 -4
  14. package/esm2022/src/render3/reactivity/effect.mjs +11 -7
  15. package/esm2022/src/render3/reactivity/signal.mjs +2 -2
  16. package/esm2022/src/render3/view_manipulation.mjs +24 -17
  17. package/esm2022/src/util/assert.mjs +7 -1
  18. package/esm2022/src/version.mjs +1 -1
  19. package/esm2022/testing/src/logger.mjs +3 -3
  20. package/esm2022/testing/src/test_bed_compiler.mjs +26 -4
  21. package/fesm2022/core.mjs +11944 -11891
  22. package/fesm2022/core.mjs.map +1 -1
  23. package/fesm2022/primitives/signals.mjs +1 -1
  24. package/fesm2022/rxjs-interop.mjs +1 -1
  25. package/fesm2022/rxjs-interop.mjs.map +1 -1
  26. package/fesm2022/testing.mjs +26 -4
  27. package/fesm2022/testing.mjs.map +1 -1
  28. package/index.d.ts +16 -16
  29. package/package.json +1 -1
  30. package/primitives/signals/index.d.ts +1 -1
  31. package/rxjs-interop/index.d.ts +1 -1
  32. package/schematics/migrations/block-template-entities/bundle.js +18 -33
  33. package/schematics/migrations/block-template-entities/bundle.js.map +3 -3
  34. package/schematics/ng-generate/control-flow-migration/bundle.js +18 -33
  35. package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
  36. package/schematics/ng-generate/standalone-migration/bundle.js +29 -41
  37. package/schematics/ng-generate/standalone-migration/bundle.js.map +3 -3
  38. package/testing/index.d.ts +1 -1
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.2.3
2
+ * @license Angular v17.2.4
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1104,7 +1104,7 @@ declare interface ClassDebugInfo {
1104
1104
 
1105
1105
  /**
1106
1106
  * Configures the `Injector` to return an instance of `useClass` for a token.
1107
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
1107
+ * @see [Dependency Injection Guide](guide/dependency-injection).
1108
1108
  *
1109
1109
  * @usageNotes
1110
1110
  *
@@ -1136,7 +1136,7 @@ export declare interface ClassProvider extends ClassSansProvider {
1136
1136
  * Configures the `Injector` to return a value by invoking a `useClass` function.
1137
1137
  * Base for `ClassProvider` decorator.
1138
1138
  *
1139
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
1139
+ * @see [Dependency Injection Guide](guide/dependency-injection).
1140
1140
  *
1141
1141
  * @publicApi
1142
1142
  */
@@ -1817,7 +1817,7 @@ export declare function computed<T>(computation: () => T, options?: CreateComput
1817
1817
  /**
1818
1818
  * Configures the `Injector` to return an instance of a token.
1819
1819
  *
1820
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
1820
+ * @see [Dependency Injection Guide](guide/dependency-injection).
1821
1821
  *
1822
1822
  * @usageNotes
1823
1823
  *
@@ -1844,7 +1844,7 @@ export declare interface ConstructorProvider extends ConstructorSansProvider {
1844
1844
  /**
1845
1845
  * Configures the `Injector` to return an instance of a token.
1846
1846
  *
1847
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
1847
+ * @see [Dependency Injection Guide](guide/dependency-injection).
1848
1848
  *
1849
1849
  * @usageNotes
1850
1850
  *
@@ -3846,7 +3846,7 @@ export declare const EventEmitter: {
3846
3846
  /**
3847
3847
  * Configures the `Injector` to return a value of another `useExisting` token.
3848
3848
  *
3849
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
3849
+ * @see [Dependency Injection Guide](guide/dependency-injection).
3850
3850
  *
3851
3851
  * @usageNotes
3852
3852
  *
@@ -3874,7 +3874,7 @@ export declare interface ExistingProvider extends ExistingSansProvider {
3874
3874
  * Configures the `Injector` to return a value of another `useExisting` token.
3875
3875
  *
3876
3876
  * @see {@link ExistingProvider}
3877
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
3877
+ * @see [Dependency Injection Guide](guide/dependency-injection).
3878
3878
  *
3879
3879
  * @publicApi
3880
3880
  */
@@ -3902,7 +3902,7 @@ declare type FactoryFn<T> = {
3902
3902
 
3903
3903
  /**
3904
3904
  * Configures the `Injector` to return a value by invoking a `useFactory` function.
3905
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
3905
+ * @see [Dependency Injection Guide](guide/dependency-injection).
3906
3906
  *
3907
3907
  * @usageNotes
3908
3908
  *
@@ -3934,7 +3934,7 @@ export declare interface FactoryProvider extends FactorySansProvider {
3934
3934
  * Configures the `Injector` to return a value by invoking a `useFactory` function.
3935
3935
  *
3936
3936
  * @see {@link FactoryProvider}
3937
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
3937
+ * @see [Dependency Injection Guide](guide/dependency-injection).
3938
3938
  *
3939
3939
  * @publicApi
3940
3940
  */
@@ -5131,7 +5131,7 @@ export declare interface InjectDecorator {
5131
5131
  * <code-example path="core/di/ts/metadata_spec.ts" region="InjectWithoutDecorator">
5132
5132
  * </code-example>
5133
5133
  *
5134
- * @see ["Dependency Injection Guide"](guide/dependency-injection)
5134
+ * @see [Dependency Injection Guide](guide/dependency-injection)
5135
5135
  *
5136
5136
  */
5137
5137
  (token: any): any;
@@ -7483,7 +7483,7 @@ export declare interface OptionalDecorator {
7483
7483
  * <code-example path="core/di/ts/metadata_spec.ts" region="Optional">
7484
7484
  * </code-example>
7485
7485
  *
7486
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
7486
+ * @see [Dependency Injection Guide](guide/dependency-injection).
7487
7487
  */
7488
7488
  (): any;
7489
7489
  new (): Optional;
@@ -7805,7 +7805,7 @@ declare type ProjectionSlots = (ɵCssSelectorList | '*')[];
7805
7805
 
7806
7806
  /**
7807
7807
  * Describes how the `Injector` should be configured.
7808
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
7808
+ * @see [Dependency Injection Guide](guide/dependency-injection).
7809
7809
  *
7810
7810
  * @see {@link StaticProvider}
7811
7811
  *
@@ -9030,7 +9030,7 @@ export declare type StateKey<T> = string & {
9030
9030
 
9031
9031
  /**
9032
9032
  * Configures the `Injector` to return an instance of `useClass` for a token.
9033
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
9033
+ * @see [Dependency Injection Guide](guide/dependency-injection).
9034
9034
  *
9035
9035
  * @usageNotes
9036
9036
  *
@@ -9082,7 +9082,7 @@ export declare interface StaticClassSansProvider {
9082
9082
  * A static provider provides tokens to an injector for various types of dependencies.
9083
9083
  *
9084
9084
  * @see {@link Injector.create()}
9085
- * @see ["Dependency Injection Guide"](guide/dependency-injection-providers).
9085
+ * @see [Dependency Injection Guide](guide/dependency-injection-providers).
9086
9086
  *
9087
9087
  * @publicApi
9088
9088
  */
@@ -10779,7 +10779,7 @@ export declare type ValueEqualityFn<T> = (a: T, b: T) => boolean;
10779
10779
 
10780
10780
  /**
10781
10781
  * Configures the `Injector` to return a value for a token.
10782
- * @see ["Dependency Injection Guide"](guide/dependency-injection).
10782
+ * @see [Dependency Injection Guide](guide/dependency-injection).
10783
10783
  *
10784
10784
  * @usageNotes
10785
10785
  *
@@ -13375,7 +13375,7 @@ export declare type ɵUnwrapDirectiveSignalInputs<Dir, Fields extends keyof Dir>
13375
13375
  };
13376
13376
 
13377
13377
  /** Retrieves the `WriteT` of an `InputSignal` and `InputSignalWithTransform`. */
13378
- declare type ɵUnwrapInputSignalWriteType<Field> = Field extends InputSignalWithTransform<unknown, infer WriteT> ? WriteT : never;
13378
+ declare type ɵUnwrapInputSignalWriteType<Field> = Field extends InputSignalWithTransform<any, infer WriteT> ? WriteT : never;
13379
13379
 
13380
13380
  export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
13381
13381
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "17.2.3",
3
+ "version": "17.2.4",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.2.3
2
+ * @license Angular v17.2.4
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.2.3
2
+ * @license Angular v17.2.4
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -7227,13 +7227,10 @@ var ExpressionKind;
7227
7227
  ExpressionKind2[ExpressionKind2["EmptyExpr"] = 17] = "EmptyExpr";
7228
7228
  ExpressionKind2[ExpressionKind2["AssignTemporaryExpr"] = 18] = "AssignTemporaryExpr";
7229
7229
  ExpressionKind2[ExpressionKind2["ReadTemporaryExpr"] = 19] = "ReadTemporaryExpr";
7230
- ExpressionKind2[ExpressionKind2["SanitizerExpr"] = 20] = "SanitizerExpr";
7231
- ExpressionKind2[ExpressionKind2["TrustedValueFnExpr"] = 21] = "TrustedValueFnExpr";
7232
- ExpressionKind2[ExpressionKind2["SlotLiteralExpr"] = 22] = "SlotLiteralExpr";
7233
- ExpressionKind2[ExpressionKind2["ConditionalCase"] = 23] = "ConditionalCase";
7234
- ExpressionKind2[ExpressionKind2["DerivedRepeaterVar"] = 24] = "DerivedRepeaterVar";
7235
- ExpressionKind2[ExpressionKind2["ConstCollected"] = 25] = "ConstCollected";
7236
- ExpressionKind2[ExpressionKind2["TwoWayBindingSet"] = 26] = "TwoWayBindingSet";
7230
+ ExpressionKind2[ExpressionKind2["SlotLiteralExpr"] = 20] = "SlotLiteralExpr";
7231
+ ExpressionKind2[ExpressionKind2["ConditionalCase"] = 21] = "ConditionalCase";
7232
+ ExpressionKind2[ExpressionKind2["ConstCollected"] = 22] = "ConstCollected";
7233
+ ExpressionKind2[ExpressionKind2["TwoWayBindingSet"] = 23] = "TwoWayBindingSet";
7237
7234
  })(ExpressionKind || (ExpressionKind = {}));
7238
7235
  var VariableFlags;
7239
7236
  (function(VariableFlags2) {
@@ -7252,12 +7249,6 @@ var CompatibilityMode;
7252
7249
  CompatibilityMode2[CompatibilityMode2["Normal"] = 0] = "Normal";
7253
7250
  CompatibilityMode2[CompatibilityMode2["TemplateDefinitionBuilder"] = 1] = "TemplateDefinitionBuilder";
7254
7251
  })(CompatibilityMode || (CompatibilityMode = {}));
7255
- var DeferSecondaryKind;
7256
- (function(DeferSecondaryKind2) {
7257
- DeferSecondaryKind2[DeferSecondaryKind2["Loading"] = 0] = "Loading";
7258
- DeferSecondaryKind2[DeferSecondaryKind2["Placeholder"] = 1] = "Placeholder";
7259
- DeferSecondaryKind2[DeferSecondaryKind2["Error"] = 2] = "Error";
7260
- })(DeferSecondaryKind || (DeferSecondaryKind = {}));
7261
7252
  var BindingKind;
7262
7253
  (function(BindingKind2) {
7263
7254
  BindingKind2[BindingKind2["Attribute"] = 0] = "Attribute";
@@ -7331,10 +7322,6 @@ var TRAIT_DEPENDS_ON_SLOT_CONTEXT = {
7331
7322
  var TRAIT_CONSUMES_VARS = {
7332
7323
  [ConsumesVarsTrait]: true
7333
7324
  };
7334
- var TRAIT_USES_VAR_OFFSET = {
7335
- [UsesVarOffset]: true,
7336
- varOffset: null
7337
- };
7338
7325
  function hasConsumesSlotTrait(op) {
7339
7326
  return op[ConsumesSlot] === true;
7340
7327
  }
@@ -9599,7 +9586,7 @@ var ElementAttributes = class {
9599
9586
  this.propertyBindings = null;
9600
9587
  this.projectAs = null;
9601
9588
  }
9602
- isKnown(kind, name, value) {
9589
+ isKnown(kind, name) {
9603
9590
  var _a2;
9604
9591
  const nameToValue = (_a2 = this.known.get(kind)) != null ? _a2 : /* @__PURE__ */ new Set();
9605
9592
  this.known.set(kind, nameToValue);
@@ -9612,7 +9599,7 @@ var ElementAttributes = class {
9612
9599
  add(kind, name, value, namespace, trustedValueFn) {
9613
9600
  var _a2;
9614
9601
  const allowDuplicates = this.compatibility === CompatibilityMode.TemplateDefinitionBuilder && (kind === BindingKind.Attribute || kind === BindingKind.ClassName || kind === BindingKind.StyleProperty);
9615
- if (!allowDuplicates && this.isKnown(kind, name, value)) {
9602
+ if (!allowDuplicates && this.isKnown(kind, name)) {
9616
9603
  return;
9617
9604
  }
9618
9605
  if (name === "ngProjectAs") {
@@ -10212,7 +10199,7 @@ function createI18nMessage(job, context, messagePlaceholder) {
10212
10199
  }
10213
10200
  function formatIcuPlaceholder(op) {
10214
10201
  if (op.strings.length !== op.expressionPlaceholders.length + 1) {
10215
- throw Error(`AsserionError: Invalid ICU placeholder with ${op.strings.length} strings and ${op.expressionPlaceholders.length} expressions`);
10202
+ throw Error(`AssertionError: Invalid ICU placeholder with ${op.strings.length} strings and ${op.expressionPlaceholders.length} expressions`);
10216
10203
  }
10217
10204
  const values = op.expressionPlaceholders.map(formatValue);
10218
10205
  return op.strings.flatMap((str, i) => [str, values[i] || ""]).join("");
@@ -16858,7 +16845,7 @@ function addNamesToView(unit, baseName, state, compatibility) {
16858
16845
  }
16859
16846
  if (op.emptyView !== null) {
16860
16847
  const emptyView = unit.job.views.get(op.emptyView);
16861
- addNamesToView(emptyView, `${baseName}_${`${op.functionNameSuffix}Empty`}_${op.handle.slot + 2}`, state, compatibility);
16848
+ addNamesToView(emptyView, `${baseName}_${op.functionNameSuffix}Empty_${op.handle.slot + 2}`, state, compatibility);
16862
16849
  }
16863
16850
  addNamesToView(unit.job.views.get(op.xref), `${baseName}_${op.functionNameSuffix}_${op.handle.slot + 1}`, state, compatibility);
16864
16851
  break;
@@ -17279,7 +17266,7 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
17279
17266
  break;
17280
17267
  case OpKind.RepeaterCreate:
17281
17268
  const forView = unit.job.views.get(op.xref);
17282
- subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.xref), i18nBlock, op.i18nPlaceholder, subTemplateIndex);
17269
+ subTemplateIndex = propagateI18nBlocksForView(forView, i18nBlock, op.i18nPlaceholder, subTemplateIndex);
17283
17270
  if (op.emptyView !== null) {
17284
17271
  subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.emptyView), i18nBlock, op.emptyI18nPlaceholder, subTemplateIndex);
17285
17272
  }
@@ -18379,11 +18366,11 @@ function processLexicalScope(view, ops) {
18379
18366
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
18380
18367
  function resolveDollarEvent(job) {
18381
18368
  for (const unit of job.units) {
18382
- transformDollarEvent(unit, unit.create);
18383
- transformDollarEvent(unit, unit.update);
18369
+ transformDollarEvent(unit.create);
18370
+ transformDollarEvent(unit.update);
18384
18371
  }
18385
18372
  }
18386
- function transformDollarEvent(unit, ops) {
18373
+ function transformDollarEvent(ops) {
18387
18374
  for (const op of ops) {
18388
18375
  if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
18389
18376
  transformExpressionsInOp(op, (expr) => {
@@ -18554,7 +18541,7 @@ function recordTemplateStart(job, view, slot, i18nPlaceholder, i18nContext, i18n
18554
18541
  addParam(i18nContext.params, startName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
18555
18542
  }
18556
18543
  function recordTemplateClose(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {
18557
- const { startName, closeName } = i18nPlaceholder;
18544
+ const { closeName } = i18nPlaceholder;
18558
18545
  const flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag;
18559
18546
  if (closeName) {
18560
18547
  addParam(i18nContext.params, closeName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
@@ -18581,14 +18568,14 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
18581
18568
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
18582
18569
  function resolveI18nExpressionPlaceholders(job) {
18583
18570
  var _a2;
18584
- const subTemplateIndicies = /* @__PURE__ */ new Map();
18571
+ const subTemplateIndices = /* @__PURE__ */ new Map();
18585
18572
  const i18nContexts = /* @__PURE__ */ new Map();
18586
18573
  const icuPlaceholders = /* @__PURE__ */ new Map();
18587
18574
  for (const unit of job.units) {
18588
18575
  for (const op of unit.create) {
18589
18576
  switch (op.kind) {
18590
18577
  case OpKind.I18nStart:
18591
- subTemplateIndicies.set(op.xref, op.subTemplateIndex);
18578
+ subTemplateIndices.set(op.xref, op.subTemplateIndex);
18592
18579
  break;
18593
18580
  case OpKind.I18nContext:
18594
18581
  i18nContexts.set(op.xref, op);
@@ -18605,7 +18592,7 @@ function resolveI18nExpressionPlaceholders(job) {
18605
18592
  for (const op of unit.update) {
18606
18593
  if (op.kind === OpKind.I18nExpression) {
18607
18594
  const index = expressionIndices.get(referenceIndex(op)) || 0;
18608
- const subTemplateIndex = (_a2 = subTemplateIndicies.get(op.i18nOwner)) != null ? _a2 : null;
18595
+ const subTemplateIndex = (_a2 = subTemplateIndices.get(op.i18nOwner)) != null ? _a2 : null;
18609
18596
  const value = {
18610
18597
  value: index,
18611
18598
  subTemplateIndex,
@@ -18669,7 +18656,7 @@ function processLexicalScope2(unit, ops, savedView) {
18669
18656
  if (op.kind == OpKind.Listener || op.kind === OpKind.TwoWayListener) {
18670
18657
  continue;
18671
18658
  }
18672
- transformExpressionsInOp(op, (expr, flags) => {
18659
+ transformExpressionsInOp(op, (expr) => {
18673
18660
  if (expr instanceof LexicalReadExpr) {
18674
18661
  if (scope.has(expr.name)) {
18675
18662
  return new ReadVariableExpr(scope.get(expr.name));
@@ -19271,7 +19258,6 @@ function optimizeVariablesInOpList(ops, compatibility) {
19271
19258
  const toInline = [];
19272
19259
  for (const [id, count] of varUsages) {
19273
19260
  const decl = varDecls.get(id);
19274
- const varInfo = opMap.get(decl);
19275
19261
  const isAlwaysInline = !!(decl.flags & VariableFlags.AlwaysInline);
19276
19262
  if (count !== 1 || isAlwaysInline) {
19277
19263
  continue;
@@ -19974,7 +19960,6 @@ function ingestIcu(unit, icu) {
19974
19960
  var _a2;
19975
19961
  if (icu.i18n instanceof Message && isSingleI18nIcu(icu.i18n)) {
19976
19962
  const xref = unit.job.allocateXrefId();
19977
- const icuNode = icu.i18n.nodes[0];
19978
19963
  unit.create.push(createIcuStartOp(xref, icu.i18n, icuFromI18nMessage(icu.i18n).name, null));
19979
19964
  for (const [placeholder, text2] of Object.entries(__spreadValues(__spreadValues({}, icu.vars), icu.placeholders))) {
19980
19965
  if (text2 instanceof BoundText) {
@@ -26070,7 +26055,7 @@ function publishFacade(global) {
26070
26055
  }
26071
26056
 
26072
26057
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
26073
- var VERSION2 = new Version("17.2.3");
26058
+ var VERSION2 = new Version("17.2.4");
26074
26059
 
26075
26060
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
26076
26061
  var _VisitorMode;