@angular/core 19.2.0-next.2 → 19.2.0-next.3
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/core.mjs +128 -83
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +5 -5
- package/index.d.ts +25 -10
- package/package.json +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 +1 -1
- package/schematics/bundles/{apply_import_manager-d8ea426b.js → apply_import_manager-f4d044b2.js} +3 -3
- package/schematics/bundles/{checker-9af84be9.js → checker-32db85a6.js} +87 -50
- package/schematics/bundles/cleanup-unused-imports.js +6 -6
- package/schematics/bundles/{compiler_host-dbff2781.js → compiler_host-540e221c.js} +2 -2
- package/schematics/bundles/control-flow-migration.js +10 -3
- package/schematics/bundles/explicit-standalone-flag.js +5 -5
- package/schematics/bundles/{imports-31a38653.js → imports-abe29092.js} +1 -1
- package/schematics/bundles/{index-93e324de.js → index-7ee8967e.js} +4 -4
- package/schematics/bundles/{index-23b503a4.js → index-d5020c9c.js} +4 -4
- package/schematics/bundles/inject-migration.js +6 -6
- package/schematics/bundles/{leading_space-6e7a8ec6.js → leading_space-d190b83b.js} +1 -1
- package/schematics/bundles/{migrate_ts_type_references-c6615b87.js → migrate_ts_type_references-26986908.js} +6 -6
- package/schematics/bundles/{nodes-88c2157f.js → nodes-a9f0b985.js} +2 -2
- package/schematics/bundles/output-migration.js +6 -6
- package/schematics/bundles/pending-tasks.js +5 -5
- package/schematics/bundles/{program-66386e72.js → program-507de2f1.js} +34 -20
- package/schematics/bundles/{project_tsconfig_paths-6c9cde78.js → project_tsconfig_paths-e9ccccbf.js} +1 -1
- package/schematics/bundles/provide-initializer.js +5 -5
- package/schematics/bundles/route-lazy-loading.js +4 -4
- 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 +8 -8
- package/testing/index.d.ts +1 -1
package/fesm2022/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.2.0-next.
|
|
2
|
+
* @license Angular v19.2.0-next.3
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -175,10 +175,10 @@ class TestBedApplicationErrorHandler {
|
|
|
175
175
|
throw e;
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0-next.
|
|
179
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.0-next.
|
|
178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0-next.3", ngImport: i0, type: TestBedApplicationErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
179
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.0-next.3", ngImport: i0, type: TestBedApplicationErrorHandler });
|
|
180
180
|
}
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0-next.
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0-next.3", ngImport: i0, type: TestBedApplicationErrorHandler, decorators: [{
|
|
182
182
|
type: Injectable
|
|
183
183
|
}] });
|
|
184
184
|
|
|
@@ -246,7 +246,7 @@ class ComponentFixture {
|
|
|
246
246
|
this.componentRef = componentRef;
|
|
247
247
|
if (this.autoDetect) {
|
|
248
248
|
this._testAppRef.externalTestViews.add(this.componentRef.hostView);
|
|
249
|
-
this.scheduler?.notify(
|
|
249
|
+
this.scheduler?.notify(8 /* ɵNotificationSource.ViewAttached */);
|
|
250
250
|
this.scheduler?.notify(0 /* ɵNotificationSource.MarkAncestorsForTraversal */);
|
|
251
251
|
}
|
|
252
252
|
this.componentRef.hostView.onDestroy(() => {
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.2.0-next.
|
|
2
|
+
* @license Angular v19.2.0-next.3
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -29,6 +29,8 @@ export declare interface AbstractType<T> extends Function {
|
|
|
29
29
|
prototype: T;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
declare const AFTER_RENDER_SEQUENCES_TO_ADD = 25;
|
|
33
|
+
|
|
32
34
|
/**
|
|
33
35
|
* @description
|
|
34
36
|
* A lifecycle hook that is called after the default change detector has
|
|
@@ -486,6 +488,7 @@ declare class AfterRenderImpl {
|
|
|
486
488
|
*/
|
|
487
489
|
execute(): void;
|
|
488
490
|
register(sequence: AfterRenderSequence): void;
|
|
491
|
+
addSequence(sequence: AfterRenderSequence): void;
|
|
489
492
|
unregister(sequence: AfterRenderSequence): void;
|
|
490
493
|
protected maybeTrace<T>(fn: () => T, snapshot: ɵTracingSnapshot | null): T;
|
|
491
494
|
/** @nocollapse */
|
|
@@ -605,6 +608,7 @@ export declare interface AfterRenderRef {
|
|
|
605
608
|
declare class AfterRenderSequence implements AfterRenderRef {
|
|
606
609
|
readonly impl: AfterRenderImpl;
|
|
607
610
|
readonly hooks: AfterRenderHooks;
|
|
611
|
+
readonly view: LView | undefined;
|
|
608
612
|
once: boolean;
|
|
609
613
|
snapshot: ɵTracingSnapshot | null;
|
|
610
614
|
/**
|
|
@@ -618,7 +622,7 @@ declare class AfterRenderSequence implements AfterRenderRef {
|
|
|
618
622
|
*/
|
|
619
623
|
pipelinedValue: unknown;
|
|
620
624
|
private unregisterOnDestroy;
|
|
621
|
-
constructor(impl: AfterRenderImpl, hooks: AfterRenderHooks, once: boolean, destroyRef: DestroyRef | null, snapshot?: ɵTracingSnapshot | null);
|
|
625
|
+
constructor(impl: AfterRenderImpl, hooks: AfterRenderHooks, view: LView | undefined, once: boolean, destroyRef: DestroyRef | null, snapshot?: ɵTracingSnapshot | null);
|
|
622
626
|
afterRun(): void;
|
|
623
627
|
destroy(): void;
|
|
624
628
|
}
|
|
@@ -5612,6 +5616,13 @@ declare const ID = 19;
|
|
|
5612
5616
|
*/
|
|
5613
5617
|
export declare type ImportedNgModuleProviders = EnvironmentProviders;
|
|
5614
5618
|
|
|
5619
|
+
/** Represents `import.meta` plus some information that's not in the built-in types. */
|
|
5620
|
+
declare type ImportMetaExtended = ImportMeta & {
|
|
5621
|
+
hot?: {
|
|
5622
|
+
send?: (name: string, payload: unknown) => void;
|
|
5623
|
+
};
|
|
5624
|
+
};
|
|
5625
|
+
|
|
5615
5626
|
/**
|
|
5616
5627
|
* Collects providers from all NgModules and standalone components, including transitively imported
|
|
5617
5628
|
* ones.
|
|
@@ -7311,6 +7322,7 @@ declare interface LView<T = unknown> extends Array<any> {
|
|
|
7311
7322
|
* if any signals were read.
|
|
7312
7323
|
*/
|
|
7313
7324
|
[REACTIVE_TEMPLATE_CONSUMER]: ReactiveLViewConsumer | null;
|
|
7325
|
+
[AFTER_RENDER_SEQUENCES_TO_ADD]: AfterRenderSequence[] | null;
|
|
7314
7326
|
}
|
|
7315
7327
|
|
|
7316
7328
|
/**
|
|
@@ -14247,13 +14259,12 @@ export declare const enum ɵNotificationSource {
|
|
|
14247
14259
|
Listener = 5,
|
|
14248
14260
|
CustomElement = 6,
|
|
14249
14261
|
RenderHook = 7,
|
|
14250
|
-
|
|
14251
|
-
|
|
14252
|
-
|
|
14253
|
-
|
|
14254
|
-
|
|
14255
|
-
|
|
14256
|
-
ViewEffect = 14
|
|
14262
|
+
ViewAttached = 8,
|
|
14263
|
+
ViewDetachedFromDOM = 9,
|
|
14264
|
+
AsyncAnimationsLoaded = 10,
|
|
14265
|
+
PendingTaskRemoved = 11,
|
|
14266
|
+
RootEffect = 12,
|
|
14267
|
+
ViewEffect = 13
|
|
14257
14268
|
}
|
|
14258
14269
|
|
|
14259
14270
|
/**
|
|
@@ -17938,9 +17949,13 @@ export declare function ɵɵrepeaterTrackByIndex(index: number): number;
|
|
|
17938
17949
|
* @param applyMetadata Callback that will apply a new set of metadata on the `type` when invoked.
|
|
17939
17950
|
* @param environment Syntehtic namespace imports that need to be passed along to the callback.
|
|
17940
17951
|
* @param locals Local symbols from the source location that have to be exposed to the callback.
|
|
17952
|
+
* @param importMeta `import.meta` from the call site of the replacement function. Optional since
|
|
17953
|
+
* it isn't used internally.
|
|
17954
|
+
* @param id ID to the class being replaced. **Not** the same as the component definition ID.
|
|
17955
|
+
* Optional since the ID might not be available internally.
|
|
17941
17956
|
* @codeGenApi
|
|
17942
17957
|
*/
|
|
17943
|
-
export declare function ɵɵreplaceMetadata(type: Type<unknown>, applyMetadata: (...args: [Type<unknown>, unknown[], ...unknown[]]) => void, namespaces: unknown[], locals: unknown[]): void;
|
|
17958
|
+
export declare function ɵɵreplaceMetadata(type: Type<unknown>, applyMetadata: (...args: [Type<unknown>, unknown[], ...unknown[]]) => void, namespaces: unknown[], locals: unknown[], importMeta?: ImportMetaExtended | null, id?: string | null): void;
|
|
17944
17959
|
|
|
17945
17960
|
/**
|
|
17946
17961
|
* Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in
|
package/package.json
CHANGED
package/rxjs-interop/index.d.ts
CHANGED
package/schematics/bundles/{apply_import_manager-d8ea426b.js → apply_import_manager-f4d044b2.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.0-next.
|
|
3
|
+
* @license Angular v19.2.0-next.3
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -10,8 +10,8 @@ var core = require('@angular-devkit/core');
|
|
|
10
10
|
var posixPath = require('node:path/posix');
|
|
11
11
|
var os = require('os');
|
|
12
12
|
var ts = require('typescript');
|
|
13
|
-
var checker = require('./checker-
|
|
14
|
-
var program = require('./program-
|
|
13
|
+
var checker = require('./checker-32db85a6.js');
|
|
14
|
+
var program = require('./program-507de2f1.js');
|
|
15
15
|
require('path');
|
|
16
16
|
|
|
17
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.0-next.
|
|
3
|
+
* @license Angular v19.2.0-next.3
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -10118,7 +10118,14 @@ function transformExpressionsInOp(op, transform, flags) {
|
|
|
10118
10118
|
op.trustedValueFn && transformExpressionsInExpression(op.trustedValueFn, transform, flags);
|
|
10119
10119
|
break;
|
|
10120
10120
|
case OpKind.RepeaterCreate:
|
|
10121
|
-
|
|
10121
|
+
if (op.trackByOps === null) {
|
|
10122
|
+
op.track = transformExpressionsInExpression(op.track, transform, flags);
|
|
10123
|
+
}
|
|
10124
|
+
else {
|
|
10125
|
+
for (const innerOp of op.trackByOps) {
|
|
10126
|
+
transformExpressionsInOp(innerOp, transform, flags | VisitorContextFlag.InChildOperation);
|
|
10127
|
+
}
|
|
10128
|
+
}
|
|
10122
10129
|
if (op.trackByFn !== null) {
|
|
10123
10130
|
op.trackByFn = transformExpressionsInExpression(op.trackByFn, transform, flags);
|
|
10124
10131
|
}
|
|
@@ -10647,6 +10654,7 @@ function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, em
|
|
|
10647
10654
|
emptyView,
|
|
10648
10655
|
track,
|
|
10649
10656
|
trackByFn: null,
|
|
10657
|
+
trackByOps: null,
|
|
10650
10658
|
tag,
|
|
10651
10659
|
emptyTag,
|
|
10652
10660
|
emptyAttributes: null,
|
|
@@ -11147,6 +11155,11 @@ class CompilationUnit {
|
|
|
11147
11155
|
yield listenerOp;
|
|
11148
11156
|
}
|
|
11149
11157
|
}
|
|
11158
|
+
else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
|
|
11159
|
+
for (const trackOp of op.trackByOps) {
|
|
11160
|
+
yield trackOp;
|
|
11161
|
+
}
|
|
11162
|
+
}
|
|
11150
11163
|
}
|
|
11151
11164
|
for (const op of this.update) {
|
|
11152
11165
|
yield op;
|
|
@@ -12874,6 +12887,9 @@ function recursivelyProcessView(view, parentScope) {
|
|
|
12874
12887
|
if (op.emptyView) {
|
|
12875
12888
|
recursivelyProcessView(view.job.views.get(op.emptyView), scope);
|
|
12876
12889
|
}
|
|
12890
|
+
if (op.trackByOps !== null) {
|
|
12891
|
+
op.trackByOps.prepend(generateVariablesInScopeForView(view, scope, false));
|
|
12892
|
+
}
|
|
12877
12893
|
break;
|
|
12878
12894
|
case OpKind.Listener:
|
|
12879
12895
|
case OpKind.TwoWayListener:
|
|
@@ -23103,7 +23119,7 @@ function reifyCreateOperations(unit, ops) {
|
|
|
23103
23119
|
emptyDecls = emptyView.decls;
|
|
23104
23120
|
emptyVars = emptyView.vars;
|
|
23105
23121
|
}
|
|
23106
|
-
OpList.replace(op, repeaterCreate(op.handle.slot, repeaterView.fnName, op.decls, op.vars, op.tag, op.attributes, op
|
|
23122
|
+
OpList.replace(op, repeaterCreate(op.handle.slot, repeaterView.fnName, op.decls, op.vars, op.tag, op.attributes, reifyTrackBy(unit, op), op.usesComponentInstance, emptyViewFnName, emptyDecls, emptyVars, op.emptyTag, op.emptyAttributes, op.wholeSourceSpan));
|
|
23107
23123
|
break;
|
|
23108
23124
|
case OpKind.SourceLocation:
|
|
23109
23125
|
const locationsLiteral = literalArr(op.locations.map(({ targetSlot, offset, line, column }) => {
|
|
@@ -23284,6 +23300,8 @@ function reifyIrExpression(expr) {
|
|
|
23284
23300
|
return readContextLet(expr.targetSlot.slot);
|
|
23285
23301
|
case ExpressionKind.StoreLet:
|
|
23286
23302
|
return storeLet(expr.value, expr.sourceSpan);
|
|
23303
|
+
case ExpressionKind.TrackContext:
|
|
23304
|
+
return variable('this');
|
|
23287
23305
|
default:
|
|
23288
23306
|
throw new Error(`AssertionError: Unsupported reification of ir.Expression kind: ${ExpressionKind[expr.kind]}`);
|
|
23289
23307
|
}
|
|
@@ -23312,6 +23330,42 @@ function reifyListenerHandler(unit, name, handlerOps, consumesDollarEvent) {
|
|
|
23312
23330
|
}
|
|
23313
23331
|
return fn(params, handlerStmts, undefined, undefined, name);
|
|
23314
23332
|
}
|
|
23333
|
+
/** Reifies the tracking expression of a `RepeaterCreateOp`. */
|
|
23334
|
+
function reifyTrackBy(unit, op) {
|
|
23335
|
+
// If the tracking function was created already, there's nothing left to do.
|
|
23336
|
+
if (op.trackByFn !== null) {
|
|
23337
|
+
return op.trackByFn;
|
|
23338
|
+
}
|
|
23339
|
+
const params = [new FnParam('$index'), new FnParam('$item')];
|
|
23340
|
+
let fn$1;
|
|
23341
|
+
if (op.trackByOps === null) {
|
|
23342
|
+
// If there are no additional ops related to the tracking function, we just need
|
|
23343
|
+
// to turn it into a function that returns the result of the expression.
|
|
23344
|
+
fn$1 = op.usesComponentInstance
|
|
23345
|
+
? fn(params, [new ReturnStatement(op.track)])
|
|
23346
|
+
: arrowFn(params, op.track);
|
|
23347
|
+
}
|
|
23348
|
+
else {
|
|
23349
|
+
// Otherwise first we need to reify the track-related ops.
|
|
23350
|
+
reifyUpdateOperations(unit, op.trackByOps);
|
|
23351
|
+
const statements = [];
|
|
23352
|
+
for (const trackOp of op.trackByOps) {
|
|
23353
|
+
if (trackOp.kind !== OpKind.Statement) {
|
|
23354
|
+
throw new Error(`AssertionError: expected reified statements, but found op ${OpKind[trackOp.kind]}`);
|
|
23355
|
+
}
|
|
23356
|
+
statements.push(trackOp.statement);
|
|
23357
|
+
}
|
|
23358
|
+
// Afterwards we can create the function from those ops.
|
|
23359
|
+
fn$1 =
|
|
23360
|
+
op.usesComponentInstance ||
|
|
23361
|
+
statements.length !== 1 ||
|
|
23362
|
+
!(statements[0] instanceof ReturnStatement)
|
|
23363
|
+
? fn(params, statements)
|
|
23364
|
+
: arrowFn(params, statements[0].value);
|
|
23365
|
+
}
|
|
23366
|
+
op.trackByFn = unit.job.pool.getSharedFunctionReference(fn$1, '_forTrack');
|
|
23367
|
+
return op.trackByFn;
|
|
23368
|
+
}
|
|
23315
23369
|
|
|
23316
23370
|
/**
|
|
23317
23371
|
* Binding with no content can be safely deleted.
|
|
@@ -23410,6 +23464,11 @@ function processLexicalScope$1(view, ops) {
|
|
|
23410
23464
|
case OpKind.TwoWayListener:
|
|
23411
23465
|
processLexicalScope$1(view, op.handlerOps);
|
|
23412
23466
|
break;
|
|
23467
|
+
case OpKind.RepeaterCreate:
|
|
23468
|
+
if (op.trackByOps !== null) {
|
|
23469
|
+
processLexicalScope$1(view, op.trackByOps);
|
|
23470
|
+
}
|
|
23471
|
+
break;
|
|
23413
23472
|
}
|
|
23414
23473
|
}
|
|
23415
23474
|
if (view === view.job.root) {
|
|
@@ -23842,6 +23901,11 @@ function processLexicalScope(unit, ops, savedView) {
|
|
|
23842
23901
|
// lexical scope.
|
|
23843
23902
|
processLexicalScope(unit, op.handlerOps, savedView);
|
|
23844
23903
|
break;
|
|
23904
|
+
case OpKind.RepeaterCreate:
|
|
23905
|
+
if (op.trackByOps !== null) {
|
|
23906
|
+
processLexicalScope(unit, op.trackByOps, savedView);
|
|
23907
|
+
}
|
|
23908
|
+
break;
|
|
23845
23909
|
}
|
|
23846
23910
|
}
|
|
23847
23911
|
// Next, use the `scope` mapping to match `ir.LexicalReadExpr` with defined names in the lexical
|
|
@@ -24242,6 +24306,9 @@ function generateTemporaries(ops) {
|
|
|
24242
24306
|
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
24243
24307
|
op.handlerOps.prepend(generateTemporaries(op.handlerOps));
|
|
24244
24308
|
}
|
|
24309
|
+
else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
|
|
24310
|
+
op.trackByOps.prepend(generateTemporaries(op.trackByOps));
|
|
24311
|
+
}
|
|
24245
24312
|
}
|
|
24246
24313
|
return generatedStatements;
|
|
24247
24314
|
}
|
|
@@ -24256,49 +24323,6 @@ function assignName(names, expr) {
|
|
|
24256
24323
|
expr.name = name;
|
|
24257
24324
|
}
|
|
24258
24325
|
|
|
24259
|
-
/**
|
|
24260
|
-
* Generate track functions that need to be extracted to the constant pool. This entails wrapping
|
|
24261
|
-
* them in an arrow (or traditional) function, replacing context reads with `this.`, and storing
|
|
24262
|
-
* them in the constant pool.
|
|
24263
|
-
*
|
|
24264
|
-
* Note that, if a track function was previously optimized, it will not need to be extracted, and
|
|
24265
|
-
* this phase is a no-op.
|
|
24266
|
-
*/
|
|
24267
|
-
function generateTrackFns(job) {
|
|
24268
|
-
for (const unit of job.units) {
|
|
24269
|
-
for (const op of unit.create) {
|
|
24270
|
-
if (op.kind !== OpKind.RepeaterCreate) {
|
|
24271
|
-
continue;
|
|
24272
|
-
}
|
|
24273
|
-
if (op.trackByFn !== null) {
|
|
24274
|
-
// The final track function was already set, probably because it was optimized.
|
|
24275
|
-
continue;
|
|
24276
|
-
}
|
|
24277
|
-
// Find all component context reads.
|
|
24278
|
-
let usesComponentContext = false;
|
|
24279
|
-
op.track = transformExpressionsInExpression(op.track, (expr) => {
|
|
24280
|
-
if (expr instanceof PipeBindingExpr || expr instanceof PipeBindingVariadicExpr) {
|
|
24281
|
-
throw new Error(`Illegal State: Pipes are not allowed in this context`);
|
|
24282
|
-
}
|
|
24283
|
-
if (expr instanceof TrackContextExpr) {
|
|
24284
|
-
usesComponentContext = true;
|
|
24285
|
-
return variable('this');
|
|
24286
|
-
}
|
|
24287
|
-
return expr;
|
|
24288
|
-
}, VisitorContextFlag.None);
|
|
24289
|
-
let fn;
|
|
24290
|
-
const fnParams = [new FnParam('$index'), new FnParam('$item')];
|
|
24291
|
-
if (usesComponentContext) {
|
|
24292
|
-
fn = new FunctionExpr(fnParams, [new ReturnStatement(op.track)]);
|
|
24293
|
-
}
|
|
24294
|
-
else {
|
|
24295
|
-
fn = arrowFn(fnParams, op.track);
|
|
24296
|
-
}
|
|
24297
|
-
op.trackByFn = job.pool.getSharedFunctionReference(fn, '_forTrack');
|
|
24298
|
-
}
|
|
24299
|
-
}
|
|
24300
|
-
}
|
|
24301
|
-
|
|
24302
24326
|
/**
|
|
24303
24327
|
* `track` functions in `for` repeaters can sometimes be "optimized," i.e. transformed into inline
|
|
24304
24328
|
* expressions, in lieu of an external function call. For example, tracking by `$index` can be be
|
|
@@ -24345,12 +24369,20 @@ function optimizeTrackFns(job) {
|
|
|
24345
24369
|
// Replace context reads with a special IR expression, since context reads in a track
|
|
24346
24370
|
// function are emitted specially.
|
|
24347
24371
|
op.track = transformExpressionsInExpression(op.track, (expr) => {
|
|
24348
|
-
if (expr instanceof
|
|
24372
|
+
if (expr instanceof PipeBindingExpr || expr instanceof PipeBindingVariadicExpr) {
|
|
24373
|
+
throw new Error(`Illegal State: Pipes are not allowed in this context`);
|
|
24374
|
+
}
|
|
24375
|
+
else if (expr instanceof ContextExpr) {
|
|
24349
24376
|
op.usesComponentInstance = true;
|
|
24350
24377
|
return new TrackContextExpr(expr.view);
|
|
24351
24378
|
}
|
|
24352
24379
|
return expr;
|
|
24353
24380
|
}, VisitorContextFlag.None);
|
|
24381
|
+
// Also create an OpList for the tracking expression since it may need
|
|
24382
|
+
// additional ops when generating the final code (e.g. temporary variables).
|
|
24383
|
+
const trackOpList = new OpList();
|
|
24384
|
+
trackOpList.push(createStatementOp(new ReturnStatement(op.track, op.track.sourceSpan)));
|
|
24385
|
+
op.trackByOps = trackOpList;
|
|
24354
24386
|
}
|
|
24355
24387
|
}
|
|
24356
24388
|
}
|
|
@@ -24575,6 +24607,9 @@ function optimizeVariables(job) {
|
|
|
24575
24607
|
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
24576
24608
|
inlineAlwaysInlineVariables(op.handlerOps);
|
|
24577
24609
|
}
|
|
24610
|
+
else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
|
|
24611
|
+
inlineAlwaysInlineVariables(op.trackByOps);
|
|
24612
|
+
}
|
|
24578
24613
|
}
|
|
24579
24614
|
optimizeVariablesInOpList(unit.create, job.compatibility);
|
|
24580
24615
|
optimizeVariablesInOpList(unit.update, job.compatibility);
|
|
@@ -24582,6 +24617,9 @@ function optimizeVariables(job) {
|
|
|
24582
24617
|
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
24583
24618
|
optimizeVariablesInOpList(op.handlerOps, job.compatibility);
|
|
24584
24619
|
}
|
|
24620
|
+
else if (op.kind === OpKind.RepeaterCreate && op.trackByOps !== null) {
|
|
24621
|
+
optimizeVariablesInOpList(op.trackByOps, job.compatibility);
|
|
24622
|
+
}
|
|
24585
24623
|
}
|
|
24586
24624
|
}
|
|
24587
24625
|
}
|
|
@@ -25162,7 +25200,6 @@ const phases = [
|
|
|
25162
25200
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nElementPlaceholders },
|
|
25163
25201
|
{ kind: CompilationJobKind.Tmpl, fn: resolveI18nExpressionPlaceholders },
|
|
25164
25202
|
{ kind: CompilationJobKind.Tmpl, fn: extractI18nMessages },
|
|
25165
|
-
{ kind: CompilationJobKind.Tmpl, fn: generateTrackFns },
|
|
25166
25203
|
{ kind: CompilationJobKind.Tmpl, fn: collectI18nConsts },
|
|
25167
25204
|
{ kind: CompilationJobKind.Tmpl, fn: collectConstExpressions },
|
|
25168
25205
|
{ kind: CompilationJobKind.Both, fn: collectElementConsts },
|
|
@@ -30696,7 +30733,7 @@ function publishFacade(global) {
|
|
|
30696
30733
|
* @description
|
|
30697
30734
|
* Entry point for all public APIs of the compiler package.
|
|
30698
30735
|
*/
|
|
30699
|
-
new Version('19.2.0-next.
|
|
30736
|
+
new Version('19.2.0-next.3');
|
|
30700
30737
|
|
|
30701
30738
|
const _I18N_ATTR = 'i18n';
|
|
30702
30739
|
const _I18N_ATTR_PREFIX = 'i18n-';
|
|
@@ -32104,7 +32141,7 @@ class NodeJSPathManipulation {
|
|
|
32104
32141
|
// G3-ESM-MARKER: G3 uses CommonJS, but externally everything in ESM.
|
|
32105
32142
|
// CommonJS/ESM interop for determining the current file name and containing dir.
|
|
32106
32143
|
const isCommonJS = typeof __filename !== 'undefined';
|
|
32107
|
-
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || new URL('checker-
|
|
32144
|
+
const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || new URL('checker-32db85a6.js', document.baseURI).href));
|
|
32108
32145
|
const currentFileName = isCommonJS ? __filename : url.fileURLToPath(currentFileUrl);
|
|
32109
32146
|
/**
|
|
32110
32147
|
* A wrapper around the Node.js file-system that supports readonly operations and path manipulation.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.0-next.
|
|
3
|
+
* @license Angular v19.2.0-next.3
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
10
10
|
|
|
11
11
|
var schematics = require('@angular-devkit/schematics');
|
|
12
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
13
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
12
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-e9ccccbf.js');
|
|
13
|
+
var apply_import_manager = require('./apply_import_manager-f4d044b2.js');
|
|
14
14
|
require('os');
|
|
15
15
|
var ts = require('typescript');
|
|
16
|
-
var checker = require('./checker-
|
|
17
|
-
var program = require('./program-
|
|
16
|
+
var checker = require('./checker-32db85a6.js');
|
|
17
|
+
var program = require('./program-507de2f1.js');
|
|
18
18
|
require('path');
|
|
19
|
-
require('./index-
|
|
19
|
+
require('./index-7ee8967e.js');
|
|
20
20
|
require('@angular-devkit/core');
|
|
21
21
|
require('node:path/posix');
|
|
22
22
|
require('fs');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.0-next.
|
|
3
|
+
* @license Angular v19.2.0-next.3
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
|
-
var checker = require('./checker-
|
|
10
|
+
var checker = require('./checker-32db85a6.js');
|
|
11
11
|
require('os');
|
|
12
12
|
var p = require('path');
|
|
13
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.0-next.
|
|
3
|
+
* @license Angular v19.2.0-next.3
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -10,8 +10,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
10
10
|
|
|
11
11
|
var schematics = require('@angular-devkit/schematics');
|
|
12
12
|
var p = require('path');
|
|
13
|
-
var compiler_host = require('./compiler_host-
|
|
14
|
-
var checker = require('./checker-
|
|
13
|
+
var compiler_host = require('./compiler_host-540e221c.js');
|
|
14
|
+
var checker = require('./checker-32db85a6.js');
|
|
15
15
|
var ts = require('typescript');
|
|
16
16
|
require('os');
|
|
17
17
|
require('fs');
|
|
@@ -297,12 +297,19 @@ class CommonCollector extends checker.RecursiveVisitor {
|
|
|
297
297
|
this.count++;
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
+
super.visitBlock(ast, null);
|
|
300
301
|
}
|
|
301
302
|
visitText(ast) {
|
|
302
303
|
if (this.hasPipes(ast.value)) {
|
|
303
304
|
this.count++;
|
|
304
305
|
}
|
|
305
306
|
}
|
|
307
|
+
visitLetDeclaration(decl) {
|
|
308
|
+
if (this.hasPipes(decl.value)) {
|
|
309
|
+
this.count++;
|
|
310
|
+
}
|
|
311
|
+
super.visitLetDeclaration(decl, null);
|
|
312
|
+
}
|
|
306
313
|
hasDirectives(input) {
|
|
307
314
|
return commonModuleDirectives.has(input);
|
|
308
315
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.0-next.
|
|
3
|
+
* @license Angular v19.2.0-next.3
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -10,12 +10,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
10
10
|
|
|
11
11
|
var schematics = require('@angular-devkit/schematics');
|
|
12
12
|
var p = require('path');
|
|
13
|
-
var project_tsconfig_paths = require('./project_tsconfig_paths-
|
|
14
|
-
var compiler_host = require('./compiler_host-
|
|
13
|
+
var project_tsconfig_paths = require('./project_tsconfig_paths-e9ccccbf.js');
|
|
14
|
+
var compiler_host = require('./compiler_host-540e221c.js');
|
|
15
15
|
var ts = require('typescript');
|
|
16
|
-
var imports = require('./imports-
|
|
16
|
+
var imports = require('./imports-abe29092.js');
|
|
17
17
|
require('@angular-devkit/core');
|
|
18
|
-
require('./checker-
|
|
18
|
+
require('./checker-32db85a6.js');
|
|
19
19
|
require('os');
|
|
20
20
|
require('fs');
|
|
21
21
|
require('module');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.0-next.
|
|
3
|
+
* @license Angular v19.2.0-next.3
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
require('os');
|
|
10
10
|
require('typescript');
|
|
11
|
-
var checker = require('./checker-
|
|
12
|
-
require('./program-
|
|
11
|
+
var checker = require('./checker-32db85a6.js');
|
|
12
|
+
require('./program-507de2f1.js');
|
|
13
13
|
require('path');
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -17,7 +17,7 @@ require('path');
|
|
|
17
17
|
* @description
|
|
18
18
|
* Entry point for all public APIs of the compiler-cli package.
|
|
19
19
|
*/
|
|
20
|
-
new checker.Version('19.2.0-next.
|
|
20
|
+
new checker.Version('19.2.0-next.3');
|
|
21
21
|
|
|
22
22
|
var LogLevel;
|
|
23
23
|
(function (LogLevel) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.0-next.
|
|
3
|
+
* @license Angular v19.2.0-next.3
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
var ts = require('typescript');
|
|
10
10
|
require('os');
|
|
11
|
-
var checker = require('./checker-
|
|
12
|
-
var program = require('./program-
|
|
11
|
+
var checker = require('./checker-32db85a6.js');
|
|
12
|
+
var program = require('./program-507de2f1.js');
|
|
13
13
|
require('path');
|
|
14
|
-
var apply_import_manager = require('./apply_import_manager-
|
|
14
|
+
var apply_import_manager = require('./apply_import_manager-f4d044b2.js');
|
|
15
15
|
|
|
16
16
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.2.0-next.
|
|
3
|
+
* @license Angular v19.2.0-next.3
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -10,12 +10,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
10
10
|
|
|
11
11
|
var schematics = require('@angular-devkit/schematics');
|
|
12
12
|
var p = require('path');
|
|
13
|
-
var compiler_host = require('./compiler_host-
|
|
13
|
+
var compiler_host = require('./compiler_host-540e221c.js');
|
|
14
14
|
var ts = require('typescript');
|
|
15
|
-
var nodes = require('./nodes-
|
|
16
|
-
var imports = require('./imports-
|
|
17
|
-
var leading_space = require('./leading_space-
|
|
18
|
-
require('./checker-
|
|
15
|
+
var nodes = require('./nodes-a9f0b985.js');
|
|
16
|
+
var imports = require('./imports-abe29092.js');
|
|
17
|
+
var leading_space = require('./leading_space-d190b83b.js');
|
|
18
|
+
require('./checker-32db85a6.js');
|
|
19
19
|
require('os');
|
|
20
20
|
require('fs');
|
|
21
21
|
require('module');
|