@angular/core 20.0.0-next.6 → 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-DQLNOR5l.d.ts → api.d-KjtSQajV.d.ts} +2 -2
- package/{ng_i18n_closure_mode.d-C9d2CaSt.d.ts → chrome_dev_tools_performance.d-qv7drdAl.d.ts} +17 -2
- package/{discovery.d-CFs2MaLO.d.ts → discovery.d-vJaEafe4.d.ts} +6 -67
- package/event_dispatcher.d-DlbccpYq.d.ts +1 -1
- package/fesm2022/attribute-BWp59EjE.mjs +1 -1
- package/fesm2022/core.mjs +12 -23
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/{debug_node-z_3NG8qT.mjs → debug_node-DEfPCixm.mjs} +211 -92
- 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-CPPwEcg7.mjs → resource-DhKtse7l.mjs} +3 -3
- package/fesm2022/resource-DhKtse7l.mjs.map +1 -0
- package/fesm2022/{root_effect_scheduler-VSXfCzDX.mjs → root_effect_scheduler-BZMWiScf.mjs} +118 -61
- 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 +17 -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 +80 -43
- 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 +4 -4
- package/schematics/bundles/{apply_import_manager-DnMqg1pY.js → apply_import_manager-CaG-_cEq.js} +3 -3
- package/schematics/bundles/{change_tracker-UMPkv-eH.js → change_tracker-ISzWfEHN.js} +3 -3
- package/schematics/bundles/{checker-BFBQyesT.js → checker-DV96LHWz.js} +6 -3
- package/schematics/bundles/cleanup-unused-imports.js +6 -6
- package/schematics/bundles/{compiler-BQ7R7w2v.js → compiler-BEZ6sUQS.js} +195 -84
- 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-D8tMJPKa.js → index-6wv04ZFQ.js} +5 -5
- package/schematics/bundles/{index-Cv4Q415G.js → index-B1R5GL-k.js} +59 -51
- package/schematics/bundles/inject-flags.js +6 -6
- package/schematics/bundles/inject-migration.js +118 -26
- package/schematics/bundles/leading_space-D9nQ8UQC.js +1 -1
- package/schematics/bundles/{migrate_ts_type_references-Cq_ZBuT4.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-ql6qcf_c.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 +10 -4
- package/weak_ref.d-eGOEP9S1.d.ts +1 -1
- package/fesm2022/debug_node-z_3NG8qT.mjs.map +0 -1
- package/fesm2022/resource-CPPwEcg7.mjs.map +0 -1
- package/fesm2022/root_effect_scheduler-VSXfCzDX.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));
|
|
@@ -20201,7 +20224,7 @@ const SCHEMA = [
|
|
|
20201
20224
|
/* added manually to avoid breaking changes */
|
|
20202
20225
|
',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored',
|
|
20203
20226
|
'[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy',
|
|
20204
|
-
'abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy',
|
|
20227
|
+
'abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,search,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy',
|
|
20205
20228
|
'media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume',
|
|
20206
20229
|
':svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex',
|
|
20207
20230
|
':svg:graphics^:svg:|',
|
|
@@ -20268,6 +20291,7 @@ const SCHEMA = [
|
|
|
20268
20291
|
'source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width',
|
|
20269
20292
|
'span^[HTMLElement]|',
|
|
20270
20293
|
'style^[HTMLElement]|!disabled,media,type',
|
|
20294
|
+
'search^[HTMLELement]|',
|
|
20271
20295
|
'caption^[HTMLElement]|align',
|
|
20272
20296
|
'th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width',
|
|
20273
20297
|
'col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width',
|
|
@@ -29125,6 +29149,7 @@ class HtmlAstToIvyAst {
|
|
|
29125
29149
|
return null;
|
|
29126
29150
|
}
|
|
29127
29151
|
const { attributes, boundEvents, references, templateVariables, elementHasInlineTemplate, parsedProperties, templateParsedProperties, i18nAttrsMeta, } = this.prepareAttributes(component.attrs, false);
|
|
29152
|
+
this.validateSelectorlessReferences(references);
|
|
29128
29153
|
const directives = this.extractDirectives(component);
|
|
29129
29154
|
let children;
|
|
29130
29155
|
if (component.attrs.find((attr) => attr.name === 'ngNonBindable')) {
|
|
@@ -29427,6 +29452,7 @@ class HtmlAstToIvyAst {
|
|
|
29427
29452
|
continue;
|
|
29428
29453
|
}
|
|
29429
29454
|
const { attributes, parsedProperties, boundEvents, references, i18nAttrsMeta } = this.prepareAttributes(directive.attrs, false);
|
|
29455
|
+
this.validateSelectorlessReferences(references);
|
|
29430
29456
|
const { bound: inputs } = this.categorizePropertyAttributes(elementName, parsedProperties, i18nAttrsMeta);
|
|
29431
29457
|
for (const input of inputs) {
|
|
29432
29458
|
if (input.type !== exports.BindingType.Property && input.type !== exports.BindingType.TwoWay) {
|
|
@@ -29510,6 +29536,23 @@ class HtmlAstToIvyAst {
|
|
|
29510
29536
|
/* isAssignmentEvent */ true, sourceSpan, valueSpan || sourceSpan, targetMatchableAttrs, events, keySpan);
|
|
29511
29537
|
addEvents(events, boundEvents);
|
|
29512
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
|
+
}
|
|
29513
29556
|
reportError(message, sourceSpan, level = ParseErrorLevel.ERROR) {
|
|
29514
29557
|
this.errors.push(new ParseError(sourceSpan, message, level));
|
|
29515
29558
|
}
|
|
@@ -29611,6 +29654,7 @@ function parseTemplate(template, templateUrl, options = {}) {
|
|
|
29611
29654
|
tokenizeExpansionForms: true,
|
|
29612
29655
|
tokenizeBlocks: options.enableBlockSyntax ?? true,
|
|
29613
29656
|
tokenizeLet: options.enableLetSyntax ?? true,
|
|
29657
|
+
selectorlessEnabled: options.enableSelectorless ?? false,
|
|
29614
29658
|
});
|
|
29615
29659
|
if (!options.alwaysAttemptHtmlToR3AstConversion &&
|
|
29616
29660
|
parseResult.errors &&
|
|
@@ -30288,9 +30332,9 @@ class Scope {
|
|
|
30288
30332
|
*/
|
|
30289
30333
|
namedEntities = new Map();
|
|
30290
30334
|
/**
|
|
30291
|
-
* Set of
|
|
30335
|
+
* Set of element-like nodes that belong to this scope.
|
|
30292
30336
|
*/
|
|
30293
|
-
|
|
30337
|
+
elementLikeInScope = new Set();
|
|
30294
30338
|
/**
|
|
30295
30339
|
* Child `Scope`s for immediately nested `ScopedNode`s.
|
|
30296
30340
|
*/
|
|
@@ -30351,12 +30395,7 @@ class Scope {
|
|
|
30351
30395
|
}
|
|
30352
30396
|
}
|
|
30353
30397
|
visitElement(element) {
|
|
30354
|
-
|
|
30355
|
-
// `Element`s in the template may have `Reference`s which are captured in the scope.
|
|
30356
|
-
element.references.forEach((node) => this.visitReference(node));
|
|
30357
|
-
// Recurse into the `Element`'s children.
|
|
30358
|
-
element.children.forEach((node) => node.visit(this));
|
|
30359
|
-
this.elementsInScope.add(element);
|
|
30398
|
+
this.visitElementLike(element);
|
|
30360
30399
|
}
|
|
30361
30400
|
visitTemplate(template) {
|
|
30362
30401
|
template.directives.forEach((node) => node.visit(this));
|
|
@@ -30415,10 +30454,10 @@ class Scope {
|
|
|
30415
30454
|
this.maybeDeclare(decl);
|
|
30416
30455
|
}
|
|
30417
30456
|
visitComponent(component) {
|
|
30418
|
-
|
|
30457
|
+
this.visitElementLike(component);
|
|
30419
30458
|
}
|
|
30420
30459
|
visitDirective(directive) {
|
|
30421
|
-
|
|
30460
|
+
directive.references.forEach((current) => this.visitReference(current));
|
|
30422
30461
|
}
|
|
30423
30462
|
// Unused visitors.
|
|
30424
30463
|
visitBoundAttribute(attr) { }
|
|
@@ -30429,6 +30468,12 @@ class Scope {
|
|
|
30429
30468
|
visitIcu(icu) { }
|
|
30430
30469
|
visitDeferredTrigger(trigger) { }
|
|
30431
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
|
+
}
|
|
30432
30477
|
maybeDeclare(thing) {
|
|
30433
30478
|
// Declare something with a name, as long as that name isn't taken.
|
|
30434
30479
|
if (!this.namedEntities.has(thing.name)) {
|
|
@@ -30478,15 +30523,15 @@ class Scope {
|
|
|
30478
30523
|
* Usually used via the static `apply()` method.
|
|
30479
30524
|
*/
|
|
30480
30525
|
class DirectiveBinder {
|
|
30481
|
-
|
|
30526
|
+
directiveMatcher;
|
|
30482
30527
|
directives;
|
|
30483
30528
|
eagerDirectives;
|
|
30484
30529
|
bindings;
|
|
30485
30530
|
references;
|
|
30486
30531
|
// Indicates whether we are visiting elements within a `defer` block
|
|
30487
30532
|
isInDeferBlock = false;
|
|
30488
|
-
constructor(
|
|
30489
|
-
this.
|
|
30533
|
+
constructor(directiveMatcher, directives, eagerDirectives, bindings, references) {
|
|
30534
|
+
this.directiveMatcher = directiveMatcher;
|
|
30490
30535
|
this.directives = directives;
|
|
30491
30536
|
this.eagerDirectives = eagerDirectives;
|
|
30492
30537
|
this.bindings = bindings;
|
|
@@ -30504,8 +30549,8 @@ class DirectiveBinder {
|
|
|
30504
30549
|
* map which resolves #references (`Reference`s) within the template to the named directive or
|
|
30505
30550
|
* template node.
|
|
30506
30551
|
*/
|
|
30507
|
-
static apply(template,
|
|
30508
|
-
const matcher = new DirectiveBinder(
|
|
30552
|
+
static apply(template, directiveMatcher, directives, eagerDirectives, bindings, references) {
|
|
30553
|
+
const matcher = new DirectiveBinder(directiveMatcher, directives, eagerDirectives, bindings, references);
|
|
30509
30554
|
matcher.ingest(template);
|
|
30510
30555
|
}
|
|
30511
30556
|
ingest(template) {
|
|
@@ -30517,23 +30562,129 @@ class DirectiveBinder {
|
|
|
30517
30562
|
visitTemplate(template) {
|
|
30518
30563
|
this.visitElementOrTemplate(template);
|
|
30519
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
|
+
}
|
|
30520
30638
|
visitElementOrTemplate(node) {
|
|
30521
|
-
// First, determine the HTML shape of the node for the purpose of directive matching.
|
|
30522
|
-
// Do this by building up a `CssSelector` for the node.
|
|
30523
|
-
const cssSelector = createCssSelectorFromNode(node);
|
|
30524
|
-
// TODO(crisbeto): account for selectorless directives here.
|
|
30525
|
-
if (node.directives.length > 0) {
|
|
30526
|
-
throw new Error('TODO');
|
|
30527
|
-
}
|
|
30528
|
-
// Next, use the `SelectorMatcher` to get the list of directives on the node.
|
|
30529
30639
|
const directives = [];
|
|
30530
|
-
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) {
|
|
30531
30662
|
if (directives.length > 0) {
|
|
30532
30663
|
this.directives.set(node, directives);
|
|
30533
30664
|
if (!this.isInDeferBlock) {
|
|
30534
30665
|
this.eagerDirectives.push(...directives);
|
|
30535
30666
|
}
|
|
30536
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) {
|
|
30537
30688
|
// Resolve any references that are created on this node.
|
|
30538
30689
|
node.references.forEach((ref) => {
|
|
30539
30690
|
let dirTarget = null;
|
|
@@ -30564,6 +30715,7 @@ class DirectiveBinder {
|
|
|
30564
30715
|
this.references.set(ref, node);
|
|
30565
30716
|
}
|
|
30566
30717
|
});
|
|
30718
|
+
// Associate attributes/bindings on the node with directives or with the node itself.
|
|
30567
30719
|
const setAttributeBinding = (attribute, ioType) => {
|
|
30568
30720
|
const dir = directives.find((dir) => dir[ioType].hasBindingPropertyName(attribute.name));
|
|
30569
30721
|
const binding = dir !== undefined ? dir : node;
|
|
@@ -30578,57 +30730,6 @@ class DirectiveBinder {
|
|
|
30578
30730
|
}
|
|
30579
30731
|
// Node outputs (bound events) can be bound to an output on a directive.
|
|
30580
30732
|
node.outputs.forEach((output) => setAttributeBinding(output, 'outputs'));
|
|
30581
|
-
// Recurse into the node's children.
|
|
30582
|
-
node.children.forEach((child) => child.visit(this));
|
|
30583
|
-
}
|
|
30584
|
-
visitDeferredBlock(deferred) {
|
|
30585
|
-
const wasInDeferBlock = this.isInDeferBlock;
|
|
30586
|
-
this.isInDeferBlock = true;
|
|
30587
|
-
deferred.children.forEach((child) => child.visit(this));
|
|
30588
|
-
this.isInDeferBlock = wasInDeferBlock;
|
|
30589
|
-
deferred.placeholder?.visit(this);
|
|
30590
|
-
deferred.loading?.visit(this);
|
|
30591
|
-
deferred.error?.visit(this);
|
|
30592
|
-
}
|
|
30593
|
-
visitDeferredBlockPlaceholder(block) {
|
|
30594
|
-
block.children.forEach((child) => child.visit(this));
|
|
30595
|
-
}
|
|
30596
|
-
visitDeferredBlockError(block) {
|
|
30597
|
-
block.children.forEach((child) => child.visit(this));
|
|
30598
|
-
}
|
|
30599
|
-
visitDeferredBlockLoading(block) {
|
|
30600
|
-
block.children.forEach((child) => child.visit(this));
|
|
30601
|
-
}
|
|
30602
|
-
visitSwitchBlock(block) {
|
|
30603
|
-
block.cases.forEach((node) => node.visit(this));
|
|
30604
|
-
}
|
|
30605
|
-
visitSwitchBlockCase(block) {
|
|
30606
|
-
block.children.forEach((node) => node.visit(this));
|
|
30607
|
-
}
|
|
30608
|
-
visitForLoopBlock(block) {
|
|
30609
|
-
block.item.visit(this);
|
|
30610
|
-
block.contextVariables.forEach((v) => v.visit(this));
|
|
30611
|
-
block.children.forEach((node) => node.visit(this));
|
|
30612
|
-
block.empty?.visit(this);
|
|
30613
|
-
}
|
|
30614
|
-
visitForLoopBlockEmpty(block) {
|
|
30615
|
-
block.children.forEach((node) => node.visit(this));
|
|
30616
|
-
}
|
|
30617
|
-
visitIfBlock(block) {
|
|
30618
|
-
block.branches.forEach((node) => node.visit(this));
|
|
30619
|
-
}
|
|
30620
|
-
visitIfBlockBranch(block) {
|
|
30621
|
-
block.expressionAlias?.visit(this);
|
|
30622
|
-
block.children.forEach((node) => node.visit(this));
|
|
30623
|
-
}
|
|
30624
|
-
visitContent(content) {
|
|
30625
|
-
content.children.forEach((child) => child.visit(this));
|
|
30626
|
-
}
|
|
30627
|
-
visitComponent(component) {
|
|
30628
|
-
throw new Error('TODO');
|
|
30629
|
-
}
|
|
30630
|
-
visitDirective(directive) {
|
|
30631
|
-
throw new Error('TODO');
|
|
30632
30733
|
}
|
|
30633
30734
|
// Unused visitors.
|
|
30634
30735
|
visitVariable(variable) { }
|
|
@@ -30787,10 +30888,16 @@ class TemplateBinder extends RecursiveAstVisitor {
|
|
|
30787
30888
|
}
|
|
30788
30889
|
}
|
|
30789
30890
|
visitComponent(component) {
|
|
30790
|
-
|
|
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);
|
|
30791
30896
|
}
|
|
30792
30897
|
visitDirective(directive) {
|
|
30793
|
-
|
|
30898
|
+
directive.inputs.forEach(this.visitNode);
|
|
30899
|
+
directive.outputs.forEach(this.visitNode);
|
|
30900
|
+
directive.references.forEach(this.visitNode);
|
|
30794
30901
|
}
|
|
30795
30902
|
// Unused template visitors
|
|
30796
30903
|
visitText(text) { }
|
|
@@ -31034,7 +31141,7 @@ class R3BoundTarget {
|
|
|
31034
31141
|
const stack = [this.deferredScopes.get(block)];
|
|
31035
31142
|
while (stack.length > 0) {
|
|
31036
31143
|
const current = stack.pop();
|
|
31037
|
-
if (current.
|
|
31144
|
+
if (current.elementLikeInScope.has(element)) {
|
|
31038
31145
|
return true;
|
|
31039
31146
|
}
|
|
31040
31147
|
stack.push(...current.childScopes.values());
|
|
@@ -31061,7 +31168,9 @@ class R3BoundTarget {
|
|
|
31061
31168
|
if (target instanceof Element$1) {
|
|
31062
31169
|
return target;
|
|
31063
31170
|
}
|
|
31064
|
-
if (target instanceof Template
|
|
31171
|
+
if (target instanceof Template ||
|
|
31172
|
+
target.node instanceof Component$1 ||
|
|
31173
|
+
target.node instanceof Directive$1) {
|
|
31065
31174
|
return null;
|
|
31066
31175
|
}
|
|
31067
31176
|
return this.referenceTargetToElement(target.node);
|
|
@@ -32262,7 +32371,7 @@ var FactoryTarget;
|
|
|
32262
32371
|
* @description
|
|
32263
32372
|
* Entry point for all public APIs of the compiler package.
|
|
32264
32373
|
*/
|
|
32265
|
-
new Version('20.0.0-next.
|
|
32374
|
+
new Version('20.0.0-next.8');
|
|
32266
32375
|
|
|
32267
32376
|
//////////////////////////////////////
|
|
32268
32377
|
// THIS FILE HAS GLOBAL SIDE EFFECT //
|
|
@@ -32305,6 +32414,7 @@ exports.CUSTOM_ELEMENTS_SCHEMA = CUSTOM_ELEMENTS_SCHEMA;
|
|
|
32305
32414
|
exports.Call = Call;
|
|
32306
32415
|
exports.Chain = Chain;
|
|
32307
32416
|
exports.CloneVisitor = CloneVisitor;
|
|
32417
|
+
exports.Component = Component$1;
|
|
32308
32418
|
exports.Conditional = Conditional;
|
|
32309
32419
|
exports.ConstantPool = ConstantPool;
|
|
32310
32420
|
exports.Container = Container;
|
|
@@ -32317,6 +32427,7 @@ exports.DeclareFunctionStmt = DeclareFunctionStmt;
|
|
|
32317
32427
|
exports.DeclareVarStmt = DeclareVarStmt;
|
|
32318
32428
|
exports.DeferredBlock = DeferredBlock;
|
|
32319
32429
|
exports.DefinitionMap = DefinitionMap;
|
|
32430
|
+
exports.Directive = Directive$1;
|
|
32320
32431
|
exports.DomElementSchemaRegistry = DomElementSchemaRegistry;
|
|
32321
32432
|
exports.DynamicImportExpr = DynamicImportExpr;
|
|
32322
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) {
|