@bigbinary/neeto-form-frontend 3.10.26 → 3.11.1
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 +6 -1
- package/dist/BuildForm.js +197 -67
- package/dist/BuildForm.js.map +1 -1
- package/dist/ExternalForm.js +6 -15
- package/dist/ExternalForm.js.map +1 -1
- package/dist/Submission.js +45 -12
- package/dist/Submission.js.map +1 -1
- package/dist/UrlBuilder.js +16 -5
- package/dist/UrlBuilder.js.map +1 -1
- package/dist/{buildForm-D5-1L1Je.js → buildForm-CuAJYr6B.js} +4 -3
- package/dist/buildForm-CuAJYr6B.js.map +1 -0
- package/dist/{buildForm-ZqO8kJoo.js → buildForm-nKLcTFON.js} +4 -3
- package/dist/buildForm-nKLcTFON.js.map +1 -0
- package/dist/cjs/BuildForm.js +252 -122
- package/dist/cjs/BuildForm.js.map +1 -1
- package/dist/cjs/ExternalForm.js +19 -28
- package/dist/cjs/ExternalForm.js.map +1 -1
- package/dist/cjs/Submission.js +44 -11
- package/dist/cjs/Submission.js.map +1 -1
- package/dist/cjs/UrlBuilder.js +17 -6
- package/dist/cjs/UrlBuilder.js.map +1 -1
- package/dist/cjs/hooks.js +9 -9
- package/dist/cjs/index.js +13 -13
- package/dist/{constants-DWy8qlgB.js → constants-CIKOBOUZ.js} +131 -129
- package/dist/constants-CIKOBOUZ.js.map +1 -0
- package/dist/{useFormApi-JO7ZX1kT.js → constants-CkGU4abB.js} +31 -1
- package/dist/constants-CkGU4abB.js.map +1 -0
- package/dist/{constants-C0I-orlh.js → constants-DdGn1rF4.js} +91 -90
- package/dist/constants-DdGn1rF4.js.map +1 -0
- package/dist/{useFormApi-Bp5eA5dg.js → constants-LQk7jxH9.js} +30 -2
- package/dist/constants-LQk7jxH9.js.map +1 -0
- package/dist/hooks.js +4 -4
- package/dist/{index-BL5SirYx.js → index-OmmVAj8-.js} +6 -2
- package/dist/index-OmmVAj8-.js.map +1 -0
- package/dist/{index-2caW4Cx0.js → index-qEhecRV2.js} +6 -1
- package/dist/index-qEhecRV2.js.map +1 -0
- package/dist/index.js +8 -8
- package/dist/{useFormSubmission-w1MbJv37.js → useFormSubmission-Cab-hFHR.js} +3 -3
- package/dist/{useFormSubmission-w1MbJv37.js.map → useFormSubmission-Cab-hFHR.js.map} +1 -1
- package/dist/{useFormSubmission-Bf6ryXlB.js → useFormSubmission-CqQgBLsl.js} +2 -2
- package/dist/{useFormSubmission-Bf6ryXlB.js.map → useFormSubmission-CqQgBLsl.js.map} +1 -1
- package/dist/{utils-Dq-MY0vG.js → utils-DbT-aQHP.js} +99 -52
- package/dist/utils-DbT-aQHP.js.map +1 -0
- package/dist/{utils-DYmocaoL.js → utils-F-H352VB.js} +93 -46
- package/dist/utils-F-H352VB.js.map +1 -0
- package/package.json +13 -13
- package/types.d.ts +3 -1
- package/dist/buildForm-D5-1L1Je.js.map +0 -1
- package/dist/buildForm-ZqO8kJoo.js.map +0 -1
- package/dist/constants-C0I-orlh.js.map +0 -1
- package/dist/constants-DWy8qlgB.js.map +0 -1
- package/dist/index-2caW4Cx0.js.map +0 -1
- package/dist/index-BL5SirYx.js.map +0 -1
- package/dist/useFormApi-Bp5eA5dg.js.map +0 -1
- package/dist/useFormApi-JO7ZX1kT.js.map +0 -1
- package/dist/utils-DYmocaoL.js.map +0 -1
- package/dist/utils-Dq-MY0vG.js.map +0 -1
|
@@ -58,7 +58,8 @@
|
|
|
58
58
|
"remainingItemsCount": "{{count}} more",
|
|
59
59
|
"domain": "Domain",
|
|
60
60
|
"domains": "Domains",
|
|
61
|
-
"viewHelpArticle": "View help article"
|
|
61
|
+
"viewHelpArticle": "View help article",
|
|
62
|
+
"splitAsFirstAndLastNames": "Split as \"First name\" and \"Last name\""
|
|
62
63
|
},
|
|
63
64
|
"fields": {
|
|
64
65
|
"mcf": "Multiple choice",
|
|
@@ -119,7 +120,11 @@
|
|
|
119
120
|
"questionFields": {
|
|
120
121
|
"field": {
|
|
121
122
|
"question": "Question",
|
|
123
|
+
"firstNameQuestion": "First name question",
|
|
124
|
+
"lastNameQuestion": "Last name question",
|
|
122
125
|
"placeholder": "Placeholder text",
|
|
126
|
+
"firstNamePlaceholder": "First name placeholder",
|
|
127
|
+
"lastNamePlaceholder": "Last name placeholder",
|
|
123
128
|
"required": "Required",
|
|
124
129
|
"addOption": "Add new option",
|
|
125
130
|
"option": "Option",
|
package/dist/BuildForm.js
CHANGED
|
@@ -6,10 +6,10 @@ import { useFormikContext, useField, Form as Form$3, Formik } from 'formik';
|
|
|
6
6
|
import { isPresent, truncate, findBy, isNotPresent, slugify, hyphenate, noop, nullSafe, filterBy, removeBy } from '@bigbinary/neeto-cist';
|
|
7
7
|
import { showThumbsUpToastr, withEventTargetValue, hyphenize } from '@bigbinary/neeto-commons-frontend/utils';
|
|
8
8
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
9
|
-
import { equals, path,
|
|
10
|
-
import {
|
|
9
|
+
import { equals, path, curry, assoc, prop, dissoc, when, includes, isEmpty, reject, keys, pick, omit, evolve, map, modify, without, mergeLeft, isNil, pipe, filter, isNotNil, uniq, join, pluck, test, difference, split, last, __, concat, F } from 'ramda';
|
|
10
|
+
import { i as useDeleteQuestion, Q as QUESTION_TYPES, j as useFetchQuestions, k as useCreateQuestion, l as useUpdateQuestion, C as CAPTCHA_TYPES, m as useReorderQuestions, h as QUERY_KEYS } from './constants-LQk7jxH9.js';
|
|
11
11
|
import { Q as QUESTION_KIND } from './constants-Byuu9IoS.js';
|
|
12
|
-
import {
|
|
12
|
+
import { b as buildDisplayLabel, I as INDEPENDENT_LABELS_MAP, i as isElementOverflowing, D as Drag, S as SELECTABLE_KINDS, c as isAutoGeneratedQuestion, d as isRichTextQuestion, N as NON_BASIC_LATIN_CHARACTERS_REGEX, R as RESERVED_FIELD_CODES, L as LABEL_FIELDS, e as isDefaultLanguage, f as buildDisabledAddButtonTooltipProps, h as buildAddQuestionButtonProps, v as validateEditorContent, F as FIELD_CODES_REJECT_CHARS_REGEX, j as isImmutableField, Q as QUESTIONS_WITHOUT_FIELD_CODE, k as NON_HIDEABLE_FIELDS, l as NON_READ_ONLY_FIELDS, m as RICH_TEXT_QUESTIONS, n as FILE_TYPES_MAP, o as FILE_GROUPS, M as MINIMUM_OPTIONS, p as RATING_OPTIONS, q as STAR_RATING_MIN_VALUE_OPTIONS, r as STAR_RATING_MAX_VALUE_OPTIONS, s as STAR_RATING_ICONS_MAP, t as QUESTION_ACTIONS, u as QUESTION_KINDS, w as getActiveQuestionKindDetails, x as DEFAULT_AVAILABLE_LANGUAGES, y as QUESTIONS_INITIAL_VALUE, z as buildReorderPayload, A as MANDATORY_KINDS } from './constants-DdGn1rF4.js';
|
|
13
13
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
14
14
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
15
15
|
import { Droppable, Draggable, DragDropContext } from '@hello-pangea/dnd';
|
|
@@ -17,16 +17,16 @@ import { isMetaKeyPressed, withT, useStateWithDependency, useOnClickOutside } fr
|
|
|
17
17
|
import HelpPopover from '@bigbinary/neeto-molecules/HelpPopover';
|
|
18
18
|
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
19
19
|
import { useTranslation, Trans } from 'react-i18next';
|
|
20
|
-
import { a as useBuildFormStore } from './buildForm-
|
|
20
|
+
import { a as useBuildFormStore } from './buildForm-CuAJYr6B.js';
|
|
21
21
|
import { shallow } from 'zustand/shallow';
|
|
22
22
|
import Alert from '@bigbinary/neetoui/Alert';
|
|
23
|
-
import { f as fieldWithFallback, i as isFunction } from './index-BL5SirYx.js';
|
|
24
23
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
25
24
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
26
25
|
import Modal from '@bigbinary/neetoui/Modal';
|
|
27
26
|
import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
|
|
28
27
|
import Dropdown from '@bigbinary/neetoui/Dropdown';
|
|
29
28
|
import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
29
|
+
import { i as isFunction, f as fieldWithFallback, c as isNameQuestion } from './index-OmmVAj8-.js';
|
|
30
30
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
31
31
|
import { t } from 'i18next';
|
|
32
32
|
import { v4 } from 'uuid';
|
|
@@ -80,7 +80,7 @@ var DeleteAlert = function DeleteAlert(_ref) {
|
|
|
80
80
|
var questionKind = selectedQuestion.kind;
|
|
81
81
|
var independentLabel = INDEPENDENT_LABELS_MAP[questionKind];
|
|
82
82
|
if (isPresent(independentLabel)) return independentLabel;
|
|
83
|
-
var questionLabel =
|
|
83
|
+
var questionLabel = buildDisplayLabel(selectedQuestion);
|
|
84
84
|
return truncate(questionLabel, 40);
|
|
85
85
|
};
|
|
86
86
|
var _useDeleteQuestion = useDeleteQuestion(selectedQuestion === null || selectedQuestion === void 0 ? void 0 : selectedQuestion.formId, selectedLanguage, {
|
|
@@ -280,10 +280,8 @@ var Card = function Card(_ref) {
|
|
|
280
280
|
allQuestionKinds: allQuestionKinds,
|
|
281
281
|
item: question
|
|
282
282
|
}),
|
|
283
|
-
kind = _getActiveKindDetails.kind,
|
|
284
283
|
isSingular = _getActiveKindDetails.isSingular;
|
|
285
|
-
var
|
|
286
|
-
var questionLabel = isRichTextQuestion(kind) ? htmlToPlainText(label) : label;
|
|
284
|
+
var questionLabel = buildDisplayLabel(question);
|
|
287
285
|
useEffect(function () {
|
|
288
286
|
var element = questionLabelRef.current;
|
|
289
287
|
if (isNotPresent(element)) return;
|
|
@@ -346,8 +344,8 @@ var Card = function Card(_ref) {
|
|
|
346
344
|
});
|
|
347
345
|
};
|
|
348
346
|
|
|
349
|
-
function ownKeys$
|
|
350
|
-
function _objectSpread$
|
|
347
|
+
function ownKeys$g(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; }
|
|
348
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
351
349
|
var Questions = function Questions(_ref) {
|
|
352
350
|
var questions = _ref.questions,
|
|
353
351
|
isDeletable = _ref.isDeletable,
|
|
@@ -364,7 +362,7 @@ var Questions = function Questions(_ref) {
|
|
|
364
362
|
var droppableProps = _ref2.droppableProps,
|
|
365
363
|
placeholder = _ref2.placeholder,
|
|
366
364
|
innerRef = _ref2.innerRef;
|
|
367
|
-
return /*#__PURE__*/jsxs("div", _objectSpread$
|
|
365
|
+
return /*#__PURE__*/jsxs("div", _objectSpread$g(_objectSpread$g({}, droppableProps), {}, {
|
|
368
366
|
className: "space-y-2",
|
|
369
367
|
ref: innerRef,
|
|
370
368
|
children: [questions.map(function (question, index) {
|
|
@@ -377,7 +375,7 @@ var Questions = function Questions(_ref) {
|
|
|
377
375
|
var draggableProps = _ref3.draggableProps,
|
|
378
376
|
dragHandleProps = _ref3.dragHandleProps,
|
|
379
377
|
innerRef = _ref3.innerRef;
|
|
380
|
-
return /*#__PURE__*/jsx("div", _objectSpread$
|
|
378
|
+
return /*#__PURE__*/jsx("div", _objectSpread$g(_objectSpread$g(_objectSpread$g({}, draggableProps), dragHandleProps), {}, {
|
|
381
379
|
ref: innerRef,
|
|
382
380
|
children: /*#__PURE__*/jsx(Card, {
|
|
383
381
|
allQuestionKinds: allQuestionKinds,
|
|
@@ -409,8 +407,8 @@ var arrayHelpers = {
|
|
|
409
407
|
moveItem: moveItem
|
|
410
408
|
};
|
|
411
409
|
|
|
412
|
-
function ownKeys$
|
|
413
|
-
function _objectSpread$
|
|
410
|
+
function ownKeys$f(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; }
|
|
411
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
414
412
|
var isChoiceQuestion = function isChoiceQuestion(question) {
|
|
415
413
|
return includes(question === null || question === void 0 ? void 0 : question.kind, SELECTABLE_KINDS);
|
|
416
414
|
};
|
|
@@ -429,7 +427,7 @@ var getUniqueNumbersFromExistingFieldCodes = function getUniqueNumbersFromExisti
|
|
|
429
427
|
};
|
|
430
428
|
var generateFieldCodePrefix = function generateFieldCodePrefix(label, kind) {
|
|
431
429
|
var prefix;
|
|
432
|
-
if (NON_BASIC_LATIN_CHARACTERS_REGEX.test(label) || isEmpty(label)) {
|
|
430
|
+
if (isNameQuestion(kind) || NON_BASIC_LATIN_CHARACTERS_REGEX.test(label) || isEmpty(label)) {
|
|
433
431
|
prefix = kind;
|
|
434
432
|
} else {
|
|
435
433
|
var sanitizedLabel = underscoredWithoutSpecialCharacters(label).slice(0, 30);
|
|
@@ -437,11 +435,17 @@ var generateFieldCodePrefix = function generateFieldCodePrefix(label, kind) {
|
|
|
437
435
|
}
|
|
438
436
|
return addSuffixForReservedFieldCode(prefix) || "";
|
|
439
437
|
};
|
|
438
|
+
var renameKey = curry(function (oldKey, newKey, obj) {
|
|
439
|
+
return assoc(newKey, prop(oldKey, obj), dissoc(oldKey, obj));
|
|
440
|
+
});
|
|
440
441
|
var modifyDefaultValues = function modifyDefaultValues(_ref) {
|
|
441
442
|
var values = _ref.values,
|
|
442
443
|
kind = _ref.kind,
|
|
443
444
|
selectedLanguage = _ref.selectedLanguage,
|
|
444
445
|
isUsingDefaultQuestionKinds = _ref.isUsingDefaultQuestionKinds;
|
|
446
|
+
if (isNameQuestion(kind)) {
|
|
447
|
+
return renameKey(LABEL_FIELDS.DEFAULT, LABEL_FIELDS.FULL_NAME, values);
|
|
448
|
+
}
|
|
445
449
|
if (!includes(kind, SELECTABLE_KINDS) || isDefaultLanguage(selectedLanguage) || !isUsingDefaultQuestionKinds) {
|
|
446
450
|
return values;
|
|
447
451
|
}
|
|
@@ -486,7 +490,7 @@ var handleFieldDragEnd = function handleFieldDragEnd(_ref4) {
|
|
|
486
490
|
var nextItems = _toConsumableArray(items);
|
|
487
491
|
arrayHelpers.moveItem(nextItems, source.index, destination.index);
|
|
488
492
|
var orderedItems = nextItems.map(function (item, index) {
|
|
489
|
-
return _objectSpread$
|
|
493
|
+
return _objectSpread$f(_objectSpread$f({}, item), {}, {
|
|
490
494
|
displayOrder: index
|
|
491
495
|
});
|
|
492
496
|
});
|
|
@@ -508,7 +512,7 @@ var createFieldData = function createFieldData(_ref5) {
|
|
|
508
512
|
selectedLanguage: selectedLanguage,
|
|
509
513
|
isUsingDefaultQuestionKinds: isUsingDefaultQuestionKinds
|
|
510
514
|
});
|
|
511
|
-
return _objectSpread$
|
|
515
|
+
return _objectSpread$f(_objectSpread$f({}, modifiedDefaultValues), {}, {
|
|
512
516
|
metadata: metadata,
|
|
513
517
|
isRequired: isRequired,
|
|
514
518
|
kind: type,
|
|
@@ -536,7 +540,7 @@ var duplicateFieldData = function duplicateFieldData(_ref6) {
|
|
|
536
540
|
var newQuestionLabel = isRichTextQuestion(kind) ? label : t("neetoForm.common.clonedElementLabel", {
|
|
537
541
|
label: label
|
|
538
542
|
});
|
|
539
|
-
return _objectSpread$
|
|
543
|
+
return _objectSpread$f(_objectSpread$f({}, defaultAttributes), {}, {
|
|
540
544
|
isRequired: isRequired,
|
|
541
545
|
kind: kind,
|
|
542
546
|
label: newQuestionLabel,
|
|
@@ -615,13 +619,14 @@ var DEFAULT_PLACEHOLDERS = {
|
|
|
615
619
|
var INITIAL_VALUES = {
|
|
616
620
|
kind: "",
|
|
617
621
|
label: "",
|
|
618
|
-
fieldCode: ""
|
|
622
|
+
fieldCode: "",
|
|
623
|
+
isSplitMode: false
|
|
619
624
|
};
|
|
620
625
|
var VALID_FIELD_CODE_REGEX = /^[a-z0-9]+(_[a-z0-9]+)*$/;
|
|
621
626
|
|
|
622
627
|
var _excluded$8 = ["label", "name"];
|
|
623
|
-
function ownKeys$
|
|
624
|
-
function _objectSpread$
|
|
628
|
+
function ownKeys$e(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; }
|
|
629
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
625
630
|
var FormikAdaptiveInput = function FormikAdaptiveInput(_ref) {
|
|
626
631
|
var label = _ref.label,
|
|
627
632
|
name = _ref.name,
|
|
@@ -640,7 +645,7 @@ var FormikAdaptiveInput = function FormikAdaptiveInput(_ref) {
|
|
|
640
645
|
var end = element.value.length;
|
|
641
646
|
element.setSelectionRange(end, end);
|
|
642
647
|
};
|
|
643
|
-
return /*#__PURE__*/jsx(Textarea, _objectSpread$
|
|
648
|
+
return /*#__PURE__*/jsx(Textarea, _objectSpread$e({
|
|
644
649
|
label: label,
|
|
645
650
|
name: name,
|
|
646
651
|
className: "neeto-form-nano-adaptive-input",
|
|
@@ -654,6 +659,132 @@ var FormikAdaptiveInput = function FormikAdaptiveInput(_ref) {
|
|
|
654
659
|
}, otherProps));
|
|
655
660
|
};
|
|
656
661
|
|
|
662
|
+
function ownKeys$d(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; }
|
|
663
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
664
|
+
var LabelWithPlaceholder = function LabelWithPlaceholder(_ref) {
|
|
665
|
+
var kind = _ref.kind,
|
|
666
|
+
isLabelDisabled = _ref.isLabelDisabled,
|
|
667
|
+
handleLabelChange = _ref.handleLabelChange,
|
|
668
|
+
_ref$labelProps = _ref.labelProps,
|
|
669
|
+
labelProps = _ref$labelProps === void 0 ? {} : _ref$labelProps,
|
|
670
|
+
_ref$placeholderProps = _ref.placeholderProps,
|
|
671
|
+
placeholderProps = _ref$placeholderProps === void 0 ? {} : _ref$placeholderProps;
|
|
672
|
+
var _useTranslation = useTranslation(),
|
|
673
|
+
t = _useTranslation.t;
|
|
674
|
+
var shouldShowPlaceholder = includes(kind, QUESTIONS_WITH_PLACEHOLDERS);
|
|
675
|
+
return /*#__PURE__*/jsxs("div", {
|
|
676
|
+
className: "space-y-4",
|
|
677
|
+
children: [/*#__PURE__*/jsx(FormikAdaptiveInput, _objectSpread$d({
|
|
678
|
+
required: true,
|
|
679
|
+
disabled: isLabelDisabled,
|
|
680
|
+
label: t("neetoForm.questions.common.questionFields.field.question"),
|
|
681
|
+
name: "label",
|
|
682
|
+
placeholder: DEFAULT_PLACEHOLDERS[kind],
|
|
683
|
+
onChange: withEventTargetValue(handleLabelChange)
|
|
684
|
+
}, labelProps)), shouldShowPlaceholder && /*#__PURE__*/jsx(FormikAdaptiveInput, _objectSpread$d({
|
|
685
|
+
className: "neeto-form-nano-placeholder-input neeto-form-nano-placeholder-input-".concat(kind),
|
|
686
|
+
name: "placeholder",
|
|
687
|
+
label: t("neetoForm.questions.common.questionFields.field.placeholder")
|
|
688
|
+
}, placeholderProps))]
|
|
689
|
+
});
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
function ownKeys$c(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; }
|
|
693
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
694
|
+
var Name = function Name(_ref) {
|
|
695
|
+
var isLabelDisabled = _ref.isLabelDisabled,
|
|
696
|
+
_handleLabelChange = _ref.handleLabelChange;
|
|
697
|
+
var _useFormikContext = useFormikContext(),
|
|
698
|
+
_useFormikContext$val = _useFormikContext.values.isSplitMode,
|
|
699
|
+
isSplitMode = _useFormikContext$val === void 0 ? false : _useFormikContext$val;
|
|
700
|
+
var _useTranslation = useTranslation(),
|
|
701
|
+
t = _useTranslation.t;
|
|
702
|
+
var usesCustomSubmissionComponent = useBuildFormStore(path(["formState", "usesCustomSubmissionComponent"]));
|
|
703
|
+
var commonProps = {
|
|
704
|
+
kind: QUESTION_TYPES.NAME,
|
|
705
|
+
isLabelDisabled: isLabelDisabled
|
|
706
|
+
};
|
|
707
|
+
return /*#__PURE__*/jsxs("div", {
|
|
708
|
+
className: "space-y-4",
|
|
709
|
+
children: [!usesCustomSubmissionComponent && /*#__PURE__*/jsx(Switch, {
|
|
710
|
+
label: t("neetoForm.common.splitAsFirstAndLastNames"),
|
|
711
|
+
name: "isSplitMode"
|
|
712
|
+
}), isSplitMode && !usesCustomSubmissionComponent ? /*#__PURE__*/jsxs(Fragment, {
|
|
713
|
+
children: [/*#__PURE__*/jsx(LabelWithPlaceholder, _objectSpread$c(_objectSpread$c({}, commonProps), {}, {
|
|
714
|
+
handleLabelChange: function handleLabelChange(value) {
|
|
715
|
+
return _handleLabelChange(value, LABEL_FIELDS.FIRST_NAME);
|
|
716
|
+
},
|
|
717
|
+
labelProps: {
|
|
718
|
+
label: t("neetoForm.questions.common.questionFields.field.firstNameQuestion"),
|
|
719
|
+
name: LABEL_FIELDS.FIRST_NAME
|
|
720
|
+
},
|
|
721
|
+
placeholderProps: {
|
|
722
|
+
label: t("neetoForm.questions.common.questionFields.field.firstNamePlaceholder"),
|
|
723
|
+
name: "firstNamePlaceholder"
|
|
724
|
+
}
|
|
725
|
+
})), /*#__PURE__*/jsx(LabelWithPlaceholder, _objectSpread$c(_objectSpread$c({}, commonProps), {}, {
|
|
726
|
+
handleLabelChange: function handleLabelChange(value) {
|
|
727
|
+
return _handleLabelChange(value, LABEL_FIELDS.LAST_NAME);
|
|
728
|
+
},
|
|
729
|
+
labelProps: {
|
|
730
|
+
label: t("neetoForm.questions.common.questionFields.field.lastNameQuestion"),
|
|
731
|
+
name: LABEL_FIELDS.LAST_NAME
|
|
732
|
+
},
|
|
733
|
+
placeholderProps: {
|
|
734
|
+
label: t("neetoForm.questions.common.questionFields.field.lastNamePlaceholder"),
|
|
735
|
+
name: "lastNamePlaceholder"
|
|
736
|
+
}
|
|
737
|
+
}))]
|
|
738
|
+
}) : /*#__PURE__*/jsx(LabelWithPlaceholder, _objectSpread$c(_objectSpread$c({}, commonProps), {}, {
|
|
739
|
+
labelProps: {
|
|
740
|
+
name: LABEL_FIELDS.FULL_NAME
|
|
741
|
+
},
|
|
742
|
+
placeholderProps: {
|
|
743
|
+
name: "fullNamePlaceholder"
|
|
744
|
+
},
|
|
745
|
+
handleLabelChange: function handleLabelChange(value) {
|
|
746
|
+
return _handleLabelChange(value, LABEL_FIELDS.FULL_NAME);
|
|
747
|
+
}
|
|
748
|
+
}))]
|
|
749
|
+
});
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
var Properties = function Properties(_ref) {
|
|
753
|
+
var kind = _ref.kind,
|
|
754
|
+
isLabelDisabled = _ref.isLabelDisabled,
|
|
755
|
+
handleLabelChange = _ref.handleLabelChange,
|
|
756
|
+
questionProps = _ref.questionProps;
|
|
757
|
+
var _useBuildFormStore = useBuildFormStore(function (store) {
|
|
758
|
+
var _store$formState, _store$formState2;
|
|
759
|
+
return {
|
|
760
|
+
enableDomainWhitelisting: (_store$formState = store["formState"]) === null || _store$formState === void 0 ? void 0 : _store$formState["enableDomainWhitelisting"],
|
|
761
|
+
enableDomainBlacklisting: (_store$formState2 = store["formState"]) === null || _store$formState2 === void 0 ? void 0 : _store$formState2["enableDomainBlacklisting"]
|
|
762
|
+
};
|
|
763
|
+
}, shallow),
|
|
764
|
+
enableDomainWhitelisting = _useBuildFormStore.enableDomainWhitelisting,
|
|
765
|
+
enableDomainBlacklisting = _useBuildFormStore.enableDomainBlacklisting;
|
|
766
|
+
var hasAdditionalData = includes(kind, QUESTIONS_WITH_ADDITIONAL_DATA);
|
|
767
|
+
if (isNameQuestion(kind)) {
|
|
768
|
+
return /*#__PURE__*/jsx(Name, {
|
|
769
|
+
handleLabelChange: handleLabelChange,
|
|
770
|
+
isLabelDisabled: isLabelDisabled
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
return /*#__PURE__*/jsxs("div", {
|
|
774
|
+
className: "space-y-4",
|
|
775
|
+
children: [/*#__PURE__*/jsx(LabelWithPlaceholder, {
|
|
776
|
+
handleLabelChange: handleLabelChange,
|
|
777
|
+
isLabelDisabled: isLabelDisabled,
|
|
778
|
+
kind: kind
|
|
779
|
+
}), hasAdditionalData && renderAdditionalData({
|
|
780
|
+
kind: kind,
|
|
781
|
+
questionProps: questionProps,
|
|
782
|
+
enableDomainWhitelisting: enableDomainWhitelisting,
|
|
783
|
+
enableDomainBlacklisting: enableDomainBlacklisting
|
|
784
|
+
})]
|
|
785
|
+
});
|
|
786
|
+
};
|
|
787
|
+
|
|
657
788
|
var Block = function Block(_ref) {
|
|
658
789
|
var title = _ref.title,
|
|
659
790
|
children = _ref.children,
|
|
@@ -861,17 +992,13 @@ var Form$1 = function Form(_ref) {
|
|
|
861
992
|
var hideQuestionHelpDoc = useBuildFormStore(path(["formState", "helpDocUrls", "hideQuestion"]));
|
|
862
993
|
var readOnlyHelpDoc = useBuildFormStore(path(["formState", "helpDocUrls", "readOnly"]));
|
|
863
994
|
var _useBuildFormStore = useBuildFormStore(function (store) {
|
|
864
|
-
var _store$formState, _store$formState2, _store$formState3
|
|
995
|
+
var _store$formState, _store$formState2, _store$formState3;
|
|
865
996
|
return {
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
selectedLanguage: (_store$formState4 = store["formState"]) === null || _store$formState4 === void 0 ? void 0 : _store$formState4["selectedLanguage"],
|
|
870
|
-
isUsingDefaultQuestionKinds: (_store$formState5 = store["formState"]) === null || _store$formState5 === void 0 ? void 0 : _store$formState5["isUsingDefaultQuestionKinds"]
|
|
997
|
+
showReadOnlySwitch: (_store$formState = store["formState"]) === null || _store$formState === void 0 ? void 0 : _store$formState["showReadOnlySwitch"],
|
|
998
|
+
selectedLanguage: (_store$formState2 = store["formState"]) === null || _store$formState2 === void 0 ? void 0 : _store$formState2["selectedLanguage"],
|
|
999
|
+
isUsingDefaultQuestionKinds: (_store$formState3 = store["formState"]) === null || _store$formState3 === void 0 ? void 0 : _store$formState3["isUsingDefaultQuestionKinds"]
|
|
871
1000
|
};
|
|
872
1001
|
}, shallow),
|
|
873
|
-
enableDomainWhitelisting = _useBuildFormStore.enableDomainWhitelisting,
|
|
874
|
-
enableDomainBlacklisting = _useBuildFormStore.enableDomainBlacklisting,
|
|
875
1002
|
showReadOnlySwitch = _useBuildFormStore.showReadOnlySwitch,
|
|
876
1003
|
selectedLanguage = _useBuildFormStore.selectedLanguage,
|
|
877
1004
|
isUsingDefaultQuestionKinds = _useBuildFormStore.isUsingDefaultQuestionKinds;
|
|
@@ -892,8 +1019,6 @@ var Form$1 = function Form(_ref) {
|
|
|
892
1019
|
var isRequired = questionKind && isRequiredField(questionKind);
|
|
893
1020
|
var isLabelDisabled = questionKind && isDisabledFieldLabel(questionKind);
|
|
894
1021
|
var isImmutable = questionKind && isImmutableField(questionKind);
|
|
895
|
-
var shouldShowPlaceholder = includes(kind, QUESTIONS_WITH_PLACEHOLDERS);
|
|
896
|
-
var hasAdditionalData = includes(kind, QUESTIONS_WITH_ADDITIONAL_DATA);
|
|
897
1022
|
var shouldShowFieldCode = enableFieldCode && !includes(kind, QUESTIONS_WITHOUT_FIELD_CODE);
|
|
898
1023
|
var shouldShowHideSwitch = !includes(kind, NON_HIDEABLE_FIELDS);
|
|
899
1024
|
var shouldShowReadOnlySwitch = showReadOnlySwitch && !includes(kind, NON_READ_ONLY_FIELDS);
|
|
@@ -927,7 +1052,8 @@ var Form$1 = function Form(_ref) {
|
|
|
927
1052
|
setTouched({});
|
|
928
1053
|
};
|
|
929
1054
|
var handleLabelChange = function handleLabelChange(label) {
|
|
930
|
-
|
|
1055
|
+
var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : LABEL_FIELDS.DEFAULT;
|
|
1056
|
+
setFieldValue(name, label);
|
|
931
1057
|
if (isEdit) return;
|
|
932
1058
|
var uniqueFieldCode = generateUniqueFieldCode({
|
|
933
1059
|
questions: questions,
|
|
@@ -953,25 +1079,11 @@ var Form$1 = function Form(_ref) {
|
|
|
953
1079
|
isLabelDisabled: isLabelDisabled
|
|
954
1080
|
}) : /*#__PURE__*/jsxs("div", {
|
|
955
1081
|
className: "space-y-6",
|
|
956
|
-
children: [/*#__PURE__*/
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
name: "label",
|
|
962
|
-
placeholder: DEFAULT_PLACEHOLDERS[kind],
|
|
963
|
-
label: t("neetoForm.questions.common.questionFields.field.question"),
|
|
964
|
-
onChange: withEventTargetValue(handleLabelChange)
|
|
965
|
-
}), shouldShowPlaceholder && /*#__PURE__*/jsx(FormikAdaptiveInput, {
|
|
966
|
-
className: "neeto-form-nano-placeholder-input neeto-form-nano-placeholder-input-".concat(kind),
|
|
967
|
-
name: "placeholder",
|
|
968
|
-
label: t("neetoForm.questions.common.questionFields.field.placeholder")
|
|
969
|
-
}), hasAdditionalData && renderAdditionalData({
|
|
970
|
-
kind: kind,
|
|
971
|
-
questionProps: questionProps,
|
|
972
|
-
enableDomainWhitelisting: enableDomainWhitelisting,
|
|
973
|
-
enableDomainBlacklisting: enableDomainBlacklisting
|
|
974
|
-
})]
|
|
1082
|
+
children: [/*#__PURE__*/jsx(Properties, {
|
|
1083
|
+
handleLabelChange: handleLabelChange,
|
|
1084
|
+
isLabelDisabled: isLabelDisabled,
|
|
1085
|
+
kind: kind,
|
|
1086
|
+
questionProps: questionProps
|
|
975
1087
|
}), isSettingsBlockVisible && /*#__PURE__*/jsxs(Block, {
|
|
976
1088
|
dataCy: "settings-card",
|
|
977
1089
|
title: t("neetoForm.common.settings"),
|
|
@@ -1019,17 +1131,30 @@ var richTextFieldMissingErrorMessage = function richTextFieldMissingErrorMessage
|
|
|
1019
1131
|
field: field
|
|
1020
1132
|
});
|
|
1021
1133
|
};
|
|
1022
|
-
var
|
|
1023
|
-
|
|
1134
|
+
var buildLabelValidationSchema = function buildLabelValidationSchema(kind, schema) {
|
|
1135
|
+
if (isNameQuestion(kind)) {
|
|
1136
|
+
return schema.notRequired();
|
|
1137
|
+
}
|
|
1138
|
+
return includes(kind, RICH_TEXT_QUESTIONS) ? schema.test("required", richTextFieldMissingErrorMessage(kind), function (value) {
|
|
1139
|
+
return !isEditorEmpty(value);
|
|
1140
|
+
}) : requiredLabelValidation(schema, t("neetoForm.questions.common.questionFields.field.question"));
|
|
1141
|
+
};
|
|
1142
|
+
var buildNameLabelValidationSchema = function buildNameLabelValidationSchema(question, schema) {
|
|
1143
|
+
var isFullName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
1144
|
+
var isRequired = isFullName ? !question.isSplitMode : question.isSplitMode;
|
|
1145
|
+
return isNameQuestion(question.kind) && isRequired ? requiredLabelValidation(schema, t("neetoForm.questions.common.questionFields.field.question")) : schema.notRequired();
|
|
1146
|
+
};
|
|
1147
|
+
var stringSchema = yup.string();
|
|
1148
|
+
var formValidationSchema = function formValidationSchema(question) {
|
|
1149
|
+
var enableFieldCode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1024
1150
|
return yup.object().shape({
|
|
1025
1151
|
kind: yup.string().trim().required(t("neetoForm.common.fieldReq", {
|
|
1026
1152
|
field: t("neetoForm.questions.common.questionFields.field.questionType")
|
|
1027
1153
|
})),
|
|
1028
|
-
label: yup.string().when("kind",
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
}),
|
|
1154
|
+
label: yup.string().when("kind", buildLabelValidationSchema),
|
|
1155
|
+
fullNameLabel: buildNameLabelValidationSchema(question, stringSchema, true),
|
|
1156
|
+
firstNameLabel: buildNameLabelValidationSchema(question, stringSchema),
|
|
1157
|
+
lastNameLabel: buildNameLabelValidationSchema(question, stringSchema),
|
|
1033
1158
|
fieldCode: yup.string().trim().notOneOf(RESERVED_FIELD_CODES, t("neetoForm.error.invalidFieldCode")).when("kind", function (kind, schema) {
|
|
1034
1159
|
return enableFieldCode && !includes(kind, QUESTIONS_WITHOUT_FIELD_CODE) ? fieldCodeValidation(schema, t("neetoForm.questions.common.questionFields.field.fieldCode")) : schema.notRequired();
|
|
1035
1160
|
}),
|
|
@@ -1105,7 +1230,7 @@ var Add = function Add(_ref) {
|
|
|
1105
1230
|
}), /*#__PURE__*/jsx(Form$2, {
|
|
1106
1231
|
formikProps: {
|
|
1107
1232
|
initialValues: INITIAL_VALUES,
|
|
1108
|
-
validationSchema: formValidationSchema(props["enableFieldCode"]),
|
|
1233
|
+
validationSchema: formValidationSchema(INITIAL_VALUES, props["enableFieldCode"]),
|
|
1109
1234
|
onSubmit: handleSubmit
|
|
1110
1235
|
},
|
|
1111
1236
|
children: /*#__PURE__*/jsxs(Fragment, {
|
|
@@ -1175,7 +1300,7 @@ var Edit = function Edit(_ref) {
|
|
|
1175
1300
|
}), /*#__PURE__*/jsx(Form$2, {
|
|
1176
1301
|
formikProps: {
|
|
1177
1302
|
initialValues: question,
|
|
1178
|
-
validationSchema: formValidationSchema(props["enableFieldCode"]),
|
|
1303
|
+
validationSchema: formValidationSchema(question, props["enableFieldCode"]),
|
|
1179
1304
|
onSubmit: handleSubmit
|
|
1180
1305
|
},
|
|
1181
1306
|
children: /*#__PURE__*/jsxs(Fragment, {
|
|
@@ -1970,7 +2095,7 @@ var AddQuestion = function AddQuestion(_ref) {
|
|
|
1970
2095
|
}));
|
|
1971
2096
|
};
|
|
1972
2097
|
|
|
1973
|
-
var _excluded = ["questionKinds", "onValueChange", "formId", "isDeletable", "isRequiredField", "submitButtonProps", "cancelButtonProps", "isKindAlreadyActive", "getActiveKindDetails", "isDisabledFieldLabel", "disabledAddButtonTooltipProps", "enableFieldCode", "isFormEnabled", "savedTitle", "formTitle", "formDescription", "selectedLanguage", "availableLanguages", "onLanguageChange", "additionalActionOptions", "isReordering", "additionalQuestionKindPattern", "showActionBlock", "showReadOnlySwitch", "buildRequestArgs", "enableDomainBlacklisting", "enableDomainWhitelisting", "helpDocUrls", "hostSpecificData", "questionsHelpProps", "isUsingDefaultQuestionKinds"];
|
|
2098
|
+
var _excluded = ["questionKinds", "onValueChange", "formId", "isDeletable", "isRequiredField", "submitButtonProps", "cancelButtonProps", "isKindAlreadyActive", "getActiveKindDetails", "isDisabledFieldLabel", "disabledAddButtonTooltipProps", "enableFieldCode", "isFormEnabled", "savedTitle", "formTitle", "formDescription", "selectedLanguage", "availableLanguages", "onLanguageChange", "additionalActionOptions", "isReordering", "additionalQuestionKindPattern", "showActionBlock", "showReadOnlySwitch", "buildRequestArgs", "enableDomainBlacklisting", "enableDomainWhitelisting", "helpDocUrls", "hostSpecificData", "questionsHelpProps", "isUsingDefaultQuestionKinds", "usesCustomSubmissionComponent"];
|
|
1974
2099
|
function ownKeys$1(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; }
|
|
1975
2100
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1976
2101
|
var Form = function Form(_ref) {
|
|
@@ -2005,6 +2130,7 @@ var Form = function Form(_ref) {
|
|
|
2005
2130
|
hostSpecificData = _ref.hostSpecificData,
|
|
2006
2131
|
questionsHelpProps = _ref.questionsHelpProps,
|
|
2007
2132
|
isUsingDefaultQuestionKinds = _ref.isUsingDefaultQuestionKinds,
|
|
2133
|
+
usesCustomSubmissionComponent = _ref.usesCustomSubmissionComponent,
|
|
2008
2134
|
formDomProps = _objectWithoutProperties(_ref, _excluded);
|
|
2009
2135
|
var containerRef = useRef();
|
|
2010
2136
|
var _useTranslation = useTranslation(),
|
|
@@ -2060,9 +2186,10 @@ var Form = function Form(_ref) {
|
|
|
2060
2186
|
enableDomainBlacklisting: enableDomainBlacklisting,
|
|
2061
2187
|
enableDomainWhitelisting: enableDomainWhitelisting,
|
|
2062
2188
|
isUsingDefaultQuestionKinds: isUsingDefaultQuestionKinds,
|
|
2063
|
-
showReadOnlySwitch: showReadOnlySwitch
|
|
2189
|
+
showReadOnlySwitch: showReadOnlySwitch,
|
|
2190
|
+
usesCustomSubmissionComponent: usesCustomSubmissionComponent
|
|
2064
2191
|
});
|
|
2065
|
-
}, [formId, isFormEnabled, savedTitle, setFormData, values, dirty, isSubmitting, isValid, errors, submitForm, resetForm, selectedLanguage, helpDocUrls, enableDomainBlacklisting, enableDomainWhitelisting, isUsingDefaultQuestionKinds, showReadOnlySwitch]);
|
|
2192
|
+
}, [formId, isFormEnabled, savedTitle, setFormData, values, dirty, isSubmitting, isValid, errors, submitForm, resetForm, selectedLanguage, helpDocUrls, enableDomainBlacklisting, enableDomainWhitelisting, isUsingDefaultQuestionKinds, showReadOnlySwitch, usesCustomSubmissionComponent]);
|
|
2066
2193
|
var questions = values.questions;
|
|
2067
2194
|
var handleSelect = function handleSelect(question) {
|
|
2068
2195
|
setSelectedQuestion(question);
|
|
@@ -2290,7 +2417,9 @@ var BuildForm = function BuildForm(_ref) {
|
|
|
2290
2417
|
_ref$hostSpecificData = _ref.hostSpecificData,
|
|
2291
2418
|
hostSpecificData = _ref$hostSpecificData === void 0 ? {} : _ref$hostSpecificData,
|
|
2292
2419
|
_ref$showReadOnlySwit = _ref.showReadOnlySwitch,
|
|
2293
|
-
showReadOnlySwitch = _ref$showReadOnlySwit === void 0 ? false : _ref$showReadOnlySwit
|
|
2420
|
+
showReadOnlySwitch = _ref$showReadOnlySwit === void 0 ? false : _ref$showReadOnlySwit,
|
|
2421
|
+
_ref$usesCustomSubmis = _ref.usesCustomSubmissionComponent,
|
|
2422
|
+
usesCustomSubmissionComponent = _ref$usesCustomSubmis === void 0 ? false : _ref$usesCustomSubmis;
|
|
2294
2423
|
var queryClient = useQueryClient();
|
|
2295
2424
|
var _useReorderQuestions = useReorderQuestions(id, {
|
|
2296
2425
|
onSuccess: showThumbsUpToastr
|
|
@@ -2396,7 +2525,8 @@ var BuildForm = function BuildForm(_ref) {
|
|
|
2396
2525
|
selectedLanguage: selectedLanguage,
|
|
2397
2526
|
showActionBlock: showActionBlock,
|
|
2398
2527
|
showReadOnlySwitch: showReadOnlySwitch,
|
|
2399
|
-
submitButtonProps: submitButtonProps
|
|
2528
|
+
submitButtonProps: submitButtonProps,
|
|
2529
|
+
usesCustomSubmissionComponent: usesCustomSubmissionComponent
|
|
2400
2530
|
})), {}, {
|
|
2401
2531
|
formId: id,
|
|
2402
2532
|
questionKinds: isUsingDefaultQuestionKinds ? defaultQuestionKinds : questionKinds,
|