@bigbinary/neeto-form-frontend 3.12.2 → 3.12.4
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 +1 -1
- package/dist/BuildForm.js +23 -20
- package/dist/BuildForm.js.map +1 -1
- package/dist/ExternalForm.js +9 -9
- package/dist/ExternalForm.js.map +1 -1
- package/dist/Submission.js +1 -1
- package/dist/UrlBuilder.js +9 -9
- package/dist/UrlBuilder.js.map +1 -1
- package/dist/{buildForm-3Wdzcz2x.js → buildForm-CkodU5Ns.js} +4 -3
- package/dist/buildForm-CkodU5Ns.js.map +1 -0
- package/dist/{buildForm-C8ATbuv6.js → buildForm-nI7TrULn.js} +4 -3
- package/dist/buildForm-nI7TrULn.js.map +1 -0
- package/dist/cjs/BuildForm.js +22 -19
- package/dist/cjs/BuildForm.js.map +1 -1
- package/dist/cjs/ExternalForm.js +9 -9
- package/dist/cjs/ExternalForm.js.map +1 -1
- package/dist/cjs/Submission.js +1 -1
- package/dist/cjs/UrlBuilder.js +9 -9
- package/dist/cjs/UrlBuilder.js.map +1 -1
- package/dist/cjs/hooks.js +5 -4
- package/dist/cjs/hooks.js.map +1 -1
- package/dist/cjs/index.js +7 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/{constants-DojODK3U.js → constants-B33YjyaT.js} +3 -3
- package/dist/{constants-DojODK3U.js.map → constants-B33YjyaT.js.map} +1 -1
- package/dist/{constants-LQk7jxH9.js → constants-DBuFEVFA.js} +4 -4
- package/dist/constants-DBuFEVFA.js.map +1 -0
- package/dist/{constants-CkGU4abB.js → constants-Dq9-rvtB.js} +4 -4
- package/dist/constants-Dq9-rvtB.js.map +1 -0
- package/dist/{constants-Cg0HQXNC.js → constants-DyjXQHMR.js} +3 -3
- package/dist/{constants-Cg0HQXNC.js.map → constants-DyjXQHMR.js.map} +1 -1
- package/dist/hooks.js +4 -4
- package/dist/{index-OmmVAj8-.js → index-BGEdOqsc.js} +2 -2
- package/dist/{index-OmmVAj8-.js.map → index-BGEdOqsc.js.map} +1 -1
- package/dist/{index-qEhecRV2.js → index-CAtNQTCZ.js} +2 -2
- package/dist/{index-qEhecRV2.js.map → index-CAtNQTCZ.js.map} +1 -1
- package/dist/index.js +6 -6
- package/dist/{useFormSubmission-Cab-hFHR.js → useFormSubmission-Bor3TuEO.js} +2 -2
- package/dist/{useFormSubmission-Cab-hFHR.js.map → useFormSubmission-Bor3TuEO.js.map} +1 -1
- package/dist/{useFormSubmission-CqQgBLsl.js → useFormSubmission-D3Bxhy6g.js} +2 -2
- package/dist/{useFormSubmission-CqQgBLsl.js.map → useFormSubmission-D3Bxhy6g.js.map} +1 -1
- package/dist/{utils-CWpYc-_S.js → utils-O5jbq3ZQ.js} +4 -4
- package/dist/{utils-CWpYc-_S.js.map → utils-O5jbq3ZQ.js.map} +1 -1
- package/dist/{utils-DE2Rc41X.js → utils-vq3PBRhD.js} +4 -4
- package/dist/{utils-DE2Rc41X.js.map → utils-vq3PBRhD.js.map} +1 -1
- package/package.json +25 -24
- package/types.d.ts +7 -1
- package/dist/buildForm-3Wdzcz2x.js.map +0 -1
- package/dist/buildForm-C8ATbuv6.js.map +0 -1
- package/dist/constants-CkGU4abB.js.map +0 -1
- package/dist/constants-LQk7jxH9.js.map +0 -1
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
"blacklistedDomains": {
|
|
199
199
|
"label": "Accept only business emails",
|
|
200
200
|
"description": "Emails having the following domains will be rejected.",
|
|
201
|
-
"popoverDescription": "
|
|
201
|
+
"popoverDescription": "Enter domains that should be restricted. Emails with these domains will not be accepted."
|
|
202
202
|
},
|
|
203
203
|
"helpText": "Press space, tab or enter key after adding a domain.",
|
|
204
204
|
"removeInvalidDomains": "Click here to remove invalid domains.",
|
package/dist/BuildForm.js
CHANGED
|
@@ -6,9 +6,9 @@ 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, 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 {
|
|
11
|
-
import { d as buildDisplayLabel, e as INDEPENDENT_LABELS_MAP, i as isElementOverflowing, D as Drag, f as SELECTABLE_KINDS, h as isAutoGeneratedQuestion, j as isRichTextQuestion, N as NON_BASIC_LATIN_CHARACTERS_REGEX, k as RESERVED_FIELD_CODES, L as LABEL_FIELDS, l as isDefaultLanguage, m as buildDisabledAddButtonTooltipProps, n as buildAddQuestionButtonProps, v as validateEditorContent, F as FIELD_CODES_REJECT_CHARS_REGEX, o as isImmutableField, Q as QUESTIONS_WITHOUT_FIELD_CODE, p as NON_HIDEABLE_FIELDS, q as NON_READ_ONLY_FIELDS, r as RICH_TEXT_QUESTIONS, s as FILE_TYPES_MAP, t as FILE_GROUPS, M as MINIMUM_OPTIONS, u as RATING_OPTIONS, w as STAR_RATING_MIN_VALUE_OPTIONS, x as STAR_RATING_MAX_VALUE_OPTIONS, y as STAR_RATING_ICONS_MAP, z as QUESTION_ACTIONS, A as QUESTION_KINDS, a as QUESTION_KIND, B as getActiveQuestionKindDetails, G as DEFAULT_AVAILABLE_LANGUAGES, H as QUESTIONS_INITIAL_VALUE, J as buildReorderPayload, K as MANDATORY_KINDS } from './constants-
|
|
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, paths, difference, split, last, __, concat, F } from 'ramda';
|
|
10
|
+
import { j as useDeleteQuestion, Q as QUESTION_TYPES, a as useForm, k as useCreateQuestion, l as useUpdateQuestion, C as CAPTCHA_TYPES, m as useReorderQuestions, i as QUERY_KEYS } from './constants-DBuFEVFA.js';
|
|
11
|
+
import { d as buildDisplayLabel, e as INDEPENDENT_LABELS_MAP, i as isElementOverflowing, D as Drag, f as SELECTABLE_KINDS, h as isAutoGeneratedQuestion, j as isRichTextQuestion, N as NON_BASIC_LATIN_CHARACTERS_REGEX, k as RESERVED_FIELD_CODES, L as LABEL_FIELDS, l as isDefaultLanguage, m as buildDisabledAddButtonTooltipProps, n as buildAddQuestionButtonProps, v as validateEditorContent, F as FIELD_CODES_REJECT_CHARS_REGEX, o as isImmutableField, Q as QUESTIONS_WITHOUT_FIELD_CODE, p as NON_HIDEABLE_FIELDS, q as NON_READ_ONLY_FIELDS, r as RICH_TEXT_QUESTIONS, s as FILE_TYPES_MAP, t as FILE_GROUPS, M as MINIMUM_OPTIONS, u as RATING_OPTIONS, w as STAR_RATING_MIN_VALUE_OPTIONS, x as STAR_RATING_MAX_VALUE_OPTIONS, y as STAR_RATING_ICONS_MAP, z as QUESTION_ACTIONS, A as QUESTION_KINDS, a as QUESTION_KIND, B as getActiveQuestionKindDetails, G as DEFAULT_AVAILABLE_LANGUAGES, H as QUESTIONS_INITIAL_VALUE, J as buildReorderPayload, K as MANDATORY_KINDS } from './constants-DyjXQHMR.js';
|
|
12
12
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
13
13
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
14
14
|
import { Droppable, Draggable, DragDropContext } from '@hello-pangea/dnd';
|
|
@@ -16,7 +16,7 @@ import { isMetaKeyPressed, withT, useStateWithDependency, useOnClickOutside } fr
|
|
|
16
16
|
import HelpPopover from '@bigbinary/neeto-molecules/HelpPopover';
|
|
17
17
|
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
18
18
|
import { useTranslation, Trans } from 'react-i18next';
|
|
19
|
-
import { a as useBuildFormStore } from './buildForm-
|
|
19
|
+
import { a as useBuildFormStore } from './buildForm-nI7TrULn.js';
|
|
20
20
|
import { shallow } from 'zustand/shallow';
|
|
21
21
|
import Alert from '@bigbinary/neetoui/Alert';
|
|
22
22
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -25,7 +25,7 @@ import Modal from '@bigbinary/neetoui/Modal';
|
|
|
25
25
|
import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
|
|
26
26
|
import Dropdown from '@bigbinary/neetoui/Dropdown';
|
|
27
27
|
import Tooltip from '@bigbinary/neetoui/Tooltip';
|
|
28
|
-
import { i as isFunction, f as fieldWithFallback, c as isNameQuestion } from './index-
|
|
28
|
+
import { i as isFunction, f as fieldWithFallback, c as isNameQuestion } from './index-BGEdOqsc.js';
|
|
29
29
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
30
30
|
import { t } from 'i18next';
|
|
31
31
|
import { v4 } from 'uuid';
|
|
@@ -843,11 +843,11 @@ var useUpdateEditorContent = function useUpdateEditorContent(_ref) {
|
|
|
843
843
|
setEditorContent(initialValue);
|
|
844
844
|
setFormData(modify("richTextFieldsToReset", without([fieldCode])));
|
|
845
845
|
}
|
|
846
|
-
var
|
|
846
|
+
var _useForm = useForm({
|
|
847
847
|
formId: formId,
|
|
848
848
|
language: language
|
|
849
849
|
}),
|
|
850
|
-
data =
|
|
850
|
+
data = _useForm.data;
|
|
851
851
|
useEffect(function () {
|
|
852
852
|
if (!data) return;
|
|
853
853
|
var pathArray = fieldName.split(".").map(function (part) {
|
|
@@ -1694,11 +1694,14 @@ var RestrictDomainsBlock = function RestrictDomainsBlock(_ref) {
|
|
|
1694
1694
|
var switchName = _ref.switchName,
|
|
1695
1695
|
domainName = _ref.domainName,
|
|
1696
1696
|
isDomainRestrictionEnabled = _ref.isDomainRestrictionEnabled;
|
|
1697
|
-
var
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
var
|
|
1697
|
+
var _useBuildFormStore = useBuildFormStore(paths([["formState", "helpDocUrls", domainName], ["formState", "hostSpecificData", domainName]])),
|
|
1698
|
+
_useBuildFormStore2 = _slicedToArray(_useBuildFormStore, 2),
|
|
1699
|
+
helpLink = _useBuildFormStore2[0],
|
|
1700
|
+
hostSpecificTranslations = _useBuildFormStore2[1];
|
|
1701
|
+
var _mergeLeft = mergeLeft(hostSpecificTranslations, DOMAIN_RESTRICTION_TRANSLATIONS[domainName]),
|
|
1702
|
+
title = _mergeLeft.title,
|
|
1703
|
+
description = _mergeLeft.description,
|
|
1704
|
+
popoverDescription = _mergeLeft.popoverDescription;
|
|
1702
1705
|
return /*#__PURE__*/jsxs("div", {
|
|
1703
1706
|
className: "flex flex-col space-y-4",
|
|
1704
1707
|
"data-cy": "".concat(hyphenate(switchName), "-container"),
|
|
@@ -2209,9 +2212,10 @@ var Form = function Form(_ref) {
|
|
|
2209
2212
|
isUsingDefaultQuestionKinds: isUsingDefaultQuestionKinds,
|
|
2210
2213
|
showReadOnlySwitch: showReadOnlySwitch,
|
|
2211
2214
|
showResponseVisibleOnlyToHostSwitch: showResponseVisibleOnlyToHostSwitch,
|
|
2212
|
-
usesCustomSubmissionComponent: usesCustomSubmissionComponent
|
|
2215
|
+
usesCustomSubmissionComponent: usesCustomSubmissionComponent,
|
|
2216
|
+
hostSpecificData: hostSpecificData
|
|
2213
2217
|
});
|
|
2214
|
-
}, [formId, isFormEnabled, savedTitle, setFormData, values, dirty, isSubmitting, isValid, errors, submitForm, resetForm, selectedLanguage, helpDocUrls, enableDomainBlacklisting, enableDomainWhitelisting, isUsingDefaultQuestionKinds, showReadOnlySwitch, showResponseVisibleOnlyToHostSwitch, usesCustomSubmissionComponent]);
|
|
2218
|
+
}, [formId, isFormEnabled, savedTitle, setFormData, values, dirty, isSubmitting, isValid, errors, submitForm, resetForm, selectedLanguage, helpDocUrls, enableDomainBlacklisting, enableDomainWhitelisting, isUsingDefaultQuestionKinds, showReadOnlySwitch, showResponseVisibleOnlyToHostSwitch, usesCustomSubmissionComponent, hostSpecificData]);
|
|
2215
2219
|
var questions = values.questions;
|
|
2216
2220
|
var handleSelect = function handleSelect(question) {
|
|
2217
2221
|
setSelectedQuestion(question);
|
|
@@ -2436,8 +2440,7 @@ var BuildForm = function BuildForm(_ref) {
|
|
|
2436
2440
|
className = _ref.className,
|
|
2437
2441
|
_ref$questionsHelpPro = _ref.questionsHelpProps,
|
|
2438
2442
|
questionsHelpProps = _ref$questionsHelpPro === void 0 ? {} : _ref$questionsHelpPro,
|
|
2439
|
-
|
|
2440
|
-
hostSpecificData = _ref$hostSpecificData === void 0 ? {} : _ref$hostSpecificData,
|
|
2443
|
+
hostSpecificData = _ref.hostSpecificData,
|
|
2441
2444
|
_ref$showReadOnlySwit = _ref.showReadOnlySwitch,
|
|
2442
2445
|
showReadOnlySwitch = _ref$showReadOnlySwit === void 0 ? false : _ref$showReadOnlySwit,
|
|
2443
2446
|
_ref$showResponseVisi = _ref.showResponseVisibleOnlyToHostSwitch,
|
|
@@ -2450,13 +2453,13 @@ var BuildForm = function BuildForm(_ref) {
|
|
|
2450
2453
|
}),
|
|
2451
2454
|
reorderQuestions = _useReorderQuestions.mutate,
|
|
2452
2455
|
isReordering = _useReorderQuestions.isPending;
|
|
2453
|
-
var
|
|
2456
|
+
var _useForm = useForm({
|
|
2454
2457
|
formId: id,
|
|
2455
2458
|
language: selectedLanguage
|
|
2456
2459
|
}),
|
|
2457
|
-
data =
|
|
2458
|
-
isLoading =
|
|
2459
|
-
isQuestionsPending =
|
|
2460
|
+
data = _useForm.data,
|
|
2461
|
+
isLoading = _useForm.isLoading,
|
|
2462
|
+
isQuestionsPending = _useForm.isPending;
|
|
2460
2463
|
var _ref2 = data || QUESTIONS_INITIAL_VALUE,
|
|
2461
2464
|
isFormEnabled = _ref2.enabled,
|
|
2462
2465
|
savedTitle = _ref2.title,
|