@bigbinary/neeto-form-frontend 3.12.3 → 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/dist/BuildForm.js CHANGED
@@ -6,7 +6,7 @@ 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';
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
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
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';
@@ -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-BHII-vAK.js';
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';
@@ -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 _DOMAIN_RESTRICTION_T = DOMAIN_RESTRICTION_TRANSLATIONS[domainName],
1698
- title = _DOMAIN_RESTRICTION_T.title,
1699
- description = _DOMAIN_RESTRICTION_T.description,
1700
- popoverDescription = _DOMAIN_RESTRICTION_T.popoverDescription;
1701
- var helpLink = useBuildFormStore(path(["formState", "helpDocUrls", domainName]));
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
- _ref$hostSpecificData = _ref.hostSpecificData,
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,