@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/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState, useMemo, useLayoutEffect, useCallback, createContext, memo, useReducer, useContext } from 'react';
|
|
2
|
-
import { useFuncDebounce, useOnClickOutside, withT, useMutationWithInvalidation,
|
|
2
|
+
import { useFuncDebounce, useOnClickOutside, withT, useMutationWithInvalidation, useQueryParams, handleMetaClick } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
3
3
|
import { Checkbox as Checkbox$1, TimePicker, DatePicker, Select, Input, Textarea, Typography, Pane, Label, Button as Button$1, Dropdown, Tab, Alert, NoData, Table, Spinner } from '@bigbinary/neetoui';
|
|
4
4
|
import { isNotEmpty, renameKeys, capitalize, findBy, noop as noop$1, filterBy, toLabelAndValue, slugify, humanize, countBy } from '@bigbinary/neeto-cist';
|
|
5
5
|
import { values, isNotNil, isNil, isEmpty, prop, pluck, clone, pipe, mergeAll, omit, map, pick, assoc, any, head } from 'ramda';
|
|
@@ -907,7 +907,7 @@ var useFormikFields = function useFormikFields(_ref) {
|
|
|
907
907
|
disabled: disabled,
|
|
908
908
|
//conditional props
|
|
909
909
|
options: isDropdown$1(kind) ? fieldData : undefined,
|
|
910
|
-
getPopupContainer: isDateTime(kind) ? prop("parentElement") : undefined
|
|
910
|
+
getPopupContainer: !isInline && isDateTime(kind) ? prop("parentElement") : undefined
|
|
911
911
|
})
|
|
912
912
|
};
|
|
913
913
|
};
|
|
@@ -2629,18 +2629,15 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
|
2629
2629
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
2630
2630
|
selectedField = _useState8[0],
|
|
2631
2631
|
setSelectedField = _useState8[1];
|
|
2632
|
-
var _useState9 = useState(
|
|
2633
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
2634
|
-
searchTerm = _useState10[0],
|
|
2635
|
-
setSearchTerm = _useState10[1];
|
|
2636
|
-
var _useState11 = useState({
|
|
2632
|
+
var _useState9 = useState({
|
|
2637
2633
|
page: DEFAULT_PAGE_INDEX,
|
|
2638
2634
|
pageSize: DEFAULT_PAGE_SIZE
|
|
2639
2635
|
}),
|
|
2640
|
-
|
|
2641
|
-
pageProps =
|
|
2642
|
-
setPageProps =
|
|
2643
|
-
var
|
|
2636
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
2637
|
+
pageProps = _useState10[0],
|
|
2638
|
+
setPageProps = _useState10[1];
|
|
2639
|
+
var _useQueryParams = useQueryParams(),
|
|
2640
|
+
searchTerm = _useQueryParams.search_term;
|
|
2644
2641
|
var history = useHistory();
|
|
2645
2642
|
var _useTranslation = useTranslation(),
|
|
2646
2643
|
t = _useTranslation.t;
|
|
@@ -2662,7 +2659,7 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
|
2662
2659
|
resourceType: !isOwnerBased ? resource : undefined,
|
|
2663
2660
|
ownerId: ownerId,
|
|
2664
2661
|
state: state || FIELD_STATES.active,
|
|
2665
|
-
searchTerm:
|
|
2662
|
+
searchTerm: searchTerm,
|
|
2666
2663
|
pageProps: pageProps
|
|
2667
2664
|
};
|
|
2668
2665
|
var _useFetchFields = useFetchFields(fieldParams, {
|
|
@@ -2748,10 +2745,6 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
|
2748
2745
|
var isScreenLoading = isFieldsLoading || isConfigsLoading;
|
|
2749
2746
|
var showCountSubheader = count > 0 && !showStateFilter;
|
|
2750
2747
|
var searchProps = {
|
|
2751
|
-
onChange: function onChange(e) {
|
|
2752
|
-
return setSearchTerm(e.target.value);
|
|
2753
|
-
},
|
|
2754
|
-
value: searchTerm,
|
|
2755
2748
|
placeholder: t("neetoFields.placeholders.searchFields"),
|
|
2756
2749
|
className: "w-44"
|
|
2757
2750
|
};
|
|
@@ -7849,15 +7842,20 @@ var InlineFieldValueInput = function InlineFieldValueInput(_ref) {
|
|
|
7849
7842
|
_ref$ownerId = _ref.ownerId,
|
|
7850
7843
|
ownerId = _ref$ownerId === void 0 ? "" : _ref$ownerId,
|
|
7851
7844
|
_ref$onMutationSucces = _ref.onMutationSuccess,
|
|
7852
|
-
onMutationSuccess = _ref$onMutationSucces === void 0 ? noop$1 : _ref$onMutationSucces
|
|
7845
|
+
onMutationSuccess = _ref$onMutationSucces === void 0 ? noop$1 : _ref$onMutationSucces,
|
|
7846
|
+
_ref$onMutate = _ref.onMutate,
|
|
7847
|
+
_onMutate = _ref$onMutate === void 0 ? noop$1 : _ref$onMutate;
|
|
7853
7848
|
var _useState = useState(false),
|
|
7854
7849
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7855
7850
|
editMode = _useState2[0],
|
|
7856
7851
|
setEditMode = _useState2[1];
|
|
7857
7852
|
var queryOptions = {
|
|
7853
|
+
onMutate: function onMutate(variables) {
|
|
7854
|
+
return _onMutate(variables.payload || variables);
|
|
7855
|
+
},
|
|
7858
7856
|
onSuccess: function onSuccess() {
|
|
7859
7857
|
setEditMode(false);
|
|
7860
|
-
onMutationSuccess();
|
|
7858
|
+
onMutationSuccess.apply(void 0, arguments);
|
|
7861
7859
|
}
|
|
7862
7860
|
};
|
|
7863
7861
|
var _useFieldValues = useFieldValues({
|