@bigbinary/neeto-fields-frontend 1.3.11 → 1.3.13
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/README.md +2 -1
- package/dist/index.cjs.js +9 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +1 -0
package/README.md
CHANGED
|
@@ -491,7 +491,8 @@ the following props:
|
|
|
491
491
|
3. `resourceType`: The type of resource.
|
|
492
492
|
4. `resourceId`: The ID of the resource.
|
|
493
493
|
5. `ownerId`: The ID of the owner in case the owner is not an organization.
|
|
494
|
-
6. `
|
|
494
|
+
6. `onMutate`: The callback function which is triggered on the mutations
|
|
495
|
+
7. `onMutationSuccess`: The callback function which is triggered on the success
|
|
495
496
|
of mutation functions of field value.
|
|
496
497
|
|
|
497
498
|
#### Usage:
|
package/dist/index.cjs.js
CHANGED
|
@@ -814,8 +814,7 @@ var dateTimeToString = function dateTimeToString(dateTime) {
|
|
|
814
814
|
return dateTime && dayjs(dateTime).toString() || "";
|
|
815
815
|
};
|
|
816
816
|
var getValueFromBool = function getValueFromBool(value) {
|
|
817
|
-
|
|
818
|
-
return value;
|
|
817
|
+
return value === true ? i18next.t("neetoFields.common.yes") : i18next.t("neetoFields.common.no");
|
|
819
818
|
};
|
|
820
819
|
|
|
821
820
|
var _excluded$6 = ["name", "id", "kind", "data", "individualSubmit", "formRef", "formRefs", "disabled", "isRequiredColumnName", "isInline", "onBlur"];
|
|
@@ -943,7 +942,7 @@ var useFormikFields = function useFormikFields(_ref) {
|
|
|
943
942
|
disabled: disabled,
|
|
944
943
|
//conditional props
|
|
945
944
|
options: isDropdown$1(kind) ? fieldData : undefined,
|
|
946
|
-
getPopupContainer: isDateTime(kind) ? ramda.prop("parentElement") : undefined
|
|
945
|
+
getPopupContainer: !isInline && isDateTime(kind) ? ramda.prop("parentElement") : undefined
|
|
947
946
|
})
|
|
948
947
|
};
|
|
949
948
|
};
|
|
@@ -7885,15 +7884,20 @@ var InlineFieldValueInput = function InlineFieldValueInput(_ref) {
|
|
|
7885
7884
|
_ref$ownerId = _ref.ownerId,
|
|
7886
7885
|
ownerId = _ref$ownerId === void 0 ? "" : _ref$ownerId,
|
|
7887
7886
|
_ref$onMutationSucces = _ref.onMutationSuccess,
|
|
7888
|
-
onMutationSuccess = _ref$onMutationSucces === void 0 ? neetoCist.noop : _ref$onMutationSucces
|
|
7887
|
+
onMutationSuccess = _ref$onMutationSucces === void 0 ? neetoCist.noop : _ref$onMutationSucces,
|
|
7888
|
+
_ref$onMutate = _ref.onMutate,
|
|
7889
|
+
_onMutate = _ref$onMutate === void 0 ? neetoCist.noop : _ref$onMutate;
|
|
7889
7890
|
var _useState = React.useState(false),
|
|
7890
7891
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7891
7892
|
editMode = _useState2[0],
|
|
7892
7893
|
setEditMode = _useState2[1];
|
|
7893
7894
|
var queryOptions = {
|
|
7895
|
+
onMutate: function onMutate(variables) {
|
|
7896
|
+
return _onMutate(variables.payload || variables);
|
|
7897
|
+
},
|
|
7894
7898
|
onSuccess: function onSuccess() {
|
|
7895
7899
|
setEditMode(false);
|
|
7896
|
-
onMutationSuccess();
|
|
7900
|
+
onMutationSuccess.apply(void 0, arguments);
|
|
7897
7901
|
}
|
|
7898
7902
|
};
|
|
7899
7903
|
var _useFieldValues = useFieldValues({
|