@angular/core 17.3.0-next.1 → 17.3.0-rc.0
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/rxjs-interop/src/index.mjs +3 -1
- package/esm2022/rxjs-interop/src/output_from_observable.mjs +68 -0
- package/esm2022/rxjs-interop/src/output_to_observable.mjs +29 -0
- package/esm2022/rxjs-interop/src/to_observable.mjs +1 -1
- package/esm2022/src/application/application_ref.mjs +46 -33
- package/esm2022/src/authoring/input/input_type_checking.mjs +1 -1
- package/esm2022/src/authoring/model/model.mjs +4 -1
- package/esm2022/src/authoring/model/model_signal.mjs +9 -18
- package/esm2022/src/authoring/output/output.mjs +35 -0
- package/esm2022/src/authoring/output/output_emitter_ref.mjs +74 -0
- package/esm2022/src/authoring/output/output_ref.mjs +9 -0
- package/esm2022/src/authoring.mjs +3 -2
- package/esm2022/src/core_private_export.mjs +4 -3
- package/esm2022/src/di/interface/provider.mjs +1 -1
- package/esm2022/src/di/metadata.mjs +1 -1
- package/esm2022/src/di/r3_injector.mjs +26 -15
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/event_emitter.mjs +19 -2
- package/esm2022/src/hydration/api.mjs +2 -2
- package/esm2022/src/render3/after_render_hooks.mjs +2 -2
- package/esm2022/src/render3/component_ref.mjs +103 -93
- package/esm2022/src/render3/instructions/listener.mjs +7 -9
- package/esm2022/src/render3/instructions/render.mjs +3 -2
- package/esm2022/src/render3/interfaces/view.mjs +1 -1
- package/esm2022/src/render3/node_manipulation.mjs +13 -4
- package/esm2022/src/render3/reactivity/effect.mjs +11 -7
- package/esm2022/src/render3/reactivity/signal.mjs +3 -4
- package/esm2022/src/render3/view_manipulation.mjs +24 -17
- package/esm2022/src/util/assert.mjs +7 -1
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/component_fixture.mjs +78 -19
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed_compiler.mjs +26 -4
- package/fesm2022/core.mjs +10715 -10595
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +82 -3
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +102 -21
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +124 -76
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +39 -1
- package/schematics/migrations/block-template-entities/bundle.js +18 -33
- package/schematics/migrations/block-template-entities/bundle.js.map +3 -3
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +26381 -0
- package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +7 -0
- package/schematics/migrations.json +5 -0
- package/schematics/ng-generate/control-flow-migration/bundle.js +18 -33
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
- package/schematics/ng-generate/standalone-migration/bundle.js +77 -66
- package/schematics/ng-generate/standalone-migration/bundle.js.map +3 -3
- package/testing/index.d.ts +1 -1
- package/esm2022/src/authoring/output.mjs +0 -33
|
@@ -10542,13 +10542,10 @@ var ExpressionKind;
|
|
|
10542
10542
|
ExpressionKind2[ExpressionKind2["EmptyExpr"] = 17] = "EmptyExpr";
|
|
10543
10543
|
ExpressionKind2[ExpressionKind2["AssignTemporaryExpr"] = 18] = "AssignTemporaryExpr";
|
|
10544
10544
|
ExpressionKind2[ExpressionKind2["ReadTemporaryExpr"] = 19] = "ReadTemporaryExpr";
|
|
10545
|
-
ExpressionKind2[ExpressionKind2["
|
|
10546
|
-
ExpressionKind2[ExpressionKind2["
|
|
10547
|
-
ExpressionKind2[ExpressionKind2["
|
|
10548
|
-
ExpressionKind2[ExpressionKind2["
|
|
10549
|
-
ExpressionKind2[ExpressionKind2["DerivedRepeaterVar"] = 24] = "DerivedRepeaterVar";
|
|
10550
|
-
ExpressionKind2[ExpressionKind2["ConstCollected"] = 25] = "ConstCollected";
|
|
10551
|
-
ExpressionKind2[ExpressionKind2["TwoWayBindingSet"] = 26] = "TwoWayBindingSet";
|
|
10545
|
+
ExpressionKind2[ExpressionKind2["SlotLiteralExpr"] = 20] = "SlotLiteralExpr";
|
|
10546
|
+
ExpressionKind2[ExpressionKind2["ConditionalCase"] = 21] = "ConditionalCase";
|
|
10547
|
+
ExpressionKind2[ExpressionKind2["ConstCollected"] = 22] = "ConstCollected";
|
|
10548
|
+
ExpressionKind2[ExpressionKind2["TwoWayBindingSet"] = 23] = "TwoWayBindingSet";
|
|
10552
10549
|
})(ExpressionKind || (ExpressionKind = {}));
|
|
10553
10550
|
var VariableFlags;
|
|
10554
10551
|
(function(VariableFlags2) {
|
|
@@ -10567,12 +10564,6 @@ var CompatibilityMode;
|
|
|
10567
10564
|
CompatibilityMode2[CompatibilityMode2["Normal"] = 0] = "Normal";
|
|
10568
10565
|
CompatibilityMode2[CompatibilityMode2["TemplateDefinitionBuilder"] = 1] = "TemplateDefinitionBuilder";
|
|
10569
10566
|
})(CompatibilityMode || (CompatibilityMode = {}));
|
|
10570
|
-
var DeferSecondaryKind;
|
|
10571
|
-
(function(DeferSecondaryKind2) {
|
|
10572
|
-
DeferSecondaryKind2[DeferSecondaryKind2["Loading"] = 0] = "Loading";
|
|
10573
|
-
DeferSecondaryKind2[DeferSecondaryKind2["Placeholder"] = 1] = "Placeholder";
|
|
10574
|
-
DeferSecondaryKind2[DeferSecondaryKind2["Error"] = 2] = "Error";
|
|
10575
|
-
})(DeferSecondaryKind || (DeferSecondaryKind = {}));
|
|
10576
10567
|
var BindingKind;
|
|
10577
10568
|
(function(BindingKind2) {
|
|
10578
10569
|
BindingKind2[BindingKind2["Attribute"] = 0] = "Attribute";
|
|
@@ -10646,10 +10637,6 @@ var TRAIT_DEPENDS_ON_SLOT_CONTEXT = {
|
|
|
10646
10637
|
var TRAIT_CONSUMES_VARS = {
|
|
10647
10638
|
[ConsumesVarsTrait]: true
|
|
10648
10639
|
};
|
|
10649
|
-
var TRAIT_USES_VAR_OFFSET = {
|
|
10650
|
-
[UsesVarOffset]: true,
|
|
10651
|
-
varOffset: null
|
|
10652
|
-
};
|
|
10653
10640
|
function hasConsumesSlotTrait(op) {
|
|
10654
10641
|
return op[ConsumesSlot] === true;
|
|
10655
10642
|
}
|
|
@@ -12914,7 +12901,7 @@ var ElementAttributes = class {
|
|
|
12914
12901
|
this.propertyBindings = null;
|
|
12915
12902
|
this.projectAs = null;
|
|
12916
12903
|
}
|
|
12917
|
-
isKnown(kind, name
|
|
12904
|
+
isKnown(kind, name) {
|
|
12918
12905
|
var _a2;
|
|
12919
12906
|
const nameToValue = (_a2 = this.known.get(kind)) != null ? _a2 : /* @__PURE__ */ new Set();
|
|
12920
12907
|
this.known.set(kind, nameToValue);
|
|
@@ -12927,7 +12914,7 @@ var ElementAttributes = class {
|
|
|
12927
12914
|
add(kind, name, value, namespace, trustedValueFn) {
|
|
12928
12915
|
var _a2;
|
|
12929
12916
|
const allowDuplicates = this.compatibility === CompatibilityMode.TemplateDefinitionBuilder && (kind === BindingKind.Attribute || kind === BindingKind.ClassName || kind === BindingKind.StyleProperty);
|
|
12930
|
-
if (!allowDuplicates && this.isKnown(kind, name
|
|
12917
|
+
if (!allowDuplicates && this.isKnown(kind, name)) {
|
|
12931
12918
|
return;
|
|
12932
12919
|
}
|
|
12933
12920
|
if (name === "ngProjectAs") {
|
|
@@ -13527,7 +13514,7 @@ function createI18nMessage(job, context, messagePlaceholder) {
|
|
|
13527
13514
|
}
|
|
13528
13515
|
function formatIcuPlaceholder(op) {
|
|
13529
13516
|
if (op.strings.length !== op.expressionPlaceholders.length + 1) {
|
|
13530
|
-
throw Error(`
|
|
13517
|
+
throw Error(`AssertionError: Invalid ICU placeholder with ${op.strings.length} strings and ${op.expressionPlaceholders.length} expressions`);
|
|
13531
13518
|
}
|
|
13532
13519
|
const values = op.expressionPlaceholders.map(formatValue);
|
|
13533
13520
|
return op.strings.flatMap((str, i) => [str, values[i] || ""]).join("");
|
|
@@ -20132,7 +20119,7 @@ function addNamesToView(unit, baseName, state, compatibility) {
|
|
|
20132
20119
|
}
|
|
20133
20120
|
if (op.emptyView !== null) {
|
|
20134
20121
|
const emptyView = unit.job.views.get(op.emptyView);
|
|
20135
|
-
addNamesToView(emptyView, `${baseName}_${
|
|
20122
|
+
addNamesToView(emptyView, `${baseName}_${op.functionNameSuffix}Empty_${op.handle.slot + 2}`, state, compatibility);
|
|
20136
20123
|
}
|
|
20137
20124
|
addNamesToView(unit.job.views.get(op.xref), `${baseName}_${op.functionNameSuffix}_${op.handle.slot + 1}`, state, compatibility);
|
|
20138
20125
|
break;
|
|
@@ -20553,7 +20540,7 @@ function propagateI18nBlocksToTemplates(unit, subTemplateIndex) {
|
|
|
20553
20540
|
break;
|
|
20554
20541
|
case OpKind.RepeaterCreate:
|
|
20555
20542
|
const forView = unit.job.views.get(op.xref);
|
|
20556
|
-
subTemplateIndex = propagateI18nBlocksForView(
|
|
20543
|
+
subTemplateIndex = propagateI18nBlocksForView(forView, i18nBlock, op.i18nPlaceholder, subTemplateIndex);
|
|
20557
20544
|
if (op.emptyView !== null) {
|
|
20558
20545
|
subTemplateIndex = propagateI18nBlocksForView(unit.job.views.get(op.emptyView), i18nBlock, op.emptyI18nPlaceholder, subTemplateIndex);
|
|
20559
20546
|
}
|
|
@@ -21653,11 +21640,11 @@ function processLexicalScope(view, ops) {
|
|
|
21653
21640
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_dollar_event.mjs
|
|
21654
21641
|
function resolveDollarEvent(job) {
|
|
21655
21642
|
for (const unit of job.units) {
|
|
21656
|
-
transformDollarEvent(unit
|
|
21657
|
-
transformDollarEvent(unit
|
|
21643
|
+
transformDollarEvent(unit.create);
|
|
21644
|
+
transformDollarEvent(unit.update);
|
|
21658
21645
|
}
|
|
21659
21646
|
}
|
|
21660
|
-
function transformDollarEvent(
|
|
21647
|
+
function transformDollarEvent(ops) {
|
|
21661
21648
|
for (const op of ops) {
|
|
21662
21649
|
if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
21663
21650
|
transformExpressionsInOp(op, (expr) => {
|
|
@@ -21828,7 +21815,7 @@ function recordTemplateStart(job, view, slot, i18nPlaceholder, i18nContext, i18n
|
|
|
21828
21815
|
addParam(i18nContext.params, startName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
|
|
21829
21816
|
}
|
|
21830
21817
|
function recordTemplateClose(job, view, slot, i18nPlaceholder, i18nContext, i18nBlock, structuralDirective) {
|
|
21831
|
-
const {
|
|
21818
|
+
const { closeName } = i18nPlaceholder;
|
|
21832
21819
|
const flags = I18nParamValueFlags.TemplateTag | I18nParamValueFlags.CloseTag;
|
|
21833
21820
|
if (closeName) {
|
|
21834
21821
|
addParam(i18nContext.params, closeName, slot, getSubTemplateIndexForTemplateTag(job, i18nBlock, view), flags);
|
|
@@ -21855,14 +21842,14 @@ function addParam(params, placeholder, value, subTemplateIndex, flags) {
|
|
|
21855
21842
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs
|
|
21856
21843
|
function resolveI18nExpressionPlaceholders(job) {
|
|
21857
21844
|
var _a2;
|
|
21858
|
-
const
|
|
21845
|
+
const subTemplateIndices = /* @__PURE__ */ new Map();
|
|
21859
21846
|
const i18nContexts = /* @__PURE__ */ new Map();
|
|
21860
21847
|
const icuPlaceholders = /* @__PURE__ */ new Map();
|
|
21861
21848
|
for (const unit of job.units) {
|
|
21862
21849
|
for (const op of unit.create) {
|
|
21863
21850
|
switch (op.kind) {
|
|
21864
21851
|
case OpKind.I18nStart:
|
|
21865
|
-
|
|
21852
|
+
subTemplateIndices.set(op.xref, op.subTemplateIndex);
|
|
21866
21853
|
break;
|
|
21867
21854
|
case OpKind.I18nContext:
|
|
21868
21855
|
i18nContexts.set(op.xref, op);
|
|
@@ -21879,7 +21866,7 @@ function resolveI18nExpressionPlaceholders(job) {
|
|
|
21879
21866
|
for (const op of unit.update) {
|
|
21880
21867
|
if (op.kind === OpKind.I18nExpression) {
|
|
21881
21868
|
const index = expressionIndices.get(referenceIndex(op)) || 0;
|
|
21882
|
-
const subTemplateIndex = (_a2 =
|
|
21869
|
+
const subTemplateIndex = (_a2 = subTemplateIndices.get(op.i18nOwner)) != null ? _a2 : null;
|
|
21883
21870
|
const value = {
|
|
21884
21871
|
value: index,
|
|
21885
21872
|
subTemplateIndex,
|
|
@@ -21943,7 +21930,7 @@ function processLexicalScope2(unit, ops, savedView) {
|
|
|
21943
21930
|
if (op.kind == OpKind.Listener || op.kind === OpKind.TwoWayListener) {
|
|
21944
21931
|
continue;
|
|
21945
21932
|
}
|
|
21946
|
-
transformExpressionsInOp(op, (expr
|
|
21933
|
+
transformExpressionsInOp(op, (expr) => {
|
|
21947
21934
|
if (expr instanceof LexicalReadExpr) {
|
|
21948
21935
|
if (scope.has(expr.name)) {
|
|
21949
21936
|
return new ReadVariableExpr(scope.get(expr.name));
|
|
@@ -22545,7 +22532,6 @@ function optimizeVariablesInOpList(ops, compatibility) {
|
|
|
22545
22532
|
const toInline = [];
|
|
22546
22533
|
for (const [id, count] of varUsages) {
|
|
22547
22534
|
const decl = varDecls.get(id);
|
|
22548
|
-
const varInfo = opMap.get(decl);
|
|
22549
22535
|
const isAlwaysInline = !!(decl.flags & VariableFlags.AlwaysInline);
|
|
22550
22536
|
if (count !== 1 || isAlwaysInline) {
|
|
22551
22537
|
continue;
|
|
@@ -23248,7 +23234,6 @@ function ingestIcu(unit, icu) {
|
|
|
23248
23234
|
var _a2;
|
|
23249
23235
|
if (icu.i18n instanceof Message && isSingleI18nIcu(icu.i18n)) {
|
|
23250
23236
|
const xref = unit.job.allocateXrefId();
|
|
23251
|
-
const icuNode = icu.i18n.nodes[0];
|
|
23252
23237
|
unit.create.push(createIcuStartOp(xref, icu.i18n, icuFromI18nMessage(icu.i18n).name, null));
|
|
23253
23238
|
for (const [placeholder, text2] of Object.entries(__spreadValues(__spreadValues({}, icu.vars), icu.placeholders))) {
|
|
23254
23239
|
if (text2 instanceof BoundText) {
|
|
@@ -29344,7 +29329,7 @@ function publishFacade(global) {
|
|
|
29344
29329
|
}
|
|
29345
29330
|
|
|
29346
29331
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
|
|
29347
|
-
var VERSION2 = new Version("17.3.0-
|
|
29332
|
+
var VERSION2 = new Version("17.3.0-rc.0");
|
|
29348
29333
|
|
|
29349
29334
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
29350
29335
|
var _I18N_ATTR = "i18n";
|
|
@@ -30410,7 +30395,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION = "12.0.0";
|
|
|
30410
30395
|
function compileDeclareClassMetadata(metadata) {
|
|
30411
30396
|
const definitionMap = new DefinitionMap();
|
|
30412
30397
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
30413
|
-
definitionMap.set("version", literal("17.3.0-
|
|
30398
|
+
definitionMap.set("version", literal("17.3.0-rc.0"));
|
|
30414
30399
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30415
30400
|
definitionMap.set("type", metadata.type);
|
|
30416
30401
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -30479,7 +30464,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
30479
30464
|
const definitionMap = new DefinitionMap();
|
|
30480
30465
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
30481
30466
|
definitionMap.set("minVersion", literal(minVersion));
|
|
30482
|
-
definitionMap.set("version", literal("17.3.0-
|
|
30467
|
+
definitionMap.set("version", literal("17.3.0-rc.0"));
|
|
30483
30468
|
definitionMap.set("type", meta.type.value);
|
|
30484
30469
|
if (meta.isStandalone) {
|
|
30485
30470
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -30778,7 +30763,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION2 = "12.0.0";
|
|
|
30778
30763
|
function compileDeclareFactoryFunction(meta) {
|
|
30779
30764
|
const definitionMap = new DefinitionMap();
|
|
30780
30765
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION2));
|
|
30781
|
-
definitionMap.set("version", literal("17.3.0-
|
|
30766
|
+
definitionMap.set("version", literal("17.3.0-rc.0"));
|
|
30782
30767
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30783
30768
|
definitionMap.set("type", meta.type.value);
|
|
30784
30769
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -30801,7 +30786,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
30801
30786
|
function createInjectableDefinitionMap(meta) {
|
|
30802
30787
|
const definitionMap = new DefinitionMap();
|
|
30803
30788
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION3));
|
|
30804
|
-
definitionMap.set("version", literal("17.3.0-
|
|
30789
|
+
definitionMap.set("version", literal("17.3.0-rc.0"));
|
|
30805
30790
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30806
30791
|
definitionMap.set("type", meta.type.value);
|
|
30807
30792
|
if (meta.providedIn !== void 0) {
|
|
@@ -30839,7 +30824,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
30839
30824
|
function createInjectorDefinitionMap(meta) {
|
|
30840
30825
|
const definitionMap = new DefinitionMap();
|
|
30841
30826
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION4));
|
|
30842
|
-
definitionMap.set("version", literal("17.3.0-
|
|
30827
|
+
definitionMap.set("version", literal("17.3.0-rc.0"));
|
|
30843
30828
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30844
30829
|
definitionMap.set("type", meta.type.value);
|
|
30845
30830
|
definitionMap.set("providers", meta.providers);
|
|
@@ -30863,7 +30848,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
30863
30848
|
throw new Error("Invalid path! Local compilation mode should not get into the partial compilation path");
|
|
30864
30849
|
}
|
|
30865
30850
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION5));
|
|
30866
|
-
definitionMap.set("version", literal("17.3.0-
|
|
30851
|
+
definitionMap.set("version", literal("17.3.0-rc.0"));
|
|
30867
30852
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30868
30853
|
definitionMap.set("type", meta.type.value);
|
|
30869
30854
|
if (meta.bootstrap.length > 0) {
|
|
@@ -30898,7 +30883,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
30898
30883
|
function createPipeDefinitionMap(meta) {
|
|
30899
30884
|
const definitionMap = new DefinitionMap();
|
|
30900
30885
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION6));
|
|
30901
|
-
definitionMap.set("version", literal("17.3.0-
|
|
30886
|
+
definitionMap.set("version", literal("17.3.0-rc.0"));
|
|
30902
30887
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
30903
30888
|
definitionMap.set("type", meta.type.value);
|
|
30904
30889
|
if (meta.isStandalone) {
|
|
@@ -30915,7 +30900,7 @@ function createPipeDefinitionMap(meta) {
|
|
|
30915
30900
|
publishFacade(_global);
|
|
30916
30901
|
|
|
30917
30902
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/version.mjs
|
|
30918
|
-
var VERSION3 = new Version("17.3.0-
|
|
30903
|
+
var VERSION3 = new Version("17.3.0-rc.0");
|
|
30919
30904
|
|
|
30920
30905
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/imports/src/emitter.mjs
|
|
30921
30906
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
@@ -38002,58 +37987,71 @@ var import_typescript55 = __toESM(require("typescript"), 1);
|
|
|
38002
37987
|
|
|
38003
37988
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_functions.mjs
|
|
38004
37989
|
var import_typescript52 = __toESM(require("typescript"), 1);
|
|
38005
|
-
function tryParseInitializerApiMember(
|
|
37990
|
+
function tryParseInitializerApiMember(functions, member, reflector, importTracker) {
|
|
38006
37991
|
if (member.value === null || !import_typescript52.default.isCallExpression(member.value)) {
|
|
38007
37992
|
return null;
|
|
38008
37993
|
}
|
|
38009
37994
|
const call2 = member.value;
|
|
38010
|
-
const staticResult = parseTopLevelCall(call2,
|
|
37995
|
+
const staticResult = parseTopLevelCall(call2, functions, importTracker) || parseTopLevelRequiredCall(call2, functions, importTracker) || parseTopLevelCallFromNamespace(call2, functions, importTracker);
|
|
38011
37996
|
if (staticResult === null) {
|
|
38012
37997
|
return null;
|
|
38013
37998
|
}
|
|
38014
|
-
const resolvedImport = reflector.getImportOfIdentifier(staticResult.
|
|
38015
|
-
if (resolvedImport === null ||
|
|
37999
|
+
const resolvedImport = reflector.getImportOfIdentifier(staticResult.apiReference);
|
|
38000
|
+
if (resolvedImport === null || staticResult.api.functionName !== resolvedImport.name || staticResult.api.owningModule !== resolvedImport.from) {
|
|
38016
38001
|
return null;
|
|
38017
38002
|
}
|
|
38018
38003
|
return {
|
|
38004
|
+
api: staticResult.api,
|
|
38019
38005
|
call: call2,
|
|
38020
|
-
isRequired: staticResult.isRequired
|
|
38021
|
-
apiName: resolvedImport.name
|
|
38006
|
+
isRequired: staticResult.isRequired
|
|
38022
38007
|
};
|
|
38023
38008
|
}
|
|
38024
|
-
function parseTopLevelCall(call2,
|
|
38009
|
+
function parseTopLevelCall(call2, functions, importTracker) {
|
|
38025
38010
|
const node = call2.expression;
|
|
38026
38011
|
if (!import_typescript52.default.isIdentifier(node)) {
|
|
38027
38012
|
return null;
|
|
38028
38013
|
}
|
|
38029
|
-
|
|
38014
|
+
const matchingApi = functions.find((fn2) => importTracker.isPotentialReferenceToNamedImport(node, fn2.functionName, fn2.owningModule));
|
|
38015
|
+
if (matchingApi === void 0) {
|
|
38016
|
+
return null;
|
|
38017
|
+
}
|
|
38018
|
+
return { api: matchingApi, apiReference: node, isRequired: false };
|
|
38030
38019
|
}
|
|
38031
|
-
function parseTopLevelRequiredCall(call2,
|
|
38020
|
+
function parseTopLevelRequiredCall(call2, functions, importTracker) {
|
|
38032
38021
|
const node = call2.expression;
|
|
38033
38022
|
if (!import_typescript52.default.isPropertyAccessExpression(node) || !import_typescript52.default.isIdentifier(node.expression) || node.name.text !== "required") {
|
|
38034
38023
|
return null;
|
|
38035
38024
|
}
|
|
38036
38025
|
const expression = node.expression;
|
|
38037
|
-
const
|
|
38038
|
-
|
|
38026
|
+
const matchingApi = functions.find((fn2) => importTracker.isPotentialReferenceToNamedImport(expression, fn2.functionName, fn2.owningModule));
|
|
38027
|
+
if (matchingApi === void 0) {
|
|
38028
|
+
return null;
|
|
38029
|
+
}
|
|
38030
|
+
return { api: matchingApi, apiReference: expression, isRequired: true };
|
|
38039
38031
|
}
|
|
38040
|
-
function parseTopLevelCallFromNamespace(call2,
|
|
38032
|
+
function parseTopLevelCallFromNamespace(call2, functions, importTracker) {
|
|
38041
38033
|
const node = call2.expression;
|
|
38042
38034
|
if (!import_typescript52.default.isPropertyAccessExpression(node)) {
|
|
38043
38035
|
return null;
|
|
38044
38036
|
}
|
|
38045
38037
|
let apiReference = null;
|
|
38038
|
+
let matchingApi = void 0;
|
|
38046
38039
|
let isRequired = false;
|
|
38047
|
-
if (import_typescript52.default.isIdentifier(node.expression) && import_typescript52.default.isIdentifier(node.name)
|
|
38040
|
+
if (import_typescript52.default.isIdentifier(node.expression) && import_typescript52.default.isIdentifier(node.name)) {
|
|
38041
|
+
const namespaceRef = node.expression;
|
|
38048
38042
|
apiReference = node.name;
|
|
38049
|
-
|
|
38043
|
+
matchingApi = functions.find((fn2) => node.name.text === fn2.functionName && importTracker.isPotentialReferenceToNamespaceImport(namespaceRef, fn2.owningModule));
|
|
38044
|
+
} else if (import_typescript52.default.isPropertyAccessExpression(node.expression) && import_typescript52.default.isIdentifier(node.expression.expression) && import_typescript52.default.isIdentifier(node.expression.name) && node.name.text === "required") {
|
|
38045
|
+
const potentialName = node.expression.name.text;
|
|
38046
|
+
const namespaceRef = node.expression.expression;
|
|
38050
38047
|
apiReference = node.expression.name;
|
|
38048
|
+
matchingApi = functions.find((fn2) => fn2.functionName === potentialName && importTracker.isPotentialReferenceToNamespaceImport(namespaceRef, fn2.owningModule));
|
|
38051
38049
|
isRequired = true;
|
|
38052
38050
|
}
|
|
38053
|
-
if (
|
|
38051
|
+
if (matchingApi === void 0 || apiReference === null) {
|
|
38054
38052
|
return null;
|
|
38055
38053
|
}
|
|
38056
|
-
return {
|
|
38054
|
+
return { api: matchingApi, apiReference, isRequired };
|
|
38057
38055
|
}
|
|
38058
38056
|
|
|
38059
38057
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_output_parse_options.mjs
|
|
@@ -38077,7 +38075,7 @@ function parseAndValidateInputAndOutputOptions(optionsNode) {
|
|
|
38077
38075
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_function.mjs
|
|
38078
38076
|
function tryParseSignalInputMapping(member, reflector, importTracker) {
|
|
38079
38077
|
var _a2;
|
|
38080
|
-
const signalInput = tryParseInitializerApiMember(["input"], member, reflector, importTracker);
|
|
38078
|
+
const signalInput = tryParseInitializerApiMember([{ functionName: "input", owningModule: "@angular/core" }], member, reflector, importTracker);
|
|
38081
38079
|
if (signalInput === null) {
|
|
38082
38080
|
return null;
|
|
38083
38081
|
}
|
|
@@ -38096,7 +38094,7 @@ function tryParseSignalInputMapping(member, reflector, importTracker) {
|
|
|
38096
38094
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/model_function.mjs
|
|
38097
38095
|
function tryParseSignalModelMapping(member, reflector, importTracker) {
|
|
38098
38096
|
var _a2;
|
|
38099
|
-
const model = tryParseInitializerApiMember(["model"], member, reflector, importTracker);
|
|
38097
|
+
const model = tryParseInitializerApiMember([{ functionName: "model", owningModule: "@angular/core" }], member, reflector, importTracker);
|
|
38100
38098
|
if (model === null) {
|
|
38101
38099
|
return null;
|
|
38102
38100
|
}
|
|
@@ -38124,14 +38122,17 @@ function tryParseSignalModelMapping(member, reflector, importTracker) {
|
|
|
38124
38122
|
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/output_function.mjs
|
|
38125
38123
|
function tryParseInitializerBasedOutput(member, reflector, importTracker) {
|
|
38126
38124
|
var _a2;
|
|
38127
|
-
const output = tryParseInitializerApiMember([
|
|
38125
|
+
const output = tryParseInitializerApiMember([
|
|
38126
|
+
{ functionName: "output", owningModule: "@angular/core" },
|
|
38127
|
+
{ functionName: "outputFromObservable", owningModule: "@angular/core/rxjs-interop" }
|
|
38128
|
+
], member, reflector, importTracker);
|
|
38128
38129
|
if (output === null) {
|
|
38129
38130
|
return null;
|
|
38130
38131
|
}
|
|
38131
38132
|
if (output.isRequired) {
|
|
38132
38133
|
throw new FatalDiagnosticError(ErrorCode.INITIALIZER_API_NO_REQUIRED_FUNCTION, output.call, `Output does not support ".required()".`);
|
|
38133
38134
|
}
|
|
38134
|
-
const optionsNode = output.call.arguments[0];
|
|
38135
|
+
const optionsNode = output.api.functionName === "output" ? output.call.arguments[0] : output.call.arguments[1];
|
|
38135
38136
|
const options = optionsNode !== void 0 ? parseAndValidateInputAndOutputOptions(optionsNode) : null;
|
|
38136
38137
|
const classPropertyName = member.name;
|
|
38137
38138
|
return {
|
|
@@ -38149,11 +38150,13 @@ var import_typescript54 = __toESM(require("typescript"), 1);
|
|
|
38149
38150
|
var queryFunctionNames = ["viewChild", "viewChildren", "contentChild", "contentChildren"];
|
|
38150
38151
|
var defaultDescendantsValue = (type) => type !== "contentChildren";
|
|
38151
38152
|
function tryParseSignalQueryFromInitializer(member, reflector, importTracker) {
|
|
38152
|
-
const
|
|
38153
|
+
const initializerFns = queryFunctionNames.map((fnName) => ({ functionName: fnName, owningModule: "@angular/core" }));
|
|
38154
|
+
const query = tryParseInitializerApiMember(initializerFns, member, reflector, importTracker);
|
|
38153
38155
|
if (query === null) {
|
|
38154
38156
|
return null;
|
|
38155
38157
|
}
|
|
38156
|
-
const
|
|
38158
|
+
const { functionName } = query.api;
|
|
38159
|
+
const isSingleQuery = functionName === "viewChild" || functionName === "contentChild";
|
|
38157
38160
|
const predicateNode = query.call.arguments[0];
|
|
38158
38161
|
if (predicateNode === void 0) {
|
|
38159
38162
|
throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, query.call, "No locator specified.");
|
|
@@ -38164,9 +38167,9 @@ function tryParseSignalQueryFromInitializer(member, reflector, importTracker) {
|
|
|
38164
38167
|
}
|
|
38165
38168
|
const options = optionsNode && reflectObjectLiteral(optionsNode);
|
|
38166
38169
|
const read = (options == null ? void 0 : options.has("read")) ? parseReadOption(options.get("read")) : null;
|
|
38167
|
-
const descendants = (options == null ? void 0 : options.has("descendants")) ? parseDescendantsOption(options.get("descendants")) : defaultDescendantsValue(
|
|
38170
|
+
const descendants = (options == null ? void 0 : options.has("descendants")) ? parseDescendantsOption(options.get("descendants")) : defaultDescendantsValue(functionName);
|
|
38168
38171
|
return {
|
|
38169
|
-
name:
|
|
38172
|
+
name: functionName,
|
|
38170
38173
|
call: query.call,
|
|
38171
38174
|
metadata: {
|
|
38172
38175
|
isSignal: true,
|
|
@@ -38191,6 +38194,9 @@ function parseLocator(expression, reflector) {
|
|
|
38191
38194
|
return createMayBeForwardRefExpression(new output_ast_exports.WrappedNodeExpr(expression), unwrappedExpression !== null ? 2 : 0);
|
|
38192
38195
|
}
|
|
38193
38196
|
function parseReadOption(value) {
|
|
38197
|
+
if (import_typescript54.default.isExpressionWithTypeArguments(value) || import_typescript54.default.isParenthesizedExpression(value) || import_typescript54.default.isAsExpression(value)) {
|
|
38198
|
+
return parseReadOption(value.expression);
|
|
38199
|
+
}
|
|
38194
38200
|
if (import_typescript54.default.isPropertyAccessExpression(value) && import_typescript54.default.isIdentifier(value.expression) || import_typescript54.default.isIdentifier(value)) {
|
|
38195
38201
|
return new output_ast_exports.WrappedNodeExpr(value);
|
|
38196
38202
|
}
|
|
@@ -39312,7 +39318,12 @@ function createModuleWithProvidersResolver(reflector, isCore) {
|
|
|
39312
39318
|
if (import_typescript56.default.isTypeLiteralNode(t)) {
|
|
39313
39319
|
for (const m of t.members) {
|
|
39314
39320
|
const ngModuleType = import_typescript56.default.isPropertySignature(m) && import_typescript56.default.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
|
|
39315
|
-
|
|
39321
|
+
let ngModuleExpression = null;
|
|
39322
|
+
if (ngModuleType !== null && import_typescript56.default.isTypeQueryNode(ngModuleType)) {
|
|
39323
|
+
ngModuleExpression = entityNameToValue(ngModuleType.exprName);
|
|
39324
|
+
} else if (ngModuleType !== null) {
|
|
39325
|
+
ngModuleExpression = typeNodeToValueExpr(ngModuleType);
|
|
39326
|
+
}
|
|
39316
39327
|
if (ngModuleExpression) {
|
|
39317
39328
|
return ngModuleExpression;
|
|
39318
39329
|
}
|