@angular/core 16.0.2 → 16.1.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/src/compiler/compiler_facade_interface.mjs +1 -1
- package/esm2022/src/linker/template_ref.mjs +6 -3
- package/esm2022/src/metadata/directives.mjs +1 -1
- package/esm2022/src/render3/component.mjs +4 -1
- package/esm2022/src/render3/component_ref.mjs +14 -3
- package/esm2022/src/render3/definition.mjs +4 -1
- package/esm2022/src/render3/di.mjs +2 -2
- package/esm2022/src/render3/hooks.mjs +3 -3
- package/esm2022/src/render3/instructions/change_detection.mjs +37 -53
- package/esm2022/src/render3/instructions/shared.mjs +9 -2
- package/esm2022/src/render3/interfaces/definition.mjs +1 -1
- package/esm2022/src/render3/interfaces/public_definitions.mjs +1 -1
- package/esm2022/src/render3/interfaces/view.mjs +1 -1
- package/esm2022/src/render3/jit/directive.mjs +2 -1
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +73 -61
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +69 -61
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +19 -6
- package/package.json +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/ng-generate/standalone-migration/bundle.js +208 -59
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
|
@@ -7347,11 +7347,14 @@ var OpKind;
|
|
|
7347
7347
|
OpKind2[OpKind2["Element"] = 4] = "Element";
|
|
7348
7348
|
OpKind2[OpKind2["Template"] = 5] = "Template";
|
|
7349
7349
|
OpKind2[OpKind2["ElementEnd"] = 6] = "ElementEnd";
|
|
7350
|
-
OpKind2[OpKind2["
|
|
7351
|
-
OpKind2[OpKind2["
|
|
7352
|
-
OpKind2[OpKind2["
|
|
7353
|
-
OpKind2[OpKind2["
|
|
7354
|
-
OpKind2[OpKind2["
|
|
7350
|
+
OpKind2[OpKind2["ContainerStart"] = 7] = "ContainerStart";
|
|
7351
|
+
OpKind2[OpKind2["Container"] = 8] = "Container";
|
|
7352
|
+
OpKind2[OpKind2["ContainerEnd"] = 9] = "ContainerEnd";
|
|
7353
|
+
OpKind2[OpKind2["Text"] = 10] = "Text";
|
|
7354
|
+
OpKind2[OpKind2["Listener"] = 11] = "Listener";
|
|
7355
|
+
OpKind2[OpKind2["InterpolateText"] = 12] = "InterpolateText";
|
|
7356
|
+
OpKind2[OpKind2["Property"] = 13] = "Property";
|
|
7357
|
+
OpKind2[OpKind2["Advance"] = 14] = "Advance";
|
|
7355
7358
|
})(OpKind || (OpKind = {}));
|
|
7356
7359
|
var ExpressionKind;
|
|
7357
7360
|
(function(ExpressionKind2) {
|
|
@@ -7604,6 +7607,9 @@ function transformExpressionsInOp(op, transform, flags) {
|
|
|
7604
7607
|
case OpKind.Element:
|
|
7605
7608
|
case OpKind.ElementStart:
|
|
7606
7609
|
case OpKind.ElementEnd:
|
|
7610
|
+
case OpKind.Container:
|
|
7611
|
+
case OpKind.ContainerStart:
|
|
7612
|
+
case OpKind.ContainerEnd:
|
|
7607
7613
|
case OpKind.Template:
|
|
7608
7614
|
case OpKind.Text:
|
|
7609
7615
|
case OpKind.Advance:
|
|
@@ -7621,6 +7627,9 @@ function transformExpressionsInExpression(expr, transform, flags) {
|
|
|
7621
7627
|
expr.rhs = transformExpressionsInExpression(expr.rhs, transform, flags);
|
|
7622
7628
|
} else if (expr instanceof ReadPropExpr) {
|
|
7623
7629
|
expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags);
|
|
7630
|
+
} else if (expr instanceof ReadKeyExpr) {
|
|
7631
|
+
expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags);
|
|
7632
|
+
expr.index = transformExpressionsInExpression(expr.index, transform, flags);
|
|
7624
7633
|
} else if (expr instanceof InvokeFunctionExpr) {
|
|
7625
7634
|
expr.fn = transformExpressionsInExpression(expr.fn, transform, flags);
|
|
7626
7635
|
for (let i = 0; i < expr.args.length; i++) {
|
|
@@ -7938,11 +7947,20 @@ function serializeAttributes({ attributes, bindings, classes, i18n, projectAs, s
|
|
|
7938
7947
|
}
|
|
7939
7948
|
|
|
7940
7949
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/empty_elements.mjs
|
|
7950
|
+
var REPLACEMENTS = /* @__PURE__ */ new Map([
|
|
7951
|
+
[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]],
|
|
7952
|
+
[OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]]
|
|
7953
|
+
]);
|
|
7941
7954
|
function phaseEmptyElements(cpl) {
|
|
7942
7955
|
for (const [_, view] of cpl.views) {
|
|
7943
7956
|
for (const op of view.create) {
|
|
7944
|
-
|
|
7945
|
-
|
|
7957
|
+
const opReplacements = REPLACEMENTS.get(op.kind);
|
|
7958
|
+
if (opReplacements === void 0) {
|
|
7959
|
+
continue;
|
|
7960
|
+
}
|
|
7961
|
+
const [startKind, mergedKind] = opReplacements;
|
|
7962
|
+
if (op.prev !== null && op.prev.kind === startKind) {
|
|
7963
|
+
op.prev.kind = mergedKind;
|
|
7946
7964
|
OpList.remove(op);
|
|
7947
7965
|
}
|
|
7948
7966
|
}
|
|
@@ -7983,16 +8001,16 @@ function phaseGenerateAdvance(cpl) {
|
|
|
7983
8001
|
|
|
7984
8002
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/instruction.mjs
|
|
7985
8003
|
function element(slot, tag, constIndex, localRefIndex) {
|
|
7986
|
-
return
|
|
8004
|
+
return elementOrContainerBase(Identifiers.element, slot, tag, constIndex, localRefIndex);
|
|
7987
8005
|
}
|
|
7988
8006
|
function elementStart(slot, tag, constIndex, localRefIndex) {
|
|
7989
|
-
return
|
|
8007
|
+
return elementOrContainerBase(Identifiers.elementStart, slot, tag, constIndex, localRefIndex);
|
|
7990
8008
|
}
|
|
7991
|
-
function
|
|
7992
|
-
const args = [
|
|
7993
|
-
|
|
7994
|
-
literal(tag)
|
|
7995
|
-
|
|
8009
|
+
function elementOrContainerBase(instruction, slot, tag, constIndex, localRefIndex) {
|
|
8010
|
+
const args = [literal(slot)];
|
|
8011
|
+
if (tag !== null) {
|
|
8012
|
+
args.push(literal(tag));
|
|
8013
|
+
}
|
|
7996
8014
|
if (localRefIndex !== null) {
|
|
7997
8015
|
args.push(
|
|
7998
8016
|
literal(constIndex),
|
|
@@ -8006,6 +8024,15 @@ function elementStartBase(instruction, slot, tag, constIndex, localRefIndex) {
|
|
|
8006
8024
|
function elementEnd() {
|
|
8007
8025
|
return call(Identifiers.elementEnd, []);
|
|
8008
8026
|
}
|
|
8027
|
+
function elementContainerStart(slot, constIndex, localRefIndex) {
|
|
8028
|
+
return elementOrContainerBase(Identifiers.elementContainerStart, slot, null, constIndex, localRefIndex);
|
|
8029
|
+
}
|
|
8030
|
+
function elementContainer(slot, constIndex, localRefIndex) {
|
|
8031
|
+
return elementOrContainerBase(Identifiers.elementContainer, slot, null, constIndex, localRefIndex);
|
|
8032
|
+
}
|
|
8033
|
+
function elementContainerEnd() {
|
|
8034
|
+
return call(Identifiers.elementContainerEnd, []);
|
|
8035
|
+
}
|
|
8009
8036
|
function template(slot, templateFnRef, decls, vars, tag, constIndex) {
|
|
8010
8037
|
return call(Identifiers.templateCreate, [
|
|
8011
8038
|
literal(slot),
|
|
@@ -8129,6 +8156,15 @@ function reifyCreateOperations(view, ops) {
|
|
|
8129
8156
|
case OpKind.ElementEnd:
|
|
8130
8157
|
OpList.replace(op, elementEnd());
|
|
8131
8158
|
break;
|
|
8159
|
+
case OpKind.ContainerStart:
|
|
8160
|
+
OpList.replace(op, elementContainerStart(op.slot, op.attributes, op.localRefs));
|
|
8161
|
+
break;
|
|
8162
|
+
case OpKind.Container:
|
|
8163
|
+
OpList.replace(op, elementContainer(op.slot, op.attributes, op.localRefs));
|
|
8164
|
+
break;
|
|
8165
|
+
case OpKind.ContainerEnd:
|
|
8166
|
+
OpList.replace(op, elementContainerEnd());
|
|
8167
|
+
break;
|
|
8132
8168
|
case OpKind.Template:
|
|
8133
8169
|
const childView = view.tpl.views.get(op.xref);
|
|
8134
8170
|
OpList.replace(op, template(op.slot, variable(childView.fnName), childView.decls, childView.vars, op.tag, op.attributes));
|
|
@@ -8406,25 +8442,15 @@ function phaseGenerateVariables(cpl) {
|
|
|
8406
8442
|
}
|
|
8407
8443
|
function recursivelyProcessView(view, parentScope) {
|
|
8408
8444
|
const scope = getScopeForView(view, parentScope);
|
|
8409
|
-
view.
|
|
8410
|
-
|
|
8411
|
-
]);
|
|
8445
|
+
if (view.parent !== null) {
|
|
8446
|
+
}
|
|
8412
8447
|
for (const op of view.create) {
|
|
8413
8448
|
switch (op.kind) {
|
|
8414
8449
|
case OpKind.Template:
|
|
8415
8450
|
recursivelyProcessView(view.tpl.views.get(op.xref), scope);
|
|
8416
8451
|
break;
|
|
8417
8452
|
case OpKind.Listener:
|
|
8418
|
-
|
|
8419
|
-
createVariableOp(view.tpl.allocateXrefId(), scope.viewContextVariable, new RestoreViewExpr(view.xref)),
|
|
8420
|
-
...generateVariablesInScopeForView(view, scope)
|
|
8421
|
-
];
|
|
8422
|
-
op.handlerOps.prepend(preambleOps2);
|
|
8423
|
-
for (const handlerOp of op.handlerOps) {
|
|
8424
|
-
if (handlerOp.kind === OpKind.Statement && handlerOp.statement instanceof ReturnStatement) {
|
|
8425
|
-
handlerOp.statement.value = new ResetViewExpr(handlerOp.statement.value);
|
|
8426
|
-
}
|
|
8427
|
-
}
|
|
8453
|
+
op.handlerOps.prepend(generateVariablesInScopeForView(view, scope));
|
|
8428
8454
|
break;
|
|
8429
8455
|
}
|
|
8430
8456
|
}
|
|
@@ -8439,11 +8465,6 @@ function getScopeForView(view, parent) {
|
|
|
8439
8465
|
name: null,
|
|
8440
8466
|
view: view.xref
|
|
8441
8467
|
},
|
|
8442
|
-
savedViewVariable: {
|
|
8443
|
-
kind: SemanticVariableKind.SavedView,
|
|
8444
|
-
name: null,
|
|
8445
|
-
view: view.xref
|
|
8446
|
-
},
|
|
8447
8468
|
contextVariables: /* @__PURE__ */ new Map(),
|
|
8448
8469
|
references: [],
|
|
8449
8470
|
parent
|
|
@@ -8790,7 +8811,10 @@ function allowConservativeInlining(decl, target) {
|
|
|
8790
8811
|
var CHAINABLE = /* @__PURE__ */ new Set([
|
|
8791
8812
|
Identifiers.elementStart,
|
|
8792
8813
|
Identifiers.elementEnd,
|
|
8793
|
-
Identifiers.property
|
|
8814
|
+
Identifiers.property,
|
|
8815
|
+
Identifiers.elementContainerStart,
|
|
8816
|
+
Identifiers.elementContainerEnd,
|
|
8817
|
+
Identifiers.elementContainer
|
|
8794
8818
|
]);
|
|
8795
8819
|
function phaseChaining(cpl) {
|
|
8796
8820
|
for (const [_, view] of cpl.views) {
|
|
@@ -8871,13 +8895,63 @@ function mergeNextContextsInOps(ops) {
|
|
|
8871
8895
|
}
|
|
8872
8896
|
}
|
|
8873
8897
|
|
|
8898
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/ng_container.mjs
|
|
8899
|
+
var CONTAINER_TAG = "ng-container";
|
|
8900
|
+
function phaseNgContainer(cpl) {
|
|
8901
|
+
for (const [_, view] of cpl.views) {
|
|
8902
|
+
const updatedElementXrefs = /* @__PURE__ */ new Set();
|
|
8903
|
+
for (const op of view.create) {
|
|
8904
|
+
if (op.kind === OpKind.ElementStart && op.tag === CONTAINER_TAG) {
|
|
8905
|
+
op.kind = OpKind.ContainerStart;
|
|
8906
|
+
updatedElementXrefs.add(op.xref);
|
|
8907
|
+
}
|
|
8908
|
+
if (op.kind === OpKind.ElementEnd && updatedElementXrefs.has(op.xref)) {
|
|
8909
|
+
op.kind = OpKind.ContainerEnd;
|
|
8910
|
+
}
|
|
8911
|
+
}
|
|
8912
|
+
}
|
|
8913
|
+
}
|
|
8914
|
+
|
|
8915
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/phases/save_restore_view.mjs
|
|
8916
|
+
function phaseSaveRestoreView(cpl) {
|
|
8917
|
+
for (const view of cpl.views.values()) {
|
|
8918
|
+
if (view === cpl.root) {
|
|
8919
|
+
continue;
|
|
8920
|
+
}
|
|
8921
|
+
view.create.prepend([
|
|
8922
|
+
createVariableOp(view.tpl.allocateXrefId(), {
|
|
8923
|
+
kind: SemanticVariableKind.SavedView,
|
|
8924
|
+
name: null,
|
|
8925
|
+
view: view.xref
|
|
8926
|
+
}, new GetCurrentViewExpr())
|
|
8927
|
+
]);
|
|
8928
|
+
for (const op of view.create) {
|
|
8929
|
+
if (op.kind !== OpKind.Listener) {
|
|
8930
|
+
continue;
|
|
8931
|
+
}
|
|
8932
|
+
op.handlerOps.prepend([
|
|
8933
|
+
createVariableOp(view.tpl.allocateXrefId(), {
|
|
8934
|
+
kind: SemanticVariableKind.Context,
|
|
8935
|
+
name: null,
|
|
8936
|
+
view: view.xref
|
|
8937
|
+
}, new RestoreViewExpr(view.xref))
|
|
8938
|
+
]);
|
|
8939
|
+
for (const handlerOp of op.handlerOps) {
|
|
8940
|
+
if (handlerOp.kind === OpKind.Statement && handlerOp.statement instanceof ReturnStatement) {
|
|
8941
|
+
handlerOp.statement.value = new ResetViewExpr(handlerOp.statement.value);
|
|
8942
|
+
}
|
|
8943
|
+
}
|
|
8944
|
+
}
|
|
8945
|
+
}
|
|
8946
|
+
}
|
|
8947
|
+
|
|
8874
8948
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/emit.mjs
|
|
8875
8949
|
function transformTemplate(cpl) {
|
|
8876
8950
|
phaseGenerateVariables(cpl);
|
|
8951
|
+
phaseSaveRestoreView(cpl);
|
|
8877
8952
|
phaseResolveNames(cpl);
|
|
8878
8953
|
phaseResolveContexts(cpl);
|
|
8879
8954
|
phaseLocalRefs(cpl);
|
|
8880
|
-
phaseEmptyElements(cpl);
|
|
8881
8955
|
phaseConstCollection(cpl);
|
|
8882
8956
|
phaseSlotAllocation(cpl);
|
|
8883
8957
|
phaseVarCounting(cpl);
|
|
@@ -8885,6 +8959,8 @@ function transformTemplate(cpl) {
|
|
|
8885
8959
|
phaseNaming(cpl);
|
|
8886
8960
|
phaseVariableOptimization(cpl, { conservative: true });
|
|
8887
8961
|
phaseMergeNextContext(cpl);
|
|
8962
|
+
phaseNgContainer(cpl);
|
|
8963
|
+
phaseEmptyElements(cpl);
|
|
8888
8964
|
phaseReify(cpl);
|
|
8889
8965
|
phaseChaining(cpl);
|
|
8890
8966
|
}
|
|
@@ -9003,6 +9079,27 @@ var ViewCompilation = class {
|
|
|
9003
9079
|
}
|
|
9004
9080
|
};
|
|
9005
9081
|
|
|
9082
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/conversion.mjs
|
|
9083
|
+
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
9084
|
+
["&&", BinaryOperator.And],
|
|
9085
|
+
[">", BinaryOperator.Bigger],
|
|
9086
|
+
[">=", BinaryOperator.BiggerEquals],
|
|
9087
|
+
["&", BinaryOperator.BitwiseAnd],
|
|
9088
|
+
["/", BinaryOperator.Divide],
|
|
9089
|
+
["==", BinaryOperator.Equals],
|
|
9090
|
+
["===", BinaryOperator.Identical],
|
|
9091
|
+
["<", BinaryOperator.Lower],
|
|
9092
|
+
["<=", BinaryOperator.LowerEquals],
|
|
9093
|
+
["-", BinaryOperator.Minus],
|
|
9094
|
+
["%", BinaryOperator.Modulo],
|
|
9095
|
+
["*", BinaryOperator.Multiply],
|
|
9096
|
+
["!=", BinaryOperator.NotEquals],
|
|
9097
|
+
["!==", BinaryOperator.NotIdentical],
|
|
9098
|
+
["??", BinaryOperator.NullishCoalesce],
|
|
9099
|
+
["||", BinaryOperator.Or],
|
|
9100
|
+
["+", BinaryOperator.Plus]
|
|
9101
|
+
]);
|
|
9102
|
+
|
|
9006
9103
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/template/pipeline/src/ingest.mjs
|
|
9007
9104
|
function ingest(componentName, template2) {
|
|
9008
9105
|
const cpl = new ComponentCompilation(componentName);
|
|
@@ -9083,8 +9180,18 @@ function convertAst(ast, cpl) {
|
|
|
9083
9180
|
}
|
|
9084
9181
|
} else if (ast instanceof LiteralPrimitive) {
|
|
9085
9182
|
return literal(ast.value);
|
|
9183
|
+
} else if (ast instanceof Binary) {
|
|
9184
|
+
const operator = BINARY_OPERATORS.get(ast.operation);
|
|
9185
|
+
if (operator === void 0) {
|
|
9186
|
+
throw new Error(`AssertionError: unknown binary operator ${ast.operation}`);
|
|
9187
|
+
}
|
|
9188
|
+
return new BinaryOperatorExpr(operator, convertAst(ast.left, cpl), convertAst(ast.right, cpl));
|
|
9086
9189
|
} else if (ast instanceof ThisReceiver) {
|
|
9087
9190
|
return new ContextExpr(cpl.root.xref);
|
|
9191
|
+
} else if (ast instanceof KeyedRead) {
|
|
9192
|
+
return new ReadKeyExpr(convertAst(ast.receiver, cpl), convertAst(ast.key, cpl));
|
|
9193
|
+
} else if (ast instanceof Chain) {
|
|
9194
|
+
throw new Error(`AssertionError: Chain in unknown context`);
|
|
9088
9195
|
} else {
|
|
9089
9196
|
throw new Error(`Unhandled expression type: ${ast.constructor.name}`);
|
|
9090
9197
|
}
|
|
@@ -9108,11 +9215,11 @@ function ingestAttributes(op, element2) {
|
|
|
9108
9215
|
}
|
|
9109
9216
|
function ingestBindings(view, op, element2) {
|
|
9110
9217
|
if (element2 instanceof Template) {
|
|
9111
|
-
for (const
|
|
9112
|
-
if (
|
|
9113
|
-
|
|
9114
|
-
view.update.push(createPropertyOp(op.xref, attr.name, convertAst(attr.value, view.tpl)));
|
|
9218
|
+
for (const input of [...element2.templateAttrs, ...element2.inputs]) {
|
|
9219
|
+
if (!(input instanceof BoundAttribute)) {
|
|
9220
|
+
continue;
|
|
9115
9221
|
}
|
|
9222
|
+
view.update.push(createPropertyOp(op.xref, input.name, convertAst(input.value, view.tpl)));
|
|
9116
9223
|
}
|
|
9117
9224
|
} else {
|
|
9118
9225
|
for (const input of element2.inputs) {
|
|
@@ -9120,7 +9227,26 @@ function ingestBindings(view, op, element2) {
|
|
|
9120
9227
|
}
|
|
9121
9228
|
for (const output of element2.outputs) {
|
|
9122
9229
|
const listenerOp = createListenerOp(op.xref, output.name, op.tag);
|
|
9123
|
-
|
|
9230
|
+
let inputExprs;
|
|
9231
|
+
let handler = output.handler;
|
|
9232
|
+
if (handler instanceof ASTWithSource) {
|
|
9233
|
+
handler = handler.ast;
|
|
9234
|
+
}
|
|
9235
|
+
if (handler instanceof Chain) {
|
|
9236
|
+
inputExprs = handler.expressions;
|
|
9237
|
+
} else {
|
|
9238
|
+
inputExprs = [handler];
|
|
9239
|
+
}
|
|
9240
|
+
if (inputExprs.length === 0) {
|
|
9241
|
+
throw new Error("Expected listener to have non-empty expression list.");
|
|
9242
|
+
}
|
|
9243
|
+
const expressions = inputExprs.map((expr) => convertAst(expr, view.tpl));
|
|
9244
|
+
const returnExpr = expressions.pop();
|
|
9245
|
+
for (const expr of expressions) {
|
|
9246
|
+
const stmtOp = createStatementOp(new ExpressionStatement(expr));
|
|
9247
|
+
listenerOp.handlerOps.push(stmtOp);
|
|
9248
|
+
}
|
|
9249
|
+
listenerOp.handlerOps.push(createStatementOp(new ReturnStatement(returnExpr)));
|
|
9124
9250
|
view.create.push(listenerOp);
|
|
9125
9251
|
}
|
|
9126
9252
|
}
|
|
@@ -17520,6 +17646,9 @@ function baseDirectiveFields(meta, constantPool, bindingParser) {
|
|
|
17520
17646
|
if (meta.isStandalone) {
|
|
17521
17647
|
definitionMap.set("standalone", literal(true));
|
|
17522
17648
|
}
|
|
17649
|
+
if (meta.isSignal) {
|
|
17650
|
+
definitionMap.set("signals", literal(true));
|
|
17651
|
+
}
|
|
17523
17652
|
return definitionMap;
|
|
17524
17653
|
}
|
|
17525
17654
|
function addFeatures(definitionMap, meta) {
|
|
@@ -17645,6 +17774,7 @@ function createComponentType(meta) {
|
|
|
17645
17774
|
typeParams.push(stringArrayAsType(meta.template.ngContentSelectors));
|
|
17646
17775
|
typeParams.push(expressionType(literal(meta.isStandalone)));
|
|
17647
17776
|
typeParams.push(createHostDirectivesType(meta));
|
|
17777
|
+
typeParams.push(expressionType(literal(meta.isSignal)));
|
|
17648
17778
|
return expressionType(importExpr(Identifiers.ComponentDeclaration, typeParams));
|
|
17649
17779
|
}
|
|
17650
17780
|
function compileDeclarationList(list, mode) {
|
|
@@ -17744,6 +17874,7 @@ function createDirectiveType(meta) {
|
|
|
17744
17874
|
typeParams.push(NONE_TYPE);
|
|
17745
17875
|
typeParams.push(expressionType(literal(meta.isStandalone)));
|
|
17746
17876
|
typeParams.push(createHostDirectivesType(meta));
|
|
17877
|
+
typeParams.push(expressionType(literal(meta.isSignal)));
|
|
17747
17878
|
return expressionType(importExpr(Identifiers.DirectiveDeclaration, typeParams));
|
|
17748
17879
|
}
|
|
17749
17880
|
function createViewQueriesFunction(viewQueries, constantPool, name) {
|
|
@@ -18276,7 +18407,7 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
18276
18407
|
});
|
|
18277
18408
|
}
|
|
18278
18409
|
function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
|
|
18279
|
-
var _a2, _b, _c, _d, _e, _f, _g, _h;
|
|
18410
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
18280
18411
|
return {
|
|
18281
18412
|
name: declaration.type.name,
|
|
18282
18413
|
type: wrapReference(declaration.type),
|
|
@@ -18295,6 +18426,7 @@ function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
|
|
|
18295
18426
|
typeArgumentCount: 0,
|
|
18296
18427
|
fullInheritance: false,
|
|
18297
18428
|
isStandalone: (_h = declaration.isStandalone) != null ? _h : false,
|
|
18429
|
+
isSignal: (_i = declaration.isSignal) != null ? _i : false,
|
|
18298
18430
|
hostDirectives: convertHostDirectivesToMetadata(declaration)
|
|
18299
18431
|
};
|
|
18300
18432
|
}
|
|
@@ -18543,7 +18675,7 @@ function publishFacade(global2) {
|
|
|
18543
18675
|
}
|
|
18544
18676
|
|
|
18545
18677
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
18546
|
-
var VERSION2 = new Version("16.0.
|
|
18678
|
+
var VERSION2 = new Version("16.1.0-next.1");
|
|
18547
18679
|
|
|
18548
18680
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
18549
18681
|
var _I18N_ATTR = "i18n";
|
|
@@ -19862,7 +19994,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION = "12.0.0";
|
|
|
19862
19994
|
function compileDeclareClassMetadata(metadata) {
|
|
19863
19995
|
const definitionMap = new DefinitionMap();
|
|
19864
19996
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
19865
|
-
definitionMap.set("version", literal("16.0.
|
|
19997
|
+
definitionMap.set("version", literal("16.1.0-next.1"));
|
|
19866
19998
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
19867
19999
|
definitionMap.set("type", metadata.type);
|
|
19868
20000
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -19931,11 +20063,14 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
19931
20063
|
var _a2;
|
|
19932
20064
|
const definitionMap = new DefinitionMap();
|
|
19933
20065
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION2));
|
|
19934
|
-
definitionMap.set("version", literal("16.0.
|
|
20066
|
+
definitionMap.set("version", literal("16.1.0-next.1"));
|
|
19935
20067
|
definitionMap.set("type", meta.type.value);
|
|
19936
20068
|
if (meta.isStandalone) {
|
|
19937
20069
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
19938
20070
|
}
|
|
20071
|
+
if (meta.isSignal) {
|
|
20072
|
+
definitionMap.set("isSignal", literal(meta.isSignal));
|
|
20073
|
+
}
|
|
19939
20074
|
if (meta.selector !== null) {
|
|
19940
20075
|
definitionMap.set("selector", literal(meta.selector));
|
|
19941
20076
|
}
|
|
@@ -20113,7 +20248,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION3 = "12.0.0";
|
|
|
20113
20248
|
function compileDeclareFactoryFunction(meta) {
|
|
20114
20249
|
const definitionMap = new DefinitionMap();
|
|
20115
20250
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION3));
|
|
20116
|
-
definitionMap.set("version", literal("16.0.
|
|
20251
|
+
definitionMap.set("version", literal("16.1.0-next.1"));
|
|
20117
20252
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
20118
20253
|
definitionMap.set("type", meta.type.value);
|
|
20119
20254
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -20136,7 +20271,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
20136
20271
|
function createInjectableDefinitionMap(meta) {
|
|
20137
20272
|
const definitionMap = new DefinitionMap();
|
|
20138
20273
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION4));
|
|
20139
|
-
definitionMap.set("version", literal("16.0.
|
|
20274
|
+
definitionMap.set("version", literal("16.1.0-next.1"));
|
|
20140
20275
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
20141
20276
|
definitionMap.set("type", meta.type.value);
|
|
20142
20277
|
if (meta.providedIn !== void 0) {
|
|
@@ -20174,7 +20309,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
20174
20309
|
function createInjectorDefinitionMap(meta) {
|
|
20175
20310
|
const definitionMap = new DefinitionMap();
|
|
20176
20311
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION5));
|
|
20177
|
-
definitionMap.set("version", literal("16.0.
|
|
20312
|
+
definitionMap.set("version", literal("16.1.0-next.1"));
|
|
20178
20313
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
20179
20314
|
definitionMap.set("type", meta.type.value);
|
|
20180
20315
|
definitionMap.set("providers", meta.providers);
|
|
@@ -20195,7 +20330,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
|
|
|
20195
20330
|
function createNgModuleDefinitionMap(meta) {
|
|
20196
20331
|
const definitionMap = new DefinitionMap();
|
|
20197
20332
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION6));
|
|
20198
|
-
definitionMap.set("version", literal("16.0.
|
|
20333
|
+
definitionMap.set("version", literal("16.1.0-next.1"));
|
|
20199
20334
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
20200
20335
|
definitionMap.set("type", meta.type.value);
|
|
20201
20336
|
if (meta.bootstrap.length > 0) {
|
|
@@ -20230,7 +20365,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
20230
20365
|
function createPipeDefinitionMap(meta) {
|
|
20231
20366
|
const definitionMap = new DefinitionMap();
|
|
20232
20367
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION7));
|
|
20233
|
-
definitionMap.set("version", literal("16.0.
|
|
20368
|
+
definitionMap.set("version", literal("16.1.0-next.1"));
|
|
20234
20369
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
20235
20370
|
definitionMap.set("type", meta.type.value);
|
|
20236
20371
|
if (meta.isStandalone) {
|
|
@@ -20247,7 +20382,7 @@ function createPipeDefinitionMap(meta) {
|
|
|
20247
20382
|
publishFacade(_global);
|
|
20248
20383
|
|
|
20249
20384
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version.mjs
|
|
20250
|
-
var VERSION3 = new Version("16.0.
|
|
20385
|
+
var VERSION3 = new Version("16.1.0-next.1");
|
|
20251
20386
|
|
|
20252
20387
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
20253
20388
|
var EmitFlags;
|
|
@@ -20357,7 +20492,7 @@ function compareVersions(v1, v2) {
|
|
|
20357
20492
|
|
|
20358
20493
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
20359
20494
|
var MIN_TS_VERSION = "4.9.3";
|
|
20360
|
-
var MAX_TS_VERSION = "5.
|
|
20495
|
+
var MAX_TS_VERSION = "5.2.0";
|
|
20361
20496
|
var tsVersion = import_typescript3.default.version;
|
|
20362
20497
|
function checkVersion(version, minVersion, maxVersion) {
|
|
20363
20498
|
if (compareVersions(version, minVersion) < 0 || compareVersions(version, maxVersion) >= 0) {
|
|
@@ -22476,7 +22611,7 @@ var DtsMetadataReader = class {
|
|
|
22476
22611
|
};
|
|
22477
22612
|
}
|
|
22478
22613
|
getDirectiveMetadata(ref) {
|
|
22479
|
-
var _a2;
|
|
22614
|
+
var _a2, _b;
|
|
22480
22615
|
const clazz = ref.node;
|
|
22481
22616
|
const def = this.reflector.getMembersOfClass(clazz).find((field) => field.isStatic && (field.name === "\u0275cmp" || field.name === "\u0275dir"));
|
|
22482
22617
|
if (def === void 0) {
|
|
@@ -22493,6 +22628,7 @@ var DtsMetadataReader = class {
|
|
|
22493
22628
|
const inputs = ClassPropertyMapping.fromMappedObject(readInputsType(def.type.typeArguments[3]));
|
|
22494
22629
|
const outputs = ClassPropertyMapping.fromMappedObject(readMapType(def.type.typeArguments[4], readStringType));
|
|
22495
22630
|
const hostDirectives = def.type.typeArguments.length > 8 ? readHostDirectivesType(this.checker, def.type.typeArguments[8], ref.bestGuessOwningModule) : null;
|
|
22631
|
+
const isSignal = def.type.typeArguments.length > 9 && ((_b = readBooleanType(def.type.typeArguments[9])) != null ? _b : false);
|
|
22496
22632
|
return __spreadProps(__spreadValues({
|
|
22497
22633
|
kind: MetaKind.Directive,
|
|
22498
22634
|
matchSource: MatchSource.Selector,
|
|
@@ -22511,6 +22647,7 @@ var DtsMetadataReader = class {
|
|
|
22511
22647
|
isStructural,
|
|
22512
22648
|
animationTriggerNames: null,
|
|
22513
22649
|
isStandalone,
|
|
22650
|
+
isSignal,
|
|
22514
22651
|
imports: null,
|
|
22515
22652
|
schemas: null,
|
|
22516
22653
|
decorator: null,
|
|
@@ -23220,7 +23357,7 @@ function literalBinaryOp(op) {
|
|
|
23220
23357
|
function referenceBinaryOp(op) {
|
|
23221
23358
|
return { op, literal: false };
|
|
23222
23359
|
}
|
|
23223
|
-
var
|
|
23360
|
+
var BINARY_OPERATORS2 = /* @__PURE__ */ new Map([
|
|
23224
23361
|
[import_typescript25.default.SyntaxKind.PlusToken, literalBinaryOp((a, b) => a + b)],
|
|
23225
23362
|
[import_typescript25.default.SyntaxKind.MinusToken, literalBinaryOp((a, b) => a - b)],
|
|
23226
23363
|
[import_typescript25.default.SyntaxKind.AsteriskToken, literalBinaryOp((a, b) => a * b)],
|
|
@@ -23616,10 +23753,10 @@ var StaticInterpreter = class {
|
|
|
23616
23753
|
}
|
|
23617
23754
|
visitBinaryExpression(node, context) {
|
|
23618
23755
|
const tokenKind = node.operatorToken.kind;
|
|
23619
|
-
if (!
|
|
23756
|
+
if (!BINARY_OPERATORS2.has(tokenKind)) {
|
|
23620
23757
|
return DynamicValue.fromUnsupportedSyntax(node);
|
|
23621
23758
|
}
|
|
23622
|
-
const opRecord =
|
|
23759
|
+
const opRecord = BINARY_OPERATORS2.get(tokenKind);
|
|
23623
23760
|
let lhs, rhs;
|
|
23624
23761
|
if (opRecord.literal) {
|
|
23625
23762
|
lhs = literal2(this.visitExpression(node.left, context), (value) => DynamicValue.fromInvalidExpressionType(node.left, value));
|
|
@@ -25749,7 +25886,7 @@ var UNARY_OPERATORS2 = /* @__PURE__ */ new Map([
|
|
|
25749
25886
|
[UnaryOperator.Minus, "-"],
|
|
25750
25887
|
[UnaryOperator.Plus, "+"]
|
|
25751
25888
|
]);
|
|
25752
|
-
var
|
|
25889
|
+
var BINARY_OPERATORS3 = /* @__PURE__ */ new Map([
|
|
25753
25890
|
[BinaryOperator.And, "&&"],
|
|
25754
25891
|
[BinaryOperator.Bigger, ">"],
|
|
25755
25892
|
[BinaryOperator.BiggerEquals, ">="],
|
|
@@ -25902,10 +26039,10 @@ var ExpressionTranslatorVisitor = class {
|
|
|
25902
26039
|
return this.factory.createFunctionExpression((_a2 = ast.name) != null ? _a2 : null, ast.params.map((param) => param.name), this.factory.createBlock(this.visitStatements(ast.statements, context)));
|
|
25903
26040
|
}
|
|
25904
26041
|
visitBinaryOperatorExpr(ast, context) {
|
|
25905
|
-
if (!
|
|
26042
|
+
if (!BINARY_OPERATORS3.has(ast.operator)) {
|
|
25906
26043
|
throw new Error(`Unknown binary operator: ${BinaryOperator[ast.operator]}`);
|
|
25907
26044
|
}
|
|
25908
|
-
return this.factory.createBinaryExpression(ast.lhs.visitExpression(this, context),
|
|
26045
|
+
return this.factory.createBinaryExpression(ast.lhs.visitExpression(this, context), BINARY_OPERATORS3.get(ast.operator), ast.rhs.visitExpression(this, context));
|
|
25909
26046
|
}
|
|
25910
26047
|
visitReadPropExpr(ast, context) {
|
|
25911
26048
|
return this.factory.createPropertyAccess(ast.receiver.visitExpression(this, context), ast.name);
|
|
@@ -26203,7 +26340,7 @@ var UNARY_OPERATORS3 = {
|
|
|
26203
26340
|
"-": import_typescript41.default.SyntaxKind.MinusToken,
|
|
26204
26341
|
"!": import_typescript41.default.SyntaxKind.ExclamationToken
|
|
26205
26342
|
};
|
|
26206
|
-
var
|
|
26343
|
+
var BINARY_OPERATORS4 = {
|
|
26207
26344
|
"&&": import_typescript41.default.SyntaxKind.AmpersandAmpersandToken,
|
|
26208
26345
|
">": import_typescript41.default.SyntaxKind.GreaterThanToken,
|
|
26209
26346
|
">=": import_typescript41.default.SyntaxKind.GreaterThanEqualsToken,
|
|
@@ -26245,7 +26382,7 @@ var TypeScriptAstFactory = class {
|
|
|
26245
26382
|
return import_typescript41.default.factory.createBinaryExpression(target, import_typescript41.default.SyntaxKind.EqualsToken, value);
|
|
26246
26383
|
}
|
|
26247
26384
|
createBinaryExpression(leftOperand, operator, rightOperand) {
|
|
26248
|
-
return import_typescript41.default.factory.createBinaryExpression(leftOperand,
|
|
26385
|
+
return import_typescript41.default.factory.createBinaryExpression(leftOperand, BINARY_OPERATORS4[operator], rightOperand);
|
|
26249
26386
|
}
|
|
26250
26387
|
createBlock(body) {
|
|
26251
26388
|
return import_typescript41.default.factory.createBlock(body);
|
|
@@ -26918,6 +27055,15 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
|
|
|
26918
27055
|
}
|
|
26919
27056
|
isStandalone = resolved;
|
|
26920
27057
|
}
|
|
27058
|
+
let isSignal = false;
|
|
27059
|
+
if (directive.has("signals")) {
|
|
27060
|
+
const expr = directive.get("signals");
|
|
27061
|
+
const resolved = evaluator.evaluate(expr);
|
|
27062
|
+
if (typeof resolved !== "boolean") {
|
|
27063
|
+
throw createValueHasWrongTypeError(expr, resolved, `signals flag must be a boolean`);
|
|
27064
|
+
}
|
|
27065
|
+
isSignal = resolved;
|
|
27066
|
+
}
|
|
26921
27067
|
const usesInheritance = reflector.hasBaseClass(clazz);
|
|
26922
27068
|
const sourceFile = clazz.getSourceFile();
|
|
26923
27069
|
const type = wrapTypeReference(reflector, clazz);
|
|
@@ -26946,6 +27092,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, refEmi
|
|
|
26946
27092
|
exportAs,
|
|
26947
27093
|
providers,
|
|
26948
27094
|
isStandalone,
|
|
27095
|
+
isSignal,
|
|
26949
27096
|
hostDirectives: (hostDirectives == null ? void 0 : hostDirectives.map((hostDir) => toHostDirectiveMetadata(hostDir, sourceFile, refEmitter))) || null
|
|
26950
27097
|
};
|
|
26951
27098
|
return {
|
|
@@ -27495,6 +27642,7 @@ var DirectiveDecoratorHandler = class {
|
|
|
27495
27642
|
isStructural: analysis.isStructural,
|
|
27496
27643
|
animationTriggerNames: null,
|
|
27497
27644
|
isStandalone: analysis.meta.isStandalone,
|
|
27645
|
+
isSignal: analysis.meta.isSignal,
|
|
27498
27646
|
imports: null,
|
|
27499
27647
|
schemas: null,
|
|
27500
27648
|
decorator: analysis.decorator,
|
|
@@ -28905,6 +29053,7 @@ var ComponentDecoratorHandler = class {
|
|
|
28905
29053
|
isPoisoned: analysis.isPoisoned,
|
|
28906
29054
|
isStructural: false,
|
|
28907
29055
|
isStandalone: analysis.meta.isStandalone,
|
|
29056
|
+
isSignal: analysis.meta.isSignal,
|
|
28908
29057
|
imports: analysis.resolvedImports,
|
|
28909
29058
|
animationTriggerNames: analysis.animationTriggerNames,
|
|
28910
29059
|
schemas: analysis.schemas,
|