@angular/core 21.1.0-rc.0 → 21.1.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 (66) hide show
  1. package/fesm2022/_attribute-chunk.mjs +1 -1
  2. package/fesm2022/_debug_node-chunk.mjs +41 -33
  3. package/fesm2022/_debug_node-chunk.mjs.map +1 -1
  4. package/fesm2022/_effect-chunk.mjs +1 -1
  5. package/fesm2022/_linked_signal-chunk.mjs +1 -1
  6. package/fesm2022/_not_found-chunk.mjs +1 -1
  7. package/fesm2022/_resource-chunk.mjs +1 -1
  8. package/fesm2022/_untracked-chunk.mjs +10 -5
  9. package/fesm2022/_untracked-chunk.mjs.map +1 -1
  10. package/fesm2022/_weak_ref-chunk.mjs +1 -1
  11. package/fesm2022/core.mjs +5 -5
  12. package/fesm2022/core.mjs.map +1 -1
  13. package/fesm2022/primitives-di.mjs +1 -1
  14. package/fesm2022/primitives-event-dispatch.mjs +1 -1
  15. package/fesm2022/primitives-signals.mjs +1 -1
  16. package/fesm2022/primitives-signals.mjs.map +1 -1
  17. package/fesm2022/rxjs-interop.mjs +1 -1
  18. package/fesm2022/testing.mjs +2 -2
  19. package/fesm2022/testing.mjs.map +1 -1
  20. package/package.json +2 -2
  21. package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +1 -1
  22. package/schematics/bundles/application-config-core.cjs +1 -1
  23. package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
  24. package/schematics/bundles/bootstrap-options-migration.cjs +1 -1
  25. package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
  26. package/schematics/bundles/common-to-standalone-migration.cjs +9 -5
  27. package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
  28. package/schematics/bundles/control-flow-migration.cjs +1 -1
  29. package/schematics/bundles/imports-CVmcbVA9.cjs +1 -1
  30. package/schematics/bundles/index-BtLcQH8g.cjs +1 -1
  31. package/schematics/bundles/inject-migration.cjs +1 -1
  32. package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
  33. package/schematics/bundles/migrate_ts_type_references-CV7qdt5t.cjs +1 -1
  34. package/schematics/bundles/ng_component_template-BOuKAnQd.cjs +1 -1
  35. package/schematics/bundles/ng_decorators-DYy6II6x.cjs +1 -1
  36. package/schematics/bundles/ngclass-to-class-migration.cjs +1 -1
  37. package/schematics/bundles/ngstyle-to-style-migration.cjs +1 -1
  38. package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
  39. package/schematics/bundles/output-migration.cjs +1 -1
  40. package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
  41. package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
  42. package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
  43. package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
  44. package/schematics/bundles/route-lazy-loading.cjs +1 -1
  45. package/schematics/bundles/router-current-navigation.cjs +1 -1
  46. package/schematics/bundles/router-last-successful-navigation.cjs +1 -1
  47. package/schematics/bundles/router-testing-module-migration.cjs +1 -1
  48. package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
  49. package/schematics/bundles/signal-input-migration.cjs +1 -1
  50. package/schematics/bundles/signal-queries-migration.cjs +1 -1
  51. package/schematics/bundles/signals.cjs +1 -1
  52. package/schematics/bundles/standalone-migration.cjs +1 -1
  53. package/schematics/bundles/symbol-DZeHSR-V.cjs +1 -1
  54. package/types/_api-chunk.d.ts +1 -1
  55. package/types/_chrome_dev_tools_performance-chunk.d.ts +1 -1
  56. package/types/_discovery-chunk.d.ts +1 -1
  57. package/types/_effect-chunk.d.ts +1 -1
  58. package/types/_event_dispatcher-chunk.d.ts +1 -1
  59. package/types/_formatter-chunk.d.ts +1 -1
  60. package/types/_weak_ref-chunk.d.ts +1 -1
  61. package/types/core.d.ts +436 -419
  62. package/types/primitives-di.d.ts +1 -1
  63. package/types/primitives-event-dispatch.d.ts +1 -1
  64. package/types/primitives-signals.d.ts +1 -1
  65. package/types/rxjs-interop.d.ts +1 -1
  66. package/types/testing.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.1.0-rc.0
2
+ * @license Angular v21.1.1
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.1.0-rc.0
2
+ * @license Angular v21.1.1
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -8116,7 +8116,7 @@ function controlBinding(binding, tNode) {
8116
8116
  return directive[ɵCONTROL];
8117
8117
  }
8118
8118
  function inputBinding(publicName, value) {
8119
- if (publicName === 'field') {
8119
+ if (publicName === 'formField') {
8120
8120
  const binding = {
8121
8121
  [BINDING]: FIELD_BINDING_METADATA,
8122
8122
  create: () => {
@@ -8313,7 +8313,7 @@ class ComponentFactory extends ComponentFactory$1 {
8313
8313
  }
8314
8314
  }
8315
8315
  function createRootTView(rootSelectorOrNode, componentDef, componentBindings, directives) {
8316
- const tAttributes = rootSelectorOrNode ? ['ng-version', '21.1.0-rc.0'] : extractAttrsAndClassesFromSelector(componentDef.selectors[0]);
8316
+ const tAttributes = rootSelectorOrNode ? ['ng-version', '21.1.1'] : extractAttrsAndClassesFromSelector(componentDef.selectors[0]);
8317
8317
  let creationBindings = null;
8318
8318
  let updateBindings = null;
8319
8319
  let varsToAllocate = 0;
@@ -13278,21 +13278,21 @@ function ɵɵcontrolCreate() {
13278
13278
  if (tView.firstCreatePass) {
13279
13279
  initializeControlFirstCreatePass(tView, tNode, lView);
13280
13280
  }
13281
- const control = getControlDirective(tNode, lView);
13282
- if (!control) {
13281
+ const fieldDirective = getFieldDirective(tNode, lView);
13282
+ if (!fieldDirective) {
13283
13283
  return;
13284
13284
  }
13285
13285
  performanceMarkFeature('NgSignalForms');
13286
13286
  if (tNode.flags & 1024) {
13287
- listenToCustomControl(lView, tNode, control, 'value');
13287
+ initializeCustomControl(lView, tNode, fieldDirective, 'value');
13288
13288
  } else if (tNode.flags & 2048) {
13289
- listenToCustomControl(lView, tNode, control, 'checked');
13289
+ initializeCustomControl(lView, tNode, fieldDirective, 'checked');
13290
13290
  } else if (tNode.flags & 4096) {
13291
- listenToInteropControl(control);
13292
- } else {
13293
- listenToNativeControl(lView, tNode, control);
13291
+ initializeInteropControl(fieldDirective);
13292
+ } else if (tNode.flags & 8192) {
13293
+ initializeNativeControl(lView, tNode, fieldDirective);
13294
13294
  }
13295
- control.ɵregister();
13295
+ fieldDirective.registerAsBinding(getCustomControl(tNode, lView));
13296
13296
  }
13297
13297
  function ɵɵcontrol(value, name, sanitizer) {
13298
13298
  const lView = getLView();
@@ -13311,24 +13311,24 @@ function ɵcontrolUpdate() {
13311
13311
  updateControl(lView, tNode);
13312
13312
  }
13313
13313
  function updateControl(lView, tNode) {
13314
- const control = getControlDirective(tNode, lView);
13315
- if (control) {
13316
- updateControlClasses(lView, tNode, control);
13314
+ const fieldDirective = getFieldDirective(tNode, lView);
13315
+ if (fieldDirective) {
13316
+ updateControlClasses(lView, tNode, fieldDirective);
13317
13317
  if (tNode.flags & 1024) {
13318
- updateCustomControl(tNode, lView, control, 'value');
13318
+ updateCustomControl(tNode, lView, fieldDirective, 'value');
13319
13319
  } else if (tNode.flags & 2048) {
13320
- updateCustomControl(tNode, lView, control, 'checked');
13320
+ updateCustomControl(tNode, lView, fieldDirective, 'checked');
13321
13321
  } else if (tNode.flags & 4096) {
13322
- updateInteropControl(tNode, lView, control);
13322
+ updateInteropControl(tNode, lView, fieldDirective);
13323
13323
  } else {
13324
- updateNativeControl(tNode, lView, control);
13324
+ updateNativeControl(tNode, lView, fieldDirective);
13325
13325
  }
13326
13326
  }
13327
13327
  nextBindingIndex();
13328
13328
  }
13329
13329
  function initializeControlFirstCreatePass(tView, tNode, lView) {
13330
13330
  ngDevMode && assertFirstCreatePass(tView);
13331
- const directiveIndices = tNode.inputs?.['field'] ?? tNode.inputs?.['formField'];
13331
+ const directiveIndices = tNode.inputs?.['formField'];
13332
13332
  if (!directiveIndices) {
13333
13333
  return;
13334
13334
  }
@@ -13344,7 +13344,7 @@ function initializeControlFirstCreatePass(tView, tNode, lView) {
13344
13344
  if (isNativeControlFirstCreatePass(tNode) || foundControl) {
13345
13345
  return;
13346
13346
  }
13347
- throw new RuntimeError(318, ngDevMode && `${describeElement(tView, tNode)} is an invalid [field] directive host. The host must be a native form control ` + `(such as <input>', '<select>', or '<textarea>') or a custom form control with a 'value' or ` + `'checked' model.`);
13347
+ throw new RuntimeError(318, ngDevMode && `${describeElement(tView, tNode)} is an invalid [formField] directive host. The host must be a native form control ` + `(such as <input>', '<select>', or '<textarea>') or a custom form control with a 'value' or ` + `'checked' model.`);
13348
13348
  }
13349
13349
  function describeElement(tView, tNode) {
13350
13350
  if (ngDevMode && isComponentHost(tNode)) {
@@ -13391,9 +13391,13 @@ function isNativeControlFirstCreatePass(tNode) {
13391
13391
  }
13392
13392
  return true;
13393
13393
  }
13394
- function getControlDirective(tNode, lView) {
13394
+ function getFieldDirective(tNode, lView) {
13395
13395
  const index = tNode.fieldIndex;
13396
- return index === -1 ? null : lView[index];
13396
+ return index === -1 ? undefined : lView[index];
13397
+ }
13398
+ function getCustomControl(tNode, lView) {
13399
+ const index = tNode.customControlIndex;
13400
+ return index === -1 ? undefined : lView[index];
13397
13401
  }
13398
13402
  function hasModelInput(directiveDef, name) {
13399
13403
  return hasInput(directiveDef, name) && hasOutput(directiveDef, name + 'Change');
@@ -13404,21 +13408,21 @@ function hasInput(directiveDef, name) {
13404
13408
  function hasOutput(directiveDef, name) {
13405
13409
  return name in directiveDef.outputs;
13406
13410
  }
13407
- function listenToCustomControl(lView, tNode, control, modelName) {
13411
+ function initializeCustomControl(lView, tNode, fieldDirective, modelName) {
13408
13412
  const tView = getTView();
13409
13413
  const directiveIndex = tNode.customControlIndex;
13410
13414
  const outputName = modelName + 'Change';
13411
- listenToOutput(tNode, lView, directiveIndex, outputName, outputName, wrapListener(tNode, lView, value => control.state().setControlValue(value)));
13415
+ listenToOutput(tNode, lView, directiveIndex, outputName, outputName, wrapListener(tNode, lView, value => fieldDirective.state().setControlValue(value)));
13412
13416
  const directiveDef = tView.data[directiveIndex];
13413
13417
  const touchedOutputName = 'touchedChange';
13414
13418
  if (hasOutput(directiveDef, touchedOutputName)) {
13415
- listenToOutput(tNode, lView, directiveIndex, touchedOutputName, touchedOutputName, wrapListener(tNode, lView, () => control.state().markAsTouched()));
13419
+ listenToOutput(tNode, lView, directiveIndex, touchedOutputName, touchedOutputName, wrapListener(tNode, lView, () => fieldDirective.state().markAsTouched()));
13416
13420
  }
13417
13421
  }
13418
- function listenToInteropControl(control) {
13419
- const interopControl = control.ɵinteropControl;
13420
- interopControl.registerOnChange(value => control.state().setControlValue(value));
13421
- interopControl.registerOnTouched(() => control.state().markAsTouched());
13422
+ function initializeInteropControl(fieldDirective) {
13423
+ const interopControl = fieldDirective.ɵinteropControl;
13424
+ interopControl.registerOnChange(value => fieldDirective.state().setControlValue(value));
13425
+ interopControl.registerOnTouched(() => fieldDirective.state().markAsTouched());
13422
13426
  }
13423
13427
  function isNativeControl(tNode) {
13424
13428
  if (tNode.type !== 2) {
@@ -13427,21 +13431,21 @@ function isNativeControl(tNode) {
13427
13431
  const tagName = tNode.value;
13428
13432
  return tagName === 'input' || tagName === 'textarea' || tagName === 'select';
13429
13433
  }
13430
- function listenToNativeControl(lView, tNode, control) {
13434
+ function initializeNativeControl(lView, tNode, fieldDirective) {
13431
13435
  const tView = getTView();
13432
13436
  const renderer = lView[RENDERER];
13433
13437
  const element = getNativeByTNode(tNode, lView);
13434
13438
  const inputListener = () => {
13435
- const state = control.state();
13439
+ const state = fieldDirective.state();
13436
13440
  state.setControlValue(getNativeControlValue(element, state.value));
13437
13441
  };
13438
13442
  listenToDomEvent(tNode, tView, lView, undefined, renderer, 'input', inputListener, wrapListener(tNode, lView, inputListener));
13439
13443
  const blurListener = () => {
13440
- control.state().markAsTouched();
13444
+ fieldDirective.state().markAsTouched();
13441
13445
  };
13442
13446
  listenToDomEvent(tNode, tView, lView, undefined, renderer, 'blur', blurListener, wrapListener(tNode, lView, blurListener));
13443
13447
  if (tNode.type === 2 && tNode.value === 'select' && typeof MutationObserver === 'function') {
13444
- const observer = observeSelectMutations(element, control);
13448
+ const observer = observeSelectMutations(element, fieldDirective);
13445
13449
  storeCleanupWithContext(tView, lView, observer, observer.disconnect);
13446
13450
  }
13447
13451
  }
@@ -16253,6 +16257,10 @@ function toStylingKeyValueArray(keyValueArraySet, stringParser, value) {
16253
16257
  for (let i = 0; i < unwrappedValue.length; i++) {
16254
16258
  keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);
16255
16259
  }
16260
+ } else if (unwrappedValue instanceof Set) {
16261
+ for (const current of unwrappedValue) {
16262
+ keyValueArraySet(styleKeyValueArray, current, true);
16263
+ }
16256
16264
  } else if (typeof unwrappedValue === 'object') {
16257
16265
  for (const key in unwrappedValue) {
16258
16266
  if (unwrappedValue.hasOwnProperty(key)) {