@bigbinary/neeto-form-frontend 1.2.18 → 1.2.19

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/index.js CHANGED
@@ -12,13 +12,14 @@ import axios from 'axios';
12
12
  import ReactDOM, { unstable_batchedUpdates, flushSync as flushSync$1 } from 'react-dom';
13
13
  import { Input as Input$1, Textarea, Checkbox, ActionBlock } from '@bigbinary/neetoui/formik';
14
14
  import { useTranslation, Trans } from 'react-i18next';
15
- import { withImmutableActions, withT, useDebounce, useHotKeys } from '@bigbinary/neeto-commons-frontend/react-utils';
15
+ import { withImmutableActions, withT, useDebounce } from '@bigbinary/neeto-commons-frontend/react-utils';
16
16
  import { create as create$1 } from 'zustand';
17
17
  import classnames from 'classnames';
18
18
  import * as yup from 'yup';
19
19
  import { object, array, string } from 'yup';
20
20
  import { Editor as Editor$1, isEditorEmpty, EditorContent } from '@bigbinary/neeto-editor';
21
21
  import { withEventTargetValue, getQueryParams, dateFormat } from '@bigbinary/neeto-commons-frontend/utils';
22
+ import useHotkeys from '@bigbinary/neeto-hotkeys';
22
23
  import dayjs from 'dayjs';
23
24
  import { validation, PhoneNumberInput, PhoneNumber as PhoneNumber$1 } from '@bigbinary/neeto-molecules/PhoneNumber';
24
25
  import path$1 from 'path';
@@ -11340,18 +11341,6 @@ var Question = function Question(_ref) {
11340
11341
  });
11341
11342
  };
11342
11343
 
11343
- var moveItem = function moveItem(arr, sourceIndex, destinationIndex) {
11344
- if (sourceIndex === destinationIndex) return arr;
11345
- if (arr instanceof Array && arr[sourceIndex] !== undefined) {
11346
- var removedItem = arr.splice(sourceIndex, 1)[0];
11347
- arr.splice(destinationIndex, 0, removedItem);
11348
- }
11349
- return arr;
11350
- };
11351
- var arrayHelpers = {
11352
- moveItem: moveItem
11353
- };
11354
-
11355
11344
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
11356
11345
  // require the crypto API and do not support built-in fallback to lower quality random number
11357
11346
  // generators (like Math.random()).
@@ -11417,6 +11406,18 @@ function v4(options, buf, offset) {
11417
11406
  return unsafeStringify(rnds);
11418
11407
  }
11419
11408
 
11409
+ var moveItem = function moveItem(arr, sourceIndex, destinationIndex) {
11410
+ if (sourceIndex === destinationIndex) return arr;
11411
+ if (arr instanceof Array && arr[sourceIndex] !== undefined) {
11412
+ var removedItem = arr.splice(sourceIndex, 1)[0];
11413
+ arr.splice(destinationIndex, 0, removedItem);
11414
+ }
11415
+ return arr;
11416
+ };
11417
+ var arrayHelpers = {
11418
+ moveItem: moveItem
11419
+ };
11420
+
11420
11421
  function ownKeys$b(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; }
11421
11422
  function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty$6(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11422
11423
  var generateUniqueFieldCode = function generateUniqueFieldCode(type, questions) {
@@ -27114,7 +27115,7 @@ var ExternalForm = function ExternalForm(_ref) {
27114
27115
  questions: []
27115
27116
  } : _useForm$data,
27116
27117
  isLoading = _useForm.isLoading;
27117
- var keyPressRef = useHotKeys("command+enter", ((_formikInnerRef$curre = formikInnerRef.current) === null || _formikInnerRef$curre === void 0 ? void 0 : _formikInnerRef$curre.handleSubmit) || noop$4, {
27118
+ var keyPressRef = useHotkeys("command+enter", ((_formikInnerRef$curre = formikInnerRef.current) === null || _formikInnerRef$curre === void 0 ? void 0 : _formikInnerRef$curre.handleSubmit) || noop$4, {
27118
27119
  mode: "scoped"
27119
27120
  });
27120
27121
  if (isLoading || form.isQuestionsLoading || !!submissionId && submission !== null && submission !== void 0 && submission.isLoading) {