c2-clinical 1.0.100 → 1.0.103
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.
|
@@ -22,6 +22,13 @@ class BuildTreeFlowItem {
|
|
|
22
22
|
iterate(parent, children) {
|
|
23
23
|
parent.children = children.filter((child) => child.parent._id.toString() === parent._id.toString());
|
|
24
24
|
parent.children.sort((a, b) => a.line - b.line);
|
|
25
|
+
parent.lines = parent.children.reduce((acc, item) => {
|
|
26
|
+
if (!acc[item.line]) {
|
|
27
|
+
acc[item.line] = [];
|
|
28
|
+
}
|
|
29
|
+
acc[item.line].push(item);
|
|
30
|
+
return acc;
|
|
31
|
+
}, {});
|
|
25
32
|
if (parent.children.length > 0) {
|
|
26
33
|
parent.children.forEach((parentPossible) => {
|
|
27
34
|
this.iterate(parentPossible, children);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Schema, Types } from "mongoose";
|
|
2
2
|
import { IDefault } from "../Default";
|
|
3
|
-
import { CategoryFormEnum, TypeAnswerEnum, TypeButtonAction, TypeFormUnitEnum, TypeOutputValidationEnum, TypeTipEnum, TypeUploadFileEnum, TypeValidationEnum } from "../enum";
|
|
3
|
+
import { CategoryFormEnum, TypeAnswerEnum, TypeButtonAction, TypeFormUnitEnum, TypeOutputValidationEnum, TypeTipEnum, TypeUploadFileEnum, TypeValidationEnum, VariantViewEnum } from "../enum";
|
|
4
4
|
import { IForm } from "./Form";
|
|
5
5
|
export interface IModalConfig {
|
|
6
6
|
title: string;
|
|
@@ -53,6 +53,7 @@ export interface IFormUnit extends IDefault {
|
|
|
53
53
|
defaultAnswer: string;
|
|
54
54
|
category: CategoryFormEnum;
|
|
55
55
|
typeButtonAction: TypeButtonAction;
|
|
56
|
+
variantView: VariantViewEnum;
|
|
56
57
|
measurementUnit: string;
|
|
57
58
|
options: IQuestionOption[];
|
|
58
59
|
formulaToAnswer: string;
|
|
@@ -76,6 +77,7 @@ export interface IFormUnit extends IDefault {
|
|
|
76
77
|
graphicData: any;
|
|
77
78
|
requestGraphicData: IRequestGraphicData[];
|
|
78
79
|
children?: IFormUnit[];
|
|
80
|
+
lines?: Record<any, IFormUnit[]>;
|
|
79
81
|
modalConfig?: IModalConfig;
|
|
80
82
|
uploadFileConfig: IUploadFileConfig;
|
|
81
83
|
tips?: ITip[];
|
package/package.json
CHANGED