c2-clinical 1.0.167 → 1.0.169

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.
@@ -67,6 +67,13 @@ class ProcessAnswerFlowTester {
67
67
  ExecFormulaFlowTester_1.default.execute(option.formulaToEnable, allQuestionsAnswereds, attendanceMetActivities) ?? false;
68
68
  });
69
69
  }
70
+ // formulaToAddDataset para graphicData
71
+ if (relationed?.graphicData?.formulaToAddDataset) {
72
+ relationed.graphicData.datasets = [
73
+ ...(relationed.graphicData?.datasets || []),
74
+ ...ExecFormulaFlowTester_1.default.execute(relationed.graphicData.formulaToAddDataset, allQuestionsAnswereds, attendanceMetActivities)
75
+ ];
76
+ }
70
77
  });
71
78
  let questionsRelacionedsAnsweredsRet = [...autoAnswereds];
72
79
  for (const questionRelacionedAnswered of autoAnswereds) {
@@ -14,6 +14,7 @@ class GetAnswerRelationedsFlowItemTester {
14
14
  regex.test(fu.formulaToEnable) ||
15
15
  regex.test(fu.formulaToShow) ||
16
16
  regex.test(fu.formulaToDescription) ||
17
+ regex.test(fu.graphicData?.formulaToAddDataset) ||
17
18
  fu.validations?.some((v) => regex.test(v.formulaToMessage)) ||
18
19
  fu.options?.some((v) => regex.test(v.formulaToEnable)));
19
20
  });
@@ -85,7 +85,7 @@ export interface IFormUnit extends IDefault {
85
85
  ellegibleForComparison: boolean;
86
86
  codeEnableFreeText: string;
87
87
  labelFreeText: string;
88
- graphicData: any;
88
+ graphicData: IGraphicData;
89
89
  requestGraphicData: IRequestGraphicData[];
90
90
  children?: IFormUnit[];
91
91
  lines?: IRow[];
@@ -116,6 +116,11 @@ export interface IQuestionOption {
116
116
  image: string;
117
117
  color: string;
118
118
  }
119
+ export interface IGraphicData {
120
+ [key: string]: any;
121
+ datasets: any[];
122
+ formulaToAddDataset: string;
123
+ }
119
124
  export interface IRequestGraphicData {
120
125
  method: string;
121
126
  url: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-clinical",
3
- "version": "1.0.167",
3
+ "version": "1.0.169",
4
4
  "description": "Biblioteca Typescript para API NodeJS",
5
5
  "repository": "https://github.com/cabralsilva/c2-clinical.git",
6
6
  "author": "Daniel Cabral <cabralconsultoriaemsoftware@gmail.com>",