@absolutejs/absolute 0.19.0-beta.923 → 0.19.0-beta.925
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/dist/index.js
CHANGED
|
@@ -18839,6 +18839,33 @@ var fail = (reason, detail, location) => ({
|
|
|
18839
18839
|
}
|
|
18840
18840
|
}
|
|
18841
18841
|
return false;
|
|
18842
|
+
}, CONTROL_CREATE_METHOD_NAME = "\u0275ngControlCreate", extractControlCreate = (cls) => {
|
|
18843
|
+
for (const member of cls.members) {
|
|
18844
|
+
if (!ts7.isMethodDeclaration(member))
|
|
18845
|
+
continue;
|
|
18846
|
+
if (member.modifiers?.some((m) => m.kind === ts7.SyntaxKind.StaticKeyword))
|
|
18847
|
+
continue;
|
|
18848
|
+
const name = member.name;
|
|
18849
|
+
if (name === undefined)
|
|
18850
|
+
continue;
|
|
18851
|
+
const nameText = ts7.isIdentifier(name) ? name.text : name.getText();
|
|
18852
|
+
if (nameText !== CONTROL_CREATE_METHOD_NAME)
|
|
18853
|
+
continue;
|
|
18854
|
+
const firstParam = member.parameters[0];
|
|
18855
|
+
if (firstParam === undefined || firstParam.type === undefined || !ts7.isTypeReferenceNode(firstParam.type)) {
|
|
18856
|
+
return { passThroughInput: null };
|
|
18857
|
+
}
|
|
18858
|
+
const typeArgs = firstParam.type.typeArguments;
|
|
18859
|
+
if (typeArgs === undefined || typeArgs.length !== 1) {
|
|
18860
|
+
return { passThroughInput: null };
|
|
18861
|
+
}
|
|
18862
|
+
const arg = typeArgs[0];
|
|
18863
|
+
if (arg === undefined || !ts7.isLiteralTypeNode(arg) || !ts7.isStringLiteral(arg.literal)) {
|
|
18864
|
+
return { passThroughInput: null };
|
|
18865
|
+
}
|
|
18866
|
+
return { passThroughInput: arg.literal.text };
|
|
18867
|
+
}
|
|
18868
|
+
return null;
|
|
18842
18869
|
}, resolveEnumPropertyAccess = (expr, enumName, values) => {
|
|
18843
18870
|
if (!ts7.isPropertyAccessExpression(expr))
|
|
18844
18871
|
return null;
|
|
@@ -19014,30 +19041,36 @@ var fail = (reason, detail, location) => ({
|
|
|
19014
19041
|
}, extractInputsAndOutputs = (cls, compiler) => {
|
|
19015
19042
|
const inputs = {};
|
|
19016
19043
|
const outputs = {};
|
|
19044
|
+
let hasDecoratorIO = false;
|
|
19045
|
+
let hasSignalIO = false;
|
|
19017
19046
|
for (const member of cls.members) {
|
|
19018
19047
|
if (!ts7.isPropertyDeclaration(member))
|
|
19019
19048
|
continue;
|
|
19020
19049
|
const decoratorIn = extractDecoratorInput(member, compiler);
|
|
19021
19050
|
if (decoratorIn) {
|
|
19022
19051
|
inputs[decoratorIn.classPropertyName] = decoratorIn.meta;
|
|
19052
|
+
hasDecoratorIO = true;
|
|
19023
19053
|
continue;
|
|
19024
19054
|
}
|
|
19025
19055
|
const signalIn = extractSignalInput(member, compiler);
|
|
19026
19056
|
if (signalIn) {
|
|
19027
19057
|
inputs[signalIn.classPropertyName] = signalIn.meta;
|
|
19058
|
+
hasSignalIO = true;
|
|
19028
19059
|
continue;
|
|
19029
19060
|
}
|
|
19030
19061
|
const decoratorOut = extractDecoratorOutput(member);
|
|
19031
19062
|
if (decoratorOut) {
|
|
19032
19063
|
outputs[decoratorOut.classPropertyName] = decoratorOut.bindingName;
|
|
19064
|
+
hasDecoratorIO = true;
|
|
19033
19065
|
continue;
|
|
19034
19066
|
}
|
|
19035
19067
|
const signalOut = extractSignalOutput(member);
|
|
19036
19068
|
if (signalOut) {
|
|
19037
19069
|
outputs[signalOut.classPropertyName] = signalOut.bindingName;
|
|
19070
|
+
hasSignalIO = true;
|
|
19038
19071
|
}
|
|
19039
19072
|
}
|
|
19040
|
-
return { inputs, outputs };
|
|
19073
|
+
return { inputs, outputs, hasDecoratorIO, hasSignalIO };
|
|
19041
19074
|
}, ATTR_BINDING_RE, EVENT_BINDING_RE, emptyHost = () => ({
|
|
19042
19075
|
attributes: {},
|
|
19043
19076
|
listeners: {},
|
|
@@ -19819,7 +19852,20 @@ var fail = (reason, detail, location) => ({
|
|
|
19819
19852
|
if (!ts7.isConstructorDeclaration(member))
|
|
19820
19853
|
continue;
|
|
19821
19854
|
for (const param of member.parameters) {
|
|
19822
|
-
|
|
19855
|
+
const typeText = param.type ? param.type.getText() : "";
|
|
19856
|
+
const decorators = ts7.getDecorators(param) ?? [];
|
|
19857
|
+
const decoratorSig = decorators.length === 0 ? "" : decorators.map((d2) => {
|
|
19858
|
+
const expr = d2.expression;
|
|
19859
|
+
if (ts7.isCallExpression(expr) && ts7.isIdentifier(expr.expression)) {
|
|
19860
|
+
const args = expr.arguments.map((a) => a.getText()).join(",");
|
|
19861
|
+
return `@${expr.expression.text}(${args})`;
|
|
19862
|
+
}
|
|
19863
|
+
if (ts7.isIdentifier(expr)) {
|
|
19864
|
+
return `@${expr.text}`;
|
|
19865
|
+
}
|
|
19866
|
+
return "@<unknown>";
|
|
19867
|
+
}).join("");
|
|
19868
|
+
ctorParamTypes.push(`${typeText}${decoratorSig}`);
|
|
19823
19869
|
}
|
|
19824
19870
|
break;
|
|
19825
19871
|
}
|
|
@@ -20074,7 +20120,12 @@ ${block}
|
|
|
20074
20120
|
if (!className_)
|
|
20075
20121
|
return fail("class-not-found", "anonymous class");
|
|
20076
20122
|
const wrappedClass = new compiler.WrappedNodeExpr(className_);
|
|
20077
|
-
const {
|
|
20123
|
+
const {
|
|
20124
|
+
inputs,
|
|
20125
|
+
outputs,
|
|
20126
|
+
hasDecoratorIO,
|
|
20127
|
+
hasSignalIO
|
|
20128
|
+
} = extractInputsAndOutputs(classNode, compiler);
|
|
20078
20129
|
const projectRelPath = relative13(projectRoot, componentFilePath).replace(/\\/g, "/");
|
|
20079
20130
|
const fingerprintId = encodeURIComponent(`${projectRelPath}@${className}`);
|
|
20080
20131
|
const currentFingerprint = extractFingerprint(classNode, className, decoratorMeta, inputs, outputs, sourceFile, componentDir);
|
|
@@ -20108,11 +20159,11 @@ ${block}
|
|
|
20108
20159
|
inputs,
|
|
20109
20160
|
outputs,
|
|
20110
20161
|
usesInheritance: false,
|
|
20111
|
-
controlCreate:
|
|
20162
|
+
controlCreate: extractControlCreate(classNode),
|
|
20112
20163
|
exportAs: advancedMetadata.exportAs,
|
|
20113
20164
|
providers: advancedMetadata.providers,
|
|
20114
20165
|
isStandalone: decoratorMeta.standalone,
|
|
20115
|
-
isSignal:
|
|
20166
|
+
isSignal: (hasSignalIO || advancedMetadata.contentQueries.some((q2) => q2.isSignal) || advancedMetadata.viewQueries.some((q2) => q2.isSignal)) && !hasDecoratorIO && !advancedMetadata.contentQueries.some((q2) => !q2.isSignal) && !advancedMetadata.viewQueries.some((q2) => !q2.isSignal),
|
|
20116
20167
|
hostDirectives: advancedMetadata.hostDirectives,
|
|
20117
20168
|
template: {
|
|
20118
20169
|
nodes: parsed.nodes,
|
|
@@ -31570,5 +31621,5 @@ export {
|
|
|
31570
31621
|
ANGULAR_INIT_TIMEOUT_MS
|
|
31571
31622
|
};
|
|
31572
31623
|
|
|
31573
|
-
//# debugId=
|
|
31624
|
+
//# debugId=C219645E0797323764756E2164756E21
|
|
31574
31625
|
//# sourceMappingURL=index.js.map
|