dynamic-questionnaire-form 1.3.0 → 1.3.2

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.
Files changed (23) hide show
  1. package/README.md +93 -0
  2. package/dist/esm/components/ComplianceQuestionarie/NewTaskForm.d.ts +123 -9
  3. package/dist/esm/components/ComplianceQuestionarie/NewTaskForm.js +9 -6
  4. package/dist/esm/components/ComplianceQuestionarie/NewTaskForm.js.map +1 -1
  5. package/dist/esm/components/ComplianceQuestionarie/Questionnaire.d.ts +3 -0
  6. package/dist/esm/components/ComplianceQuestionarie/Questionnaire.js +3 -2
  7. package/dist/esm/components/ComplianceQuestionarie/Questionnaire.js.map +1 -1
  8. package/dist/esm/components/ComplianceQuestionarie/QuestionnaireForm.d.ts +3 -0
  9. package/dist/esm/components/ComplianceQuestionarie/QuestionnaireForm.js +180 -44
  10. package/dist/esm/components/ComplianceQuestionarie/QuestionnaireForm.js.map +1 -1
  11. package/dist/esm/components/Questionnaire/Questionnaire.d.ts +5 -1
  12. package/dist/esm/components/Questionnaire/Questionnaire.js +19 -4
  13. package/dist/esm/components/Questionnaire/Questionnaire.js.map +1 -1
  14. package/dist/esm/components/Questionnaire/QuestionnaireForm.d.ts +4 -0
  15. package/dist/esm/components/Questionnaire/QuestionnaireForm.js +81 -47
  16. package/dist/esm/components/Questionnaire/QuestionnaireForm.js.map +1 -1
  17. package/dist/esm/helpers/GenericHelpers.d.ts +2 -1
  18. package/dist/esm/helpers/GenericHelpers.js +1 -0
  19. package/dist/esm/helpers/GenericHelpers.js.map +1 -1
  20. package/dist/esm/helpers/NormalizeHelpers.d.ts +2 -1
  21. package/dist/esm/helpers/NormalizeHelpers.js +25 -2
  22. package/dist/esm/helpers/NormalizeHelpers.js.map +1 -1
  23. package/package.json +2 -2
@@ -71,7 +71,7 @@ import NewTaskForm from "./NewTaskForm";
71
71
  // import MessageCenterModal from "../PortalPage/MessageCenterModal";
72
72
  import deleteImg from "../../images/delete.svg";
73
73
  import { QuestionTypes, transformDateWithoutTime } from "../../helpers/GenericHelpers";
74
- import { CheckPanelBox, CheckboxGroup, EmailField, FutureDatePicker, MultipleSelectField, PastDatePicker, PhoneNumberField, SSNField, SelectButtonFieldOptions, SelectField, TextField, FileDropZoneField, YesOrNo, Datepicker, checkspan2, MultiCheckboxGroup, SingleCheckBox, DisableTextField, } from "common-field-package";
74
+ import { CheckPanelBox, CheckboxGroup, EmailField, FutureDatePicker, MultipleSelectField, PastDatePicker, PhoneNumberField, SSNField, SelectButtonFieldOptions, SelectField, TextField, FileDropZoneField, YesOrNo, Datepicker, checkspan2, MultiCheckboxGroup, SingleCheckBox, DisableTextField } from "common-field-package";
75
75
  import { NormaliseSSN, NormalizeNumber, normaliseZipcode, normalizePhone, normalizeTextarea, NormalizeTax, normalizeFax, normalizeAlphanumeric, NormalizeText, NormaliseFedTaxSSN, NormalizeDecimalNumber, NormalizeTime, NormalizeEIN, NormalizeRoutingNumber, normalizeNumericId, normalizeMonth } from "../../helpers/NormalizeHelpers";
76
76
  var QuestionnaireForm = function (props) {
77
77
  var _a, _b, _c, _d;
@@ -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.complianceGroupId ? (React.createElement(React.Fragment, null,
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) }, renderQuestionField(groupQuestion)),
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,64 +962,93 @@ 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, isRequired: question.isRequired, normalize: NormalizeText }))));
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, isRequired: question.isRequired, options: question.options.sort(function (a, b) {
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, 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); }) })));
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, isRequired: question.isRequired, normalize: NormaliseFedTaxSSN })));
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, component: SingleCheckBox,
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, isRequired: question.isRequired, normalize: NormalizeDecimalNumber })));
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, 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); }) })));
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, 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); }) })));
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, 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) ?
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, 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); }) })));
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, 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 })));
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, 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 }))));
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
- || question.questionType === QuestionTypes.Percentage25B
947
- || question.questionType === QuestionTypes.SalesPercentage
948
- || question.questionType === QuestionTypes.SalesBusinessPercentage
949
- || question.questionType === QuestionTypes.BusinessPercentage)
1043
+ || question.questionType === QuestionTypes.Percentage25B ||
1044
+ question.questionType === QuestionTypes.SalesPercentage ||
1045
+ question.questionType === QuestionTypes.SalesBusinessPercentage ||
1046
+ question.questionType === QuestionTypes.BusinessPercentage ||
1047
+ question.questionType === QuestionTypes.InternationalSalesPercentage)
950
1048
  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, isRequired: question.isRequired })));
1049
+ 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) {
1050
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1051
+ }, isRequired: question.isRequired })));
952
1052
  if (question.questionType === QuestionTypes.FileUpload)
953
1053
  return (React.createElement("div", { className: "d-flex dynoFields cdFormGroup" },
954
1054
  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 +1057,9 @@ var QuestionnaireForm = function (props) {
957
1057
  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
1058
  if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.TextArea)
959
1059
  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, type: "textarea", normalize: NormalizeText, isRequired: question.isRequired })));
1060
+ React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
1061
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1062
+ }, type: "textarea", normalize: NormalizeText, isRequired: question.isRequired })));
961
1063
  if (question.questionType === QuestionTypes.DatePicker)
962
1064
  return (React.createElement("div", { className: "dynoFields cdFormGroup" },
963
1065
  React.createElement(FormGroup, { row: true, className: "mb-5 w-100 form-group" },
@@ -966,16 +1068,24 @@ var QuestionnaireForm = function (props) {
966
1068
  " ",
967
1069
  question.isRequired && React.createElement("span", { className: "input-required" }, "*")),
968
1070
  React.createElement(Col, { sm: 12 },
969
- React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: Datepicker, valuedata: null })))));
1071
+ React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: Datepicker, textBlur: function (event) {
1072
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1073
+ }, valuedata: null })))));
970
1074
  if (question.questionType === QuestionTypes.PhoneNumber)
971
1075
  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, normalize: normalizePhone, isRequired: question.isRequired })));
1076
+ React.createElement(Field, { disabled: props.disableFields, component: PhoneNumberField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
1077
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1078
+ }, normalize: normalizePhone, isRequired: question.isRequired })));
973
1079
  if (question.questionType === QuestionTypes.Email)
974
1080
  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, isRequired: question.isRequired })));
1081
+ React.createElement(Field, { disabled: props.disableFields, component: EmailField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, textBlur: function (event) {
1082
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1083
+ }, isRequired: question.isRequired })));
976
1084
  if (question.questionType === QuestionTypes.SingleSelectionDropDown)
977
1085
  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, 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 })));
1086
+ 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) {
1087
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1088
+ }, 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
1089
  if (question.questionType === QuestionTypes.PastDatePicker)
980
1090
  return (React.createElement("div", { className: "dynoFields cdFormGroup" },
981
1091
  React.createElement(FormGroup, { row: true, className: "mb-5 w-100 form-group" },
@@ -984,7 +1094,9 @@ var QuestionnaireForm = function (props) {
984
1094
  " ",
985
1095
  question.isRequired && React.createElement("span", { className: "input-required" }, "*")),
986
1096
  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" })))));
1097
+ 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) {
1098
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1099
+ } })))));
988
1100
  if (question.questionType === QuestionTypes.FutureDatePicker)
989
1101
  return (React.createElement("div", { className: "dynoFields cdFormGroup" },
990
1102
  React.createElement(FormGroup, { row: true, className: "mb-5 w-100 form-group" },
@@ -993,34 +1105,54 @@ var QuestionnaireForm = function (props) {
993
1105
  " ",
994
1106
  question.isRequired && React.createElement("span", { className: "input-required" }, "*")),
995
1107
  React.createElement(Col, { sm: 12 },
996
- React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: FutureDatePicker, valuedata: null, minDate: new Date(), showYearDropdown: true, autoComplete: "off" })))));
1108
+ React.createElement(Field, { disabled: props.disableFields, name: "question_" + question.clientQuestionId.toString(), component: FutureDatePicker, valuedata: null, minDate: new Date(), textBlur: function (event) {
1109
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1110
+ }, showYearDropdown: true, autoComplete: "off" })))));
997
1111
  if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.SSN)
998
1112
  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 })));
1113
+ 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) {
1114
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1115
+ } })));
1000
1116
  if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.EIN)
1001
1117
  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 })));
1118
+ 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) {
1119
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1120
+ } })));
1003
1121
  if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.ROUTINGNUMBER)
1004
1122
  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 })));
1123
+ 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) {
1124
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1125
+ } })));
1006
1126
  if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.Number)
1007
1127
  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 })));
1128
+ 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) {
1129
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1130
+ } })));
1009
1131
  if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.NumericId)
1010
1132
  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 })));
1133
+ 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) {
1134
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1135
+ } })));
1012
1136
  if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.Currency)
1013
1137
  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 })));
1138
+ React.createElement(Field, { disabled: props.disableFields, component: TextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, normalize: NormalizeNumber, textBlur: function (event) {
1139
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1140
+ } })));
1015
1141
  if ((question === null || question === void 0 ? void 0 : question.questionType) === QuestionTypes.ZipCode)
1016
1142
  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 })));
1143
+ 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) {
1144
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1145
+ } })));
1018
1146
  if (question.questionType === QuestionTypes.TaxId)
1019
1147
  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 })));
1148
+ 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) {
1149
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1150
+ } })));
1021
1151
  if (question.questionType === QuestionTypes.AlphaNumeric)
1022
1152
  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 })));
1153
+ 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) {
1154
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1155
+ } })));
1024
1156
  if (question.questionType === QuestionTypes.LabelText)
1025
1157
  return (React.createElement("div", { className: "cdFormGroup" },
1026
1158
  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 +1161,14 @@ var QuestionnaireForm = function (props) {
1029
1161
  React.createElement(Field, { disabled: true, component: DisableTextField, name: "question_" + question.clientQuestionId.toString(), label: question.questionText, helpText: question.helpText, isRequired: question.isRequired, labelText: true })));
1030
1162
  if (question.questionType === QuestionTypes.NumberOfMonths)
1031
1163
  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 })));
1164
+ 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) {
1165
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1166
+ } })));
1033
1167
  if (question.questionType === QuestionTypes.FaxId)
1034
1168
  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 })));
1169
+ 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) {
1170
+ return onTextBlur(event, question.questionId, question.clientQuestionId);
1171
+ } })));
1036
1172
  return null;
1037
1173
  };
1038
1174
  var setIsOpen = function (index) {