@bigbinary/neeto-rules-frontend 2.0.1 → 2.0.3
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 +9 -1
- package/dist/index.cjs.js +17 -16
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -63,6 +63,9 @@ import Help from '@bigbinary/neeto-icons/Help';
|
|
|
63
63
|
import Down from '@bigbinary/neeto-icons/Down';
|
|
64
64
|
import Up from '@bigbinary/neeto-icons/Up';
|
|
65
65
|
|
|
66
|
+
var AUTOMATION_RULES = "automation-rules";
|
|
67
|
+
var STALE_TIME = 3200000;
|
|
68
|
+
|
|
66
69
|
function _typeof$3(o) {
|
|
67
70
|
"@babel/helpers - typeof";
|
|
68
71
|
|
|
@@ -225,15 +228,12 @@ var automationRulesApi = {
|
|
|
225
228
|
reorder: reorder
|
|
226
229
|
};
|
|
227
230
|
|
|
228
|
-
var AUTOMATION_RULES = "automation-rules";
|
|
229
|
-
var STALE_TIME = 3200000;
|
|
230
|
-
|
|
231
231
|
function ownKeys$v(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
232
232
|
function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), !0).forEach(function (r) { _defineProperty$2(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
233
233
|
var useFetchAutomationRules = function useFetchAutomationRules(params) {
|
|
234
234
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
235
235
|
return useQuery(_objectSpread$t({
|
|
236
|
-
queryKey: [AUTOMATION_RULES, params],
|
|
236
|
+
queryKey: [AUTOMATION_RULES, params.url, params],
|
|
237
237
|
queryFn: function queryFn() {
|
|
238
238
|
return automationRulesApi.fetch(params);
|
|
239
239
|
},
|
|
@@ -244,24 +244,24 @@ var useFetchAutomationRules = function useFetchAutomationRules(params) {
|
|
|
244
244
|
placeholderData: keepPreviousData
|
|
245
245
|
}, options));
|
|
246
246
|
};
|
|
247
|
-
var useUpdateAutomationRule = function useUpdateAutomationRule() {
|
|
247
|
+
var useUpdateAutomationRule = function useUpdateAutomationRule(url) {
|
|
248
248
|
return useMutationWithInvalidation(automationRulesApi.update, {
|
|
249
|
-
keysToInvalidate: [[AUTOMATION_RULES]]
|
|
249
|
+
keysToInvalidate: [[AUTOMATION_RULES, url]]
|
|
250
250
|
});
|
|
251
251
|
};
|
|
252
|
-
var useCloneAutomationRule = function useCloneAutomationRule() {
|
|
252
|
+
var useCloneAutomationRule = function useCloneAutomationRule(url) {
|
|
253
253
|
return useMutationWithInvalidation(automationRulesApi.clone, {
|
|
254
|
-
keysToInvalidate: [[AUTOMATION_RULES]]
|
|
254
|
+
keysToInvalidate: [[AUTOMATION_RULES, url]]
|
|
255
255
|
});
|
|
256
256
|
};
|
|
257
|
-
var useDeleteAutomationRule = function useDeleteAutomationRule() {
|
|
257
|
+
var useDeleteAutomationRule = function useDeleteAutomationRule(url) {
|
|
258
258
|
return useMutationWithInvalidation(automationRulesApi.destroy, {
|
|
259
|
-
keysToInvalidate: [[AUTOMATION_RULES]]
|
|
259
|
+
keysToInvalidate: [[AUTOMATION_RULES, url]]
|
|
260
260
|
});
|
|
261
261
|
};
|
|
262
|
-
var useReorderAutomationRules = function useReorderAutomationRules() {
|
|
262
|
+
var useReorderAutomationRules = function useReorderAutomationRules(url) {
|
|
263
263
|
return useMutationWithInvalidation(automationRulesApi.reorder, {
|
|
264
|
-
keysToInvalidate: [[AUTOMATION_RULES]]
|
|
264
|
+
keysToInvalidate: [[AUTOMATION_RULES, url]]
|
|
265
265
|
});
|
|
266
266
|
};
|
|
267
267
|
|
|
@@ -9449,7 +9449,7 @@ var RulesReorder = function RulesReorder(_ref) {
|
|
|
9449
9449
|
setInitialRules = _useState2[1];
|
|
9450
9450
|
var _useTranslation = useTranslation(),
|
|
9451
9451
|
t = _useTranslation.t;
|
|
9452
|
-
var _useReorderAutomation = useReorderAutomationRules(),
|
|
9452
|
+
var _useReorderAutomation = useReorderAutomationRules(url),
|
|
9453
9453
|
reOrder = _useReorderAutomation.mutate,
|
|
9454
9454
|
isPending = _useReorderAutomation.isPending;
|
|
9455
9455
|
var handleReorderSave = function handleReorderSave(rules) {
|
|
@@ -9805,13 +9805,13 @@ var RulesTable = function RulesTable(_ref) {
|
|
|
9805
9805
|
hidePreviewPane = _useUtilityStore.hidePreviewPane;
|
|
9806
9806
|
var _useTranslation = useTranslation(),
|
|
9807
9807
|
t = _useTranslation.t;
|
|
9808
|
-
var _useUpdateAutomationR = useUpdateAutomationRule(),
|
|
9808
|
+
var _useUpdateAutomationR = useUpdateAutomationRule(url),
|
|
9809
9809
|
updateRule = _useUpdateAutomationR.mutate,
|
|
9810
9810
|
isUpdating = _useUpdateAutomationR.isPending;
|
|
9811
|
-
var _useCloneAutomationRu = useCloneAutomationRule(),
|
|
9811
|
+
var _useCloneAutomationRu = useCloneAutomationRule(url),
|
|
9812
9812
|
cloneRule = _useCloneAutomationRu.mutate,
|
|
9813
9813
|
isCloning = _useCloneAutomationRu.isPending;
|
|
9814
|
-
var _useDeleteAutomationR = useDeleteAutomationRule(),
|
|
9814
|
+
var _useDeleteAutomationR = useDeleteAutomationRule(url),
|
|
9815
9815
|
deleteRule = _useDeleteAutomationR.mutate,
|
|
9816
9816
|
isDeleting = _useDeleteAutomationR.isPending;
|
|
9817
9817
|
var handleChangeStatus = function handleChangeStatus(event, id) {
|
|
@@ -23357,5 +23357,5 @@ var RulePreview = function RulePreview(_ref) {
|
|
|
23357
23357
|
});
|
|
23358
23358
|
};
|
|
23359
23359
|
|
|
23360
|
-
export { NeetoRules, NeetoRulesForm, RulePreview, useCustomDataStore };
|
|
23360
|
+
export { AUTOMATION_RULES as AUTOMATION_RULES_QUERY_KEY, NeetoRules, NeetoRulesForm, RulePreview, useCustomDataStore };
|
|
23361
23361
|
//# sourceMappingURL=index.js.map
|