@angular/core 21.0.0-rc.2 → 21.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/fesm2022/_attribute-chunk.mjs +1 -1
- package/fesm2022/_debug_node-chunk.mjs +25 -17
- package/fesm2022/_debug_node-chunk.mjs.map +1 -1
- package/fesm2022/_effect-chunk.mjs +1 -1
- package/fesm2022/_linked_signal-chunk.mjs +1 -1
- package/fesm2022/_not_found-chunk.mjs +1 -1
- package/fesm2022/_resource-chunk.mjs +4 -9
- package/fesm2022/_resource-chunk.mjs.map +1 -1
- package/fesm2022/_untracked-chunk.mjs +2 -2
- package/fesm2022/_untracked-chunk.mjs.map +1 -1
- package/fesm2022/_weak_ref-chunk.mjs +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives-di.mjs +1 -1
- package/fesm2022/primitives-event-dispatch.mjs +1 -1
- package/fesm2022/primitives-signals.mjs +2 -2
- package/fesm2022/primitives-signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/package.json +2 -2
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +1 -1
- package/schematics/bundles/application-config-core.cjs +1 -1
- package/schematics/bundles/apply_import_manager-1Zs_gpB6.cjs +1 -1
- package/schematics/bundles/bootstrap-options-migration.cjs +1 -1
- package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
- package/schematics/bundles/common-to-standalone-migration.cjs +1 -1
- package/schematics/bundles/compiler_host-DBwYMlTo.cjs +1 -1
- package/schematics/bundles/control-flow-migration.cjs +1 -1
- package/schematics/bundles/imports-DP72APSx.cjs +1 -1
- package/schematics/bundles/index-B7I9sIUx.cjs +1 -1
- package/schematics/bundles/inject-migration.cjs +1 -1
- package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
- package/schematics/bundles/migrate_ts_type_references-UGIUl7En.cjs +1 -1
- package/schematics/bundles/ng_component_template-Dsuq1Lw7.cjs +1 -1
- package/schematics/bundles/ng_decorators-DSFlWYQY.cjs +1 -1
- package/schematics/bundles/ngclass-to-class-migration.cjs +1 -1
- package/schematics/bundles/ngstyle-to-style-migration.cjs +1 -1
- package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +1 -1
- package/schematics/bundles/parse_html-8VLCL37B.cjs +1 -1
- package/schematics/bundles/project_paths-DvD50ouC.cjs +1 -1
- package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.cjs +1 -1
- package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +1 -1
- package/schematics/bundles/router-current-navigation.cjs +1 -1
- package/schematics/bundles/router-last-successful-navigation.cjs +1 -1
- package/schematics/bundles/router-testing-module-migration.cjs +1 -1
- package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
- package/schematics/bundles/signal-input-migration.cjs +1 -1
- package/schematics/bundles/signal-queries-migration.cjs +1 -1
- package/schematics/bundles/signals.cjs +1 -1
- package/schematics/bundles/standalone-migration.cjs +1 -1
- package/schematics/bundles/symbol-BObKoqes.cjs +1 -1
- package/types/_api-chunk.d.ts +8 -1
- package/types/_chrome_dev_tools_performance-chunk.d.ts +12 -2
- package/types/_discovery-chunk.d.ts +44 -6
- package/types/_effect-chunk.d.ts +1 -1
- package/types/_event_dispatcher-chunk.d.ts +1 -1
- package/types/_formatter-chunk.d.ts +1 -1
- package/types/_weak_ref-chunk.d.ts +1 -1
- package/types/core.d.ts +56 -15
- package/types/primitives-di.d.ts +1 -1
- package/types/primitives-event-dispatch.d.ts +1 -1
- package/types/primitives-signals.d.ts +1 -1
- package/types/rxjs-interop.d.ts +11 -1
- package/types/testing.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.0.0
|
|
2
|
+
* @license Angular v21.0.0
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -8213,7 +8213,7 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
8213
8213
|
}
|
|
8214
8214
|
}
|
|
8215
8215
|
function createRootTView(rootSelectorOrNode, componentDef, componentBindings, directives) {
|
|
8216
|
-
const tAttributes = rootSelectorOrNode ? ['ng-version', '21.0.0
|
|
8216
|
+
const tAttributes = rootSelectorOrNode ? ['ng-version', '21.0.0'] : extractAttrsAndClassesFromSelector(componentDef.selectors[0]);
|
|
8217
8217
|
let creationBindings = null;
|
|
8218
8218
|
let updateBindings = null;
|
|
8219
8219
|
let varsToAllocate = 0;
|
|
@@ -13213,6 +13213,7 @@ function ɵɵcontrol(value, sanitizer) {
|
|
|
13213
13213
|
}
|
|
13214
13214
|
nextBindingIndex();
|
|
13215
13215
|
}
|
|
13216
|
+
const HAS_CONTROL_MASK = /* @__PURE__ */(() => 16384 | 2048 | 4096)();
|
|
13216
13217
|
function getControlDirectiveFirstCreatePass(tView, tNode, lView) {
|
|
13217
13218
|
const directiveIndices = tNode.inputs?.['field'];
|
|
13218
13219
|
if (!directiveIndices) {
|
|
@@ -13234,23 +13235,24 @@ function getControlDirectiveFirstCreatePass(tView, tNode, lView) {
|
|
|
13234
13235
|
const componentDef = tView.data[componentIndex];
|
|
13235
13236
|
if (hasModelInput(componentDef, 'value')) {
|
|
13236
13237
|
tNode.flags |= 2048;
|
|
13237
|
-
return control;
|
|
13238
13238
|
} else if (hasModelInput(componentDef, 'checked')) {
|
|
13239
13239
|
tNode.flags |= 4096;
|
|
13240
|
-
return control;
|
|
13241
13240
|
}
|
|
13242
13241
|
}
|
|
13243
|
-
if (control.ɵinteropControl) {
|
|
13242
|
+
if (!(tNode.flags & HAS_CONTROL_MASK) && control.ɵinteropControl) {
|
|
13244
13243
|
tNode.flags |= 8192;
|
|
13245
13244
|
return control;
|
|
13246
13245
|
}
|
|
13247
13246
|
if (isNativeControl(tNode)) {
|
|
13247
|
+
tNode.flags |= 16384;
|
|
13248
13248
|
if (isNumericInput(tNode)) {
|
|
13249
|
-
tNode.flags |=
|
|
13249
|
+
tNode.flags |= 32768;
|
|
13250
13250
|
}
|
|
13251
13251
|
if (isTextControl(tNode)) {
|
|
13252
|
-
tNode.flags |=
|
|
13252
|
+
tNode.flags |= 65536;
|
|
13253
13253
|
}
|
|
13254
|
+
}
|
|
13255
|
+
if (tNode.flags & HAS_CONTROL_MASK) {
|
|
13254
13256
|
return control;
|
|
13255
13257
|
}
|
|
13256
13258
|
const tagName = tNode.value;
|
|
@@ -13291,11 +13293,7 @@ function listenToCustomControl(lView, tNode, control, modelName) {
|
|
|
13291
13293
|
}
|
|
13292
13294
|
function listenToInteropControl(control) {
|
|
13293
13295
|
const interopControl = control.ɵinteropControl;
|
|
13294
|
-
interopControl.registerOnChange(value =>
|
|
13295
|
-
const state = control.state();
|
|
13296
|
-
state.value.set(value);
|
|
13297
|
-
state.markAsDirty();
|
|
13298
|
-
});
|
|
13296
|
+
interopControl.registerOnChange(value => control.state().setControlValue(value));
|
|
13299
13297
|
interopControl.registerOnTouched(() => control.state().markAsTouched());
|
|
13300
13298
|
}
|
|
13301
13299
|
function isNativeControl(tNode) {
|
|
@@ -13318,7 +13316,7 @@ function listenToNativeControl(lView, tNode, control) {
|
|
|
13318
13316
|
control.state().markAsTouched();
|
|
13319
13317
|
};
|
|
13320
13318
|
listenToDomEvent(tNode, tView, lView, undefined, renderer, 'blur', blurListener, wrapListener(tNode, lView, blurListener));
|
|
13321
|
-
if (
|
|
13319
|
+
if (tNode.type === 2 && tNode.value === 'select' && typeof MutationObserver === 'function') {
|
|
13322
13320
|
const observer = observeSelectMutations(element, getControlDirective(tNode, lView));
|
|
13323
13321
|
storeCleanupWithContext(tView, lView, observer, observer.disconnect);
|
|
13324
13322
|
}
|
|
@@ -13372,6 +13370,9 @@ function updateCustomControl(tNode, lView, control, modelName) {
|
|
|
13372
13370
|
const inputName = CONTROL_BINDING_NAMES[key];
|
|
13373
13371
|
maybeUpdateInput(componentDef, component, bindings, state, key, inputName);
|
|
13374
13372
|
}
|
|
13373
|
+
if (tNode.flags & 16384) {
|
|
13374
|
+
updateNativeControl(tNode, lView, control);
|
|
13375
|
+
}
|
|
13375
13376
|
}
|
|
13376
13377
|
function maybeUpdateInput(componentDef, component, bindings, state, key, inputName) {
|
|
13377
13378
|
if (inputName in componentDef.inputs) {
|
|
@@ -13412,11 +13413,11 @@ function updateNativeControl(tNode, lView, control) {
|
|
|
13412
13413
|
updateBooleanAttribute(renderer, element, bindings, state, DISABLED);
|
|
13413
13414
|
updateBooleanAttribute(renderer, element, bindings, state, READONLY);
|
|
13414
13415
|
updateBooleanAttribute(renderer, element, bindings, state, REQUIRED);
|
|
13415
|
-
if (tNode.flags &
|
|
13416
|
+
if (tNode.flags & 32768) {
|
|
13416
13417
|
updateOptionalAttribute(renderer, element, bindings, state, MAX);
|
|
13417
13418
|
updateOptionalAttribute(renderer, element, bindings, state, MIN);
|
|
13418
13419
|
}
|
|
13419
|
-
if (tNode.flags &
|
|
13420
|
+
if (tNode.flags & 65536) {
|
|
13420
13421
|
updateOptionalAttribute(renderer, element, bindings, state, MAX_LENGTH);
|
|
13421
13422
|
updateOptionalAttribute(renderer, element, bindings, state, MIN_LENGTH);
|
|
13422
13423
|
}
|
|
@@ -13494,7 +13495,7 @@ function setNativeControlValue(element, value) {
|
|
|
13494
13495
|
case 'range':
|
|
13495
13496
|
case 'datetime-local':
|
|
13496
13497
|
if (typeof value === 'number') {
|
|
13497
|
-
element
|
|
13498
|
+
setNativeNumberControlValue(element, value);
|
|
13498
13499
|
return;
|
|
13499
13500
|
}
|
|
13500
13501
|
break;
|
|
@@ -13506,12 +13507,19 @@ function setNativeControlValue(element, value) {
|
|
|
13506
13507
|
element.valueAsDate = value;
|
|
13507
13508
|
return;
|
|
13508
13509
|
} else if (typeof value === 'number') {
|
|
13509
|
-
element
|
|
13510
|
+
setNativeNumberControlValue(element, value);
|
|
13510
13511
|
return;
|
|
13511
13512
|
}
|
|
13512
13513
|
}
|
|
13513
13514
|
element.value = value;
|
|
13514
13515
|
}
|
|
13516
|
+
function setNativeNumberControlValue(element, value) {
|
|
13517
|
+
if (isNaN(value)) {
|
|
13518
|
+
element.value = '';
|
|
13519
|
+
} else {
|
|
13520
|
+
element.valueAsNumber = value;
|
|
13521
|
+
}
|
|
13522
|
+
}
|
|
13515
13523
|
const DISABLED = /* @__PURE__ */getClosureSafeProperty({
|
|
13516
13524
|
disabled: getClosureSafeProperty
|
|
13517
13525
|
});
|