@bigbinary/neeto-webhooks-frontend 2.2.1 → 2.2.3
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/NeetoWebhooks.js +41 -534
- package/dist/NeetoWebhooks.js.map +1 -1
- package/dist/cjs/NeetoWebhooks.js +116 -635
- package/dist/cjs/NeetoWebhooks.js.map +1 -1
- package/dist/cjs/index.js +5 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +104 -87
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var reactRouterDom = require('react-router-dom');
|
|
4
|
+
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
4
5
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
5
6
|
var constants = require('@bigbinary/neeto-commons-frontend/constants');
|
|
6
7
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
@@ -12,14 +13,18 @@ var NoData = require('@bigbinary/neetoui/NoData');
|
|
|
12
13
|
var Spinner = require('@bigbinary/neetoui/Spinner');
|
|
13
14
|
var Table = require('@bigbinary/neetoui/Table');
|
|
14
15
|
var reactI18next = require('react-i18next');
|
|
16
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
15
17
|
var reactQuery = require('@tanstack/react-query');
|
|
16
18
|
var reactQueryDevtools = require('@tanstack/react-query-devtools');
|
|
17
19
|
var jsxRuntime = require('react/jsx-runtime');
|
|
18
20
|
var axios = require('axios');
|
|
19
21
|
var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
|
|
22
|
+
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
23
|
+
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
20
24
|
var DateFormat = require('@bigbinary/neeto-molecules/DateFormat');
|
|
21
25
|
var Button = require('@bigbinary/neetoui/Button');
|
|
22
26
|
var Pane = require('@bigbinary/neetoui/Pane');
|
|
27
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
23
28
|
var react = require('react');
|
|
24
29
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
25
30
|
var Tab = require('@bigbinary/neetoui/Tab');
|
|
@@ -38,10 +43,7 @@ var Switch = require('@bigbinary/neetoui/formik/Switch');
|
|
|
38
43
|
var Textarea = require('@bigbinary/neetoui/formik/Textarea');
|
|
39
44
|
var yup = require('yup');
|
|
40
45
|
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
function _interopNamespace(e) {
|
|
44
|
-
if (e && e.__esModule) return e;
|
|
46
|
+
function _interopNamespaceDefault(e) {
|
|
45
47
|
var n = Object.create(null);
|
|
46
48
|
if (e) {
|
|
47
49
|
Object.keys(e).forEach(function (k) {
|
|
@@ -54,34 +56,11 @@ function _interopNamespace(e) {
|
|
|
54
56
|
}
|
|
55
57
|
});
|
|
56
58
|
}
|
|
57
|
-
n
|
|
59
|
+
n.default = e;
|
|
58
60
|
return Object.freeze(n);
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
var
|
|
62
|
-
var Header__default = /*#__PURE__*/_interopDefaultLegacy(Header$2);
|
|
63
|
-
var HelpPopover__default = /*#__PURE__*/_interopDefaultLegacy(HelpPopover);
|
|
64
|
-
var TableWrapper__default = /*#__PURE__*/_interopDefaultLegacy(TableWrapper);
|
|
65
|
-
var NoData__default = /*#__PURE__*/_interopDefaultLegacy(NoData);
|
|
66
|
-
var Spinner__default = /*#__PURE__*/_interopDefaultLegacy(Spinner);
|
|
67
|
-
var Table__default = /*#__PURE__*/_interopDefaultLegacy(Table);
|
|
68
|
-
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
69
|
-
var DateFormat__default = /*#__PURE__*/_interopDefaultLegacy(DateFormat);
|
|
70
|
-
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
71
|
-
var Pane__default = /*#__PURE__*/_interopDefaultLegacy(Pane);
|
|
72
|
-
var Typography__default = /*#__PURE__*/_interopDefaultLegacy(Typography);
|
|
73
|
-
var Tab__default = /*#__PURE__*/_interopDefaultLegacy(Tab);
|
|
74
|
-
var Tag__default = /*#__PURE__*/_interopDefaultLegacy(Tag);
|
|
75
|
-
var Alert__default = /*#__PURE__*/_interopDefaultLegacy(Alert);
|
|
76
|
-
var Plus__default = /*#__PURE__*/_interopDefaultLegacy(Plus);
|
|
77
|
-
var MoreDropdown__default = /*#__PURE__*/_interopDefaultLegacy(MoreDropdown);
|
|
78
|
-
var Input__default = /*#__PURE__*/_interopDefaultLegacy(Input);
|
|
79
|
-
var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form);
|
|
80
|
-
var ActionBlock__default = /*#__PURE__*/_interopDefaultLegacy(ActionBlock);
|
|
81
|
-
var Select__default = /*#__PURE__*/_interopDefaultLegacy(Select);
|
|
82
|
-
var Switch__default = /*#__PURE__*/_interopDefaultLegacy(Switch);
|
|
83
|
-
var Textarea__default = /*#__PURE__*/_interopDefaultLegacy(Textarea);
|
|
84
|
-
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
63
|
+
var yup__namespace = /*#__PURE__*/_interopNamespaceDefault(yup);
|
|
85
64
|
|
|
86
65
|
var getDeliveriesPath = function getDeliveriesPath(webhooksPath) {
|
|
87
66
|
return "".concat(webhooksPath, "/:webhookId/deliveries");
|
|
@@ -90,78 +69,6 @@ var getDeliveryDetailsPath = function getDeliveryDetailsPath(deliveriesPath) {
|
|
|
90
69
|
return "".concat(deliveriesPath, "/:deliveryId/");
|
|
91
70
|
};
|
|
92
71
|
|
|
93
|
-
function _arrayLikeToArray(arr, len) {
|
|
94
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
95
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
96
|
-
return arr2;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function _arrayWithoutHoles(arr) {
|
|
100
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function _iterableToArray(iter) {
|
|
104
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
108
|
-
if (!o) return;
|
|
109
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
110
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
111
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
112
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
113
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function _nonIterableSpread() {
|
|
117
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function _toConsumableArray(arr) {
|
|
121
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
function _typeof$1(o) {
|
|
125
|
-
"@babel/helpers - typeof";
|
|
126
|
-
|
|
127
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
128
|
-
return typeof o;
|
|
129
|
-
} : function (o) {
|
|
130
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
131
|
-
}, _typeof$1(o);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function _toPrimitive(input, hint) {
|
|
135
|
-
if (_typeof$1(input) !== "object" || input === null) return input;
|
|
136
|
-
var prim = input[Symbol.toPrimitive];
|
|
137
|
-
if (prim !== undefined) {
|
|
138
|
-
var res = prim.call(input, hint || "default");
|
|
139
|
-
if (_typeof$1(res) !== "object") return res;
|
|
140
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
141
|
-
}
|
|
142
|
-
return (hint === "string" ? String : Number)(input);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
function _toPropertyKey(arg) {
|
|
146
|
-
var key = _toPrimitive(arg, "string");
|
|
147
|
-
return _typeof$1(key) === "symbol" ? key : String(key);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function _defineProperty(obj, key, value) {
|
|
151
|
-
key = _toPropertyKey(key);
|
|
152
|
-
if (key in obj) {
|
|
153
|
-
Object.defineProperty(obj, key, {
|
|
154
|
-
value: value,
|
|
155
|
-
enumerable: true,
|
|
156
|
-
configurable: true,
|
|
157
|
-
writable: true
|
|
158
|
-
});
|
|
159
|
-
} else {
|
|
160
|
-
obj[key] = value;
|
|
161
|
-
}
|
|
162
|
-
return obj;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
72
|
var queryClient = new reactQuery.QueryClient({
|
|
166
73
|
queryCache: new reactQuery.QueryCache(),
|
|
167
74
|
defaultOptions: {
|
|
@@ -188,15 +95,15 @@ var withReactQuery = function withReactQuery(Component) {
|
|
|
188
95
|
|
|
189
96
|
var baseUrl$2 = "/webhooks";
|
|
190
97
|
var fetch$1 = function fetch(webhookId, params) {
|
|
191
|
-
return
|
|
98
|
+
return axios.get("".concat(baseUrl$2, "/webhooks/").concat(webhookId, "/deliveries"), {
|
|
192
99
|
params: params
|
|
193
100
|
});
|
|
194
101
|
};
|
|
195
102
|
var show$1 = function show(id, webhookId) {
|
|
196
|
-
return
|
|
103
|
+
return axios.get("".concat(baseUrl$2, "/webhooks/").concat(webhookId, "/deliveries/").concat(id));
|
|
197
104
|
};
|
|
198
105
|
var redeliver = function redeliver(delivery_id, webhookId) {
|
|
199
|
-
return
|
|
106
|
+
return axios.post("".concat(baseUrl$2, "/webhooks/").concat(webhookId, "/deliveries/").concat(delivery_id, "/redeliver"));
|
|
200
107
|
};
|
|
201
108
|
var deliveriesApi = {
|
|
202
109
|
fetch: fetch$1,
|
|
@@ -256,430 +163,6 @@ var HELP_LINK_URLS = {
|
|
|
256
163
|
deliveries: "https://help.".concat(initializers.globalProps.appName, ".com/articles/managing-webhook-deliveries")
|
|
257
164
|
};
|
|
258
165
|
|
|
259
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
260
|
-
try {
|
|
261
|
-
var info = gen[key](arg);
|
|
262
|
-
var value = info.value;
|
|
263
|
-
} catch (error) {
|
|
264
|
-
reject(error);
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
if (info.done) {
|
|
268
|
-
resolve(value);
|
|
269
|
-
} else {
|
|
270
|
-
Promise.resolve(value).then(_next, _throw);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
function _asyncToGenerator(fn) {
|
|
274
|
-
return function () {
|
|
275
|
-
var self = this,
|
|
276
|
-
args = arguments;
|
|
277
|
-
return new Promise(function (resolve, reject) {
|
|
278
|
-
var gen = fn.apply(self, args);
|
|
279
|
-
function _next(value) {
|
|
280
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
281
|
-
}
|
|
282
|
-
function _throw(err) {
|
|
283
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
284
|
-
}
|
|
285
|
-
_next(undefined);
|
|
286
|
-
});
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
function getDefaultExportFromCjs (x) {
|
|
291
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
var regeneratorRuntime$1 = {exports: {}};
|
|
295
|
-
|
|
296
|
-
var _typeof = {exports: {}};
|
|
297
|
-
|
|
298
|
-
_typeof.exports;
|
|
299
|
-
|
|
300
|
-
(function (module) {
|
|
301
|
-
function _typeof(o) {
|
|
302
|
-
"@babel/helpers - typeof";
|
|
303
|
-
|
|
304
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
305
|
-
return typeof o;
|
|
306
|
-
} : function (o) {
|
|
307
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
308
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
|
|
309
|
-
}
|
|
310
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
311
|
-
} (_typeof));
|
|
312
|
-
|
|
313
|
-
var _typeofExports = _typeof.exports;
|
|
314
|
-
|
|
315
|
-
regeneratorRuntime$1.exports;
|
|
316
|
-
|
|
317
|
-
(function (module) {
|
|
318
|
-
var _typeof = _typeofExports["default"];
|
|
319
|
-
function _regeneratorRuntime() {
|
|
320
|
-
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
321
|
-
return e;
|
|
322
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
323
|
-
var t,
|
|
324
|
-
e = {},
|
|
325
|
-
r = Object.prototype,
|
|
326
|
-
n = r.hasOwnProperty,
|
|
327
|
-
o = Object.defineProperty || function (t, e, r) {
|
|
328
|
-
t[e] = r.value;
|
|
329
|
-
},
|
|
330
|
-
i = "function" == typeof Symbol ? Symbol : {},
|
|
331
|
-
a = i.iterator || "@@iterator",
|
|
332
|
-
c = i.asyncIterator || "@@asyncIterator",
|
|
333
|
-
u = i.toStringTag || "@@toStringTag";
|
|
334
|
-
function define(t, e, r) {
|
|
335
|
-
return Object.defineProperty(t, e, {
|
|
336
|
-
value: r,
|
|
337
|
-
enumerable: !0,
|
|
338
|
-
configurable: !0,
|
|
339
|
-
writable: !0
|
|
340
|
-
}), t[e];
|
|
341
|
-
}
|
|
342
|
-
try {
|
|
343
|
-
define({}, "");
|
|
344
|
-
} catch (t) {
|
|
345
|
-
define = function define(t, e, r) {
|
|
346
|
-
return t[e] = r;
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
function wrap(t, e, r, n) {
|
|
350
|
-
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
351
|
-
a = Object.create(i.prototype),
|
|
352
|
-
c = new Context(n || []);
|
|
353
|
-
return o(a, "_invoke", {
|
|
354
|
-
value: makeInvokeMethod(t, r, c)
|
|
355
|
-
}), a;
|
|
356
|
-
}
|
|
357
|
-
function tryCatch(t, e, r) {
|
|
358
|
-
try {
|
|
359
|
-
return {
|
|
360
|
-
type: "normal",
|
|
361
|
-
arg: t.call(e, r)
|
|
362
|
-
};
|
|
363
|
-
} catch (t) {
|
|
364
|
-
return {
|
|
365
|
-
type: "throw",
|
|
366
|
-
arg: t
|
|
367
|
-
};
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
e.wrap = wrap;
|
|
371
|
-
var h = "suspendedStart",
|
|
372
|
-
l = "suspendedYield",
|
|
373
|
-
f = "executing",
|
|
374
|
-
s = "completed",
|
|
375
|
-
y = {};
|
|
376
|
-
function Generator() {}
|
|
377
|
-
function GeneratorFunction() {}
|
|
378
|
-
function GeneratorFunctionPrototype() {}
|
|
379
|
-
var p = {};
|
|
380
|
-
define(p, a, function () {
|
|
381
|
-
return this;
|
|
382
|
-
});
|
|
383
|
-
var d = Object.getPrototypeOf,
|
|
384
|
-
v = d && d(d(values([])));
|
|
385
|
-
v && v !== r && n.call(v, a) && (p = v);
|
|
386
|
-
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
387
|
-
function defineIteratorMethods(t) {
|
|
388
|
-
["next", "throw", "return"].forEach(function (e) {
|
|
389
|
-
define(t, e, function (t) {
|
|
390
|
-
return this._invoke(e, t);
|
|
391
|
-
});
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
function AsyncIterator(t, e) {
|
|
395
|
-
function invoke(r, o, i, a) {
|
|
396
|
-
var c = tryCatch(t[r], t, o);
|
|
397
|
-
if ("throw" !== c.type) {
|
|
398
|
-
var u = c.arg,
|
|
399
|
-
h = u.value;
|
|
400
|
-
return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
401
|
-
invoke("next", t, i, a);
|
|
402
|
-
}, function (t) {
|
|
403
|
-
invoke("throw", t, i, a);
|
|
404
|
-
}) : e.resolve(h).then(function (t) {
|
|
405
|
-
u.value = t, i(u);
|
|
406
|
-
}, function (t) {
|
|
407
|
-
return invoke("throw", t, i, a);
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
a(c.arg);
|
|
411
|
-
}
|
|
412
|
-
var r;
|
|
413
|
-
o(this, "_invoke", {
|
|
414
|
-
value: function value(t, n) {
|
|
415
|
-
function callInvokeWithMethodAndArg() {
|
|
416
|
-
return new e(function (e, r) {
|
|
417
|
-
invoke(t, n, e, r);
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
421
|
-
}
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
function makeInvokeMethod(e, r, n) {
|
|
425
|
-
var o = h;
|
|
426
|
-
return function (i, a) {
|
|
427
|
-
if (o === f) throw new Error("Generator is already running");
|
|
428
|
-
if (o === s) {
|
|
429
|
-
if ("throw" === i) throw a;
|
|
430
|
-
return {
|
|
431
|
-
value: t,
|
|
432
|
-
done: !0
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
for (n.method = i, n.arg = a;;) {
|
|
436
|
-
var c = n.delegate;
|
|
437
|
-
if (c) {
|
|
438
|
-
var u = maybeInvokeDelegate(c, n);
|
|
439
|
-
if (u) {
|
|
440
|
-
if (u === y) continue;
|
|
441
|
-
return u;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
445
|
-
if (o === h) throw o = s, n.arg;
|
|
446
|
-
n.dispatchException(n.arg);
|
|
447
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
448
|
-
o = f;
|
|
449
|
-
var p = tryCatch(e, r, n);
|
|
450
|
-
if ("normal" === p.type) {
|
|
451
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
452
|
-
return {
|
|
453
|
-
value: p.arg,
|
|
454
|
-
done: n.done
|
|
455
|
-
};
|
|
456
|
-
}
|
|
457
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
458
|
-
}
|
|
459
|
-
};
|
|
460
|
-
}
|
|
461
|
-
function maybeInvokeDelegate(e, r) {
|
|
462
|
-
var n = r.method,
|
|
463
|
-
o = e.iterator[n];
|
|
464
|
-
if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
465
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
466
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
467
|
-
var a = i.arg;
|
|
468
|
-
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
469
|
-
}
|
|
470
|
-
function pushTryEntry(t) {
|
|
471
|
-
var e = {
|
|
472
|
-
tryLoc: t[0]
|
|
473
|
-
};
|
|
474
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
475
|
-
}
|
|
476
|
-
function resetTryEntry(t) {
|
|
477
|
-
var e = t.completion || {};
|
|
478
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
479
|
-
}
|
|
480
|
-
function Context(t) {
|
|
481
|
-
this.tryEntries = [{
|
|
482
|
-
tryLoc: "root"
|
|
483
|
-
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
484
|
-
}
|
|
485
|
-
function values(e) {
|
|
486
|
-
if (e || "" === e) {
|
|
487
|
-
var r = e[a];
|
|
488
|
-
if (r) return r.call(e);
|
|
489
|
-
if ("function" == typeof e.next) return e;
|
|
490
|
-
if (!isNaN(e.length)) {
|
|
491
|
-
var o = -1,
|
|
492
|
-
i = function next() {
|
|
493
|
-
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
494
|
-
return next.value = t, next.done = !0, next;
|
|
495
|
-
};
|
|
496
|
-
return i.next = i;
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
throw new TypeError(_typeof(e) + " is not iterable");
|
|
500
|
-
}
|
|
501
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
502
|
-
value: GeneratorFunctionPrototype,
|
|
503
|
-
configurable: !0
|
|
504
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
505
|
-
value: GeneratorFunction,
|
|
506
|
-
configurable: !0
|
|
507
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
508
|
-
var e = "function" == typeof t && t.constructor;
|
|
509
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
510
|
-
}, e.mark = function (t) {
|
|
511
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
512
|
-
}, e.awrap = function (t) {
|
|
513
|
-
return {
|
|
514
|
-
__await: t
|
|
515
|
-
};
|
|
516
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
517
|
-
return this;
|
|
518
|
-
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
519
|
-
void 0 === i && (i = Promise);
|
|
520
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
521
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
522
|
-
return t.done ? t.value : a.next();
|
|
523
|
-
});
|
|
524
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
525
|
-
return this;
|
|
526
|
-
}), define(g, "toString", function () {
|
|
527
|
-
return "[object Generator]";
|
|
528
|
-
}), e.keys = function (t) {
|
|
529
|
-
var e = Object(t),
|
|
530
|
-
r = [];
|
|
531
|
-
for (var n in e) r.push(n);
|
|
532
|
-
return r.reverse(), function next() {
|
|
533
|
-
for (; r.length;) {
|
|
534
|
-
var t = r.pop();
|
|
535
|
-
if (t in e) return next.value = t, next.done = !1, next;
|
|
536
|
-
}
|
|
537
|
-
return next.done = !0, next;
|
|
538
|
-
};
|
|
539
|
-
}, e.values = values, Context.prototype = {
|
|
540
|
-
constructor: Context,
|
|
541
|
-
reset: function reset(e) {
|
|
542
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
543
|
-
},
|
|
544
|
-
stop: function stop() {
|
|
545
|
-
this.done = !0;
|
|
546
|
-
var t = this.tryEntries[0].completion;
|
|
547
|
-
if ("throw" === t.type) throw t.arg;
|
|
548
|
-
return this.rval;
|
|
549
|
-
},
|
|
550
|
-
dispatchException: function dispatchException(e) {
|
|
551
|
-
if (this.done) throw e;
|
|
552
|
-
var r = this;
|
|
553
|
-
function handle(n, o) {
|
|
554
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
555
|
-
}
|
|
556
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
557
|
-
var i = this.tryEntries[o],
|
|
558
|
-
a = i.completion;
|
|
559
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
560
|
-
if (i.tryLoc <= this.prev) {
|
|
561
|
-
var c = n.call(i, "catchLoc"),
|
|
562
|
-
u = n.call(i, "finallyLoc");
|
|
563
|
-
if (c && u) {
|
|
564
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
565
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
566
|
-
} else if (c) {
|
|
567
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
568
|
-
} else {
|
|
569
|
-
if (!u) throw new Error("try statement without catch or finally");
|
|
570
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
},
|
|
575
|
-
abrupt: function abrupt(t, e) {
|
|
576
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
577
|
-
var o = this.tryEntries[r];
|
|
578
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
579
|
-
var i = o;
|
|
580
|
-
break;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
584
|
-
var a = i ? i.completion : {};
|
|
585
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
586
|
-
},
|
|
587
|
-
complete: function complete(t, e) {
|
|
588
|
-
if ("throw" === t.type) throw t.arg;
|
|
589
|
-
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
590
|
-
},
|
|
591
|
-
finish: function finish(t) {
|
|
592
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
593
|
-
var r = this.tryEntries[e];
|
|
594
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
595
|
-
}
|
|
596
|
-
},
|
|
597
|
-
"catch": function _catch(t) {
|
|
598
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
599
|
-
var r = this.tryEntries[e];
|
|
600
|
-
if (r.tryLoc === t) {
|
|
601
|
-
var n = r.completion;
|
|
602
|
-
if ("throw" === n.type) {
|
|
603
|
-
var o = n.arg;
|
|
604
|
-
resetTryEntry(r);
|
|
605
|
-
}
|
|
606
|
-
return o;
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
throw new Error("illegal catch attempt");
|
|
610
|
-
},
|
|
611
|
-
delegateYield: function delegateYield(e, r, n) {
|
|
612
|
-
return this.delegate = {
|
|
613
|
-
iterator: values(e),
|
|
614
|
-
resultName: r,
|
|
615
|
-
nextLoc: n
|
|
616
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
617
|
-
}
|
|
618
|
-
}, e;
|
|
619
|
-
}
|
|
620
|
-
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
621
|
-
} (regeneratorRuntime$1));
|
|
622
|
-
|
|
623
|
-
var regeneratorRuntimeExports = regeneratorRuntime$1.exports;
|
|
624
|
-
|
|
625
|
-
// TODO(Babel 8): Remove this file.
|
|
626
|
-
|
|
627
|
-
var runtime = regeneratorRuntimeExports();
|
|
628
|
-
var regenerator = runtime;
|
|
629
|
-
|
|
630
|
-
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
631
|
-
try {
|
|
632
|
-
regeneratorRuntime = runtime;
|
|
633
|
-
} catch (accidentalStrictMode) {
|
|
634
|
-
if (typeof globalThis === "object") {
|
|
635
|
-
globalThis.regeneratorRuntime = runtime;
|
|
636
|
-
} else {
|
|
637
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
|
|
642
|
-
|
|
643
|
-
function _arrayWithHoles(arr) {
|
|
644
|
-
if (Array.isArray(arr)) return arr;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
function _iterableToArrayLimit(r, l) {
|
|
648
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
649
|
-
if (null != t) {
|
|
650
|
-
var e,
|
|
651
|
-
n,
|
|
652
|
-
i,
|
|
653
|
-
u,
|
|
654
|
-
a = [],
|
|
655
|
-
f = !0,
|
|
656
|
-
o = !1;
|
|
657
|
-
try {
|
|
658
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
659
|
-
if (Object(t) !== t) return;
|
|
660
|
-
f = !1;
|
|
661
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
662
|
-
} catch (r) {
|
|
663
|
-
o = !0, n = r;
|
|
664
|
-
} finally {
|
|
665
|
-
try {
|
|
666
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
667
|
-
} finally {
|
|
668
|
-
if (o) throw n;
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
return a;
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
function _nonIterableRest() {
|
|
676
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
function _slicedToArray(arr, i) {
|
|
680
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
681
|
-
}
|
|
682
|
-
|
|
683
166
|
var DELIVERY_TAB = {
|
|
684
167
|
response: "response",
|
|
685
168
|
request: "request"
|
|
@@ -722,7 +205,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
722
205
|
className: "flex w-full flex-col space-y-2 pb-4",
|
|
723
206
|
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
724
207
|
className: "flex items-center space-x-1",
|
|
725
|
-
children: [t("neetoWebhooks.delivery.sid"), ":", /*#__PURE__*/jsxRuntime.jsx(
|
|
208
|
+
children: [t("neetoWebhooks.delivery.sid"), ":", /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
726
209
|
className: "px-2 font-bold",
|
|
727
210
|
"data-cy": "delivery-sid",
|
|
728
211
|
style: "body2",
|
|
@@ -730,7 +213,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
730
213
|
})]
|
|
731
214
|
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
732
215
|
className: "flex items-center space-x-1",
|
|
733
|
-
children: [t("neetoWebhooks.delivery.deliveryId"), ":", /*#__PURE__*/jsxRuntime.jsx(
|
|
216
|
+
children: [t("neetoWebhooks.delivery.deliveryId"), ":", /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
734
217
|
className: "px-2 font-bold",
|
|
735
218
|
"data-cy": "delivery-identifier",
|
|
736
219
|
style: "body2",
|
|
@@ -738,24 +221,24 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
738
221
|
})]
|
|
739
222
|
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
740
223
|
className: "flex items-center",
|
|
741
|
-
children: [t("neetoWebhooks.common.responseStatus"), ":", /*#__PURE__*/jsxRuntime.jsx(
|
|
224
|
+
children: [t("neetoWebhooks.common.responseStatus"), ":", /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
742
225
|
className: "px-2 font-bold",
|
|
743
226
|
"data-cy": "delivery-response-code",
|
|
744
227
|
style: "body2",
|
|
745
228
|
children: responseStatusCode
|
|
746
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
229
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Tag, {
|
|
747
230
|
style: status === "success" ? "success" : "warning",
|
|
748
231
|
children: status
|
|
749
232
|
})]
|
|
750
233
|
})]
|
|
751
|
-
}), /*#__PURE__*/jsxRuntime.jsxs(
|
|
752
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
234
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(Tab, {
|
|
235
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Tab.Item, {
|
|
753
236
|
active: activeHeader === DELIVERY_TAB.request,
|
|
754
237
|
onClick: function onClick() {
|
|
755
238
|
return setActiveHeader(DELIVERY_TAB.request);
|
|
756
239
|
},
|
|
757
240
|
children: t("neetoWebhooks.delivery.request")
|
|
758
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
241
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Tab.Item, {
|
|
759
242
|
active: activeHeader === DELIVERY_TAB.response,
|
|
760
243
|
onClick: function onClick() {
|
|
761
244
|
return setActiveHeader(DELIVERY_TAB.response);
|
|
@@ -768,7 +251,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
768
251
|
children: activeHeader === DELIVERY_TAB.request ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
769
252
|
className: "space-y-4",
|
|
770
253
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
771
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
254
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
772
255
|
style: "h5",
|
|
773
256
|
children: t("neetoWebhooks.delivery.header")
|
|
774
257
|
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
@@ -776,7 +259,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
776
259
|
children: delivery.requestHeader
|
|
777
260
|
})]
|
|
778
261
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
779
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
262
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
780
263
|
style: "h5",
|
|
781
264
|
children: t("neetoWebhooks.delivery.payload")
|
|
782
265
|
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
@@ -787,7 +270,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
787
270
|
}) : /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
788
271
|
className: "space-y-4",
|
|
789
272
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
790
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
273
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
791
274
|
style: "h5",
|
|
792
275
|
children: t("neetoWebhooks.delivery.header")
|
|
793
276
|
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
@@ -795,7 +278,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
795
278
|
children: delivery.responseHeader
|
|
796
279
|
})]
|
|
797
280
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
798
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
281
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
799
282
|
style: "h5",
|
|
800
283
|
children: t("neetoWebhooks.delivery.body")
|
|
801
284
|
}), /*#__PURE__*/jsxRuntime.jsx(Snippet, {
|
|
@@ -823,7 +306,7 @@ var Details = function Details(_ref) {
|
|
|
823
306
|
_useShowDelivery$data2 = _useShowDelivery$data === void 0 ? {} : _useShowDelivery$data,
|
|
824
307
|
delivery = _useShowDelivery$data2.delivery;
|
|
825
308
|
var handleRedeliverClick = /*#__PURE__*/function () {
|
|
826
|
-
var _ref2 = _asyncToGenerator(
|
|
309
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
827
310
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
828
311
|
while (1) switch (_context.prev = _context.next) {
|
|
829
312
|
case 0:
|
|
@@ -839,18 +322,18 @@ var Details = function Details(_ref) {
|
|
|
839
322
|
return _ref2.apply(this, arguments);
|
|
840
323
|
};
|
|
841
324
|
}();
|
|
842
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
325
|
+
return /*#__PURE__*/jsxRuntime.jsx(Pane, {
|
|
843
326
|
onClose: onClose,
|
|
844
327
|
isOpen: neetoCist.isPresent(deliveryId),
|
|
845
328
|
size: "large",
|
|
846
329
|
children: /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
847
330
|
children: isLoading ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
848
331
|
className: "flex h-full w-full items-center justify-center",
|
|
849
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
332
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Spinner, {})
|
|
850
333
|
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
851
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
334
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Pane.Header, {
|
|
852
335
|
children: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
853
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
336
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DateFormat.Date, {
|
|
854
337
|
date: delivery.createdAt,
|
|
855
338
|
tooltipProps: {
|
|
856
339
|
disabled: true
|
|
@@ -861,7 +344,7 @@ var Details = function Details(_ref) {
|
|
|
861
344
|
}
|
|
862
345
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
863
346
|
children: " \u2022 "
|
|
864
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
347
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DateFormat.Time, {
|
|
865
348
|
date: delivery.createdAt,
|
|
866
349
|
tooltipProps: {
|
|
867
350
|
disabled: true
|
|
@@ -872,19 +355,19 @@ var Details = function Details(_ref) {
|
|
|
872
355
|
}
|
|
873
356
|
})]
|
|
874
357
|
})
|
|
875
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
358
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Pane.Body, {
|
|
876
359
|
children: neetoCist.isPresent(delivery) && /*#__PURE__*/jsxRuntime.jsx(TransactionDetails, {
|
|
877
360
|
delivery: delivery
|
|
878
361
|
})
|
|
879
|
-
}), /*#__PURE__*/jsxRuntime.jsxs(
|
|
362
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(Pane.Footer, {
|
|
880
363
|
className: "gap-x-2",
|
|
881
|
-
children: [(delivery === null || delivery === void 0 ? void 0 : delivery.eventId) && /*#__PURE__*/jsxRuntime.jsx(
|
|
364
|
+
children: [(delivery === null || delivery === void 0 ? void 0 : delivery.eventId) && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
882
365
|
disabled: isRedelivering,
|
|
883
366
|
label: t("neetoWebhooks.delivery.redeliver"),
|
|
884
367
|
loading: isRedelivering,
|
|
885
368
|
style: "primary",
|
|
886
369
|
onClick: handleRedeliverClick
|
|
887
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
370
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
888
371
|
label: t("neetoWebhooks.buttons.cancel"),
|
|
889
372
|
style: "text",
|
|
890
373
|
onClick: onClose
|
|
@@ -905,14 +388,14 @@ var buildColumns$1 = function buildColumns(_ref) {
|
|
|
905
388
|
render: function render(_, delivery) {
|
|
906
389
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
907
390
|
className: "flex items-center gap-x-3",
|
|
908
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
391
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
909
392
|
style: "link",
|
|
910
393
|
to: utils.buildUrl(deliveryDetailsPath, {
|
|
911
394
|
deliveryId: delivery.sid
|
|
912
395
|
}),
|
|
913
396
|
weight: "semibold",
|
|
914
397
|
children: delivery.identifier
|
|
915
|
-
}), delivery.redelivery && /*#__PURE__*/jsxRuntime.jsx(
|
|
398
|
+
}), delivery.redelivery && /*#__PURE__*/jsxRuntime.jsx(Tag, {
|
|
916
399
|
style: "info",
|
|
917
400
|
children: i18next.t("neetoWebhooks.delivery.redelivery")
|
|
918
401
|
})]
|
|
@@ -926,8 +409,8 @@ var buildColumns$1 = function buildColumns(_ref) {
|
|
|
926
409
|
render: function render(createdAt) {
|
|
927
410
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
928
411
|
className: "flex items-center justify-between space-x-1",
|
|
929
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
930
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
412
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
413
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DateFormat.DateTime, {
|
|
931
414
|
date: createdAt
|
|
932
415
|
})
|
|
933
416
|
})
|
|
@@ -942,11 +425,11 @@ var buildColumns$1 = function buildColumns(_ref) {
|
|
|
942
425
|
status = _ref2.status;
|
|
943
426
|
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
944
427
|
className: "flex items-center",
|
|
945
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
428
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
946
429
|
className: "px-2",
|
|
947
430
|
style: "body2",
|
|
948
431
|
children: responseStatusCode
|
|
949
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
432
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Tag, {
|
|
950
433
|
style: status === "success" ? "success" : "warning",
|
|
951
434
|
children: status
|
|
952
435
|
})]
|
|
@@ -1001,16 +484,16 @@ var Deliveries = function Deliveries(_ref) {
|
|
|
1001
484
|
if (isLoading) {
|
|
1002
485
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1003
486
|
className: "flex h-full w-full items-center justify-center",
|
|
1004
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
487
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Spinner, {})
|
|
1005
488
|
});
|
|
1006
489
|
}
|
|
1007
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
490
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
1008
491
|
className: "w-full",
|
|
1009
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
492
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Header$2, {
|
|
1010
493
|
breadcrumbs: breadcrumbs,
|
|
1011
494
|
title: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1012
495
|
className: "flex items-center gap-x-2",
|
|
1013
|
-
children: [t("neetoWebhooks.delivery.title"), /*#__PURE__*/jsxRuntime.jsx(
|
|
496
|
+
children: [t("neetoWebhooks.delivery.title"), /*#__PURE__*/jsxRuntime.jsx(HelpPopover, {
|
|
1014
497
|
description: t("neetoWebhooks.delivery.helpDescription"),
|
|
1015
498
|
helpLinkProps: {
|
|
1016
499
|
href: HELP_LINK_URLS.deliveries
|
|
@@ -1018,9 +501,9 @@ var Deliveries = function Deliveries(_ref) {
|
|
|
1018
501
|
title: t("neetoWebhooks.delivery.title")
|
|
1019
502
|
})]
|
|
1020
503
|
})
|
|
1021
|
-
}), neetoCist.isNotEmpty(deliveries) ? /*#__PURE__*/jsxRuntime.jsx(
|
|
504
|
+
}), neetoCist.isNotEmpty(deliveries) ? /*#__PURE__*/jsxRuntime.jsx(TableWrapper, {
|
|
1022
505
|
hasPagination: totalCount > constants.DEFAULT_PAGE_SIZE,
|
|
1023
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
506
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Table, {
|
|
1024
507
|
totalCount: totalCount,
|
|
1025
508
|
fixedHeight: true,
|
|
1026
509
|
columnData: buildColumns$1({
|
|
@@ -1033,7 +516,7 @@ var Deliveries = function Deliveries(_ref) {
|
|
|
1033
516
|
})
|
|
1034
517
|
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1035
518
|
className: "flex h-full w-full items-center justify-center",
|
|
1036
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
519
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NoData, {
|
|
1037
520
|
description: t("neetoWebhooks.delivery.empty.description"),
|
|
1038
521
|
title: t("neetoWebhooks.delivery.empty.title")
|
|
1039
522
|
})
|
|
@@ -1050,25 +533,25 @@ var Deliveries$1 = withReactQuery(Deliveries);
|
|
|
1050
533
|
|
|
1051
534
|
var baseUrl$1 = "/webhooks/webhooks";
|
|
1052
535
|
var fetch = function fetch(params) {
|
|
1053
|
-
return
|
|
536
|
+
return axios.get(baseUrl$1, {
|
|
1054
537
|
params: params
|
|
1055
538
|
});
|
|
1056
539
|
};
|
|
1057
540
|
var create = function create(payload) {
|
|
1058
|
-
return
|
|
541
|
+
return axios.post(baseUrl$1, {
|
|
1059
542
|
webhook: payload
|
|
1060
543
|
});
|
|
1061
544
|
};
|
|
1062
545
|
var show = function show(id) {
|
|
1063
|
-
return
|
|
546
|
+
return axios.get("".concat(baseUrl$1, "/").concat(id));
|
|
1064
547
|
};
|
|
1065
548
|
var update = function update(id, payload) {
|
|
1066
|
-
return
|
|
549
|
+
return axios.put("".concat(baseUrl$1, "/").concat(id), {
|
|
1067
550
|
webhook: payload
|
|
1068
551
|
});
|
|
1069
552
|
};
|
|
1070
553
|
var destroy = function destroy(id) {
|
|
1071
|
-
return
|
|
554
|
+
return axios["delete"]("".concat(baseUrl$1, "/").concat(id));
|
|
1072
555
|
};
|
|
1073
556
|
var webhooksApi = {
|
|
1074
557
|
fetch: fetch,
|
|
@@ -1092,7 +575,7 @@ var useCreateWebhook = function useCreateWebhook(options) {
|
|
|
1092
575
|
keysToInvalidate: [[QUERY_KEYS.WEBHOOK_LIST]],
|
|
1093
576
|
onSuccess: function onSuccess() {
|
|
1094
577
|
var _options$onSuccess;
|
|
1095
|
-
options === null || options === void 0
|
|
578
|
+
options === null || options === void 0 ? void 0 : (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 ? void 0 : _options$onSuccess.call(options);
|
|
1096
579
|
}
|
|
1097
580
|
});
|
|
1098
581
|
};
|
|
@@ -1115,7 +598,7 @@ var useUpdateWebhook = function useUpdateWebhook(id, options) {
|
|
|
1115
598
|
keysToInvalidate: [[QUERY_KEYS.WEBHOOK_LIST], [QUERY_KEYS.WEBHOOK_DETAILS, id], [QUERY_KEYS.DELIVERY_LIST, id]],
|
|
1116
599
|
onSuccess: function onSuccess() {
|
|
1117
600
|
var _options$onSuccess2;
|
|
1118
|
-
options === null || options === void 0
|
|
601
|
+
options === null || options === void 0 ? void 0 : (_options$onSuccess2 = options.onSuccess) === null || _options$onSuccess2 === void 0 ? void 0 : _options$onSuccess2.call(options);
|
|
1119
602
|
}
|
|
1120
603
|
});
|
|
1121
604
|
};
|
|
@@ -1124,14 +607,14 @@ var useDestroyWebhook = function useDestroyWebhook(options) {
|
|
|
1124
607
|
keysToInvalidate: [[QUERY_KEYS.WEBHOOK_LIST]],
|
|
1125
608
|
onSuccess: function onSuccess() {
|
|
1126
609
|
var _options$onSuccess3;
|
|
1127
|
-
options === null || options === void 0
|
|
610
|
+
options === null || options === void 0 ? void 0 : (_options$onSuccess3 = options.onSuccess) === null || _options$onSuccess3 === void 0 ? void 0 : _options$onSuccess3.call(options);
|
|
1128
611
|
}
|
|
1129
612
|
});
|
|
1130
613
|
};
|
|
1131
614
|
|
|
1132
615
|
var baseUrl = "/webhooks/events/all";
|
|
1133
616
|
var all = function all() {
|
|
1134
|
-
return
|
|
617
|
+
return axios.get(baseUrl);
|
|
1135
618
|
};
|
|
1136
619
|
var eventsApi = {
|
|
1137
620
|
all: all
|
|
@@ -1148,13 +631,14 @@ var useFetchEvents = function useFetchEvents() {
|
|
|
1148
631
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
1149
632
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
1150
633
|
// generators (like Math.random()).
|
|
1151
|
-
|
|
1152
|
-
|
|
634
|
+
var getRandomValues;
|
|
635
|
+
var rnds8 = new Uint8Array(16);
|
|
1153
636
|
function rng() {
|
|
1154
637
|
// lazy load so that environments that need to polyfill have a chance to do so
|
|
1155
638
|
if (!getRandomValues) {
|
|
1156
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
1157
|
-
|
|
639
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
640
|
+
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
641
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
1158
642
|
|
|
1159
643
|
if (!getRandomValues) {
|
|
1160
644
|
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
@@ -1164,50 +648,48 @@ function rng() {
|
|
|
1164
648
|
return getRandomValues(rnds8);
|
|
1165
649
|
}
|
|
1166
650
|
|
|
651
|
+
var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
652
|
+
|
|
653
|
+
function validate(uuid) {
|
|
654
|
+
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
655
|
+
}
|
|
656
|
+
|
|
1167
657
|
/**
|
|
1168
658
|
* Convert array of 16 byte values to UUID string format of the form:
|
|
1169
659
|
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
1170
660
|
*/
|
|
1171
661
|
|
|
1172
|
-
|
|
662
|
+
var byteToHex = [];
|
|
1173
663
|
|
|
1174
|
-
for (
|
|
1175
|
-
byteToHex.push((i + 0x100).toString(16).
|
|
664
|
+
for (var i = 0; i < 256; ++i) {
|
|
665
|
+
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
1176
666
|
}
|
|
1177
667
|
|
|
1178
|
-
function
|
|
668
|
+
function stringify(arr) {
|
|
669
|
+
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1179
670
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
1180
671
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
1181
|
-
|
|
1182
|
-
|
|
672
|
+
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
673
|
+
// of the following:
|
|
674
|
+
// - One or more input array values don't map to a hex octet (leading to
|
|
675
|
+
// "undefined" in the uuid)
|
|
676
|
+
// - Invalid input values for the RFC `version` or `variant` fields
|
|
677
|
+
|
|
678
|
+
if (!validate(uuid)) {
|
|
679
|
+
throw TypeError('Stringified UUID is invalid');
|
|
680
|
+
}
|
|
1183
681
|
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
randomUUID
|
|
1187
|
-
};
|
|
682
|
+
return uuid;
|
|
683
|
+
}
|
|
1188
684
|
|
|
1189
685
|
function v4(options, buf, offset) {
|
|
1190
|
-
if (native.randomUUID && !buf && !options) {
|
|
1191
|
-
return native.randomUUID();
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
686
|
options = options || {};
|
|
1195
|
-
|
|
687
|
+
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
1196
688
|
|
|
1197
689
|
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
1198
690
|
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
1199
691
|
|
|
1200
|
-
|
|
1201
|
-
offset = offset || 0;
|
|
1202
|
-
|
|
1203
|
-
for (let i = 0; i < 16; ++i) {
|
|
1204
|
-
buf[offset + i] = rnds[i];
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
return buf;
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
return unsafeStringify(rnds);
|
|
692
|
+
return stringify(rnds);
|
|
1211
693
|
}
|
|
1212
694
|
|
|
1213
695
|
var MENU_ITEMS = {
|
|
@@ -1281,13 +763,13 @@ var buildColumns = function buildColumns(_ref6) {
|
|
|
1281
763
|
render: function render(endpoint, webhook) {
|
|
1282
764
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1283
765
|
className: "flex items-center justify-between space-x-3",
|
|
1284
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
766
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1285
767
|
style: "link",
|
|
1286
768
|
to: utils.buildUrl(deliveriesPath, {
|
|
1287
769
|
webhookId: webhook.sid
|
|
1288
770
|
}),
|
|
1289
771
|
children: endpoint
|
|
1290
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
772
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MoreDropdown, {
|
|
1291
773
|
dropdownProps: {
|
|
1292
774
|
strategy: "fixed"
|
|
1293
775
|
},
|
|
@@ -1316,8 +798,7 @@ var buildColumns = function buildColumns(_ref6) {
|
|
|
1316
798
|
key: "events",
|
|
1317
799
|
render: function render(events) {
|
|
1318
800
|
return ramda.pluck("label", events).sort().join(", ");
|
|
1319
|
-
}
|
|
1320
|
-
width: 400
|
|
801
|
+
}
|
|
1321
802
|
}];
|
|
1322
803
|
};
|
|
1323
804
|
var generateRandomSecret = function generateRandomSecret() {
|
|
@@ -1343,7 +824,7 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1343
824
|
var _useCreateWebhook = useCreateWebhook({
|
|
1344
825
|
onSuccess: function onSuccess() {
|
|
1345
826
|
onClose();
|
|
1346
|
-
onCreate === null || onCreate === void 0
|
|
827
|
+
onCreate === null || onCreate === void 0 ? void 0 : onCreate();
|
|
1347
828
|
}
|
|
1348
829
|
}),
|
|
1349
830
|
createWebhook = _useCreateWebhook.mutate;
|
|
@@ -1399,25 +880,25 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1399
880
|
setIsSecretInputFieldVisible(true);
|
|
1400
881
|
}
|
|
1401
882
|
}, [webhook]);
|
|
1402
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
883
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Pane, {
|
|
1403
884
|
isOpen: isOpen,
|
|
1404
885
|
onClose: onClose,
|
|
1405
886
|
initialFocusRef: endpointRef,
|
|
1406
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(
|
|
887
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(Pane.Header, {
|
|
1407
888
|
className: "flex items-center gap-x-2",
|
|
1408
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
889
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1409
890
|
"data-cy": "add-new-webhook-pane-header",
|
|
1410
891
|
style: "h2",
|
|
1411
892
|
weight: "semibold",
|
|
1412
893
|
children: editingWebhookId ? t("neetoWebhooks.webhook.edit") : t("neetoWebhooks.webhook.add")
|
|
1413
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
894
|
+
}), /*#__PURE__*/jsxRuntime.jsx(HelpPopover, {
|
|
1414
895
|
description: t("neetoWebhooks.webhook.helpDescription"),
|
|
1415
896
|
helpLinkProps: {
|
|
1416
897
|
href: HELP_LINK_URLS.webhook
|
|
1417
898
|
},
|
|
1418
899
|
title: t("neetoWebhooks.webhook.title")
|
|
1419
900
|
})]
|
|
1420
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
901
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Form, {
|
|
1421
902
|
formikProps: {
|
|
1422
903
|
enableReinitialize: true,
|
|
1423
904
|
validationSchema: getValidationSchema(webhooks),
|
|
@@ -1430,12 +911,12 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1430
911
|
var setFieldValue = _ref2.setFieldValue;
|
|
1431
912
|
return isLoading ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1432
913
|
className: "flex items-center justify-center",
|
|
1433
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
914
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Spinner, {})
|
|
1434
915
|
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1435
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
916
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Pane.Body, {
|
|
1436
917
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1437
918
|
className: "w-full space-y-4",
|
|
1438
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
919
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Textarea, {
|
|
1439
920
|
required: true,
|
|
1440
921
|
"data-cy": "endpoint-input-field",
|
|
1441
922
|
label: t("neetoWebhooks.webhook.endpoint"),
|
|
@@ -1443,7 +924,7 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1443
924
|
placeholder: t("neetoWebhooks.webhook.endpointPlaceholder"),
|
|
1444
925
|
ref: endpointRef,
|
|
1445
926
|
rows: 1
|
|
1446
|
-
}), !isLoading && /*#__PURE__*/jsxRuntime.jsx(
|
|
927
|
+
}), !isLoading && /*#__PURE__*/jsxRuntime.jsx(Select, {
|
|
1447
928
|
isMulti: true,
|
|
1448
929
|
required: true,
|
|
1449
930
|
getOptionLabel: ramda.prop("label"),
|
|
@@ -1454,12 +935,12 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1454
935
|
placeholder: t("neetoWebhooks.webhook.eventPlaceholder")
|
|
1455
936
|
}), isSecretInputFieldVisible && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1456
937
|
className: "flex items-center justify-between space-x-3",
|
|
1457
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
938
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Input, {
|
|
1458
939
|
"data-cy": "secret-key-input-field",
|
|
1459
940
|
name: "secret",
|
|
1460
941
|
label: /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1461
942
|
className: "flex items-center gap-x-2",
|
|
1462
|
-
children: [t("neetoWebhooks.webhook.secret"), /*#__PURE__*/jsxRuntime.jsx(
|
|
943
|
+
children: [t("neetoWebhooks.webhook.secret"), /*#__PURE__*/jsxRuntime.jsx(HelpPopover, {
|
|
1463
944
|
helpLinkProps: {
|
|
1464
945
|
href: HELP_LINK_URLS.secrets
|
|
1465
946
|
},
|
|
@@ -1470,7 +951,7 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1470
951
|
placeholder: t("neetoWebhooks.webhook.secretPlaceholder")
|
|
1471
952
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1472
953
|
className: "mt-6",
|
|
1473
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
954
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MoreDropdown, {
|
|
1474
955
|
menuItems: [{
|
|
1475
956
|
key: "regenerate-secret",
|
|
1476
957
|
label: t("neetoWebhooks.buttons.regenerate"),
|
|
@@ -1488,12 +969,12 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1488
969
|
}]
|
|
1489
970
|
})
|
|
1490
971
|
})]
|
|
1491
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
972
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Switch, {
|
|
1492
973
|
label: t("neetoWebhooks.webhook.active"),
|
|
1493
974
|
name: "isActive"
|
|
1494
|
-
}), !isSecretInputFieldVisible && /*#__PURE__*/jsxRuntime.jsx(
|
|
975
|
+
}), !isSecretInputFieldVisible && /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1495
976
|
"data-cy": "add-secret-key",
|
|
1496
|
-
icon:
|
|
977
|
+
icon: Plus,
|
|
1497
978
|
label: t("neetoWebhooks.buttons.addSecretKey"),
|
|
1498
979
|
style: "text",
|
|
1499
980
|
onClick: function onClick() {
|
|
@@ -1501,8 +982,8 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1501
982
|
}
|
|
1502
983
|
})]
|
|
1503
984
|
})
|
|
1504
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
1505
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
985
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Pane.Footer, {
|
|
986
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ActionBlock, {
|
|
1506
987
|
cancelButtonProps: {
|
|
1507
988
|
onClick: onClose
|
|
1508
989
|
}
|
|
@@ -1521,10 +1002,10 @@ var Header = reactUtils.withT(function (_ref) {
|
|
|
1521
1002
|
setIsAddWebhookPaneOpen = _ref.setIsAddWebhookPaneOpen,
|
|
1522
1003
|
headerSize = _ref.headerSize;
|
|
1523
1004
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1524
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
1005
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Header$2, {
|
|
1525
1006
|
breadcrumbs: breadcrumbs,
|
|
1526
1007
|
size: headerSize,
|
|
1527
|
-
actionBlock: /*#__PURE__*/jsxRuntime.jsx(
|
|
1008
|
+
actionBlock: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1528
1009
|
"data-cy": "add-new-webhook-button",
|
|
1529
1010
|
label: t("neetoWebhooks.webhook.add"),
|
|
1530
1011
|
onClick: function onClick() {
|
|
@@ -1533,7 +1014,7 @@ var Header = reactUtils.withT(function (_ref) {
|
|
|
1533
1014
|
}),
|
|
1534
1015
|
title: title || /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1535
1016
|
className: "flex items-center gap-x-2",
|
|
1536
|
-
children: [t("neetoWebhooks.webhook.title"), /*#__PURE__*/jsxRuntime.jsx(
|
|
1017
|
+
children: [t("neetoWebhooks.webhook.title"), /*#__PURE__*/jsxRuntime.jsx(HelpPopover, {
|
|
1537
1018
|
description: t("neetoWebhooks.webhook.helpDescription"),
|
|
1538
1019
|
helpLinkProps: {
|
|
1539
1020
|
href: HELP_LINK_URLS.webhook
|
|
@@ -1541,7 +1022,7 @@ var Header = reactUtils.withT(function (_ref) {
|
|
|
1541
1022
|
title: t("neetoWebhooks.webhook.title")
|
|
1542
1023
|
})]
|
|
1543
1024
|
})
|
|
1544
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
1025
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1545
1026
|
className: "mb-3",
|
|
1546
1027
|
"data-cy": "webhook-description-header",
|
|
1547
1028
|
style: "h5",
|
|
@@ -1600,7 +1081,7 @@ var Webhooks = function Webhooks(_ref) {
|
|
|
1600
1081
|
var _useDestroyWebhook = useDestroyWebhook({
|
|
1601
1082
|
onSuccess: function onSuccess() {
|
|
1602
1083
|
setIsDeleteAlertOpen(false);
|
|
1603
|
-
onDelete === null || onDelete === void 0
|
|
1084
|
+
onDelete === null || onDelete === void 0 ? void 0 : onDelete();
|
|
1604
1085
|
}
|
|
1605
1086
|
}),
|
|
1606
1087
|
isDeleting = _useDestroyWebhook.isPending,
|
|
@@ -1620,19 +1101,19 @@ var Webhooks = function Webhooks(_ref) {
|
|
|
1620
1101
|
if (isLoading) {
|
|
1621
1102
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1622
1103
|
className: "flex h-full w-full items-center justify-center",
|
|
1623
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
1104
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Spinner, {})
|
|
1624
1105
|
});
|
|
1625
1106
|
}
|
|
1626
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
1107
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
1627
1108
|
className: containerClassName,
|
|
1628
1109
|
children: [/*#__PURE__*/jsxRuntime.jsx(Header$1, {
|
|
1629
1110
|
breadcrumbs: breadcrumbs,
|
|
1630
1111
|
headerSize: headerSize,
|
|
1631
1112
|
setIsAddWebhookPaneOpen: setIsAddWebhookPaneOpen,
|
|
1632
1113
|
title: title
|
|
1633
|
-
}), neetoCist.isNotEmpty(webhooks) ? /*#__PURE__*/jsxRuntime.jsx(
|
|
1114
|
+
}), neetoCist.isNotEmpty(webhooks) ? /*#__PURE__*/jsxRuntime.jsx(TableWrapper, {
|
|
1634
1115
|
hasPagination: totalCount > constants.DEFAULT_PAGE_SIZE,
|
|
1635
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
1116
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Table, {
|
|
1636
1117
|
totalCount: totalCount,
|
|
1637
1118
|
fixedHeight: true,
|
|
1638
1119
|
currentPageNumber: page,
|
|
@@ -1647,9 +1128,9 @@ var Webhooks = function Webhooks(_ref) {
|
|
|
1647
1128
|
})
|
|
1648
1129
|
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1649
1130
|
className: "flex h-full w-full items-center justify-center",
|
|
1650
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
1131
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NoData, {
|
|
1651
1132
|
title: t("neetoWebhooks.webhook.empty"),
|
|
1652
|
-
helpText: /*#__PURE__*/jsxRuntime.jsx(
|
|
1133
|
+
helpText: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
1653
1134
|
href: HELP_LINK_URLS.webhook,
|
|
1654
1135
|
label: t("neetoWebhooks.webhook.emptyHelpText"),
|
|
1655
1136
|
rel: "noreferrer",
|
|
@@ -1671,7 +1152,7 @@ var Webhooks = function Webhooks(_ref) {
|
|
|
1671
1152
|
webhooks: webhooks,
|
|
1672
1153
|
isOpen: isAddWebhookPaneOpen,
|
|
1673
1154
|
onClose: handlePaneClose
|
|
1674
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
1155
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Alert, {
|
|
1675
1156
|
isOpen: isDeleteAlertOpen,
|
|
1676
1157
|
isSubmitting: isDeleting,
|
|
1677
1158
|
submitButtonLabel: t("neetoWebhooks.buttons.delete"),
|