@bigbinary/neeto-form-frontend 3.8.1 → 3.8.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.
|
@@ -56,7 +56,8 @@
|
|
|
56
56
|
"mathCaptcha": "Match captcha",
|
|
57
57
|
"remainingItemsCount": "{{count}} more",
|
|
58
58
|
"domain": "Domain",
|
|
59
|
-
"domains": "Domains"
|
|
59
|
+
"domains": "Domains",
|
|
60
|
+
"viewHelpArticle": "View help article"
|
|
60
61
|
},
|
|
61
62
|
"fields": {
|
|
62
63
|
"mcf": "Multiple choice",
|
|
@@ -128,7 +129,8 @@
|
|
|
128
129
|
"fieldCodeTitle": "Advanced settings",
|
|
129
130
|
"fieldCode": "Field code",
|
|
130
131
|
"fieldCodeHelpDescription": "If you change the field code, any existing shared links containing the old field code as query parameter, will not work correctly. <Link>View help article</Link> for more information.",
|
|
131
|
-
"questionType": "Question type"
|
|
132
|
+
"questionType": "Question type",
|
|
133
|
+
"hideQuestionHelpDescription": "When enabled, this question will not be visible in the created form. It can be used for tracking UTM parameters."
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
},
|
package/dist/BuildForm.js
CHANGED
|
@@ -903,6 +903,7 @@ var Form$1 = function Form(_ref) {
|
|
|
903
903
|
setValues = _useFormikContext.setValues,
|
|
904
904
|
setErrors = _useFormikContext.setErrors,
|
|
905
905
|
setTouched = _useFormikContext.setTouched;
|
|
906
|
+
var hideQuestionHelpDoc = useBuildFormStore(path(["formState", "helpDocUrls", "hideQuestion"]));
|
|
906
907
|
var kind = values.kind;
|
|
907
908
|
var questionKinds = isEdit ? allQuestionKinds : availableQuestionKinds;
|
|
908
909
|
var questionKindUniquenessPattern = mergeLeft(isEdit && additionalQuestionKindPattern ? additionalQuestionKindPattern(values) : {}, {
|
|
@@ -989,6 +990,7 @@ var Form$1 = function Form(_ref) {
|
|
|
989
990
|
title: t("neetoForm.common.settings"),
|
|
990
991
|
children: [!isImmutable && /*#__PURE__*/jsx(RequiredSwitch, {}), shouldShowHideSwitch && /*#__PURE__*/jsx(Switch, {
|
|
991
992
|
label: t("neetoForm.common.hideQuestion"),
|
|
993
|
+
labelProps: hideSwitchLabelProps(hideQuestionHelpDoc),
|
|
992
994
|
name: "isHidden"
|
|
993
995
|
})]
|
|
994
996
|
}), shouldShowFieldCode && /*#__PURE__*/jsx(FieldCode, {})]
|
|
@@ -1943,6 +1945,19 @@ var buildDefaultValueForKind = function buildDefaultValueForKind(questionKind) {
|
|
|
1943
1945
|
value: transformValueForOption(questionKind)
|
|
1944
1946
|
} : undefined;
|
|
1945
1947
|
};
|
|
1948
|
+
var hideSwitchLabelProps = function hideSwitchLabelProps(helpUrl) {
|
|
1949
|
+
return helpUrl ? {
|
|
1950
|
+
helpIconProps: {
|
|
1951
|
+
popoverProps: {
|
|
1952
|
+
description: t("neetoForm.questions.common.questionFields.field.hideQuestionHelpDescription"),
|
|
1953
|
+
helpLinkProps: {
|
|
1954
|
+
href: helpUrl,
|
|
1955
|
+
label: t("neetoForm.common.viewHelpArticle")
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
} : undefined;
|
|
1960
|
+
};
|
|
1946
1961
|
|
|
1947
1962
|
var _excluded$1 = ["isOpen", "onClose", "action", "question", "availableQuestionKinds"];
|
|
1948
1963
|
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|