@bigbinary/neeto-form-frontend 4.4.59 → 4.4.60

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.
Files changed (59) hide show
  1. package/dist/.ready +1 -1
  2. package/dist/BuildForm.js +5 -5
  3. package/dist/ExternalForm.js +6 -6
  4. package/dist/Submission.js +2 -2
  5. package/dist/UrlBuilder.js +6 -6
  6. package/dist/{buildForm-BB_dcXDi.js → buildForm-Nb_rCdfy.js} +2 -2
  7. package/dist/{buildForm-BB_dcXDi.js.map → buildForm-Nb_rCdfy.js.map} +1 -1
  8. package/dist/cjs/BuildForm.js +5 -5
  9. package/dist/cjs/ExternalForm.js +6 -6
  10. package/dist/cjs/Submission.js +2 -2
  11. package/dist/cjs/UrlBuilder.js +6 -6
  12. package/dist/cjs/{buildForm-CioN98io.js → buildForm-xIwQXuvP.js} +2 -2
  13. package/dist/cjs/{buildForm-CioN98io.js.map → buildForm-xIwQXuvP.js.map} +1 -1
  14. package/dist/cjs/hooks.js +3 -3
  15. package/dist/cjs/{index-GEt7Ofup.js → index-DrN28_gt.js} +2 -2
  16. package/dist/cjs/{index-GEt7Ofup.js.map → index-DrN28_gt.js.map} +1 -1
  17. package/dist/cjs/index.js +7 -7
  18. package/dist/cjs/{utils-BpyTbv4T.js → utils-BHn1TXSC.js} +6 -6
  19. package/dist/cjs/{utils-BpyTbv4T.js.map → utils-BHn1TXSC.js.map} +1 -1
  20. package/dist/cjs/v2/BuildForm.js +6 -6
  21. package/dist/cjs/v2/ExternalForm.js +7 -7
  22. package/dist/cjs/v2/Submission.js +2 -2
  23. package/dist/cjs/v2/UrlBuilder.js +5 -5
  24. package/dist/cjs/v2/{buildForm-bsda0SF2.js → buildForm-B3VEE0iY.js} +2 -2
  25. package/dist/cjs/v2/{buildForm-bsda0SF2.js.map → buildForm-B3VEE0iY.js.map} +1 -1
  26. package/dist/cjs/v2/hooks.js +3 -3
  27. package/dist/cjs/v2/{index-C1-XsBQ0.js → index-NFq_E15P.js} +2 -2
  28. package/dist/cjs/v2/{index-C1-XsBQ0.js.map → index-NFq_E15P.js.map} +1 -1
  29. package/dist/cjs/v2/index.js +8 -8
  30. package/dist/cjs/v2/{utils-BEmzx_CT.js → utils-C63zUZvf.js} +5 -5
  31. package/dist/cjs/v2/{utils-BEmzx_CT.js.map → utils-C63zUZvf.js.map} +1 -1
  32. package/dist/cjs/v2/{yup-BJdUP8f6.js → yup-D2FUYjqU.js} +2 -2
  33. package/dist/cjs/v2/{yup-BJdUP8f6.js.map → yup-D2FUYjqU.js.map} +1 -1
  34. package/dist/cjs/{yup-C1tUTQs0.js → yup-DD46Fc7X.js} +2 -2
  35. package/dist/cjs/{yup-C1tUTQs0.js.map → yup-DD46Fc7X.js.map} +1 -1
  36. package/dist/hooks.js +3 -3
  37. package/dist/{index-COGLnVTU.js → index-DRTYabIo.js} +2 -2
  38. package/dist/{index-COGLnVTU.js.map → index-DRTYabIo.js.map} +1 -1
  39. package/dist/index.js +7 -7
  40. package/dist/{utils-DwvyMha8.js → utils-DQC5qi6q.js} +6 -6
  41. package/dist/{utils-DwvyMha8.js.map → utils-DQC5qi6q.js.map} +1 -1
  42. package/dist/v2/BuildForm.js +6 -6
  43. package/dist/v2/ExternalForm.js +7 -7
  44. package/dist/v2/Submission.js +2 -2
  45. package/dist/v2/UrlBuilder.js +5 -5
  46. package/dist/v2/{buildForm-CpdYPz4r.js → buildForm-BMN86qUJ.js} +2 -2
  47. package/dist/v2/{buildForm-CpdYPz4r.js.map → buildForm-BMN86qUJ.js.map} +1 -1
  48. package/dist/v2/hooks.js +3 -3
  49. package/dist/v2/{index-CUrkh_zd.js → index-DsDXFqPW.js} +2 -2
  50. package/dist/v2/{index-CUrkh_zd.js.map → index-DsDXFqPW.js.map} +1 -1
  51. package/dist/v2/index.js +8 -8
  52. package/dist/v2/{utils-Dng9m1z9.js → utils-CSIZJTGG.js} +5 -5
  53. package/dist/v2/{utils-Dng9m1z9.js.map → utils-CSIZJTGG.js.map} +1 -1
  54. package/dist/v2/{yup-hYIKNz1B.js → yup-BRPSFuNj.js} +2 -2
  55. package/dist/v2/{yup-hYIKNz1B.js.map → yup-BRPSFuNj.js.map} +1 -1
  56. package/dist/{yup-TxS0SXvr.js → yup-Ccwwlg6e.js} +2 -2
  57. package/dist/{yup-TxS0SXvr.js.map → yup-Ccwwlg6e.js.map} +1 -1
  58. package/package.json +5 -5
  59. package/types.d.ts +1 -1
@@ -4,13 +4,13 @@ import classnames from 'classnames';
4
4
  import { isPresent, truncate, findBy, slugify, existsBy, noop, removeBy, isNotPresent, findById, findIndexById, hyphenate, nullSafe, modifyBy } from '@bigbinary/neeto-cist';
5
5
  import { equals, path, omit, when, assoc, includes, isEmpty, reject, keys, pick, evolve, map, mergeLeft, prop, isNil, pipe, filter, isNotNil, values, uniq, join, pathSatisfies, assocPath, dissoc, pluck, append, paths, difference, startsWith, split, last, union, either, F, T } from 'ramda';
6
6
  import { k as useDeleteQuestion, b as useForm, l as useCreateQuestion, m as useUpdateQuestion, n as useReorderQuestions, Q as QUERY_KEYS } from './useFormApi-BZtUzxW_.js';
7
- import { r as QUESTION_ACTIONS, s as INDEPENDENT_LABELS_MAP, t as buildDisplayLabel, c as isFunction, u as LOCALIZED_DEFAULT_LABEL_KEYS, v as SELECTABLE_KINDS, w as isAutoGeneratedQuestion, g as fieldWithFallback, x as isRichTextQuestion, y as isLayoutQuestion, z as SPOT_QUESTION_FIELD_CODE, B as isNameQuestion, N as NON_BASIC_LATIN_CHARACTERS_REGEX, F as RESERVED_FIELD_CODES, G as renameKey, j as LABEL_FIELDS, H as isDefaultLanguage, J as buildAddQuestionButtonProps, K as validateEditorContent, M as HEADING_IMAGE_UPLOAD_CONFIG, O as HEADING_IMAGE_WIDTH, T as FIELD_CODES_REJECT_CHARS_REGEX, U as MIN_WORDS_SWITCH_LABEL_PROPS, V as MIN_WORDS, W as isImmutableField, a as QUESTIONS_WITHOUT_FIELD_CODE, X as NON_HIDEABLE_FIELDS, Z as NON_READ_ONLY_FIELDS, _ as OPINION_LABEL_MAX_LENGTH, $ as RICH_TEXT_QUESTIONS, h as ADDRESS_FIELD_WIDTHS, A as ADDRESS_FIELD_TYPES, a0 as generateDefaultOptions, a1 as MINIMUM_ADDRESS_FIELDS, a2 as getDeletedRecords, a3 as randomId, a4 as getActiveRecords, a5 as FILE_TYPES_MAP, a6 as FILE_GROUPS, a7 as OPINION_SCALE_MIN_VALUE_OPTIONS, a8 as OPINION_SCALE_MAX_VALUE_OPTIONS, l as DEFAULT_CHOICE_QUESTION_ATTRIBUTES, a9 as MINIMUM_OPTIONS, aa as IMAGE_HEIGHT_SLIDER_DEFAULTS, ab as RATING_OPTIONS, ac as STAR_RATING_MIN_VALUE_OPTIONS, ad as STAR_RATING_MAX_VALUE_OPTIONS, ae as STAR_RATING_ICONS_MAP, af as YES_NO_ICONS_MAP, ag as buildDisabledAddButtonHelpPopoverProps, ah as buildReorderPayload, ai as QUESTIONS_INITIAL_VALUE, aj as isMandatoryField, ak as QUESTION_KINDS, Q as QUESTION_KIND, al as getActiveQuestionKindDetails, am as DEFAULT_AVAILABLE_LANGUAGES, an as DEFAULT_ADVANCED_FEATURES } from './yup-hYIKNz1B.js';
7
+ import { r as QUESTION_ACTIONS, s as INDEPENDENT_LABELS_MAP, t as buildDisplayLabel, c as isFunction, u as LOCALIZED_DEFAULT_LABEL_KEYS, v as SELECTABLE_KINDS, w as isAutoGeneratedQuestion, g as fieldWithFallback, x as isRichTextQuestion, y as isLayoutQuestion, z as SPOT_QUESTION_FIELD_CODE, B as isNameQuestion, N as NON_BASIC_LATIN_CHARACTERS_REGEX, F as RESERVED_FIELD_CODES, G as renameKey, j as LABEL_FIELDS, H as isDefaultLanguage, J as buildAddQuestionButtonProps, K as validateEditorContent, M as HEADING_IMAGE_UPLOAD_CONFIG, O as HEADING_IMAGE_WIDTH, T as FIELD_CODES_REJECT_CHARS_REGEX, U as MIN_WORDS_SWITCH_LABEL_PROPS, V as MIN_WORDS, W as isImmutableField, a as QUESTIONS_WITHOUT_FIELD_CODE, X as NON_HIDEABLE_FIELDS, Z as NON_READ_ONLY_FIELDS, _ as OPINION_LABEL_MAX_LENGTH, $ as RICH_TEXT_QUESTIONS, h as ADDRESS_FIELD_WIDTHS, A as ADDRESS_FIELD_TYPES, a0 as generateDefaultOptions, a1 as MINIMUM_ADDRESS_FIELDS, a2 as getDeletedRecords, a3 as randomId, a4 as getActiveRecords, a5 as FILE_TYPES_MAP, a6 as FILE_GROUPS, a7 as OPINION_SCALE_MIN_VALUE_OPTIONS, a8 as OPINION_SCALE_MAX_VALUE_OPTIONS, l as DEFAULT_CHOICE_QUESTION_ATTRIBUTES, a9 as MINIMUM_OPTIONS, aa as IMAGE_HEIGHT_SLIDER_DEFAULTS, ab as RATING_OPTIONS, ac as STAR_RATING_MIN_VALUE_OPTIONS, ad as STAR_RATING_MAX_VALUE_OPTIONS, ae as STAR_RATING_ICONS_MAP, af as YES_NO_ICONS_MAP, ag as buildDisabledAddButtonHelpPopoverProps, ah as buildReorderPayload, ai as QUESTIONS_INITIAL_VALUE, aj as isMandatoryField, ak as QUESTION_KINDS, Q as QUESTION_KIND, al as getActiveQuestionKindDetails, am as DEFAULT_AVAILABLE_LANGUAGES, an as DEFAULT_ADVANCED_FEATURES } from './yup-BRPSFuNj.js';
8
8
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
9
9
  import { createElement, useRef, useEffect, useState } from 'react';
10
10
  import { Droppable, Draggable, DragDropContext } from '@hello-pangea/dnd';
11
11
  import { withT, isMetaKeyPressed, useStateWithDependency, useFuncDebounce, useOnClickOutside } from '@bigbinary/neeto-commons-frontend/v2/react-utils';
12
12
  import { showThumbsUpToastr, withEventTargetValue } from '@bigbinary/neeto-commons-frontend/v2/utils';
13
- import { a as useBuildFormStore } from './buildForm-CpdYPz4r.js';
13
+ import { a as useBuildFormStore } from './buildForm-BMN86qUJ.js';
14
14
  import { Q as QUESTION_TYPES, C as CAPTCHA_TYPES, D as DATE_INPUT_MODES } from './constants-BI0YYyVc.js';
15
15
  import { shallow } from 'zustand/shallow';
16
16
  import { useTranslation, Trans } from 'react-i18next';
@@ -25,8 +25,8 @@ import { v4 } from 'uuid';
25
25
  import { Textarea as Textarea$1, Switch, Input, Form as Form$2, ActionBlock, Select as Select$1, RadioGroup, Checkbox as Checkbox$1 } from '@bigbinary/neeto-atoms/formik';
26
26
  import { useFormikContext, useField } from 'formik';
27
27
  import ImageUploader from '@bigbinary/neeto-image-uploader-frontend/v2/ImageUploader';
28
- import NeetoEditor from '@bigbinary/neeto-editor/v2/Editor';
29
- import { isEditorEmpty } from '@bigbinary/neeto-editor/v2/utils';
28
+ import NeetoEditor from '@bigbinary/neeto-editor-frontend/v2/Editor';
29
+ import { isEditorEmpty } from '@bigbinary/neeto-editor-frontend/v2/utils';
30
30
  import * as yup from 'yup';
31
31
  import OptionFields from '@bigbinary/neeto-molecules/v2/OptionFields';
32
32
  import { AnimatePresence, motion } from 'framer-motion';
@@ -40,8 +40,8 @@ import '@bigbinary/neeto-commons-frontend/utils';
40
40
  import 'dompurify';
41
41
  import '@babel/runtime/helpers/typeof';
42
42
  import 'zustand';
43
- import './index-CUrkh_zd.js';
44
- import '@bigbinary/neeto-editor/utils';
43
+ import './index-DsDXFqPW.js';
44
+ import '@bigbinary/neeto-editor-frontend/utils';
45
45
 
46
46
  var DeleteAlert = function DeleteAlert(_ref) {
47
47
  var selectedQuestion = _ref.selectedQuestion,
@@ -16,10 +16,10 @@ import PageLoader from '@bigbinary/neeto-molecules/v2/PageLoader';
16
16
  import { not, path, equals, isEmpty } from 'ramda';
17
17
  import { I18nextProvider, useTranslation } from 'react-i18next';
18
18
  import { d as usePublicForm, g as useCreateSubmission, h as useUpdateSubmission, f as useSubmission, Q as QUERY_KEYS } from './useFormApi-BZtUzxW_.js';
19
- import { g as getComponentDisplayName } from './index-CUrkh_zd.js';
19
+ import { g as getComponentDisplayName } from './index-DsDXFqPW.js';
20
20
  import { jsx, jsxs } from 'react/jsx-runtime';
21
- import { d as clientI18nInstance, e as getWithExpiry, f as clearEmailVerificationDetails, F as FormikWrap, g as getFieldComponent, a as buildAutoCompleteAttribute, r as renderButtonsInOrder, m as mergeRefs, c as generateInitValues, h as generateFormResponse, i as clearLocalStorageValues } from './utils-Dng9m1z9.js';
22
- import { i as isBlank, C as CALLOUT_POSITIONS, b as CALLOUT_STYLES, L as LAST_ELEMENTS_THRESHOLD, Q as QUESTION_KIND, p as parseServerError } from './yup-hYIKNz1B.js';
21
+ import { d as clientI18nInstance, e as getWithExpiry, f as clearEmailVerificationDetails, F as FormikWrap, g as getFieldComponent, a as buildAutoCompleteAttribute, r as renderButtonsInOrder, m as mergeRefs, c as generateInitValues, h as generateFormResponse, i as clearLocalStorageValues } from './utils-CSIZJTGG.js';
22
+ import { i as isBlank, C as CALLOUT_POSITIONS, b as CALLOUT_STYLES, L as LAST_ELEMENTS_THRESHOLD, Q as QUESTION_KIND, p as parseServerError } from './yup-BRPSFuNj.js';
23
23
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
24
24
  import { withT } from '@bigbinary/neeto-commons-frontend/v2/react-utils';
25
25
  import '@babel/runtime/helpers/toConsumableArray';
@@ -28,11 +28,11 @@ import '@bigbinary/neeto-commons-frontend/react-utils';
28
28
  import 'axios';
29
29
  import '@bigbinary/neeto-commons-frontend/utils';
30
30
  import '@babel/runtime/helpers/typeof';
31
- import '@bigbinary/neeto-editor/utils';
31
+ import '@bigbinary/neeto-editor-frontend/utils';
32
32
  import 'libphonenumber-js';
33
- import '@bigbinary/neeto-editor/v2/EditorContent';
33
+ import '@bigbinary/neeto-editor-frontend/v2/EditorContent';
34
34
  import './constants-BI0YYyVc.js';
35
- import '@bigbinary/neeto-editor/v2/utils';
35
+ import '@bigbinary/neeto-editor-frontend/v2/utils';
36
36
  import '@bigbinary/neeto-molecules/v2/PhoneNumber';
37
37
  import './date-CbWUunGc.js';
38
38
  import '@babel/runtime/helpers/toArray';
@@ -40,7 +40,7 @@ import 'yup';
40
40
  import '@bigbinary/neeto-commons-frontend/v2/initializers';
41
41
  import 'react-google-recaptcha';
42
42
  import '@bigbinary/neeto-molecules/v2/FileUpload';
43
- import '@bigbinary/neeto-editor/v2/Editor';
43
+ import '@bigbinary/neeto-editor-frontend/v2/Editor';
44
44
  import 'dompurify';
45
45
 
46
46
  function ownKeys$2(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; }
@@ -7,8 +7,8 @@ import { isNotPresent, hyphenate } from '@bigbinary/neeto-cist';
7
7
  import PageLoader from '@bigbinary/neeto-molecules/v2/PageLoader';
8
8
  import { f as useSubmission } from './useFormApi-BZtUzxW_.js';
9
9
  import { t } from 'i18next';
10
- import EditorContent from '@bigbinary/neeto-editor/v2/EditorContent';
11
- import { isEditorEmpty } from '@bigbinary/neeto-editor/v2/utils';
10
+ import EditorContent from '@bigbinary/neeto-editor-frontend/v2/EditorContent';
11
+ import { isEditorEmpty } from '@bigbinary/neeto-editor-frontend/v2/utils';
12
12
  import CopyToClipboardButton from '@bigbinary/neeto-molecules/v2/CopyToClipboardButton';
13
13
  import { PhoneNumber } from '@bigbinary/neeto-molecules/v2/PhoneNumber';
14
14
  import { isEmpty } from 'ramda';
@@ -10,9 +10,9 @@ import PageLoader from '@bigbinary/neeto-molecules/v2/PageLoader';
10
10
  import { mergeLeft, map, filter, pluck, isEmpty } from 'ramda';
11
11
  import { useTranslation } from 'react-i18next';
12
12
  import { d as usePublicForm } from './useFormApi-BZtUzxW_.js';
13
- import { b as buildDateQueryParameters, F as FormikWrap, g as getFieldComponent, a as buildAutoCompleteAttribute, m as mergeRefs, c as generateInitValues } from './utils-Dng9m1z9.js';
13
+ import { b as buildDateQueryParameters, F as FormikWrap, g as getFieldComponent, a as buildAutoCompleteAttribute, m as mergeRefs, c as generateInitValues } from './utils-CSIZJTGG.js';
14
14
  import { parsePhoneNumber } from 'libphonenumber-js';
15
- import { Q as QUESTION_KIND, a as QUESTIONS_WITHOUT_FIELD_CODE } from './yup-hYIKNz1B.js';
15
+ import { Q as QUESTION_KIND, a as QUESTIONS_WITHOUT_FIELD_CODE } from './yup-BRPSFuNj.js';
16
16
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
17
17
  import '@babel/runtime/helpers/toConsumableArray';
18
18
  import '@babel/runtime/helpers/objectWithoutProperties';
@@ -24,11 +24,11 @@ import 'axios';
24
24
  import '@bigbinary/neeto-commons-frontend/utils';
25
25
  import '@babel/runtime/helpers/slicedToArray';
26
26
  import '@bigbinary/neeto-commons-frontend/v2/utils';
27
- import '@bigbinary/neeto-editor/v2/EditorContent';
27
+ import '@bigbinary/neeto-editor-frontend/v2/EditorContent';
28
28
  import './constants-BI0YYyVc.js';
29
29
  import '@babel/runtime/helpers/asyncToGenerator';
30
30
  import '@babel/runtime/regenerator';
31
- import '@bigbinary/neeto-editor/v2/utils';
31
+ import '@bigbinary/neeto-editor-frontend/v2/utils';
32
32
  import '@bigbinary/neeto-molecules/v2/PhoneNumber';
33
33
  import './date-CbWUunGc.js';
34
34
  import '@babel/runtime/helpers/toArray';
@@ -37,7 +37,7 @@ import '@bigbinary/neeto-commons-frontend/v2/react-utils';
37
37
  import '@bigbinary/neeto-commons-frontend/v2/initializers';
38
38
  import 'react-google-recaptcha';
39
39
  import '@bigbinary/neeto-molecules/v2/FileUpload';
40
- import '@bigbinary/neeto-editor/v2/Editor';
40
+ import '@bigbinary/neeto-editor-frontend/v2/Editor';
41
41
  import 'dompurify';
42
42
  import '@babel/runtime/helpers/typeof';
43
43
 
@@ -3,7 +3,7 @@ import { noop } from '@bigbinary/neeto-cist';
3
3
  import { withImmutableActions } from '@bigbinary/neeto-commons-frontend/react-utils';
4
4
  import { modify, mergeLeft, prop } from 'ramda';
5
5
  import { create } from 'zustand';
6
- import { i as isFunction } from './index-CUrkh_zd.js';
6
+ import { i as isFunction } from './index-DsDXFqPW.js';
7
7
 
8
8
  /** @type {import("neetocommons/react-utils").ZustandStoreHook} */
9
9
  var useBuildFormStore = create(withImmutableActions(function (set) {
@@ -32,4 +32,4 @@ var useBuildFormState = function useBuildFormState() {
32
32
  };
33
33
 
34
34
  export { useBuildFormStore as a, useBuildFormState as u };
35
- //# sourceMappingURL=buildForm-CpdYPz4r.js.map
35
+ //# sourceMappingURL=buildForm-BMN86qUJ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildForm-CpdYPz4r.js","sources":["../../app/javascript/src/stores/buildForm.js"],"sourcesContent":["import i18next from \"i18next\";\nimport { noop } from \"neetocist\";\nimport { withImmutableActions } from \"neetocommons/react-utils\";\nimport { mergeLeft, modify, prop } from \"ramda\";\nimport { create } from \"zustand\";\n\nimport { isFunction } from \"utils\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useBuildFormStore = create(\n withImmutableActions(set => ({\n formState: {\n selectedLanguage: i18next.resolvedLanguage,\n onLanguageChange: noop,\n formId: null,\n enabled: false,\n title: \"\",\n helpDocUrls: {},\n isUsingDefaultQuestionKinds: true,\n usesCustomSubmissionComponent: false,\n hostSpecificData: {},\n isReorderingQuestions: false,\n onMutateSuccess: noop,\n isPictureChoiceEnabled: false,\n },\n\n setFormData: arg =>\n set(modify(\"formState\", isFunction(arg) ? arg : mergeLeft(arg))),\n }))\n);\n\nexport const useBuildFormState = () => useBuildFormStore(prop(\"formState\"));\n\nexport default useBuildFormStore;\n"],"names":["useBuildFormStore","create","withImmutableActions","set","formState","selectedLanguage","i18next","resolvedLanguage","onLanguageChange","noop","formId","enabled","title","helpDocUrls","isUsingDefaultQuestionKinds","usesCustomSubmissionComponent","hostSpecificData","isReorderingQuestions","onMutateSuccess","isPictureChoiceEnabled","setFormData","arg","modify","isFunction","mergeLeft","useBuildFormState","prop"],"mappings":";;;;;;;AAQA;AACA,IAAMA,iBAAiB,GAAGC,MAAM,CAC9BC,oBAAoB,CAAC,UAAAC,GAAG,EAAA;EAAA,OAAK;AAC3BC,IAAAA,SAAS,EAAE;MACTC,gBAAgB,EAAEC,OAAO,CAACC,gBAAgB;AAC1CC,MAAAA,gBAAgB,EAAEC,IAAI;AACtBC,MAAAA,MAAM,EAAE,IAAI;AACZC,MAAAA,OAAO,EAAE,KAAK;AACdC,MAAAA,KAAK,EAAE,EAAE;MACTC,WAAW,EAAE,EAAE;AACfC,MAAAA,2BAA2B,EAAE,IAAI;AACjCC,MAAAA,6BAA6B,EAAE,KAAK;MACpCC,gBAAgB,EAAE,EAAE;AACpBC,MAAAA,qBAAqB,EAAE,KAAK;AAC5BC,MAAAA,eAAe,EAAET,IAAI;AACrBU,MAAAA,sBAAsB,EAAE;KACzB;AAEDC,IAAAA,WAAW,EAAE,SAAbA,WAAWA,CAAEC,GAAG,EAAA;AAAA,MAAA,OACdlB,GAAG,CAACmB,MAAM,CAAC,WAAW,EAAEC,UAAU,CAACF,GAAG,CAAC,GAAGA,GAAG,GAAGG,SAAS,CAACH,GAAG,CAAC,CAAC,CAAC;AAAA,IAAA;GACnE;AAAA,CAAC,CACJ;AAEO,IAAMI,iBAAiB,GAAG,SAApBA,iBAAiBA,GAAA;AAAA,EAAA,OAASzB,iBAAiB,CAAC0B,IAAI,CAAC,WAAW,CAAC,CAAC;AAAA;;;;"}
1
+ {"version":3,"file":"buildForm-BMN86qUJ.js","sources":["../../app/javascript/src/stores/buildForm.js"],"sourcesContent":["import i18next from \"i18next\";\nimport { noop } from \"neetocist\";\nimport { withImmutableActions } from \"neetocommons/react-utils\";\nimport { mergeLeft, modify, prop } from \"ramda\";\nimport { create } from \"zustand\";\n\nimport { isFunction } from \"utils\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useBuildFormStore = create(\n withImmutableActions(set => ({\n formState: {\n selectedLanguage: i18next.resolvedLanguage,\n onLanguageChange: noop,\n formId: null,\n enabled: false,\n title: \"\",\n helpDocUrls: {},\n isUsingDefaultQuestionKinds: true,\n usesCustomSubmissionComponent: false,\n hostSpecificData: {},\n isReorderingQuestions: false,\n onMutateSuccess: noop,\n isPictureChoiceEnabled: false,\n },\n\n setFormData: arg =>\n set(modify(\"formState\", isFunction(arg) ? arg : mergeLeft(arg))),\n }))\n);\n\nexport const useBuildFormState = () => useBuildFormStore(prop(\"formState\"));\n\nexport default useBuildFormStore;\n"],"names":["useBuildFormStore","create","withImmutableActions","set","formState","selectedLanguage","i18next","resolvedLanguage","onLanguageChange","noop","formId","enabled","title","helpDocUrls","isUsingDefaultQuestionKinds","usesCustomSubmissionComponent","hostSpecificData","isReorderingQuestions","onMutateSuccess","isPictureChoiceEnabled","setFormData","arg","modify","isFunction","mergeLeft","useBuildFormState","prop"],"mappings":";;;;;;;AAQA;AACA,IAAMA,iBAAiB,GAAGC,MAAM,CAC9BC,oBAAoB,CAAC,UAAAC,GAAG,EAAA;EAAA,OAAK;AAC3BC,IAAAA,SAAS,EAAE;MACTC,gBAAgB,EAAEC,OAAO,CAACC,gBAAgB;AAC1CC,MAAAA,gBAAgB,EAAEC,IAAI;AACtBC,MAAAA,MAAM,EAAE,IAAI;AACZC,MAAAA,OAAO,EAAE,KAAK;AACdC,MAAAA,KAAK,EAAE,EAAE;MACTC,WAAW,EAAE,EAAE;AACfC,MAAAA,2BAA2B,EAAE,IAAI;AACjCC,MAAAA,6BAA6B,EAAE,KAAK;MACpCC,gBAAgB,EAAE,EAAE;AACpBC,MAAAA,qBAAqB,EAAE,KAAK;AAC5BC,MAAAA,eAAe,EAAET,IAAI;AACrBU,MAAAA,sBAAsB,EAAE;KACzB;AAEDC,IAAAA,WAAW,EAAE,SAAbA,WAAWA,CAAEC,GAAG,EAAA;AAAA,MAAA,OACdlB,GAAG,CAACmB,MAAM,CAAC,WAAW,EAAEC,UAAU,CAACF,GAAG,CAAC,GAAGA,GAAG,GAAGG,SAAS,CAACH,GAAG,CAAC,CAAC,CAAC;AAAA,IAAA;GACnE;AAAA,CAAC,CACJ;AAEO,IAAMI,iBAAiB,GAAG,SAApBA,iBAAiBA,GAAA;AAAA,EAAA,OAASzB,iBAAiB,CAAC0B,IAAI,CAAC,WAAW,CAAC,CAAC;AAAA;;;;"}
package/dist/v2/hooks.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { u as useCreateForm, a as useDeleteForm, b as useForm, c as useForms, d as usePublicForm, e as useUpdateForm } from './useFormApi-BZtUzxW_.js';
2
2
  export { u as useFormSubmission } from './useFormSubmission-Sb1tzFv5.js';
3
- export { u as useBuildFormState } from './buildForm-CpdYPz4r.js';
3
+ export { u as useBuildFormState } from './buildForm-BMN86qUJ.js';
4
4
  import '@babel/runtime/helpers/toConsumableArray';
5
5
  import '@babel/runtime/helpers/defineProperty';
6
6
  import '@babel/runtime/helpers/objectWithoutProperties';
@@ -14,7 +14,7 @@ import 'axios';
14
14
  import '@bigbinary/neeto-commons-frontend/utils';
15
15
  import '@babel/runtime/helpers/slicedToArray';
16
16
  import 'zustand';
17
- import './index-CUrkh_zd.js';
17
+ import './index-DsDXFqPW.js';
18
18
  import '@babel/runtime/helpers/typeof';
19
- import '@bigbinary/neeto-editor/utils';
19
+ import '@bigbinary/neeto-editor-frontend/utils';
20
20
  //# sourceMappingURL=hooks.js.map
@@ -1,6 +1,6 @@
1
1
  import '@babel/runtime/helpers/typeof';
2
2
  import 'i18next';
3
- import '@bigbinary/neeto-editor/utils';
3
+ import '@bigbinary/neeto-editor-frontend/utils';
4
4
  import { compose, isEmpty, trim, useWith, path, split } from 'ramda';
5
5
 
6
6
  compose(isEmpty, trim);
@@ -15,4 +15,4 @@ var getComponentDisplayName = function getComponentDisplayName(Component) {
15
15
  };
16
16
 
17
17
  export { getComponentDisplayName as g, isFunction as i };
18
- //# sourceMappingURL=index-CUrkh_zd.js.map
18
+ //# sourceMappingURL=index-DsDXFqPW.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CUrkh_zd.js","sources":["../../app/javascript/src/utils/index.js"],"sourcesContent":["import { t } from \"i18next\";\nimport { isEditorEmpty } from \"neetoeditor\";\nimport {\n compose,\n isEmpty,\n trim,\n isNil,\n equals,\n values,\n either,\n useWith,\n path,\n split,\n isNotNil,\n} from \"ramda\";\n\nimport { QUESTION_TYPES } from \"components/constants\";\n\nexport const isBlank = compose(isEmpty, trim);\n\nexport const parseServerError = error =>\n error.notice ?? t(\"neetoForm.common.somethingWentWrong\");\n\nexport const isPlainObject = obj =>\n typeof obj === \"object\" && !Array.isArray(obj) && obj !== null;\n\nexport const isStringOrNumber = obj =>\n typeof obj === \"string\" || typeof obj === \"number\";\n\nexport const isEmptyValues = obj =>\n either(isNil, isEmpty)(obj)\n ? true\n : values(obj).every(value => {\n if (isEmpty(value)) {\n return true;\n } else if (Array.isArray(value)) {\n return equals([false, false, false], value);\n }\n\n return !value;\n });\n\n// eslint-disable-next-line react-hooks/rules-of-hooks\nexport const dotPath = useWith(path, [split(\".\")]);\n\nexport const isFunction = obj => typeof obj === \"function\";\n\nexport const fieldWithFallback = (\n question,\n fieldName,\n hasRichContent = false\n) => {\n const fallback = question[`${fieldName}Fallback`];\n const field = question[fieldName];\n const isFieldEmpty = hasRichContent ? isEditorEmpty(field) : isEmpty(field);\n\n return isFieldEmpty && isNotNil(fallback) ? fallback : field;\n};\n\nexport const getComponentDisplayName = Component =>\n Component.displayName || Component.name || \"Component\";\n\nexport const isNameQuestion = kind => kind === QUESTION_TYPES.NAME;\n"],"names":["compose","isEmpty","trim","useWith","path","split","isFunction","obj","getComponentDisplayName","Component","displayName","name"],"mappings":";;;;;AAkBuBA,OAAO,CAACC,OAAO,EAAEC,IAAI;;AAwB5C;AACuBC,OAAO,CAACC,IAAI,EAAE,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEpCC,UAAU,GAAG,SAAbA,UAAUA,CAAGC,GAAG,EAAA;EAAA,OAAI,OAAOA,GAAG,KAAK,UAAU;AAAA;IAc7CC,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAGC,SAAS,EAAA;EAAA,OAC9CA,SAAS,CAACC,WAAW,IAAID,SAAS,CAACE,IAAI,IAAI,WAAW;AAAA;;;;"}
1
+ {"version":3,"file":"index-DsDXFqPW.js","sources":["../../app/javascript/src/utils/index.js"],"sourcesContent":["import { t } from \"i18next\";\nimport { isEditorEmpty } from \"neetoeditor\";\nimport {\n compose,\n isEmpty,\n trim,\n isNil,\n equals,\n values,\n either,\n useWith,\n path,\n split,\n isNotNil,\n} from \"ramda\";\n\nimport { QUESTION_TYPES } from \"components/constants\";\n\nexport const isBlank = compose(isEmpty, trim);\n\nexport const parseServerError = error =>\n error.notice ?? t(\"neetoForm.common.somethingWentWrong\");\n\nexport const isPlainObject = obj =>\n typeof obj === \"object\" && !Array.isArray(obj) && obj !== null;\n\nexport const isStringOrNumber = obj =>\n typeof obj === \"string\" || typeof obj === \"number\";\n\nexport const isEmptyValues = obj =>\n either(isNil, isEmpty)(obj)\n ? true\n : values(obj).every(value => {\n if (isEmpty(value)) {\n return true;\n } else if (Array.isArray(value)) {\n return equals([false, false, false], value);\n }\n\n return !value;\n });\n\n// eslint-disable-next-line react-hooks/rules-of-hooks\nexport const dotPath = useWith(path, [split(\".\")]);\n\nexport const isFunction = obj => typeof obj === \"function\";\n\nexport const fieldWithFallback = (\n question,\n fieldName,\n hasRichContent = false\n) => {\n const fallback = question[`${fieldName}Fallback`];\n const field = question[fieldName];\n const isFieldEmpty = hasRichContent ? isEditorEmpty(field) : isEmpty(field);\n\n return isFieldEmpty && isNotNil(fallback) ? fallback : field;\n};\n\nexport const getComponentDisplayName = Component =>\n Component.displayName || Component.name || \"Component\";\n\nexport const isNameQuestion = kind => kind === QUESTION_TYPES.NAME;\n"],"names":["compose","isEmpty","trim","useWith","path","split","isFunction","obj","getComponentDisplayName","Component","displayName","name"],"mappings":";;;;;AAkBuBA,OAAO,CAACC,OAAO,EAAEC,IAAI;;AAwB5C;AACuBC,OAAO,CAACC,IAAI,EAAE,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEpCC,UAAU,GAAG,SAAbA,UAAUA,CAAGC,GAAG,EAAA;EAAA,OAAI,OAAOA,GAAG,KAAK,UAAU;AAAA;IAc7CC,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAGC,SAAS,EAAA;EAAA,OAC9CA,SAAS,CAACC,WAAW,IAAID,SAAS,CAACE,IAAI,IAAI,WAAW;AAAA;;;;"}
package/dist/v2/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { u as useCreateForm, a as useDeleteForm, b as useForm, c as useForms, d as usePublicForm, e as useUpdateForm } from './useFormApi-BZtUzxW_.js';
2
2
  export { u as useFormSubmission } from './useFormSubmission-Sb1tzFv5.js';
3
- export { u as useBuildFormState } from './buildForm-CpdYPz4r.js';
3
+ export { u as useBuildFormState } from './buildForm-BMN86qUJ.js';
4
4
  export { default as BuildForm } from './BuildForm.js';
5
5
  export { default as NeetoFormProvider } from './NeetoFormProvider.js';
6
6
  export { default as ExternalForm } from './ExternalForm.js';
@@ -19,18 +19,18 @@ import 'axios';
19
19
  import '@bigbinary/neeto-commons-frontend/utils';
20
20
  import '@babel/runtime/helpers/slicedToArray';
21
21
  import 'zustand';
22
- import './index-CUrkh_zd.js';
22
+ import './index-DsDXFqPW.js';
23
23
  import '@babel/runtime/helpers/typeof';
24
- import '@bigbinary/neeto-editor/utils';
24
+ import '@bigbinary/neeto-editor-frontend/utils';
25
25
  import '@bigbinary/neeto-atoms';
26
26
  import 'classnames';
27
- import './yup-hYIKNz1B.js';
27
+ import './yup-BRPSFuNj.js';
28
28
  import 'react';
29
29
  import 'react/jsx-runtime';
30
30
  import 'lucide-react';
31
31
  import './constants-BI0YYyVc.js';
32
32
  import 'dompurify';
33
- import '@bigbinary/neeto-editor/v2/utils';
33
+ import '@bigbinary/neeto-editor-frontend/v2/utils';
34
34
  import 'yup';
35
35
  import '@hello-pangea/dnd';
36
36
  import '@bigbinary/neeto-commons-frontend/v2/react-utils';
@@ -42,7 +42,7 @@ import 'uuid';
42
42
  import '@bigbinary/neeto-atoms/formik';
43
43
  import 'formik';
44
44
  import '@bigbinary/neeto-image-uploader-frontend/v2/ImageUploader';
45
- import '@bigbinary/neeto-editor/v2/Editor';
45
+ import '@bigbinary/neeto-editor-frontend/v2/Editor';
46
46
  import '@bigbinary/neeto-molecules/v2/OptionFields';
47
47
  import 'framer-motion';
48
48
  import '@babel/runtime/helpers/asyncToGenerator';
@@ -50,9 +50,9 @@ import '@babel/runtime/regenerator';
50
50
  import '@bigbinary/neeto-molecules/v2/HelpPopover';
51
51
  import '@bigbinary/neeto-hotkeys';
52
52
  import '@bigbinary/neeto-molecules/v2/PageLoader';
53
- import './utils-Dng9m1z9.js';
53
+ import './utils-CSIZJTGG.js';
54
54
  import 'libphonenumber-js';
55
- import '@bigbinary/neeto-editor/v2/EditorContent';
55
+ import '@bigbinary/neeto-editor-frontend/v2/EditorContent';
56
56
  import '@bigbinary/neeto-molecules/v2/PhoneNumber';
57
57
  import './date-CbWUunGc.js';
58
58
  import '@babel/runtime/helpers/toArray';
@@ -2,12 +2,12 @@ import { useEffect, useState, useImperativeHandle, memo, Fragment as Fragment$1
2
2
  import { useFormikContext, useField, Field as Field$1, FastField } from 'formik';
3
3
  import { isPresent, findBy, isNotEmpty, filterBy, findById, isNotPresent, hyphenate, noop, toLabelAndValue, getRandomInt, randomPick, slugify, notEqualsDeep } from '@bigbinary/neeto-cist';
4
4
  import { dayjs, buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
5
- import { c as isFunction, d as isEmptyValues, Q as QUESTION_KIND, S as SCHEMA_LESS_QUESTION_KINDS, A as ADDRESS_FIELD_TYPES, e as SPOT_QUESTION_DEFAULT_VALUE, Y as YES_NO_VALUES, P as PARENTHESES_REGEX, R as RATING_VALUES, E as EMAIL_REGEX, I as INTEGER_REGEX, D as DECIMAL_REGEX, f as SIX_DIGIT_NUMBER_REGEX, g as fieldWithFallback, h as ADDRESS_FIELD_WIDTHS, j as LABEL_FIELDS, k as generateArray, l as DEFAULT_CHOICE_QUESTION_ATTRIBUTES, m as RADIO_DESELECT_KEYS, n as RATING_OPTIONS, o as ICONS_MAP, q as YES_NO_DISPLAY_ICONS_MAP } from './yup-hYIKNz1B.js';
5
+ import { c as isFunction, d as isEmptyValues, Q as QUESTION_KIND, S as SCHEMA_LESS_QUESTION_KINDS, A as ADDRESS_FIELD_TYPES, e as SPOT_QUESTION_DEFAULT_VALUE, Y as YES_NO_VALUES, P as PARENTHESES_REGEX, R as RATING_VALUES, E as EMAIL_REGEX, I as INTEGER_REGEX, D as DECIMAL_REGEX, f as SIX_DIGIT_NUMBER_REGEX, g as fieldWithFallback, h as ADDRESS_FIELD_WIDTHS, j as LABEL_FIELDS, k as generateArray, l as DEFAULT_CHOICE_QUESTION_ATTRIBUTES, m as RADIO_DESELECT_KEYS, n as RATING_OPTIONS, o as ICONS_MAP, q as YES_NO_DISPLAY_ICONS_MAP } from './yup-BRPSFuNj.js';
6
6
  import { parsePhoneNumber } from 'libphonenumber-js';
7
7
  import { getFromLocalStorage, setToLocalStorage, removeFromLocalStorage, dayjs as dayjs$1, withEventTargetValue } from '@bigbinary/neeto-commons-frontend/v2/utils';
8
8
  import { pick, mergeRight, omit, isEmpty, max, when, is, last, includes, __, mergeLeft, isNil, clamp, prop, trim, map, zipObj, identity, pluck, values, pipe, dec, equals } from 'ramda';
9
9
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
10
- import EditorContent from '@bigbinary/neeto-editor/v2/EditorContent';
10
+ import EditorContent from '@bigbinary/neeto-editor-frontend/v2/EditorContent';
11
11
  import { Q as QUESTION_TYPES, D as DATE_INPUT_MODES, C as CAPTCHA_TYPES } from './constants-BI0YYyVc.js';
12
12
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
13
13
  import { MultiEmailInput, Button, Select, Input, Label, TimePicker, DatePicker, Spinner, Callout, Toastr, RadioGroup, Checkbox, Textarea, Badge } from '@bigbinary/neeto-atoms';
@@ -16,7 +16,7 @@ import { useTranslation, Trans } from 'react-i18next';
16
16
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
17
17
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
18
18
  import _regeneratorRuntime from '@babel/runtime/regenerator';
19
- import { isEditorEmpty } from '@bigbinary/neeto-editor/v2/utils';
19
+ import { isEditorEmpty } from '@bigbinary/neeto-editor-frontend/v2/utils';
20
20
  import { validation, PhoneNumberInput } from '@bigbinary/neeto-molecules/v2/PhoneNumber';
21
21
  import { p as parseTime } from './date-CbWUunGc.js';
22
22
  import i18next from 'i18next';
@@ -32,7 +32,7 @@ import ReCAPTCHA from 'react-google-recaptcha';
32
32
  import { useMutation } from '@tanstack/react-query';
33
33
  import axios from 'axios';
34
34
  import { FileUpload } from '@bigbinary/neeto-molecules/v2/FileUpload';
35
- import NeetoEditor from '@bigbinary/neeto-editor/v2/Editor';
35
+ import NeetoEditor from '@bigbinary/neeto-editor-frontend/v2/Editor';
36
36
 
37
37
  var clearLocalStorageValues = function clearLocalStorageValues(key) {
38
38
  try {
@@ -2974,4 +2974,4 @@ var getVisibleOptions = function getVisibleOptions(options) {
2974
2974
  };
2975
2975
 
2976
2976
  export { FormikWrap as F, buildAutoCompleteAttribute as a, buildDateQueryParameters as b, generateInitValues as c, clientI18nInstance$1 as d, getWithExpiry as e, clearEmailVerificationDetails as f, getFieldComponent as g, generateFormResponse as h, clearLocalStorageValues as i, mergeRefs as m, renderButtonsInOrder as r };
2977
- //# sourceMappingURL=utils-Dng9m1z9.js.map
2977
+ //# sourceMappingURL=utils-CSIZJTGG.js.map