@bigbinary/neeto-webhooks-frontend 1.6.28 → 1.6.30

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.js CHANGED
@@ -23,7 +23,7 @@ import Tag from '@bigbinary/neetoui/Tag';
23
23
  import { t as t$1 } from 'i18next';
24
24
  import { prop, pluck, assoc } from 'ramda';
25
25
  import Alert from '@bigbinary/neetoui/Alert';
26
- import { Plus } from '@bigbinary/neeto-icons';
26
+ import Plus from '@bigbinary/neeto-icons/Plus';
27
27
  import HelpPopover from '@bigbinary/neeto-molecules/HelpPopover';
28
28
  import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
29
29
  import Spinner from '@bigbinary/neetoui/Spinner';
@@ -645,6 +645,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
645
645
  var _useTranslation = useTranslation(),
646
646
  t = _useTranslation.t;
647
647
  var status = delivery.status,
648
+ identifier = delivery.identifier,
648
649
  responseStatusCode = delivery.responseStatusCode,
649
650
  sid = delivery.sid;
650
651
  var renderPayload = function renderPayload() {
@@ -663,10 +664,18 @@ var TransactionDetails = function TransactionDetails(_ref) {
663
664
  className: "flex items-center space-x-1",
664
665
  children: [t("neetoWebhooks.delivery.sid"), ":", /*#__PURE__*/jsx(Typography, {
665
666
  className: "px-2 font-bold",
666
- "data-cy": "delivery-identifier",
667
+ "data-cy": "delivery-sid",
667
668
  style: "body2",
668
669
  children: sid
669
670
  })]
671
+ }), /*#__PURE__*/jsxs("span", {
672
+ className: "flex items-center space-x-1",
673
+ children: [t("neetoWebhooks.delivery.deliveryId"), ":", /*#__PURE__*/jsx(Typography, {
674
+ className: "px-2 font-bold",
675
+ "data-cy": "delivery-identifier",
676
+ style: "body2",
677
+ children: identifier
678
+ })]
670
679
  }), /*#__PURE__*/jsxs("span", {
671
680
  className: "flex items-center",
672
681
  children: [t("neetoWebhooks.common.responseStatus"), ":", /*#__PURE__*/jsx(Typography, {
@@ -827,22 +836,22 @@ var Details = function Details(_ref) {
827
836
  };
828
837
 
829
838
  var buildColumns$1 = function buildColumns(_ref) {
830
- var handleDetailsClick = _ref.handleDetailsClick;
839
+ var deliveryDetailsPath = _ref.deliveryDetailsPath;
831
840
  return [{
832
- title: t$1("neetoWebhooks.delivery.sid", SINGULAR),
833
- key: "sid",
834
- dataIndex: "sid",
841
+ title: t$1("neetoWebhooks.delivery.deliveryId"),
842
+ key: "identifier",
843
+ dataIndex: "identifier",
835
844
  width: 390,
836
845
  render: function render(_, delivery) {
837
846
  return /*#__PURE__*/jsxs("div", {
838
847
  className: "flex items-center gap-x-3",
839
848
  children: [/*#__PURE__*/jsx(Button, {
840
849
  style: "link",
850
+ to: buildUrl(deliveryDetailsPath, {
851
+ deliveryId: delivery.sid
852
+ }),
841
853
  weight: "semibold",
842
- onClick: function onClick() {
843
- return handleDetailsClick(delivery.sid);
844
- },
845
- children: delivery.sid
854
+ children: delivery.identifier
846
855
  }), delivery.redelivery && /*#__PURE__*/jsx(Tag, {
847
856
  style: "info",
848
857
  children: t$1("neetoWebhooks.delivery.redelivery")
@@ -931,11 +940,6 @@ var Deliveries = function Deliveries(_ref) {
931
940
  link: window.location.pathname,
932
941
  text: endpoint
933
942
  }]);
934
- var handleDetailsClick = function handleDetailsClick(sid) {
935
- return history.push(buildUrl(deliveryDetailsPath, {
936
- deliveryId: sid
937
- }));
938
- };
939
943
  var handleClose = function handleClose() {
940
944
  history.push(buildUrl(deliveriesPath, {
941
945
  webhookId: webhookId
@@ -953,7 +957,7 @@ var Deliveries = function Deliveries(_ref) {
953
957
  totalCount: totalCount,
954
958
  fixedHeight: true,
955
959
  columnData: buildColumns$1({
956
- handleDetailsClick: handleDetailsClick
960
+ deliveryDetailsPath: deliveryDetailsPath
957
961
  }),
958
962
  currentPageNumber: pageNumber,
959
963
  defaultPageSize: DEFAULT_PAGE_SIZE,
@@ -1448,10 +1452,12 @@ var Header = withT(function (_ref) {
1448
1452
  var t = _ref.t,
1449
1453
  breadcrumbs = _ref.breadcrumbs,
1450
1454
  title = _ref.title,
1451
- setIsAddWebhookPaneOpen = _ref.setIsAddWebhookPaneOpen;
1455
+ setIsAddWebhookPaneOpen = _ref.setIsAddWebhookPaneOpen,
1456
+ headerSize = _ref.headerSize;
1452
1457
  return /*#__PURE__*/jsxs(Fragment, {
1453
1458
  children: [/*#__PURE__*/jsx(Header$2, {
1454
1459
  breadcrumbs: breadcrumbs,
1460
+ size: headerSize,
1455
1461
  actionBlock: /*#__PURE__*/jsx(Button, {
1456
1462
  "data-cy": "add-new-webhook-button",
1457
1463
  label: t("neetoWebhooks.webhook.add"),
@@ -1487,7 +1493,10 @@ var Webhooks = function Webhooks(_ref) {
1487
1493
  title = _ref.title,
1488
1494
  entityId = _ref.entityId,
1489
1495
  onCreate = _ref.onCreate,
1490
- onDelete = _ref.onDelete;
1496
+ onDelete = _ref.onDelete,
1497
+ headerSize = _ref.headerSize,
1498
+ _ref$containerClassNa = _ref.containerClassName,
1499
+ containerClassName = _ref$containerClassNa === void 0 ? "" : _ref$containerClassNa;
1491
1500
  var _useState = useState(null),
1492
1501
  _useState2 = _slicedToArray(_useState, 2),
1493
1502
  editingWebhookId = _useState2[0],
@@ -1547,9 +1556,10 @@ var Webhooks = function Webhooks(_ref) {
1547
1556
  return /*#__PURE__*/jsx(PageLoader, {});
1548
1557
  }
1549
1558
  return /*#__PURE__*/jsxs(Container, {
1550
- className: "w-full",
1559
+ className: containerClassName,
1551
1560
  children: [/*#__PURE__*/jsx(Header$1, {
1552
1561
  breadcrumbs: breadcrumbs,
1562
+ headerSize: headerSize,
1553
1563
  setIsAddWebhookPaneOpen: setIsAddWebhookPaneOpen,
1554
1564
  title: title
1555
1565
  }), isNotEmpty(webhooks) ? /*#__PURE__*/jsx(TableWrapper, {
@@ -1572,12 +1582,12 @@ var Webhooks = function Webhooks(_ref) {
1572
1582
  className: "flex h-full w-full items-center justify-center",
1573
1583
  children: /*#__PURE__*/jsx(NoData, {
1574
1584
  title: t("neetoWebhooks.webhook.empty"),
1575
- helpText: /*#__PURE__*/jsx("a", {
1576
- className: "neeto-ui-text-primary-800 hover:neeto-ui-text-primary-800 visited:neeto-ui-text-primary-600 font-medium",
1585
+ helpText: /*#__PURE__*/jsx(Button, {
1577
1586
  href: WEBHOOK_HELP_URL,
1587
+ label: t("neetoWebhooks.webhook.emptyHelpText"),
1578
1588
  rel: "noreferrer",
1579
- target: "_blank",
1580
- children: t("neetoWebhooks.webhook.emptyHelpText")
1589
+ style: "link",
1590
+ target: "_blank"
1581
1591
  }),
1582
1592
  primaryButtonProps: {
1583
1593
  label: t("neetoWebhooks.webhook.add"),
@@ -1624,7 +1634,9 @@ var NeetoWebhooks = function NeetoWebhooks(_ref) {
1624
1634
  breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
1625
1635
  title = _ref.title,
1626
1636
  onCreate = _ref.onCreate,
1627
- onDelete = _ref.onDelete;
1637
+ onDelete = _ref.onDelete,
1638
+ headerSize = _ref.headerSize,
1639
+ containerClassName = _ref.containerClassName;
1628
1640
  var _useRouteMatch = useRouteMatch(),
1629
1641
  webhooksPath = _useRouteMatch.path,
1630
1642
  webhooksUrl = _useRouteMatch.url;
@@ -1637,9 +1649,11 @@ var NeetoWebhooks = function NeetoWebhooks(_ref) {
1637
1649
  component: function component() {
1638
1650
  return /*#__PURE__*/jsx(Webhooks$1, {
1639
1651
  breadcrumbs: breadcrumbs,
1652
+ containerClassName: containerClassName,
1640
1653
  deliveriesPath: deliveriesPath,
1641
1654
  entityId: entityId,
1642
1655
  entityType: entityType,
1656
+ headerSize: headerSize,
1643
1657
  onCreate: onCreate,
1644
1658
  onDelete: onDelete,
1645
1659
  title: title