@bigbinary/neeto-form-frontend 3.8.1 → 3.8.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/app/javascript/src/translations/en.json +4 -2
- package/dist/BuildForm.js +22 -7
- package/dist/BuildForm.js.map +1 -1
- package/dist/ExternalForm.js +5 -9
- package/dist/ExternalForm.js.map +1 -1
- package/dist/Submission.js +2 -2
- package/dist/UrlBuilder.js +5 -11
- package/dist/UrlBuilder.js.map +1 -1
- package/dist/cjs/BuildForm.js +22 -7
- package/dist/cjs/BuildForm.js.map +1 -1
- package/dist/cjs/ExternalForm.js +5 -9
- package/dist/cjs/ExternalForm.js.map +1 -1
- package/dist/cjs/Submission.js +2 -2
- package/dist/cjs/UrlBuilder.js +5 -11
- package/dist/cjs/UrlBuilder.js.map +1 -1
- package/dist/cjs/hooks.js +2 -2
- package/dist/cjs/index.js +6 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/{constants-43eac775.js → constants-4d9fc943.js} +1 -7
- package/dist/{constants-43eac775.js.map → constants-4d9fc943.js.map} +1 -1
- package/dist/{constants-ca5ca2b1.js → constants-56bf4022.js} +2 -2
- package/dist/{constants-ca5ca2b1.js.map → constants-56bf4022.js.map} +1 -1
- package/dist/{constants-3d8a5374.js → constants-75b78b3a.js} +2 -7
- package/dist/{constants-3d8a5374.js.map → constants-75b78b3a.js.map} +1 -1
- package/dist/{constants-669f203a.js → constants-d9148acf.js} +2 -2
- package/dist/{constants-669f203a.js.map → constants-d9148acf.js.map} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/index.js +6 -10
- package/dist/index.js.map +1 -1
- package/dist/main.css +1 -1
- package/dist/main.css.map +1 -1
- package/dist/{useFormApi-ca36173e.js → useFormApi-408d0060.js} +1 -3
- package/dist/useFormApi-408d0060.js.map +1 -0
- package/dist/{useFormApi-d733cb8d.js → useFormApi-e3476a20.js} +2 -3
- package/dist/useFormApi-e3476a20.js.map +1 -0
- package/dist/{useFormSubmission-866195bb.js → useFormSubmission-46db678f.js} +2 -2
- package/dist/{useFormSubmission-866195bb.js.map → useFormSubmission-46db678f.js.map} +1 -1
- package/dist/{useFormSubmission-f8866b84.js → useFormSubmission-e2e84587.js} +2 -2
- package/dist/{useFormSubmission-f8866b84.js.map → useFormSubmission-e2e84587.js.map} +1 -1
- package/dist/{utils-4a844c8d.js → utils-4918956b.js} +60 -529
- package/dist/utils-4918956b.js.map +1 -0
- package/dist/{utils-6b8cacdd.js → utils-e4298243.js} +56 -530
- package/dist/utils-e4298243.js.map +1 -0
- package/package.json +9 -9
- package/dist/useFormApi-ca36173e.js.map +0 -1
- package/dist/useFormApi-d733cb8d.js.map +0 -1
- package/dist/utils-4a844c8d.js.map +0 -1
- package/dist/utils-6b8cacdd.js.map +0 -1
package/dist/cjs/BuildForm.js
CHANGED
|
@@ -9,9 +9,9 @@ var neetoCist = require('@bigbinary/neeto-cist');
|
|
|
9
9
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
10
10
|
var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
|
|
11
11
|
var ramda = require('ramda');
|
|
12
|
-
var useFormApi = require('../useFormApi-
|
|
13
|
-
var constants$1 = require('../constants-
|
|
14
|
-
var constants = require('../constants-
|
|
12
|
+
var useFormApi = require('../useFormApi-408d0060.js');
|
|
13
|
+
var constants$1 = require('../constants-4d9fc943.js');
|
|
14
|
+
var constants = require('../constants-56bf4022.js');
|
|
15
15
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
16
16
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
17
17
|
var dnd = require('@hello-pangea/dnd');
|
|
@@ -962,6 +962,7 @@ var Form$1 = function Form(_ref) {
|
|
|
962
962
|
setValues = _useFormikContext.setValues,
|
|
963
963
|
setErrors = _useFormikContext.setErrors,
|
|
964
964
|
setTouched = _useFormikContext.setTouched;
|
|
965
|
+
var hideQuestionHelpDoc = buildForm.useBuildFormStore(ramda.path(["formState", "helpDocUrls", "hideQuestion"]));
|
|
965
966
|
var kind = values.kind;
|
|
966
967
|
var questionKinds = isEdit ? allQuestionKinds : availableQuestionKinds;
|
|
967
968
|
var questionKindUniquenessPattern = ramda.mergeLeft(isEdit && additionalQuestionKindPattern ? additionalQuestionKindPattern(values) : {}, {
|
|
@@ -1048,6 +1049,7 @@ var Form$1 = function Form(_ref) {
|
|
|
1048
1049
|
title: t("neetoForm.common.settings"),
|
|
1049
1050
|
children: [!isImmutable && /*#__PURE__*/jsxRuntime.jsx(RequiredSwitch, {}), shouldShowHideSwitch && /*#__PURE__*/jsxRuntime.jsx(Switch__default["default"], {
|
|
1050
1051
|
label: t("neetoForm.common.hideQuestion"),
|
|
1052
|
+
labelProps: hideSwitchLabelProps(hideQuestionHelpDoc),
|
|
1051
1053
|
name: "isHidden"
|
|
1052
1054
|
})]
|
|
1053
1055
|
}), shouldShowFieldCode && /*#__PURE__*/jsxRuntime.jsx(FieldCode, {})]
|
|
@@ -2002,6 +2004,19 @@ var buildDefaultValueForKind = function buildDefaultValueForKind(questionKind) {
|
|
|
2002
2004
|
value: transformValueForOption(questionKind)
|
|
2003
2005
|
} : undefined;
|
|
2004
2006
|
};
|
|
2007
|
+
var hideSwitchLabelProps = function hideSwitchLabelProps(helpUrl) {
|
|
2008
|
+
return helpUrl ? {
|
|
2009
|
+
helpIconProps: {
|
|
2010
|
+
popoverProps: {
|
|
2011
|
+
description: i18next.t("neetoForm.questions.common.questionFields.field.hideQuestionHelpDescription"),
|
|
2012
|
+
helpLinkProps: {
|
|
2013
|
+
href: helpUrl,
|
|
2014
|
+
label: i18next.t("neetoForm.common.viewHelpArticle")
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
} : undefined;
|
|
2019
|
+
};
|
|
2005
2020
|
|
|
2006
2021
|
var _excluded$1 = ["isOpen", "onClose", "action", "question", "availableQuestionKinds"];
|
|
2007
2022
|
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; }
|
|
@@ -2201,7 +2216,7 @@ var Form = function Form(_ref) {
|
|
|
2201
2216
|
return setIsDeleteAlertOpen(false);
|
|
2202
2217
|
}
|
|
2203
2218
|
}), /*#__PURE__*/jsxRuntime.jsxs(formik.Form, _objectSpread$1(_objectSpread$1({
|
|
2204
|
-
className: "neeto-form-nano-form-wrapper
|
|
2219
|
+
className: "flex flex-col h-full neeto-form-nano-form-wrapper"
|
|
2205
2220
|
}, formDomProps), {}, {
|
|
2206
2221
|
noValidate: true,
|
|
2207
2222
|
children: [formTitle && /*#__PURE__*/jsxRuntime.jsx(Overview, {
|
|
@@ -2212,7 +2227,7 @@ var Form = function Form(_ref) {
|
|
|
2212
2227
|
title: formTitle,
|
|
2213
2228
|
onLanguageChange: handleLanguageChange
|
|
2214
2229
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2215
|
-
className: "
|
|
2230
|
+
className: "flex-grow w-full min-h-0 pb-6 space-y-6 overflow-y-auto neeto-form-nano-form-wrapper__body md:px-6",
|
|
2216
2231
|
children: hasActiveQuestions ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2217
2232
|
className: "space-y-6",
|
|
2218
2233
|
ref: containerRef,
|
|
@@ -2239,7 +2254,7 @@ var Form = function Form(_ref) {
|
|
|
2239
2254
|
onSelect: handleSelect
|
|
2240
2255
|
})
|
|
2241
2256
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2242
|
-
className: "mb-8
|
|
2257
|
+
className: "w-full mb-8",
|
|
2243
2258
|
children: /*#__PURE__*/jsxRuntime.jsx(AddQuestion, {
|
|
2244
2259
|
disabledAddButtonTooltipProps: disabledAddButtonTooltipProps,
|
|
2245
2260
|
isDisabled: ramda.isEmpty(availableQuestionKinds),
|
|
@@ -2252,7 +2267,7 @@ var Form = function Form(_ref) {
|
|
|
2252
2267
|
onAdd: handleAdd
|
|
2253
2268
|
})
|
|
2254
2269
|
}), (showActionBlock || dirty) && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2255
|
-
className: "neeto-ui-border-gray-300 neeto-form-nano-form-wrapper__footer neeto-ui-bg-white
|
|
2270
|
+
className: "sticky bottom-0 flex justify-end flex-shrink-0 px-6 py-4 border-t neeto-ui-border-gray-300 neeto-form-nano-form-wrapper__footer neeto-ui-bg-white",
|
|
2256
2271
|
children: /*#__PURE__*/jsxRuntime.jsx(ActionBlock__default["default"], {
|
|
2257
2272
|
submitButtonProps: submitButtonProps,
|
|
2258
2273
|
isSubmitting: isReordering,
|