@angular/core 18.2.0-next.0 → 18.2.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/primitives/event-dispatch/contract_binary.mjs +3 -3
- package/esm2022/primitives/event-dispatch/index.mjs +6 -7
- package/esm2022/primitives/event-dispatch/src/a11y_click.mjs +1 -1
- package/esm2022/primitives/event-dispatch/src/action_resolver.mjs +1 -1
- package/esm2022/primitives/event-dispatch/src/bootstrap_app_scoped.mjs +29 -0
- package/esm2022/primitives/event-dispatch/src/bootstrap_global.mjs +21 -0
- package/esm2022/primitives/event-dispatch/src/cache.mjs +10 -21
- package/esm2022/primitives/event-dispatch/src/earlyeventcontract.mjs +32 -21
- package/esm2022/primitives/event-dispatch/src/event.mjs +3 -3
- package/esm2022/primitives/event-dispatch/src/event_contract_defines.mjs +1 -6
- package/esm2022/primitives/event-dispatch/src/event_type.mjs +19 -21
- package/esm2022/primitives/event-dispatch/src/eventcontract.mjs +6 -8
- package/esm2022/primitives/event-dispatch/src/property.mjs +1 -1
- package/esm2022/src/event_delegation_utils.mjs +10 -10
- package/esm2022/src/hydration/event_replay.mjs +17 -22
- package/esm2022/src/render3/after_render_hooks.mjs +7 -2
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/event-dispatch-contract.min.js +1 -1
- package/fesm2022/core.mjs +33 -33
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +452 -529
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/index.d.ts +4 -4
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +23 -37
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +40 -31
- package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +2 -2
- package/schematics/ng-generate/control-flow-migration/bundle.js +47 -31
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +2 -2
- package/schematics/ng-generate/standalone-migration/bundle.js +611 -65
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
- package/esm2022/primitives/event-dispatch/src/register_events.mjs +0 -31
|
@@ -17028,7 +17028,7 @@ var _Tokenizer = class {
|
|
|
17028
17028
|
const nameCursor = this._cursor.clone();
|
|
17029
17029
|
let allowDigit = false;
|
|
17030
17030
|
this._attemptCharCodeUntilFn((code) => {
|
|
17031
|
-
if (isAsciiLetter(code) || code
|
|
17031
|
+
if (isAsciiLetter(code) || code === $$ || code === $_ || allowDigit && isDigit(code)) {
|
|
17032
17032
|
allowDigit = true;
|
|
17033
17033
|
return false;
|
|
17034
17034
|
}
|
|
@@ -25710,6 +25710,7 @@ function convertQueryPredicate(predicate) {
|
|
|
25710
25710
|
return Array.isArray(predicate) ? predicate : createMayBeForwardRefExpression(new WrappedNodeExpr(predicate), 1);
|
|
25711
25711
|
}
|
|
25712
25712
|
function convertDirectiveFacadeToMetadata(facade) {
|
|
25713
|
+
var _a2;
|
|
25713
25714
|
const inputsFromMetadata = parseInputsArray(facade.inputs || []);
|
|
25714
25715
|
const outputsFromMetadata = parseMappingStringArray(facade.outputs || []);
|
|
25715
25716
|
const propMetadata = facade.propMetadata;
|
|
@@ -25732,6 +25733,19 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
25732
25733
|
});
|
|
25733
25734
|
}
|
|
25734
25735
|
}
|
|
25736
|
+
const hostDirectives = ((_a2 = facade.hostDirectives) == null ? void 0 : _a2.length) ? facade.hostDirectives.map((hostDirective) => {
|
|
25737
|
+
return typeof hostDirective === "function" ? {
|
|
25738
|
+
directive: wrapReference(hostDirective),
|
|
25739
|
+
inputs: null,
|
|
25740
|
+
outputs: null,
|
|
25741
|
+
isForwardReference: false
|
|
25742
|
+
} : {
|
|
25743
|
+
directive: wrapReference(hostDirective.directive),
|
|
25744
|
+
isForwardReference: false,
|
|
25745
|
+
inputs: hostDirective.inputs ? parseMappingStringArray(hostDirective.inputs) : null,
|
|
25746
|
+
outputs: hostDirective.outputs ? parseMappingStringArray(hostDirective.outputs) : null
|
|
25747
|
+
};
|
|
25748
|
+
}) : null;
|
|
25735
25749
|
return __spreadProps(__spreadValues({}, facade), {
|
|
25736
25750
|
typeArgumentCount: 0,
|
|
25737
25751
|
typeSourceSpan: facade.typeSourceSpan,
|
|
@@ -25744,31 +25758,37 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
25744
25758
|
providers: facade.providers != null ? new WrappedNodeExpr(facade.providers) : null,
|
|
25745
25759
|
viewQueries: facade.viewQueries.map(convertToR3QueryMetadata),
|
|
25746
25760
|
fullInheritance: false,
|
|
25747
|
-
hostDirectives
|
|
25761
|
+
hostDirectives
|
|
25748
25762
|
});
|
|
25749
25763
|
}
|
|
25750
25764
|
function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
|
|
25751
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i;
|
|
25765
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i, _j;
|
|
25766
|
+
const hostDirectives = ((_a2 = declaration.hostDirectives) == null ? void 0 : _a2.length) ? declaration.hostDirectives.map((dir) => ({
|
|
25767
|
+
directive: wrapReference(dir.directive),
|
|
25768
|
+
isForwardReference: false,
|
|
25769
|
+
inputs: dir.inputs ? getHostDirectiveBindingMapping(dir.inputs) : null,
|
|
25770
|
+
outputs: dir.outputs ? getHostDirectiveBindingMapping(dir.outputs) : null
|
|
25771
|
+
})) : null;
|
|
25752
25772
|
return {
|
|
25753
25773
|
name: declaration.type.name,
|
|
25754
25774
|
type: wrapReference(declaration.type),
|
|
25755
25775
|
typeSourceSpan,
|
|
25756
|
-
selector: (
|
|
25776
|
+
selector: (_b2 = declaration.selector) != null ? _b2 : null,
|
|
25757
25777
|
inputs: declaration.inputs ? inputsPartialMetadataToInputMetadata(declaration.inputs) : {},
|
|
25758
|
-
outputs: (
|
|
25778
|
+
outputs: (_c2 = declaration.outputs) != null ? _c2 : {},
|
|
25759
25779
|
host: convertHostDeclarationToMetadata(declaration.host),
|
|
25760
|
-
queries: ((
|
|
25761
|
-
viewQueries: ((
|
|
25780
|
+
queries: ((_d2 = declaration.queries) != null ? _d2 : []).map(convertQueryDeclarationToMetadata),
|
|
25781
|
+
viewQueries: ((_e2 = declaration.viewQueries) != null ? _e2 : []).map(convertQueryDeclarationToMetadata),
|
|
25762
25782
|
providers: declaration.providers !== void 0 ? new WrappedNodeExpr(declaration.providers) : null,
|
|
25763
|
-
exportAs: (
|
|
25764
|
-
usesInheritance: (
|
|
25765
|
-
lifecycle: { usesOnChanges: (
|
|
25783
|
+
exportAs: (_f2 = declaration.exportAs) != null ? _f2 : null,
|
|
25784
|
+
usesInheritance: (_g2 = declaration.usesInheritance) != null ? _g2 : false,
|
|
25785
|
+
lifecycle: { usesOnChanges: (_h2 = declaration.usesOnChanges) != null ? _h2 : false },
|
|
25766
25786
|
deps: null,
|
|
25767
25787
|
typeArgumentCount: 0,
|
|
25768
25788
|
fullInheritance: false,
|
|
25769
|
-
isStandalone: (
|
|
25770
|
-
isSignal: (
|
|
25771
|
-
hostDirectives
|
|
25789
|
+
isStandalone: (_i = declaration.isStandalone) != null ? _i : false,
|
|
25790
|
+
isSignal: (_j = declaration.isSignal) != null ? _j : false,
|
|
25791
|
+
hostDirectives
|
|
25772
25792
|
};
|
|
25773
25793
|
}
|
|
25774
25794
|
function convertHostDeclarationToMetadata(host = {}) {
|
|
@@ -25783,24 +25803,13 @@ function convertHostDeclarationToMetadata(host = {}) {
|
|
|
25783
25803
|
}
|
|
25784
25804
|
};
|
|
25785
25805
|
}
|
|
25786
|
-
function
|
|
25787
|
-
|
|
25788
|
-
|
|
25789
|
-
|
|
25790
|
-
|
|
25791
|
-
directive: wrapReference(hostDirective),
|
|
25792
|
-
inputs: null,
|
|
25793
|
-
outputs: null,
|
|
25794
|
-
isForwardReference: false
|
|
25795
|
-
} : {
|
|
25796
|
-
directive: wrapReference(hostDirective.directive),
|
|
25797
|
-
isForwardReference: false,
|
|
25798
|
-
inputs: hostDirective.inputs ? parseMappingStringArray(hostDirective.inputs) : null,
|
|
25799
|
-
outputs: hostDirective.outputs ? parseMappingStringArray(hostDirective.outputs) : null
|
|
25800
|
-
};
|
|
25801
|
-
});
|
|
25806
|
+
function getHostDirectiveBindingMapping(array) {
|
|
25807
|
+
let result = null;
|
|
25808
|
+
for (let i = 1; i < array.length; i += 2) {
|
|
25809
|
+
result = result || {};
|
|
25810
|
+
result[array[i - 1]] = array[i];
|
|
25802
25811
|
}
|
|
25803
|
-
return
|
|
25812
|
+
return result;
|
|
25804
25813
|
}
|
|
25805
25814
|
function convertOpaqueValuesToExpressions(obj) {
|
|
25806
25815
|
const result = {};
|
|
@@ -26071,7 +26080,7 @@ function publishFacade(global) {
|
|
|
26071
26080
|
}
|
|
26072
26081
|
|
|
26073
26082
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
26074
|
-
var VERSION2 = new Version("18.2.0-next.
|
|
26083
|
+
var VERSION2 = new Version("18.2.0-next.1");
|
|
26075
26084
|
|
|
26076
26085
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
26077
26086
|
var _I18N_ATTR = "i18n";
|
|
@@ -27175,7 +27184,7 @@ var MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = "18.0.0";
|
|
|
27175
27184
|
function compileDeclareClassMetadata(metadata) {
|
|
27176
27185
|
const definitionMap = new DefinitionMap();
|
|
27177
27186
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
27178
|
-
definitionMap.set("version", literal("18.2.0-next.
|
|
27187
|
+
definitionMap.set("version", literal("18.2.0-next.1"));
|
|
27179
27188
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27180
27189
|
definitionMap.set("type", metadata.type);
|
|
27181
27190
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -27194,7 +27203,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
27194
27203
|
callbackReturnDefinitionMap.set("ctorParameters", (_a2 = metadata.ctorParameters) != null ? _a2 : literal(null));
|
|
27195
27204
|
callbackReturnDefinitionMap.set("propDecorators", (_b2 = metadata.propDecorators) != null ? _b2 : literal(null));
|
|
27196
27205
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
27197
|
-
definitionMap.set("version", literal("18.2.0-next.
|
|
27206
|
+
definitionMap.set("version", literal("18.2.0-next.1"));
|
|
27198
27207
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27199
27208
|
definitionMap.set("type", metadata.type);
|
|
27200
27209
|
definitionMap.set("resolveDeferredDeps", compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -27262,7 +27271,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
27262
27271
|
const definitionMap = new DefinitionMap();
|
|
27263
27272
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
27264
27273
|
definitionMap.set("minVersion", literal(minVersion));
|
|
27265
|
-
definitionMap.set("version", literal("18.2.0-next.
|
|
27274
|
+
definitionMap.set("version", literal("18.2.0-next.1"));
|
|
27266
27275
|
definitionMap.set("type", meta.type.value);
|
|
27267
27276
|
if (meta.isStandalone) {
|
|
27268
27277
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -27580,7 +27589,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION2 = "12.0.0";
|
|
|
27580
27589
|
function compileDeclareFactoryFunction(meta) {
|
|
27581
27590
|
const definitionMap = new DefinitionMap();
|
|
27582
27591
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION2));
|
|
27583
|
-
definitionMap.set("version", literal("18.2.0-next.
|
|
27592
|
+
definitionMap.set("version", literal("18.2.0-next.1"));
|
|
27584
27593
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27585
27594
|
definitionMap.set("type", meta.type.value);
|
|
27586
27595
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -27603,7 +27612,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
27603
27612
|
function createInjectableDefinitionMap(meta) {
|
|
27604
27613
|
const definitionMap = new DefinitionMap();
|
|
27605
27614
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION3));
|
|
27606
|
-
definitionMap.set("version", literal("18.2.0-next.
|
|
27615
|
+
definitionMap.set("version", literal("18.2.0-next.1"));
|
|
27607
27616
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27608
27617
|
definitionMap.set("type", meta.type.value);
|
|
27609
27618
|
if (meta.providedIn !== void 0) {
|
|
@@ -27641,7 +27650,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
27641
27650
|
function createInjectorDefinitionMap(meta) {
|
|
27642
27651
|
const definitionMap = new DefinitionMap();
|
|
27643
27652
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION4));
|
|
27644
|
-
definitionMap.set("version", literal("18.2.0-next.
|
|
27653
|
+
definitionMap.set("version", literal("18.2.0-next.1"));
|
|
27645
27654
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27646
27655
|
definitionMap.set("type", meta.type.value);
|
|
27647
27656
|
definitionMap.set("providers", meta.providers);
|
|
@@ -27665,7 +27674,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
27665
27674
|
throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
|
|
27666
27675
|
}
|
|
27667
27676
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION5));
|
|
27668
|
-
definitionMap.set("version", literal("18.2.0-next.
|
|
27677
|
+
definitionMap.set("version", literal("18.2.0-next.1"));
|
|
27669
27678
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27670
27679
|
definitionMap.set("type", meta.type.value);
|
|
27671
27680
|
if (meta.bootstrap.length > 0) {
|
|
@@ -27700,7 +27709,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
27700
27709
|
function createPipeDefinitionMap(meta) {
|
|
27701
27710
|
const definitionMap = new DefinitionMap();
|
|
27702
27711
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION6));
|
|
27703
|
-
definitionMap.set("version", literal("18.2.0-next.
|
|
27712
|
+
definitionMap.set("version", literal("18.2.0-next.1"));
|
|
27704
27713
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
27705
27714
|
definitionMap.set("type", meta.type.value);
|
|
27706
27715
|
if (meta.isStandalone) {
|
|
@@ -27717,7 +27726,7 @@ function createPipeDefinitionMap(meta) {
|
|
|
27717
27726
|
publishFacade(_global);
|
|
27718
27727
|
|
|
27719
27728
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/version.mjs
|
|
27720
|
-
var VERSION3 = new Version("18.2.0-next.
|
|
27729
|
+
var VERSION3 = new Version("18.2.0-next.1");
|
|
27721
27730
|
|
|
27722
27731
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/emitter.mjs
|
|
27723
27732
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
@@ -29524,11 +29533,313 @@ var ModuleResolver = class {
|
|
|
29524
29533
|
}
|
|
29525
29534
|
};
|
|
29526
29535
|
|
|
29527
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/
|
|
29536
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/jit/src/downlevel_decorators_transform.mjs
|
|
29528
29537
|
var import_typescript21 = __toESM(require("typescript"), 1);
|
|
29538
|
+
function isAngularDecorator(decorator, isCore) {
|
|
29539
|
+
return isCore || decorator.import !== null && decorator.import.from === "@angular/core";
|
|
29540
|
+
}
|
|
29541
|
+
var DECORATOR_INVOCATION_JSDOC_TYPE = "!Array<{type: !Function, args: (undefined|!Array<?>)}>";
|
|
29542
|
+
function extractMetadataFromSingleDecorator(decorator, diagnostics) {
|
|
29543
|
+
const metadataProperties = [];
|
|
29544
|
+
const expr = decorator.expression;
|
|
29545
|
+
switch (expr.kind) {
|
|
29546
|
+
case import_typescript21.default.SyntaxKind.Identifier:
|
|
29547
|
+
metadataProperties.push(import_typescript21.default.factory.createPropertyAssignment("type", expr));
|
|
29548
|
+
break;
|
|
29549
|
+
case import_typescript21.default.SyntaxKind.CallExpression:
|
|
29550
|
+
const call2 = expr;
|
|
29551
|
+
metadataProperties.push(import_typescript21.default.factory.createPropertyAssignment("type", call2.expression));
|
|
29552
|
+
if (call2.arguments.length) {
|
|
29553
|
+
const args = [];
|
|
29554
|
+
for (const arg of call2.arguments) {
|
|
29555
|
+
args.push(arg);
|
|
29556
|
+
}
|
|
29557
|
+
const argsArrayLiteral = import_typescript21.default.factory.createArrayLiteralExpression(import_typescript21.default.factory.createNodeArray(args, true));
|
|
29558
|
+
metadataProperties.push(import_typescript21.default.factory.createPropertyAssignment("args", argsArrayLiteral));
|
|
29559
|
+
}
|
|
29560
|
+
break;
|
|
29561
|
+
default:
|
|
29562
|
+
diagnostics.push({
|
|
29563
|
+
file: decorator.getSourceFile(),
|
|
29564
|
+
start: decorator.getStart(),
|
|
29565
|
+
length: decorator.getEnd() - decorator.getStart(),
|
|
29566
|
+
messageText: `${import_typescript21.default.SyntaxKind[decorator.kind]} not implemented in gathering decorator metadata.`,
|
|
29567
|
+
category: import_typescript21.default.DiagnosticCategory.Error,
|
|
29568
|
+
code: 0
|
|
29569
|
+
});
|
|
29570
|
+
break;
|
|
29571
|
+
}
|
|
29572
|
+
return import_typescript21.default.factory.createObjectLiteralExpression(metadataProperties);
|
|
29573
|
+
}
|
|
29574
|
+
function createCtorParametersClassProperty(diagnostics, entityNameToExpression, ctorParameters, isClosureCompilerEnabled) {
|
|
29575
|
+
const params = [];
|
|
29576
|
+
for (const ctorParam of ctorParameters) {
|
|
29577
|
+
if (!ctorParam.type && ctorParam.decorators.length === 0) {
|
|
29578
|
+
params.push(import_typescript21.default.factory.createNull());
|
|
29579
|
+
continue;
|
|
29580
|
+
}
|
|
29581
|
+
const paramType = ctorParam.type ? typeReferenceToExpression(entityNameToExpression, ctorParam.type) : void 0;
|
|
29582
|
+
const members = [
|
|
29583
|
+
import_typescript21.default.factory.createPropertyAssignment("type", paramType || import_typescript21.default.factory.createIdentifier("undefined"))
|
|
29584
|
+
];
|
|
29585
|
+
const decorators = [];
|
|
29586
|
+
for (const deco of ctorParam.decorators) {
|
|
29587
|
+
decorators.push(extractMetadataFromSingleDecorator(deco, diagnostics));
|
|
29588
|
+
}
|
|
29589
|
+
if (decorators.length) {
|
|
29590
|
+
members.push(import_typescript21.default.factory.createPropertyAssignment("decorators", import_typescript21.default.factory.createArrayLiteralExpression(decorators)));
|
|
29591
|
+
}
|
|
29592
|
+
params.push(import_typescript21.default.factory.createObjectLiteralExpression(members));
|
|
29593
|
+
}
|
|
29594
|
+
const initializer = import_typescript21.default.factory.createArrowFunction(void 0, void 0, [], void 0, import_typescript21.default.factory.createToken(import_typescript21.default.SyntaxKind.EqualsGreaterThanToken), import_typescript21.default.factory.createArrayLiteralExpression(params, true));
|
|
29595
|
+
const ctorProp = import_typescript21.default.factory.createPropertyDeclaration([import_typescript21.default.factory.createToken(import_typescript21.default.SyntaxKind.StaticKeyword)], "ctorParameters", void 0, void 0, initializer);
|
|
29596
|
+
if (isClosureCompilerEnabled) {
|
|
29597
|
+
import_typescript21.default.setSyntheticLeadingComments(ctorProp, [
|
|
29598
|
+
{
|
|
29599
|
+
kind: import_typescript21.default.SyntaxKind.MultiLineCommentTrivia,
|
|
29600
|
+
text: [
|
|
29601
|
+
`*`,
|
|
29602
|
+
` * @type {function(): !Array<(null|{`,
|
|
29603
|
+
` * type: ?,`,
|
|
29604
|
+
` * decorators: (undefined|${DECORATOR_INVOCATION_JSDOC_TYPE}),`,
|
|
29605
|
+
` * })>}`,
|
|
29606
|
+
` * @nocollapse`,
|
|
29607
|
+
` `
|
|
29608
|
+
].join("\n"),
|
|
29609
|
+
pos: -1,
|
|
29610
|
+
end: -1,
|
|
29611
|
+
hasTrailingNewLine: true
|
|
29612
|
+
}
|
|
29613
|
+
]);
|
|
29614
|
+
}
|
|
29615
|
+
return ctorProp;
|
|
29616
|
+
}
|
|
29617
|
+
function typeReferenceToExpression(entityNameToExpression, node) {
|
|
29618
|
+
let kind = node.kind;
|
|
29619
|
+
if (import_typescript21.default.isLiteralTypeNode(node)) {
|
|
29620
|
+
kind = node.literal.kind;
|
|
29621
|
+
}
|
|
29622
|
+
switch (kind) {
|
|
29623
|
+
case import_typescript21.default.SyntaxKind.FunctionType:
|
|
29624
|
+
case import_typescript21.default.SyntaxKind.ConstructorType:
|
|
29625
|
+
return import_typescript21.default.factory.createIdentifier("Function");
|
|
29626
|
+
case import_typescript21.default.SyntaxKind.ArrayType:
|
|
29627
|
+
case import_typescript21.default.SyntaxKind.TupleType:
|
|
29628
|
+
return import_typescript21.default.factory.createIdentifier("Array");
|
|
29629
|
+
case import_typescript21.default.SyntaxKind.TypePredicate:
|
|
29630
|
+
case import_typescript21.default.SyntaxKind.TrueKeyword:
|
|
29631
|
+
case import_typescript21.default.SyntaxKind.FalseKeyword:
|
|
29632
|
+
case import_typescript21.default.SyntaxKind.BooleanKeyword:
|
|
29633
|
+
return import_typescript21.default.factory.createIdentifier("Boolean");
|
|
29634
|
+
case import_typescript21.default.SyntaxKind.StringLiteral:
|
|
29635
|
+
case import_typescript21.default.SyntaxKind.StringKeyword:
|
|
29636
|
+
return import_typescript21.default.factory.createIdentifier("String");
|
|
29637
|
+
case import_typescript21.default.SyntaxKind.ObjectKeyword:
|
|
29638
|
+
return import_typescript21.default.factory.createIdentifier("Object");
|
|
29639
|
+
case import_typescript21.default.SyntaxKind.NumberKeyword:
|
|
29640
|
+
case import_typescript21.default.SyntaxKind.NumericLiteral:
|
|
29641
|
+
return import_typescript21.default.factory.createIdentifier("Number");
|
|
29642
|
+
case import_typescript21.default.SyntaxKind.TypeReference:
|
|
29643
|
+
const typeRef = node;
|
|
29644
|
+
return entityNameToExpression(typeRef.typeName);
|
|
29645
|
+
case import_typescript21.default.SyntaxKind.UnionType:
|
|
29646
|
+
const childTypeNodes = node.types.filter((t) => !(import_typescript21.default.isLiteralTypeNode(t) && t.literal.kind === import_typescript21.default.SyntaxKind.NullKeyword));
|
|
29647
|
+
return childTypeNodes.length === 1 ? typeReferenceToExpression(entityNameToExpression, childTypeNodes[0]) : void 0;
|
|
29648
|
+
default:
|
|
29649
|
+
return void 0;
|
|
29650
|
+
}
|
|
29651
|
+
}
|
|
29652
|
+
function symbolIsRuntimeValue(typeChecker, symbol) {
|
|
29653
|
+
if (symbol.flags & import_typescript21.default.SymbolFlags.Alias) {
|
|
29654
|
+
symbol = typeChecker.getAliasedSymbol(symbol);
|
|
29655
|
+
}
|
|
29656
|
+
return (symbol.flags & import_typescript21.default.SymbolFlags.Value & import_typescript21.default.SymbolFlags.ConstEnumExcludes) !== 0;
|
|
29657
|
+
}
|
|
29658
|
+
function getDownlevelDecoratorsTransform(typeChecker, host, diagnostics, isCore, isClosureCompilerEnabled, shouldTransformClass) {
|
|
29659
|
+
function addJSDocTypeAnnotation(node, jsdocType) {
|
|
29660
|
+
if (!isClosureCompilerEnabled) {
|
|
29661
|
+
return;
|
|
29662
|
+
}
|
|
29663
|
+
import_typescript21.default.setSyntheticLeadingComments(node, [
|
|
29664
|
+
{
|
|
29665
|
+
kind: import_typescript21.default.SyntaxKind.MultiLineCommentTrivia,
|
|
29666
|
+
text: `* @type {${jsdocType}} `,
|
|
29667
|
+
pos: -1,
|
|
29668
|
+
end: -1,
|
|
29669
|
+
hasTrailingNewLine: true
|
|
29670
|
+
}
|
|
29671
|
+
]);
|
|
29672
|
+
}
|
|
29673
|
+
function createPropDecoratorsClassProperty(diagnostics2, properties) {
|
|
29674
|
+
const entries = [];
|
|
29675
|
+
for (const [name, decorators] of properties.entries()) {
|
|
29676
|
+
entries.push(import_typescript21.default.factory.createPropertyAssignment(name, import_typescript21.default.factory.createArrayLiteralExpression(decorators.map((deco) => extractMetadataFromSingleDecorator(deco, diagnostics2)))));
|
|
29677
|
+
}
|
|
29678
|
+
const initializer = import_typescript21.default.factory.createObjectLiteralExpression(entries, true);
|
|
29679
|
+
const prop = import_typescript21.default.factory.createPropertyDeclaration([import_typescript21.default.factory.createToken(import_typescript21.default.SyntaxKind.StaticKeyword)], "propDecorators", void 0, void 0, initializer);
|
|
29680
|
+
addJSDocTypeAnnotation(prop, `!Object<string, ${DECORATOR_INVOCATION_JSDOC_TYPE}>`);
|
|
29681
|
+
return prop;
|
|
29682
|
+
}
|
|
29683
|
+
return (context) => {
|
|
29684
|
+
const referencedParameterTypes = loadIsReferencedAliasDeclarationPatch(context);
|
|
29685
|
+
function entityNameToExpression(name) {
|
|
29686
|
+
const symbol = typeChecker.getSymbolAtLocation(name);
|
|
29687
|
+
if (!symbol || !symbolIsRuntimeValue(typeChecker, symbol) || !symbol.declarations || symbol.declarations.length === 0) {
|
|
29688
|
+
return void 0;
|
|
29689
|
+
}
|
|
29690
|
+
if (import_typescript21.default.isQualifiedName(name)) {
|
|
29691
|
+
const containerExpr = entityNameToExpression(name.left);
|
|
29692
|
+
if (containerExpr === void 0) {
|
|
29693
|
+
return void 0;
|
|
29694
|
+
}
|
|
29695
|
+
return import_typescript21.default.factory.createPropertyAccessExpression(containerExpr, name.right);
|
|
29696
|
+
}
|
|
29697
|
+
const decl = symbol.declarations[0];
|
|
29698
|
+
if (isAliasImportDeclaration(decl)) {
|
|
29699
|
+
referencedParameterTypes.add(decl);
|
|
29700
|
+
if (decl.name !== void 0) {
|
|
29701
|
+
return import_typescript21.default.setOriginalNode(import_typescript21.default.factory.createIdentifier(decl.name.text), decl.name);
|
|
29702
|
+
}
|
|
29703
|
+
}
|
|
29704
|
+
return import_typescript21.default.setOriginalNode(import_typescript21.default.factory.createIdentifier(name.text), name);
|
|
29705
|
+
}
|
|
29706
|
+
function transformClassElement(element2) {
|
|
29707
|
+
element2 = import_typescript21.default.visitEachChild(element2, decoratorDownlevelVisitor, context);
|
|
29708
|
+
const decoratorsToKeep = [];
|
|
29709
|
+
const toLower = [];
|
|
29710
|
+
const decorators = host.getDecoratorsOfDeclaration(element2) || [];
|
|
29711
|
+
for (const decorator of decorators) {
|
|
29712
|
+
const decoratorNode = decorator.node;
|
|
29713
|
+
if (!isAngularDecorator(decorator, isCore)) {
|
|
29714
|
+
decoratorsToKeep.push(decoratorNode);
|
|
29715
|
+
continue;
|
|
29716
|
+
}
|
|
29717
|
+
toLower.push(decoratorNode);
|
|
29718
|
+
}
|
|
29719
|
+
if (!toLower.length)
|
|
29720
|
+
return [void 0, element2, []];
|
|
29721
|
+
if (!element2.name || !import_typescript21.default.isIdentifier(element2.name)) {
|
|
29722
|
+
diagnostics.push({
|
|
29723
|
+
file: element2.getSourceFile(),
|
|
29724
|
+
start: element2.getStart(),
|
|
29725
|
+
length: element2.getEnd() - element2.getStart(),
|
|
29726
|
+
messageText: `Cannot process decorators for class element with non-analyzable name.`,
|
|
29727
|
+
category: import_typescript21.default.DiagnosticCategory.Error,
|
|
29728
|
+
code: 0
|
|
29729
|
+
});
|
|
29730
|
+
return [void 0, element2, []];
|
|
29731
|
+
}
|
|
29732
|
+
const elementModifiers = import_typescript21.default.canHaveModifiers(element2) ? import_typescript21.default.getModifiers(element2) : void 0;
|
|
29733
|
+
let modifiers;
|
|
29734
|
+
if (decoratorsToKeep.length || (elementModifiers == null ? void 0 : elementModifiers.length)) {
|
|
29735
|
+
modifiers = import_typescript21.default.setTextRange(import_typescript21.default.factory.createNodeArray([...decoratorsToKeep, ...elementModifiers || []]), element2.modifiers);
|
|
29736
|
+
}
|
|
29737
|
+
return [element2.name.text, cloneClassElementWithModifiers(element2, modifiers), toLower];
|
|
29738
|
+
}
|
|
29739
|
+
function transformConstructor(ctor) {
|
|
29740
|
+
ctor = import_typescript21.default.visitEachChild(ctor, decoratorDownlevelVisitor, context);
|
|
29741
|
+
const newParameters = [];
|
|
29742
|
+
const oldParameters = ctor.parameters;
|
|
29743
|
+
const parametersInfo = [];
|
|
29744
|
+
for (const param of oldParameters) {
|
|
29745
|
+
const decoratorsToKeep = [];
|
|
29746
|
+
const paramInfo = { decorators: [], type: null };
|
|
29747
|
+
const decorators = host.getDecoratorsOfDeclaration(param) || [];
|
|
29748
|
+
for (const decorator of decorators) {
|
|
29749
|
+
const decoratorNode = decorator.node;
|
|
29750
|
+
if (!isAngularDecorator(decorator, isCore)) {
|
|
29751
|
+
decoratorsToKeep.push(decoratorNode);
|
|
29752
|
+
continue;
|
|
29753
|
+
}
|
|
29754
|
+
paramInfo.decorators.push(decoratorNode);
|
|
29755
|
+
}
|
|
29756
|
+
if (param.type) {
|
|
29757
|
+
paramInfo.type = param.type;
|
|
29758
|
+
}
|
|
29759
|
+
parametersInfo.push(paramInfo);
|
|
29760
|
+
let modifiers;
|
|
29761
|
+
const paramModifiers = import_typescript21.default.getModifiers(param);
|
|
29762
|
+
if (decoratorsToKeep.length || (paramModifiers == null ? void 0 : paramModifiers.length)) {
|
|
29763
|
+
modifiers = [...decoratorsToKeep, ...paramModifiers || []];
|
|
29764
|
+
}
|
|
29765
|
+
const newParam = import_typescript21.default.factory.updateParameterDeclaration(param, modifiers, param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer);
|
|
29766
|
+
newParameters.push(newParam);
|
|
29767
|
+
}
|
|
29768
|
+
const updated = import_typescript21.default.factory.updateConstructorDeclaration(ctor, import_typescript21.default.getModifiers(ctor), newParameters, ctor.body);
|
|
29769
|
+
return [updated, parametersInfo];
|
|
29770
|
+
}
|
|
29771
|
+
function transformClassDeclaration(classDecl) {
|
|
29772
|
+
const newMembers = [];
|
|
29773
|
+
const decoratedProperties = /* @__PURE__ */ new Map();
|
|
29774
|
+
let classParameters = null;
|
|
29775
|
+
for (const member of classDecl.members) {
|
|
29776
|
+
switch (member.kind) {
|
|
29777
|
+
case import_typescript21.default.SyntaxKind.PropertyDeclaration:
|
|
29778
|
+
case import_typescript21.default.SyntaxKind.GetAccessor:
|
|
29779
|
+
case import_typescript21.default.SyntaxKind.SetAccessor:
|
|
29780
|
+
case import_typescript21.default.SyntaxKind.MethodDeclaration: {
|
|
29781
|
+
const [name, newMember, decorators] = transformClassElement(member);
|
|
29782
|
+
newMembers.push(newMember);
|
|
29783
|
+
if (name)
|
|
29784
|
+
decoratedProperties.set(name, decorators);
|
|
29785
|
+
continue;
|
|
29786
|
+
}
|
|
29787
|
+
case import_typescript21.default.SyntaxKind.Constructor: {
|
|
29788
|
+
const ctor = member;
|
|
29789
|
+
if (!ctor.body)
|
|
29790
|
+
break;
|
|
29791
|
+
const [newMember, parametersInfo] = transformConstructor(member);
|
|
29792
|
+
classParameters = parametersInfo;
|
|
29793
|
+
newMembers.push(newMember);
|
|
29794
|
+
continue;
|
|
29795
|
+
}
|
|
29796
|
+
default:
|
|
29797
|
+
break;
|
|
29798
|
+
}
|
|
29799
|
+
newMembers.push(import_typescript21.default.visitEachChild(member, decoratorDownlevelVisitor, context));
|
|
29800
|
+
}
|
|
29801
|
+
const possibleAngularDecorators = host.getDecoratorsOfDeclaration(classDecl) || [];
|
|
29802
|
+
const hasAngularDecorator = possibleAngularDecorators.some((d) => isAngularDecorator(d, isCore));
|
|
29803
|
+
if (classParameters) {
|
|
29804
|
+
if (hasAngularDecorator || classParameters.some((p2) => !!p2.decorators.length)) {
|
|
29805
|
+
newMembers.push(createCtorParametersClassProperty(diagnostics, entityNameToExpression, classParameters, isClosureCompilerEnabled));
|
|
29806
|
+
}
|
|
29807
|
+
}
|
|
29808
|
+
if (decoratedProperties.size) {
|
|
29809
|
+
newMembers.push(createPropDecoratorsClassProperty(diagnostics, decoratedProperties));
|
|
29810
|
+
}
|
|
29811
|
+
const members = import_typescript21.default.setTextRange(import_typescript21.default.factory.createNodeArray(newMembers, classDecl.members.hasTrailingComma), classDecl.members);
|
|
29812
|
+
return import_typescript21.default.factory.updateClassDeclaration(classDecl, classDecl.modifiers, classDecl.name, classDecl.typeParameters, classDecl.heritageClauses, members);
|
|
29813
|
+
}
|
|
29814
|
+
function decoratorDownlevelVisitor(node) {
|
|
29815
|
+
if (import_typescript21.default.isClassDeclaration(node) && (shouldTransformClass === void 0 || shouldTransformClass(node))) {
|
|
29816
|
+
return transformClassDeclaration(node);
|
|
29817
|
+
}
|
|
29818
|
+
return import_typescript21.default.visitEachChild(node, decoratorDownlevelVisitor, context);
|
|
29819
|
+
}
|
|
29820
|
+
return (sf) => {
|
|
29821
|
+
return import_typescript21.default.visitEachChild(sf, decoratorDownlevelVisitor, context);
|
|
29822
|
+
};
|
|
29823
|
+
};
|
|
29824
|
+
}
|
|
29825
|
+
function cloneClassElementWithModifiers(node, modifiers) {
|
|
29826
|
+
let clone;
|
|
29827
|
+
if (import_typescript21.default.isMethodDeclaration(node)) {
|
|
29828
|
+
clone = import_typescript21.default.factory.createMethodDeclaration(modifiers, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body);
|
|
29829
|
+
} else if (import_typescript21.default.isPropertyDeclaration(node)) {
|
|
29830
|
+
clone = import_typescript21.default.factory.createPropertyDeclaration(modifiers, node.name, node.questionToken, node.type, node.initializer);
|
|
29831
|
+
} else if (import_typescript21.default.isGetAccessor(node)) {
|
|
29832
|
+
clone = import_typescript21.default.factory.createGetAccessorDeclaration(modifiers, node.name, node.parameters, node.type, node.body);
|
|
29833
|
+
} else if (import_typescript21.default.isSetAccessor(node)) {
|
|
29834
|
+
clone = import_typescript21.default.factory.createSetAccessorDeclaration(modifiers, node.name, node.parameters, node.body);
|
|
29835
|
+
} else {
|
|
29836
|
+
throw new Error(`Unsupported decorated member with kind ${import_typescript21.default.SyntaxKind[node.kind]}`);
|
|
29837
|
+
}
|
|
29838
|
+
return import_typescript21.default.setOriginalNode(clone, node);
|
|
29839
|
+
}
|
|
29529
29840
|
|
|
29530
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/
|
|
29531
|
-
var
|
|
29841
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/transform.mjs
|
|
29842
|
+
var import_typescript94 = __toESM(require("typescript"), 1);
|
|
29532
29843
|
|
|
29533
29844
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
|
|
29534
29845
|
var import_typescript23 = __toESM(require("typescript"), 1);
|
|
@@ -29575,9 +29886,9 @@ function isAngularCoreReference(reference2, symbolName) {
|
|
|
29575
29886
|
return reference2.ownedByModuleGuess === CORE_MODULE2 && reference2.debugName === symbolName;
|
|
29576
29887
|
}
|
|
29577
29888
|
function findAngularDecorator(decorators, name, isCore) {
|
|
29578
|
-
return decorators.find((decorator) =>
|
|
29889
|
+
return decorators.find((decorator) => isAngularDecorator2(decorator, name, isCore));
|
|
29579
29890
|
}
|
|
29580
|
-
function
|
|
29891
|
+
function isAngularDecorator2(decorator, name, isCore) {
|
|
29581
29892
|
if (isCore) {
|
|
29582
29893
|
return decorator.name === name;
|
|
29583
29894
|
} else if (isAngularCore(decorator)) {
|
|
@@ -31693,6 +32004,8 @@ var PerfPhase;
|
|
|
31693
32004
|
PerfPhase2[PerfPhase2["LAST"] = 25] = "LAST";
|
|
31694
32005
|
PerfPhase2[PerfPhase2["LsCodeFixes"] = 26] = "LsCodeFixes";
|
|
31695
32006
|
PerfPhase2[PerfPhase2["LsCodeFixesAll"] = 27] = "LsCodeFixesAll";
|
|
32007
|
+
PerfPhase2[PerfPhase2["LSComputeApplicableRefactorings"] = 28] = "LSComputeApplicableRefactorings";
|
|
32008
|
+
PerfPhase2[PerfPhase2["LSApplyRefactoring"] = 29] = "LSApplyRefactoring";
|
|
31696
32009
|
})(PerfPhase || (PerfPhase = {}));
|
|
31697
32010
|
var PerfEvent;
|
|
31698
32011
|
(function(PerfEvent2) {
|
|
@@ -34227,7 +34540,7 @@ function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompi
|
|
|
34227
34540
|
if (classDecorators === null) {
|
|
34228
34541
|
return null;
|
|
34229
34542
|
}
|
|
34230
|
-
const ngClassDecorators = classDecorators.filter((dec) =>
|
|
34543
|
+
const ngClassDecorators = classDecorators.filter((dec) => isAngularDecorator3(dec, isCore)).map((decorator) => decoratorToMetadata(angularDecoratorTransform(decorator), annotateForClosureCompiler)).map((decorator) => removeIdentifierReferences(decorator, id.text));
|
|
34231
34544
|
if (ngClassDecorators.length === 0) {
|
|
34232
34545
|
return null;
|
|
34233
34546
|
}
|
|
@@ -34264,14 +34577,14 @@ function ctorParameterToMetadata(param, isCore) {
|
|
|
34264
34577
|
{ key: "type", value: type, quoted: false }
|
|
34265
34578
|
];
|
|
34266
34579
|
if (param.decorators !== null) {
|
|
34267
|
-
const ngDecorators = param.decorators.filter((dec) =>
|
|
34580
|
+
const ngDecorators = param.decorators.filter((dec) => isAngularDecorator3(dec, isCore)).map((decorator) => decoratorToMetadata(decorator));
|
|
34268
34581
|
const value = new WrappedNodeExpr(import_typescript49.default.factory.createArrayLiteralExpression(ngDecorators));
|
|
34269
34582
|
mapEntries.push({ key: "decorators", value, quoted: false });
|
|
34270
34583
|
}
|
|
34271
34584
|
return literalMap(mapEntries);
|
|
34272
34585
|
}
|
|
34273
34586
|
function classMemberToMetadata(name, decorators, isCore) {
|
|
34274
|
-
const ngDecorators = decorators.filter((dec) =>
|
|
34587
|
+
const ngDecorators = decorators.filter((dec) => isAngularDecorator3(dec, isCore)).map((decorator) => decoratorToMetadata(decorator));
|
|
34275
34588
|
const decoratorMeta = import_typescript49.default.factory.createArrayLiteralExpression(ngDecorators);
|
|
34276
34589
|
return import_typescript49.default.factory.createPropertyAssignment(name, decoratorMeta);
|
|
34277
34590
|
}
|
|
@@ -34290,7 +34603,7 @@ function decoratorToMetadata(decorator, wrapFunctionsInParens) {
|
|
|
34290
34603
|
}
|
|
34291
34604
|
return import_typescript49.default.factory.createObjectLiteralExpression(properties, true);
|
|
34292
34605
|
}
|
|
34293
|
-
function
|
|
34606
|
+
function isAngularDecorator3(decorator, isCore) {
|
|
34294
34607
|
return isCore || decorator.import !== null && decorator.import.from === "@angular/core";
|
|
34295
34608
|
}
|
|
34296
34609
|
function removeIdentifierReferences(node, names) {
|
|
@@ -34380,6 +34693,13 @@ function compileInputTransformFields(inputs) {
|
|
|
34380
34693
|
return extraFields;
|
|
34381
34694
|
}
|
|
34382
34695
|
|
|
34696
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/jit_declaration_registry.mjs
|
|
34697
|
+
var JitDeclarationRegistry = class {
|
|
34698
|
+
constructor() {
|
|
34699
|
+
this.jitDeclarations = /* @__PURE__ */ new Set();
|
|
34700
|
+
}
|
|
34701
|
+
};
|
|
34702
|
+
|
|
34383
34703
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
|
|
34384
34704
|
var import_typescript88 = __toESM(require("typescript"), 1);
|
|
34385
34705
|
|
|
@@ -35496,7 +35816,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, ev
|
|
|
35496
35816
|
directive = reflectObjectLiteral(meta);
|
|
35497
35817
|
}
|
|
35498
35818
|
if (directive.has("jit")) {
|
|
35499
|
-
return
|
|
35819
|
+
return { jitForced: true };
|
|
35500
35820
|
}
|
|
35501
35821
|
const members = reflector.getMembersOfClass(clazz);
|
|
35502
35822
|
const decoratedElements = members.filter((member) => !member.isStatic && member.decorators !== null);
|
|
@@ -35604,6 +35924,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, ev
|
|
|
35604
35924
|
hostDirectives: (hostDirectives == null ? void 0 : hostDirectives.map((hostDir) => toHostDirectiveMetadata(hostDir, sourceFile, refEmitter))) || null
|
|
35605
35925
|
};
|
|
35606
35926
|
return {
|
|
35927
|
+
jitForced: false,
|
|
35607
35928
|
decorator: directive,
|
|
35608
35929
|
metadata,
|
|
35609
35930
|
inputs,
|
|
@@ -35907,7 +36228,7 @@ function tryGetDecoratorOnMember(member, decoratorName, isCore) {
|
|
|
35907
36228
|
return null;
|
|
35908
36229
|
}
|
|
35909
36230
|
for (const decorator of member.decorators) {
|
|
35910
|
-
if (
|
|
36231
|
+
if (isAngularDecorator2(decorator, decoratorName, isCore)) {
|
|
35911
36232
|
return decorator;
|
|
35912
36233
|
}
|
|
35913
36234
|
}
|
|
@@ -36373,7 +36694,7 @@ var LIFECYCLE_HOOKS = /* @__PURE__ */ new Set([
|
|
|
36373
36694
|
"ngAfterContentChecked"
|
|
36374
36695
|
]);
|
|
36375
36696
|
var DirectiveDecoratorHandler = class {
|
|
36376
|
-
constructor(reflector, evaluator, metaRegistry, scopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, annotateForClosureCompiler, perf, importTracker, includeClassMetadata, compilationMode,
|
|
36697
|
+
constructor(reflector, evaluator, metaRegistry, scopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, annotateForClosureCompiler, perf, importTracker, includeClassMetadata, compilationMode, jitDeclarationRegistry) {
|
|
36377
36698
|
this.reflector = reflector;
|
|
36378
36699
|
this.evaluator = evaluator;
|
|
36379
36700
|
this.metaRegistry = metaRegistry;
|
|
@@ -36390,7 +36711,7 @@ var DirectiveDecoratorHandler = class {
|
|
|
36390
36711
|
this.importTracker = importTracker;
|
|
36391
36712
|
this.includeClassMetadata = includeClassMetadata;
|
|
36392
36713
|
this.compilationMode = compilationMode;
|
|
36393
|
-
this.
|
|
36714
|
+
this.jitDeclarationRegistry = jitDeclarationRegistry;
|
|
36394
36715
|
this.precedence = HandlerPrecedence.PRIMARY;
|
|
36395
36716
|
this.name = "DirectiveDecoratorHandler";
|
|
36396
36717
|
}
|
|
@@ -36425,7 +36746,8 @@ var DirectiveDecoratorHandler = class {
|
|
|
36425
36746
|
this.compilationMode,
|
|
36426
36747
|
null
|
|
36427
36748
|
);
|
|
36428
|
-
if (directiveResult
|
|
36749
|
+
if (directiveResult.jitForced) {
|
|
36750
|
+
this.jitDeclarationRegistry.jitDeclarations.add(node);
|
|
36429
36751
|
return {};
|
|
36430
36752
|
}
|
|
36431
36753
|
const analysis = directiveResult.metadata;
|
|
@@ -36537,7 +36859,7 @@ var DirectiveDecoratorHandler = class {
|
|
|
36537
36859
|
return true;
|
|
36538
36860
|
}
|
|
36539
36861
|
if (member.decorators) {
|
|
36540
|
-
return member.decorators.some((decorator) => FIELD_DECORATORS.some((decoratorName) =>
|
|
36862
|
+
return member.decorators.some((decorator) => FIELD_DECORATORS.some((decoratorName) => isAngularDecorator2(decorator, decoratorName, this.isCore)));
|
|
36541
36863
|
}
|
|
36542
36864
|
return false;
|
|
36543
36865
|
});
|
|
@@ -44016,7 +44338,7 @@ var EMPTY_ARRAY2 = [];
|
|
|
44016
44338
|
var isUsedDirective = (decl) => decl.kind === R3TemplateDependencyKind.Directive;
|
|
44017
44339
|
var isUsedPipe = (decl) => decl.kind === R3TemplateDependencyKind.Pipe;
|
|
44018
44340
|
var ComponentDecoratorHandler = class {
|
|
44019
|
-
constructor(reflector, evaluator, metaRegistry, metaReader, scopeReader, dtsScopeReader, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, resourceLoader, rootDirs, defaultPreserveWhitespaces, i18nUseExternalIds, enableI18nLegacyMessageIdFormat, usePoisonedData, i18nNormalizeLineEndingsInICUs, moduleResolver, cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, depTracker, injectableRegistry, semanticDepGraphUpdater, annotateForClosureCompiler, perf, hostDirectivesResolver, importTracker, includeClassMetadata, compilationMode, deferredSymbolTracker, forbidOrphanRendering, enableBlockSyntax, enableLetSyntax, localCompilationExtraImportsTracker) {
|
|
44341
|
+
constructor(reflector, evaluator, metaRegistry, metaReader, scopeReader, dtsScopeReader, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, resourceLoader, rootDirs, defaultPreserveWhitespaces, i18nUseExternalIds, enableI18nLegacyMessageIdFormat, usePoisonedData, i18nNormalizeLineEndingsInICUs, moduleResolver, cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, depTracker, injectableRegistry, semanticDepGraphUpdater, annotateForClosureCompiler, perf, hostDirectivesResolver, importTracker, includeClassMetadata, compilationMode, deferredSymbolTracker, forbidOrphanRendering, enableBlockSyntax, enableLetSyntax, localCompilationExtraImportsTracker, jitDeclarationRegistry) {
|
|
44020
44342
|
this.reflector = reflector;
|
|
44021
44343
|
this.evaluator = evaluator;
|
|
44022
44344
|
this.metaRegistry = metaRegistry;
|
|
@@ -44054,6 +44376,7 @@ var ComponentDecoratorHandler = class {
|
|
|
44054
44376
|
this.enableBlockSyntax = enableBlockSyntax;
|
|
44055
44377
|
this.enableLetSyntax = enableLetSyntax;
|
|
44056
44378
|
this.localCompilationExtraImportsTracker = localCompilationExtraImportsTracker;
|
|
44379
|
+
this.jitDeclarationRegistry = jitDeclarationRegistry;
|
|
44057
44380
|
this.literalCache = /* @__PURE__ */ new Map();
|
|
44058
44381
|
this.elementSchemaRegistry = new DomElementSchemaRegistry();
|
|
44059
44382
|
this.preanalyzeTemplateCache = /* @__PURE__ */ new Map();
|
|
@@ -44132,7 +44455,8 @@ var ComponentDecoratorHandler = class {
|
|
|
44132
44455
|
let diagnostics;
|
|
44133
44456
|
let isPoisoned = false;
|
|
44134
44457
|
const directiveResult = extractDirectiveMetadata(node, decorator, this.reflector, this.importTracker, this.evaluator, this.refEmitter, this.referencesRegistry, this.isCore, this.annotateForClosureCompiler, this.compilationMode, this.elementSchemaRegistry.getDefaultComponentElementName());
|
|
44135
|
-
if (directiveResult
|
|
44458
|
+
if (directiveResult.jitForced) {
|
|
44459
|
+
this.jitDeclarationRegistry.jitDeclarations.add(node);
|
|
44136
44460
|
return {};
|
|
44137
44461
|
}
|
|
44138
44462
|
const { decorator: component, metadata, inputs, outputs, hostDirectives, rawHostDirectives } = directiveResult;
|
|
@@ -45417,11 +45741,204 @@ var PipeDecoratorHandler = class {
|
|
|
45417
45741
|
}
|
|
45418
45742
|
};
|
|
45419
45743
|
|
|
45420
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/
|
|
45744
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/transform_api.mjs
|
|
45421
45745
|
var import_typescript92 = __toESM(require("typescript"), 1);
|
|
45746
|
+
function createSyntheticAngularCoreDecoratorAccess(factory10, importManager, ngClassDecorator, sourceFile, decoratorName) {
|
|
45747
|
+
const classDecoratorIdentifier = import_typescript92.default.isIdentifier(ngClassDecorator.identifier) ? ngClassDecorator.identifier : ngClassDecorator.identifier.expression;
|
|
45748
|
+
return factory10.createPropertyAccessExpression(
|
|
45749
|
+
importManager.addImport({
|
|
45750
|
+
exportModuleSpecifier: "@angular/core",
|
|
45751
|
+
exportSymbolName: null,
|
|
45752
|
+
requestedFile: sourceFile
|
|
45753
|
+
}),
|
|
45754
|
+
import_typescript92.default.setOriginalNode(factory10.createIdentifier(decoratorName), classDecoratorIdentifier)
|
|
45755
|
+
);
|
|
45756
|
+
}
|
|
45757
|
+
function castAsAny(factory10, expr) {
|
|
45758
|
+
return factory10.createAsExpression(expr, factory10.createKeywordTypeNode(import_typescript92.default.SyntaxKind.AnyKeyword));
|
|
45759
|
+
}
|
|
45760
|
+
|
|
45761
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/input_function.mjs
|
|
45762
|
+
var signalInputsTransform = (member, host, factory10, importTracker, importManager, classDecorator, isCore) => {
|
|
45763
|
+
var _a2, _b2;
|
|
45764
|
+
if ((_a2 = host.getDecoratorsOfDeclaration(member.node)) == null ? void 0 : _a2.some((d) => isAngularDecorator2(d, "Input", isCore))) {
|
|
45765
|
+
return member.node;
|
|
45766
|
+
}
|
|
45767
|
+
const inputMapping = tryParseSignalInputMapping(member, host, importTracker);
|
|
45768
|
+
if (inputMapping === null) {
|
|
45769
|
+
return member.node;
|
|
45770
|
+
}
|
|
45771
|
+
const fields = {
|
|
45772
|
+
"isSignal": factory10.createTrue(),
|
|
45773
|
+
"alias": factory10.createStringLiteral(inputMapping.bindingPropertyName),
|
|
45774
|
+
"required": inputMapping.required ? factory10.createTrue() : factory10.createFalse(),
|
|
45775
|
+
"transform": factory10.createIdentifier("undefined")
|
|
45776
|
+
};
|
|
45777
|
+
const sourceFile = member.node.getSourceFile();
|
|
45778
|
+
const newDecorator = factory10.createDecorator(factory10.createCallExpression(createSyntheticAngularCoreDecoratorAccess(factory10, importManager, classDecorator, sourceFile, "Input"), void 0, [
|
|
45779
|
+
castAsAny(factory10, factory10.createObjectLiteralExpression(Object.entries(fields).map(([name, value]) => factory10.createPropertyAssignment(name, value))))
|
|
45780
|
+
]));
|
|
45781
|
+
return factory10.updatePropertyDeclaration(member.node, [newDecorator, ...(_b2 = member.node.modifiers) != null ? _b2 : []], member.name, member.node.questionToken, member.node.type, member.node.initializer);
|
|
45782
|
+
};
|
|
45422
45783
|
|
|
45423
|
-
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/
|
|
45784
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/model_function.mjs
|
|
45424
45785
|
var import_typescript93 = __toESM(require("typescript"), 1);
|
|
45786
|
+
var signalModelTransform = (member, host, factory10, importTracker, importManager, classDecorator, isCore) => {
|
|
45787
|
+
var _a2, _b2;
|
|
45788
|
+
if ((_a2 = host.getDecoratorsOfDeclaration(member.node)) == null ? void 0 : _a2.some((d) => {
|
|
45789
|
+
return isAngularDecorator2(d, "Input", isCore) || isAngularDecorator2(d, "Output", isCore);
|
|
45790
|
+
})) {
|
|
45791
|
+
return member.node;
|
|
45792
|
+
}
|
|
45793
|
+
const modelMapping = tryParseSignalModelMapping(member, host, importTracker);
|
|
45794
|
+
if (modelMapping === null) {
|
|
45795
|
+
return member.node;
|
|
45796
|
+
}
|
|
45797
|
+
const inputConfig = factory10.createObjectLiteralExpression([
|
|
45798
|
+
factory10.createPropertyAssignment("isSignal", modelMapping.input.isSignal ? factory10.createTrue() : factory10.createFalse()),
|
|
45799
|
+
factory10.createPropertyAssignment("alias", factory10.createStringLiteral(modelMapping.input.bindingPropertyName)),
|
|
45800
|
+
factory10.createPropertyAssignment("required", modelMapping.input.required ? factory10.createTrue() : factory10.createFalse())
|
|
45801
|
+
]);
|
|
45802
|
+
const sourceFile = member.node.getSourceFile();
|
|
45803
|
+
const inputDecorator = createDecorator(
|
|
45804
|
+
"Input",
|
|
45805
|
+
factory10.createAsExpression(inputConfig, factory10.createKeywordTypeNode(import_typescript93.default.SyntaxKind.AnyKeyword)),
|
|
45806
|
+
classDecorator,
|
|
45807
|
+
factory10,
|
|
45808
|
+
sourceFile,
|
|
45809
|
+
importManager
|
|
45810
|
+
);
|
|
45811
|
+
const outputDecorator = createDecorator("Output", factory10.createStringLiteral(modelMapping.output.bindingPropertyName), classDecorator, factory10, sourceFile, importManager);
|
|
45812
|
+
return factory10.updatePropertyDeclaration(member.node, [inputDecorator, outputDecorator, ...(_b2 = member.node.modifiers) != null ? _b2 : []], member.node.name, member.node.questionToken, member.node.type, member.node.initializer);
|
|
45813
|
+
};
|
|
45814
|
+
function createDecorator(name, config, classDecorator, factory10, sourceFile, importManager) {
|
|
45815
|
+
const callTarget = createSyntheticAngularCoreDecoratorAccess(factory10, importManager, classDecorator, sourceFile, name);
|
|
45816
|
+
return factory10.createDecorator(factory10.createCallExpression(callTarget, void 0, [config]));
|
|
45817
|
+
}
|
|
45818
|
+
|
|
45819
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/output_function.mjs
|
|
45820
|
+
var initializerApiOutputTransform = (member, host, factory10, importTracker, importManager, classDecorator, isCore) => {
|
|
45821
|
+
var _a2, _b2;
|
|
45822
|
+
if ((_a2 = host.getDecoratorsOfDeclaration(member.node)) == null ? void 0 : _a2.some((d) => isAngularDecorator2(d, "Output", isCore))) {
|
|
45823
|
+
return member.node;
|
|
45824
|
+
}
|
|
45825
|
+
const output = tryParseInitializerBasedOutput(member, host, importTracker);
|
|
45826
|
+
if (output === null) {
|
|
45827
|
+
return member.node;
|
|
45828
|
+
}
|
|
45829
|
+
const sourceFile = member.node.getSourceFile();
|
|
45830
|
+
const newDecorator = factory10.createDecorator(factory10.createCallExpression(createSyntheticAngularCoreDecoratorAccess(factory10, importManager, classDecorator, sourceFile, "Output"), void 0, [factory10.createStringLiteral(output.metadata.bindingPropertyName)]));
|
|
45831
|
+
return factory10.updatePropertyDeclaration(member.node, [newDecorator, ...(_b2 = member.node.modifiers) != null ? _b2 : []], member.node.name, member.node.questionToken, member.node.type, member.node.initializer);
|
|
45832
|
+
};
|
|
45833
|
+
|
|
45834
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/query_functions.mjs
|
|
45835
|
+
var queryFunctionToDecorator = {
|
|
45836
|
+
viewChild: "ViewChild",
|
|
45837
|
+
viewChildren: "ViewChildren",
|
|
45838
|
+
contentChild: "ContentChild",
|
|
45839
|
+
contentChildren: "ContentChildren"
|
|
45840
|
+
};
|
|
45841
|
+
var queryFunctionsTransforms = (member, host, factory10, importTracker, importManager, classDecorator, isCore) => {
|
|
45842
|
+
var _a2;
|
|
45843
|
+
const decorators = host.getDecoratorsOfDeclaration(member.node);
|
|
45844
|
+
const queryDecorators = decorators && getAngularDecorators(decorators, queryDecoratorNames, isCore);
|
|
45845
|
+
if (queryDecorators !== null && queryDecorators.length > 0) {
|
|
45846
|
+
return member.node;
|
|
45847
|
+
}
|
|
45848
|
+
const queryDefinition = tryParseSignalQueryFromInitializer(member, host, importTracker);
|
|
45849
|
+
if (queryDefinition === null) {
|
|
45850
|
+
return member.node;
|
|
45851
|
+
}
|
|
45852
|
+
const sourceFile = member.node.getSourceFile();
|
|
45853
|
+
const callArgs = queryDefinition.call.arguments;
|
|
45854
|
+
const newDecorator = factory10.createDecorator(factory10.createCallExpression(
|
|
45855
|
+
createSyntheticAngularCoreDecoratorAccess(factory10, importManager, classDecorator, sourceFile, queryFunctionToDecorator[queryDefinition.name]),
|
|
45856
|
+
void 0,
|
|
45857
|
+
[
|
|
45858
|
+
queryDefinition.call.arguments[0],
|
|
45859
|
+
castAsAny(factory10, factory10.createObjectLiteralExpression([
|
|
45860
|
+
...callArgs.length > 1 ? [factory10.createSpreadAssignment(callArgs[1])] : [],
|
|
45861
|
+
factory10.createPropertyAssignment("isSignal", factory10.createTrue())
|
|
45862
|
+
]))
|
|
45863
|
+
]
|
|
45864
|
+
));
|
|
45865
|
+
return factory10.updatePropertyDeclaration(member.node, [newDecorator, ...(_a2 = member.node.modifiers) != null ? _a2 : []], member.node.name, member.node.questionToken, member.node.type, member.node.initializer);
|
|
45866
|
+
};
|
|
45867
|
+
|
|
45868
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/jit/src/initializer_api_transforms/transform.mjs
|
|
45869
|
+
var decoratorsWithInputs = ["Directive", "Component"];
|
|
45870
|
+
var propertyTransforms = [
|
|
45871
|
+
signalInputsTransform,
|
|
45872
|
+
initializerApiOutputTransform,
|
|
45873
|
+
queryFunctionsTransforms,
|
|
45874
|
+
signalModelTransform
|
|
45875
|
+
];
|
|
45876
|
+
function getInitializerApiJitTransform(host, importTracker, isCore, shouldTransformClass) {
|
|
45877
|
+
return (ctx) => {
|
|
45878
|
+
return (sourceFile) => {
|
|
45879
|
+
const importManager = new ImportManager();
|
|
45880
|
+
sourceFile = import_typescript94.default.visitNode(sourceFile, createTransformVisitor(ctx, host, importManager, importTracker, isCore, shouldTransformClass), import_typescript94.default.isSourceFile);
|
|
45881
|
+
return importManager.transformTsFile(ctx, sourceFile);
|
|
45882
|
+
};
|
|
45883
|
+
};
|
|
45884
|
+
}
|
|
45885
|
+
function createTransformVisitor(ctx, host, importManager, importTracker, isCore, shouldTransformClass) {
|
|
45886
|
+
const visitor = (node) => {
|
|
45887
|
+
var _a2;
|
|
45888
|
+
if (import_typescript94.default.isClassDeclaration(node) && node.name !== void 0) {
|
|
45889
|
+
const originalNode = import_typescript94.default.getOriginalNode(node, import_typescript94.default.isClassDeclaration);
|
|
45890
|
+
const angularDecorator = (_a2 = host.getDecoratorsOfDeclaration(originalNode)) == null ? void 0 : _a2.find((d) => decoratorsWithInputs.some((name) => isAngularDecorator2(d, name, isCore)));
|
|
45891
|
+
if (angularDecorator !== void 0 && (shouldTransformClass === void 0 || shouldTransformClass(node))) {
|
|
45892
|
+
let hasChanged = false;
|
|
45893
|
+
const members = node.members.map((memberNode) => {
|
|
45894
|
+
if (!import_typescript94.default.isPropertyDeclaration(memberNode)) {
|
|
45895
|
+
return memberNode;
|
|
45896
|
+
}
|
|
45897
|
+
const member = reflectClassMember(memberNode);
|
|
45898
|
+
if (member === null) {
|
|
45899
|
+
return memberNode;
|
|
45900
|
+
}
|
|
45901
|
+
for (const transform2 of propertyTransforms) {
|
|
45902
|
+
const newNode = transform2(__spreadProps(__spreadValues({}, member), { node: memberNode }), host, ctx.factory, importTracker, importManager, angularDecorator, isCore);
|
|
45903
|
+
if (newNode !== member.node) {
|
|
45904
|
+
hasChanged = true;
|
|
45905
|
+
return newNode;
|
|
45906
|
+
}
|
|
45907
|
+
}
|
|
45908
|
+
return memberNode;
|
|
45909
|
+
});
|
|
45910
|
+
if (hasChanged) {
|
|
45911
|
+
return ctx.factory.updateClassDeclaration(node, node.modifiers, node.name, node.typeParameters, node.heritageClauses, members);
|
|
45912
|
+
}
|
|
45913
|
+
}
|
|
45914
|
+
}
|
|
45915
|
+
return import_typescript94.default.visitEachChild(node, visitor, ctx);
|
|
45916
|
+
};
|
|
45917
|
+
return visitor;
|
|
45918
|
+
}
|
|
45919
|
+
|
|
45920
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/jit/src/index.mjs
|
|
45921
|
+
function angularJitApplicationTransform(program, isCore = false, shouldTransformClass) {
|
|
45922
|
+
const typeChecker = program.getTypeChecker();
|
|
45923
|
+
const reflectionHost = new TypeScriptReflectionHost(typeChecker);
|
|
45924
|
+
const importTracker = new ImportedSymbolsTracker();
|
|
45925
|
+
const downlevelDecoratorTransform = getDownlevelDecoratorsTransform(
|
|
45926
|
+
typeChecker,
|
|
45927
|
+
reflectionHost,
|
|
45928
|
+
[],
|
|
45929
|
+
isCore,
|
|
45930
|
+
false,
|
|
45931
|
+
shouldTransformClass
|
|
45932
|
+
);
|
|
45933
|
+
const initializerApisJitTransform = getInitializerApiJitTransform(reflectionHost, importTracker, isCore, shouldTransformClass);
|
|
45934
|
+
return (ctx) => {
|
|
45935
|
+
return (sourceFile) => {
|
|
45936
|
+
sourceFile = initializerApisJitTransform(ctx)(sourceFile);
|
|
45937
|
+
sourceFile = downlevelDecoratorTransform(ctx)(sourceFile);
|
|
45938
|
+
return sourceFile;
|
|
45939
|
+
};
|
|
45940
|
+
};
|
|
45941
|
+
}
|
|
45425
45942
|
|
|
45426
45943
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
45427
45944
|
var EmitFlags;
|
|
@@ -46049,13 +46566,19 @@ var ClassExtractor = class {
|
|
|
46049
46566
|
}
|
|
46050
46567
|
isMemberExcluded(member) {
|
|
46051
46568
|
var _a2;
|
|
46052
|
-
return !member.name || !this.isDocumentableMember(member) ||
|
|
46569
|
+
return !member.name || !this.isDocumentableMember(member) || !import_typescript102.default.isCallSignatureDeclaration(member) && ((_a2 = member.modifiers) == null ? void 0 : _a2.some((mod) => mod.kind === import_typescript102.default.SyntaxKind.PrivateKeyword)) || member.name.getText() === "prototype" || isAngularPrivateName(member.name.getText()) || isInternal(member);
|
|
46053
46570
|
}
|
|
46054
46571
|
isDocumentableMember(member) {
|
|
46055
|
-
return this.isMethod(member) || this.isProperty(member) || import_typescript102.default.isAccessor(member);
|
|
46572
|
+
return this.isMethod(member) || this.isProperty(member) || import_typescript102.default.isAccessor(member) || import_typescript102.default.isCallSignatureDeclaration(member);
|
|
46573
|
+
}
|
|
46574
|
+
isPublicConstructorParameterProperty(node) {
|
|
46575
|
+
if (import_typescript102.default.isParameterPropertyDeclaration(node, node.parent) && node.modifiers) {
|
|
46576
|
+
return node.modifiers.some((modifier) => modifier.kind === import_typescript102.default.SyntaxKind.PublicKeyword);
|
|
46577
|
+
}
|
|
46578
|
+
return false;
|
|
46056
46579
|
}
|
|
46057
46580
|
isProperty(member) {
|
|
46058
|
-
return import_typescript102.default.isPropertyDeclaration(member) || import_typescript102.default.isPropertySignature(member);
|
|
46581
|
+
return import_typescript102.default.isPropertyDeclaration(member) || import_typescript102.default.isPropertySignature(member) || this.isPublicConstructorParameterProperty(member);
|
|
46059
46582
|
}
|
|
46060
46583
|
isMethod(member) {
|
|
46061
46584
|
return import_typescript102.default.isMethodDeclaration(member) || import_typescript102.default.isMethodSignature(member);
|
|
@@ -48790,6 +49313,25 @@ var NgCompiler = class {
|
|
|
48790
49313
|
aliasTransformFactory(compilation.traitCompiler.exportStatements),
|
|
48791
49314
|
defaultImportTracker.importPreservingTransformer()
|
|
48792
49315
|
];
|
|
49316
|
+
if (compilation.supportJitMode && compilation.jitDeclarationRegistry.jitDeclarations.size > 0) {
|
|
49317
|
+
const { jitDeclarations } = compilation.jitDeclarationRegistry;
|
|
49318
|
+
const jitDeclarationsArray = Array.from(jitDeclarations);
|
|
49319
|
+
const jitDeclarationOriginalNodes = new Set(jitDeclarationsArray.map((d) => import_typescript119.default.getOriginalNode(d)));
|
|
49320
|
+
const sourceFilesWithJit = new Set(jitDeclarationsArray.map((d) => d.getSourceFile().fileName));
|
|
49321
|
+
before.push((ctx) => {
|
|
49322
|
+
const reflectionHost = new TypeScriptReflectionHost(this.inputProgram.getTypeChecker());
|
|
49323
|
+
const jitTransform = angularJitApplicationTransform(this.inputProgram, compilation.isCore, (node) => {
|
|
49324
|
+
node = import_typescript119.default.getOriginalNode(node, import_typescript119.default.isClassDeclaration);
|
|
49325
|
+
return reflectionHost.isClass(node) && jitDeclarationOriginalNodes.has(node);
|
|
49326
|
+
})(ctx);
|
|
49327
|
+
return (sourceFile) => {
|
|
49328
|
+
if (!sourceFilesWithJit.has(sourceFile.fileName)) {
|
|
49329
|
+
return sourceFile;
|
|
49330
|
+
}
|
|
49331
|
+
return jitTransform(sourceFile);
|
|
49332
|
+
};
|
|
49333
|
+
});
|
|
49334
|
+
}
|
|
48793
49335
|
const afterDeclarations = [];
|
|
48794
49336
|
if (this.options.compilationMode !== "experimental-local" && compilation.dtsTransforms !== null) {
|
|
48795
49337
|
afterDeclarations.push(declarationTransformFactory(compilation.dtsTransforms, compilation.reflector, compilation.refEmitter, importRewriter));
|
|
@@ -49106,9 +49648,10 @@ var NgCompiler = class {
|
|
|
49106
49648
|
if (supportJitMode === false && this.options.forbidOrphanComponents) {
|
|
49107
49649
|
throw new Error('JIT mode support ("supportJitMode" option) cannot be disabled when forbidOrphanComponents is set to true');
|
|
49108
49650
|
}
|
|
49651
|
+
const jitDeclarationRegistry = new JitDeclarationRegistry();
|
|
49109
49652
|
const handlers = [
|
|
49110
|
-
new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, depScopeReader, ngModuleScopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, this.resourceManager, this.adapter.rootDirs, this.options.preserveWhitespaces || false, this.options.i18nUseExternalIds !== false, this.options.enableI18nLegacyMessageIdFormat !== false, this.usePoisonedData, this.options.i18nNormalizeLineEndingsInICUs === true, this.moduleResolver, this.cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, hostDirectivesResolver, importTracker, supportTestBed, compilationMode, deferredSymbolsTracker, !!this.options.forbidOrphanComponents, this.enableBlockSyntax, this.enableLetSyntax, localCompilationExtraImportsTracker),
|
|
49111
|
-
new DirectiveDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, importTracker, supportTestBed, compilationMode,
|
|
49653
|
+
new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, depScopeReader, ngModuleScopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, this.resourceManager, this.adapter.rootDirs, this.options.preserveWhitespaces || false, this.options.i18nUseExternalIds !== false, this.options.enableI18nLegacyMessageIdFormat !== false, this.usePoisonedData, this.options.i18nNormalizeLineEndingsInICUs === true, this.moduleResolver, this.cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, hostDirectivesResolver, importTracker, supportTestBed, compilationMode, deferredSymbolsTracker, !!this.options.forbidOrphanComponents, this.enableBlockSyntax, this.enableLetSyntax, localCompilationExtraImportsTracker, jitDeclarationRegistry),
|
|
49654
|
+
new DirectiveDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, importTracker, supportTestBed, compilationMode, jitDeclarationRegistry),
|
|
49112
49655
|
new PipeDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, injectableRegistry, isCore, this.delegatingPerfRecorder, supportTestBed, compilationMode, !!this.options.generateExtraImportsInLocalMode),
|
|
49113
49656
|
new InjectableDecoratorHandler(reflector, evaluator, isCore, strictCtorDeps, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, compilationMode),
|
|
49114
49657
|
new NgModuleDecoratorHandler(reflector, evaluator, metaReader, metaRegistry, ngModuleScopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, this.closureCompilerEnabled, (_d2 = this.options.onlyPublishPublicTypingsForNgModules) != null ? _d2 : false, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, supportJitMode, compilationMode, localCompilationExtraImportsTracker)
|
|
@@ -49137,8 +49680,10 @@ var NgCompiler = class {
|
|
|
49137
49680
|
resourceRegistry,
|
|
49138
49681
|
extendedTemplateChecker,
|
|
49139
49682
|
localCompilationExtraImportsTracker,
|
|
49683
|
+
jitDeclarationRegistry,
|
|
49140
49684
|
templateSemanticsChecker,
|
|
49141
|
-
sourceFileValidator
|
|
49685
|
+
sourceFileValidator,
|
|
49686
|
+
supportJitMode
|
|
49142
49687
|
};
|
|
49143
49688
|
}
|
|
49144
49689
|
};
|
|
@@ -49587,6 +50132,7 @@ var NgtscProgram = class {
|
|
|
49587
50132
|
};
|
|
49588
50133
|
}
|
|
49589
50134
|
}
|
|
50135
|
+
untagAllTsFiles(this.tsProgram);
|
|
49590
50136
|
const forceEmit = (_a2 = opts == null ? void 0 : opts.forceEmit) != null ? _a2 : false;
|
|
49591
50137
|
this.compiler.perfRecorder.memory(PerfCheckpoint.PreEmit);
|
|
49592
50138
|
const res = this.compiler.perfRecorder.inPhase(PerfPhase.TypeScriptEmit, () => {
|