@angular/core 20.0.0-next.7 → 20.0.0-next.8
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/api.d-KjtSQajV.d.ts +1 -1
- package/chrome_dev_tools_performance.d-qv7drdAl.d.ts +1 -1
- package/{discovery.d-D6xf1HH-.d.ts → discovery.d-vJaEafe4.d.ts} +3 -3
- package/event_dispatcher.d-DlbccpYq.d.ts +1 -1
- package/fesm2022/attribute-BWp59EjE.mjs +1 -1
- package/fesm2022/core.mjs +10 -10
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/{debug_node-B3CixwNH.mjs → debug_node-DEfPCixm.mjs} +70 -19
- package/fesm2022/debug_node-DEfPCixm.mjs.map +1 -0
- package/fesm2022/primitives/di.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/{resource-DtpS_sTw.mjs → resource-DhKtse7l.mjs} +3 -3
- package/fesm2022/{resource-DtpS_sTw.mjs.map → resource-DhKtse7l.mjs.map} +1 -1
- package/fesm2022/{root_effect_scheduler-BK3l7wIO.mjs → root_effect_scheduler-BZMWiScf.mjs} +17 -5
- package/fesm2022/root_effect_scheduler-BZMWiScf.mjs.map +1 -0
- package/fesm2022/rxjs-interop.mjs +4 -4
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/signal-B6pMq7KS.mjs +1 -1
- package/fesm2022/testing.mjs +15 -4
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/untracked-Bz5WMeU1.mjs +1 -1
- package/fesm2022/weak_ref-BaIq-pgY.mjs +1 -1
- package/graph.d-BcIOep_B.d.ts +1 -1
- package/index.d.ts +60 -18
- package/package.json +2 -2
- package/primitives/di/index.d.ts +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +2 -2
- package/schematics/bundles/{apply_import_manager-DczRKpTm.js → apply_import_manager-CaG-_cEq.js} +3 -3
- package/schematics/bundles/{change_tracker-CWLh-wes.js → change_tracker-ISzWfEHN.js} +3 -3
- package/schematics/bundles/{checker-_f5wM7PH.js → checker-DV96LHWz.js} +6 -3
- package/schematics/bundles/cleanup-unused-imports.js +6 -6
- package/schematics/bundles/{compiler-BaCbbux6.js → compiler-BEZ6sUQS.js} +193 -83
- package/schematics/bundles/compiler_host-CAfDJO3W.js +1 -1
- package/schematics/bundles/control-flow-migration.js +2 -2
- package/schematics/bundles/document-core.js +6 -6
- package/schematics/bundles/imports-CIX-JgAN.js +1 -1
- package/schematics/bundles/{index--W6S49uu.js → index-6wv04ZFQ.js} +5 -5
- package/schematics/bundles/{index-rsJ8I_hu.js → index-B1R5GL-k.js} +55 -23
- package/schematics/bundles/inject-flags.js +6 -6
- package/schematics/bundles/inject-migration.js +14 -11
- package/schematics/bundles/leading_space-D9nQ8UQC.js +1 -1
- package/schematics/bundles/{migrate_ts_type_references-C4D_SzJk.js → migrate_ts_type_references-Dh9TZgTr.js} +7 -6
- package/schematics/bundles/ng_decorators-DznZ5jMl.js +1 -1
- package/schematics/bundles/nodes-B16H9JUd.js +1 -1
- package/schematics/bundles/output-migration.js +7 -7
- package/schematics/bundles/{project_paths-Ce0O2u-M.js → project_paths-B-Nevd-p.js} +4 -4
- package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.js +1 -1
- package/schematics/bundles/property_name-BBwFuqMe.js +1 -1
- package/schematics/bundles/route-lazy-loading.js +4 -4
- package/schematics/bundles/self-closing-tags-migration.js +5 -5
- package/schematics/bundles/signal-input-migration.js +8 -8
- package/schematics/bundles/signal-queries-migration.js +8 -8
- package/schematics/bundles/signals.js +8 -8
- package/schematics/bundles/standalone-migration.js +5 -5
- package/schematics/bundles/symbol-VPWguRxr.js +1 -1
- package/schematics/bundles/test-bed-get.js +5 -5
- package/signal.d-E0e5nW1p.d.ts +1 -1
- package/testing/index.d.ts +9 -3
- package/weak_ref.d-eGOEP9S1.d.ts +1 -1
- package/fesm2022/debug_node-B3CixwNH.mjs.map +0 -1
- package/fesm2022/root_effect_scheduler-BK3l7wIO.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-next.
|
|
3
|
+
* @license Angular v20.0.0-next.8
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -399,6 +399,15 @@ class SelectorContext {
|
|
|
399
399
|
return result;
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
+
class SelectorlessMatcher {
|
|
403
|
+
registry;
|
|
404
|
+
constructor(registry) {
|
|
405
|
+
this.registry = registry;
|
|
406
|
+
}
|
|
407
|
+
match(name) {
|
|
408
|
+
return this.registry.get(name) ?? null;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
402
411
|
|
|
403
412
|
// Attention:
|
|
404
413
|
// This file duplicates types and values from @angular/core
|
|
@@ -895,6 +904,7 @@ exports.BinaryOperator = void 0;
|
|
|
895
904
|
BinaryOperator[BinaryOperator["BiggerEquals"] = 16] = "BiggerEquals";
|
|
896
905
|
BinaryOperator[BinaryOperator["NullishCoalesce"] = 17] = "NullishCoalesce";
|
|
897
906
|
BinaryOperator[BinaryOperator["Exponentiation"] = 18] = "Exponentiation";
|
|
907
|
+
BinaryOperator[BinaryOperator["In"] = 19] = "In";
|
|
898
908
|
})(exports.BinaryOperator || (exports.BinaryOperator = {}));
|
|
899
909
|
function nullSafeIsEquivalent(base, other) {
|
|
900
910
|
if (base == null || other == null) {
|
|
@@ -3682,6 +3692,9 @@ class AbstractEmitterVisitor {
|
|
|
3682
3692
|
case exports.BinaryOperator.NullishCoalesce:
|
|
3683
3693
|
opStr = '??';
|
|
3684
3694
|
break;
|
|
3695
|
+
case exports.BinaryOperator.In:
|
|
3696
|
+
opStr = 'in';
|
|
3697
|
+
break;
|
|
3685
3698
|
default:
|
|
3686
3699
|
throw new Error(`Unknown operator ${ast.operator}`);
|
|
3687
3700
|
}
|
|
@@ -12038,6 +12051,7 @@ const BINARY_OPERATORS = new Map([
|
|
|
12038
12051
|
['??', exports.BinaryOperator.NullishCoalesce],
|
|
12039
12052
|
['||', exports.BinaryOperator.Or],
|
|
12040
12053
|
['+', exports.BinaryOperator.Plus],
|
|
12054
|
+
['in', exports.BinaryOperator.In],
|
|
12041
12055
|
]);
|
|
12042
12056
|
function namespaceForKey(namespacePrefixKey) {
|
|
12043
12057
|
const NAMESPACES = new Map([
|
|
@@ -18102,6 +18116,7 @@ const KEYWORDS = [
|
|
|
18102
18116
|
'this',
|
|
18103
18117
|
'typeof',
|
|
18104
18118
|
'void',
|
|
18119
|
+
'in',
|
|
18105
18120
|
];
|
|
18106
18121
|
class Lexer {
|
|
18107
18122
|
tokenize(text) {
|
|
@@ -18169,6 +18184,9 @@ class Token {
|
|
|
18169
18184
|
isKeywordVoid() {
|
|
18170
18185
|
return this.type === TokenType.Keyword && this.strValue === 'void';
|
|
18171
18186
|
}
|
|
18187
|
+
isKeywordIn() {
|
|
18188
|
+
return this.type === TokenType.Keyword && this.strValue === 'in';
|
|
18189
|
+
}
|
|
18172
18190
|
isError() {
|
|
18173
18191
|
return this.type === TokenType.Error;
|
|
18174
18192
|
}
|
|
@@ -19212,16 +19230,17 @@ class _ParseAST {
|
|
|
19212
19230
|
return result;
|
|
19213
19231
|
}
|
|
19214
19232
|
parseRelational() {
|
|
19215
|
-
// '<', '>', '<=', '>='
|
|
19233
|
+
// '<', '>', '<=', '>=', 'in'
|
|
19216
19234
|
const start = this.inputIndex;
|
|
19217
19235
|
let result = this.parseAdditive();
|
|
19218
|
-
while (this.next.type == TokenType.Operator) {
|
|
19236
|
+
while (this.next.type == TokenType.Operator || this.next.isKeywordIn) {
|
|
19219
19237
|
const operator = this.next.strValue;
|
|
19220
19238
|
switch (operator) {
|
|
19221
19239
|
case '<':
|
|
19222
19240
|
case '>':
|
|
19223
19241
|
case '<=':
|
|
19224
19242
|
case '>=':
|
|
19243
|
+
case 'in':
|
|
19225
19244
|
this.advance();
|
|
19226
19245
|
const right = this.parseAdditive();
|
|
19227
19246
|
result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right);
|
|
@@ -19384,6 +19403,10 @@ class _ParseAST {
|
|
|
19384
19403
|
this.advance();
|
|
19385
19404
|
return new LiteralPrimitive(this.span(start), this.sourceSpan(start), false);
|
|
19386
19405
|
}
|
|
19406
|
+
else if (this.next.isKeywordIn()) {
|
|
19407
|
+
this.advance();
|
|
19408
|
+
return new LiteralPrimitive(this.span(start), this.sourceSpan(start), 'in');
|
|
19409
|
+
}
|
|
19387
19410
|
else if (this.next.isKeywordThis()) {
|
|
19388
19411
|
this.advance();
|
|
19389
19412
|
return new ThisReceiver(this.span(start), this.sourceSpan(start));
|
|
@@ -29126,6 +29149,7 @@ class HtmlAstToIvyAst {
|
|
|
29126
29149
|
return null;
|
|
29127
29150
|
}
|
|
29128
29151
|
const { attributes, boundEvents, references, templateVariables, elementHasInlineTemplate, parsedProperties, templateParsedProperties, i18nAttrsMeta, } = this.prepareAttributes(component.attrs, false);
|
|
29152
|
+
this.validateSelectorlessReferences(references);
|
|
29129
29153
|
const directives = this.extractDirectives(component);
|
|
29130
29154
|
let children;
|
|
29131
29155
|
if (component.attrs.find((attr) => attr.name === 'ngNonBindable')) {
|
|
@@ -29428,6 +29452,7 @@ class HtmlAstToIvyAst {
|
|
|
29428
29452
|
continue;
|
|
29429
29453
|
}
|
|
29430
29454
|
const { attributes, parsedProperties, boundEvents, references, i18nAttrsMeta } = this.prepareAttributes(directive.attrs, false);
|
|
29455
|
+
this.validateSelectorlessReferences(references);
|
|
29431
29456
|
const { bound: inputs } = this.categorizePropertyAttributes(elementName, parsedProperties, i18nAttrsMeta);
|
|
29432
29457
|
for (const input of inputs) {
|
|
29433
29458
|
if (input.type !== exports.BindingType.Property && input.type !== exports.BindingType.TwoWay) {
|
|
@@ -29511,6 +29536,23 @@ class HtmlAstToIvyAst {
|
|
|
29511
29536
|
/* isAssignmentEvent */ true, sourceSpan, valueSpan || sourceSpan, targetMatchableAttrs, events, keySpan);
|
|
29512
29537
|
addEvents(events, boundEvents);
|
|
29513
29538
|
}
|
|
29539
|
+
validateSelectorlessReferences(references) {
|
|
29540
|
+
if (references.length === 0) {
|
|
29541
|
+
return;
|
|
29542
|
+
}
|
|
29543
|
+
const seenNames = new Set();
|
|
29544
|
+
for (const ref of references) {
|
|
29545
|
+
if (ref.value.length > 0) {
|
|
29546
|
+
this.reportError('Cannot specify a value for a local reference in this context', ref.valueSpan || ref.sourceSpan);
|
|
29547
|
+
}
|
|
29548
|
+
else if (seenNames.has(ref.name)) {
|
|
29549
|
+
this.reportError('Duplicate reference names are not allowed', ref.sourceSpan);
|
|
29550
|
+
}
|
|
29551
|
+
else {
|
|
29552
|
+
seenNames.add(ref.name);
|
|
29553
|
+
}
|
|
29554
|
+
}
|
|
29555
|
+
}
|
|
29514
29556
|
reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {
|
|
29515
29557
|
this.errors.push(new ParseError(sourceSpan, message, level));
|
|
29516
29558
|
}
|
|
@@ -29612,6 +29654,7 @@ function parseTemplate(template, templateUrl, options = {}) {
|
|
|
29612
29654
|
tokenizeExpansionForms: true,
|
|
29613
29655
|
tokenizeBlocks: options.enableBlockSyntax ?? true,
|
|
29614
29656
|
tokenizeLet: options.enableLetSyntax ?? true,
|
|
29657
|
+
selectorlessEnabled: options.enableSelectorless ?? false,
|
|
29615
29658
|
});
|
|
29616
29659
|
if (!options.alwaysAttemptHtmlToR3AstConversion &&
|
|
29617
29660
|
parseResult.errors &&
|
|
@@ -30289,9 +30332,9 @@ class Scope {
|
|
|
30289
30332
|
*/
|
|
30290
30333
|
namedEntities = new Map();
|
|
30291
30334
|
/**
|
|
30292
|
-
* Set of
|
|
30335
|
+
* Set of element-like nodes that belong to this scope.
|
|
30293
30336
|
*/
|
|
30294
|
-
|
|
30337
|
+
elementLikeInScope = new Set();
|
|
30295
30338
|
/**
|
|
30296
30339
|
* Child `Scope`s for immediately nested `ScopedNode`s.
|
|
30297
30340
|
*/
|
|
@@ -30352,12 +30395,7 @@ class Scope {
|
|
|
30352
30395
|
}
|
|
30353
30396
|
}
|
|
30354
30397
|
visitElement(element) {
|
|
30355
|
-
|
|
30356
|
-
// `Element`s in the template may have `Reference`s which are captured in the scope.
|
|
30357
|
-
element.references.forEach((node) => this.visitReference(node));
|
|
30358
|
-
// Recurse into the `Element`'s children.
|
|
30359
|
-
element.children.forEach((node) => node.visit(this));
|
|
30360
|
-
this.elementsInScope.add(element);
|
|
30398
|
+
this.visitElementLike(element);
|
|
30361
30399
|
}
|
|
30362
30400
|
visitTemplate(template) {
|
|
30363
30401
|
template.directives.forEach((node) => node.visit(this));
|
|
@@ -30416,10 +30454,10 @@ class Scope {
|
|
|
30416
30454
|
this.maybeDeclare(decl);
|
|
30417
30455
|
}
|
|
30418
30456
|
visitComponent(component) {
|
|
30419
|
-
|
|
30457
|
+
this.visitElementLike(component);
|
|
30420
30458
|
}
|
|
30421
30459
|
visitDirective(directive) {
|
|
30422
|
-
|
|
30460
|
+
directive.references.forEach((current) => this.visitReference(current));
|
|
30423
30461
|
}
|
|
30424
30462
|
// Unused visitors.
|
|
30425
30463
|
visitBoundAttribute(attr) { }
|
|
@@ -30430,6 +30468,12 @@ class Scope {
|
|
|
30430
30468
|
visitIcu(icu) { }
|
|
30431
30469
|
visitDeferredTrigger(trigger) { }
|
|
30432
30470
|
visitUnknownBlock(block) { }
|
|
30471
|
+
visitElementLike(node) {
|
|
30472
|
+
node.directives.forEach((current) => current.visit(this));
|
|
30473
|
+
node.references.forEach((current) => this.visitReference(current));
|
|
30474
|
+
node.children.forEach((current) => current.visit(this));
|
|
30475
|
+
this.elementLikeInScope.add(node);
|
|
30476
|
+
}
|
|
30433
30477
|
maybeDeclare(thing) {
|
|
30434
30478
|
// Declare something with a name, as long as that name isn't taken.
|
|
30435
30479
|
if (!this.namedEntities.has(thing.name)) {
|
|
@@ -30479,15 +30523,15 @@ class Scope {
|
|
|
30479
30523
|
* Usually used via the static `apply()` method.
|
|
30480
30524
|
*/
|
|
30481
30525
|
class DirectiveBinder {
|
|
30482
|
-
|
|
30526
|
+
directiveMatcher;
|
|
30483
30527
|
directives;
|
|
30484
30528
|
eagerDirectives;
|
|
30485
30529
|
bindings;
|
|
30486
30530
|
references;
|
|
30487
30531
|
// Indicates whether we are visiting elements within a `defer` block
|
|
30488
30532
|
isInDeferBlock = false;
|
|
30489
|
-
constructor(
|
|
30490
|
-
this.
|
|
30533
|
+
constructor(directiveMatcher, directives, eagerDirectives, bindings, references) {
|
|
30534
|
+
this.directiveMatcher = directiveMatcher;
|
|
30491
30535
|
this.directives = directives;
|
|
30492
30536
|
this.eagerDirectives = eagerDirectives;
|
|
30493
30537
|
this.bindings = bindings;
|
|
@@ -30505,8 +30549,8 @@ class DirectiveBinder {
|
|
|
30505
30549
|
* map which resolves #references (`Reference`s) within the template to the named directive or
|
|
30506
30550
|
* template node.
|
|
30507
30551
|
*/
|
|
30508
|
-
static apply(template,
|
|
30509
|
-
const matcher = new DirectiveBinder(
|
|
30552
|
+
static apply(template, directiveMatcher, directives, eagerDirectives, bindings, references) {
|
|
30553
|
+
const matcher = new DirectiveBinder(directiveMatcher, directives, eagerDirectives, bindings, references);
|
|
30510
30554
|
matcher.ingest(template);
|
|
30511
30555
|
}
|
|
30512
30556
|
ingest(template) {
|
|
@@ -30518,23 +30562,129 @@ class DirectiveBinder {
|
|
|
30518
30562
|
visitTemplate(template) {
|
|
30519
30563
|
this.visitElementOrTemplate(template);
|
|
30520
30564
|
}
|
|
30565
|
+
visitDeferredBlock(deferred) {
|
|
30566
|
+
const wasInDeferBlock = this.isInDeferBlock;
|
|
30567
|
+
this.isInDeferBlock = true;
|
|
30568
|
+
deferred.children.forEach((child) => child.visit(this));
|
|
30569
|
+
this.isInDeferBlock = wasInDeferBlock;
|
|
30570
|
+
deferred.placeholder?.visit(this);
|
|
30571
|
+
deferred.loading?.visit(this);
|
|
30572
|
+
deferred.error?.visit(this);
|
|
30573
|
+
}
|
|
30574
|
+
visitDeferredBlockPlaceholder(block) {
|
|
30575
|
+
block.children.forEach((child) => child.visit(this));
|
|
30576
|
+
}
|
|
30577
|
+
visitDeferredBlockError(block) {
|
|
30578
|
+
block.children.forEach((child) => child.visit(this));
|
|
30579
|
+
}
|
|
30580
|
+
visitDeferredBlockLoading(block) {
|
|
30581
|
+
block.children.forEach((child) => child.visit(this));
|
|
30582
|
+
}
|
|
30583
|
+
visitSwitchBlock(block) {
|
|
30584
|
+
block.cases.forEach((node) => node.visit(this));
|
|
30585
|
+
}
|
|
30586
|
+
visitSwitchBlockCase(block) {
|
|
30587
|
+
block.children.forEach((node) => node.visit(this));
|
|
30588
|
+
}
|
|
30589
|
+
visitForLoopBlock(block) {
|
|
30590
|
+
block.item.visit(this);
|
|
30591
|
+
block.contextVariables.forEach((v) => v.visit(this));
|
|
30592
|
+
block.children.forEach((node) => node.visit(this));
|
|
30593
|
+
block.empty?.visit(this);
|
|
30594
|
+
}
|
|
30595
|
+
visitForLoopBlockEmpty(block) {
|
|
30596
|
+
block.children.forEach((node) => node.visit(this));
|
|
30597
|
+
}
|
|
30598
|
+
visitIfBlock(block) {
|
|
30599
|
+
block.branches.forEach((node) => node.visit(this));
|
|
30600
|
+
}
|
|
30601
|
+
visitIfBlockBranch(block) {
|
|
30602
|
+
block.expressionAlias?.visit(this);
|
|
30603
|
+
block.children.forEach((node) => node.visit(this));
|
|
30604
|
+
}
|
|
30605
|
+
visitContent(content) {
|
|
30606
|
+
content.children.forEach((child) => child.visit(this));
|
|
30607
|
+
}
|
|
30608
|
+
visitComponent(node) {
|
|
30609
|
+
const directives = [];
|
|
30610
|
+
let componentMetas = null;
|
|
30611
|
+
if (this.directiveMatcher instanceof SelectorlessMatcher) {
|
|
30612
|
+
componentMetas = this.directiveMatcher.match(node.componentName);
|
|
30613
|
+
if (componentMetas !== null) {
|
|
30614
|
+
directives.push(...componentMetas);
|
|
30615
|
+
}
|
|
30616
|
+
for (const directive of node.directives) {
|
|
30617
|
+
const directiveMetas = this.directiveMatcher.match(directive.name);
|
|
30618
|
+
if (directiveMetas !== null) {
|
|
30619
|
+
directives.push(...directiveMetas);
|
|
30620
|
+
}
|
|
30621
|
+
}
|
|
30622
|
+
}
|
|
30623
|
+
this.trackMatchedDirectives(node, directives);
|
|
30624
|
+
if (componentMetas !== null) {
|
|
30625
|
+
this.trackSelectorlessBindings(node, componentMetas);
|
|
30626
|
+
}
|
|
30627
|
+
node.directives.forEach((directive) => directive.visit(this));
|
|
30628
|
+
node.children.forEach((child) => child.visit(this));
|
|
30629
|
+
}
|
|
30630
|
+
visitDirective(node) {
|
|
30631
|
+
const directives = this.directiveMatcher instanceof SelectorlessMatcher
|
|
30632
|
+
? this.directiveMatcher.match(node.name)
|
|
30633
|
+
: null;
|
|
30634
|
+
if (directives !== null) {
|
|
30635
|
+
this.trackSelectorlessBindings(node, directives);
|
|
30636
|
+
}
|
|
30637
|
+
}
|
|
30521
30638
|
visitElementOrTemplate(node) {
|
|
30522
|
-
// First, determine the HTML shape of the node for the purpose of directive matching.
|
|
30523
|
-
// Do this by building up a `CssSelector` for the node.
|
|
30524
|
-
const cssSelector = createCssSelectorFromNode(node);
|
|
30525
|
-
// TODO(crisbeto): account for selectorless directives here.
|
|
30526
|
-
if (node.directives.length > 0) {
|
|
30527
|
-
throw new Error('TODO');
|
|
30528
|
-
}
|
|
30529
|
-
// Next, use the `SelectorMatcher` to get the list of directives on the node.
|
|
30530
30639
|
const directives = [];
|
|
30531
|
-
this.
|
|
30640
|
+
if (this.directiveMatcher instanceof SelectorMatcher) {
|
|
30641
|
+
// First, determine the HTML shape of the node for the purpose of directive matching.
|
|
30642
|
+
// Do this by building up a `CssSelector` for the node.
|
|
30643
|
+
const cssSelector = createCssSelectorFromNode(node);
|
|
30644
|
+
this.directiveMatcher.match(cssSelector, (_selector, results) => {
|
|
30645
|
+
directives.push(...results);
|
|
30646
|
+
});
|
|
30647
|
+
this.trackSelectorMatchedBindings(node, directives);
|
|
30648
|
+
}
|
|
30649
|
+
else {
|
|
30650
|
+
for (const directive of node.directives) {
|
|
30651
|
+
const matchedDirectives = this.directiveMatcher.match(directive.name);
|
|
30652
|
+
if (matchedDirectives !== null) {
|
|
30653
|
+
directives.push(...matchedDirectives);
|
|
30654
|
+
}
|
|
30655
|
+
}
|
|
30656
|
+
}
|
|
30657
|
+
this.trackMatchedDirectives(node, directives);
|
|
30658
|
+
node.directives.forEach((directive) => directive.visit(this));
|
|
30659
|
+
node.children.forEach((child) => child.visit(this));
|
|
30660
|
+
}
|
|
30661
|
+
trackMatchedDirectives(node, directives) {
|
|
30532
30662
|
if (directives.length > 0) {
|
|
30533
30663
|
this.directives.set(node, directives);
|
|
30534
30664
|
if (!this.isInDeferBlock) {
|
|
30535
30665
|
this.eagerDirectives.push(...directives);
|
|
30536
30666
|
}
|
|
30537
30667
|
}
|
|
30668
|
+
}
|
|
30669
|
+
trackSelectorlessBindings(node, metas) {
|
|
30670
|
+
const setBinding = (meta, attribute, ioType) => {
|
|
30671
|
+
if (meta[ioType].hasBindingPropertyName(attribute.name)) {
|
|
30672
|
+
this.bindings.set(attribute, meta);
|
|
30673
|
+
}
|
|
30674
|
+
};
|
|
30675
|
+
for (const meta of metas) {
|
|
30676
|
+
node.inputs.forEach((input) => setBinding(meta, input, 'inputs'));
|
|
30677
|
+
node.attributes.forEach((attr) => setBinding(meta, attr, 'inputs'));
|
|
30678
|
+
node.outputs.forEach((output) => setBinding(meta, output, 'outputs'));
|
|
30679
|
+
}
|
|
30680
|
+
// TODO(crisbeto): currently it's unclear how references should behave under selectorless,
|
|
30681
|
+
// given that there's one named class which can bring in multiple host directives.
|
|
30682
|
+
// For the time being only register the first directive as the reference target.
|
|
30683
|
+
if (metas.length > 0) {
|
|
30684
|
+
node.references.forEach((ref) => this.references.set(ref, { directive: metas[0], node: node }));
|
|
30685
|
+
}
|
|
30686
|
+
}
|
|
30687
|
+
trackSelectorMatchedBindings(node, directives) {
|
|
30538
30688
|
// Resolve any references that are created on this node.
|
|
30539
30689
|
node.references.forEach((ref) => {
|
|
30540
30690
|
let dirTarget = null;
|
|
@@ -30565,6 +30715,7 @@ class DirectiveBinder {
|
|
|
30565
30715
|
this.references.set(ref, node);
|
|
30566
30716
|
}
|
|
30567
30717
|
});
|
|
30718
|
+
// Associate attributes/bindings on the node with directives or with the node itself.
|
|
30568
30719
|
const setAttributeBinding = (attribute, ioType) => {
|
|
30569
30720
|
const dir = directives.find((dir) => dir[ioType].hasBindingPropertyName(attribute.name));
|
|
30570
30721
|
const binding = dir !== undefined ? dir : node;
|
|
@@ -30579,57 +30730,6 @@ class DirectiveBinder {
|
|
|
30579
30730
|
}
|
|
30580
30731
|
// Node outputs (bound events) can be bound to an output on a directive.
|
|
30581
30732
|
node.outputs.forEach((output) => setAttributeBinding(output, 'outputs'));
|
|
30582
|
-
// Recurse into the node's children.
|
|
30583
|
-
node.children.forEach((child) => child.visit(this));
|
|
30584
|
-
}
|
|
30585
|
-
visitDeferredBlock(deferred) {
|
|
30586
|
-
const wasInDeferBlock = this.isInDeferBlock;
|
|
30587
|
-
this.isInDeferBlock = true;
|
|
30588
|
-
deferred.children.forEach((child) => child.visit(this));
|
|
30589
|
-
this.isInDeferBlock = wasInDeferBlock;
|
|
30590
|
-
deferred.placeholder?.visit(this);
|
|
30591
|
-
deferred.loading?.visit(this);
|
|
30592
|
-
deferred.error?.visit(this);
|
|
30593
|
-
}
|
|
30594
|
-
visitDeferredBlockPlaceholder(block) {
|
|
30595
|
-
block.children.forEach((child) => child.visit(this));
|
|
30596
|
-
}
|
|
30597
|
-
visitDeferredBlockError(block) {
|
|
30598
|
-
block.children.forEach((child) => child.visit(this));
|
|
30599
|
-
}
|
|
30600
|
-
visitDeferredBlockLoading(block) {
|
|
30601
|
-
block.children.forEach((child) => child.visit(this));
|
|
30602
|
-
}
|
|
30603
|
-
visitSwitchBlock(block) {
|
|
30604
|
-
block.cases.forEach((node) => node.visit(this));
|
|
30605
|
-
}
|
|
30606
|
-
visitSwitchBlockCase(block) {
|
|
30607
|
-
block.children.forEach((node) => node.visit(this));
|
|
30608
|
-
}
|
|
30609
|
-
visitForLoopBlock(block) {
|
|
30610
|
-
block.item.visit(this);
|
|
30611
|
-
block.contextVariables.forEach((v) => v.visit(this));
|
|
30612
|
-
block.children.forEach((node) => node.visit(this));
|
|
30613
|
-
block.empty?.visit(this);
|
|
30614
|
-
}
|
|
30615
|
-
visitForLoopBlockEmpty(block) {
|
|
30616
|
-
block.children.forEach((node) => node.visit(this));
|
|
30617
|
-
}
|
|
30618
|
-
visitIfBlock(block) {
|
|
30619
|
-
block.branches.forEach((node) => node.visit(this));
|
|
30620
|
-
}
|
|
30621
|
-
visitIfBlockBranch(block) {
|
|
30622
|
-
block.expressionAlias?.visit(this);
|
|
30623
|
-
block.children.forEach((node) => node.visit(this));
|
|
30624
|
-
}
|
|
30625
|
-
visitContent(content) {
|
|
30626
|
-
content.children.forEach((child) => child.visit(this));
|
|
30627
|
-
}
|
|
30628
|
-
visitComponent(component) {
|
|
30629
|
-
throw new Error('TODO');
|
|
30630
|
-
}
|
|
30631
|
-
visitDirective(directive) {
|
|
30632
|
-
throw new Error('TODO');
|
|
30633
30733
|
}
|
|
30634
30734
|
// Unused visitors.
|
|
30635
30735
|
visitVariable(variable) { }
|
|
@@ -30788,10 +30888,16 @@ class TemplateBinder extends RecursiveAstVisitor {
|
|
|
30788
30888
|
}
|
|
30789
30889
|
}
|
|
30790
30890
|
visitComponent(component) {
|
|
30791
|
-
|
|
30891
|
+
component.inputs.forEach(this.visitNode);
|
|
30892
|
+
component.outputs.forEach(this.visitNode);
|
|
30893
|
+
component.directives.forEach(this.visitNode);
|
|
30894
|
+
component.children.forEach(this.visitNode);
|
|
30895
|
+
component.references.forEach(this.visitNode);
|
|
30792
30896
|
}
|
|
30793
30897
|
visitDirective(directive) {
|
|
30794
|
-
|
|
30898
|
+
directive.inputs.forEach(this.visitNode);
|
|
30899
|
+
directive.outputs.forEach(this.visitNode);
|
|
30900
|
+
directive.references.forEach(this.visitNode);
|
|
30795
30901
|
}
|
|
30796
30902
|
// Unused template visitors
|
|
30797
30903
|
visitText(text) { }
|
|
@@ -31035,7 +31141,7 @@ class R3BoundTarget {
|
|
|
31035
31141
|
const stack = [this.deferredScopes.get(block)];
|
|
31036
31142
|
while (stack.length > 0) {
|
|
31037
31143
|
const current = stack.pop();
|
|
31038
|
-
if (current.
|
|
31144
|
+
if (current.elementLikeInScope.has(element)) {
|
|
31039
31145
|
return true;
|
|
31040
31146
|
}
|
|
31041
31147
|
stack.push(...current.childScopes.values());
|
|
@@ -31062,7 +31168,9 @@ class R3BoundTarget {
|
|
|
31062
31168
|
if (target instanceof Element$1) {
|
|
31063
31169
|
return target;
|
|
31064
31170
|
}
|
|
31065
|
-
if (target instanceof Template
|
|
31171
|
+
if (target instanceof Template ||
|
|
31172
|
+
target.node instanceof Component$1 ||
|
|
31173
|
+
target.node instanceof Directive$1) {
|
|
31066
31174
|
return null;
|
|
31067
31175
|
}
|
|
31068
31176
|
return this.referenceTargetToElement(target.node);
|
|
@@ -32263,7 +32371,7 @@ var FactoryTarget;
|
|
|
32263
32371
|
* @description
|
|
32264
32372
|
* Entry point for all public APIs of the compiler package.
|
|
32265
32373
|
*/
|
|
32266
|
-
new Version('20.0.0-next.
|
|
32374
|
+
new Version('20.0.0-next.8');
|
|
32267
32375
|
|
|
32268
32376
|
//////////////////////////////////////
|
|
32269
32377
|
// THIS FILE HAS GLOBAL SIDE EFFECT //
|
|
@@ -32306,6 +32414,7 @@ exports.CUSTOM_ELEMENTS_SCHEMA = CUSTOM_ELEMENTS_SCHEMA;
|
|
|
32306
32414
|
exports.Call = Call;
|
|
32307
32415
|
exports.Chain = Chain;
|
|
32308
32416
|
exports.CloneVisitor = CloneVisitor;
|
|
32417
|
+
exports.Component = Component$1;
|
|
32309
32418
|
exports.Conditional = Conditional;
|
|
32310
32419
|
exports.ConstantPool = ConstantPool;
|
|
32311
32420
|
exports.Container = Container;
|
|
@@ -32318,6 +32427,7 @@ exports.DeclareFunctionStmt = DeclareFunctionStmt;
|
|
|
32318
32427
|
exports.DeclareVarStmt = DeclareVarStmt;
|
|
32319
32428
|
exports.DeferredBlock = DeferredBlock;
|
|
32320
32429
|
exports.DefinitionMap = DefinitionMap;
|
|
32430
|
+
exports.Directive = Directive$1;
|
|
32321
32431
|
exports.DomElementSchemaRegistry = DomElementSchemaRegistry;
|
|
32322
32432
|
exports.DynamicImportExpr = DynamicImportExpr;
|
|
32323
32433
|
exports.Element = Element$1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-next.
|
|
3
|
+
* @license Angular v20.0.0-next.8
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
var schematics = require('@angular-devkit/schematics');
|
|
10
10
|
var p = require('path');
|
|
11
11
|
var compiler_host = require('./compiler_host-CAfDJO3W.js');
|
|
12
|
-
var compiler = require('./compiler-
|
|
12
|
+
var compiler = require('./compiler-BEZ6sUQS.js');
|
|
13
13
|
var ts = require('typescript');
|
|
14
14
|
var project_tsconfig_paths = require('./project_tsconfig_paths-CDVxT6Ov.js');
|
|
15
15
|
require('@angular-devkit/core');
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-next.
|
|
3
|
+
* @license Angular v20.0.0-next.8
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
require('./compiler-
|
|
9
|
+
require('./compiler-BEZ6sUQS.js');
|
|
10
10
|
require('typescript');
|
|
11
|
-
var checker = require('./checker-
|
|
11
|
+
var checker = require('./checker-DV96LHWz.js');
|
|
12
12
|
require('os');
|
|
13
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
14
|
-
require('./index-
|
|
13
|
+
var apply_import_manager = require('./apply_import_manager-CaG-_cEq.js');
|
|
14
|
+
require('./index-B1R5GL-k.js');
|
|
15
15
|
require('path');
|
|
16
|
-
var project_paths = require('./project_paths-
|
|
16
|
+
var project_paths = require('./project_paths-B-Nevd-p.js');
|
|
17
17
|
var imports = require('./imports-CIX-JgAN.js');
|
|
18
18
|
require('@angular-devkit/core');
|
|
19
19
|
require('node:path/posix');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v20.0.0-next.
|
|
3
|
+
* @license Angular v20.0.0-next.8
|
|
4
4
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var checker = require('./checker-
|
|
12
|
-
var compiler = require('./compiler-
|
|
13
|
-
var index = require('./index-
|
|
11
|
+
var checker = require('./checker-DV96LHWz.js');
|
|
12
|
+
var compiler = require('./compiler-BEZ6sUQS.js');
|
|
13
|
+
var index = require('./index-B1R5GL-k.js');
|
|
14
14
|
require('path');
|
|
15
|
-
var project_paths = require('./project_paths-
|
|
15
|
+
var project_paths = require('./project_paths-B-Nevd-p.js');
|
|
16
16
|
|
|
17
17
|
function getMemberName(member) {
|
|
18
18
|
if (member.name === undefined) {
|