@bigbinary/neeto-fields-frontend 1.3.12 → 1.3.14
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 +15 -17
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +16 -18
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- 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
|
@@ -942,7 +942,7 @@ var useFormikFields = function useFormikFields(_ref) {
|
|
|
942
942
|
disabled: disabled,
|
|
943
943
|
//conditional props
|
|
944
944
|
options: isDropdown$1(kind) ? fieldData : undefined,
|
|
945
|
-
getPopupContainer: isDateTime(kind) ? ramda.prop("parentElement") : undefined
|
|
945
|
+
getPopupContainer: !isInline && isDateTime(kind) ? ramda.prop("parentElement") : undefined
|
|
946
946
|
})
|
|
947
947
|
};
|
|
948
948
|
};
|
|
@@ -2664,18 +2664,15 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
|
2664
2664
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
2665
2665
|
selectedField = _useState8[0],
|
|
2666
2666
|
setSelectedField = _useState8[1];
|
|
2667
|
-
var _useState9 = React.useState(
|
|
2668
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
2669
|
-
searchTerm = _useState10[0],
|
|
2670
|
-
setSearchTerm = _useState10[1];
|
|
2671
|
-
var _useState11 = React.useState({
|
|
2667
|
+
var _useState9 = React.useState({
|
|
2672
2668
|
page: constants.DEFAULT_PAGE_INDEX,
|
|
2673
2669
|
pageSize: constants.DEFAULT_PAGE_SIZE
|
|
2674
2670
|
}),
|
|
2675
|
-
|
|
2676
|
-
pageProps =
|
|
2677
|
-
setPageProps =
|
|
2678
|
-
var
|
|
2671
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
2672
|
+
pageProps = _useState10[0],
|
|
2673
|
+
setPageProps = _useState10[1];
|
|
2674
|
+
var _useQueryParams = reactUtils.useQueryParams(),
|
|
2675
|
+
searchTerm = _useQueryParams.search_term;
|
|
2679
2676
|
var history = reactRouterDom.useHistory();
|
|
2680
2677
|
var _useTranslation = reactI18next.useTranslation(),
|
|
2681
2678
|
t = _useTranslation.t;
|
|
@@ -2697,7 +2694,7 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
|
2697
2694
|
resourceType: !isOwnerBased ? resource : undefined,
|
|
2698
2695
|
ownerId: ownerId,
|
|
2699
2696
|
state: state || FIELD_STATES.active,
|
|
2700
|
-
searchTerm:
|
|
2697
|
+
searchTerm: searchTerm,
|
|
2701
2698
|
pageProps: pageProps
|
|
2702
2699
|
};
|
|
2703
2700
|
var _useFetchFields = useFetchFields(fieldParams, {
|
|
@@ -2783,10 +2780,6 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
|
2783
2780
|
var isScreenLoading = isFieldsLoading || isConfigsLoading;
|
|
2784
2781
|
var showCountSubheader = count > 0 && !showStateFilter;
|
|
2785
2782
|
var searchProps = {
|
|
2786
|
-
onChange: function onChange(e) {
|
|
2787
|
-
return setSearchTerm(e.target.value);
|
|
2788
|
-
},
|
|
2789
|
-
value: searchTerm,
|
|
2790
2783
|
placeholder: t("neetoFields.placeholders.searchFields"),
|
|
2791
2784
|
className: "w-44"
|
|
2792
2785
|
};
|
|
@@ -7884,15 +7877,20 @@ var InlineFieldValueInput = function InlineFieldValueInput(_ref) {
|
|
|
7884
7877
|
_ref$ownerId = _ref.ownerId,
|
|
7885
7878
|
ownerId = _ref$ownerId === void 0 ? "" : _ref$ownerId,
|
|
7886
7879
|
_ref$onMutationSucces = _ref.onMutationSuccess,
|
|
7887
|
-
onMutationSuccess = _ref$onMutationSucces === void 0 ? neetoCist.noop : _ref$onMutationSucces
|
|
7880
|
+
onMutationSuccess = _ref$onMutationSucces === void 0 ? neetoCist.noop : _ref$onMutationSucces,
|
|
7881
|
+
_ref$onMutate = _ref.onMutate,
|
|
7882
|
+
_onMutate = _ref$onMutate === void 0 ? neetoCist.noop : _ref$onMutate;
|
|
7888
7883
|
var _useState = React.useState(false),
|
|
7889
7884
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7890
7885
|
editMode = _useState2[0],
|
|
7891
7886
|
setEditMode = _useState2[1];
|
|
7892
7887
|
var queryOptions = {
|
|
7888
|
+
onMutate: function onMutate(variables) {
|
|
7889
|
+
return _onMutate(variables.payload || variables);
|
|
7890
|
+
},
|
|
7893
7891
|
onSuccess: function onSuccess() {
|
|
7894
7892
|
setEditMode(false);
|
|
7895
|
-
onMutationSuccess();
|
|
7893
|
+
onMutationSuccess.apply(void 0, arguments);
|
|
7896
7894
|
}
|
|
7897
7895
|
};
|
|
7898
7896
|
var _useFieldValues = useFieldValues({
|