dynamic-questionnaire-form 1.4.1 → 1.4.3
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 +3 -2
- 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 +188 -41
- package/dist/esm/components/ComplianceQuestionarie/QuestionnaireForm.js.map +1 -1
- package/dist/esm/components/Questionnaire/Questionnaire.d.ts +5 -1
- package/dist/esm/components/Questionnaire/Questionnaire.js +20 -5
- package/dist/esm/components/Questionnaire/Questionnaire.js.map +1 -1
- package/dist/esm/components/Questionnaire/QuestionnaireForm.d.ts +5 -0
- package/dist/esm/components/Questionnaire/QuestionnaireForm.js +78 -40
- package/dist/esm/components/Questionnaire/QuestionnaireForm.js.map +1 -1
- package/dist/esm/helpers/GenericHelpers.d.ts +2 -1
- package/dist/esm/helpers/GenericHelpers.js +1 -0
- package/dist/esm/helpers/GenericHelpers.js.map +1 -1
- package/dist/esm/helpers/NormalizeHelpers.d.ts +2 -1
- package/dist/esm/helpers/NormalizeHelpers.js +23 -2
- package/dist/esm/helpers/NormalizeHelpers.js.map +1 -1
- package/package.json +2 -2
|
@@ -128,8 +128,19 @@ var QuestionnaireForm = function (props) {
|
|
|
128
128
|
if (Object.keys(props.formValues).length === 0) {
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
// Filter out questionReview properties for comparison
|
|
132
|
+
var formValuesWithoutReview = _.omitBy(props.formValues, function (value, key) {
|
|
133
|
+
return key.startsWith('questionReview_') && value !== undefined;
|
|
134
|
+
});
|
|
135
|
+
var formInitialvaluesWithoutReview = _.omitBy(props.formInitialvalues, function (value, key) {
|
|
136
|
+
return key.startsWith('questionReview_') && value !== undefined;
|
|
137
|
+
});
|
|
138
|
+
var areFormValuesEqual = _.isEqual(formValuesWithoutReview, formInitialvaluesWithoutReview);
|
|
139
|
+
if (!previousFormValues && areFormValuesEqual) {
|
|
140
|
+
setPreviousFormValues(_.cloneDeep(props.formValues));
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (!previousFormValues) {
|
|
133
144
|
setPreviousFormValues(_.cloneDeep(props.formValues));
|
|
134
145
|
return;
|
|
135
146
|
}
|
|
@@ -186,6 +197,26 @@ var QuestionnaireForm = function (props) {
|
|
|
186
197
|
setPreviousFormValues(_.cloneDeep(props.formValues));
|
|
187
198
|
}
|
|
188
199
|
}, [props.formValues]);
|
|
200
|
+
var onTextBlur = function (event, questionId, clientQuestionId, type) {
|
|
201
|
+
var _a;
|
|
202
|
+
var _b;
|
|
203
|
+
if (type === void 0) { type = ''; }
|
|
204
|
+
event.preventDefault();
|
|
205
|
+
if (props.formValues["question_" + clientQuestionId] !== undefined ||
|
|
206
|
+
null) {
|
|
207
|
+
var currentQuestion = currentQuestions.find(function (m) { return m.questionId == questionId; });
|
|
208
|
+
if (currentQuestion) {
|
|
209
|
+
// pass the event to parent component
|
|
210
|
+
// const oldAnswer = previousFormValues
|
|
211
|
+
// ? previousFormValues["question_" + clientQuestionId]
|
|
212
|
+
// : null;
|
|
213
|
+
props.saveQuestion((_a = {},
|
|
214
|
+
_a[clientQuestionId] = type === 'checkbox' ? (_b = event.target) === null || _b === void 0 ? void 0 : _b.checked : props.formValues["question_" + clientQuestionId],
|
|
215
|
+
_a));
|
|
216
|
+
}
|
|
217
|
+
setPreviousFormValues(_.cloneDeep(props.formValues));
|
|
218
|
+
}
|
|
219
|
+
};
|
|
189
220
|
var historyModalViewHandler = function () {
|
|
190
221
|
setHistoryModal(!historyModel);
|
|
191
222
|
};
|
|
@@ -622,6 +653,7 @@ var QuestionnaireForm = function (props) {
|
|
|
622
653
|
var addCustomQuestion = function (body) {
|
|
623
654
|
props.addCustomQuestion(body);
|
|
624
655
|
};
|
|
656
|
+
var isValidCategoryToAddQuestions = !!props.isValidCategoryToAddQuestions;
|
|
625
657
|
var removeCustomQuestion = function () {
|
|
626
658
|
props.removeCustomQuestion();
|
|
627
659
|
};
|
|
@@ -663,6 +695,25 @@ var QuestionnaireForm = function (props) {
|
|
|
663
695
|
var cancelRemoveProcess = function (question, value) {
|
|
664
696
|
props.preparenextquestion(question, value, true);
|
|
665
697
|
};
|
|
698
|
+
var isComplianceGroupedQuestion = function (question) { return question.complianceGroupId != null; };
|
|
699
|
+
var shouldShowSingleQuestionRemove = function (question) {
|
|
700
|
+
return !isComplianceGroupedQuestion(question) &&
|
|
701
|
+
question.complianceCategoryStatus &&
|
|
702
|
+
question.clientCustomQuestion === true;
|
|
703
|
+
};
|
|
704
|
+
var getGroupRemoveQuestion = function (question, serialNumber) {
|
|
705
|
+
if (!isComplianceGroupedQuestion(question)) {
|
|
706
|
+
return null;
|
|
707
|
+
}
|
|
708
|
+
var groupedQuestions = currentQuestions.filter(function (m) {
|
|
709
|
+
return m.complianceGroupId == question.complianceGroupId &&
|
|
710
|
+
(serialNumber === undefined || m.serialNumber == serialNumber);
|
|
711
|
+
});
|
|
712
|
+
return groupedQuestions.find(function (m) { return m.clientCustomQuestion === true; }) || null;
|
|
713
|
+
};
|
|
714
|
+
var shouldShowComplianceGroupRemove = function (question, serialNumber) {
|
|
715
|
+
return isComplianceGroupedQuestion(question) && !!getGroupRemoveQuestion(question, serialNumber);
|
|
716
|
+
};
|
|
666
717
|
var renderQuestions = function () {
|
|
667
718
|
var complianceGroupIds = [];
|
|
668
719
|
var dependentQuestionGroupIds = [];
|
|
@@ -691,6 +742,11 @@ var QuestionnaireForm = function (props) {
|
|
|
691
742
|
dependentQuestionGroupIds === null || dependentQuestionGroupIds === void 0 ? void 0 : dependentQuestionGroupIds.push(question.denpendentQuestionGroupId);
|
|
692
743
|
}
|
|
693
744
|
}
|
|
745
|
+
if (question.isCustomQuestion) {
|
|
746
|
+
return (React.createElement(Col, { key: question.questionId, sm: "12", className: "DynoLayout", md: 12 },
|
|
747
|
+
React.createElement(Col, { md: "12", className: "formComponent-1" },
|
|
748
|
+
React.createElement(NewTaskForm, { question: question, onAccept: onAccept, onFlagged: onFlagged, setNotesFrame: setNotesFrame, getGuidance: getGuidance, disableFields: props.disableFields, addCustomQuestion: addCustomQuestion, removeCustomQuestion: removeCustomQuestion, isValidCategoryToAddQuestions: isValidCategoryToAddQuestions }))));
|
|
749
|
+
}
|
|
694
750
|
return (React.createElement(Col, { key: question.questionId, sm: "12", className: "DynoLayout", md: 12 },
|
|
695
751
|
question.isRepetitive == false ?
|
|
696
752
|
React.createElement(React.Fragment, null, !notesForm.includes(question === null || question === void 0 ? void 0 : question.clientQuestionId) ? (React.createElement(React.Fragment, null,
|
|
@@ -701,7 +757,7 @@ var QuestionnaireForm = function (props) {
|
|
|
701
757
|
" \u00A0\u00A0\u00A0",
|
|
702
758
|
React.createElement("span", { className: "content" }, question.reviewNotes)))) : (""))) : (React.createElement(Row, { className: "notes" },
|
|
703
759
|
React.createElement(Col, null, notesFrame(question))))) : '',
|
|
704
|
-
question
|
|
760
|
+
isComplianceGroupedQuestion(question) ? (React.createElement(React.Fragment, null,
|
|
705
761
|
question.isRepetitive &&
|
|
706
762
|
React.createElement(React.Fragment, null,
|
|
707
763
|
" ",
|
|
@@ -760,15 +816,18 @@ var QuestionnaireForm = function (props) {
|
|
|
760
816
|
React.createElement("span", { className: "remove", onClick: function () { return removeAddedQuestion(question, true); } }, "Remove"))) : React.createElement(React.Fragment, null)),
|
|
761
817
|
React.createElement(React.Fragment, null)),
|
|
762
818
|
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
819
|
React.createElement(React.Fragment, null)));
|
|
766
820
|
});
|
|
767
821
|
};
|
|
768
822
|
var renderQuestionGroup = function (question) {
|
|
769
823
|
var dependentQuestionGroupIds = [];
|
|
824
|
+
var removeGroupQuestion = getGroupRemoveQuestion(question);
|
|
770
825
|
return React.createElement(React.Fragment, null,
|
|
771
826
|
React.createElement("div", { className: "DynoColumns mb-3" },
|
|
827
|
+
shouldShowComplianceGroupRemove(question) && (removeGroupQuestion === null || removeGroupQuestion === void 0 ? void 0 : removeGroupQuestion.removeCustomQuestion) && React.createElement("div", { className: "overlay" },
|
|
828
|
+
React.createElement("p", { className: "removeDesignation" }, "Remove This Task?"),
|
|
829
|
+
React.createElement("button", { type: "button", className: "confirmMessage confirmMessageDelete", onClick: function () { return props.removeQuestion(removeGroupQuestion); } }, "Confirm"),
|
|
830
|
+
React.createElement("span", { className: "CancelNaCustom", onClick: function () { return cancelRemoveProcess(removeGroupQuestion, false); } }, "Cancel")),
|
|
772
831
|
React.createElement(Row, { className: "field ".concat(question.reviewFlagged ? "fieldFlagRed" : "") },
|
|
773
832
|
React.createElement(Col, { md: "10", className: "formComponent" },
|
|
774
833
|
React.createElement(Row, { className: "mb-2" },
|
|
@@ -809,7 +868,11 @@ var QuestionnaireForm = function (props) {
|
|
|
809
868
|
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
869
|
groupQuestion.layoutOffset && React.createElement(Col, { md: groupQuestion.layoutOffset }));
|
|
811
870
|
}));
|
|
812
|
-
})))
|
|
871
|
+
}))),
|
|
872
|
+
shouldShowComplianceGroupRemove(question) && removeGroupQuestion && (React.createElement(Col, { sm: "12", className: "d-flex flex-row justify-content-end" },
|
|
873
|
+
React.createElement("div", null,
|
|
874
|
+
React.createElement("img", { src: deleteImg, alt: "X" }),
|
|
875
|
+
React.createElement("span", { className: "remove", onClick: function () { return removeAddedQuestion(removeGroupQuestion, true); } }, "Remove"))))),
|
|
813
876
|
React.createElement(Col, { md: "2", className: "compliance" }, selectOptions(question, currentQuestions.filter(function (m) {
|
|
814
877
|
return m.complianceGroupId == question.complianceGroupId;
|
|
815
878
|
}))))));
|
|
@@ -824,7 +887,12 @@ var QuestionnaireForm = function (props) {
|
|
|
824
887
|
return React.createElement(Accordion, null, findGroupSearialNumbers(question.complianceGroupId).map(function (serial) {
|
|
825
888
|
var _a;
|
|
826
889
|
var currentSerialQuestion = currentSerialNumberQuestion(question.complianceGroupId, serial);
|
|
890
|
+
var removeGroupQuestion = getGroupRemoveQuestion(question, serial);
|
|
827
891
|
return React.createElement("div", { className: "DynoColumns mb-3" },
|
|
892
|
+
shouldShowComplianceGroupRemove(question, serial) && (removeGroupQuestion === null || removeGroupQuestion === void 0 ? void 0 : removeGroupQuestion.removeCustomQuestion) && React.createElement("div", { className: "overlay" },
|
|
893
|
+
React.createElement("p", { className: "removeDesignation" }, "Remove This Task?"),
|
|
894
|
+
React.createElement("button", { type: "button", className: "confirmMessage confirmMessageDelete", onClick: function () { return props.removeQuestion(removeGroupQuestion); } }, "Confirm"),
|
|
895
|
+
React.createElement("span", { className: "CancelNaCustom", onClick: function () { return cancelRemoveProcess(removeGroupQuestion, false); } }, "Cancel")),
|
|
828
896
|
React.createElement(React.Fragment, null, !notesForm.includes(currentSerialQuestion === null || currentSerialQuestion === void 0 ? void 0 : currentSerialQuestion.clientQuestionId) ? (React.createElement(React.Fragment, null,
|
|
829
897
|
" ",
|
|
830
898
|
currentSerialQuestion.reviewNotes && ((_a = currentSerialQuestion.reviewNotes) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (React.createElement(Row, { className: "notesShowReview" },
|
|
@@ -867,7 +935,11 @@ var QuestionnaireForm = function (props) {
|
|
|
867
935
|
groupQuestion.layoutPreset && React.createElement(Col, { md: groupQuestion.layoutPreset }),
|
|
868
936
|
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
937
|
groupQuestion.layoutOffset && React.createElement(Col, { md: groupQuestion.layoutOffset }));
|
|
870
|
-
})))))))
|
|
938
|
+
}))))))),
|
|
939
|
+
shouldShowComplianceGroupRemove(question, serial) && removeGroupQuestion && (React.createElement(Col, { sm: "12", className: "d-flex flex-row justify-content-end" },
|
|
940
|
+
React.createElement("div", null,
|
|
941
|
+
React.createElement("img", { src: deleteImg, alt: "X" }),
|
|
942
|
+
React.createElement("span", { className: "remove", onClick: function () { return removeAddedQuestion(removeGroupQuestion, true); } }, "Remove"))))),
|
|
871
943
|
React.createElement(Col, { md: "2", className: "compliance" }, selectOptions(currentSerialQuestion, currentQuestions.filter(function (m) { return m.complianceGroupId == question.complianceGroupId && m.serialNumber == serial; })))));
|
|
872
944
|
}));
|
|
873
945
|
};
|
|
@@ -881,7 +953,17 @@ var QuestionnaireForm = function (props) {
|
|
|
881
953
|
.map(function (groupQuestion) {
|
|
882
954
|
return React.createElement(React.Fragment, null,
|
|
883
955
|
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) },
|
|
956
|
+
React.createElement(Col, { key: groupQuestion.questionId, sm: "12", className: "DynoLayout", md: layoutSet(groupQuestion === null || groupQuestion === void 0 ? void 0 : groupQuestion.layoutCoulmns) },
|
|
957
|
+
React.createElement("div", { className: "box" },
|
|
958
|
+
!isComplianceGroupedQuestion(groupQuestion) && groupQuestion.removeCustomQuestion && React.createElement("div", { className: "overlay" },
|
|
959
|
+
React.createElement("p", { className: "removeDesignation" }, "Remove This Task?"),
|
|
960
|
+
React.createElement("button", { type: "button", className: "confirmMessage confirmMessageDelete", onClick: function () { return props.removeQuestion(groupQuestion); } }, "Confirm"),
|
|
961
|
+
React.createElement("span", { className: "CancelNaCustom", onClick: function () { return cancelRemoveProcess(groupQuestion, false); } }, "Cancel")),
|
|
962
|
+
renderQuestionField(groupQuestion),
|
|
963
|
+
shouldShowSingleQuestionRemove(groupQuestion) && (React.createElement(Col, { sm: "12", className: "d-flex flex-row justify-content-end" },
|
|
964
|
+
React.createElement("div", null,
|
|
965
|
+
React.createElement("img", { src: deleteImg, alt: "X" }),
|
|
966
|
+
React.createElement("span", { className: "remove", onClick: function () { return removeAddedQuestion(groupQuestion, true); } }, "Remove")))))),
|
|
885
967
|
groupQuestion.layoutOffset && React.createElement(Col, { md: groupQuestion.layoutOffset }));
|
|
886
968
|
})),
|
|
887
969
|
" ");
|
|
@@ -891,64 +973,93 @@ var QuestionnaireForm = function (props) {
|
|
|
891
973
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.Text)
|
|
892
974
|
return (React.createElement(React.Fragment, null,
|
|
893
975
|
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,
|
|
976
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
977
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
978
|
+
}, isRequired: question.isRequired, normalize: NormalizeText }))));
|
|
895
979
|
if (question.questionType === QuestionTypes.MultiSelectionDropdown)
|
|
896
980
|
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,
|
|
981
|
+
React.createElement(Field, { disabled: props.disableFields, component: MultipleSelectField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
982
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
983
|
+
}, isRequired: question.isRequired, options: question.options.sort(function (a, b) {
|
|
898
984
|
return (a === null || a === void 0 ? void 0 : a.text) > (b === null || b === void 0 ? void 0 : b.text) ? 1 : -1;
|
|
899
985
|
}) })));
|
|
900
986
|
if (question.questionType === QuestionTypes.SingleSelectionBoxSelection)
|
|
901
987
|
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,
|
|
988
|
+
React.createElement(Field, { disabled: props.disableFields, component: SelectButtonFieldOptions, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
989
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
990
|
+
}, 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
991
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.FedTaxSSN)
|
|
904
992
|
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,
|
|
993
|
+
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) {
|
|
994
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
995
|
+
}, isRequired: question.isRequired, normalize: NormaliseFedTaxSSN })));
|
|
906
996
|
if (question.questionType === QuestionTypes.Checkbox ||
|
|
907
997
|
question.questionType === QuestionTypes.PercentageValidationCheckbox)
|
|
908
998
|
return (React.createElement("div", { className: "d-flex dynoFields" },
|
|
909
999
|
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,
|
|
1000
|
+
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) {
|
|
1001
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1002
|
+
}, component: SingleCheckBox,
|
|
911
1003
|
// options={question.options.sort(
|
|
912
1004
|
// (a: any, b: any) => a?.value - b?.value
|
|
913
1005
|
// )}
|
|
914
1006
|
isRequired: question.isRequired }))));
|
|
915
1007
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.TimePicker)
|
|
916
1008
|
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,
|
|
1009
|
+
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) {
|
|
1010
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1011
|
+
},
|
|
918
1012
|
// validate={[required]}
|
|
919
1013
|
isRequired: question.isRequired, normalize: NormalizeTime, placeholder: "hh:mm" })));
|
|
920
1014
|
if (question.questionType === QuestionTypes.DecimalNumber)
|
|
921
1015
|
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,
|
|
1016
|
+
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) {
|
|
1017
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1018
|
+
}, isRequired: question.isRequired, normalize: NormalizeDecimalNumber })));
|
|
923
1019
|
if (question.questionType === QuestionTypes.YesOrNo)
|
|
924
1020
|
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,
|
|
1021
|
+
React.createElement(Field, { disabled: props.disableFields, component: YesOrNo, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
1022
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1023
|
+
}, 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
1024
|
if (question.questionType === QuestionTypes.MultiSelectionCheckBox)
|
|
927
1025
|
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,
|
|
1026
|
+
React.createElement(Field, { disabled: props.disableFields, component: CheckboxGroup, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
1027
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1028
|
+
}, 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
1029
|
if (question.questionType === QuestionTypes.MultiCheckBox)
|
|
930
1030
|
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,
|
|
1031
|
+
React.createElement(Field, { disabled: props.disableFields, component: MultiCheckboxGroup, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
1032
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1033
|
+
}, 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
1034
|
((a === null || a === void 0 ? void 0 : a.optionSequence) - (b === null || b === void 0 ? void 0 : b.optionSequence)) :
|
|
933
1035
|
((a === null || a === void 0 ? void 0 : a.value) - (b === null || b === void 0 ? void 0 : b.value)); }), isRequired: question.isRequired, className: 'multiCheckBox' })));
|
|
934
1036
|
if (question.questionType === QuestionTypes.SingleSelectionCheckBox)
|
|
935
1037
|
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,
|
|
1038
|
+
React.createElement(Field, { disabled: props.disableFields, component: checkspan2, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
1039
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1040
|
+
}, 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
1041
|
if (question.questionType === QuestionTypes.AddressSelectionCheckBox)
|
|
938
1042
|
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,
|
|
1043
|
+
React.createElement(Field, { disabled: props.disableFields, component: checkspan2, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, HelpText: question.helpText, textBlur: function (event) {
|
|
1044
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1045
|
+
}, 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
1046
|
if (question.questionType === QuestionTypes.MultiSelectionBoxSelection)
|
|
941
1047
|
return (React.createElement("div", { className: "d-flex dynoFields cdFormGroup" },
|
|
942
1048
|
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,
|
|
1049
|
+
React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
1050
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1051
|
+
}, 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
1052
|
if (question.questionType === QuestionTypes.Percentage
|
|
945
1053
|
|| question.questionType === QuestionTypes.Percentage25A
|
|
946
1054
|
|| question.questionType === QuestionTypes.Percentage25B ||
|
|
947
1055
|
question.questionType === QuestionTypes.SalesPercentage ||
|
|
948
1056
|
question.questionType === QuestionTypes.SalesBusinessPercentage ||
|
|
949
|
-
question.questionType === QuestionTypes.BusinessPercentage
|
|
1057
|
+
question.questionType === QuestionTypes.BusinessPercentage ||
|
|
1058
|
+
question.questionType === QuestionTypes.InternationalSalesPercentage)
|
|
950
1059
|
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,
|
|
1060
|
+
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) {
|
|
1061
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1062
|
+
}, isRequired: question.isRequired })));
|
|
952
1063
|
if (question.questionType === QuestionTypes.FileUpload)
|
|
953
1064
|
return (React.createElement("div", { className: "d-flex dynoFields cdFormGroup" },
|
|
954
1065
|
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 +1068,9 @@ var QuestionnaireForm = function (props) {
|
|
|
957
1068
|
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
1069
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.TextArea)
|
|
959
1070
|
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,
|
|
1071
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
1072
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1073
|
+
}, type: "textarea", normalize: NormalizeText, isRequired: question.isRequired })));
|
|
961
1074
|
if (question.questionType === QuestionTypes.DatePicker)
|
|
962
1075
|
return (React.createElement("div", { className: "dynoFields cdFormGroup" },
|
|
963
1076
|
React.createElement(FormGroup, { row: true, className: "mb-5 w-100 form-group" },
|
|
@@ -966,16 +1079,24 @@ var QuestionnaireForm = function (props) {
|
|
|
966
1079
|
" ",
|
|
967
1080
|
question.isRequired && React.createElement("span", { className: "input-required" }, "*")),
|
|
968
1081
|
React.createElement(Col, { sm: 12 },
|
|
969
|
-
React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: Datepicker,
|
|
1082
|
+
React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: Datepicker, textBlur: function (event) {
|
|
1083
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1084
|
+
}, valuedata: null })))));
|
|
970
1085
|
if (question.questionType === QuestionTypes.PhoneNumber)
|
|
971
1086
|
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,
|
|
1087
|
+
React.createElement(Field, { disabled: props.disableFields, component: PhoneNumberField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
1088
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1089
|
+
}, normalize: normalizePhone, isRequired: question.isRequired })));
|
|
973
1090
|
if (question.questionType === QuestionTypes.Email)
|
|
974
1091
|
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,
|
|
1092
|
+
React.createElement(Field, { disabled: props.disableFields, component: EmailField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
|
|
1093
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1094
|
+
}, isRequired: question.isRequired })));
|
|
976
1095
|
if (question.questionType === QuestionTypes.SingleSelectionDropDown)
|
|
977
1096
|
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,
|
|
1097
|
+
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) {
|
|
1098
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1099
|
+
}, 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
1100
|
if (question.questionType === QuestionTypes.PastDatePicker)
|
|
980
1101
|
return (React.createElement("div", { className: "dynoFields cdFormGroup" },
|
|
981
1102
|
React.createElement(FormGroup, { row: true, className: "mb-5 w-100 form-group" },
|
|
@@ -984,7 +1105,9 @@ var QuestionnaireForm = function (props) {
|
|
|
984
1105
|
" ",
|
|
985
1106
|
question.isRequired && React.createElement("span", { className: "input-required" }, "*")),
|
|
986
1107
|
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"
|
|
1108
|
+
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) {
|
|
1109
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1110
|
+
} })))));
|
|
988
1111
|
if (question.questionType === QuestionTypes.FutureDatePicker)
|
|
989
1112
|
return (React.createElement("div", { className: "dynoFields cdFormGroup" },
|
|
990
1113
|
React.createElement(FormGroup, { row: true, className: "mb-5 w-100 form-group" },
|
|
@@ -993,34 +1116,54 @@ var QuestionnaireForm = function (props) {
|
|
|
993
1116
|
" ",
|
|
994
1117
|
question.isRequired && React.createElement("span", { className: "input-required" }, "*")),
|
|
995
1118
|
React.createElement(Col, { sm: 12 },
|
|
996
|
-
React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: FutureDatePicker, valuedata: null, minDate: new Date(),
|
|
1119
|
+
React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: FutureDatePicker, valuedata: null, minDate: new Date(), textBlur: function (event) {
|
|
1120
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1121
|
+
}, showYearDropdown: true, autoComplete: "off" })))));
|
|
997
1122
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.SSN)
|
|
998
1123
|
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
|
|
1124
|
+
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) {
|
|
1125
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1126
|
+
} })));
|
|
1000
1127
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.EIN)
|
|
1001
1128
|
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
|
|
1129
|
+
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) {
|
|
1130
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1131
|
+
} })));
|
|
1003
1132
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.ROUTINGNUMBER)
|
|
1004
1133
|
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
|
|
1134
|
+
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) {
|
|
1135
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1136
|
+
} })));
|
|
1006
1137
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.Number)
|
|
1007
1138
|
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
|
|
1139
|
+
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) {
|
|
1140
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1141
|
+
} })));
|
|
1009
1142
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.NumericId)
|
|
1010
1143
|
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
|
|
1144
|
+
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) {
|
|
1145
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1146
|
+
} })));
|
|
1012
1147
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.Currency)
|
|
1013
1148
|
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
|
|
1149
|
+
React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, normalize: NormalizeNumber, textBlur: function (event) {
|
|
1150
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1151
|
+
} })));
|
|
1015
1152
|
if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.ZipCode)
|
|
1016
1153
|
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
|
|
1154
|
+
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) {
|
|
1155
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1156
|
+
} })));
|
|
1018
1157
|
if (question.questionType === QuestionTypes.TaxId)
|
|
1019
1158
|
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
|
|
1159
|
+
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) {
|
|
1160
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1161
|
+
} })));
|
|
1021
1162
|
if (question.questionType === QuestionTypes.AlphaNumeric)
|
|
1022
1163
|
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
|
|
1164
|
+
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) {
|
|
1165
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1166
|
+
} })));
|
|
1024
1167
|
if (question.questionType === QuestionTypes.LabelText)
|
|
1025
1168
|
return (React.createElement("div", { className: "cdFormGroup" },
|
|
1026
1169
|
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 +1172,14 @@ var QuestionnaireForm = function (props) {
|
|
|
1029
1172
|
React.createElement(Field, { disabled: true, component: DisableTextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, labelText: true })));
|
|
1030
1173
|
if (question.questionType === QuestionTypes.NumberOfMonths)
|
|
1031
1174
|
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
|
|
1175
|
+
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) {
|
|
1176
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1177
|
+
} })));
|
|
1033
1178
|
if (question.questionType === QuestionTypes.FaxId)
|
|
1034
1179
|
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
|
|
1180
|
+
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) {
|
|
1181
|
+
return onTextBlur(event, question.questionId, question.clientQuestionId);
|
|
1182
|
+
} })));
|
|
1036
1183
|
return null;
|
|
1037
1184
|
};
|
|
1038
1185
|
var setIsOpen = function (index) {
|