@bigbinary/neeto-fields-frontend 1.4.0-beta1 → 1.4.0-beta2
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 +1 -1
- package/dist/index.cjs.js +10 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
|
25
25
|
import { useTranslation, Trans } from 'react-i18next';
|
|
26
26
|
import Pane from '@bigbinary/neetoui/Pane';
|
|
27
27
|
import Form from '@bigbinary/neetoui/formik/Form';
|
|
28
|
-
import { useQuery } from '@tanstack/react-query';
|
|
28
|
+
import { useQuery, keepPreviousData } from '@tanstack/react-query';
|
|
29
29
|
import axios from 'axios';
|
|
30
30
|
import { buildUrl, getQueryParams, dateFormat, hyphenize as hyphenize$1 } from '@bigbinary/neeto-commons-frontend/utils';
|
|
31
31
|
import ActionBlock$1 from '@bigbinary/neetoui/formik/ActionBlock';
|
|
@@ -1498,7 +1498,7 @@ var useFetchFields = function useFetchFields(_ref, options) {
|
|
|
1498
1498
|
};
|
|
1499
1499
|
var useCreateField = function useCreateField(options) {
|
|
1500
1500
|
return useMutationWithInvalidation(fieldsApi.create, _objectSpread$f({
|
|
1501
|
-
keysToInvalidate: [FIELDS]
|
|
1501
|
+
keysToInvalidate: [[FIELDS]]
|
|
1502
1502
|
}, options));
|
|
1503
1503
|
};
|
|
1504
1504
|
var useShowField = function useShowField(_ref2, options) {
|
|
@@ -1529,17 +1529,17 @@ var useFetchDependencies = function useFetchDependencies(_ref3, options) {
|
|
|
1529
1529
|
};
|
|
1530
1530
|
var useUpdateField = function useUpdateField(options) {
|
|
1531
1531
|
return useMutationWithInvalidation(fieldsApi.update, _objectSpread$f({
|
|
1532
|
-
keysToInvalidate: [FIELDS]
|
|
1532
|
+
keysToInvalidate: [[FIELDS]]
|
|
1533
1533
|
}, options));
|
|
1534
1534
|
};
|
|
1535
1535
|
var useDestroyField = function useDestroyField(options) {
|
|
1536
1536
|
return useMutationWithInvalidation(fieldsApi.destroy, _objectSpread$f({
|
|
1537
|
-
keysToInvalidate: [FIELDS]
|
|
1537
|
+
keysToInvalidate: [[FIELDS]]
|
|
1538
1538
|
}, options));
|
|
1539
1539
|
};
|
|
1540
1540
|
var useReorderFields = function useReorderFields() {
|
|
1541
1541
|
return useMutationWithInvalidation(fieldsApi.reorder, {
|
|
1542
|
-
keysToInvalidate: [FIELDS]
|
|
1542
|
+
keysToInvalidate: [[FIELDS]]
|
|
1543
1543
|
});
|
|
1544
1544
|
};
|
|
1545
1545
|
|
|
@@ -1798,10 +1798,12 @@ var AdditionalInputs = function AdditionalInputs() {
|
|
|
1798
1798
|
className: "w-full",
|
|
1799
1799
|
children: /*#__PURE__*/jsx(Input$1, {
|
|
1800
1800
|
autoFocus: true,
|
|
1801
|
+
"data-cy": "neeto-fields-dropdown-option-".concat(index),
|
|
1801
1802
|
disabled: isSystem,
|
|
1802
1803
|
name: "data.".concat(index, ".label"),
|
|
1803
1804
|
placeholder: t("neetoFields.placeholders.enterAnOption"),
|
|
1804
1805
|
suffix: options.length > 1 && /*#__PURE__*/jsx(Button, {
|
|
1806
|
+
"data-cy": "neeto-fields-dropdown-option-delete-".concat(index),
|
|
1805
1807
|
icon: Delete,
|
|
1806
1808
|
style: "text",
|
|
1807
1809
|
onClick: function onClick() {
|
|
@@ -2869,7 +2871,7 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
|
2869
2871
|
};
|
|
2870
2872
|
var _useFetchFields = useFetchFields(fieldParams, {
|
|
2871
2873
|
enabled: !!resource,
|
|
2872
|
-
|
|
2874
|
+
placeholderData: keepPreviousData
|
|
2873
2875
|
}),
|
|
2874
2876
|
_useFetchFields$data = _useFetchFields.data,
|
|
2875
2877
|
_useFetchFields$data2 = _useFetchFields$data === void 0 ? {} : _useFetchFields$data,
|
|
@@ -7792,17 +7794,17 @@ function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
7792
7794
|
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7793
7795
|
var useCreateFieldValue = function useCreateFieldValue(options) {
|
|
7794
7796
|
return useMutationWithInvalidation(fieldValuesApi.create, _objectSpread$4({
|
|
7795
|
-
keysToInvalidate: [QUERY_KEYS.FIELD_VALUES]
|
|
7797
|
+
keysToInvalidate: [[QUERY_KEYS.FIELD_VALUES]]
|
|
7796
7798
|
}, options));
|
|
7797
7799
|
};
|
|
7798
7800
|
var useUpdateFieldValue = function useUpdateFieldValue(options) {
|
|
7799
7801
|
return useMutationWithInvalidation(fieldValuesApi.update, _objectSpread$4({
|
|
7800
|
-
keysToInvalidate: [QUERY_KEYS.FIELD_VALUES]
|
|
7802
|
+
keysToInvalidate: [[QUERY_KEYS.FIELD_VALUES]]
|
|
7801
7803
|
}, options));
|
|
7802
7804
|
};
|
|
7803
7805
|
var useDeleteFieldValue = function useDeleteFieldValue(options) {
|
|
7804
7806
|
return useMutationWithInvalidation(fieldValuesApi.destroy, _objectSpread$4({
|
|
7805
|
-
keysToInvalidate: [QUERY_KEYS.FIELD_VALUES]
|
|
7807
|
+
keysToInvalidate: [[QUERY_KEYS.FIELD_VALUES]]
|
|
7806
7808
|
}, options));
|
|
7807
7809
|
};
|
|
7808
7810
|
|