@angular/core 17.3.0-rc.0 → 17.3.1

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 (60) hide show
  1. package/esm2022/src/application/application_ref.mjs +14 -11
  2. package/esm2022/src/authoring/input/input.mjs +4 -1
  3. package/esm2022/src/authoring/output/output.mjs +2 -2
  4. package/esm2022/src/authoring/output/output_emitter_ref.mjs +14 -3
  5. package/esm2022/src/authoring/queries.mjs +7 -1
  6. package/esm2022/src/change_detection/scheduling/zoneless_scheduling.mjs +1 -1
  7. package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +10 -4
  8. package/esm2022/src/core_private_export.mjs +2 -3
  9. package/esm2022/src/defer/instructions.mjs +2 -2
  10. package/esm2022/src/di/contextual.mjs +9 -3
  11. package/esm2022/src/event_emitter.mjs +6 -7
  12. package/esm2022/src/hydration/annotate.mjs +4 -2
  13. package/esm2022/src/hydration/api.mjs +27 -2
  14. package/esm2022/src/hydration/cleanup.mjs +18 -2
  15. package/esm2022/src/hydration/error_handling.mjs +6 -3
  16. package/esm2022/src/hydration/interfaces.mjs +1 -1
  17. package/esm2022/src/hydration/node_lookup_utils.mjs +59 -39
  18. package/esm2022/src/hydration/tokens.mjs +6 -1
  19. package/esm2022/src/hydration/utils.mjs +5 -4
  20. package/esm2022/src/i18n/utils.mjs +16 -0
  21. package/esm2022/src/linker/template_ref.mjs +2 -2
  22. package/esm2022/src/render3/after_render_hooks.mjs +11 -8
  23. package/esm2022/src/render3/component_ref.mjs +1 -1
  24. package/esm2022/src/render3/i18n/i18n_apply.mjs +32 -7
  25. package/esm2022/src/render3/i18n/i18n_parse.mjs +50 -16
  26. package/esm2022/src/render3/instructions/control_flow.mjs +4 -2
  27. package/esm2022/src/render3/instructions/element.mjs +5 -3
  28. package/esm2022/src/render3/instructions/element_container.mjs +3 -2
  29. package/esm2022/src/render3/instructions/template.mjs +4 -2
  30. package/esm2022/src/render3/instructions/text.mjs +4 -2
  31. package/esm2022/src/render3/interfaces/i18n.mjs +1 -1
  32. package/esm2022/src/render3/node_manipulation.mjs +6 -2
  33. package/esm2022/src/render3/node_selector_matcher.mjs +37 -51
  34. package/esm2022/src/render3/queue_state_update.mjs +2 -4
  35. package/esm2022/src/render3/util/view_utils.mjs +2 -1
  36. package/esm2022/src/render3/view_manipulation.mjs +2 -2
  37. package/esm2022/src/sanitization/html_sanitizer.mjs +54 -14
  38. package/esm2022/src/version.mjs +1 -1
  39. package/esm2022/testing/src/component_fixture.mjs +11 -66
  40. package/esm2022/testing/src/logger.mjs +3 -3
  41. package/fesm2022/core.mjs +1460 -1264
  42. package/fesm2022/core.mjs.map +1 -1
  43. package/fesm2022/primitives/signals.mjs +1 -1
  44. package/fesm2022/rxjs-interop.mjs +1 -1
  45. package/fesm2022/testing.mjs +11 -66
  46. package/fesm2022/testing.mjs.map +1 -1
  47. package/index.d.ts +96 -12
  48. package/package.json +1 -1
  49. package/primitives/signals/index.d.ts +1 -1
  50. package/rxjs-interop/index.d.ts +1 -1
  51. package/schematics/migrations/block-template-entities/bundle.js +14 -2
  52. package/schematics/migrations/block-template-entities/bundle.js.map +2 -2
  53. package/schematics/migrations/invalid-two-way-bindings/bundle.js +14 -2
  54. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +2 -2
  55. package/schematics/ng-generate/control-flow-migration/bundle.js +14 -2
  56. package/schematics/ng-generate/control-flow-migration/bundle.js.map +2 -2
  57. package/schematics/ng-generate/standalone-migration/bundle.js +386 -299
  58. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  59. package/testing/index.d.ts +1 -1
  60. package/esm2022/src/is_internal.mjs +0 -15
@@ -18858,10 +18858,13 @@ function transformTwoWayBindingSet(job) {
18858
18858
  }
18859
18859
  }
18860
18860
  function wrapSetOperation(target, value) {
18861
+ if (target instanceof ReadVariableExpr) {
18862
+ return twoWayBindingSet(target, value);
18863
+ }
18861
18864
  return twoWayBindingSet(target, value).or(target.set(value));
18862
18865
  }
18863
18866
  function isReadExpression2(value) {
18864
- return value instanceof ReadPropExpr || value instanceof ReadKeyExpr;
18867
+ return value instanceof ReadPropExpr || value instanceof ReadKeyExpr || value instanceof ReadVariableExpr;
18865
18868
  }
18866
18869
  function wrapAction(target, value) {
18867
18870
  if (isReadExpression2(target)) {
@@ -20419,6 +20422,12 @@ function ingestControlFlowInsertionPoint(unit, xref, node) {
20419
20422
  const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
20420
20423
  unit.update.push(createBindingOp(xref, BindingKind.Attribute, attr.name, literal(attr.value), null, securityContext, true, false, null, asMessage(attr.i18n), attr.sourceSpan));
20421
20424
  }
20425
+ for (const attr of root.inputs) {
20426
+ if (attr.type !== 4 && attr.type !== 1) {
20427
+ const securityContext = domSchema.securityContext(NG_TEMPLATE_TAG_NAME, attr.name, true);
20428
+ unit.create.push(createExtractedAttributeOp(xref, BindingKind.Property, null, attr.name, null, null, null, securityContext));
20429
+ }
20430
+ }
20422
20431
  const tagName = root instanceof Element ? root.name : root.tagName;
20423
20432
  return tagName === NG_TEMPLATE_TAG_NAME ? null : tagName;
20424
20433
  }
@@ -21063,6 +21072,9 @@ function parseForLoopParameters(block, errors, bindingParser) {
21063
21072
  errors.push(new ParseError(param.sourceSpan, '@for loop can only have one "track" expression'));
21064
21073
  } else {
21065
21074
  const expression = parseBlockParameterToBinding(param, bindingParser, trackMatch[1]);
21075
+ if (expression.ast instanceof EmptyExpr) {
21076
+ errors.push(new ParseError(param.sourceSpan, '@for loop must have a "track" expression'));
21077
+ }
21066
21078
  const keywordSpan = new ParseSourceSpan(param.sourceSpan.start, param.sourceSpan.start.moveBy("track".length));
21067
21079
  result.trackBy = { expression, keywordSpan };
21068
21080
  }
@@ -26144,7 +26156,7 @@ function publishFacade(global) {
26144
26156
  }
26145
26157
 
26146
26158
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
26147
- var VERSION2 = new Version("17.3.0-rc.0");
26159
+ var VERSION2 = new Version("17.3.1");
26148
26160
 
26149
26161
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
26150
26162
  var _VisitorMode;