@bigbinary/neeto-form-frontend 3.12.5 → 3.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -191,12 +191,12 @@
|
|
|
191
191
|
},
|
|
192
192
|
"domainRestriction": {
|
|
193
193
|
"whitelistedDomains": {
|
|
194
|
-
"label": "
|
|
195
|
-
"description": "
|
|
194
|
+
"label": "Allow email domains",
|
|
195
|
+
"description": "Emails having the following domains will be accepted.",
|
|
196
196
|
"popoverDescription": "Enter domains that should be permitted. Only emails with these domains will be accepted."
|
|
197
197
|
},
|
|
198
198
|
"blacklistedDomains": {
|
|
199
|
-
"label": "
|
|
199
|
+
"label": "Reject email domains",
|
|
200
200
|
"description": "Emails having the following domains will be rejected.",
|
|
201
201
|
"popoverDescription": "Enter domains that should be restricted. Emails with these domains will not be accepted."
|
|
202
202
|
},
|
package/dist/BuildForm.js
CHANGED
|
@@ -980,6 +980,10 @@ var Form$1 = function Form(_ref) {
|
|
|
980
980
|
additionalQuestionKindPattern = _ref.additionalQuestionKindPattern,
|
|
981
981
|
_ref$isEdit = _ref.isEdit,
|
|
982
982
|
isEdit = _ref$isEdit === void 0 ? false : _ref$isEdit;
|
|
983
|
+
var _useState = useState(false),
|
|
984
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
985
|
+
isFieldCodeInvalid = _useState2[0],
|
|
986
|
+
setIsFieldCodeInvalid = _useState2[1];
|
|
983
987
|
var _useTranslation = useTranslation(),
|
|
984
988
|
t = _useTranslation.t;
|
|
985
989
|
var _useFormikContext = useFormikContext(),
|
|
@@ -987,7 +991,9 @@ var Form$1 = function Form(_ref) {
|
|
|
987
991
|
setValues = _useFormikContext.setValues,
|
|
988
992
|
setErrors = _useFormikContext.setErrors,
|
|
989
993
|
setTouched = _useFormikContext.setTouched,
|
|
990
|
-
setFieldValue = _useFormikContext.setFieldValue
|
|
994
|
+
setFieldValue = _useFormikContext.setFieldValue,
|
|
995
|
+
errors = _useFormikContext.errors,
|
|
996
|
+
submitCount = _useFormikContext.submitCount;
|
|
991
997
|
var hideQuestionHelpDoc = useBuildFormStore(path(["formState", "helpDocUrls", "hideQuestion"]));
|
|
992
998
|
var readOnlyHelpDoc = useBuildFormStore(path(["formState", "helpDocUrls", "readOnly"]));
|
|
993
999
|
var responseVisibleOnlyToHostHelpDoc = useBuildFormStore(path(["formState", "helpDocUrls", "responseVisibleOnlyToHost"]));
|
|
@@ -1018,6 +1024,11 @@ var Form$1 = function Form(_ref) {
|
|
|
1018
1024
|
}) : {},
|
|
1019
1025
|
_ref2$questionProps = _ref2.questionProps,
|
|
1020
1026
|
questionProps = _ref2$questionProps === void 0 ? {} : _ref2$questionProps;
|
|
1027
|
+
useEffect(function () {
|
|
1028
|
+
if (submitCount > 0 && isPresent(errors === null || errors === void 0 ? void 0 : errors.fieldCode)) {
|
|
1029
|
+
setIsFieldCodeInvalid(true);
|
|
1030
|
+
}
|
|
1031
|
+
}, [submitCount]);
|
|
1021
1032
|
var isRequired = questionKind && isRequiredField(questionKind);
|
|
1022
1033
|
var isLabelDisabled = questionKind && isDisabledFieldLabel(questionKind);
|
|
1023
1034
|
var isImmutable = questionKind && isImmutableField(questionKind);
|
|
@@ -1100,6 +1111,8 @@ var Form$1 = function Form(_ref) {
|
|
|
1100
1111
|
labelProps: responseVisibleOnlyToHostSwitchLabelProps(responseVisibleOnlyToHostHelpDoc)
|
|
1101
1112
|
})]
|
|
1102
1113
|
}), (shouldShowFieldCode || shouldShowReadOnlySwitch) && /*#__PURE__*/jsx(Accordion, {
|
|
1114
|
+
defaultActiveKey: isFieldCodeInvalid ? 0 : null // This is to open the accordion when field code is invalid
|
|
1115
|
+
,
|
|
1103
1116
|
className: "neeto-form-nano-advanced-properties-accordion",
|
|
1104
1117
|
"data-cy": "advanced-properties-card",
|
|
1105
1118
|
children: /*#__PURE__*/jsx(Accordion.Item, {
|
|
@@ -2160,7 +2173,7 @@ var Form = function Form(_ref) {
|
|
|
2160
2173
|
var _useTranslation = useTranslation(),
|
|
2161
2174
|
t = _useTranslation.t;
|
|
2162
2175
|
var formikContext = useFormikContext();
|
|
2163
|
-
var _useState = useState(
|
|
2176
|
+
var _useState = useState({}),
|
|
2164
2177
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2165
2178
|
selectedQuestion = _useState2[0],
|
|
2166
2179
|
setSelectedQuestion = _useState2[1];
|
|
@@ -2260,7 +2273,7 @@ var Form = function Form(_ref) {
|
|
|
2260
2273
|
}
|
|
2261
2274
|
};
|
|
2262
2275
|
useOnClickOutside(containerRef, function () {
|
|
2263
|
-
return handleSelect(
|
|
2276
|
+
return handleSelect({});
|
|
2264
2277
|
}, {
|
|
2265
2278
|
enabled: !(isDeleteAlertOpen || isManageQuestionPaneOpen)
|
|
2266
2279
|
});
|