@absolutejs/absolute 0.19.0-beta.922 → 0.19.0-beta.924

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
@@ -18691,6 +18691,8 @@ var fail = (reason, detail, location) => ({
18691
18691
  return false;
18692
18692
  if (!arraysEqual(a.topLevelImports, b2.topLevelImports))
18693
18693
  return false;
18694
+ if (!arraysEqual(a.propertyFieldNames, b2.propertyFieldNames))
18695
+ return false;
18694
18696
  if (a.encapsulation !== b2.encapsulation)
18695
18697
  return false;
18696
18698
  if (a.changeDetection !== b2.changeDetection)
@@ -19012,30 +19014,36 @@ var fail = (reason, detail, location) => ({
19012
19014
  }, extractInputsAndOutputs = (cls, compiler) => {
19013
19015
  const inputs = {};
19014
19016
  const outputs = {};
19017
+ let hasDecoratorIO = false;
19018
+ let hasSignalIO = false;
19015
19019
  for (const member of cls.members) {
19016
19020
  if (!ts7.isPropertyDeclaration(member))
19017
19021
  continue;
19018
19022
  const decoratorIn = extractDecoratorInput(member, compiler);
19019
19023
  if (decoratorIn) {
19020
19024
  inputs[decoratorIn.classPropertyName] = decoratorIn.meta;
19025
+ hasDecoratorIO = true;
19021
19026
  continue;
19022
19027
  }
19023
19028
  const signalIn = extractSignalInput(member, compiler);
19024
19029
  if (signalIn) {
19025
19030
  inputs[signalIn.classPropertyName] = signalIn.meta;
19031
+ hasSignalIO = true;
19026
19032
  continue;
19027
19033
  }
19028
19034
  const decoratorOut = extractDecoratorOutput(member);
19029
19035
  if (decoratorOut) {
19030
19036
  outputs[decoratorOut.classPropertyName] = decoratorOut.bindingName;
19037
+ hasDecoratorIO = true;
19031
19038
  continue;
19032
19039
  }
19033
19040
  const signalOut = extractSignalOutput(member);
19034
19041
  if (signalOut) {
19035
19042
  outputs[signalOut.classPropertyName] = signalOut.bindingName;
19043
+ hasSignalIO = true;
19036
19044
  }
19037
19045
  }
19038
- return { inputs, outputs };
19046
+ return { inputs, outputs, hasDecoratorIO, hasSignalIO };
19039
19047
  }, ATTR_BINDING_RE, EVENT_BINDING_RE, emptyHost = () => ({
19040
19048
  attributes: {},
19041
19049
  listeners: {},
@@ -19772,6 +19780,19 @@ var fail = (reason, detail, location) => ({
19772
19780
  }
19773
19781
  }
19774
19782
  return sig.sort();
19783
+ }, extractPropertyFieldNames = (cls) => {
19784
+ const names = [];
19785
+ for (const member of cls.members) {
19786
+ if (!ts7.isPropertyDeclaration(member))
19787
+ continue;
19788
+ const name = member.name;
19789
+ if (name === undefined)
19790
+ continue;
19791
+ const text = ts7.isIdentifier(name) ? name.text : ts7.isStringLiteral(name) || ts7.isNoSubstitutionTemplateLiteral(name) ? name.text : name.getText();
19792
+ if (text.length > 0)
19793
+ names.push(text);
19794
+ }
19795
+ return names.sort();
19775
19796
  }, extractTopLevelImports = (sourceFile) => {
19776
19797
  const names = new Set;
19777
19798
  for (const stmt of sourceFile.statements) {
@@ -19804,7 +19825,20 @@ var fail = (reason, detail, location) => ({
19804
19825
  if (!ts7.isConstructorDeclaration(member))
19805
19826
  continue;
19806
19827
  for (const param of member.parameters) {
19807
- ctorParamTypes.push(param.type ? param.type.getText() : "");
19828
+ const typeText = param.type ? param.type.getText() : "";
19829
+ const decorators = ts7.getDecorators(param) ?? [];
19830
+ const decoratorSig = decorators.length === 0 ? "" : decorators.map((d2) => {
19831
+ const expr = d2.expression;
19832
+ if (ts7.isCallExpression(expr) && ts7.isIdentifier(expr.expression)) {
19833
+ const args = expr.arguments.map((a) => a.getText()).join(",");
19834
+ return `@${expr.expression.text}(${args})`;
19835
+ }
19836
+ if (ts7.isIdentifier(expr)) {
19837
+ return `@${expr.text}`;
19838
+ }
19839
+ return "@<unknown>";
19840
+ }).join("");
19841
+ ctorParamTypes.push(`${typeText}${decoratorSig}`);
19808
19842
  }
19809
19843
  break;
19810
19844
  }
@@ -19814,6 +19848,7 @@ var fail = (reason, detail, location) => ({
19814
19848
  const memberDecoratorSig = extractMemberDecoratorSig(cls);
19815
19849
  const providerImportSig = extractProviderImportSig(decoratorMeta.importsExpr, sourceFile, componentDir);
19816
19850
  const topLevelImports = extractTopLevelImports(sourceFile);
19851
+ const propertyFieldNames = extractPropertyFieldNames(cls);
19817
19852
  return {
19818
19853
  arrowFieldSig,
19819
19854
  changeDetection: decoratorMeta.changeDetection,
@@ -19825,6 +19860,7 @@ var fail = (reason, detail, location) => ({
19825
19860
  inputs: inputNames,
19826
19861
  memberDecoratorSig,
19827
19862
  outputs: outputNames,
19863
+ propertyFieldNames,
19828
19864
  providerImportSig,
19829
19865
  selector: decoratorMeta.selector,
19830
19866
  standalone: decoratorMeta.standalone,
@@ -20057,7 +20093,12 @@ ${block}
20057
20093
  if (!className_)
20058
20094
  return fail("class-not-found", "anonymous class");
20059
20095
  const wrappedClass = new compiler.WrappedNodeExpr(className_);
20060
- const { inputs, outputs } = extractInputsAndOutputs(classNode, compiler);
20096
+ const {
20097
+ inputs,
20098
+ outputs,
20099
+ hasDecoratorIO,
20100
+ hasSignalIO
20101
+ } = extractInputsAndOutputs(classNode, compiler);
20061
20102
  const projectRelPath = relative13(projectRoot, componentFilePath).replace(/\\/g, "/");
20062
20103
  const fingerprintId = encodeURIComponent(`${projectRelPath}@${className}`);
20063
20104
  const currentFingerprint = extractFingerprint(classNode, className, decoratorMeta, inputs, outputs, sourceFile, componentDir);
@@ -20095,7 +20136,7 @@ ${block}
20095
20136
  exportAs: advancedMetadata.exportAs,
20096
20137
  providers: advancedMetadata.providers,
20097
20138
  isStandalone: decoratorMeta.standalone,
20098
- isSignal: false,
20139
+ 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),
20099
20140
  hostDirectives: advancedMetadata.hostDirectives,
20100
20141
  template: {
20101
20142
  nodes: parsed.nodes,
@@ -31553,5 +31594,5 @@ export {
31553
31594
  ANGULAR_INIT_TIMEOUT_MS
31554
31595
  };
31555
31596
 
31556
- //# debugId=FD896F37628C9A1164756E2164756E21
31597
+ //# debugId=F92C1416B50F9B9A64756E2164756E21
31557
31598
  //# sourceMappingURL=index.js.map