@bigbinary/neeto-fields-frontend 1.3.37 → 1.3.38
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 +8 -23
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +8 -23
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -1548,32 +1548,21 @@ var getPermittedKinds = function getPermittedKinds(_ref2) {
|
|
|
1548
1548
|
var allowedKinds = _ref2.allowedKinds,
|
|
1549
1549
|
selectedKind = _ref2.selectedKind;
|
|
1550
1550
|
var filteredKinds = ramda.pick(allowedKinds, FIELD_KINDS);
|
|
1551
|
-
|
|
1551
|
+
return neetoCist.filterBy({
|
|
1552
1552
|
group: selectedKind === null || selectedKind === void 0 ? void 0 : selectedKind.group
|
|
1553
1553
|
}, ramda.values(filteredKinds));
|
|
1554
|
-
return permittedKinds;
|
|
1555
1554
|
};
|
|
1556
1555
|
var generateValidationSchema = function generateValidationSchema(additionalValidations) {
|
|
1557
1556
|
return yup__namespace.object().shape(_objectSpread$b(_objectSpread$b({}, BASIC_FIELD_FORM_VALIDATIONS), additionalValidations));
|
|
1558
1557
|
};
|
|
1559
1558
|
var renderFormFooter = function renderFormFooter(_ref3) {
|
|
1560
1559
|
var onClose = _ref3.onClose,
|
|
1561
|
-
loading = _ref3.loading
|
|
1562
|
-
_ref3$dirty = _ref3.dirty,
|
|
1563
|
-
dirty = _ref3$dirty === void 0 ? true : _ref3$dirty;
|
|
1560
|
+
loading = _ref3.loading;
|
|
1564
1561
|
return /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Footer, null, /*#__PURE__*/React__default["default"].createElement(formik$1.ActionBlock, {
|
|
1565
1562
|
cancelButtonProps: {
|
|
1566
|
-
onClick: onClose
|
|
1567
|
-
style: "text",
|
|
1568
|
-
disabled: loading
|
|
1563
|
+
onClick: onClose
|
|
1569
1564
|
},
|
|
1570
|
-
|
|
1571
|
-
label: i18next.t("neetoFields.labels.saveChanges"),
|
|
1572
|
-
className: "mr-2",
|
|
1573
|
-
type: "submit",
|
|
1574
|
-
disabled: !dirty,
|
|
1575
|
-
loading: loading
|
|
1576
|
-
}
|
|
1565
|
+
isSubmitting: loading
|
|
1577
1566
|
}));
|
|
1578
1567
|
};
|
|
1579
1568
|
var getDefaultOption = function getDefaultOption() {
|
|
@@ -1917,15 +1906,13 @@ var Add = function Add(_ref) {
|
|
|
1917
1906
|
onSubmit: handleSubmit
|
|
1918
1907
|
}
|
|
1919
1908
|
}, function (_ref2) {
|
|
1920
|
-
var
|
|
1921
|
-
kind = _ref2.values.kind;
|
|
1909
|
+
var kind = _ref2.values.kind;
|
|
1922
1910
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(FieldForm, _extends({
|
|
1923
1911
|
chosenKind: kind.value,
|
|
1924
1912
|
kindSelectOptions: filteredKinds
|
|
1925
1913
|
}, props)), renderFormFooter({
|
|
1926
1914
|
onClose: onClose,
|
|
1927
|
-
loading: isSubmitting
|
|
1928
|
-
dirty: dirty
|
|
1915
|
+
loading: isSubmitting
|
|
1929
1916
|
}));
|
|
1930
1917
|
}));
|
|
1931
1918
|
};
|
|
@@ -1991,8 +1978,7 @@ var Edit = function Edit(_ref) {
|
|
|
1991
1978
|
onSubmit: handleSubmit
|
|
1992
1979
|
}
|
|
1993
1980
|
}, function (_ref2) {
|
|
1994
|
-
var kind = _ref2.values.kind
|
|
1995
|
-
dirty = _ref2.dirty;
|
|
1981
|
+
var kind = _ref2.values.kind;
|
|
1996
1982
|
var permittedKinds = getPermittedKinds({
|
|
1997
1983
|
allowedKinds: allowedKinds,
|
|
1998
1984
|
selectedKind: kind
|
|
@@ -2003,8 +1989,7 @@ var Edit = function Edit(_ref) {
|
|
|
2003
1989
|
kindSelectOptions: permittedKinds
|
|
2004
1990
|
}, props)), renderFormFooter({
|
|
2005
1991
|
onClose: onClose,
|
|
2006
|
-
loading: isSubmitting
|
|
2007
|
-
dirty: dirty
|
|
1992
|
+
loading: isSubmitting
|
|
2008
1993
|
}));
|
|
2009
1994
|
}));
|
|
2010
1995
|
};
|