dynamic-questionnaire-form 1.2.5 → 1.2.7
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/esm/components/ComplianceQuestionarie/NewTaskForm.d.ts +123 -9
- package/dist/esm/components/ComplianceQuestionarie/NewTaskForm.js +9 -6
- package/dist/esm/components/ComplianceQuestionarie/NewTaskForm.js.map +1 -1
- package/dist/esm/components/ComplianceQuestionarie/Questionnaire.d.ts +3 -0
- package/dist/esm/components/ComplianceQuestionarie/Questionnaire.js +1 -1
- package/dist/esm/components/ComplianceQuestionarie/Questionnaire.js.map +1 -1
- package/dist/esm/components/ComplianceQuestionarie/QuestionnaireForm.d.ts +3 -0
- package/dist/esm/components/ComplianceQuestionarie/QuestionnaireForm.js +174 -39
- package/dist/esm/components/ComplianceQuestionarie/QuestionnaireForm.js.map +1 -1
- package/dist/esm/components/Questionnaire/Questionnaire.d.ts +1 -0
- package/dist/esm/components/Questionnaire/Questionnaire.js +13 -1
- package/dist/esm/components/Questionnaire/Questionnaire.js.map +1 -1
- package/dist/esm/components/Questionnaire/QuestionnaireForm.d.ts +1 -0
- package/dist/esm/components/Questionnaire/QuestionnaireForm.js +24 -12
- package/dist/esm/components/Questionnaire/QuestionnaireForm.js.map +1 -1
- package/package.json +1 -1
|
@@ -129,7 +129,7 @@ var QuestionnaireForm = function (props) {
|
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
131
|
var CombinedValues = __assign(__assign({}, props.formInitialvalues), props.reviewValues);
|
|
132
|
-
if (!previousFormValues && _(props.formInitialvalues).differenceWith(CombinedValues, _.isEqual).isEmpty()) {
|
|
132
|
+
if (!props.formValues && !previousFormValues && _(props.formInitialvalues).differenceWith(CombinedValues, _.isEqual).isEmpty()) {
|
|
133
133
|
setPreviousFormValues(_.cloneDeep(props.formValues));
|
|
134
134
|
return;
|
|
135
135
|
}
|
|
@@ -186,6 +186,26 @@ var QuestionnaireForm = function (props) {
|
|
|
186
186
|
setPreviousFormValues(_.cloneDeep(props.formValues));
|
|
187
187
|
}
|
|
188
188
|
}, [props.formValues]);
|
|
189
|
+
var onTextBlur = function (event, questionId, clientQuestionId, type) {
|
|
190
|
+
var _a;
|
|
191
|
+
var _b;
|
|
192
|
+
if (type === void 0) { type = ''; }
|
|
193
|
+
event.preventDefault();
|
|
194
|
+
if (props.formValues["question_" + clientQuestionId] !== undefined ||
|
|
195
|
+
null) {
|
|
196
|
+
var currentQuestion = currentQuestions.find(function (m) { return m.questionId == questionId; });
|
|
197
|
+
if (currentQuestion) {
|
|
198
|
+
// pass the event to parent component
|
|
199
|
+
// const oldAnswer = previousFormValues
|
|
200
|
+
// ? previousFormValues["question_" + clientQuestionId]
|
|
201
|
+
// : null;
|
|
202
|
+
props.saveQuestion((_a = {},
|
|
203
|
+
_a[clientQuestionId] = type === 'checkbox' ? (_b = event.target) === null || _b === void 0 ? void 0 : _b.checked : props.formValues["question_" + clientQuestionId],
|
|
204
|
+
_a));
|
|
205
|
+
}
|
|
206
|
+
setPreviousFormValues(_.cloneDeep(props.formValues));
|
|
207
|
+
}
|
|
208
|
+
};
|
|
189
209
|
var historyModalViewHandler = function () {
|
|
190
210
|
setHistoryModal(!historyModel);
|
|
191
211
|
};
|
|
@@ -622,6 +642,7 @@ var QuestionnaireForm = function (props) {
|
|
|
622
642
|
var addCustomQuestion = function (body) {
|
|
623
643
|
props.addCustomQuestion(body);
|
|
624
644
|
};
|
|
645
|
+
var isValidCategoryToAddQuestions = !!props.isValidCategoryToAddQuestions;
|
|
625
646
|
var removeCustomQuestion = function () {
|
|
626
647
|
props.removeCustomQuestion();
|
|
627
648
|
};
|
|
@@ -663,6 +684,25 @@ var QuestionnaireForm = function (props) {
|
|
|
663
684
|
var cancelRemoveProcess = function (question, value) {
|
|
664
685
|
props.preparenextquestion(question, value, true);
|
|
665
686
|
};
|
|
687
|
+
var isComplianceGroupedQuestion = function (question) { return question.complianceGroupId != null; };
|
|
688
|
+
var shouldShowSingleQuestionRemove = function (question) {
|
|
689
|
+
return !isComplianceGroupedQuestion(question) &&
|
|
690
|
+
question.complianceCategoryStatus &&
|
|
691
|
+
question.clientCustomQuestion === true;
|
|
692
|
+
};
|
|
693
|
+
var getGroupRemoveQuestion = function (question, serialNumber) {
|
|
694
|
+
if (!isComplianceGroupedQuestion(question)) {
|
|
695
|
+
return null;
|
|
696
|
+
}
|
|
697
|
+
var groupedQuestions = currentQuestions.filter(function (m) {
|
|
698
|
+
return m.complianceGroupId == question.complianceGroupId &&
|
|
699
|
+
(serialNumber === undefined || m.serialNumber == serialNumber);
|
|
700
|
+
});
|
|
701
|
+
return groupedQuestions.find(function (m) { return m.clientCustomQuestion === true; }) || null;
|
|
702
|
+
};
|
|
703
|
+
var shouldShowComplianceGroupRemove = function (question, serialNumber) {
|
|
704
|
+
return isComplianceGroupedQuestion(question) && !!getGroupRemoveQuestion(question, serialNumber);
|
|
705
|
+
};
|
|
666
706
|
var renderQuestions = function () {
|
|
667
707
|
var complianceGroupIds = [];
|
|
668
708
|
var dependentQuestionGroupIds = [];
|
|
@@ -691,6 +731,11 @@ var QuestionnaireForm = function (props) {
|
|
|
691
731
|
dependentQuestionGroupIds === null || dependentQuestionGroupIds === void 0 ? void 0 : dependentQuestionGroupIds.push(question.denpendentQuestionGroupId);
|
|
692
732
|
}
|
|
693
733
|
}
|
|
734
|
+
if (question.isCustomQuestion) {
|
|
735
|
+
return (React.createElement(Col, { key: question.questionId, sm: "12", className: "DynoLayout", md: 12 },
|
|
736
|
+
React.createElement(Col, { md: "12", className: "formComponent-1" },
|
|
737
|
+
React.createElement(NewTaskForm, { question: question, onAccept: onAccept, onFlagged: onFlagged, setNotesFrame: setNotesFrame, getGuidance: getGuidance, disableFields: props.disableFields, addCustomQuestion: addCustomQuestion, removeCustomQuestion: removeCustomQuestion, isValidCategoryToAddQuestions: isValidCategoryToAddQuestions }))));
|
|
738
|
+
}
|
|
694
739
|
return (React.createElement(Col, { key: question.questionId, sm: "12", className: "DynoLayout", md: 12 },
|
|
695
740
|
question.isRepetitive == false ?
|
|
696
741
|
React.createElement(React.Fragment, null, !notesForm.includes(question === null || question === void 0 ? void 0 : question.clientQuestionId) ? (React.createElement(React.Fragment, null,
|
|
@@ -701,7 +746,7 @@ var QuestionnaireForm = function (props) {
|
|
|
701
746
|
" \u00A0\u00A0\u00A0",
|
|
702
747
|
React.createElement("span", { className: "content" }, question.reviewNotes)))) : (""))) : (React.createElement(Row, { className: "notes" },
|
|
703
748
|
React.createElement(Col, null, notesFrame(question))))) : '',
|
|
704
|
-
question
|
|
749
|
+
isComplianceGroupedQuestion(question) ? (React.createElement(React.Fragment, null,
|
|
705
750
|
question.isRepetitive &&
|
|
706
751
|
React.createElement(React.Fragment, null,
|
|
707
752
|
" ",
|
|
@@ -760,15 +805,18 @@ var QuestionnaireForm = function (props) {
|
|
|
760
805
|
React.createElement("span", { className: "remove", onClick: function () { return removeAddedQuestion(question, true); } }, "Remove"))) : React.createElement(React.Fragment, null)),
|
|
761
806
|
React.createElement(React.Fragment, null)),
|
|
762
807
|
React.createElement(Col, { md: "2", className: "compliance" }, selectOptions(question))))),
|
|
763
|
-
question.isCustomQuestion && (React.createElement(Col, { md: "12", className: "formComponent-1" },
|
|
764
|
-
React.createElement(NewTaskForm, { question: question, onAccept: onAccept, onFlagged: onFlagged, setNotesFrame: setNotesFrame, getGuidance: getGuidance, disableFields: props.disableFields, addCustomQuestion: addCustomQuestion, removeCustomQuestion: removeCustomQuestion }))),
|
|
765
808
|
React.createElement(React.Fragment, null)));
|
|
766
809
|
});
|
|
767
810
|
};
|
|
768
811
|
var renderQuestionGroup = function (question) {
|
|
769
812
|
var dependentQuestionGroupIds = [];
|
|
813
|
+
var removeGroupQuestion = getGroupRemoveQuestion(question);
|
|
770
814
|
return React.createElement(React.Fragment, null,
|
|
771
815
|
React.createElement("div", { className: "DynoColumns mb-3" },
|
|
816
|
+
shouldShowComplianceGroupRemove(question) && (removeGroupQuestion === null || removeGroupQuestion === void 0 ? void 0 : removeGroupQuestion.removeCustomQuestion) && React.createElement("div", { className: "overlay" },
|
|
817
|
+
React.createElement("p", { className: "removeDesignation" }, "Remove This Task?"),
|
|
818
|
+
React.createElement("button", { type: "button", className: "confirmMessage confirmMessageDelete", onClick: function () { return props.removeQuestion(removeGroupQuestion); } }, "Confirm"),
|
|
819
|
+
React.createElement("span", { className: "CancelNaCustom", onClick: function () { return cancelRemoveProcess(removeGroupQuestion, false); } }, "Cancel")),
|
|
772
820
|
React.createElement(Row, { className: "field ".concat(question.reviewFlagged ? "fieldFlagRed" : "") },
|
|
773
821
|
React.createElement(Col, { md: "10", className: "formComponent" },
|
|
774
822
|
React.createElement(Row, { className: "mb-2" },
|
|
@@ -809,7 +857,11 @@ var QuestionnaireForm = function (props) {
|
|
|
809
857
|
React.createElement(Col, { key: groupQuestion.questionId, sm: "12", className: groupQuestion.dependent ? "DynoLayout dependent-question" : "DynoLayout", md: layoutSet(groupQuestion === null || groupQuestion === void 0 ? void 0 : groupQuestion.layoutCoulmns) }, renderQuestionField(groupQuestion)),
|
|
810
858
|
groupQuestion.layoutOffset && React.createElement(Col, { md: groupQuestion.layoutOffset }));
|
|
811
859
|
}));
|
|
812
|
-
})))
|
|
860
|
+
}))),
|
|
861
|
+
shouldShowComplianceGroupRemove(question) && removeGroupQuestion && (React.createElement(Col, { sm: "12", className: "d-flex flex-row justify-content-end" },
|
|
862
|
+
React.createElement("div", null,
|
|
863
|
+
React.createElement("img", { src: deleteImg, alt: "X" }),
|
|
864
|
+
React.createElement("span", { className: "remove", onClick: function () { return removeAddedQuestion(removeGroupQuestion, true); } }, "Remove"))))),
|
|
813
865
|
React.createElement(Col, { md: "2", className: "compliance" }, selectOptions(question, currentQuestions.filter(function (m) {
|
|
814
866
|
return m.complianceGroupId == question.complianceGroupId;
|
|
815
867
|
}))))));
|
|
@@ -824,7 +876,12 @@ var QuestionnaireForm = function (props) {
|
|
|
824
876
|
return React.createElement(Accordion, null, findGroupSearialNumbers(question.complianceGroupId).map(function (serial) {
|
|
825
877
|
var _a;
|
|
826
878
|
var currentSerialQuestion = currentSerialNumberQuestion(question.complianceGroupId, serial);
|
|
879
|
+
var removeGroupQuestion = getGroupRemoveQuestion(question, serial);
|
|
827
880
|
return React.createElement("div", { className: "DynoColumns mb-3" },
|
|
881
|
+
shouldShowComplianceGroupRemove(question, serial) && (removeGroupQuestion === null || removeGroupQuestion === void 0 ? void 0 : removeGroupQuestion.removeCustomQuestion) && React.createElement("div", { className: "overlay" },
|
|
882
|
+
React.createElement("p", { className: "removeDesignation" }, "Remove This Task?"),
|
|
883
|
+
React.createElement("button", { type: "button", className: "confirmMessage confirmMessageDelete", onClick: function () { return props.removeQuestion(removeGroupQuestion); } }, "Confirm"),
|
|
884
|
+
React.createElement("span", { className: "CancelNaCustom", onClick: function () { return cancelRemoveProcess(removeGroupQuestion, false); } }, "Cancel")),
|
|
828
885
|
React.createElement(React.Fragment, null, !notesForm.includes(currentSerialQuestion === null || currentSerialQuestion === void 0 ? void 0 : currentSerialQuestion.clientQuestionId) ? (React.createElement(React.Fragment, null,
|
|
829
886
|
" ",
|
|
830
887
|
currentSerialQuestion.reviewNotes && ((_a = currentSerialQuestion.reviewNotes) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (React.createElement(Row, { className: "notesShowReview" },
|
|
@@ -867,7 +924,11 @@ var QuestionnaireForm = function (props) {
|
|
|
867
924
|
groupQuestion.layoutPreset && React.createElement(Col, { md: groupQuestion.layoutPreset }),
|
|
868
925
|
React.createElement(Col, { key: groupQuestion.questionId, sm: "12", className: groupQuestion.dependent ? "DynoLayout dependent-question" : "DynoLayout", md: layoutSet(groupQuestion === null || groupQuestion === void 0 ? void 0 : groupQuestion.layoutCoulmns) }, renderQuestionField(groupQuestion)),
|
|
869
926
|
groupQuestion.layoutOffset && React.createElement(Col, { md: groupQuestion.layoutOffset }));
|
|
870
|
-
})))))))
|
|
927
|
+
}))))))),
|
|
928
|
+
shouldShowComplianceGroupRemove(question, serial) && removeGroupQuestion && (React.createElement(Col, { sm: "12", className: "d-flex flex-row justify-content-end" },
|
|
929
|
+
React.createElement("div", null,
|
|
930
|
+
React.createElement("img", { src: deleteImg, alt: "X" }),
|
|
931
|
+
React.createElement("span", { className: "remove", onClick: function () { return removeAddedQuestion(removeGroupQuestion, true); } }, "Remove"))))),
|
|
871
932
|
React.createElement(Col, { md: "2", className: "compliance" }, selectOptions(currentSerialQuestion, currentQuestions.filter(function (m) { return m.complianceGroupId == question.complianceGroupId && m.serialNumber == serial; })))));
|
|
872
933
|
}));
|
|
873
934
|
};
|
|
@@ -881,7 +942,17 @@ var QuestionnaireForm = function (props) {
|
|
|
881
942
|
.map(function (groupQuestion) {
|
|
882
943
|
return React.createElement(React.Fragment, null,
|
|
883
944
|
groupQuestion.layoutPreset && React.createElement(Col, { md: groupQuestion.layoutPreset }),
|
|
884
|
-
React.createElement(Col, { key: groupQuestion.questionId, sm: "12", className: "DynoLayout", md: layoutSet(groupQuestion === null || groupQuestion === void 0 ? void 0 : groupQuestion.layoutCoulmns) },
|
|
945
|
+
React.createElement(Col, { key: groupQuestion.questionId, sm: "12", className: "DynoLayout", md: layoutSet(groupQuestion === null || groupQuestion === void 0 ? void 0 : groupQuestion.layoutCoulmns) },
|
|
946
|
+
React.createElement("div", { className: "box" },
|
|
947
|
+
!isComplianceGroupedQuestion(groupQuestion) && groupQuestion.removeCustomQuestion && React.createElement("div", { className: "overlay" },
|
|
948
|
+
React.createElement("p", { className: "removeDesignation" }, "Remove This Task?"),
|
|
949
|
+
React.createElement("button", { type: "button", className: "confirmMessage confirmMessageDelete", onClick: function () { return props.removeQuestion(groupQuestion); } }, "Confirm"),
|
|
950
|
+
React.createElement("span", { className: "CancelNaCustom", onClick: function () { return cancelRemoveProcess(groupQuestion, false); } }, "Cancel")),
|
|
951
|
+
renderQuestionField(groupQuestion),
|
|
952
|
+
shouldShowSingleQuestionRemove(groupQuestion) && (React.createElement(Col, { sm: "12", className: "d-flex flex-row justify-content-end" },
|
|
953
|
+
React.createElement("div", null,
|
|
954
|
+
React.createElement("img", { src: deleteImg, alt: "X" }),
|
|
955
|
+
React.createElement("span", { className: "remove", onClick: function () { return removeAddedQuestion(groupQuestion, true); } }, "Remove")))))),
|
|
885
956
|
groupQuestion.layoutOffset && React.createElement(Col, { md: groupQuestion.layoutOffset }));
|
|
886
957
|
})),
|
|
887
958
|
" ");
|
|
@@ -891,56 +962,82 @@ var QuestionnaireForm = function (props) {
|
|
|
891
962
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.Text)
|
|
892
963
|
return (React.createElement(React.Fragment, null,
|
|
893
964
|
React.createElement("div", { className: "d-flex dynoFields csTextField cdFormGroup" },
|
|
894
|
-
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText,
|
|
965
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
966
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
967
|
+
}, isRequired: question.isRequired, normalize: NormalizeText }))));
|
|
895
968
|
if (question.questionType === QuestionTypes.MultiSelectionDropdown)
|
|
896
969
|
return (React.createElement("div", { className: " d-flex dynoFields cdFormGroup" },
|
|
897
|
-
React.createElement(Field, { disabled: props.disableFields, component: MultipleSelectField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText,
|
|
970
|
+
React.createElement(Field, { disabled: props.disableFields, component: MultipleSelectField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
971
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
972
|
+
}, isRequired: question.isRequired, options: question.options.sort(function (a, b) {
|
|
898
973
|
return (a === null || a === void 0 ? void 0 : a.text) > (b === null || b === void 0 ? void 0 : b.text) ? 1 : -1;
|
|
899
974
|
}) })));
|
|
900
975
|
if (question.questionType === QuestionTypes.SingleSelectionBoxSelection)
|
|
901
976
|
return (React.createElement("div", { className: "d-flex dynoFields cdFormGroup" },
|
|
902
|
-
React.createElement(Field, { disabled: props.disableFields, component: SelectButtonFieldOptions, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText,
|
|
977
|
+
React.createElement(Field, { disabled: props.disableFields, component: SelectButtonFieldOptions, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
978
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
979
|
+
}, isRequired: question.isRequired, options: question.options.sort(function (a, b) { return (a === null || a === void 0 ? void 0 : a.value) - (b === null || b === void 0 ? void 0 : b.value); }) })));
|
|
903
980
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.FedTaxSSN)
|
|
904
981
|
return (React.createElement("div", { className: "d-flex dynoFields csTextField cdFormGroup" },
|
|
905
|
-
React.createElement(Field, { disabled: props.disableFields, component: SSNField, name: "question_" + ((_a = question.clientQuestionId) === null || _a === void 0 ? void 0 : _a.toString()), label: question.questionText, helpText: question.helpText,
|
|
982
|
+
React.createElement(Field, { disabled: props.disableFields, component: SSNField, name: "question_" + ((_a = question.clientQuestionId) === null || _a === void 0 ? void 0 : _a.toString()), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
983
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
984
|
+
}, isRequired: question.isRequired, normalize: NormaliseFedTaxSSN })));
|
|
906
985
|
if (question.questionType === QuestionTypes.Checkbox ||
|
|
907
986
|
question.questionType === QuestionTypes.PercentageValidationCheckbox)
|
|
908
987
|
return (React.createElement("div", { className: "d-flex dynoFields" },
|
|
909
988
|
React.createElement("div", null,
|
|
910
|
-
React.createElement(Field, { disabled: props.disableFields, name: "question_" + ((_b = question.clientQuestionId) === null || _b === void 0 ? void 0 : _b.toString()), label: question.questionText, helpText: question.helpText,
|
|
989
|
+
React.createElement(Field, { disabled: props.disableFields, name: "question_" + ((_b = question.clientQuestionId) === null || _b === void 0 ? void 0 : _b.toString()), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
990
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
991
|
+
}, component: SingleCheckBox,
|
|
911
992
|
// options={question.options.sort(
|
|
912
993
|
// (a: any, b: any) => a?.value - b?.value
|
|
913
994
|
// )}
|
|
914
995
|
isRequired: question.isRequired }))));
|
|
915
996
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.TimePicker)
|
|
916
997
|
return (React.createElement("div", { className: "d-flex dynoFields csTextField cdFormGroup" },
|
|
917
|
-
React.createElement(Field, { disabled: props.disableFields, component: SSNField, name: "question_" + ((_c = question.clientQuestionId) === null || _c === void 0 ? void 0 : _c.toString()), label: question.questionText, helpText: question.helpText,
|
|
998
|
+
React.createElement(Field, { disabled: props.disableFields, component: SSNField, name: "question_" + ((_c = question.clientQuestionId) === null || _c === void 0 ? void 0 : _c.toString()), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
999
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1000
|
+
},
|
|
918
1001
|
// validate={[required]}
|
|
919
1002
|
isRequired: question.isRequired, normalize: NormalizeTime, placeholder: "hh:mm" })));
|
|
920
1003
|
if (question.questionType === QuestionTypes.DecimalNumber)
|
|
921
1004
|
return (React.createElement("div", { className: "cdFormGroup" },
|
|
922
|
-
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + ((_d = question.clientQuestionId) === null || _d === void 0 ? void 0 : _d.toString()), label: question === null || question === void 0 ? void 0 : question.questionText, helpText: question.helpText,
|
|
1005
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + ((_d = question.clientQuestionId) === null || _d === void 0 ? void 0 : _d.toString()), label: question === null || question === void 0 ? void 0 : question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
1006
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1007
|
+
}, isRequired: question.isRequired, normalize: NormalizeDecimalNumber })));
|
|
923
1008
|
if (question.questionType === QuestionTypes.YesOrNo)
|
|
924
1009
|
return (React.createElement("div", { className: " d-flex dynoFields cdFormGroup" },
|
|
925
|
-
React.createElement(Field, { disabled: props.disableFields, component: YesOrNo, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText,
|
|
1010
|
+
React.createElement(Field, { disabled: props.disableFields, component: YesOrNo, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
1011
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1012
|
+
}, isRequired: question.isRequired, options: question.options.sort(function (a, b) { return (a === null || a === void 0 ? void 0 : a.optionSequence) - (b === null || b === void 0 ? void 0 : b.optionSequence); }) })));
|
|
926
1013
|
if (question.questionType === QuestionTypes.MultiSelectionCheckBox)
|
|
927
1014
|
return (React.createElement("div", { className: " d-flex dynoFields cdFormGroup" },
|
|
928
|
-
React.createElement(Field, { disabled: props.disableFields, component: CheckboxGroup, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText,
|
|
1015
|
+
React.createElement(Field, { disabled: props.disableFields, component: CheckboxGroup, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
1016
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1017
|
+
}, isRequired: question.isRequired, options: question.options.sort(function (a, b) { return (a === null || a === void 0 ? void 0 : a.value) - (b === null || b === void 0 ? void 0 : b.value); }) })));
|
|
929
1018
|
if (question.questionType === QuestionTypes.MultiCheckBox)
|
|
930
1019
|
return (React.createElement("div", { className: "d-flex dynoFields cdFormGroup" },
|
|
931
|
-
React.createElement(Field, { disabled: props.disableFields, component: MultiCheckboxGroup, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText,
|
|
1020
|
+
React.createElement(Field, { disabled: props.disableFields, component: MultiCheckboxGroup, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
1021
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1022
|
+
}, options: question.options.sort(function (a, b) { return (a === null || a === void 0 ? void 0 : a.optionSequence) && (b === null || b === void 0 ? void 0 : b.optionSequence) ?
|
|
932
1023
|
((a === null || a === void 0 ? void 0 : a.optionSequence) - (b === null || b === void 0 ? void 0 : b.optionSequence)) :
|
|
933
1024
|
((a === null || a === void 0 ? void 0 : a.value) - (b === null || b === void 0 ? void 0 : b.value)); }), isRequired: question.isRequired, className: 'multiCheckBox' })));
|
|
934
1025
|
if (question.questionType === QuestionTypes.SingleSelectionCheckBox)
|
|
935
1026
|
return (React.createElement("div", { className: " d-flex dynoFields csCheckSpanWrap cdFormGroup" },
|
|
936
|
-
React.createElement(Field, { disabled: props.disableFields, component: checkspan2, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText,
|
|
1027
|
+
React.createElement(Field, { disabled: props.disableFields, component: checkspan2, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
1028
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1029
|
+
}, isRequired: question.isRequired, options: question.options.sort(function (a, b) { return (a === null || a === void 0 ? void 0 : a.value) - (b === null || b === void 0 ? void 0 : b.value); }) })));
|
|
937
1030
|
if (question.questionType === QuestionTypes.AddressSelectionCheckBox)
|
|
938
1031
|
return (React.createElement("div", { className: "d-flex dynoFields csCheckSpanWrap" },
|
|
939
|
-
React.createElement(Field, { disabled: props.disableFields, component: checkspan2, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText,
|
|
1032
|
+
React.createElement(Field, { disabled: props.disableFields, component: checkspan2, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
1033
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1034
|
+
}, options: question.options.sort(function (a, b) { return (a === null || a === void 0 ? void 0 : a.value) - (b === null || b === void 0 ? void 0 : b.value); }), isRequired: question.isRequired })));
|
|
940
1035
|
if (question.questionType === QuestionTypes.MultiSelectionBoxSelection)
|
|
941
1036
|
return (React.createElement("div", { className: "d-flex dynoFields cdFormGroup" },
|
|
942
1037
|
React.createElement("div", { className: "multiGroupBox ".concat(question.questionType) },
|
|
943
|
-
React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText,
|
|
1038
|
+
React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
1039
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1040
|
+
}, component: CheckPanelBox, options: question.options.sort(function (a, b) { return (a === null || a === void 0 ? void 0 : a.value) - (b === null || b === void 0 ? void 0 : b.value); }), display: true, isRequired: question.isRequired }))));
|
|
944
1041
|
if (question.questionType === QuestionTypes.Percentage
|
|
945
1042
|
|| question.questionType === QuestionTypes.Percentage25A
|
|
946
1043
|
|| question.questionType === QuestionTypes.Percentage25B ||
|
|
@@ -948,7 +1045,9 @@ var QuestionnaireForm = function (props) {
|
|
|
948
1045
|
question.questionType === QuestionTypes.SalesBusinessPercentage ||
|
|
949
1046
|
question.questionType === QuestionTypes.BusinessPercentage)
|
|
950
1047
|
return (React.createElement("div", { className: "cdFormGroup" },
|
|
951
|
-
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + ((_e = question.clientQuestionId) === null || _e === void 0 ? void 0 : _e.toString()), label: question === null || question === void 0 ? void 0 : question.questionText, helpText: question.helpText,
|
|
1048
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + ((_e = question.clientQuestionId) === null || _e === void 0 ? void 0 : _e.toString()), label: question === null || question === void 0 ? void 0 : question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
1049
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1050
|
+
}, isRequired: question.isRequired })));
|
|
952
1051
|
if (question.questionType === QuestionTypes.FileUpload)
|
|
953
1052
|
return (React.createElement("div", { className: "d-flex dynoFields cdFormGroup" },
|
|
954
1053
|
React.createElement(Field, { question: question, onAccept: onAccept, onFlagged: onFlagged, setNotesFrame: setNotesFrame, getGuidance: getGuidance, disabled: (props.disableFields || !statusChange(question)), component: FileDropZoneField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, type: "file", checkedFormats: "image/jpeg, image/png, image/gif, image/bmp, .pdf, .doc, .docx, .xls,.xlsx, .rtf, .ppt, .pptx,.tiff,.rtf,.csv", clientQuestionId: question.clientQuestionId, displayAccepedFormats: false, allowMultiple: false, aiOverride: question.answers && ((_f = question === null || question === void 0 ? void 0 : question.answers[0]) === null || _f === void 0 ? void 0 : _f.aiOverride), maxSize: 5000000, isRequired: question.isRequired, noClick: question.answers && ((_g = question.answers) === null || _g === void 0 ? void 0 : _g.length) !== 0 ? true : false, noDrag: question.answers && ((_h = question.answers) === null || _h === void 0 ? void 0 : _h.length) !== 0 ? true : false, onClickFile: props.onClickFile })));
|
|
@@ -957,7 +1056,9 @@ var QuestionnaireForm = function (props) {
|
|
|
957
1056
|
React.createElement(Field, { question: question, onAccept: onAccept, onFlagged: onFlagged, setNotesFrame: setNotesFrame, getGuidance: getGuidance, disabled: (props.disableFields || !statusChange(question)), component: FileDropZoneField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, type: "file", acceptedFormats: ".pdf", clientQuestionId: question.clientQuestionId, displayAccepedFormats: false, allowMultiple: false, aiOverride: question.answers && ((_j = question === null || question === void 0 ? void 0 : question.answers[0]) === null || _j === void 0 ? void 0 : _j.aiOverride), maxSize: 5000000, isRequired: question.isRequired, noClick: question.answers && ((_k = question.answers) === null || _k === void 0 ? void 0 : _k.length) !== 0 ? true : false, noDrag: question.answers && ((_l = question.answers) === null || _l === void 0 ? void 0 : _l.length) !== 0 ? true : false, onClickFile: props.onClickFile })));
|
|
958
1057
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.TextArea)
|
|
959
1058
|
return (React.createElement("div", { className: " d-flex dynoFields csTextField cdFormGroup" },
|
|
960
|
-
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText,
|
|
1059
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
1060
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1061
|
+
}, type: "textarea", normalize: NormalizeText, isRequired: question.isRequired })));
|
|
961
1062
|
if (question.questionType === QuestionTypes.DatePicker)
|
|
962
1063
|
return (React.createElement("div", { className: "dynoFields cdFormGroup" },
|
|
963
1064
|
React.createElement(FormGroup, { row: true, className: "mb-5 w-100 form-group" },
|
|
@@ -966,16 +1067,24 @@ var QuestionnaireForm = function (props) {
|
|
|
966
1067
|
" ",
|
|
967
1068
|
question.isRequired && React.createElement("span", { className: "input-required" }, "*")),
|
|
968
1069
|
React.createElement(Col, { sm: 12 },
|
|
969
|
-
React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: Datepicker,
|
|
1070
|
+
React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: Datepicker, textBlur: function (event) {
|
|
1071
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1072
|
+
}, valuedata: null })))));
|
|
970
1073
|
if (question.questionType === QuestionTypes.PhoneNumber)
|
|
971
1074
|
return (React.createElement("div", { className: "dynoFields cdFormGroup" },
|
|
972
|
-
React.createElement(Field, { disabled: props.disableFields, component: PhoneNumberField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText,
|
|
1075
|
+
React.createElement(Field, { disabled: props.disableFields, component: PhoneNumberField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
1076
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1077
|
+
}, normalize: normalizePhone, isRequired: question.isRequired })));
|
|
973
1078
|
if (question.questionType === QuestionTypes.Email)
|
|
974
1079
|
return (React.createElement("div", { className: "dynoFields cdFormGroup" },
|
|
975
|
-
React.createElement(Field, { disabled: props.disableFields, component: EmailField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText,
|
|
1080
|
+
React.createElement(Field, { disabled: props.disableFields, component: EmailField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
1081
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1082
|
+
}, isRequired: question.isRequired })));
|
|
976
1083
|
if (question.questionType === QuestionTypes.SingleSelectionDropDown)
|
|
977
1084
|
return (React.createElement("div", { className: "dynoFields cdFormGroup" },
|
|
978
|
-
React.createElement(Field, { disabled: props.disableFields, component: SelectField, name: "question_" + question.clientQuestionId.toString(), label: question === null || question === void 0 ? void 0 : question.questionText, helpText: question.helpText,
|
|
1085
|
+
React.createElement(Field, { disabled: props.disableFields, component: SelectField, name: "question_" + question.clientQuestionId.toString(), label: question === null || question === void 0 ? void 0 : question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
1086
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1087
|
+
}, values: question.options.sort(function (a, b) { return (a === null || a === void 0 ? void 0 : a.optionSequence) - (b === null || b === void 0 ? void 0 : b.optionSequence); }), isRequired: question.isRequired })));
|
|
979
1088
|
if (question.questionType === QuestionTypes.PastDatePicker)
|
|
980
1089
|
return (React.createElement("div", { className: "dynoFields cdFormGroup" },
|
|
981
1090
|
React.createElement(FormGroup, { row: true, className: "mb-5 w-100 form-group" },
|
|
@@ -984,7 +1093,9 @@ var QuestionnaireForm = function (props) {
|
|
|
984
1093
|
" ",
|
|
985
1094
|
question.isRequired && React.createElement("span", { className: "input-required" }, "*")),
|
|
986
1095
|
React.createElement(Col, { sm: 12 },
|
|
987
|
-
React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: PastDatePicker, valuedata: null, maxDate: new Date(), showYearDropdown: true, placeholderText: "MM/DD/YYYY", autoComplete: "off"
|
|
1096
|
+
React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: PastDatePicker, valuedata: null, maxDate: new Date(), showYearDropdown: true, placeholderText: "MM/DD/YYYY", autoComplete: "off", textBlur: function (event) {
|
|
1097
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1098
|
+
} })))));
|
|
988
1099
|
if (question.questionType === QuestionTypes.FutureDatePicker)
|
|
989
1100
|
return (React.createElement("div", { className: "dynoFields cdFormGroup" },
|
|
990
1101
|
React.createElement(FormGroup, { row: true, className: "mb-5 w-100 form-group" },
|
|
@@ -993,34 +1104,54 @@ var QuestionnaireForm = function (props) {
|
|
|
993
1104
|
" ",
|
|
994
1105
|
question.isRequired && React.createElement("span", { className: "input-required" }, "*")),
|
|
995
1106
|
React.createElement(Col, { sm: 12 },
|
|
996
|
-
React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: FutureDatePicker, valuedata: null, minDate: new Date(),
|
|
1107
|
+
React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: FutureDatePicker, valuedata: null, minDate: new Date(), textBlur: function (event) {
|
|
1108
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1109
|
+
}, showYearDropdown: true, autoComplete: "off" })))));
|
|
997
1110
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.SSN)
|
|
998
1111
|
return (React.createElement("div", { className: "d-flex dynoFields csTextField cdFormGroup" },
|
|
999
|
-
React.createElement(Field, { disabled: props.disableFields, component: SSNField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: NormaliseSSN
|
|
1112
|
+
React.createElement(Field, { disabled: props.disableFields, component: SSNField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: NormaliseSSN, textBlur: function (event) {
|
|
1113
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1114
|
+
} })));
|
|
1000
1115
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.EIN)
|
|
1001
1116
|
return (React.createElement("div", { className: "d-flex dynoFields csTextField cdFormGroup" },
|
|
1002
|
-
React.createElement(Field, { disabled: props.disableFields, component: SSNField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: NormalizeEIN
|
|
1117
|
+
React.createElement(Field, { disabled: props.disableFields, component: SSNField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: NormalizeEIN, textBlur: function (event) {
|
|
1118
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1119
|
+
} })));
|
|
1003
1120
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.ROUTINGNUMBER)
|
|
1004
1121
|
return (React.createElement("div", { className: "d-flex dynoFields csTextField cdFormGroup" },
|
|
1005
|
-
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: NormalizeRoutingNumber
|
|
1122
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: NormalizeRoutingNumber, textBlur: function (event) {
|
|
1123
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1124
|
+
} })));
|
|
1006
1125
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.Number)
|
|
1007
1126
|
return (React.createElement("div", { className: "d-flex dynoFields csTextField cdFormGroup" },
|
|
1008
|
-
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, normalize: NormalizeNumber, isRequired: question.isRequired
|
|
1127
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, normalize: NormalizeNumber, isRequired: question.isRequired, textBlur: function (event) {
|
|
1128
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1129
|
+
} })));
|
|
1009
1130
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.NumericId)
|
|
1010
1131
|
return (React.createElement("div", { className: "d-flex dynoFields csTextField cdFormGroup" },
|
|
1011
|
-
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, normalize: normalizeNumericId, isRequired: question.isRequired
|
|
1132
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, normalize: normalizeNumericId, isRequired: question.isRequired, textBlur: function (event) {
|
|
1133
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1134
|
+
} })));
|
|
1012
1135
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.Currency)
|
|
1013
1136
|
return (React.createElement("div", { className: "d-flex dynoFields csTextField cdFormGroup" },
|
|
1014
|
-
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, normalize: NormalizeNumber
|
|
1137
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, normalize: NormalizeNumber, textBlur: function (event) {
|
|
1138
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1139
|
+
} })));
|
|
1015
1140
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.ZipCode)
|
|
1016
1141
|
return (React.createElement("div", { className: "d-flex dynoFields csTextField cdFormGroup" },
|
|
1017
|
-
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, normalize: normaliseZipcode, isRequired: question.isRequired
|
|
1142
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, normalize: normaliseZipcode, isRequired: question.isRequired, textBlur: function (event) {
|
|
1143
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1144
|
+
} })));
|
|
1018
1145
|
if (question.questionType === QuestionTypes.TaxId)
|
|
1019
1146
|
return (React.createElement("div", { className: "cdFormGroup" },
|
|
1020
|
-
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: NormalizeTax
|
|
1147
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: NormalizeTax, textBlur: function (event) {
|
|
1148
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1149
|
+
} })));
|
|
1021
1150
|
if (question.questionType === QuestionTypes.AlphaNumeric)
|
|
1022
1151
|
return (React.createElement("div", { className: "cdFormGroup" },
|
|
1023
|
-
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: normalizeAlphanumeric
|
|
1152
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: normalizeAlphanumeric, textBlur: function (event) {
|
|
1153
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1154
|
+
} })));
|
|
1024
1155
|
if (question.questionType === QuestionTypes.LabelText)
|
|
1025
1156
|
return (React.createElement("div", { className: "cdFormGroup" },
|
|
1026
1157
|
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, labelText: true })));
|
|
@@ -1029,10 +1160,14 @@ var QuestionnaireForm = function (props) {
|
|
|
1029
1160
|
React.createElement(Field, { disabled: true, component: DisableTextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, labelText: true })));
|
|
1030
1161
|
if (question.questionType === QuestionTypes.NumberOfMonths)
|
|
1031
1162
|
return (React.createElement("div", { className: "cdFormGroup" },
|
|
1032
|
-
React.createElement(Field, { disabled: props.disableFields, component: DisableTextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: normalizeMonth, labelText: true
|
|
1163
|
+
React.createElement(Field, { disabled: props.disableFields, component: DisableTextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: normalizeMonth, labelText: true, textBlur: function (event) {
|
|
1164
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1165
|
+
} })));
|
|
1033
1166
|
if (question.questionType === QuestionTypes.FaxId)
|
|
1034
1167
|
return (React.createElement("div", { className: "cdFormGroup" },
|
|
1035
|
-
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: normalizeFax
|
|
1168
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, normalize: normalizeFax, textBlur: function (event) {
|
|
1169
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1170
|
+
} })));
|
|
1036
1171
|
return null;
|
|
1037
1172
|
};
|
|
1038
1173
|
var setIsOpen = function (index) {
|