@bigbinary/neeto-webhooks-frontend 3.0.5 → 3.0.7
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.
|
@@ -173,11 +173,11 @@ var DELIVERY_TAB = {
|
|
|
173
173
|
|
|
174
174
|
var Snippet = function Snippet(_ref) {
|
|
175
175
|
var children = _ref.children,
|
|
176
|
-
_ref$
|
|
177
|
-
|
|
176
|
+
_ref$dataTestid = _ref.dataTestid,
|
|
177
|
+
dataTestid = _ref$dataTestid === void 0 ? "" : _ref$dataTestid;
|
|
178
178
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
179
179
|
className: "neeto-ui-rounded neeto-ui-border-gray-300 neeto-ui-bg-gray-100 my-2 whitespace-pre-wrap break-all border p-4",
|
|
180
|
-
"data-
|
|
180
|
+
"data-testid": dataTestid,
|
|
181
181
|
children: children
|
|
182
182
|
});
|
|
183
183
|
};
|
|
@@ -210,7 +210,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
210
210
|
className: "flex items-center space-x-1",
|
|
211
211
|
children: [t("neetoWebhooks.delivery.sid"), ":", /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
212
212
|
className: "px-2 font-bold",
|
|
213
|
-
"data-
|
|
213
|
+
"data-testid": "delivery-sid",
|
|
214
214
|
style: "body2",
|
|
215
215
|
children: sid
|
|
216
216
|
})]
|
|
@@ -218,7 +218,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
218
218
|
className: "flex items-center space-x-1",
|
|
219
219
|
children: [t("neetoWebhooks.delivery.deliveryId"), ":", /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
220
220
|
className: "px-2 font-bold",
|
|
221
|
-
"data-
|
|
221
|
+
"data-testid": "delivery-identifier",
|
|
222
222
|
style: "body2",
|
|
223
223
|
children: identifier
|
|
224
224
|
})]
|
|
@@ -226,7 +226,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
226
226
|
className: "flex items-center",
|
|
227
227
|
children: [t("neetoWebhooks.common.responseStatus"), ":", /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
228
228
|
className: "px-2 font-bold",
|
|
229
|
-
"data-
|
|
229
|
+
"data-testid": "delivery-response-code",
|
|
230
230
|
style: "body2",
|
|
231
231
|
children: responseStatusCode
|
|
232
232
|
}), /*#__PURE__*/jsxRuntime.jsx(Tag, {
|
|
@@ -258,7 +258,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
258
258
|
style: "h5",
|
|
259
259
|
children: t("neetoWebhooks.delivery.header")
|
|
260
260
|
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
261
|
-
|
|
261
|
+
dataTestid: "delivery-request-header",
|
|
262
262
|
children: delivery.requestHeader
|
|
263
263
|
})]
|
|
264
264
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -266,7 +266,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
266
266
|
style: "h5",
|
|
267
267
|
children: t("neetoWebhooks.delivery.payload")
|
|
268
268
|
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
269
|
-
|
|
269
|
+
dataTestid: "delivery-request-payload",
|
|
270
270
|
children: renderPayload()
|
|
271
271
|
})]
|
|
272
272
|
})]
|
|
@@ -277,7 +277,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
277
277
|
style: "h5",
|
|
278
278
|
children: t("neetoWebhooks.delivery.header")
|
|
279
279
|
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
280
|
-
|
|
280
|
+
dataTestid: "delivery-response-header",
|
|
281
281
|
children: delivery.responseHeader
|
|
282
282
|
})]
|
|
283
283
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -285,7 +285,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
285
285
|
style: "h5",
|
|
286
286
|
children: t("neetoWebhooks.delivery.body")
|
|
287
287
|
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
288
|
-
|
|
288
|
+
dataTestid: "delivery-response-body",
|
|
289
289
|
children: delivery.responseBody
|
|
290
290
|
})]
|
|
291
291
|
})]
|
|
@@ -788,12 +788,12 @@ var getMenuItems = function getMenuItems(_ref) {
|
|
|
788
788
|
return [{
|
|
789
789
|
key: MENU_ITEMS.EDIT,
|
|
790
790
|
label: i18next.t("neetoWebhooks.buttons.edit"),
|
|
791
|
-
"data-
|
|
791
|
+
"data-testid": "neeto-webhooks-edit-button",
|
|
792
792
|
onClick: onEdit
|
|
793
793
|
}, {
|
|
794
794
|
key: MENU_ITEMS.DELETE,
|
|
795
795
|
label: i18next.t("neetoWebhooks.buttons.delete"),
|
|
796
|
-
"data-
|
|
796
|
+
"data-testid": "neeto-webhooks-delete-button",
|
|
797
797
|
onClick: onDelete
|
|
798
798
|
}];
|
|
799
799
|
};
|
|
@@ -1051,7 +1051,7 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1051
1051
|
children: [/*#__PURE__*/jsxRuntime.jsxs(Pane.Header, {
|
|
1052
1052
|
className: "flex items-center gap-x-2",
|
|
1053
1053
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1054
|
-
"data-
|
|
1054
|
+
"data-testid": "add-new-webhook-pane-header",
|
|
1055
1055
|
style: "h2",
|
|
1056
1056
|
weight: "semibold",
|
|
1057
1057
|
children: editingWebhookId ? t("neetoWebhooks.webhook.edit") : t("neetoWebhooks.webhook.add")
|
|
@@ -1084,9 +1084,13 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1084
1084
|
className: "pb-6",
|
|
1085
1085
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1086
1086
|
className: "w-full space-y-4 md:space-y-6",
|
|
1087
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
1087
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1088
|
+
className: "mb-2",
|
|
1089
|
+
style: "body2",
|
|
1090
|
+
children: t("neetoWebhooks.webhook.postRequestIsSentToEndpointURL")
|
|
1091
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Textarea, {
|
|
1088
1092
|
required: true,
|
|
1089
|
-
"data-
|
|
1093
|
+
"data-testid": "endpoint-input-field",
|
|
1090
1094
|
label: t("neetoWebhooks.webhook.endpoint"),
|
|
1091
1095
|
name: "endpoint",
|
|
1092
1096
|
placeholder: t("neetoWebhooks.webhook.endpointPlaceholder"),
|
|
@@ -1109,28 +1113,28 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1109
1113
|
}), isSecretInputFieldVisible ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1110
1114
|
className: "flex items-center justify-between space-x-2",
|
|
1111
1115
|
children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
1112
|
-
"data-
|
|
1116
|
+
"data-testid": "secret-key-input-field",
|
|
1113
1117
|
name: "secret",
|
|
1114
1118
|
placeholder: t("neetoWebhooks.webhook.secretPlaceholder")
|
|
1115
1119
|
}), /*#__PURE__*/jsxRuntime.jsx(MoreDropdown, {
|
|
1116
1120
|
menuItems: [{
|
|
1117
1121
|
key: "regenerate-secret",
|
|
1118
1122
|
label: t("neetoWebhooks.buttons.regenerate"),
|
|
1119
|
-
"data-
|
|
1123
|
+
"data-testid": "regenerate-secret",
|
|
1120
1124
|
onClick: function onClick() {
|
|
1121
1125
|
return handleRegenerate(setFieldValue);
|
|
1122
1126
|
}
|
|
1123
1127
|
}, {
|
|
1124
1128
|
key: "delete-secret",
|
|
1125
1129
|
label: t("neetoWebhooks.buttons.delete"),
|
|
1126
|
-
"data-
|
|
1130
|
+
"data-testid": "delete-secret",
|
|
1127
1131
|
onClick: function onClick() {
|
|
1128
1132
|
return handleDelete(setFieldValue);
|
|
1129
1133
|
}
|
|
1130
1134
|
}]
|
|
1131
1135
|
})]
|
|
1132
1136
|
}) : /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1133
|
-
"data-
|
|
1137
|
+
"data-testid": "add-secret-key",
|
|
1134
1138
|
icon: Plus,
|
|
1135
1139
|
iconPosition: "left",
|
|
1136
1140
|
label: t("neetoWebhooks.buttons.generateSecretKey"),
|
|
@@ -1154,7 +1158,7 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1154
1158
|
values: values
|
|
1155
1159
|
}), touched.events && errors.events && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1156
1160
|
className: "neeto-ui-text-error-800 text-xs mt-1",
|
|
1157
|
-
"data-
|
|
1161
|
+
"data-testid": "event-error-text",
|
|
1158
1162
|
children: errors.events
|
|
1159
1163
|
})]
|
|
1160
1164
|
});
|
|
@@ -1195,7 +1199,7 @@ var Header = reactUtils.withT(function (_ref) {
|
|
|
1195
1199
|
size: headerSize,
|
|
1196
1200
|
title: title || t("neetoWebhooks.webhook.title"),
|
|
1197
1201
|
actionBlock: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1198
|
-
"data-
|
|
1202
|
+
"data-testid": "add-new-webhook-button",
|
|
1199
1203
|
label: t("neetoWebhooks.webhook.add"),
|
|
1200
1204
|
onClick: function onClick() {
|
|
1201
1205
|
return setIsAddWebhookPaneOpen(true);
|