@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.cjs.js +15 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +15 -14
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.cjs.js
CHANGED
|
@@ -21,6 +21,7 @@ var classnames = require('classnames');
|
|
|
21
21
|
var yup = require('yup');
|
|
22
22
|
var neetoEditor = require('@bigbinary/neeto-editor');
|
|
23
23
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
24
|
+
var useHotkeys = require('@bigbinary/neeto-hotkeys');
|
|
24
25
|
var dayjs = require('dayjs');
|
|
25
26
|
var PhoneNumber$1 = require('@bigbinary/neeto-molecules/PhoneNumber');
|
|
26
27
|
var path = require('path');
|
|
@@ -57,6 +58,7 @@ var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
|
57
58
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
58
59
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
59
60
|
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
61
|
+
var useHotkeys__default = /*#__PURE__*/_interopDefaultLegacy(useHotkeys);
|
|
60
62
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
61
63
|
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
|
62
64
|
var localeData__default = /*#__PURE__*/_interopDefaultLegacy(localeData);
|
|
@@ -11377,18 +11379,6 @@ var Question = function Question(_ref) {
|
|
|
11377
11379
|
});
|
|
11378
11380
|
};
|
|
11379
11381
|
|
|
11380
|
-
var moveItem = function moveItem(arr, sourceIndex, destinationIndex) {
|
|
11381
|
-
if (sourceIndex === destinationIndex) return arr;
|
|
11382
|
-
if (arr instanceof Array && arr[sourceIndex] !== undefined) {
|
|
11383
|
-
var removedItem = arr.splice(sourceIndex, 1)[0];
|
|
11384
|
-
arr.splice(destinationIndex, 0, removedItem);
|
|
11385
|
-
}
|
|
11386
|
-
return arr;
|
|
11387
|
-
};
|
|
11388
|
-
var arrayHelpers = {
|
|
11389
|
-
moveItem: moveItem
|
|
11390
|
-
};
|
|
11391
|
-
|
|
11392
11382
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
11393
11383
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
11394
11384
|
// generators (like Math.random()).
|
|
@@ -11454,6 +11444,18 @@ function v4(options, buf, offset) {
|
|
|
11454
11444
|
return unsafeStringify(rnds);
|
|
11455
11445
|
}
|
|
11456
11446
|
|
|
11447
|
+
var moveItem = function moveItem(arr, sourceIndex, destinationIndex) {
|
|
11448
|
+
if (sourceIndex === destinationIndex) return arr;
|
|
11449
|
+
if (arr instanceof Array && arr[sourceIndex] !== undefined) {
|
|
11450
|
+
var removedItem = arr.splice(sourceIndex, 1)[0];
|
|
11451
|
+
arr.splice(destinationIndex, 0, removedItem);
|
|
11452
|
+
}
|
|
11453
|
+
return arr;
|
|
11454
|
+
};
|
|
11455
|
+
var arrayHelpers = {
|
|
11456
|
+
moveItem: moveItem
|
|
11457
|
+
};
|
|
11458
|
+
|
|
11457
11459
|
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; }
|
|
11458
11460
|
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; }
|
|
11459
11461
|
var generateUniqueFieldCode = function generateUniqueFieldCode(type, questions) {
|
|
@@ -27151,7 +27153,7 @@ var ExternalForm = function ExternalForm(_ref) {
|
|
|
27151
27153
|
questions: []
|
|
27152
27154
|
} : _useForm$data,
|
|
27153
27155
|
isLoading = _useForm.isLoading;
|
|
27154
|
-
var keyPressRef =
|
|
27156
|
+
var keyPressRef = useHotkeys__default["default"]("command+enter", ((_formikInnerRef$curre = formikInnerRef.current) === null || _formikInnerRef$curre === void 0 ? void 0 : _formikInnerRef$curre.handleSubmit) || neetoCist.noop, {
|
|
27155
27157
|
mode: "scoped"
|
|
27156
27158
|
});
|
|
27157
27159
|
if (isLoading || form.isQuestionsLoading || !!submissionId && submission !== null && submission !== void 0 && submission.isLoading) {
|