@bigbinary/neeto-webhooks-frontend 3.0.12 → 3.0.14
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/README.md +12 -2
- package/dist/.ready +1 -1
- package/dist/NeetoWebhooks.js +8 -2
- package/dist/NeetoWebhooks.js.map +1 -1
- package/dist/cjs/NeetoWebhooks.js +8 -2
- package/dist/cjs/NeetoWebhooks.js.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/v2/NeetoWebhooks.js +149 -141
- package/dist/cjs/v2/NeetoWebhooks.js.map +1 -1
- package/dist/cjs/v2/index.js +4 -4
- package/dist/index.js +2 -2
- package/dist/{main-CfvmjDDj.js → main-CcNqvzWi.js} +38 -2
- package/dist/main-CcNqvzWi.js.map +1 -0
- package/dist/{main-B8V9tERH.js → main-CuEMguMt.js} +38 -1
- package/dist/main-CuEMguMt.js.map +1 -0
- package/dist/v2/NeetoWebhooks.js +149 -141
- package/dist/v2/NeetoWebhooks.js.map +1 -1
- package/dist/v2/index.js +4 -4
- package/package.json +17 -17
- package/types.d.ts +2 -1
- package/dist/main-B8V9tERH.js.map +0 -1
- package/dist/main-CfvmjDDj.js.map +0 -1
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var react = require('react');
|
|
3
4
|
var ramda = require('ramda');
|
|
4
5
|
var reactRouterDom = require('react-router-dom');
|
|
5
|
-
var main = require('../../main-
|
|
6
|
+
var main = require('../../main-CuEMguMt.js');
|
|
6
7
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
8
|
+
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
9
|
+
var lucideReact = require('lucide-react');
|
|
7
10
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
8
11
|
var constants = require('@bigbinary/neeto-commons-frontend/v2/constants');
|
|
9
12
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/v2/react-utils');
|
|
10
13
|
var utils = require('@bigbinary/neeto-commons-frontend/v2/utils');
|
|
11
|
-
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
12
14
|
var Container = require('@bigbinary/neeto-molecules/v2/Container');
|
|
13
15
|
var Header$2 = require('@bigbinary/neeto-molecules/v2/Header');
|
|
14
16
|
var TableWrapper = require('@bigbinary/neeto-molecules/v2/TableWrapper');
|
|
@@ -21,11 +23,9 @@ var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
|
21
23
|
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
22
24
|
var DateFormat = require('@bigbinary/neeto-molecules/v2/DateFormat');
|
|
23
25
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
24
|
-
var react = require('react');
|
|
25
26
|
var i18next = require('i18next');
|
|
26
27
|
var formik = require('@bigbinary/neeto-atoms/formik');
|
|
27
28
|
var formik$1 = require('formik');
|
|
28
|
-
var lucideReact = require('lucide-react');
|
|
29
29
|
var HelpPopover = require('@bigbinary/neeto-molecules/v2/HelpPopover');
|
|
30
30
|
var MoreDropdown = require('@bigbinary/neeto-molecules/v2/MoreDropdown');
|
|
31
31
|
var yup = require('yup');
|
|
@@ -79,7 +79,7 @@ var Snippet = function Snippet(_ref) {
|
|
|
79
79
|
_ref$dataTestid = _ref.dataTestid,
|
|
80
80
|
dataTestid = _ref$dataTestid === void 0 ? "" : _ref$dataTestid;
|
|
81
81
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
82
|
-
className: "
|
|
82
|
+
className: "my-2 whitespace-pre-wrap break-all rounded-lg border border-border bg-muted p-4",
|
|
83
83
|
"data-testid": dataTestid,
|
|
84
84
|
children: children
|
|
85
85
|
});
|
|
@@ -104,97 +104,98 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
104
104
|
return "";
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
|
-
return /*#__PURE__*/jsxRuntime.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
})]
|
|
120
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
121
|
-
className: "flex items-center space-x-1",
|
|
122
|
-
children: [t("neetoWebhooks.delivery.deliveryId"), ":", /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
123
|
-
className: "px-2 font-bold",
|
|
124
|
-
"data-testid": "delivery-identifier",
|
|
125
|
-
variant: "body2",
|
|
126
|
-
children: identifier
|
|
127
|
-
})]
|
|
128
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
129
|
-
className: "flex items-center",
|
|
130
|
-
children: [t("neetoWebhooks.common.responseStatus"), ":", /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
131
|
-
className: "px-2 font-bold",
|
|
132
|
-
"data-testid": "delivery-response-code",
|
|
133
|
-
variant: "body2",
|
|
134
|
-
children: responseStatusCode
|
|
135
|
-
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Badge, {
|
|
136
|
-
variant: status === "success" ? "green-subtle" : "amber-subtle",
|
|
137
|
-
children: status
|
|
138
|
-
})]
|
|
107
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
108
|
+
className: "sticky top-0 mb-2 flex w-full flex-col bg-background",
|
|
109
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
110
|
+
className: "flex w-full flex-col space-y-2 pb-4",
|
|
111
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
112
|
+
className: "flex items-center space-x-1",
|
|
113
|
+
children: [t("neetoWebhooks.delivery.sid"), ":", /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
114
|
+
className: "px-2",
|
|
115
|
+
"data-testid": "delivery-sid",
|
|
116
|
+
variant: "body2",
|
|
117
|
+
weight: "bold",
|
|
118
|
+
children: sid
|
|
139
119
|
})]
|
|
140
|
-
}), /*#__PURE__*/jsxRuntime.jsxs(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
120
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
121
|
+
className: "flex items-center space-x-1",
|
|
122
|
+
children: [t("neetoWebhooks.delivery.deliveryId"), ":", /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
123
|
+
className: "px-2",
|
|
124
|
+
"data-testid": "delivery-identifier",
|
|
125
|
+
variant: "body2",
|
|
126
|
+
weight: "bold",
|
|
127
|
+
children: identifier
|
|
128
|
+
})]
|
|
129
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
130
|
+
className: "flex items-center",
|
|
131
|
+
children: [t("neetoWebhooks.common.responseStatus"), ":", /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
132
|
+
className: "px-2",
|
|
133
|
+
"data-testid": "delivery-response-code",
|
|
134
|
+
variant: "body2",
|
|
135
|
+
weight: "bold",
|
|
136
|
+
children: responseStatusCode
|
|
137
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Badge, {
|
|
138
|
+
variant: status === "success" ? "green" : "amber",
|
|
139
|
+
children: status
|
|
140
|
+
})]
|
|
141
|
+
})]
|
|
142
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Tabs, {
|
|
143
|
+
value: activeHeader,
|
|
144
|
+
onValueChange: setActiveHeader,
|
|
145
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Tabs.List, {
|
|
146
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Tabs.Item, {
|
|
152
147
|
value: DELIVERY_TAB.request,
|
|
153
|
-
children:
|
|
154
|
-
|
|
155
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
156
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
157
|
-
variant: "h5",
|
|
158
|
-
children: t("neetoWebhooks.delivery.header")
|
|
159
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
160
|
-
dataTestid: "delivery-request-header",
|
|
161
|
-
children: delivery.requestHeader
|
|
162
|
-
})]
|
|
163
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
164
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
165
|
-
variant: "h5",
|
|
166
|
-
children: t("neetoWebhooks.delivery.payload")
|
|
167
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
168
|
-
dataTestid: "delivery-request-payload",
|
|
169
|
-
children: renderPayload()
|
|
170
|
-
})]
|
|
171
|
-
})]
|
|
172
|
-
})
|
|
173
|
-
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Tabs.Content, {
|
|
148
|
+
children: t("neetoWebhooks.delivery.request")
|
|
149
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Tabs.Item, {
|
|
174
150
|
value: DELIVERY_TAB.response,
|
|
175
|
-
children:
|
|
176
|
-
className: "mt-2 w-full space-y-4",
|
|
177
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
178
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
179
|
-
variant: "h5",
|
|
180
|
-
children: t("neetoWebhooks.delivery.header")
|
|
181
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
182
|
-
dataTestid: "delivery-response-header",
|
|
183
|
-
children: delivery.responseHeader
|
|
184
|
-
})]
|
|
185
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
186
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
187
|
-
variant: "h5",
|
|
188
|
-
children: t("neetoWebhooks.delivery.body")
|
|
189
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
190
|
-
dataTestid: "delivery-response-body",
|
|
191
|
-
children: delivery.responseBody
|
|
192
|
-
})]
|
|
193
|
-
})]
|
|
194
|
-
})
|
|
151
|
+
children: t("neetoWebhooks.delivery.response")
|
|
195
152
|
})]
|
|
153
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Tabs.Content, {
|
|
154
|
+
value: DELIVERY_TAB.request,
|
|
155
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
156
|
+
className: "mt-2 w-full space-y-4",
|
|
157
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
158
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
159
|
+
variant: "h5",
|
|
160
|
+
children: t("neetoWebhooks.delivery.header")
|
|
161
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
162
|
+
dataTestid: "delivery-request-header",
|
|
163
|
+
children: delivery.requestHeader
|
|
164
|
+
})]
|
|
165
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
166
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
167
|
+
variant: "h5",
|
|
168
|
+
children: t("neetoWebhooks.delivery.payload")
|
|
169
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
170
|
+
dataTestid: "delivery-request-payload",
|
|
171
|
+
children: renderPayload()
|
|
172
|
+
})]
|
|
173
|
+
})]
|
|
174
|
+
})
|
|
175
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Tabs.Content, {
|
|
176
|
+
value: DELIVERY_TAB.response,
|
|
177
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
178
|
+
className: "mt-2 w-full space-y-4",
|
|
179
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
180
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
181
|
+
variant: "h5",
|
|
182
|
+
children: t("neetoWebhooks.delivery.header")
|
|
183
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
184
|
+
dataTestid: "delivery-response-header",
|
|
185
|
+
children: delivery.responseHeader
|
|
186
|
+
})]
|
|
187
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
188
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
189
|
+
variant: "h5",
|
|
190
|
+
children: t("neetoWebhooks.delivery.body")
|
|
191
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
192
|
+
dataTestid: "delivery-response-body",
|
|
193
|
+
children: delivery.responseBody
|
|
194
|
+
})]
|
|
195
|
+
})]
|
|
196
|
+
})
|
|
196
197
|
})]
|
|
197
|
-
})
|
|
198
|
+
})]
|
|
198
199
|
});
|
|
199
200
|
};
|
|
200
201
|
|
|
@@ -240,15 +241,14 @@ var Details = function Details(_ref) {
|
|
|
240
241
|
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Spinner, {})
|
|
241
242
|
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
242
243
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Sheet.Header, {
|
|
243
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(
|
|
244
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Sheet.Title, {
|
|
244
245
|
children: [/*#__PURE__*/jsxRuntime.jsx(DateFormat.Date, {
|
|
245
246
|
date: delivery.createdAt,
|
|
246
247
|
tooltipProps: {
|
|
247
248
|
disabled: true
|
|
248
249
|
},
|
|
249
250
|
typographyProps: {
|
|
250
|
-
variant:
|
|
251
|
-
weight: "semibold"
|
|
251
|
+
variant: null
|
|
252
252
|
}
|
|
253
253
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
254
254
|
children: " \u2022 "
|
|
@@ -258,7 +258,7 @@ var Details = function Details(_ref) {
|
|
|
258
258
|
disabled: true
|
|
259
259
|
},
|
|
260
260
|
typographyProps: {
|
|
261
|
-
variant:
|
|
261
|
+
variant: null,
|
|
262
262
|
weight: "normal"
|
|
263
263
|
}
|
|
264
264
|
})]
|
|
@@ -299,14 +299,16 @@ var buildColumns$1 = function buildColumns(_ref) {
|
|
|
299
299
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
300
300
|
className: "flex items-center gap-x-3",
|
|
301
301
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
|
|
302
|
+
className: "min-w-0 shrink justify-start text-left [&>span]:min-w-0 [&>span>span]:truncate",
|
|
303
|
+
title: delivery.identifier,
|
|
302
304
|
variant: "link",
|
|
303
305
|
to: utils.buildUrl(deliveryDetailsPath, {
|
|
304
306
|
deliveryId: delivery.sid,
|
|
305
307
|
page: page
|
|
306
308
|
}),
|
|
307
|
-
weight: "semibold",
|
|
308
309
|
children: delivery.identifier
|
|
309
310
|
}), delivery.redelivery && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Badge, {
|
|
311
|
+
className: "shrink-0",
|
|
310
312
|
variant: "blue",
|
|
311
313
|
children: i18next.t("neetoWebhooks.delivery.redelivery")
|
|
312
314
|
})]
|
|
@@ -319,13 +321,8 @@ var buildColumns$1 = function buildColumns(_ref) {
|
|
|
319
321
|
size: 280,
|
|
320
322
|
cell: function cell(_ref3) {
|
|
321
323
|
var getValue = _ref3.getValue;
|
|
322
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
323
|
-
|
|
324
|
-
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
325
|
-
children: /*#__PURE__*/jsxRuntime.jsx(DateFormat.DateTime, {
|
|
326
|
-
date: getValue()
|
|
327
|
-
})
|
|
328
|
-
})
|
|
324
|
+
return /*#__PURE__*/jsxRuntime.jsx(DateFormat.DateTime, {
|
|
325
|
+
date: getValue()
|
|
329
326
|
});
|
|
330
327
|
}
|
|
331
328
|
}, {
|
|
@@ -338,14 +335,13 @@ var buildColumns$1 = function buildColumns(_ref) {
|
|
|
338
335
|
responseStatusCode = _row$original.responseStatusCode,
|
|
339
336
|
status = _row$original.status;
|
|
340
337
|
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
341
|
-
className: "flex items-center",
|
|
342
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.
|
|
343
|
-
className: "px-2",
|
|
344
|
-
variant: "body2",
|
|
345
|
-
children: responseStatusCode
|
|
346
|
-
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Badge, {
|
|
338
|
+
className: "flex items-center gap-x-2",
|
|
339
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Badge, {
|
|
347
340
|
variant: status === "success" ? "green" : "amber",
|
|
348
341
|
children: status
|
|
342
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
343
|
+
variant: "body2",
|
|
344
|
+
children: responseStatusCode
|
|
349
345
|
})]
|
|
350
346
|
});
|
|
351
347
|
}
|
|
@@ -435,6 +431,7 @@ var Deliveries = function Deliveries(_ref) {
|
|
|
435
431
|
className: "flex justify-center items-center w-full h-full",
|
|
436
432
|
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Empty, {
|
|
437
433
|
description: t("neetoWebhooks.delivery.empty.description"),
|
|
434
|
+
icon: lucideReact.Send,
|
|
438
435
|
title: t("neetoWebhooks.delivery.empty.title")
|
|
439
436
|
})
|
|
440
437
|
}), /*#__PURE__*/jsxRuntime.jsx(Details, {
|
|
@@ -627,17 +624,16 @@ var buildColumns = function buildColumns(_ref6) {
|
|
|
627
624
|
getValue = _ref7.getValue;
|
|
628
625
|
var webhook = row.original;
|
|
629
626
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
630
|
-
className: "flex items-center justify-between
|
|
627
|
+
className: "flex items-center justify-between gap-3 w-full",
|
|
631
628
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
|
|
632
|
-
|
|
629
|
+
className: "min-w-0 justify-start text-left [&>span]:min-w-0 [&>span>span]:truncate shrink",
|
|
630
|
+
title: getValue(),
|
|
633
631
|
to: utils.buildUrl(deliveriesPath, {
|
|
634
632
|
webhookId: webhook.sid
|
|
635
633
|
}),
|
|
634
|
+
variant: "link",
|
|
636
635
|
children: getValue()
|
|
637
636
|
}), /*#__PURE__*/jsxRuntime.jsx(MoreDropdown, {
|
|
638
|
-
dropdownButtonProps: {
|
|
639
|
-
className: "me-1 my-1"
|
|
640
|
-
},
|
|
641
637
|
menuItems: getMenuItems({
|
|
642
638
|
onEdit: function onEdit() {
|
|
643
639
|
return handleEdit(webhook.id);
|
|
@@ -685,10 +681,11 @@ var buildColumns = function buildColumns(_ref6) {
|
|
|
685
681
|
variant: "amber",
|
|
686
682
|
children: "deprecated"
|
|
687
683
|
})]
|
|
688
|
-
}), timeMessage && /*#__PURE__*/jsxRuntime.jsxs(
|
|
689
|
-
|
|
684
|
+
}), timeMessage && /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Typography, {
|
|
685
|
+
color: "muted",
|
|
686
|
+
variant: "caption",
|
|
690
687
|
children: [timeMessage, ".", " ", /*#__PURE__*/jsxRuntime.jsx("a", {
|
|
691
|
-
className: "text-
|
|
688
|
+
className: "text-primary underline decoration-primary/40 underline-offset-4 hover:decoration-primary",
|
|
692
689
|
href: webhook.defaultVersionPayloadDocUrl,
|
|
693
690
|
rel: "noopener noreferrer",
|
|
694
691
|
target: "_blank",
|
|
@@ -702,8 +699,8 @@ var buildColumns = function buildColumns(_ref6) {
|
|
|
702
699
|
accessorKey: "events",
|
|
703
700
|
header: i18next.t("neetoWebhooks.common.event", constants.PLURAL),
|
|
704
701
|
size: 300,
|
|
705
|
-
cell: function cell(
|
|
706
|
-
var getValue =
|
|
702
|
+
cell: function cell(_ref0) {
|
|
703
|
+
var getValue = _ref0.getValue;
|
|
707
704
|
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
708
705
|
className: "whitespace-normal",
|
|
709
706
|
children: ramda.pluck("label", getValue()).sort().join(", ")
|
|
@@ -818,21 +815,19 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
818
815
|
isOpen: isOpen,
|
|
819
816
|
onClose: onClose,
|
|
820
817
|
initialFocusRef: endpointRef,
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
children:
|
|
824
|
-
|
|
818
|
+
size: "large",
|
|
819
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Sheet.Header, {
|
|
820
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Sheet.Title, {
|
|
821
|
+
className: "flex items-center gap-2",
|
|
825
822
|
"data-testid": "add-new-webhook-pane-header",
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
title: t("neetoWebhooks.webhook.title")
|
|
835
|
-
})]
|
|
823
|
+
children: [editingWebhookId ? t("neetoWebhooks.webhook.edit") : t("neetoWebhooks.webhook.add"), /*#__PURE__*/jsxRuntime.jsx(HelpPopover, {
|
|
824
|
+
description: t("neetoWebhooks.webhook.helpDescription"),
|
|
825
|
+
helpLinkProps: {
|
|
826
|
+
href: webhooksHelpLink
|
|
827
|
+
},
|
|
828
|
+
title: t("neetoWebhooks.webhook.title")
|
|
829
|
+
})]
|
|
830
|
+
})
|
|
836
831
|
}), isLoading ? /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Sheet.Body, {
|
|
837
832
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
838
833
|
className: "flex items-center justify-center",
|
|
@@ -844,22 +839,26 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
844
839
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
845
840
|
className: "w-full space-y-4 md:space-y-6",
|
|
846
841
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
847
|
-
className: "mb-
|
|
842
|
+
className: "mb-4",
|
|
848
843
|
variant: "body2",
|
|
849
844
|
children: t("neetoWebhooks.webhook.postRequestIsSentToEndpointURL")
|
|
850
845
|
}), /*#__PURE__*/jsxRuntime.jsx(formik.Textarea, {
|
|
851
846
|
required: true,
|
|
847
|
+
className: "[&_textarea]:[field-sizing:content]!",
|
|
852
848
|
"data-testid": "endpoint-input-field",
|
|
853
849
|
label: t("neetoWebhooks.webhook.endpoint"),
|
|
854
850
|
name: "endpoint",
|
|
855
851
|
placeholder: t("neetoWebhooks.webhook.endpointPlaceholder"),
|
|
856
852
|
ref: endpointRef,
|
|
857
|
-
|
|
853
|
+
resize: "none",
|
|
854
|
+
size: "small"
|
|
858
855
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
859
856
|
className: "space-y-2",
|
|
860
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(
|
|
857
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
861
858
|
className: "flex items-center gap-x-2",
|
|
862
|
-
children: [
|
|
859
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Label, {
|
|
860
|
+
children: t("neetoWebhooks.webhook.secret")
|
|
861
|
+
}), /*#__PURE__*/jsxRuntime.jsx(HelpPopover, {
|
|
863
862
|
helpLinkProps: {
|
|
864
863
|
href: secretsHelpLink
|
|
865
864
|
},
|
|
@@ -922,9 +921,11 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
922
921
|
}), /*#__PURE__*/jsxRuntime.jsx(formik$1.ErrorMessage, {
|
|
923
922
|
name: "events",
|
|
924
923
|
render: function render(msg) {
|
|
925
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
926
|
-
className: "
|
|
924
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
925
|
+
className: "mt-1",
|
|
926
|
+
color: "destructive",
|
|
927
927
|
"data-testid": "event-error-text",
|
|
928
|
+
variant: "caption",
|
|
928
929
|
children: msg
|
|
929
930
|
});
|
|
930
931
|
}
|
|
@@ -979,8 +980,8 @@ var Header = reactUtils.withT(function (_ref) {
|
|
|
979
980
|
}, titleHelpPopoverProps)
|
|
980
981
|
}), neetoCist.isNotEmpty(webhooks) && /*#__PURE__*/jsxRuntime.jsx(SubHeader, {
|
|
981
982
|
leftActionBlock: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
982
|
-
as: "
|
|
983
|
-
variant: "
|
|
983
|
+
as: "h6",
|
|
984
|
+
variant: "h6",
|
|
984
985
|
children: t("neetoWebhooks.common.webhookWithCount", {
|
|
985
986
|
count: webhooks.length
|
|
986
987
|
})
|
|
@@ -1091,6 +1092,7 @@ var Webhooks = function Webhooks(_ref) {
|
|
|
1091
1092
|
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1092
1093
|
className: "flex justify-center items-center w-full h-full",
|
|
1093
1094
|
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Empty, {
|
|
1095
|
+
icon: lucideReact.Webhook,
|
|
1094
1096
|
title: t("neetoWebhooks.webhook.empty"),
|
|
1095
1097
|
description: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
|
|
1096
1098
|
href: webhooksHelpLink,
|
|
@@ -1155,6 +1157,12 @@ var NeetoWebhooks = function NeetoWebhooks(_ref) {
|
|
|
1155
1157
|
var _useRouteMatch = reactRouterDom.useRouteMatch(),
|
|
1156
1158
|
webhooksPath = _useRouteMatch.path,
|
|
1157
1159
|
webhooksUrl = _useRouteMatch.url;
|
|
1160
|
+
react.useEffect(function () {
|
|
1161
|
+
return main.validateEntityProps({
|
|
1162
|
+
entityId: entityId,
|
|
1163
|
+
entityType: entityType
|
|
1164
|
+
});
|
|
1165
|
+
}, [entityId, entityType]);
|
|
1158
1166
|
var deliveriesPath = main.getDeliveriesPath(webhooksUrl);
|
|
1159
1167
|
var deliveryDetailsPath = main.getDeliveryDetailsPath(deliveriesPath);
|
|
1160
1168
|
var helpLinks = ramda.mergeRight(main.HELP_LINK_URLS, helpLinkUrls);
|