@bigbinary/neeto-webhooks-frontend 1.6.4 → 1.6.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 +6 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +20 -26
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { QueryClient, QueryCache, QueryClientProvider, useQuery, useQueryClient,
|
|
|
12
12
|
import { ReactQueryDevtools } from 'react-query/devtools';
|
|
13
13
|
import axios from 'axios';
|
|
14
14
|
import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
|
|
15
|
-
import { t
|
|
15
|
+
import { t } from 'i18next';
|
|
16
16
|
import { prop, pluck, assoc } from 'ramda';
|
|
17
17
|
import { MenuHorizontal, Info } from '@bigbinary/neeto-icons';
|
|
18
18
|
import { Form, Textarea, Select, Input, Switch, ActionBlock } from '@bigbinary/neetoui/formik';
|
|
@@ -696,27 +696,26 @@ var Details = function Details(_ref) {
|
|
|
696
696
|
var buildColumns$1 = function buildColumns(_ref) {
|
|
697
697
|
var handleDetailsClick = _ref.handleDetailsClick;
|
|
698
698
|
return [{
|
|
699
|
-
title: t
|
|
699
|
+
title: t("neetoWebhooks.delivery.identifier", SINGULAR),
|
|
700
700
|
key: "identifier",
|
|
701
|
-
width:
|
|
701
|
+
width: "35%",
|
|
702
702
|
render: function render(_ref2) {
|
|
703
703
|
var identifier = _ref2.identifier,
|
|
704
704
|
redelivery = _ref2.redelivery;
|
|
705
705
|
return /*#__PURE__*/React.createElement("div", {
|
|
706
|
-
className: "flex
|
|
706
|
+
className: "flex items-center gap-x-3"
|
|
707
707
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
708
|
-
className: "px-2",
|
|
709
708
|
style: "body2",
|
|
710
709
|
weight: "semibold"
|
|
711
710
|
}, identifier), redelivery && /*#__PURE__*/React.createElement(Tag, {
|
|
712
711
|
style: "info"
|
|
713
|
-
}, t
|
|
712
|
+
}, t("neetoWebhooks.delivery.redelivery")));
|
|
714
713
|
}
|
|
715
714
|
}, {
|
|
716
|
-
title: t
|
|
715
|
+
title: t("neetoWebhooks.tableHeaders.createdAt"),
|
|
717
716
|
key: "createdAt",
|
|
718
717
|
dataIndex: "createdAt",
|
|
719
|
-
width:
|
|
718
|
+
width: "20%",
|
|
720
719
|
render: function render(createdAt) {
|
|
721
720
|
return /*#__PURE__*/React.createElement("div", {
|
|
722
721
|
className: "flex items-center justify-between space-x-1"
|
|
@@ -734,9 +733,9 @@ var buildColumns$1 = function buildColumns(_ref) {
|
|
|
734
733
|
})));
|
|
735
734
|
}
|
|
736
735
|
}, {
|
|
737
|
-
title: t
|
|
736
|
+
title: t("neetoWebhooks.common.responseStatus"),
|
|
738
737
|
key: "responseStatusCode",
|
|
739
|
-
width:
|
|
738
|
+
width: "10%",
|
|
740
739
|
render: function render(_ref3) {
|
|
741
740
|
var responseStatusCode = _ref3.responseStatusCode,
|
|
742
741
|
status = _ref3.status;
|
|
@@ -750,19 +749,19 @@ var buildColumns$1 = function buildColumns(_ref) {
|
|
|
750
749
|
}, status));
|
|
751
750
|
}
|
|
752
751
|
}, {
|
|
753
|
-
title: t
|
|
752
|
+
title: t("neetoWebhooks.common.event", SINGULAR),
|
|
754
753
|
key: "event",
|
|
755
754
|
dataIndex: "event",
|
|
756
|
-
width:
|
|
755
|
+
width: "20%",
|
|
757
756
|
render: prop("label")
|
|
758
757
|
}, {
|
|
759
|
-
title: t
|
|
758
|
+
title: t("neetoWebhooks.tableHeaders.details"),
|
|
760
759
|
key: "details",
|
|
761
760
|
dataIndex: "details",
|
|
762
|
-
width:
|
|
761
|
+
width: "15%",
|
|
763
762
|
render: function render(_, delivery) {
|
|
764
763
|
return /*#__PURE__*/React.createElement(Button, {
|
|
765
|
-
label: t
|
|
764
|
+
label: t("neetoWebhooks.buttons.viewDetails"),
|
|
766
765
|
size: "small",
|
|
767
766
|
onClick: function onClick() {
|
|
768
767
|
return handleDetailsClick(delivery);
|
|
@@ -1007,10 +1006,10 @@ function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if
|
|
|
1007
1006
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1008
1007
|
var getValidationSchema = function getValidationSchema(webhooks) {
|
|
1009
1008
|
return yup.object().shape({
|
|
1010
|
-
endpoint: yup.string().trim().matches(/^(https?):\/\//i, t
|
|
1009
|
+
endpoint: yup.string().trim().matches(/^(https?):\/\//i, t("neetoWebhooks.errors.webhook.invalidUrlProtocol")).url(t("neetoWebhooks.errors.webhook.invalidUrl")).required(t("neetoWebhooks.errors.webhook.required")).test("Is endpoint unique", t("neetoWebhooks.errors.webhook.urlNotUnique"), function (endpoint, ctx) {
|
|
1011
1010
|
return !pluck("endpoint", removeById(ctx.parent.id, webhooks)).includes(endpoint === null || endpoint === void 0 ? void 0 : endpoint.trim());
|
|
1012
1011
|
}),
|
|
1013
|
-
events: yup.array().min(1, t
|
|
1012
|
+
events: yup.array().min(1, t("neetoWebhooks.errors.webhook.events.required")),
|
|
1014
1013
|
secret: yup.string().trim().nullable()
|
|
1015
1014
|
});
|
|
1016
1015
|
};
|
|
@@ -1049,7 +1048,7 @@ var buildColumns = function buildColumns(_ref5) {
|
|
|
1049
1048
|
handleEdit = _ref5.handleEdit,
|
|
1050
1049
|
deliveriesPath = _ref5.deliveriesPath;
|
|
1051
1050
|
return [{
|
|
1052
|
-
title: t
|
|
1051
|
+
title: t("neetoWebhooks.common.endpoint"),
|
|
1053
1052
|
key: "endpoint",
|
|
1054
1053
|
dataIndex: "endpoint",
|
|
1055
1054
|
render: function render(endpoint, webhook) {
|
|
@@ -1070,15 +1069,15 @@ var buildColumns = function buildColumns(_ref5) {
|
|
|
1070
1069
|
}));
|
|
1071
1070
|
}
|
|
1072
1071
|
}, {
|
|
1073
|
-
title: t
|
|
1072
|
+
title: t("neetoWebhooks.webhook.active"),
|
|
1074
1073
|
key: "isActive",
|
|
1075
1074
|
dataIndex: "isActive",
|
|
1076
1075
|
render: function render(isActive) {
|
|
1077
|
-
return isActive ? t
|
|
1076
|
+
return isActive ? t("neetoWebhooks.webhook.activeStatuses.yes") : t("neetoWebhooks.webhook.activeStatuses.no");
|
|
1078
1077
|
},
|
|
1079
1078
|
width: 100
|
|
1080
1079
|
}, {
|
|
1081
|
-
title: t
|
|
1080
|
+
title: t("neetoWebhooks.common.event", PLURAL),
|
|
1082
1081
|
dataIndex: "events",
|
|
1083
1082
|
key: "events",
|
|
1084
1083
|
render: function render(events) {
|
|
@@ -1400,10 +1399,5 @@ var NeetoWebhooks = function NeetoWebhooks(_ref) {
|
|
|
1400
1399
|
}));
|
|
1401
1400
|
};
|
|
1402
1401
|
|
|
1403
|
-
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
1404
|
-
|
|
1405
|
-
var css = ".deliveries__list,.webhooks__list{height:calc(100vh - 200px);overflow-y:auto}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3NyYy9zdHlsZXNoZWV0cy9jb21wb25lbnRzL193ZWJob29rLnNjc3MiLCJhcHAvamF2YXNjcmlwdC9zcmMvc3R5bGVzaGVldHMvbWFpbi5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGtDQUNFLDBCQUFBLENBQ0EsZUNNRiIsInNvdXJjZXNDb250ZW50IjpbIi53ZWJob29rc19fbGlzdCB7XG4gIGhlaWdodDogY2FsYygxMDB2aCAtIDIwMHB4KTtcbiAgb3ZlcmZsb3cteTogYXV0bztcbn1cbiIsIi5kZWxpdmVyaWVzX19saXN0IHtcbiAgaGVpZ2h0OiBjYWxjKDEwMHZoIC0gMjAwcHgpO1xuICBvdmVyZmxvdy15OiBhdXRvO1xufVxuXG4ud2ViaG9va3NfX2xpc3Qge1xuICBoZWlnaHQ6IGNhbGMoMTAwdmggLSAyMDBweCk7XG4gIG92ZXJmbG93LXk6IGF1dG87XG59Il19 */";
|
|
1406
|
-
n(css,{});
|
|
1407
|
-
|
|
1408
1402
|
export { NeetoWebhooks };
|
|
1409
1403
|
//# sourceMappingURL=index.js.map
|