@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.js
CHANGED
|
@@ -12830,7 +12830,7 @@ var formValidationSchema = yup.object().shape({
|
|
|
12830
12830
|
lowestRatingLabel: yup.string().nullable()
|
|
12831
12831
|
});
|
|
12832
12832
|
|
|
12833
|
-
var _excluded$9 = ["question", "onClose", "questions", "handleSelect", "buildRequestArgs"];
|
|
12833
|
+
var _excluded$9 = ["question", "onClose", "questions", "handleSelect", "buildRequestArgs", "isOpen"];
|
|
12834
12834
|
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; }
|
|
12835
12835
|
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; }
|
|
12836
12836
|
var Add = function Add(_ref) {
|
|
@@ -12839,6 +12839,7 @@ var Add = function Add(_ref) {
|
|
|
12839
12839
|
questions = _ref.questions,
|
|
12840
12840
|
handleSelect = _ref.handleSelect,
|
|
12841
12841
|
buildRequestArgs = _ref.buildRequestArgs,
|
|
12842
|
+
isOpen = _ref.isOpen,
|
|
12842
12843
|
props = _objectWithoutProperties$1(_ref, _excluded$9);
|
|
12843
12844
|
var _useBuildFormStore = useBuildFormStore(function (store) {
|
|
12844
12845
|
var _store$formState, _store$formState2;
|
|
@@ -12860,6 +12861,7 @@ var Add = function Add(_ref) {
|
|
|
12860
12861
|
createQuestion = _useCreateQuestion.mutate,
|
|
12861
12862
|
isCreating = _useCreateQuestion.isLoading;
|
|
12862
12863
|
var handleSubmit = function handleSubmit(values) {
|
|
12864
|
+
if (isCreating || !isOpen) return;
|
|
12863
12865
|
var displayOrder = question ? question.displayOrder + 1 : questions.length;
|
|
12864
12866
|
createQuestion(_objectSpread$w({
|
|
12865
12867
|
language: language,
|
|
@@ -12906,11 +12908,12 @@ var Add = function Add(_ref) {
|
|
|
12906
12908
|
});
|
|
12907
12909
|
};
|
|
12908
12910
|
|
|
12909
|
-
var _excluded$8 = ["question", "onClose"];
|
|
12911
|
+
var _excluded$8 = ["question", "isOpen", "onClose"];
|
|
12910
12912
|
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; }
|
|
12911
12913
|
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; }
|
|
12912
12914
|
var Edit = function Edit(_ref) {
|
|
12913
12915
|
var question = _ref.question,
|
|
12916
|
+
isOpen = _ref.isOpen,
|
|
12914
12917
|
onClose = _ref.onClose,
|
|
12915
12918
|
props = _objectWithoutProperties$1(_ref, _excluded$8);
|
|
12916
12919
|
var _useTranslation = useTranslation(),
|
|
@@ -12927,6 +12930,7 @@ var Edit = function Edit(_ref) {
|
|
|
12927
12930
|
isUpdating = _useUpdateQuestion.isLoading;
|
|
12928
12931
|
var handleSubmit = function handleSubmit(values, _ref2) {
|
|
12929
12932
|
var setSubmitting = _ref2.setSubmitting;
|
|
12933
|
+
if (isUpdating || !isOpen) return;
|
|
12930
12934
|
var payload = {
|
|
12931
12935
|
language: language,
|
|
12932
12936
|
neetoFormQuestion: values
|
|
@@ -13378,6 +13382,7 @@ var ManageQuestionPane = function ManageQuestionPane(_ref) {
|
|
|
13378
13382
|
children: /*#__PURE__*/jsx(Component, _objectSpread$s({}, _objectSpread$s({
|
|
13379
13383
|
availableQuestionKinds: availableQuestionKinds,
|
|
13380
13384
|
initialFocusRef: initialFocusRef,
|
|
13385
|
+
isOpen: isOpen,
|
|
13381
13386
|
onClose: onClose,
|
|
13382
13387
|
question: question
|
|
13383
13388
|
}, props)))
|