@bigbinary/neeto-form-frontend 2.0.3 → 2.0.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/index.cjs.js +7 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -12893,7 +12893,7 @@ var formValidationSchema = yup__namespace.object().shape({
|
|
|
12893
12893
|
lowestRatingLabel: yup__namespace.string().nullable()
|
|
12894
12894
|
});
|
|
12895
12895
|
|
|
12896
|
-
var _excluded$9 = ["question", "onClose", "questions", "handleSelect", "buildRequestArgs"];
|
|
12896
|
+
var _excluded$9 = ["question", "onClose", "questions", "handleSelect", "buildRequestArgs", "isOpen"];
|
|
12897
12897
|
function ownKeys$w(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; }
|
|
12898
12898
|
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$w(Object(t), !0).forEach(function (r) { _defineProperty$6(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12899
12899
|
var Add = function Add(_ref) {
|
|
@@ -12902,6 +12902,7 @@ var Add = function Add(_ref) {
|
|
|
12902
12902
|
questions = _ref.questions,
|
|
12903
12903
|
handleSelect = _ref.handleSelect,
|
|
12904
12904
|
buildRequestArgs = _ref.buildRequestArgs,
|
|
12905
|
+
isOpen = _ref.isOpen,
|
|
12905
12906
|
props = _objectWithoutProperties$1(_ref, _excluded$9);
|
|
12906
12907
|
var _useBuildFormStore = useBuildFormStore(function (store) {
|
|
12907
12908
|
var _store$formState, _store$formState2;
|
|
@@ -12923,6 +12924,7 @@ var Add = function Add(_ref) {
|
|
|
12923
12924
|
createQuestion = _useCreateQuestion.mutate,
|
|
12924
12925
|
isCreating = _useCreateQuestion.isLoading;
|
|
12925
12926
|
var handleSubmit = function handleSubmit(values) {
|
|
12927
|
+
if (isCreating || !isOpen) return;
|
|
12926
12928
|
var displayOrder = question ? question.displayOrder + 1 : questions.length;
|
|
12927
12929
|
createQuestion(_objectSpread$w({
|
|
12928
12930
|
language: language,
|
|
@@ -12969,11 +12971,12 @@ var Add = function Add(_ref) {
|
|
|
12969
12971
|
});
|
|
12970
12972
|
};
|
|
12971
12973
|
|
|
12972
|
-
var _excluded$8 = ["question", "onClose"];
|
|
12974
|
+
var _excluded$8 = ["question", "isOpen", "onClose"];
|
|
12973
12975
|
function ownKeys$v(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; }
|
|
12974
12976
|
function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), !0).forEach(function (r) { _defineProperty$6(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12975
12977
|
var Edit = function Edit(_ref) {
|
|
12976
12978
|
var question = _ref.question,
|
|
12979
|
+
isOpen = _ref.isOpen,
|
|
12977
12980
|
onClose = _ref.onClose,
|
|
12978
12981
|
props = _objectWithoutProperties$1(_ref, _excluded$8);
|
|
12979
12982
|
var _useTranslation = reactI18next.useTranslation(),
|
|
@@ -12990,6 +12993,7 @@ var Edit = function Edit(_ref) {
|
|
|
12990
12993
|
isUpdating = _useUpdateQuestion.isLoading;
|
|
12991
12994
|
var handleSubmit = function handleSubmit(values, _ref2) {
|
|
12992
12995
|
var setSubmitting = _ref2.setSubmitting;
|
|
12996
|
+
if (isUpdating || !isOpen) return;
|
|
12993
12997
|
var payload = {
|
|
12994
12998
|
language: language,
|
|
12995
12999
|
neetoFormQuestion: values
|
|
@@ -13441,6 +13445,7 @@ var ManageQuestionPane = function ManageQuestionPane(_ref) {
|
|
|
13441
13445
|
children: /*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread$s({}, _objectSpread$s({
|
|
13442
13446
|
availableQuestionKinds: availableQuestionKinds,
|
|
13443
13447
|
initialFocusRef: initialFocusRef,
|
|
13448
|
+
isOpen: isOpen,
|
|
13444
13449
|
onClose: onClose,
|
|
13445
13450
|
question: question
|
|
13446
13451
|
}, props)))
|