@bigbinary/neeto-webhooks-frontend 1.6.25 → 1.6.26
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/app/javascript/src/translations/en.json +2 -1
- package/dist/index.cjs.js +32 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +32 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import HelpPopover from '@bigbinary/neeto-molecules/HelpPopover';
|
|
|
20
20
|
import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
|
|
21
21
|
import { Form, Textarea, Select, Input, Switch, ActionBlock } from '@bigbinary/neetoui/formik';
|
|
22
22
|
import * as yup from 'yup';
|
|
23
|
+
import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
23
24
|
|
|
24
25
|
var getDeliveriesPath = function getDeliveriesPath(webhooksPath) {
|
|
25
26
|
return "".concat(webhooksPath, "/:webhookId/deliveries");
|
|
@@ -941,6 +942,9 @@ var useDestroyWebhook = function useDestroyWebhook(options) {
|
|
|
941
942
|
});
|
|
942
943
|
};
|
|
943
944
|
|
|
945
|
+
var WEBHOOK_HELP_URL = "https://neetocalhelp.neetokb.com/p/a-4bb6c2a2";
|
|
946
|
+
var WEBHOOK_SECRETS_HELP_URL = "https://neetocalhelp.neetokb.com/p/a-80de90bd";
|
|
947
|
+
|
|
944
948
|
function _typeof(o) {
|
|
945
949
|
"@babel/helpers - typeof";
|
|
946
950
|
|
|
@@ -996,9 +1000,6 @@ var useFetchEvents = function useFetchEvents() {
|
|
|
996
1000
|
});
|
|
997
1001
|
};
|
|
998
1002
|
|
|
999
|
-
var WEBHOOK_HELP_URL = "https://neetocalhelp.neetokb.com/p/a-4bb6c2a2";
|
|
1000
|
-
var WEBHOOK_SECRETS_HELP_URL = "https://neetocalhelp.neetokb.com/p/a-80de90bd";
|
|
1001
|
-
|
|
1002
1003
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
1003
1004
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
1004
1005
|
// generators (like Math.random()).
|
|
@@ -1351,28 +1352,35 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1351
1352
|
}));
|
|
1352
1353
|
};
|
|
1353
1354
|
|
|
1354
|
-
var Header = function
|
|
1355
|
-
var
|
|
1355
|
+
var Header = withT(function (_ref) {
|
|
1356
|
+
var t = _ref.t,
|
|
1357
|
+
breadcrumbs = _ref.breadcrumbs,
|
|
1356
1358
|
setIsAddWebhookPaneOpen = _ref.setIsAddWebhookPaneOpen;
|
|
1357
|
-
var _useTranslation = useTranslation(),
|
|
1358
|
-
t = _useTranslation.t;
|
|
1359
1359
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header$2, {
|
|
1360
1360
|
breadcrumbs: breadcrumbs,
|
|
1361
|
-
title: t("neetoWebhooks.webhook.title"),
|
|
1362
1361
|
actionBlock: /*#__PURE__*/React.createElement(Button, {
|
|
1363
1362
|
"data-cy": "add-new-webhook-button",
|
|
1364
1363
|
label: t("neetoWebhooks.webhook.add"),
|
|
1365
1364
|
onClick: function onClick() {
|
|
1366
1365
|
return setIsAddWebhookPaneOpen(true);
|
|
1367
1366
|
}
|
|
1368
|
-
})
|
|
1367
|
+
}),
|
|
1368
|
+
title: /*#__PURE__*/React.createElement("div", {
|
|
1369
|
+
className: "flex items-center gap-x-2"
|
|
1370
|
+
}, t("neetoWebhooks.webhook.title"), /*#__PURE__*/React.createElement(HelpPopover, {
|
|
1371
|
+
description: t("neetoWebhooks.webhook.helpDescription"),
|
|
1372
|
+
helpLinkProps: {
|
|
1373
|
+
href: WEBHOOK_HELP_URL
|
|
1374
|
+
},
|
|
1375
|
+
title: t("neetoWebhooks.webhook.title")
|
|
1376
|
+
}))
|
|
1369
1377
|
}), /*#__PURE__*/React.createElement(Typography, {
|
|
1370
1378
|
className: "mb-3",
|
|
1371
1379
|
"data-cy": "webhook-description-header",
|
|
1372
1380
|
style: "h5",
|
|
1373
1381
|
weight: "normal"
|
|
1374
1382
|
}, t("neetoWebhooks.webhook.description")));
|
|
1375
|
-
};
|
|
1383
|
+
});
|
|
1376
1384
|
var Header$1 = /*#__PURE__*/React.memo(Header);
|
|
1377
1385
|
|
|
1378
1386
|
var Webhooks = function Webhooks(_ref) {
|
|
@@ -1452,9 +1460,7 @@ var Webhooks = function Webhooks(_ref) {
|
|
|
1452
1460
|
fixedHeight: true,
|
|
1453
1461
|
currentPageNumber: pageNumber,
|
|
1454
1462
|
defaultPageSize: DEFAULT_PAGE_SIZE,
|
|
1455
|
-
handlePageChange:
|
|
1456
|
-
return setPageNumber(page);
|
|
1457
|
-
},
|
|
1463
|
+
handlePageChange: setPageNumber,
|
|
1458
1464
|
loading: isFetching,
|
|
1459
1465
|
rowData: webhooks,
|
|
1460
1466
|
columnData: buildColumns({
|
|
@@ -1465,7 +1471,19 @@ var Webhooks = function Webhooks(_ref) {
|
|
|
1465
1471
|
})) : /*#__PURE__*/React.createElement("div", {
|
|
1466
1472
|
className: "flex h-full w-full items-center justify-center"
|
|
1467
1473
|
}, /*#__PURE__*/React.createElement(NoData, {
|
|
1468
|
-
title: t("neetoWebhooks.webhook.empty")
|
|
1474
|
+
title: t("neetoWebhooks.webhook.empty"),
|
|
1475
|
+
helpText: /*#__PURE__*/React.createElement("a", {
|
|
1476
|
+
className: "neeto-ui-text-primary-800 hover:neeto-ui-text-primary-800 visited:neeto-ui-text-primary-600 font-medium",
|
|
1477
|
+
href: WEBHOOK_HELP_URL,
|
|
1478
|
+
rel: "noreferrer",
|
|
1479
|
+
target: "_blank"
|
|
1480
|
+
}, t("neetoWebhooks.webhook.emptyHelpText")),
|
|
1481
|
+
primaryButtonProps: {
|
|
1482
|
+
label: t("neetoWebhooks.webhook.add"),
|
|
1483
|
+
onClick: function onClick() {
|
|
1484
|
+
return setIsAddWebhookPaneOpen(true);
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1469
1487
|
})), /*#__PURE__*/React.createElement(AddWebhookPane, {
|
|
1470
1488
|
editingWebhookId: editingWebhookId,
|
|
1471
1489
|
entityId: entityId,
|