@bigbinary/neeto-rules-frontend 2.5.56 → 2.5.58

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.
Files changed (62) hide show
  1. package/dist/.ready +1 -1
  2. package/dist/NeetoRulesForm.js +67 -162
  3. package/dist/NeetoRulesForm.js.map +1 -1
  4. package/dist/cjs/NeetoRulesForm.js +10 -105
  5. package/dist/cjs/NeetoRulesForm.js.map +1 -1
  6. package/dist/cjs/index.js +1 -0
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/cjs/v2/CannedResponsesPane.js +396 -0
  9. package/dist/cjs/v2/CannedResponsesPane.js.map +1 -0
  10. package/dist/cjs/v2/NeetoRules.js +486 -0
  11. package/dist/cjs/v2/NeetoRules.js.map +1 -0
  12. package/dist/cjs/v2/NeetoRulesForm.js +6740 -0
  13. package/dist/cjs/v2/NeetoRulesForm.js.map +1 -0
  14. package/dist/cjs/v2/RulePreview.js +513 -0
  15. package/dist/cjs/v2/RulePreview.js.map +1 -0
  16. package/dist/cjs/v2/RulesReorder.js +24 -0
  17. package/dist/cjs/v2/RulesReorder.js.map +1 -0
  18. package/dist/cjs/v2/constants.js +8 -0
  19. package/dist/cjs/v2/constants.js.map +1 -0
  20. package/dist/cjs/v2/hooks.js +15 -0
  21. package/dist/cjs/v2/hooks.js.map +1 -0
  22. package/dist/cjs/v2/index.js +86 -0
  23. package/dist/cjs/v2/index.js.map +1 -0
  24. package/dist/constants-CYdcft3h.js +53 -0
  25. package/dist/constants-CYdcft3h.js.map +1 -0
  26. package/dist/constants-dLBadaIU.js +60 -0
  27. package/dist/constants-dLBadaIU.js.map +1 -0
  28. package/dist/index-BBcadHIi.js +208 -0
  29. package/dist/index-BBcadHIi.js.map +1 -0
  30. package/dist/index-CSnQp41c.js +211 -0
  31. package/dist/index-CSnQp41c.js.map +1 -0
  32. package/dist/index.js +1 -0
  33. package/dist/index.js.map +1 -1
  34. package/dist/useCustomDataStore-D7hl6nev.js +74 -0
  35. package/dist/useCustomDataStore-D7hl6nev.js.map +1 -0
  36. package/dist/useCustomDataStore-DipT25Pg.js +77 -0
  37. package/dist/useCustomDataStore-DipT25Pg.js.map +1 -0
  38. package/dist/useDebouncedUpdate-6Ibug5MF.js +108 -0
  39. package/dist/useDebouncedUpdate-6Ibug5MF.js.map +1 -0
  40. package/dist/useDebouncedUpdate-BcPAGgg7.js +103 -0
  41. package/dist/useDebouncedUpdate-BcPAGgg7.js.map +1 -0
  42. package/dist/useUtilityStore-BBb39TOj.js +53 -0
  43. package/dist/useUtilityStore-BBb39TOj.js.map +1 -0
  44. package/dist/useUtilityStore-DkxAexDw.js +55 -0
  45. package/dist/useUtilityStore-DkxAexDw.js.map +1 -0
  46. package/dist/v2/CannedResponsesPane.js +394 -0
  47. package/dist/v2/CannedResponsesPane.js.map +1 -0
  48. package/dist/v2/NeetoRules.js +484 -0
  49. package/dist/v2/NeetoRules.js.map +1 -0
  50. package/dist/v2/NeetoRulesForm.js +6719 -0
  51. package/dist/v2/NeetoRulesForm.js.map +1 -0
  52. package/dist/v2/RulePreview.js +511 -0
  53. package/dist/v2/RulePreview.js.map +1 -0
  54. package/dist/v2/RulesReorder.js +18 -0
  55. package/dist/v2/RulesReorder.js.map +1 -0
  56. package/dist/v2/constants.js +2 -0
  57. package/dist/v2/constants.js.map +1 -0
  58. package/dist/v2/hooks.js +8 -0
  59. package/dist/v2/hooks.js.map +1 -0
  60. package/dist/v2/index.js +74 -0
  61. package/dist/v2/index.js.map +1 -0
  62. package/package.json +28 -16
@@ -0,0 +1,486 @@
1
+ 'use strict';
2
+
3
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
+ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
5
+ var react = require('react');
6
+ var neetoCist = require('@bigbinary/neeto-cist');
7
+ var constants = require('@bigbinary/neeto-commons-frontend/v2/constants');
8
+ var reactUtils = require('@bigbinary/neeto-commons-frontend/v2/react-utils');
9
+ var Container = require('@bigbinary/neeto-molecules/v2/Container');
10
+ var useAutomationRulesApi = require('../../useAutomationRulesApi-C1T2E1AN.js');
11
+ var v2_RulesReorder = require('../../index-CSnQp41c.js');
12
+ var neetoAtoms = require('@bigbinary/neeto-atoms');
13
+ var NeetoHeader = require('@bigbinary/neeto-molecules/v2/Header');
14
+ var utils = require('../../utils-B3roKiff.js');
15
+ var jsxRuntime = require('react/jsx-runtime');
16
+ var shallow = require('zustand/shallow');
17
+ var FilterBar = require('@bigbinary/neeto-filters-frontend/v2/Bar');
18
+ var SubHeader = require('@bigbinary/neeto-molecules/v2/SubHeader');
19
+ var ramda = require('ramda');
20
+ var reactI18next = require('react-i18next');
21
+ var useUtilityStore = require('../../useUtilityStore-DkxAexDw.js');
22
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
23
+ var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
24
+ var i18next = require('i18next');
25
+ var utils$1 = require('@bigbinary/neeto-commons-frontend/v2/utils');
26
+ var MoreDropdown = require('@bigbinary/neeto-molecules/v2/MoreDropdown');
27
+ require('@tanstack/react-query');
28
+ require('@bigbinary/neeto-commons-frontend/react-utils');
29
+ require('axios');
30
+ require('../../index-DFwPrb81.js');
31
+ require('@hello-pangea/dnd');
32
+ require('@bigbinary/neeto-icons/Drag');
33
+ require('react-router-dom');
34
+ require('@bigbinary/neeto-commons-frontend/initializers');
35
+ require('@bigbinary/neeto-commons-frontend/utils');
36
+ require('zustand');
37
+
38
+ function ownKeys$3(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; }
39
+ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
40
+ var Header = reactUtils.withT(function (_ref) {
41
+ var breadcrumbs = _ref.breadcrumbs,
42
+ automationRulesPath = _ref.automationRulesPath,
43
+ _ref$helpPopoverProps = _ref.helpPopoverProps,
44
+ helpPopoverProps = _ref$helpPopoverProps === void 0 ? {} : _ref$helpPopoverProps,
45
+ hasUnfilteredRules = _ref.hasUnfilteredRules,
46
+ headerProps = _ref.headerProps,
47
+ t = _ref.t;
48
+ return /*#__PURE__*/jsxRuntime.jsx(NeetoHeader, _objectSpread$3({
49
+ breadcrumbs: breadcrumbs,
50
+ title: t("neetoRules.common.title"),
51
+ actionBlock: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
52
+ className: "hover:neeto-ui-text-white hover:no-underline",
53
+ "data-testid": "settings-automation-new-rule-button",
54
+ iconPosition: "right",
55
+ label: t("neetoRules.button.addNew"),
56
+ to: utils.createRoutes(automationRulesPath)["new"]
57
+ }),
58
+ searchProps: hasUnfilteredRules && {
59
+ placeholder: t("neetoRules.placeholders.searchRules")
60
+ },
61
+ titleHelpPopoverProps: _objectSpread$3({
62
+ description: t("neetoRules.helpText.description"),
63
+ title: t("neetoRules.common.title")
64
+ }, helpPopoverProps)
65
+ }, headerProps));
66
+ });
67
+ var Header$1 = /*#__PURE__*/react.memo(Header);
68
+
69
+ var STATUS_KEYS = {
70
+ ENABLED: "enabled",
71
+ DISABLED: "disabled"
72
+ };
73
+ var DEFAULT_INIT_PAGE = 1;
74
+
75
+ var DisableMessage = reactUtils.withT(function (_ref) {
76
+ var t = _ref.t,
77
+ disabledReason = _ref.disabledReason;
78
+ return ramda.isNotNil(disabledReason) && /*#__PURE__*/jsxRuntime.jsx("div", {
79
+ children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
80
+ asChild: true,
81
+ variant: "body2",
82
+ children: /*#__PURE__*/jsxRuntime.jsx("span", {
83
+ className: "text-red-600",
84
+ children: t(disabledReason)
85
+ })
86
+ })
87
+ });
88
+ });
89
+
90
+ var _excluded = ["onClick"],
91
+ _excluded2 = ["handleChangeStatus", "additionalColumns", "onPreview"];
92
+ function ownKeys$2(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; }
93
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
94
+ var buildActionDropdownMenuItems = function buildActionDropdownMenuItems(_ref) {
95
+ var rule = _ref.rule,
96
+ onClone = _ref.onClone,
97
+ onDelete = _ref.onDelete,
98
+ _ref$moreDropdownItem = _ref.moreDropdownItems,
99
+ moreDropdownItems = _ref$moreDropdownItem === void 0 ? [] : _ref$moreDropdownItem,
100
+ automationRulesPath = _ref.automationRulesPath,
101
+ allowCloning = _ref.allowCloning;
102
+ var defaultOptions = [].concat(_toConsumableArray(moreDropdownItems.map(function (_ref2) {
103
+ var _onClick = _ref2.onClick,
104
+ others = _objectWithoutProperties(_ref2, _excluded);
105
+ return _objectSpread$2(_objectSpread$2({}, others), {}, {
106
+ onClick: function onClick() {
107
+ return _onClick(rule);
108
+ }
109
+ });
110
+ })), [{
111
+ key: "edit",
112
+ className: "neeto-ui-btn",
113
+ "data-testid": "automation-rules-edit-link",
114
+ label: i18next.t("neetoRules.button.edit"),
115
+ to: utils$1.buildUrl(utils.createRoutes(automationRulesPath).edit, {
116
+ ruleId: rule.id
117
+ })
118
+ }, {
119
+ key: "clone",
120
+ "data-testid": "automation-rules-clone-link",
121
+ label: i18next.t("neetoRules.button.clone"),
122
+ onClick: function onClick() {
123
+ return onClone(rule.id);
124
+ }
125
+ }, {
126
+ key: "divider",
127
+ type: "divider"
128
+ }, {
129
+ key: "delete",
130
+ "data-testid": "automation-rules-delete-link",
131
+ label: i18next.t("neetoRules.button.delete"),
132
+ onClick: function onClick() {
133
+ return onDelete(rule);
134
+ }
135
+ }]);
136
+ if (!allowCloning) {
137
+ return neetoCist.removeBy({
138
+ key: "clone"
139
+ }, defaultOptions);
140
+ }
141
+ return defaultOptions;
142
+ };
143
+ var getColumnData = function getColumnData(_ref3) {
144
+ var handleChangeStatus = _ref3.handleChangeStatus,
145
+ _ref3$additionalColum = _ref3.additionalColumns,
146
+ additionalColumns = _ref3$additionalColum === void 0 ? [] : _ref3$additionalColum,
147
+ onPreview = _ref3.onPreview,
148
+ otherProps = _objectWithoutProperties(_ref3, _excluded2);
149
+ var _useUtilityStore = useUtilityStore.useUtilityStore(function (store) {
150
+ return {
151
+ setMoreActionDropdownItems: store["setMoreActionDropdownItems"]
152
+ };
153
+ }, shallow.shallow),
154
+ setMoreActionDropdownItems = _useUtilityStore.setMoreActionDropdownItems;
155
+ return [{
156
+ id: "name",
157
+ accessorKey: "name",
158
+ header: i18next.t("neetoRules.labels.name"),
159
+ size: 440,
160
+ cell: function cell(_ref4) {
161
+ var row = _ref4.row,
162
+ getValue = _ref4.getValue;
163
+ var rule = row.original;
164
+ var name = getValue();
165
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
166
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
167
+ className: "flex items-center justify-between gap-x-3",
168
+ children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
169
+ className: "whitespace-pre-line wrap-break-word text-start",
170
+ variant: "link",
171
+ onClick: function onClick() {
172
+ setMoreActionDropdownItems(buildActionDropdownMenuItems(_objectSpread$2({
173
+ rule: rule
174
+ }, otherProps)));
175
+ onPreview(rule.id);
176
+ },
177
+ children: neetoCist.truncate(name, 100)
178
+ }), /*#__PURE__*/jsxRuntime.jsx(MoreDropdown, {
179
+ menuItems: buildActionDropdownMenuItems(_objectSpread$2({
180
+ rule: rule
181
+ }, otherProps))
182
+ })]
183
+ }), /*#__PURE__*/jsxRuntime.jsx(DisableMessage, {
184
+ disabledReason: rule.disabledReason
185
+ })]
186
+ });
187
+ }
188
+ }, {
189
+ id: "active",
190
+ header: i18next.t("neetoRules.labels.active"),
191
+ size: 140,
192
+ meta: {
193
+ align: "center"
194
+ },
195
+ cell: function cell(_ref5) {
196
+ var row = _ref5.row;
197
+ var rule = row.original;
198
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
199
+ className: "flex justify-center",
200
+ children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Switch, {
201
+ checked: rule.status === STATUS_KEYS.ENABLED,
202
+ "data-testid": "automation-rules-state-switch-row",
203
+ disabled: !!rule.disabledReason,
204
+ onCheckedChange: function onCheckedChange(checked) {
205
+ handleChangeStatus(checked, rule.id);
206
+ }
207
+ })
208
+ });
209
+ }
210
+ }].concat(_toConsumableArray(additionalColumns));
211
+ };
212
+ var renderNoDataHelpText = function renderNoDataHelpText(helpDocUrl) {
213
+ return /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
214
+ i18nKey: "neetoRules.noData.helpText",
215
+ components: {
216
+ a: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
217
+ target: "_blank",
218
+ to: {
219
+ pathname: helpDocUrl
220
+ },
221
+ variant: "link"
222
+ })
223
+ }
224
+ });
225
+ };
226
+
227
+ function ownKeys$1(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; }
228
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
229
+ var RulesTable = function RulesTable(_ref) {
230
+ var url = _ref.url,
231
+ additionalColumns = _ref.additionalColumns,
232
+ allowReordering = _ref.allowReordering,
233
+ _ref$automationRulesP = _ref.automationRulesPath,
234
+ automationRulesPath = _ref$automationRulesP === void 0 ? "/" : _ref$automationRulesP,
235
+ onPreview = _ref.onPreview,
236
+ _ref$moreDropdownItem = _ref.moreDropdownItems,
237
+ moreDropdownItems = _ref$moreDropdownItem === void 0 ? [] : _ref$moreDropdownItem,
238
+ _ref$rules = _ref.rules,
239
+ rules = _ref$rules === void 0 ? [] : _ref$rules,
240
+ totalCount = _ref.totalCount,
241
+ helpDocUrl = _ref.helpDocUrl,
242
+ isLoading = _ref.isLoading,
243
+ onDeleteSuccess = _ref.onDeleteSuccess,
244
+ onCloneSuccess = _ref.onCloneSuccess,
245
+ onUpdateSuccess = _ref.onUpdateSuccess,
246
+ page = _ref.page,
247
+ setIsReorderPaneOpen = _ref.setIsReorderPaneOpen,
248
+ setPage = _ref.setPage,
249
+ _ref$allowCloning = _ref.allowCloning,
250
+ allowCloning = _ref$allowCloning === void 0 ? true : _ref$allowCloning,
251
+ _ref$hasUnfilteredRul = _ref.hasUnfilteredRules,
252
+ hasUnfilteredRules = _ref$hasUnfilteredRul === void 0 ? true : _ref$hasUnfilteredRul,
253
+ _ref$payloadKey = _ref.payloadKey,
254
+ payloadKey = _ref$payloadKey === void 0 ? "rule" : _ref$payloadKey;
255
+ var _useQueryParams = reactUtils.useQueryParams(),
256
+ _useQueryParams$searc = _useQueryParams.searchTerm,
257
+ searchTerm = _useQueryParams$searc === void 0 ? "" : _useQueryParams$searc;
258
+ var searchKeywordProps = {
259
+ key: "search_term",
260
+ node: "name",
261
+ value: searchTerm
262
+ };
263
+ var _useState = react.useState(null),
264
+ _useState2 = _slicedToArray(_useState, 2),
265
+ selectedRule = _useState2[0],
266
+ setSelectedRule = _useState2[1];
267
+ var _useUtilityStore = useUtilityStore.useUtilityStore(function (store) {
268
+ return {
269
+ hidePreviewPane: store["hidePreviewPane"]
270
+ };
271
+ }, shallow.shallow),
272
+ hidePreviewPane = _useUtilityStore.hidePreviewPane;
273
+ var _useTranslation = reactI18next.useTranslation(),
274
+ t = _useTranslation.t;
275
+ var _useUpdateAutomationR = useAutomationRulesApi.useUpdateAutomationRule(url),
276
+ updateRule = _useUpdateAutomationR.mutate,
277
+ isUpdating = _useUpdateAutomationR.isPending;
278
+ var _useCloneAutomationRu = useAutomationRulesApi.useCloneAutomationRule(url),
279
+ cloneRule = _useCloneAutomationRu.mutate,
280
+ isCloning = _useCloneAutomationRu.isPending;
281
+ var _useDeleteAutomationR = useAutomationRulesApi.useDeleteAutomationRule(url),
282
+ deleteRule = _useDeleteAutomationR.mutate,
283
+ isDeleting = _useDeleteAutomationR.isPending;
284
+ var handleChangeStatus = function handleChangeStatus(checked, id) {
285
+ var status = checked ? STATUS_KEYS.ENABLED : STATUS_KEYS.DISABLED;
286
+ var payload = _defineProperty({}, payloadKey, {
287
+ status: status
288
+ });
289
+ updateRule({
290
+ id: id,
291
+ url: url,
292
+ payload: payload
293
+ }, {
294
+ onSuccess: function onSuccess() {
295
+ return onUpdateSuccess === null || onUpdateSuccess === void 0 ? void 0 : onUpdateSuccess();
296
+ }
297
+ });
298
+ };
299
+ var handleCloneSuccess = function handleCloneSuccess() {
300
+ onCloneSuccess === null || onCloneSuccess === void 0 || onCloneSuccess();
301
+ hidePreviewPane();
302
+ };
303
+ var handleDeleteSuccess = function handleDeleteSuccess() {
304
+ onDeleteSuccess === null || onDeleteSuccess === void 0 || onDeleteSuccess();
305
+ hidePreviewPane();
306
+ setSelectedRule(null);
307
+ };
308
+ var columnData = getColumnData({
309
+ handleChangeStatus: handleChangeStatus,
310
+ additionalColumns: additionalColumns,
311
+ onClone: function onClone(id) {
312
+ return cloneRule({
313
+ id: id,
314
+ url: url
315
+ }, {
316
+ onSuccess: handleCloneSuccess
317
+ });
318
+ },
319
+ onDelete: setSelectedRule,
320
+ onPreview: onPreview,
321
+ automationRulesPath: automationRulesPath,
322
+ moreDropdownItems: moreDropdownItems,
323
+ allowCloning: allowCloning
324
+ });
325
+ if (isLoading && ramda.isEmpty(rules)) {
326
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
327
+ className: "flex h-full w-full items-center justify-center",
328
+ children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Spinner, {})
329
+ });
330
+ }
331
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
332
+ children: [hasUnfilteredRules && /*#__PURE__*/jsxRuntime.jsx(SubHeader, {
333
+ leftActionBlock: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
334
+ children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
335
+ className: "me-4",
336
+ "data-testid": "automation-rules-count",
337
+ variant: "h6",
338
+ weight: "semibold",
339
+ children: t("neetoRules.common.automationRuleWithCount", {
340
+ count: totalCount
341
+ })
342
+ }), neetoCist.isNotEmpty(searchTerm) && /*#__PURE__*/jsxRuntime.jsx(FilterBar, {
343
+ className: "!mb-0",
344
+ keyword: searchKeywordProps
345
+ })]
346
+ }),
347
+ rightActionBlock: hasUnfilteredRules && allowReordering && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
348
+ disabled: neetoCist.isNotEmpty(searchTerm),
349
+ label: t("neetoRules.common.reorder"),
350
+ variant: "outline",
351
+ onClick: function onClick() {
352
+ return setIsReorderPaneOpen(true);
353
+ }
354
+ })
355
+ }), neetoCist.isNotEmpty(rules) ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
356
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
357
+ className: "flex w-full flex-1 flex-col overflow-hidden",
358
+ children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.DataTable, {
359
+ totalCount: totalCount,
360
+ columns: columnData,
361
+ currentPage: page,
362
+ data: rules,
363
+ loading: isUpdating || isCloning || isDeleting || isLoading,
364
+ pageSize: constants.DEFAULT_PAGE_SIZE,
365
+ onPageChange: setPage
366
+ })
367
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Alert, {
368
+ isOpen: !!selectedRule,
369
+ isSubmitting: isDeleting,
370
+ submitButtonLabel: t("neetoRules.button.delete"),
371
+ title: t("neetoRules.deleteAlert.title"),
372
+ message: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
373
+ i18nKey: "neetoRules.deleteAlert.message",
374
+ values: {
375
+ name: selectedRule === null || selectedRule === void 0 ? void 0 : selectedRule.name
376
+ }
377
+ }),
378
+ onClose: function onClose() {
379
+ return setSelectedRule(null);
380
+ },
381
+ onSubmit: function onSubmit() {
382
+ return deleteRule({
383
+ id: selectedRule === null || selectedRule === void 0 ? void 0 : selectedRule.id,
384
+ url: url
385
+ }, {
386
+ onSuccess: handleDeleteSuccess
387
+ });
388
+ }
389
+ })]
390
+ }) : /*#__PURE__*/jsxRuntime.jsx("div", {
391
+ className: "flex h-full w-full items-center justify-center",
392
+ children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Empty, _objectSpread$1({
393
+ title: t("neetoRules.noData.title")
394
+ }, ramda.isEmpty(searchTerm) && {
395
+ description: helpDocUrl ? renderNoDataHelpText(helpDocUrl) : null,
396
+ primaryButtonProps: {
397
+ label: t("neetoRules.button.addNew"),
398
+ to: utils.createRoutes(automationRulesPath)["new"]
399
+ }
400
+ }))
401
+ })]
402
+ });
403
+ };
404
+
405
+ function ownKeys(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; }
406
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
407
+ var NeetoRules = function NeetoRules(_ref) {
408
+ var _helpPopoverProps$hel, _cloneRule$allowed, _cloneRule$onSuccess, _deleteRule$onSuccess, _updateRule$onSuccess, _reorderRules$onSucce;
409
+ var breadcrumbs = _ref.breadcrumbs,
410
+ automationRulesPath = _ref.automationRulesPath,
411
+ url = _ref.automationRulesEndpoint,
412
+ _ref$allowReordering = _ref.allowReordering,
413
+ allowReordering = _ref$allowReordering === void 0 ? false : _ref$allowReordering,
414
+ _ref$rulesTableProps = _ref.rulesTableProps,
415
+ rulesTableProps = _ref$rulesTableProps === void 0 ? {} : _ref$rulesTableProps,
416
+ _ref$helpPopoverProps = _ref.helpPopoverProps,
417
+ helpPopoverProps = _ref$helpPopoverProps === void 0 ? {} : _ref$helpPopoverProps,
418
+ deleteRule = _ref.deleteRule,
419
+ cloneRule = _ref.cloneRule,
420
+ updateRule = _ref.updateRule,
421
+ reorderRules = _ref.reorderRules,
422
+ _ref$headerProps = _ref.headerProps,
423
+ headerProps = _ref$headerProps === void 0 ? {} : _ref$headerProps;
424
+ var _useState = react.useState(false),
425
+ _useState2 = _slicedToArray(_useState, 2),
426
+ isReorderPaneOpen = _useState2[0],
427
+ setIsReorderPaneOpen = _useState2[1];
428
+ var helpDocUrl = helpPopoverProps === null || helpPopoverProps === void 0 || (_helpPopoverProps$hel = helpPopoverProps.helpLinkProps) === null || _helpPopoverProps$hel === void 0 ? void 0 : _helpPopoverProps$hel.href;
429
+ var _useState3 = react.useState(DEFAULT_INIT_PAGE),
430
+ _useState4 = _slicedToArray(_useState3, 2),
431
+ page = _useState4[0],
432
+ setPage = _useState4[1];
433
+ var _useQueryParams = reactUtils.useQueryParams(),
434
+ _useQueryParams$searc = _useQueryParams.searchTerm,
435
+ searchTerm = _useQueryParams$searc === void 0 ? "" : _useQueryParams$searc;
436
+ var _useFetchAutomationRu = useAutomationRulesApi.useFetchAutomationRules({
437
+ url: url,
438
+ page: page,
439
+ pageSize: constants.DEFAULT_PAGE_SIZE,
440
+ searchTerm: searchTerm
441
+ }),
442
+ _useFetchAutomationRu2 = _useFetchAutomationRu.data,
443
+ _useFetchAutomationRu3 = _useFetchAutomationRu2 === void 0 ? v2_RulesReorder.INITIAL_RULES_DATA : _useFetchAutomationRu2,
444
+ rules = _useFetchAutomationRu3.rules,
445
+ totalCount = _useFetchAutomationRu3.totalCount,
446
+ isLoading = _useFetchAutomationRu.isLoading,
447
+ isFetching = _useFetchAutomationRu.isFetching;
448
+ var hasUnfilteredRules = neetoCist.isPresent(searchTerm) || totalCount > 0;
449
+ return /*#__PURE__*/jsxRuntime.jsxs(Container, {
450
+ children: [/*#__PURE__*/jsxRuntime.jsx(Header$1, {
451
+ automationRulesPath: automationRulesPath,
452
+ breadcrumbs: breadcrumbs,
453
+ hasUnfilteredRules: hasUnfilteredRules,
454
+ headerProps: headerProps,
455
+ helpPopoverProps: helpPopoverProps
456
+ }), /*#__PURE__*/jsxRuntime.jsx(RulesTable, _objectSpread(_objectSpread({}, _objectSpread({
457
+ allowReordering: allowReordering,
458
+ automationRulesPath: automationRulesPath,
459
+ hasUnfilteredRules: hasUnfilteredRules,
460
+ helpDocUrl: helpDocUrl,
461
+ page: page,
462
+ rules: rules,
463
+ setIsReorderPaneOpen: setIsReorderPaneOpen,
464
+ setPage: setPage,
465
+ totalCount: totalCount,
466
+ url: url
467
+ }, rulesTableProps)), {}, {
468
+ allowCloning: (_cloneRule$allowed = cloneRule === null || cloneRule === void 0 ? void 0 : cloneRule.allowed) !== null && _cloneRule$allowed !== void 0 ? _cloneRule$allowed : true,
469
+ isLoading: isLoading || isFetching,
470
+ onCloneSuccess: cloneRule === null || cloneRule === void 0 || (_cloneRule$onSuccess = cloneRule.onSuccess) === null || _cloneRule$onSuccess === void 0 ? void 0 : _cloneRule$onSuccess.callback,
471
+ onDeleteSuccess: deleteRule === null || deleteRule === void 0 || (_deleteRule$onSuccess = deleteRule.onSuccess) === null || _deleteRule$onSuccess === void 0 ? void 0 : _deleteRule$onSuccess.callback,
472
+ onUpdateSuccess: updateRule === null || updateRule === void 0 || (_updateRule$onSuccess = updateRule.onSuccess) === null || _updateRule$onSuccess === void 0 ? void 0 : _updateRule$onSuccess.callback
473
+ })), allowReordering && !isLoading && /*#__PURE__*/jsxRuntime.jsx(v2_RulesReorder.RulesReorder, {
474
+ totalCount: totalCount,
475
+ url: url,
476
+ isOpen: isReorderPaneOpen,
477
+ onClose: function onClose() {
478
+ return setIsReorderPaneOpen(false);
479
+ },
480
+ onReorderSuccess: reorderRules === null || reorderRules === void 0 || (_reorderRules$onSucce = reorderRules.onSuccess) === null || _reorderRules$onSucce === void 0 ? void 0 : _reorderRules$onSucce.callback
481
+ })]
482
+ });
483
+ };
484
+
485
+ module.exports = NeetoRules;
486
+ //# sourceMappingURL=NeetoRules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NeetoRules.js","sources":["../../../app/javascript/src/v2/components/NeetoRules/Header.jsx","../../../app/javascript/src/v2/components/NeetoRules/RulesTable/constants.js","../../../app/javascript/src/v2/components/NeetoRules/RulesTable/DisableMessage.jsx","../../../app/javascript/src/v2/components/NeetoRules/RulesTable/utils.jsx","../../../app/javascript/src/v2/components/NeetoRules/RulesTable/index.jsx","../../../app/javascript/src/v2/components/NeetoRules/index.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport { Button } from \"@bigbinary/neeto-atoms\";\nimport { withT } from \"neetocommons/v2/react-utils\";\nimport NeetoHeader from \"neetomolecules/v2/Header\";\n\nimport { createRoutes } from \"utils\";\n\nconst Header = withT(\n ({\n breadcrumbs,\n automationRulesPath,\n helpPopoverProps = {},\n hasUnfilteredRules,\n headerProps,\n t,\n }) => (\n <NeetoHeader\n {...{ breadcrumbs }}\n title={t(\"neetoRules.common.title\")}\n actionBlock={\n <Button\n className=\"hover:neeto-ui-text-white hover:no-underline\"\n data-testid=\"settings-automation-new-rule-button\"\n iconPosition=\"right\"\n label={t(\"neetoRules.button.addNew\")}\n to={createRoutes(automationRulesPath).new}\n />\n }\n searchProps={\n hasUnfilteredRules && {\n placeholder: t(\"neetoRules.placeholders.searchRules\"),\n }\n }\n titleHelpPopoverProps={{\n description: t(\"neetoRules.helpText.description\"),\n title: t(\"neetoRules.common.title\"),\n ...helpPopoverProps,\n }}\n {...headerProps}\n />\n )\n);\nexport default memo(Header);\n","export const STATUS_KEYS = { ENABLED: \"enabled\", DISABLED: \"disabled\" };\n\nexport const DEFAULT_INIT_PAGE = 1;\n","import { Typography } from \"@bigbinary/neeto-atoms\";\nimport { withT } from \"neetocommons/v2/react-utils\";\nimport { isNotNil } from \"ramda\";\n\nconst DisableMessage = withT(\n ({ t, disabledReason }) =>\n isNotNil(disabledReason) && (\n <div>\n <Typography asChild variant=\"body2\">\n <span className=\"text-red-600\">{t(disabledReason)}</span>\n </Typography>\n </div>\n )\n);\n\nexport default DisableMessage;\n","import { Button, Switch } from \"@bigbinary/neeto-atoms\";\nimport { t } from \"i18next\";\nimport { removeBy, truncate } from \"neetocist\";\nimport { buildUrl } from \"neetocommons/v2/utils\";\nimport MoreDropdown from \"neetomolecules/v2/MoreDropdown\";\nimport { Trans } from \"react-i18next\";\n\nimport { createRoutes } from \"utils\";\nimport useUtilityStore from \"v2/components/stores/useUtilityStore\";\n\nimport { STATUS_KEYS } from \"./constants\";\nimport DisableMessage from \"./DisableMessage\";\n\nconst buildActionDropdownMenuItems = ({\n rule,\n onClone,\n onDelete,\n moreDropdownItems = [],\n automationRulesPath,\n allowCloning,\n}) => {\n const defaultOptions = [\n ...moreDropdownItems.map(({ onClick, ...others }) => ({\n ...others,\n onClick: () => onClick(rule),\n })),\n {\n key: \"edit\",\n className: \"neeto-ui-btn\",\n \"data-testid\": \"automation-rules-edit-link\",\n label: t(\"neetoRules.button.edit\"),\n to: buildUrl(createRoutes(automationRulesPath).edit, { ruleId: rule.id }),\n },\n {\n key: \"clone\",\n \"data-testid\": \"automation-rules-clone-link\",\n label: t(\"neetoRules.button.clone\"),\n onClick: () => onClone(rule.id),\n },\n { key: \"divider\", type: \"divider\" },\n {\n key: \"delete\",\n \"data-testid\": \"automation-rules-delete-link\",\n label: t(\"neetoRules.button.delete\"),\n onClick: () => onDelete(rule),\n },\n ];\n\n if (!allowCloning) {\n return removeBy({ key: \"clone\" }, defaultOptions);\n }\n\n return defaultOptions;\n};\n\nexport const getColumnData = ({\n handleChangeStatus,\n additionalColumns = [],\n onPreview,\n ...otherProps\n}) => {\n const { setMoreActionDropdownItems } = useUtilityStore.pick();\n\n return [\n {\n id: \"name\",\n accessorKey: \"name\",\n header: t(\"neetoRules.labels.name\"),\n size: 440,\n cell: ({ row, getValue }) => {\n const rule = row.original;\n const name = getValue();\n\n return (\n <div>\n <div className=\"flex items-center justify-between gap-x-3\">\n <Button\n className=\"whitespace-pre-line wrap-break-word text-start\"\n variant=\"link\"\n onClick={() => {\n setMoreActionDropdownItems(\n buildActionDropdownMenuItems({ rule, ...otherProps })\n );\n onPreview(rule.id);\n }}\n >\n {truncate(name, 100)}\n </Button>\n <MoreDropdown\n menuItems={buildActionDropdownMenuItems({\n rule,\n ...otherProps,\n })}\n />\n </div>\n <DisableMessage disabledReason={rule.disabledReason} />\n </div>\n );\n },\n },\n {\n id: \"active\",\n header: t(\"neetoRules.labels.active\"),\n size: 140,\n meta: { align: \"center\" },\n cell: ({ row }) => {\n const rule = row.original;\n\n return (\n <div className=\"flex justify-center\">\n <Switch\n checked={rule.status === STATUS_KEYS.ENABLED}\n data-testid=\"automation-rules-state-switch-row\"\n disabled={!!rule.disabledReason}\n onCheckedChange={checked => {\n handleChangeStatus(checked, rule.id);\n }}\n />\n </div>\n );\n },\n },\n ...additionalColumns,\n ];\n};\n\nexport const renderNoDataHelpText = helpDocUrl => (\n <Trans\n i18nKey=\"neetoRules.noData.helpText\"\n components={{\n a: (\n <Button target=\"_blank\" to={{ pathname: helpDocUrl }} variant=\"link\" />\n ),\n }}\n />\n);\n","import { useState } from \"react\";\n\nimport {\n Alert,\n Button,\n DataTable,\n Empty,\n Spinner,\n Typography,\n} from \"@bigbinary/neeto-atoms\";\nimport { isNotEmpty } from \"neetocist\";\nimport { DEFAULT_PAGE_SIZE } from \"neetocommons/v2/constants\";\nimport { useQueryParams } from \"neetocommons/v2/react-utils\";\nimport { Bar as FilterBar } from \"neetofilters/v2\";\nimport SubHeader from \"neetomolecules/v2/SubHeader\";\nimport { isEmpty } from \"ramda\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport {\n useCloneAutomationRule,\n useDeleteAutomationRule,\n useUpdateAutomationRule,\n} from \"hooks/reactQuery/useAutomationRulesApi\";\nimport { createRoutes } from \"utils\";\nimport useUtilityStore from \"v2/components/stores/useUtilityStore\";\n\nimport { STATUS_KEYS } from \"./constants\";\nimport { getColumnData, renderNoDataHelpText } from \"./utils\";\n\nconst RulesTable = ({\n url,\n additionalColumns,\n allowReordering,\n automationRulesPath = \"/\",\n onPreview,\n moreDropdownItems = [],\n rules = [],\n totalCount,\n helpDocUrl,\n isLoading,\n onDeleteSuccess,\n onCloneSuccess,\n onUpdateSuccess,\n page,\n setIsReorderPaneOpen,\n setPage,\n allowCloning = true,\n hasUnfilteredRules = true,\n payloadKey = \"rule\",\n}) => {\n const { searchTerm = \"\" } = useQueryParams();\n\n const searchKeywordProps = {\n key: \"search_term\",\n node: \"name\",\n value: searchTerm,\n };\n\n const [selectedRule, setSelectedRule] = useState(null);\n\n const { hidePreviewPane } = useUtilityStore.pick();\n\n const { t } = useTranslation();\n\n const { mutate: updateRule, isPending: isUpdating } =\n useUpdateAutomationRule(url);\n\n const { mutate: cloneRule, isPending: isCloning } =\n useCloneAutomationRule(url);\n\n const { mutate: deleteRule, isPending: isDeleting } =\n useDeleteAutomationRule(url);\n\n const handleChangeStatus = (checked, id) => {\n const status = checked ? STATUS_KEYS.ENABLED : STATUS_KEYS.DISABLED;\n const payload = { [payloadKey]: { status } };\n updateRule({ id, url, payload }, { onSuccess: () => onUpdateSuccess?.() });\n };\n\n const handleCloneSuccess = () => {\n onCloneSuccess?.();\n hidePreviewPane();\n };\n\n const handleDeleteSuccess = () => {\n onDeleteSuccess?.();\n hidePreviewPane();\n setSelectedRule(null);\n };\n\n const columnData = getColumnData({\n handleChangeStatus,\n additionalColumns,\n onClone: id => cloneRule({ id, url }, { onSuccess: handleCloneSuccess }),\n onDelete: setSelectedRule,\n onPreview,\n automationRulesPath,\n moreDropdownItems,\n allowCloning,\n });\n\n if (isLoading && isEmpty(rules)) {\n return (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Spinner />\n </div>\n );\n }\n\n return (\n <>\n {hasUnfilteredRules && (\n <SubHeader\n leftActionBlock={\n <>\n <Typography\n className=\"me-4\"\n data-testid=\"automation-rules-count\"\n variant=\"h6\"\n weight=\"semibold\"\n >\n {t(\"neetoRules.common.automationRuleWithCount\", {\n count: totalCount,\n })}\n </Typography>\n {isNotEmpty(searchTerm) && (\n <FilterBar className=\"!mb-0\" keyword={searchKeywordProps} />\n )}\n </>\n }\n rightActionBlock={\n hasUnfilteredRules &&\n allowReordering && (\n <Button\n disabled={isNotEmpty(searchTerm)}\n label={t(\"neetoRules.common.reorder\")}\n variant=\"outline\"\n onClick={() => setIsReorderPaneOpen(true)}\n />\n )\n }\n />\n )}\n {isNotEmpty(rules) ? (\n <>\n <div className=\"flex w-full flex-1 flex-col overflow-hidden\">\n <DataTable\n {...{ totalCount }}\n columns={columnData}\n currentPage={page}\n data={rules}\n loading={isUpdating || isCloning || isDeleting || isLoading}\n pageSize={DEFAULT_PAGE_SIZE}\n onPageChange={setPage}\n />\n </div>\n <Alert\n isOpen={!!selectedRule}\n isSubmitting={isDeleting}\n submitButtonLabel={t(\"neetoRules.button.delete\")}\n title={t(\"neetoRules.deleteAlert.title\")}\n message={\n <Trans\n i18nKey=\"neetoRules.deleteAlert.message\"\n values={{ name: selectedRule?.name }}\n />\n }\n onClose={() => setSelectedRule(null)}\n onSubmit={() =>\n deleteRule(\n { id: selectedRule?.id, url },\n { onSuccess: handleDeleteSuccess }\n )\n }\n />\n </>\n ) : (\n <div className=\"flex h-full w-full items-center justify-center\">\n <Empty\n title={t(\"neetoRules.noData.title\")}\n {...(isEmpty(searchTerm) && {\n description: helpDocUrl ? renderNoDataHelpText(helpDocUrl) : null,\n primaryButtonProps: {\n label: t(\"neetoRules.button.addNew\"),\n to: createRoutes(automationRulesPath).new,\n },\n })}\n />\n </div>\n )}\n </>\n );\n};\n\nexport default RulesTable;\n","import { useState } from \"react\";\n\nimport { isPresent } from \"neetocist\";\nimport { DEFAULT_PAGE_SIZE } from \"neetocommons/v2/constants\";\nimport { useQueryParams } from \"neetocommons/v2/react-utils\";\nimport Container from \"neetomolecules/v2/Container\";\n\nimport { useFetchAutomationRules } from \"hooks/reactQuery/useAutomationRulesApi\";\n\nimport { INITIAL_RULES_DATA } from \"./constants\";\nimport Header from \"./Header\";\nimport RulesReorder from \"./RulesReorder\";\nimport RulesTable from \"./RulesTable\";\nimport { DEFAULT_INIT_PAGE } from \"./RulesTable/constants\";\n\nconst NeetoRules = ({\n breadcrumbs,\n automationRulesPath,\n automationRulesEndpoint: url,\n allowReordering = false,\n rulesTableProps = {},\n helpPopoverProps = {},\n deleteRule,\n cloneRule,\n updateRule,\n reorderRules,\n headerProps = {},\n}) => {\n const [isReorderPaneOpen, setIsReorderPaneOpen] = useState(false);\n const helpDocUrl = helpPopoverProps?.helpLinkProps?.href;\n\n const [page, setPage] = useState(DEFAULT_INIT_PAGE);\n\n const { searchTerm = \"\" } = useQueryParams();\n\n const {\n data: { rules, totalCount } = INITIAL_RULES_DATA,\n isLoading,\n isFetching,\n } = useFetchAutomationRules({\n url,\n page,\n pageSize: DEFAULT_PAGE_SIZE,\n searchTerm,\n });\n\n const hasUnfilteredRules = isPresent(searchTerm) || totalCount > 0;\n\n return (\n <Container>\n <Header\n {...{\n automationRulesPath,\n breadcrumbs,\n hasUnfilteredRules,\n headerProps,\n helpPopoverProps,\n }}\n />\n <RulesTable\n {...{\n allowReordering,\n automationRulesPath,\n hasUnfilteredRules,\n helpDocUrl,\n page,\n rules,\n setIsReorderPaneOpen,\n setPage,\n totalCount,\n url,\n ...rulesTableProps,\n }}\n allowCloning={cloneRule?.allowed ?? true}\n isLoading={isLoading || isFetching}\n onCloneSuccess={cloneRule?.onSuccess?.callback}\n onDeleteSuccess={deleteRule?.onSuccess?.callback}\n onUpdateSuccess={updateRule?.onSuccess?.callback}\n />\n {allowReordering && !isLoading && (\n <RulesReorder\n {...{ totalCount, url }}\n isOpen={isReorderPaneOpen}\n onClose={() => setIsReorderPaneOpen(false)}\n onReorderSuccess={reorderRules?.onSuccess?.callback}\n />\n )}\n </Container>\n );\n};\n\nexport default NeetoRules;\n"],"names":["Header","withT","_ref","breadcrumbs","automationRulesPath","_ref$helpPopoverProps","helpPopoverProps","hasUnfilteredRules","headerProps","t","_jsx","NeetoHeader","_objectSpread","title","actionBlock","Button","className","iconPosition","label","to","createRoutes","searchProps","placeholder","titleHelpPopoverProps","description","memo","STATUS_KEYS","ENABLED","DISABLED","DEFAULT_INIT_PAGE","DisableMessage","disabledReason","isNotNil","children","Typography","asChild","variant","buildActionDropdownMenuItems","rule","onClone","onDelete","_ref$moreDropdownItem","moreDropdownItems","allowCloning","defaultOptions","concat","_toConsumableArray","map","_ref2","onClick","others","_objectWithoutProperties","_excluded","key","buildUrl","edit","ruleId","id","type","removeBy","getColumnData","_ref3","handleChangeStatus","_ref3$additionalColum","additionalColumns","onPreview","otherProps","_excluded2","_useUtilityStore","useUtilityStore","store","setMoreActionDropdownItems","shallow","accessorKey","header","size","cell","_ref4","row","getValue","original","name","_jsxs","truncate","MoreDropdown","menuItems","meta","align","_ref5","Switch","checked","status","disabled","onCheckedChange","renderNoDataHelpText","helpDocUrl","Trans","i18nKey","components","a","target","pathname","RulesTable","url","allowReordering","_ref$automationRulesP","_ref$rules","rules","totalCount","isLoading","onDeleteSuccess","onCloneSuccess","onUpdateSuccess","page","setIsReorderPaneOpen","setPage","_ref$allowCloning","_ref$hasUnfilteredRul","_ref$payloadKey","payloadKey","_useQueryParams","useQueryParams","_useQueryParams$searc","searchTerm","searchKeywordProps","node","value","_useState","useState","_useState2","_slicedToArray","selectedRule","setSelectedRule","hidePreviewPane","_useTranslation","useTranslation","_useUpdateAutomationR","useUpdateAutomationRule","updateRule","mutate","isUpdating","isPending","_useCloneAutomationRu","useCloneAutomationRule","cloneRule","isCloning","_useDeleteAutomationR","useDeleteAutomationRule","deleteRule","isDeleting","payload","_defineProperty","onSuccess","handleCloneSuccess","handleDeleteSuccess","columnData","isEmpty","Spinner","_Fragment","SubHeader","leftActionBlock","weight","count","isNotEmpty","FilterBar","keyword","rightActionBlock","DataTable","columns","currentPage","data","loading","pageSize","DEFAULT_PAGE_SIZE","onPageChange","Alert","isOpen","isSubmitting","submitButtonLabel","message","values","onClose","onSubmit","Empty","primaryButtonProps","NeetoRules","_helpPopoverProps$hel","_cloneRule$allowed","_cloneRule$onSuccess","_deleteRule$onSuccess","_updateRule$onSuccess","_reorderRules$onSucce","automationRulesEndpoint","_ref$allowReordering","_ref$rulesTableProps","rulesTableProps","reorderRules","_ref$headerProps","isReorderPaneOpen","helpLinkProps","href","_useState3","_useState4","_useFetchAutomationRu","useFetchAutomationRules","_useFetchAutomationRu2","_useFetchAutomationRu3","INITIAL_RULES_DATA","isFetching","isPresent","Container","allowed","callback","RulesReorder","onReorderSuccess"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,MAAM,GAAGC,gBAAK,CAClB,UAAAC,IAAA,EAAA;AAAA,EAAA,I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