@angular/compiler-cli 14.2.0 → 15.0.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/bundles/{chunk-RCXOJZDO.js → chunk-2HPI44CB.js} +5 -5
- package/bundles/{chunk-RCXOJZDO.js.map → chunk-2HPI44CB.js.map} +0 -0
- package/bundles/{chunk-CLRZAXXE.js → chunk-7YHMCUJT.js} +10 -3
- package/bundles/chunk-7YHMCUJT.js.map +6 -0
- package/bundles/{chunk-56O2PTWU.js → chunk-CYVTLM4Z.js} +7 -7
- package/bundles/{chunk-56O2PTWU.js.map → chunk-CYVTLM4Z.js.map} +0 -0
- package/bundles/{chunk-5FZBUSFV.js → chunk-E7NQQTT7.js} +3 -3
- package/bundles/{chunk-5FZBUSFV.js.map → chunk-E7NQQTT7.js.map} +0 -0
- package/bundles/{chunk-DEPZI7L5.js → chunk-FHVSPC32.js} +54 -32
- package/bundles/chunk-FHVSPC32.js.map +6 -0
- package/bundles/{chunk-ICPLY7FO.js → chunk-FM6NPN5V.js} +4 -4
- package/bundles/{chunk-ICPLY7FO.js.map → chunk-FM6NPN5V.js.map} +0 -0
- package/bundles/{chunk-TTIGAMYZ.js → chunk-HTGNPCKD.js} +6 -7
- package/bundles/chunk-HTGNPCKD.js.map +6 -0
- package/bundles/{chunk-J6AVV3MN.js → chunk-I6QQYDN3.js} +291 -118
- package/bundles/chunk-I6QQYDN3.js.map +6 -0
- package/bundles/{chunk-NDIOQ2EH.js → chunk-NJU6754X.js} +165 -114
- package/bundles/chunk-NJU6754X.js.map +6 -0
- package/bundles/{chunk-DGTSPJIN.js → chunk-NX4VAKY6.js} +40 -40
- package/bundles/{chunk-DGTSPJIN.js.map → chunk-NX4VAKY6.js.map} +0 -0
- package/bundles/{chunk-HMWNYAAE.js → chunk-R3C7RFJ4.js} +2 -2
- package/bundles/{chunk-HMWNYAAE.js.map → chunk-R3C7RFJ4.js.map} +0 -0
- package/bundles/{chunk-XR6BVLNN.js → chunk-TF2TR2WS.js} +42 -26
- package/bundles/chunk-TF2TR2WS.js.map +6 -0
- package/bundles/{chunk-4NRCP3Y6.js → chunk-TOKOIIBI.js} +7 -7
- package/bundles/{chunk-4NRCP3Y6.js.map → chunk-TOKOIIBI.js.map} +0 -0
- package/bundles/{chunk-I4BG3CAN.js → chunk-TTNGBVW6.js} +76 -74
- package/bundles/chunk-TTNGBVW6.js.map +6 -0
- package/bundles/{chunk-3GWIAJ6N.js → chunk-UZLFREET.js} +31 -21
- package/bundles/chunk-UZLFREET.js.map +6 -0
- package/bundles/{chunk-NJ2FQOJT.js → chunk-XDX5RDY5.js} +10 -8
- package/bundles/chunk-XDX5RDY5.js.map +6 -0
- package/bundles/index.js +13 -13
- package/bundles/linker/babel/index.js +13 -13
- package/bundles/linker/index.js +5 -5
- package/bundles/ngcc/index.js +13 -13
- package/bundles/ngcc/main-ngcc.js +14 -14
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +14 -14
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +4 -4
- package/bundles/private/bazel.js +1 -1
- package/bundles/private/localize.js +3 -3
- package/bundles/private/migrations.js +6 -6
- package/bundles/private/tooling.js +3 -3
- package/bundles/src/bin/ng_xi18n.js +11 -11
- package/bundles/src/bin/ngc.js +9 -9
- package/bundles_metadata.json +1 -1
- package/ngcc/src/analysis/decoration_analyzer.d.ts +2 -1
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/annotations/common/src/diagnostics.d.ts +2 -1
- package/src/ngtsc/annotations/component/src/handler.d.ts +3 -2
- package/src/ngtsc/annotations/component/src/metadata.d.ts +5 -1
- package/src/ngtsc/annotations/directive/src/handler.d.ts +6 -3
- package/src/ngtsc/annotations/directive/src/shared.d.ts +5 -2
- package/src/ngtsc/core/api/src/public_options.d.ts +1 -13
- package/src/ngtsc/diagnostics/index.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/error.d.ts +1 -0
- package/src/ngtsc/diagnostics/src/error_code.d.ts +12 -0
- package/src/ngtsc/metadata/index.d.ts +1 -0
- package/src/ngtsc/metadata/src/api.d.ts +28 -0
- package/src/ngtsc/metadata/src/host_directives_resolver.d.ts +28 -0
- package/src/ngtsc/metadata/src/util.d.ts +3 -2
- package/src/ngtsc/scope/src/typecheck.d.ts +4 -3
- package/src/ngtsc/ts_compatibility/src/ts_cross_version_utils.d.ts +36 -2
- package/src/ngtsc/typecheck/diagnostics/src/diagnostic.d.ts +4 -0
- package/src/ngtsc/typecheck/src/type_check_block.d.ts +1 -1
- package/src/transformers/util.d.ts +0 -1
- package/bundles/chunk-3GWIAJ6N.js.map +0 -6
- package/bundles/chunk-CLRZAXXE.js.map +0 -6
- package/bundles/chunk-DEPZI7L5.js.map +0 -6
- package/bundles/chunk-I4BG3CAN.js.map +0 -6
- package/bundles/chunk-J6AVV3MN.js.map +0 -6
- package/bundles/chunk-NDIOQ2EH.js.map +0 -6
- package/bundles/chunk-NJ2FQOJT.js.map +0 -6
- package/bundles/chunk-TTIGAMYZ.js.map +0 -6
- package/bundles/chunk-XR6BVLNN.js.map +0 -6
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
reflectObjectLiteral,
|
|
14
14
|
reflectTypeEntityToDeclaration,
|
|
15
15
|
typeNodeToValueExpr
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XDX5RDY5.js";
|
|
17
17
|
import {
|
|
18
18
|
ErrorCode,
|
|
19
19
|
FatalDiagnosticError,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
translateExpression,
|
|
34
34
|
translateStatement,
|
|
35
35
|
translateType
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-TF2TR2WS.js";
|
|
37
37
|
import {
|
|
38
38
|
combineModifiers,
|
|
39
39
|
createPropertyDeclaration,
|
|
@@ -46,18 +46,18 @@ import {
|
|
|
46
46
|
updateParameterDeclaration,
|
|
47
47
|
updatePropertyDeclaration,
|
|
48
48
|
updateSetAccessorDeclaration
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-7YHMCUJT.js";
|
|
50
50
|
import {
|
|
51
51
|
absoluteFrom,
|
|
52
52
|
absoluteFromSourceFile,
|
|
53
53
|
relative
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-TOKOIIBI.js";
|
|
55
55
|
import {
|
|
56
56
|
PerfEvent,
|
|
57
57
|
PerfPhase
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-2HPI44CB.js";
|
|
59
59
|
|
|
60
|
-
// bazel-out/
|
|
60
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
|
|
61
61
|
import { ExternalExpr, ParseLocation, ParseSourceFile, ParseSourceSpan, ReadPropExpr, WrappedNodeExpr } from "@angular/compiler";
|
|
62
62
|
import ts from "typescript";
|
|
63
63
|
function valueReferenceToExpression(valueRef) {
|
|
@@ -293,7 +293,7 @@ function getOriginNodeForDiagnostics(expr, container) {
|
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
// bazel-out/
|
|
296
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
|
|
297
297
|
var DynamicValue = class {
|
|
298
298
|
constructor(node, reason, code) {
|
|
299
299
|
this.node = node;
|
|
@@ -383,10 +383,10 @@ var DynamicValue = class {
|
|
|
383
383
|
}
|
|
384
384
|
};
|
|
385
385
|
|
|
386
|
-
// bazel-out/
|
|
386
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
|
|
387
387
|
import ts2 from "typescript";
|
|
388
388
|
|
|
389
|
-
// bazel-out/
|
|
389
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
|
|
390
390
|
var ResolvedModule = class {
|
|
391
391
|
constructor(exports, evaluate) {
|
|
392
392
|
this.exports = exports;
|
|
@@ -416,7 +416,7 @@ var EnumValue = class {
|
|
|
416
416
|
var KnownFn = class {
|
|
417
417
|
};
|
|
418
418
|
|
|
419
|
-
// bazel-out/
|
|
419
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
|
|
420
420
|
var ArraySliceBuiltinFn = class extends KnownFn {
|
|
421
421
|
constructor(lhs) {
|
|
422
422
|
super();
|
|
@@ -487,7 +487,7 @@ var ObjectAssignBuiltinFn = class extends KnownFn {
|
|
|
487
487
|
}
|
|
488
488
|
};
|
|
489
489
|
|
|
490
|
-
// bazel-out/
|
|
490
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/ts_helpers.mjs
|
|
491
491
|
var AssignHelperFn = class extends ObjectAssignBuiltinFn {
|
|
492
492
|
};
|
|
493
493
|
var SpreadHelperFn = class extends KnownFn {
|
|
@@ -540,7 +540,7 @@ var ReadHelperFn = class extends KnownFn {
|
|
|
540
540
|
}
|
|
541
541
|
};
|
|
542
542
|
|
|
543
|
-
// bazel-out/
|
|
543
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/known_declaration.mjs
|
|
544
544
|
var jsGlobalObjectValue = /* @__PURE__ */ new Map([["assign", new ObjectAssignBuiltinFn()]]);
|
|
545
545
|
var assignTsHelperFn = new AssignHelperFn();
|
|
546
546
|
var spreadTsHelperFn = new SpreadHelperFn();
|
|
@@ -564,14 +564,14 @@ function resolveKnownDeclaration(decl) {
|
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
|
|
567
|
-
// bazel-out/
|
|
567
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic.mjs
|
|
568
568
|
var SyntheticValue = class {
|
|
569
569
|
constructor(value) {
|
|
570
570
|
this.value = value;
|
|
571
571
|
}
|
|
572
572
|
};
|
|
573
573
|
|
|
574
|
-
// bazel-out/
|
|
574
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
|
|
575
575
|
function literalBinaryOp(op) {
|
|
576
576
|
return { op, literal: true };
|
|
577
577
|
}
|
|
@@ -1157,7 +1157,7 @@ function owningModule(context, override = null) {
|
|
|
1157
1157
|
}
|
|
1158
1158
|
}
|
|
1159
1159
|
|
|
1160
|
-
// bazel-out/
|
|
1160
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
|
|
1161
1161
|
var PartialEvaluator = class {
|
|
1162
1162
|
constructor(host, checker, dependencyTracker) {
|
|
1163
1163
|
this.host = host;
|
|
@@ -1177,7 +1177,7 @@ var PartialEvaluator = class {
|
|
|
1177
1177
|
}
|
|
1178
1178
|
};
|
|
1179
1179
|
|
|
1180
|
-
// bazel-out/
|
|
1180
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
|
|
1181
1181
|
import ts3 from "typescript";
|
|
1182
1182
|
function describeResolvedType(value, maxDepth = 1) {
|
|
1183
1183
|
var _a, _b;
|
|
@@ -1307,7 +1307,7 @@ function getContainerNode(node) {
|
|
|
1307
1307
|
return node.getSourceFile();
|
|
1308
1308
|
}
|
|
1309
1309
|
|
|
1310
|
-
// bazel-out/
|
|
1310
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
|
|
1311
1311
|
import { LiteralExpr, WrappedNodeExpr as WrappedNodeExpr2 } from "@angular/compiler";
|
|
1312
1312
|
import ts4 from "typescript";
|
|
1313
1313
|
function getConstructorDependencies(clazz, reflector, isCore) {
|
|
@@ -1451,7 +1451,7 @@ function createUnsuitableInjectionTokenError(clazz, error) {
|
|
|
1451
1451
|
return new FatalDiagnosticError(ErrorCode.PARAM_MISSING_TOKEN, param.nameNode, chain, hints);
|
|
1452
1452
|
}
|
|
1453
1453
|
|
|
1454
|
-
// bazel-out/
|
|
1454
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
|
|
1455
1455
|
import ts5 from "typescript";
|
|
1456
1456
|
function makeDuplicateDeclarationError(node, data, kind) {
|
|
1457
1457
|
const context = [];
|
|
@@ -1525,6 +1525,23 @@ function getDirectiveDiagnostics(node, reader, evaluator, reflector, scopeRegist
|
|
|
1525
1525
|
addDiagnostics(checkInheritanceOfDirective(node, reader, reflector, evaluator));
|
|
1526
1526
|
return diagnostics;
|
|
1527
1527
|
}
|
|
1528
|
+
function validateHostDirectives(origin, hostDirectives, metaReader) {
|
|
1529
|
+
const diagnostics = [];
|
|
1530
|
+
for (const current of hostDirectives) {
|
|
1531
|
+
const hostMeta = metaReader.getDirectiveMetadata(current.directive);
|
|
1532
|
+
if (hostMeta === null) {
|
|
1533
|
+
diagnostics.push(makeDiagnostic(ErrorCode.HOST_DIRECTIVE_INVALID, current.directive.getOriginForDiagnostics(origin), `${current.directive.debugName} must be a standalone directive to be used as a host directive`));
|
|
1534
|
+
continue;
|
|
1535
|
+
}
|
|
1536
|
+
if (!hostMeta.isStandalone) {
|
|
1537
|
+
diagnostics.push(makeDiagnostic(ErrorCode.HOST_DIRECTIVE_NOT_STANDALONE, current.directive.getOriginForDiagnostics(origin), `Host directive ${hostMeta.name} must be standalone`));
|
|
1538
|
+
}
|
|
1539
|
+
if (hostMeta.isComponent) {
|
|
1540
|
+
diagnostics.push(makeDiagnostic(ErrorCode.HOST_DIRECTIVE_COMPONENT, current.directive.getOriginForDiagnostics(origin), `Host directive ${hostMeta.name} cannot be a component`));
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
return diagnostics;
|
|
1544
|
+
}
|
|
1528
1545
|
function getUndecoratedClassWithAngularFeaturesDiagnostic(node) {
|
|
1529
1546
|
return makeDiagnostic(ErrorCode.UNDECORATED_CLASS_USING_ANGULAR_FEATURES, node.name, `Class is using Angular features but is not decorated. Please add an explicit Angular decorator.`);
|
|
1530
1547
|
}
|
|
@@ -1559,7 +1576,7 @@ function getInheritedUndecoratedCtorDiagnostic(node, baseClass, reader) {
|
|
|
1559
1576
|
return makeDiagnostic(ErrorCode.DIRECTIVE_INHERITS_UNDECORATED_CTOR, node.name, `The ${dirOrComp.toLowerCase()} ${node.name.text} inherits its constructor from ${baseClassName}, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of ${baseClassName}'s constructor. Either add a @Directive decorator to ${baseClassName}, or add an explicit constructor to ${node.name.text}.`);
|
|
1560
1577
|
}
|
|
1561
1578
|
|
|
1562
|
-
// bazel-out/
|
|
1579
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
|
|
1563
1580
|
import ts6 from "typescript";
|
|
1564
1581
|
function resolveEnumValue(evaluator, metadata, field, enumSymbolName) {
|
|
1565
1582
|
let resolved = null;
|
|
@@ -1592,7 +1609,7 @@ function resolveLiteral(decorator, literalCache) {
|
|
|
1592
1609
|
return meta;
|
|
1593
1610
|
}
|
|
1594
1611
|
|
|
1595
|
-
// bazel-out/
|
|
1612
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.mjs
|
|
1596
1613
|
import { compileDeclareFactoryFunction, compileFactoryFunction } from "@angular/compiler";
|
|
1597
1614
|
function compileNgFactoryDefField(metadata) {
|
|
1598
1615
|
const res = compileFactoryFunction(metadata);
|
|
@@ -1603,7 +1620,7 @@ function compileDeclareFactory(metadata) {
|
|
|
1603
1620
|
return { name: "\u0275fac", initializer: res.expression, statements: res.statements, type: res.type };
|
|
1604
1621
|
}
|
|
1605
1622
|
|
|
1606
|
-
// bazel-out/
|
|
1623
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
|
|
1607
1624
|
import { FunctionExpr, LiteralArrayExpr, LiteralExpr as LiteralExpr2, literalMap, ReturnStatement, WrappedNodeExpr as WrappedNodeExpr3 } from "@angular/compiler";
|
|
1608
1625
|
import ts7 from "typescript";
|
|
1609
1626
|
function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
|
|
@@ -1670,12 +1687,11 @@ function decoratorToMetadata(decorator, wrapFunctionsInParens) {
|
|
|
1670
1687
|
throw new Error("Illegal state: synthesized decorator cannot be emitted in class metadata.");
|
|
1671
1688
|
}
|
|
1672
1689
|
const properties = [
|
|
1673
|
-
ts7.factory.createPropertyAssignment("type",
|
|
1690
|
+
ts7.factory.createPropertyAssignment("type", decorator.identifier)
|
|
1674
1691
|
];
|
|
1675
1692
|
if (decorator.args !== null && decorator.args.length > 0) {
|
|
1676
1693
|
const args = decorator.args.map((arg) => {
|
|
1677
|
-
|
|
1678
|
-
return wrapFunctionsInParens ? wrapFunctionExpressionsInParens(expr) : expr;
|
|
1694
|
+
return wrapFunctionsInParens ? wrapFunctionExpressionsInParens(arg) : arg;
|
|
1679
1695
|
});
|
|
1680
1696
|
properties.push(ts7.factory.createPropertyAssignment("args", ts7.factory.createArrayLiteralExpression(args)));
|
|
1681
1697
|
}
|
|
@@ -1691,13 +1707,13 @@ function removeIdentifierReferences(node, name) {
|
|
|
1691
1707
|
return result.transformed[0];
|
|
1692
1708
|
}
|
|
1693
1709
|
|
|
1694
|
-
// bazel-out/
|
|
1710
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
|
|
1695
1711
|
var NoopReferencesRegistry = class {
|
|
1696
1712
|
add(source, ...references) {
|
|
1697
1713
|
}
|
|
1698
1714
|
};
|
|
1699
1715
|
|
|
1700
|
-
// bazel-out/
|
|
1716
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.mjs
|
|
1701
1717
|
import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from "@angular/compiler";
|
|
1702
1718
|
function extractSchemas(rawExpr, evaluator, context) {
|
|
1703
1719
|
const schemas = [];
|
|
@@ -1727,11 +1743,11 @@ function extractSchemas(rawExpr, evaluator, context) {
|
|
|
1727
1743
|
return schemas;
|
|
1728
1744
|
}
|
|
1729
1745
|
|
|
1730
|
-
// bazel-out/
|
|
1746
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
|
|
1731
1747
|
import { compileClassMetadata as compileClassMetadata3, compileComponentFromMetadata, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareComponentFromMetadata, CssSelector as CssSelector2, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, R3TargetBinder, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher2, ViewEncapsulation, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
|
|
1732
1748
|
import ts24 from "typescript";
|
|
1733
1749
|
|
|
1734
|
-
// bazel-out/
|
|
1750
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
|
|
1735
1751
|
import ts8 from "typescript";
|
|
1736
1752
|
var SemanticSymbol = class {
|
|
1737
1753
|
constructor(decl) {
|
|
@@ -1747,7 +1763,7 @@ function getSymbolIdentifier(decl) {
|
|
|
1747
1763
|
return decl.name.text;
|
|
1748
1764
|
}
|
|
1749
1765
|
|
|
1750
|
-
// bazel-out/
|
|
1766
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph.mjs
|
|
1751
1767
|
import { ExternalExpr as ExternalExpr2 } from "@angular/compiler";
|
|
1752
1768
|
var OpaqueSymbol = class extends SemanticSymbol {
|
|
1753
1769
|
isPublicApiAffected() {
|
|
@@ -1890,10 +1906,10 @@ function getImportPath(expr) {
|
|
|
1890
1906
|
}
|
|
1891
1907
|
}
|
|
1892
1908
|
|
|
1893
|
-
// bazel-out/
|
|
1909
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
|
|
1894
1910
|
import ts9 from "typescript";
|
|
1895
1911
|
|
|
1896
|
-
// bazel-out/
|
|
1912
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
|
|
1897
1913
|
function isSymbolEqual(a, b) {
|
|
1898
1914
|
if (a.decl === b.decl) {
|
|
1899
1915
|
return true;
|
|
@@ -1943,7 +1959,7 @@ function isSetEqual(a, b, equalityTester = referenceEquality) {
|
|
|
1943
1959
|
return true;
|
|
1944
1960
|
}
|
|
1945
1961
|
|
|
1946
|
-
// bazel-out/
|
|
1962
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
|
|
1947
1963
|
function extractSemanticTypeParameters(node) {
|
|
1948
1964
|
if (!ts9.isClassDeclaration(node) || node.typeParameters === void 0) {
|
|
1949
1965
|
return null;
|
|
@@ -1963,18 +1979,23 @@ function isTypeParameterEqual(a, b) {
|
|
|
1963
1979
|
return a.hasGenericTypeBound === b.hasGenericTypeBound;
|
|
1964
1980
|
}
|
|
1965
1981
|
|
|
1966
|
-
// bazel-out/
|
|
1982
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
|
|
1967
1983
|
var MetaKind;
|
|
1968
1984
|
(function(MetaKind2) {
|
|
1969
1985
|
MetaKind2[MetaKind2["Directive"] = 0] = "Directive";
|
|
1970
1986
|
MetaKind2[MetaKind2["Pipe"] = 1] = "Pipe";
|
|
1971
1987
|
MetaKind2[MetaKind2["NgModule"] = 2] = "NgModule";
|
|
1972
1988
|
})(MetaKind || (MetaKind = {}));
|
|
1989
|
+
var MatchSource;
|
|
1990
|
+
(function(MatchSource2) {
|
|
1991
|
+
MatchSource2[MatchSource2["Selector"] = 0] = "Selector";
|
|
1992
|
+
MatchSource2[MatchSource2["HostDirective"] = 1] = "HostDirective";
|
|
1993
|
+
})(MatchSource || (MatchSource = {}));
|
|
1973
1994
|
|
|
1974
|
-
// bazel-out/
|
|
1995
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
|
|
1975
1996
|
import ts11 from "typescript";
|
|
1976
1997
|
|
|
1977
|
-
// bazel-out/
|
|
1998
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
|
|
1978
1999
|
var ClassPropertyMapping = class {
|
|
1979
2000
|
constructor(forwardMap) {
|
|
1980
2001
|
this.forwardMap = forwardMap;
|
|
@@ -2050,7 +2071,7 @@ function reverseMapFromForwardMap(forwardMap) {
|
|
|
2050
2071
|
return reverseMap;
|
|
2051
2072
|
}
|
|
2052
2073
|
|
|
2053
|
-
// bazel-out/
|
|
2074
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/util.mjs
|
|
2054
2075
|
import ts10 from "typescript";
|
|
2055
2076
|
function extractReferencesFromType(checker, def, bestGuessOwningModule) {
|
|
2056
2077
|
if (!ts10.isTupleTypeNode(def)) {
|
|
@@ -2060,18 +2081,20 @@ function extractReferencesFromType(checker, def, bestGuessOwningModule) {
|
|
|
2060
2081
|
if (!ts10.isTypeQueryNode(element)) {
|
|
2061
2082
|
throw new Error(`Expected TypeQueryNode: ${nodeDebugInfo(element)}`);
|
|
2062
2083
|
}
|
|
2063
|
-
|
|
2064
|
-
const { node, from } = reflectTypeEntityToDeclaration(type, checker);
|
|
2065
|
-
if (!isNamedClassDeclaration(node)) {
|
|
2066
|
-
throw new Error(`Expected named ClassDeclaration: ${nodeDebugInfo(node)}`);
|
|
2067
|
-
}
|
|
2068
|
-
if (from !== null && !from.startsWith(".")) {
|
|
2069
|
-
return new Reference(node, { specifier: from, resolutionContext: def.getSourceFile().fileName });
|
|
2070
|
-
} else {
|
|
2071
|
-
return new Reference(node, bestGuessOwningModule);
|
|
2072
|
-
}
|
|
2084
|
+
return extraReferenceFromTypeQuery(checker, element, def, bestGuessOwningModule);
|
|
2073
2085
|
});
|
|
2074
2086
|
}
|
|
2087
|
+
function extraReferenceFromTypeQuery(checker, typeNode, origin, bestGuessOwningModule) {
|
|
2088
|
+
const type = typeNode.exprName;
|
|
2089
|
+
const { node, from } = reflectTypeEntityToDeclaration(type, checker);
|
|
2090
|
+
if (!isNamedClassDeclaration(node)) {
|
|
2091
|
+
throw new Error(`Expected named ClassDeclaration: ${nodeDebugInfo(node)}`);
|
|
2092
|
+
}
|
|
2093
|
+
if (from !== null && !from.startsWith(".")) {
|
|
2094
|
+
return new Reference(node, { specifier: from, resolutionContext: origin.getSourceFile().fileName });
|
|
2095
|
+
}
|
|
2096
|
+
return new Reference(node, bestGuessOwningModule);
|
|
2097
|
+
}
|
|
2075
2098
|
function readBooleanType(type) {
|
|
2076
2099
|
if (!ts10.isLiteralTypeNode(type)) {
|
|
2077
2100
|
return null;
|
|
@@ -2091,16 +2114,16 @@ function readStringType(type) {
|
|
|
2091
2114
|
}
|
|
2092
2115
|
return type.literal.text;
|
|
2093
2116
|
}
|
|
2094
|
-
function
|
|
2117
|
+
function readMapType(type, valueTransform) {
|
|
2095
2118
|
if (!ts10.isTypeLiteralNode(type)) {
|
|
2096
2119
|
return {};
|
|
2097
2120
|
}
|
|
2098
2121
|
const obj = {};
|
|
2099
2122
|
type.members.forEach((member) => {
|
|
2100
|
-
if (!ts10.isPropertySignature(member) || member.type === void 0 || member.name === void 0 || !ts10.isStringLiteral(member.name)) {
|
|
2123
|
+
if (!ts10.isPropertySignature(member) || member.type === void 0 || member.name === void 0 || !ts10.isStringLiteral(member.name) && !ts10.isIdentifier(member.name)) {
|
|
2101
2124
|
return;
|
|
2102
2125
|
}
|
|
2103
|
-
const value =
|
|
2126
|
+
const value = valueTransform(member.type);
|
|
2104
2127
|
if (value === null) {
|
|
2105
2128
|
return null;
|
|
2106
2129
|
}
|
|
@@ -2230,7 +2253,7 @@ function hasInjectableFields(clazz, host) {
|
|
|
2230
2253
|
return members.some(({ isStatic, name }) => isStatic && (name === "\u0275prov" || name === "\u0275fac"));
|
|
2231
2254
|
}
|
|
2232
2255
|
|
|
2233
|
-
// bazel-out/
|
|
2256
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
|
|
2234
2257
|
var DtsMetadataReader = class {
|
|
2235
2258
|
constructor(checker, reflector) {
|
|
2236
2259
|
this.checker = checker;
|
|
@@ -2273,10 +2296,12 @@ var DtsMetadataReader = class {
|
|
|
2273
2296
|
return param.typeValueReference.kind === 1 && param.typeValueReference.moduleName === "@angular/core" && param.typeValueReference.importedName === "TemplateRef";
|
|
2274
2297
|
});
|
|
2275
2298
|
const isStandalone = def.type.typeArguments.length > 7 && ((_a = readBooleanType(def.type.typeArguments[7])) != null ? _a : false);
|
|
2276
|
-
const inputs = ClassPropertyMapping.fromMappedObject(
|
|
2277
|
-
const outputs = ClassPropertyMapping.fromMappedObject(
|
|
2299
|
+
const inputs = ClassPropertyMapping.fromMappedObject(readMapType(def.type.typeArguments[3], readStringType));
|
|
2300
|
+
const outputs = ClassPropertyMapping.fromMappedObject(readMapType(def.type.typeArguments[4], readStringType));
|
|
2301
|
+
const hostDirectives = def.type.typeArguments.length > 8 ? readHostDirectivesType(this.checker, def.type.typeArguments[8], ref.bestGuessOwningModule) : null;
|
|
2278
2302
|
return {
|
|
2279
2303
|
kind: MetaKind.Directive,
|
|
2304
|
+
matchSource: MatchSource.Selector,
|
|
2280
2305
|
ref,
|
|
2281
2306
|
name: clazz.name.text,
|
|
2282
2307
|
isComponent,
|
|
@@ -2284,6 +2309,7 @@ var DtsMetadataReader = class {
|
|
|
2284
2309
|
exportAs: readStringArrayType(def.type.typeArguments[2]),
|
|
2285
2310
|
inputs,
|
|
2286
2311
|
outputs,
|
|
2312
|
+
hostDirectives,
|
|
2287
2313
|
queries: readStringArrayType(def.type.typeArguments[5]),
|
|
2288
2314
|
...extractDirectiveTypeCheckMeta(clazz, inputs, this.reflector),
|
|
2289
2315
|
baseClass: readBaseClass2(clazz, this.checker, this.reflector),
|
|
@@ -2344,8 +2370,29 @@ function readBaseClass2(clazz, checker, reflector) {
|
|
|
2344
2370
|
}
|
|
2345
2371
|
return null;
|
|
2346
2372
|
}
|
|
2373
|
+
function readHostDirectivesType(checker, type, bestGuessOwningModule) {
|
|
2374
|
+
if (!ts11.isTupleTypeNode(type) || type.elements.length === 0) {
|
|
2375
|
+
return null;
|
|
2376
|
+
}
|
|
2377
|
+
const result = [];
|
|
2378
|
+
for (const hostDirectiveType of type.elements) {
|
|
2379
|
+
const { directive, inputs, outputs } = readMapType(hostDirectiveType, (type2) => type2);
|
|
2380
|
+
if (directive) {
|
|
2381
|
+
if (!ts11.isTypeQueryNode(directive)) {
|
|
2382
|
+
throw new Error(`Expected TypeQueryNode: ${nodeDebugInfo(directive)}`);
|
|
2383
|
+
}
|
|
2384
|
+
result.push({
|
|
2385
|
+
directive: extraReferenceFromTypeQuery(checker, directive, type, bestGuessOwningModule),
|
|
2386
|
+
isForwardReference: false,
|
|
2387
|
+
inputs: readMapType(inputs, readStringType),
|
|
2388
|
+
outputs: readMapType(outputs, readStringType)
|
|
2389
|
+
});
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
return result.length > 0 ? result : null;
|
|
2393
|
+
}
|
|
2347
2394
|
|
|
2348
|
-
// bazel-out/
|
|
2395
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
|
|
2349
2396
|
function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
2350
2397
|
const topMeta = reader.getDirectiveMetadata(dir);
|
|
2351
2398
|
if (topMeta === null) {
|
|
@@ -2403,7 +2450,7 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
|
2403
2450
|
};
|
|
2404
2451
|
}
|
|
2405
2452
|
|
|
2406
|
-
// bazel-out/
|
|
2453
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
|
|
2407
2454
|
var LocalMetadataRegistry = class {
|
|
2408
2455
|
constructor() {
|
|
2409
2456
|
this.directives = /* @__PURE__ */ new Map();
|
|
@@ -2462,7 +2509,7 @@ var InjectableClassRegistry = class {
|
|
|
2462
2509
|
}
|
|
2463
2510
|
};
|
|
2464
2511
|
|
|
2465
|
-
// bazel-out/
|
|
2512
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
|
|
2466
2513
|
var ResourceRegistry = class {
|
|
2467
2514
|
constructor() {
|
|
2468
2515
|
this.externalTemplateToComponentsMap = /* @__PURE__ */ new Map();
|
|
@@ -2527,14 +2574,65 @@ var ResourceRegistry = class {
|
|
|
2527
2574
|
}
|
|
2528
2575
|
};
|
|
2529
2576
|
|
|
2530
|
-
// bazel-out/
|
|
2577
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/host_directives_resolver.mjs
|
|
2578
|
+
var EMPTY_ARRAY = [];
|
|
2579
|
+
var HostDirectivesResolver = class {
|
|
2580
|
+
constructor(metaReader) {
|
|
2581
|
+
this.metaReader = metaReader;
|
|
2582
|
+
this.cache = /* @__PURE__ */ new Map();
|
|
2583
|
+
}
|
|
2584
|
+
resolve(metadata) {
|
|
2585
|
+
if (this.cache.has(metadata.ref.node)) {
|
|
2586
|
+
return this.cache.get(metadata.ref.node);
|
|
2587
|
+
}
|
|
2588
|
+
const results = metadata.hostDirectives && metadata.hostDirectives.length > 0 ? this.walkHostDirectives(metadata.hostDirectives, []) : EMPTY_ARRAY;
|
|
2589
|
+
this.cache.set(metadata.ref.node, results);
|
|
2590
|
+
return results;
|
|
2591
|
+
}
|
|
2592
|
+
walkHostDirectives(directives, results) {
|
|
2593
|
+
for (const current of directives) {
|
|
2594
|
+
const hostMeta = flattenInheritedDirectiveMetadata(this.metaReader, current.directive);
|
|
2595
|
+
if (hostMeta === null) {
|
|
2596
|
+
throw new Error(`Could not resolve host directive metadata of ${current.directive.debugName}`);
|
|
2597
|
+
}
|
|
2598
|
+
if (hostMeta.hostDirectives) {
|
|
2599
|
+
this.walkHostDirectives(hostMeta.hostDirectives, results);
|
|
2600
|
+
}
|
|
2601
|
+
results.push({
|
|
2602
|
+
...hostMeta,
|
|
2603
|
+
matchSource: MatchSource.HostDirective,
|
|
2604
|
+
inputs: this.filterMappings(hostMeta.inputs, current.inputs),
|
|
2605
|
+
outputs: this.filterMappings(hostMeta.outputs, current.outputs)
|
|
2606
|
+
});
|
|
2607
|
+
}
|
|
2608
|
+
return results;
|
|
2609
|
+
}
|
|
2610
|
+
filterMappings(source, allowedProperties) {
|
|
2611
|
+
const result = {};
|
|
2612
|
+
if (allowedProperties !== null) {
|
|
2613
|
+
for (const publicName in allowedProperties) {
|
|
2614
|
+
if (allowedProperties.hasOwnProperty(publicName)) {
|
|
2615
|
+
const bindings = source.getByBindingPropertyName(publicName);
|
|
2616
|
+
if (bindings !== null) {
|
|
2617
|
+
for (const binding of bindings) {
|
|
2618
|
+
result[binding.classPropertyName] = allowedProperties[publicName];
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
}
|
|
2623
|
+
}
|
|
2624
|
+
return ClassPropertyMapping.fromMappedObject(result);
|
|
2625
|
+
}
|
|
2626
|
+
};
|
|
2627
|
+
|
|
2628
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/api.mjs
|
|
2531
2629
|
var ComponentScopeKind;
|
|
2532
2630
|
(function(ComponentScopeKind2) {
|
|
2533
2631
|
ComponentScopeKind2[ComponentScopeKind2["NgModule"] = 0] = "NgModule";
|
|
2534
2632
|
ComponentScopeKind2[ComponentScopeKind2["Standalone"] = 1] = "Standalone";
|
|
2535
2633
|
})(ComponentScopeKind || (ComponentScopeKind = {}));
|
|
2536
2634
|
|
|
2537
|
-
// bazel-out/
|
|
2635
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/component_scope.mjs
|
|
2538
2636
|
var CompoundComponentScopeReader = class {
|
|
2539
2637
|
constructor(readers) {
|
|
2540
2638
|
this.readers = readers;
|
|
@@ -2559,7 +2657,7 @@ var CompoundComponentScopeReader = class {
|
|
|
2559
2657
|
}
|
|
2560
2658
|
};
|
|
2561
2659
|
|
|
2562
|
-
// bazel-out/
|
|
2660
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
|
|
2563
2661
|
var MetadataDtsModuleScopeResolver = class {
|
|
2564
2662
|
constructor(dtsMetaReader, aliasingHost) {
|
|
2565
2663
|
this.dtsMetaReader = dtsMetaReader;
|
|
@@ -2635,11 +2733,11 @@ var MetadataDtsModuleScopeResolver = class {
|
|
|
2635
2733
|
}
|
|
2636
2734
|
};
|
|
2637
2735
|
|
|
2638
|
-
// bazel-out/
|
|
2736
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
|
|
2639
2737
|
import { ExternalExpr as ExternalExpr3 } from "@angular/compiler";
|
|
2640
2738
|
import ts12 from "typescript";
|
|
2641
2739
|
|
|
2642
|
-
// bazel-out/
|
|
2740
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/util.mjs
|
|
2643
2741
|
function getDiagnosticNode(ref, rawExpr) {
|
|
2644
2742
|
return rawExpr !== null ? ref.getOriginForDiagnostics(rawExpr) : ref.node.name;
|
|
2645
2743
|
}
|
|
@@ -2662,7 +2760,7 @@ function makeUnknownComponentImportDiagnostic(ref, rawExpr) {
|
|
|
2662
2760
|
return makeDiagnostic(ErrorCode.COMPONENT_UNKNOWN_IMPORT, getDiagnosticNode(ref, rawExpr), `Component imports must be standalone components, directives, pipes, or must be NgModules.`);
|
|
2663
2761
|
}
|
|
2664
2762
|
|
|
2665
|
-
// bazel-out/
|
|
2763
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
|
|
2666
2764
|
var LocalModuleScopeRegistry = class {
|
|
2667
2765
|
constructor(localReader, fullReader, dependencyScopeReader, refEmitter, aliasingHost) {
|
|
2668
2766
|
this.localReader = localReader;
|
|
@@ -3001,13 +3099,14 @@ function reexportCollision(module, refA, refB) {
|
|
|
3001
3099
|
]);
|
|
3002
3100
|
}
|
|
3003
3101
|
|
|
3004
|
-
// bazel-out/
|
|
3102
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
|
|
3005
3103
|
import { CssSelector, SelectorMatcher } from "@angular/compiler";
|
|
3006
3104
|
import ts13 from "typescript";
|
|
3007
3105
|
var TypeCheckScopeRegistry = class {
|
|
3008
|
-
constructor(scopeReader, metaReader) {
|
|
3106
|
+
constructor(scopeReader, metaReader, hostDirectivesResolver) {
|
|
3009
3107
|
this.scopeReader = scopeReader;
|
|
3010
3108
|
this.metaReader = metaReader;
|
|
3109
|
+
this.hostDirectivesResolver = hostDirectivesResolver;
|
|
3011
3110
|
this.flattenedDirectiveMetaCache = /* @__PURE__ */ new Map();
|
|
3012
3111
|
this.scopeCache = /* @__PURE__ */ new Map();
|
|
3013
3112
|
}
|
|
@@ -3033,7 +3132,7 @@ var TypeCheckScopeRegistry = class {
|
|
|
3033
3132
|
for (const meta of dependencies) {
|
|
3034
3133
|
if (meta.kind === MetaKind.Directive && meta.selector !== null) {
|
|
3035
3134
|
const extMeta = this.getTypeCheckDirectiveMetadata(meta.ref);
|
|
3036
|
-
matcher.addSelectables(CssSelector.parse(meta.selector), extMeta);
|
|
3135
|
+
matcher.addSelectables(CssSelector.parse(meta.selector), [...this.hostDirectivesResolver.resolve(extMeta), extMeta]);
|
|
3037
3136
|
directives.push(extMeta);
|
|
3038
3137
|
} else if (meta.kind === MetaKind.Pipe) {
|
|
3039
3138
|
if (!ts13.isClassDeclaration(meta.ref.node)) {
|
|
@@ -3063,7 +3162,7 @@ var TypeCheckScopeRegistry = class {
|
|
|
3063
3162
|
}
|
|
3064
3163
|
};
|
|
3065
3164
|
|
|
3066
|
-
// bazel-out/
|
|
3165
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/api.mjs
|
|
3067
3166
|
var CompilationMode;
|
|
3068
3167
|
(function(CompilationMode2) {
|
|
3069
3168
|
CompilationMode2[CompilationMode2["FULL"] = 0] = "FULL";
|
|
@@ -3081,7 +3180,7 @@ var HandlerFlags;
|
|
|
3081
3180
|
HandlerFlags2[HandlerFlags2["FULL_INHERITANCE"] = 1] = "FULL_INHERITANCE";
|
|
3082
3181
|
})(HandlerFlags || (HandlerFlags = {}));
|
|
3083
3182
|
|
|
3084
|
-
// bazel-out/
|
|
3183
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/alias.mjs
|
|
3085
3184
|
import ts14 from "typescript";
|
|
3086
3185
|
function aliasTransformFactory(exportStatements) {
|
|
3087
3186
|
return (context) => {
|
|
@@ -3099,10 +3198,10 @@ function aliasTransformFactory(exportStatements) {
|
|
|
3099
3198
|
};
|
|
3100
3199
|
}
|
|
3101
3200
|
|
|
3102
|
-
// bazel-out/
|
|
3201
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
|
|
3103
3202
|
import ts15 from "typescript";
|
|
3104
3203
|
|
|
3105
|
-
// bazel-out/
|
|
3204
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
|
|
3106
3205
|
var TraitState;
|
|
3107
3206
|
(function(TraitState2) {
|
|
3108
3207
|
TraitState2[TraitState2["Pending"] = 0] = "Pending";
|
|
@@ -3157,7 +3256,7 @@ var TraitImpl = class {
|
|
|
3157
3256
|
}
|
|
3158
3257
|
};
|
|
3159
3258
|
|
|
3160
|
-
// bazel-out/
|
|
3259
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
|
|
3161
3260
|
var TraitCompiler = class {
|
|
3162
3261
|
constructor(handlers, reflector, perf, incrementalBuild, compileNonExportedClasses, compilationMode, dtsTransforms, semanticDepGraphUpdater, sourceFileTypeIdentifier) {
|
|
3163
3262
|
this.handlers = handlers;
|
|
@@ -3601,10 +3700,10 @@ function containsErrors(diagnostics) {
|
|
|
3601
3700
|
return diagnostics !== null && diagnostics.some((diag) => diag.category === ts15.DiagnosticCategory.Error);
|
|
3602
3701
|
}
|
|
3603
3702
|
|
|
3604
|
-
// bazel-out/
|
|
3703
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
|
|
3605
3704
|
import ts17 from "typescript";
|
|
3606
3705
|
|
|
3607
|
-
// bazel-out/
|
|
3706
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
|
|
3608
3707
|
import ts16 from "typescript";
|
|
3609
3708
|
function addImports(importManager, sf, extraStatements = []) {
|
|
3610
3709
|
const addedImports = importManager.getAllImports(sf.fileName).map((i) => {
|
|
@@ -3632,7 +3731,7 @@ function isImportStatement(stmt) {
|
|
|
3632
3731
|
return ts16.isImportDeclaration(stmt) || ts16.isImportEqualsDeclaration(stmt) || ts16.isNamespaceImport(stmt);
|
|
3633
3732
|
}
|
|
3634
3733
|
|
|
3635
|
-
// bazel-out/
|
|
3734
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
|
|
3636
3735
|
var DtsTransformRegistry = class {
|
|
3637
3736
|
constructor() {
|
|
3638
3737
|
this.ivyDeclarationTransforms = /* @__PURE__ */ new Map();
|
|
@@ -3757,11 +3856,11 @@ function markForEmitAsSingleLine(node) {
|
|
|
3757
3856
|
ts17.forEachChild(node, markForEmitAsSingleLine);
|
|
3758
3857
|
}
|
|
3759
3858
|
|
|
3760
|
-
// bazel-out/
|
|
3859
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
|
|
3761
3860
|
import { ConstantPool } from "@angular/compiler";
|
|
3762
3861
|
import ts19 from "typescript";
|
|
3763
3862
|
|
|
3764
|
-
// bazel-out/
|
|
3863
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
|
|
3765
3864
|
import ts18 from "typescript";
|
|
3766
3865
|
function visit(node, visitor, context) {
|
|
3767
3866
|
return visitor._visit(node, context);
|
|
@@ -3792,7 +3891,7 @@ var Visitor = class {
|
|
|
3792
3891
|
} else {
|
|
3793
3892
|
visitedNode = this.visitOtherNode(node);
|
|
3794
3893
|
}
|
|
3795
|
-
if (
|
|
3894
|
+
if (ts18.isBlock(visitedNode) || ts18.isSourceFile(visitedNode)) {
|
|
3796
3895
|
visitedNode = this._maybeProcessStatements(visitedNode);
|
|
3797
3896
|
}
|
|
3798
3897
|
return visitedNode;
|
|
@@ -3801,9 +3900,8 @@ var Visitor = class {
|
|
|
3801
3900
|
if (node.statements.every((stmt) => !this._before.has(stmt) && !this._after.has(stmt))) {
|
|
3802
3901
|
return node;
|
|
3803
3902
|
}
|
|
3804
|
-
const clone = ts18.getMutableClone(node);
|
|
3805
3903
|
const newStatements = [];
|
|
3806
|
-
|
|
3904
|
+
node.statements.forEach((stmt) => {
|
|
3807
3905
|
if (this._before.has(stmt)) {
|
|
3808
3906
|
newStatements.push(...this._before.get(stmt));
|
|
3809
3907
|
this._before.delete(stmt);
|
|
@@ -3814,16 +3912,16 @@ var Visitor = class {
|
|
|
3814
3912
|
this._after.delete(stmt);
|
|
3815
3913
|
}
|
|
3816
3914
|
});
|
|
3817
|
-
|
|
3818
|
-
|
|
3915
|
+
const statementsArray = ts18.factory.createNodeArray(newStatements, node.statements.hasTrailingComma);
|
|
3916
|
+
if (ts18.isBlock(node)) {
|
|
3917
|
+
return ts18.factory.updateBlock(node, statementsArray);
|
|
3918
|
+
} else {
|
|
3919
|
+
return ts18.factory.updateSourceFile(node, statementsArray, node.isDeclarationFile, node.referencedFiles, node.typeReferenceDirectives, node.hasNoDefaultLib, node.libReferenceDirectives);
|
|
3920
|
+
}
|
|
3819
3921
|
}
|
|
3820
3922
|
};
|
|
3821
|
-
function hasStatements(node) {
|
|
3822
|
-
const block = node;
|
|
3823
|
-
return block.statements !== void 0 && Array.isArray(block.statements);
|
|
3824
|
-
}
|
|
3825
3923
|
|
|
3826
|
-
// bazel-out/
|
|
3924
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
|
|
3827
3925
|
var NO_DECORATORS = /* @__PURE__ */ new Set();
|
|
3828
3926
|
var CLOSURE_FILE_OVERVIEW_REGEXP = /\s+@fileoverview\s+/i;
|
|
3829
3927
|
function ivyTransformFactory(compilation, reflector, importRewriter, defaultImportTracker, perf, isCore, isClosureCompilerEnabled) {
|
|
@@ -4011,10 +4109,10 @@ function nodeArrayFromDecoratorsArray(decorators) {
|
|
|
4011
4109
|
return array;
|
|
4012
4110
|
}
|
|
4013
4111
|
|
|
4014
|
-
// bazel-out/
|
|
4112
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
|
|
4015
4113
|
import { compileClassMetadata, compileDeclareClassMetadata, compileDeclareDirectiveFromMetadata, compileDirectiveFromMetadata, FactoryTarget, makeBindingParser, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
|
|
4016
4114
|
|
|
4017
|
-
// bazel-out/
|
|
4115
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
|
|
4018
4116
|
import { createMayBeForwardRefExpression, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr4, getSafePropertyAccessString, parseHostBindings, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr4 } from "@angular/compiler";
|
|
4019
4117
|
import ts20 from "typescript";
|
|
4020
4118
|
var EMPTY_OBJECT = {};
|
|
@@ -4024,7 +4122,7 @@ var QUERY_TYPES = /* @__PURE__ */ new Set([
|
|
|
4024
4122
|
"ViewChild",
|
|
4025
4123
|
"ViewChildren"
|
|
4026
4124
|
]);
|
|
4027
|
-
function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, isCore, flags, annotateForClosureCompiler, defaultSelector = null) {
|
|
4125
|
+
function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmitter, isCore, flags, annotateForClosureCompiler, defaultSelector = null) {
|
|
4028
4126
|
let directive;
|
|
4029
4127
|
if (decorator === null || decorator.args === null || decorator.args.length === 0) {
|
|
4030
4128
|
directive = /* @__PURE__ */ new Map();
|
|
@@ -4095,10 +4193,13 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, isCore
|
|
|
4095
4193
|
isStandalone = resolved;
|
|
4096
4194
|
}
|
|
4097
4195
|
const usesInheritance = reflector.hasBaseClass(clazz);
|
|
4196
|
+
const sourceFile = clazz.getSourceFile();
|
|
4098
4197
|
const type = wrapTypeReference(reflector, clazz);
|
|
4099
4198
|
const internalType = new WrappedNodeExpr4(reflector.getInternalNameOfClass(clazz));
|
|
4100
4199
|
const inputs = ClassPropertyMapping.fromMappedObject({ ...inputsFromMeta, ...inputsFromFields });
|
|
4101
4200
|
const outputs = ClassPropertyMapping.fromMappedObject({ ...outputsFromMeta, ...outputsFromFields });
|
|
4201
|
+
const rawHostDirectives = directive.get("hostDirectives") || null;
|
|
4202
|
+
const hostDirectives = rawHostDirectives === null ? null : extractHostDirectives(rawHostDirectives, evaluator);
|
|
4102
4203
|
const metadata = {
|
|
4103
4204
|
name: clazz.name.text,
|
|
4104
4205
|
deps: ctorDeps,
|
|
@@ -4119,14 +4220,17 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, isCore
|
|
|
4119
4220
|
usesInheritance,
|
|
4120
4221
|
exportAs,
|
|
4121
4222
|
providers,
|
|
4122
|
-
isStandalone
|
|
4223
|
+
isStandalone,
|
|
4224
|
+
hostDirectives: (hostDirectives == null ? void 0 : hostDirectives.map((hostDir) => toHostDirectiveMetadata(hostDir, sourceFile, refEmitter))) || null
|
|
4123
4225
|
};
|
|
4124
4226
|
return {
|
|
4125
4227
|
decorator: directive,
|
|
4126
4228
|
metadata,
|
|
4127
4229
|
inputs,
|
|
4128
4230
|
outputs,
|
|
4129
|
-
isStructural
|
|
4231
|
+
isStructural,
|
|
4232
|
+
hostDirectives,
|
|
4233
|
+
rawHostDirectives
|
|
4130
4234
|
};
|
|
4131
4235
|
}
|
|
4132
4236
|
function extractQueryMetadata(exprNode, name, args, propertyName, reflector, evaluator) {
|
|
@@ -4315,12 +4419,15 @@ function isPropertyTypeMember(member) {
|
|
|
4315
4419
|
}
|
|
4316
4420
|
function parseFieldToPropertyMapping(directive, field, evaluator) {
|
|
4317
4421
|
const metaValues = parseFieldArrayValue(directive, field, evaluator);
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
return
|
|
4322
|
-
|
|
4323
|
-
|
|
4422
|
+
return metaValues ? parseInputOutputMappingArray(metaValues) : EMPTY_OBJECT;
|
|
4423
|
+
}
|
|
4424
|
+
function parseInputOutputMappingArray(values) {
|
|
4425
|
+
return values.reduce((results, value) => {
|
|
4426
|
+
if (typeof value !== "string") {
|
|
4427
|
+
throw new Error("Mapping value must be a string");
|
|
4428
|
+
}
|
|
4429
|
+
const [field, property] = value.split(":", 2).map((str) => str.trim());
|
|
4430
|
+
results[field] = property || field;
|
|
4324
4431
|
return results;
|
|
4325
4432
|
}, {});
|
|
4326
4433
|
}
|
|
@@ -4377,8 +4484,48 @@ function evaluateHostExpressionBindings(hostExpr, evaluator) {
|
|
|
4377
4484
|
}
|
|
4378
4485
|
return bindings;
|
|
4379
4486
|
}
|
|
4487
|
+
function extractHostDirectives(rawHostDirectives, evaluator) {
|
|
4488
|
+
const resolved = evaluator.evaluate(rawHostDirectives, forwardRefResolver);
|
|
4489
|
+
if (!Array.isArray(resolved)) {
|
|
4490
|
+
throw createValueHasWrongTypeError(rawHostDirectives, resolved, "hostDirectives must be an array");
|
|
4491
|
+
}
|
|
4492
|
+
return resolved.map((value) => {
|
|
4493
|
+
const hostReference = value instanceof Map ? value.get("directive") : value;
|
|
4494
|
+
if (!(hostReference instanceof Reference)) {
|
|
4495
|
+
throw createValueHasWrongTypeError(rawHostDirectives, hostReference, "Host directive must be a reference");
|
|
4496
|
+
}
|
|
4497
|
+
if (!isNamedClassDeclaration(hostReference.node)) {
|
|
4498
|
+
throw createValueHasWrongTypeError(rawHostDirectives, hostReference, "Host directive reference must be a class");
|
|
4499
|
+
}
|
|
4500
|
+
const meta = {
|
|
4501
|
+
directive: hostReference,
|
|
4502
|
+
isForwardReference: hostReference.synthetic,
|
|
4503
|
+
inputs: parseHostDirectivesMapping("inputs", value, hostReference.node, rawHostDirectives),
|
|
4504
|
+
outputs: parseHostDirectivesMapping("outputs", value, hostReference.node, rawHostDirectives)
|
|
4505
|
+
};
|
|
4506
|
+
return meta;
|
|
4507
|
+
});
|
|
4508
|
+
}
|
|
4509
|
+
function parseHostDirectivesMapping(field, resolvedValue, classReference, sourceExpression) {
|
|
4510
|
+
if (resolvedValue instanceof Map && resolvedValue.has(field)) {
|
|
4511
|
+
const nameForErrors = `@Directive.hostDirectives.${classReference.name.text}.${field}`;
|
|
4512
|
+
const rawInputs = resolvedValue.get(field);
|
|
4513
|
+
if (isStringArrayOrDie(rawInputs, nameForErrors, sourceExpression)) {
|
|
4514
|
+
return parseInputOutputMappingArray(rawInputs);
|
|
4515
|
+
}
|
|
4516
|
+
}
|
|
4517
|
+
return null;
|
|
4518
|
+
}
|
|
4519
|
+
function toHostDirectiveMetadata(hostDirective, context, refEmitter) {
|
|
4520
|
+
return {
|
|
4521
|
+
directive: toR3Reference(hostDirective.directive.node, hostDirective.directive, hostDirective.directive, context, context, refEmitter),
|
|
4522
|
+
isForwardReference: hostDirective.isForwardReference,
|
|
4523
|
+
inputs: hostDirective.inputs || null,
|
|
4524
|
+
outputs: hostDirective.outputs || null
|
|
4525
|
+
};
|
|
4526
|
+
}
|
|
4380
4527
|
|
|
4381
|
-
// bazel-out/
|
|
4528
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.mjs
|
|
4382
4529
|
var DirectiveSymbol = class extends SemanticSymbol {
|
|
4383
4530
|
constructor(decl, selector, inputs, outputs, exportAs, typeCheckMeta, typeParameters) {
|
|
4384
4531
|
super(decl);
|
|
@@ -4455,7 +4602,7 @@ function isBaseClassEqual(current, previous) {
|
|
|
4455
4602
|
return isSymbolEqual(current, previous);
|
|
4456
4603
|
}
|
|
4457
4604
|
|
|
4458
|
-
// bazel-out/
|
|
4605
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
|
|
4459
4606
|
var FIELD_DECORATORS = [
|
|
4460
4607
|
"Input",
|
|
4461
4608
|
"Output",
|
|
@@ -4477,13 +4624,14 @@ var LIFECYCLE_HOOKS = /* @__PURE__ */ new Set([
|
|
|
4477
4624
|
"ngAfterContentChecked"
|
|
4478
4625
|
]);
|
|
4479
4626
|
var DirectiveDecoratorHandler = class {
|
|
4480
|
-
constructor(reflector, evaluator, metaRegistry, scopeRegistry, metaReader, injectableRegistry, isCore, semanticDepGraphUpdater, annotateForClosureCompiler, compileUndecoratedClassesWithAngularFeatures, perf) {
|
|
4627
|
+
constructor(reflector, evaluator, metaRegistry, scopeRegistry, metaReader, injectableRegistry, refEmitter, isCore, semanticDepGraphUpdater, annotateForClosureCompiler, compileUndecoratedClassesWithAngularFeatures, perf) {
|
|
4481
4628
|
this.reflector = reflector;
|
|
4482
4629
|
this.evaluator = evaluator;
|
|
4483
4630
|
this.metaRegistry = metaRegistry;
|
|
4484
4631
|
this.scopeRegistry = scopeRegistry;
|
|
4485
4632
|
this.metaReader = metaReader;
|
|
4486
4633
|
this.injectableRegistry = injectableRegistry;
|
|
4634
|
+
this.refEmitter = refEmitter;
|
|
4487
4635
|
this.isCore = isCore;
|
|
4488
4636
|
this.semanticDepGraphUpdater = semanticDepGraphUpdater;
|
|
4489
4637
|
this.annotateForClosureCompiler = annotateForClosureCompiler;
|
|
@@ -4510,7 +4658,7 @@ var DirectiveDecoratorHandler = class {
|
|
|
4510
4658
|
return { diagnostics: [getUndecoratedClassWithAngularFeaturesDiagnostic(node)] };
|
|
4511
4659
|
}
|
|
4512
4660
|
this.perf.eventCount(PerfEvent.AnalyzeDirective);
|
|
4513
|
-
const directiveResult = extractDirectiveMetadata(node, decorator, this.reflector, this.evaluator, this.isCore, flags, this.annotateForClosureCompiler);
|
|
4661
|
+
const directiveResult = extractDirectiveMetadata(node, decorator, this.reflector, this.evaluator, this.refEmitter, this.isCore, flags, this.annotateForClosureCompiler);
|
|
4514
4662
|
if (directiveResult === void 0) {
|
|
4515
4663
|
return {};
|
|
4516
4664
|
}
|
|
@@ -4524,6 +4672,8 @@ var DirectiveDecoratorHandler = class {
|
|
|
4524
4672
|
inputs: directiveResult.inputs,
|
|
4525
4673
|
outputs: directiveResult.outputs,
|
|
4526
4674
|
meta: analysis,
|
|
4675
|
+
hostDirectives: directiveResult.hostDirectives,
|
|
4676
|
+
rawHostDirectives: directiveResult.rawHostDirectives,
|
|
4527
4677
|
classMetadata: extractClassMetadata(node, this.reflector, this.isCore, this.annotateForClosureCompiler),
|
|
4528
4678
|
baseClass: readBaseClass(node, this.reflector, this.evaluator),
|
|
4529
4679
|
typeCheckMeta: extractDirectiveTypeCheckMeta(node, directiveResult.inputs, this.reflector),
|
|
@@ -4542,6 +4692,7 @@ var DirectiveDecoratorHandler = class {
|
|
|
4542
4692
|
const ref = new Reference(node);
|
|
4543
4693
|
this.metaRegistry.registerDirectiveMetadata({
|
|
4544
4694
|
kind: MetaKind.Directive,
|
|
4695
|
+
matchSource: MatchSource.Selector,
|
|
4545
4696
|
ref,
|
|
4546
4697
|
name: node.name.text,
|
|
4547
4698
|
selector: analysis.meta.selector,
|
|
@@ -4551,6 +4702,7 @@ var DirectiveDecoratorHandler = class {
|
|
|
4551
4702
|
queries: analysis.meta.queries.map((query) => query.propertyName),
|
|
4552
4703
|
isComponent: false,
|
|
4553
4704
|
baseClass: analysis.baseClass,
|
|
4705
|
+
hostDirectives: analysis.hostDirectives,
|
|
4554
4706
|
...analysis.typeCheckMeta,
|
|
4555
4707
|
isPoisoned: analysis.isPoisoned,
|
|
4556
4708
|
isStructural: analysis.isStructural,
|
|
@@ -4575,6 +4727,10 @@ var DirectiveDecoratorHandler = class {
|
|
|
4575
4727
|
if (directiveDiagnostics !== null) {
|
|
4576
4728
|
diagnostics.push(...directiveDiagnostics);
|
|
4577
4729
|
}
|
|
4730
|
+
const hostDirectivesDiagnotics = analysis.hostDirectives && analysis.rawHostDirectives ? validateHostDirectives(analysis.rawHostDirectives, analysis.hostDirectives, this.metaReader) : null;
|
|
4731
|
+
if (hostDirectivesDiagnotics !== null) {
|
|
4732
|
+
diagnostics.push(...hostDirectivesDiagnotics);
|
|
4733
|
+
}
|
|
4578
4734
|
return { diagnostics: diagnostics.length > 0 ? diagnostics : void 0 };
|
|
4579
4735
|
}
|
|
4580
4736
|
compileFull(node, analysis, resolution, pool) {
|
|
@@ -4602,11 +4758,11 @@ var DirectiveDecoratorHandler = class {
|
|
|
4602
4758
|
}
|
|
4603
4759
|
};
|
|
4604
4760
|
|
|
4605
|
-
// bazel-out/
|
|
4761
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
|
|
4606
4762
|
import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget2, FunctionExpr as FunctionExpr2, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, R3Identifiers, R3SelectorScopeMode, ReturnStatement as ReturnStatement2, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
|
|
4607
4763
|
import ts22 from "typescript";
|
|
4608
4764
|
|
|
4609
|
-
// bazel-out/
|
|
4765
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
|
|
4610
4766
|
import ts21 from "typescript";
|
|
4611
4767
|
function createModuleWithProvidersResolver(reflector, isCore) {
|
|
4612
4768
|
function _reflectModuleFromTypeParam(type, node) {
|
|
@@ -4673,7 +4829,7 @@ function isResolvedModuleWithProviders(sv) {
|
|
|
4673
4829
|
return typeof sv.value === "object" && sv.value != null && sv.value.hasOwnProperty("ngModule") && sv.value.hasOwnProperty("mwpCall");
|
|
4674
4830
|
}
|
|
4675
4831
|
|
|
4676
|
-
// bazel-out/
|
|
4832
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
|
|
4677
4833
|
var NgModuleSymbol = class extends SemanticSymbol {
|
|
4678
4834
|
constructor() {
|
|
4679
4835
|
super(...arguments);
|
|
@@ -5175,7 +5331,7 @@ function isSyntheticReference(ref) {
|
|
|
5175
5331
|
return ref.synthetic;
|
|
5176
5332
|
}
|
|
5177
5333
|
|
|
5178
|
-
// bazel-out/
|
|
5334
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
|
|
5179
5335
|
function makeCyclicImportInfo(ref, type, cycle) {
|
|
5180
5336
|
const name = ref.debugName || "(unknown)";
|
|
5181
5337
|
const path = cycle.getPath().map((sf) => sf.fileName).join(" -> ");
|
|
@@ -5198,7 +5354,7 @@ function checkCustomElementSelectorForErrors(selector) {
|
|
|
5198
5354
|
return null;
|
|
5199
5355
|
}
|
|
5200
5356
|
|
|
5201
|
-
// bazel-out/
|
|
5357
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
|
|
5202
5358
|
import { DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, ParseSourceFile as ParseSourceFile2, parseTemplate } from "@angular/compiler";
|
|
5203
5359
|
import ts23 from "typescript";
|
|
5204
5360
|
function getTemplateDeclarationNodeForError(declaration) {
|
|
@@ -5504,7 +5660,7 @@ function _extractTemplateStyleUrls(template) {
|
|
|
5504
5660
|
return template.styleUrls.map((url) => ({ url, source: 1, nodeForError }));
|
|
5505
5661
|
}
|
|
5506
5662
|
|
|
5507
|
-
// bazel-out/
|
|
5663
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.mjs
|
|
5508
5664
|
var ComponentSymbol = class extends DirectiveSymbol {
|
|
5509
5665
|
constructor() {
|
|
5510
5666
|
super(...arguments);
|
|
@@ -5539,7 +5695,7 @@ var ComponentSymbol = class extends DirectiveSymbol {
|
|
|
5539
5695
|
}
|
|
5540
5696
|
};
|
|
5541
5697
|
|
|
5542
|
-
// bazel-out/
|
|
5698
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/util.mjs
|
|
5543
5699
|
function collectAnimationNames(value, animationTriggerNames) {
|
|
5544
5700
|
if (value instanceof Map) {
|
|
5545
5701
|
const name = value.get("name");
|
|
@@ -5615,10 +5771,10 @@ function isLikelyModuleWithProviders(value) {
|
|
|
5615
5771
|
return false;
|
|
5616
5772
|
}
|
|
5617
5773
|
|
|
5618
|
-
// bazel-out/
|
|
5619
|
-
var
|
|
5774
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
|
|
5775
|
+
var EMPTY_ARRAY2 = [];
|
|
5620
5776
|
var ComponentDecoratorHandler = class {
|
|
5621
|
-
constructor(reflector, evaluator, metaRegistry, metaReader, scopeReader, dtsScopeReader, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, resourceLoader, rootDirs, defaultPreserveWhitespaces, i18nUseExternalIds, enableI18nLegacyMessageIdFormat, usePoisonedData, i18nNormalizeLineEndingsInICUs, moduleResolver, cycleAnalyzer, cycleHandlingStrategy, refEmitter, depTracker, injectableRegistry, semanticDepGraphUpdater, annotateForClosureCompiler, perf) {
|
|
5777
|
+
constructor(reflector, evaluator, metaRegistry, metaReader, scopeReader, dtsScopeReader, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, resourceLoader, rootDirs, defaultPreserveWhitespaces, i18nUseExternalIds, enableI18nLegacyMessageIdFormat, usePoisonedData, i18nNormalizeLineEndingsInICUs, moduleResolver, cycleAnalyzer, cycleHandlingStrategy, refEmitter, depTracker, injectableRegistry, semanticDepGraphUpdater, annotateForClosureCompiler, perf, hostDirectivesResolver) {
|
|
5622
5778
|
this.reflector = reflector;
|
|
5623
5779
|
this.evaluator = evaluator;
|
|
5624
5780
|
this.metaRegistry = metaRegistry;
|
|
@@ -5645,6 +5801,7 @@ var ComponentDecoratorHandler = class {
|
|
|
5645
5801
|
this.semanticDepGraphUpdater = semanticDepGraphUpdater;
|
|
5646
5802
|
this.annotateForClosureCompiler = annotateForClosureCompiler;
|
|
5647
5803
|
this.perf = perf;
|
|
5804
|
+
this.hostDirectivesResolver = hostDirectivesResolver;
|
|
5648
5805
|
this.literalCache = /* @__PURE__ */ new Map();
|
|
5649
5806
|
this.elementSchemaRegistry = new DomElementSchemaRegistry();
|
|
5650
5807
|
this.preanalyzeTemplateCache = /* @__PURE__ */ new Map();
|
|
@@ -5720,11 +5877,11 @@ var ComponentDecoratorHandler = class {
|
|
|
5720
5877
|
this.literalCache.delete(decorator);
|
|
5721
5878
|
let diagnostics;
|
|
5722
5879
|
let isPoisoned = false;
|
|
5723
|
-
const directiveResult = extractDirectiveMetadata(node, decorator, this.reflector, this.evaluator, this.isCore, flags, this.annotateForClosureCompiler, this.elementSchemaRegistry.getDefaultComponentElementName());
|
|
5880
|
+
const directiveResult = extractDirectiveMetadata(node, decorator, this.reflector, this.evaluator, this.refEmitter, this.isCore, flags, this.annotateForClosureCompiler, this.elementSchemaRegistry.getDefaultComponentElementName());
|
|
5724
5881
|
if (directiveResult === void 0) {
|
|
5725
5882
|
return {};
|
|
5726
5883
|
}
|
|
5727
|
-
const { decorator: component, metadata, inputs, outputs } = directiveResult;
|
|
5884
|
+
const { decorator: component, metadata, inputs, outputs, hostDirectives, rawHostDirectives } = directiveResult;
|
|
5728
5885
|
const encapsulation = (_a = resolveEnumValue(this.evaluator, component, "encapsulation", "ViewEncapsulation")) != null ? _a : ViewEncapsulation.Emulated;
|
|
5729
5886
|
const changeDetection = resolveEnumValue(this.evaluator, component, "changeDetection", "ChangeDetectionStrategy");
|
|
5730
5887
|
let animations = null;
|
|
@@ -5867,6 +6024,8 @@ var ComponentDecoratorHandler = class {
|
|
|
5867
6024
|
baseClass: readBaseClass(node, this.reflector, this.evaluator),
|
|
5868
6025
|
inputs,
|
|
5869
6026
|
outputs,
|
|
6027
|
+
hostDirectives,
|
|
6028
|
+
rawHostDirectives,
|
|
5870
6029
|
meta: {
|
|
5871
6030
|
...metadata,
|
|
5872
6031
|
template: {
|
|
@@ -5914,6 +6073,7 @@ var ComponentDecoratorHandler = class {
|
|
|
5914
6073
|
const ref = new Reference(node);
|
|
5915
6074
|
this.metaRegistry.registerDirectiveMetadata({
|
|
5916
6075
|
kind: MetaKind.Directive,
|
|
6076
|
+
matchSource: MatchSource.Selector,
|
|
5917
6077
|
ref,
|
|
5918
6078
|
name: node.name.text,
|
|
5919
6079
|
selector: analysis.meta.selector,
|
|
@@ -5923,6 +6083,7 @@ var ComponentDecoratorHandler = class {
|
|
|
5923
6083
|
queries: analysis.meta.queries.map((query) => query.propertyName),
|
|
5924
6084
|
isComponent: true,
|
|
5925
6085
|
baseClass: analysis.baseClass,
|
|
6086
|
+
hostDirectives: analysis.hostDirectives,
|
|
5926
6087
|
...analysis.typeCheckMeta,
|
|
5927
6088
|
isPoisoned: analysis.isPoisoned,
|
|
5928
6089
|
isStructural: false,
|
|
@@ -5949,7 +6110,7 @@ var ComponentDecoratorHandler = class {
|
|
|
5949
6110
|
}
|
|
5950
6111
|
for (const dep of dependencies) {
|
|
5951
6112
|
if (dep.kind === MetaKind.Directive && dep.selector !== null) {
|
|
5952
|
-
matcher.addSelectables(CssSelector2.parse(dep.selector), dep);
|
|
6113
|
+
matcher.addSelectables(CssSelector2.parse(dep.selector), [...this.hostDirectivesResolver.resolve(dep), dep]);
|
|
5953
6114
|
}
|
|
5954
6115
|
}
|
|
5955
6116
|
}
|
|
@@ -5992,7 +6153,7 @@ var ComponentDecoratorHandler = class {
|
|
|
5992
6153
|
const context = getSourceFile(node);
|
|
5993
6154
|
const metadata = analysis.meta;
|
|
5994
6155
|
const data = {
|
|
5995
|
-
declarations:
|
|
6156
|
+
declarations: EMPTY_ARRAY2,
|
|
5996
6157
|
declarationListEmitMode: 0
|
|
5997
6158
|
};
|
|
5998
6159
|
const diagnostics = [];
|
|
@@ -6003,7 +6164,7 @@ var ComponentDecoratorHandler = class {
|
|
|
6003
6164
|
const dependencies = scope.kind === ComponentScopeKind.NgModule ? scope.compilation.dependencies : scope.dependencies;
|
|
6004
6165
|
for (const dep of dependencies) {
|
|
6005
6166
|
if (dep.kind === MetaKind.Directive && dep.selector !== null) {
|
|
6006
|
-
matcher.addSelectables(CssSelector2.parse(dep.selector), dep);
|
|
6167
|
+
matcher.addSelectables(CssSelector2.parse(dep.selector), [dep]);
|
|
6007
6168
|
} else if (dep.kind === MetaKind.Pipe) {
|
|
6008
6169
|
pipes.set(dep.name, dep);
|
|
6009
6170
|
}
|
|
@@ -6029,7 +6190,7 @@ var ComponentDecoratorHandler = class {
|
|
|
6029
6190
|
seen.add(dep.ref.node);
|
|
6030
6191
|
switch (dep.kind) {
|
|
6031
6192
|
case MetaKind.Directive:
|
|
6032
|
-
if (!used.has(dep.ref.node)) {
|
|
6193
|
+
if (!used.has(dep.ref.node) || dep.matchSource !== MatchSource.Selector) {
|
|
6033
6194
|
continue;
|
|
6034
6195
|
}
|
|
6035
6196
|
const dirType = this.refEmitter.emit(dep.ref, context);
|
|
@@ -6144,6 +6305,10 @@ var ComponentDecoratorHandler = class {
|
|
|
6144
6305
|
if (directiveDiagnostics !== null) {
|
|
6145
6306
|
diagnostics.push(...directiveDiagnostics);
|
|
6146
6307
|
}
|
|
6308
|
+
const hostDirectivesDiagnotics = analysis.hostDirectives && analysis.rawHostDirectives ? validateHostDirectives(analysis.rawHostDirectives, analysis.hostDirectives, this.metaReader) : null;
|
|
6309
|
+
if (hostDirectivesDiagnotics !== null) {
|
|
6310
|
+
diagnostics.push(...hostDirectivesDiagnotics);
|
|
6311
|
+
}
|
|
6147
6312
|
if (diagnostics.length > 0) {
|
|
6148
6313
|
return { diagnostics };
|
|
6149
6314
|
}
|
|
@@ -6247,7 +6412,7 @@ function validateStandaloneImports(importRefs, importExpr, metaReader, scopeRead
|
|
|
6247
6412
|
return diagnostics;
|
|
6248
6413
|
}
|
|
6249
6414
|
|
|
6250
|
-
// bazel-out/
|
|
6415
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
|
|
6251
6416
|
import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression2, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr8 } from "@angular/compiler";
|
|
6252
6417
|
import ts25 from "typescript";
|
|
6253
6418
|
var InjectableDecoratorHandler = class {
|
|
@@ -6447,7 +6612,7 @@ function getDep(dep, reflector) {
|
|
|
6447
6612
|
return meta;
|
|
6448
6613
|
}
|
|
6449
6614
|
|
|
6450
|
-
// bazel-out/
|
|
6615
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
|
|
6451
6616
|
import { compileClassMetadata as compileClassMetadata5, compileDeclareClassMetadata as compileDeclareClassMetadata5, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5, WrappedNodeExpr as WrappedNodeExpr9 } from "@angular/compiler";
|
|
6452
6617
|
import ts26 from "typescript";
|
|
6453
6618
|
var PipeSymbol = class extends SemanticSymbol {
|
|
@@ -6606,6 +6771,7 @@ export {
|
|
|
6606
6771
|
CompoundMetadataRegistry,
|
|
6607
6772
|
InjectableClassRegistry,
|
|
6608
6773
|
ResourceRegistry,
|
|
6774
|
+
HostDirectivesResolver,
|
|
6609
6775
|
ComponentScopeKind,
|
|
6610
6776
|
CompoundComponentScopeReader,
|
|
6611
6777
|
MetadataDtsModuleScopeResolver,
|
|
@@ -6625,6 +6791,13 @@ export {
|
|
|
6625
6791
|
InjectableDecoratorHandler,
|
|
6626
6792
|
PipeDecoratorHandler
|
|
6627
6793
|
};
|
|
6794
|
+
/*!
|
|
6795
|
+
* @license
|
|
6796
|
+
* Copyright Google LLC All Rights Reserved.
|
|
6797
|
+
*
|
|
6798
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6799
|
+
* found in the LICENSE file at https://angular.io/license
|
|
6800
|
+
*/
|
|
6628
6801
|
/**
|
|
6629
6802
|
* @license
|
|
6630
6803
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6632,4 +6805,4 @@ export {
|
|
|
6632
6805
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6633
6806
|
* found in the LICENSE file at https://angular.io/license
|
|
6634
6807
|
*/
|
|
6635
|
-
//# sourceMappingURL=chunk-
|
|
6808
|
+
//# sourceMappingURL=chunk-I6QQYDN3.js.map
|