@bigbinary/neeto-fields-frontend 1.3.4 → 1.3.5
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 +22 -72
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +25 -75
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -6542,17 +6542,9 @@ var useFetchFields = function useFetchFields(_ref, options) {
|
|
|
6542
6542
|
}, options));
|
|
6543
6543
|
};
|
|
6544
6544
|
var useCreateField = function useCreateField(options) {
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
var _options$onSuccess;
|
|
6549
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
6550
|
-
args[_key] = arguments[_key];
|
|
6551
|
-
}
|
|
6552
|
-
options === null || options === void 0 ? void 0 : (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 ? void 0 : _options$onSuccess.call.apply(_options$onSuccess, [options].concat(args));
|
|
6553
|
-
queryClient.invalidateQueries(FIELDS);
|
|
6554
|
-
}
|
|
6555
|
-
}));
|
|
6545
|
+
return reactUtils.useMutationWithInvalidation(fieldsApi.create, _objectSpread$9({
|
|
6546
|
+
keysToInvalidate: [FIELDS]
|
|
6547
|
+
}, options));
|
|
6556
6548
|
};
|
|
6557
6549
|
var useShowField = function useShowField(_ref2, options) {
|
|
6558
6550
|
var fieldId = _ref2.fieldId,
|
|
@@ -6576,37 +6568,18 @@ var useFetchDependencies = function useFetchDependencies(_ref3, options) {
|
|
|
6576
6568
|
}, options);
|
|
6577
6569
|
};
|
|
6578
6570
|
var useUpdateField = function useUpdateField(options) {
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
var _options$onSuccess2;
|
|
6583
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
6584
|
-
args[_key2] = arguments[_key2];
|
|
6585
|
-
}
|
|
6586
|
-
options === null || options === void 0 ? void 0 : (_options$onSuccess2 = options.onSuccess) === null || _options$onSuccess2 === void 0 ? void 0 : _options$onSuccess2.call.apply(_options$onSuccess2, [options].concat(args));
|
|
6587
|
-
queryClient.invalidateQueries(FIELDS);
|
|
6588
|
-
}
|
|
6589
|
-
}));
|
|
6571
|
+
return reactUtils.useMutationWithInvalidation(fieldsApi.update, _objectSpread$9({
|
|
6572
|
+
keysToInvalidate: [FIELDS]
|
|
6573
|
+
}, options));
|
|
6590
6574
|
};
|
|
6591
6575
|
var useDestroyField = function useDestroyField(options) {
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
var _options$onSuccess3;
|
|
6596
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
6597
|
-
args[_key3] = arguments[_key3];
|
|
6598
|
-
}
|
|
6599
|
-
options === null || options === void 0 ? void 0 : (_options$onSuccess3 = options.onSuccess) === null || _options$onSuccess3 === void 0 ? void 0 : _options$onSuccess3.call.apply(_options$onSuccess3, [options].concat(args));
|
|
6600
|
-
queryClient.invalidateQueries(FIELDS);
|
|
6601
|
-
}
|
|
6602
|
-
}));
|
|
6576
|
+
return reactUtils.useMutationWithInvalidation(fieldsApi.destroy, _objectSpread$9({
|
|
6577
|
+
keysToInvalidate: [FIELDS]
|
|
6578
|
+
}, options));
|
|
6603
6579
|
};
|
|
6604
6580
|
var useReorderFields = function useReorderFields() {
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
onSuccess: function onSuccess() {
|
|
6608
|
-
queryClient.invalidateQueries(FIELDS);
|
|
6609
|
-
}
|
|
6581
|
+
return reactUtils.useMutationWithInvalidation(fieldsApi.reorder, {
|
|
6582
|
+
keysToInvalidate: [FIELDS]
|
|
6610
6583
|
});
|
|
6611
6584
|
};
|
|
6612
6585
|
|
|
@@ -8001,7 +7974,7 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
|
8001
7974
|
}, [menuItems, resource]);
|
|
8002
7975
|
React.useEffect(function () {
|
|
8003
7976
|
handleURLWithDefaultValues();
|
|
8004
|
-
}, [isConfigsLoading, resources]);
|
|
7977
|
+
}, [isConfigsLoading, resources, resource, state]);
|
|
8005
7978
|
React.useEffect(function () {
|
|
8006
7979
|
setPageProps({
|
|
8007
7980
|
pageIndex: constants.DEFAULT_PAGE_INDEX,
|
|
@@ -8178,11 +8151,9 @@ var Header = function Header(_ref) {
|
|
|
8178
8151
|
actionBlockProps = _objectWithoutProperties(_ref, _excluded);
|
|
8179
8152
|
return /*#__PURE__*/React__default["default"].createElement(NeetoUIHeader__default["default"], {
|
|
8180
8153
|
size: "small",
|
|
8154
|
+
breadcrumbs: breadcrumbs,
|
|
8181
8155
|
searchProps: searchProps,
|
|
8182
8156
|
actionBlock: /*#__PURE__*/React__default["default"].createElement(ActionBlock, actionBlockProps),
|
|
8183
|
-
breadcrumbs: [].concat(_toConsumableArray(breadcrumbs), [{
|
|
8184
|
-
text: pure.truncate(title, 50)
|
|
8185
|
-
}]),
|
|
8186
8157
|
title: /*#__PURE__*/React__default["default"].createElement(TitleWithHelpLink, {
|
|
8187
8158
|
helpUrl: helpDocUrl,
|
|
8188
8159
|
title: title
|
|
@@ -12741,40 +12712,19 @@ var fieldValuesApi = {
|
|
|
12741
12712
|
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12742
12713
|
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12743
12714
|
var useCreateFieldValue = function useCreateFieldValue(options) {
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
12748
|
-
args[_key] = arguments[_key];
|
|
12749
|
-
}
|
|
12750
|
-
options === null || options === void 0 ? void 0 : options.onSuccess.apply(options, args);
|
|
12751
|
-
queryClient.invalidateQueries([QUERY_KEYS.FIELD_VALUES]);
|
|
12752
|
-
}
|
|
12753
|
-
}));
|
|
12715
|
+
return reactUtils.useMutationWithInvalidation(fieldValuesApi.create, _objectSpread$2({
|
|
12716
|
+
keysToInvalidate: [[QUERY_KEYS.FIELD_VALUES]]
|
|
12717
|
+
}, options));
|
|
12754
12718
|
};
|
|
12755
12719
|
var useUpdateFieldValue = function useUpdateFieldValue(options) {
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
-
|
|
12759
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
12760
|
-
args[_key2] = arguments[_key2];
|
|
12761
|
-
}
|
|
12762
|
-
options === null || options === void 0 ? void 0 : options.onSuccess.apply(options, args);
|
|
12763
|
-
queryClient.invalidateQueries([QUERY_KEYS.FIELD_VALUES]);
|
|
12764
|
-
}
|
|
12765
|
-
}));
|
|
12720
|
+
return reactUtils.useMutationWithInvalidation(fieldValuesApi.update, _objectSpread$2({
|
|
12721
|
+
keysToInvalidate: [[QUERY_KEYS.FIELD_VALUES]]
|
|
12722
|
+
}, options));
|
|
12766
12723
|
};
|
|
12767
12724
|
var useDeleteFieldValue = function useDeleteFieldValue(options) {
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
|
|
12771
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
12772
|
-
args[_key3] = arguments[_key3];
|
|
12773
|
-
}
|
|
12774
|
-
options === null || options === void 0 ? void 0 : options.onSuccess.apply(options, args);
|
|
12775
|
-
queryClient.invalidateQueries([QUERY_KEYS.FIELD_VALUES]);
|
|
12776
|
-
}
|
|
12777
|
-
}));
|
|
12725
|
+
return reactUtils.useMutationWithInvalidation(fieldValuesApi.destroy, _objectSpread$2({
|
|
12726
|
+
keysToInvalidate: [[QUERY_KEYS.FIELD_VALUES]]
|
|
12727
|
+
}, options));
|
|
12778
12728
|
};
|
|
12779
12729
|
|
|
12780
12730
|
const useNavPrompt = ({
|