@bigbinary/neeto-webhooks-frontend 2.2.0 → 2.2.2
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 +55 -537
- package/dist/NeetoWebhooks.js.map +1 -1
- package/dist/cjs/NeetoWebhooks.js +127 -636
- package/dist/cjs/NeetoWebhooks.js.map +1 -1
- package/dist/cjs/index.js +6 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +104 -88
package/dist/NeetoWebhooks.js
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
import { useRouteMatch, useHistory, useParams, Switch as Switch$1, Route } from 'react-router-dom';
|
|
2
|
+
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
2
3
|
import { isPresent, removeBy, isNotEmpty, removeById, findBy } from '@bigbinary/neeto-cist';
|
|
3
4
|
import { DEFAULT_STALE_TIME, SINGULAR, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX, PLURAL } from '@bigbinary/neeto-commons-frontend/constants';
|
|
4
5
|
import { useQueryParams, useMutationWithInvalidation, withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
5
6
|
import Container from '@bigbinary/neeto-molecules/Container';
|
|
6
7
|
import Header$2 from '@bigbinary/neeto-molecules/Header';
|
|
7
8
|
import HelpPopover from '@bigbinary/neeto-molecules/HelpPopover';
|
|
8
|
-
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
9
9
|
import TableWrapper from '@bigbinary/neeto-molecules/TableWrapper';
|
|
10
10
|
import NoData from '@bigbinary/neetoui/NoData';
|
|
11
|
+
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
11
12
|
import Table from '@bigbinary/neetoui/Table';
|
|
12
13
|
import { useTranslation } from 'react-i18next';
|
|
14
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
13
15
|
import { QueryClient, QueryCache, QueryClientProvider, useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
14
16
|
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
|
15
17
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
16
18
|
import axios from 'axios';
|
|
17
19
|
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
20
|
+
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
21
|
+
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
18
22
|
import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
|
|
19
23
|
import Button from '@bigbinary/neetoui/Button';
|
|
20
24
|
import Pane from '@bigbinary/neetoui/Pane';
|
|
25
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
21
26
|
import { useState, useRef, useEffect, memo, useCallback } from 'react';
|
|
22
27
|
import Typography from '@bigbinary/neetoui/Typography';
|
|
23
28
|
import Tab from '@bigbinary/neetoui/Tab';
|
|
@@ -28,7 +33,6 @@ import { prop, pluck, assoc } from 'ramda';
|
|
|
28
33
|
import Alert from '@bigbinary/neetoui/Alert';
|
|
29
34
|
import Plus from '@bigbinary/neeto-icons/Plus';
|
|
30
35
|
import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
|
|
31
|
-
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
32
36
|
import Input from '@bigbinary/neetoui/formik/Input';
|
|
33
37
|
import Form from '@bigbinary/neetoui/formik/Form';
|
|
34
38
|
import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
|
|
@@ -44,78 +48,6 @@ var getDeliveryDetailsPath = function getDeliveryDetailsPath(deliveriesPath) {
|
|
|
44
48
|
return "".concat(deliveriesPath, "/:deliveryId/");
|
|
45
49
|
};
|
|
46
50
|
|
|
47
|
-
function _arrayLikeToArray(arr, len) {
|
|
48
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
49
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
50
|
-
return arr2;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function _arrayWithoutHoles(arr) {
|
|
54
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function _iterableToArray(iter) {
|
|
58
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
62
|
-
if (!o) return;
|
|
63
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
64
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
65
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
66
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
67
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function _nonIterableSpread() {
|
|
71
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function _toConsumableArray(arr) {
|
|
75
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function _typeof$1(o) {
|
|
79
|
-
"@babel/helpers - typeof";
|
|
80
|
-
|
|
81
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
82
|
-
return typeof o;
|
|
83
|
-
} : function (o) {
|
|
84
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
85
|
-
}, _typeof$1(o);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function _toPrimitive(input, hint) {
|
|
89
|
-
if (_typeof$1(input) !== "object" || input === null) return input;
|
|
90
|
-
var prim = input[Symbol.toPrimitive];
|
|
91
|
-
if (prim !== undefined) {
|
|
92
|
-
var res = prim.call(input, hint || "default");
|
|
93
|
-
if (_typeof$1(res) !== "object") return res;
|
|
94
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
95
|
-
}
|
|
96
|
-
return (hint === "string" ? String : Number)(input);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function _toPropertyKey(arg) {
|
|
100
|
-
var key = _toPrimitive(arg, "string");
|
|
101
|
-
return _typeof$1(key) === "symbol" ? key : String(key);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function _defineProperty(obj, key, value) {
|
|
105
|
-
key = _toPropertyKey(key);
|
|
106
|
-
if (key in obj) {
|
|
107
|
-
Object.defineProperty(obj, key, {
|
|
108
|
-
value: value,
|
|
109
|
-
enumerable: true,
|
|
110
|
-
configurable: true,
|
|
111
|
-
writable: true
|
|
112
|
-
});
|
|
113
|
-
} else {
|
|
114
|
-
obj[key] = value;
|
|
115
|
-
}
|
|
116
|
-
return obj;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
51
|
var queryClient = new QueryClient({
|
|
120
52
|
queryCache: new QueryCache(),
|
|
121
53
|
defaultOptions: {
|
|
@@ -210,430 +142,6 @@ var HELP_LINK_URLS = {
|
|
|
210
142
|
deliveries: "https://help.".concat(globalProps.appName, ".com/articles/managing-webhook-deliveries")
|
|
211
143
|
};
|
|
212
144
|
|
|
213
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
214
|
-
try {
|
|
215
|
-
var info = gen[key](arg);
|
|
216
|
-
var value = info.value;
|
|
217
|
-
} catch (error) {
|
|
218
|
-
reject(error);
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
if (info.done) {
|
|
222
|
-
resolve(value);
|
|
223
|
-
} else {
|
|
224
|
-
Promise.resolve(value).then(_next, _throw);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
function _asyncToGenerator(fn) {
|
|
228
|
-
return function () {
|
|
229
|
-
var self = this,
|
|
230
|
-
args = arguments;
|
|
231
|
-
return new Promise(function (resolve, reject) {
|
|
232
|
-
var gen = fn.apply(self, args);
|
|
233
|
-
function _next(value) {
|
|
234
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
235
|
-
}
|
|
236
|
-
function _throw(err) {
|
|
237
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
238
|
-
}
|
|
239
|
-
_next(undefined);
|
|
240
|
-
});
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
function getDefaultExportFromCjs (x) {
|
|
245
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
var regeneratorRuntime$1 = {exports: {}};
|
|
249
|
-
|
|
250
|
-
var _typeof = {exports: {}};
|
|
251
|
-
|
|
252
|
-
_typeof.exports;
|
|
253
|
-
|
|
254
|
-
(function (module) {
|
|
255
|
-
function _typeof(o) {
|
|
256
|
-
"@babel/helpers - typeof";
|
|
257
|
-
|
|
258
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
259
|
-
return typeof o;
|
|
260
|
-
} : function (o) {
|
|
261
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
262
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
|
|
263
|
-
}
|
|
264
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
265
|
-
} (_typeof));
|
|
266
|
-
|
|
267
|
-
var _typeofExports = _typeof.exports;
|
|
268
|
-
|
|
269
|
-
regeneratorRuntime$1.exports;
|
|
270
|
-
|
|
271
|
-
(function (module) {
|
|
272
|
-
var _typeof = _typeofExports["default"];
|
|
273
|
-
function _regeneratorRuntime() {
|
|
274
|
-
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
275
|
-
return e;
|
|
276
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
277
|
-
var t,
|
|
278
|
-
e = {},
|
|
279
|
-
r = Object.prototype,
|
|
280
|
-
n = r.hasOwnProperty,
|
|
281
|
-
o = Object.defineProperty || function (t, e, r) {
|
|
282
|
-
t[e] = r.value;
|
|
283
|
-
},
|
|
284
|
-
i = "function" == typeof Symbol ? Symbol : {},
|
|
285
|
-
a = i.iterator || "@@iterator",
|
|
286
|
-
c = i.asyncIterator || "@@asyncIterator",
|
|
287
|
-
u = i.toStringTag || "@@toStringTag";
|
|
288
|
-
function define(t, e, r) {
|
|
289
|
-
return Object.defineProperty(t, e, {
|
|
290
|
-
value: r,
|
|
291
|
-
enumerable: !0,
|
|
292
|
-
configurable: !0,
|
|
293
|
-
writable: !0
|
|
294
|
-
}), t[e];
|
|
295
|
-
}
|
|
296
|
-
try {
|
|
297
|
-
define({}, "");
|
|
298
|
-
} catch (t) {
|
|
299
|
-
define = function define(t, e, r) {
|
|
300
|
-
return t[e] = r;
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
function wrap(t, e, r, n) {
|
|
304
|
-
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
305
|
-
a = Object.create(i.prototype),
|
|
306
|
-
c = new Context(n || []);
|
|
307
|
-
return o(a, "_invoke", {
|
|
308
|
-
value: makeInvokeMethod(t, r, c)
|
|
309
|
-
}), a;
|
|
310
|
-
}
|
|
311
|
-
function tryCatch(t, e, r) {
|
|
312
|
-
try {
|
|
313
|
-
return {
|
|
314
|
-
type: "normal",
|
|
315
|
-
arg: t.call(e, r)
|
|
316
|
-
};
|
|
317
|
-
} catch (t) {
|
|
318
|
-
return {
|
|
319
|
-
type: "throw",
|
|
320
|
-
arg: t
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
e.wrap = wrap;
|
|
325
|
-
var h = "suspendedStart",
|
|
326
|
-
l = "suspendedYield",
|
|
327
|
-
f = "executing",
|
|
328
|
-
s = "completed",
|
|
329
|
-
y = {};
|
|
330
|
-
function Generator() {}
|
|
331
|
-
function GeneratorFunction() {}
|
|
332
|
-
function GeneratorFunctionPrototype() {}
|
|
333
|
-
var p = {};
|
|
334
|
-
define(p, a, function () {
|
|
335
|
-
return this;
|
|
336
|
-
});
|
|
337
|
-
var d = Object.getPrototypeOf,
|
|
338
|
-
v = d && d(d(values([])));
|
|
339
|
-
v && v !== r && n.call(v, a) && (p = v);
|
|
340
|
-
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
341
|
-
function defineIteratorMethods(t) {
|
|
342
|
-
["next", "throw", "return"].forEach(function (e) {
|
|
343
|
-
define(t, e, function (t) {
|
|
344
|
-
return this._invoke(e, t);
|
|
345
|
-
});
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
function AsyncIterator(t, e) {
|
|
349
|
-
function invoke(r, o, i, a) {
|
|
350
|
-
var c = tryCatch(t[r], t, o);
|
|
351
|
-
if ("throw" !== c.type) {
|
|
352
|
-
var u = c.arg,
|
|
353
|
-
h = u.value;
|
|
354
|
-
return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
355
|
-
invoke("next", t, i, a);
|
|
356
|
-
}, function (t) {
|
|
357
|
-
invoke("throw", t, i, a);
|
|
358
|
-
}) : e.resolve(h).then(function (t) {
|
|
359
|
-
u.value = t, i(u);
|
|
360
|
-
}, function (t) {
|
|
361
|
-
return invoke("throw", t, i, a);
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
a(c.arg);
|
|
365
|
-
}
|
|
366
|
-
var r;
|
|
367
|
-
o(this, "_invoke", {
|
|
368
|
-
value: function value(t, n) {
|
|
369
|
-
function callInvokeWithMethodAndArg() {
|
|
370
|
-
return new e(function (e, r) {
|
|
371
|
-
invoke(t, n, e, r);
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
375
|
-
}
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
function makeInvokeMethod(e, r, n) {
|
|
379
|
-
var o = h;
|
|
380
|
-
return function (i, a) {
|
|
381
|
-
if (o === f) throw new Error("Generator is already running");
|
|
382
|
-
if (o === s) {
|
|
383
|
-
if ("throw" === i) throw a;
|
|
384
|
-
return {
|
|
385
|
-
value: t,
|
|
386
|
-
done: !0
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
for (n.method = i, n.arg = a;;) {
|
|
390
|
-
var c = n.delegate;
|
|
391
|
-
if (c) {
|
|
392
|
-
var u = maybeInvokeDelegate(c, n);
|
|
393
|
-
if (u) {
|
|
394
|
-
if (u === y) continue;
|
|
395
|
-
return u;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
399
|
-
if (o === h) throw o = s, n.arg;
|
|
400
|
-
n.dispatchException(n.arg);
|
|
401
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
402
|
-
o = f;
|
|
403
|
-
var p = tryCatch(e, r, n);
|
|
404
|
-
if ("normal" === p.type) {
|
|
405
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
406
|
-
return {
|
|
407
|
-
value: p.arg,
|
|
408
|
-
done: n.done
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
412
|
-
}
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
function maybeInvokeDelegate(e, r) {
|
|
416
|
-
var n = r.method,
|
|
417
|
-
o = e.iterator[n];
|
|
418
|
-
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;
|
|
419
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
420
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
421
|
-
var a = i.arg;
|
|
422
|
-
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);
|
|
423
|
-
}
|
|
424
|
-
function pushTryEntry(t) {
|
|
425
|
-
var e = {
|
|
426
|
-
tryLoc: t[0]
|
|
427
|
-
};
|
|
428
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
429
|
-
}
|
|
430
|
-
function resetTryEntry(t) {
|
|
431
|
-
var e = t.completion || {};
|
|
432
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
433
|
-
}
|
|
434
|
-
function Context(t) {
|
|
435
|
-
this.tryEntries = [{
|
|
436
|
-
tryLoc: "root"
|
|
437
|
-
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
438
|
-
}
|
|
439
|
-
function values(e) {
|
|
440
|
-
if (e || "" === e) {
|
|
441
|
-
var r = e[a];
|
|
442
|
-
if (r) return r.call(e);
|
|
443
|
-
if ("function" == typeof e.next) return e;
|
|
444
|
-
if (!isNaN(e.length)) {
|
|
445
|
-
var o = -1,
|
|
446
|
-
i = function next() {
|
|
447
|
-
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
448
|
-
return next.value = t, next.done = !0, next;
|
|
449
|
-
};
|
|
450
|
-
return i.next = i;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
throw new TypeError(_typeof(e) + " is not iterable");
|
|
454
|
-
}
|
|
455
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
456
|
-
value: GeneratorFunctionPrototype,
|
|
457
|
-
configurable: !0
|
|
458
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
459
|
-
value: GeneratorFunction,
|
|
460
|
-
configurable: !0
|
|
461
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
462
|
-
var e = "function" == typeof t && t.constructor;
|
|
463
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
464
|
-
}, e.mark = function (t) {
|
|
465
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
466
|
-
}, e.awrap = function (t) {
|
|
467
|
-
return {
|
|
468
|
-
__await: t
|
|
469
|
-
};
|
|
470
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
471
|
-
return this;
|
|
472
|
-
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
473
|
-
void 0 === i && (i = Promise);
|
|
474
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
475
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
476
|
-
return t.done ? t.value : a.next();
|
|
477
|
-
});
|
|
478
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
479
|
-
return this;
|
|
480
|
-
}), define(g, "toString", function () {
|
|
481
|
-
return "[object Generator]";
|
|
482
|
-
}), e.keys = function (t) {
|
|
483
|
-
var e = Object(t),
|
|
484
|
-
r = [];
|
|
485
|
-
for (var n in e) r.push(n);
|
|
486
|
-
return r.reverse(), function next() {
|
|
487
|
-
for (; r.length;) {
|
|
488
|
-
var t = r.pop();
|
|
489
|
-
if (t in e) return next.value = t, next.done = !1, next;
|
|
490
|
-
}
|
|
491
|
-
return next.done = !0, next;
|
|
492
|
-
};
|
|
493
|
-
}, e.values = values, Context.prototype = {
|
|
494
|
-
constructor: Context,
|
|
495
|
-
reset: function reset(e) {
|
|
496
|
-
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);
|
|
497
|
-
},
|
|
498
|
-
stop: function stop() {
|
|
499
|
-
this.done = !0;
|
|
500
|
-
var t = this.tryEntries[0].completion;
|
|
501
|
-
if ("throw" === t.type) throw t.arg;
|
|
502
|
-
return this.rval;
|
|
503
|
-
},
|
|
504
|
-
dispatchException: function dispatchException(e) {
|
|
505
|
-
if (this.done) throw e;
|
|
506
|
-
var r = this;
|
|
507
|
-
function handle(n, o) {
|
|
508
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
509
|
-
}
|
|
510
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
511
|
-
var i = this.tryEntries[o],
|
|
512
|
-
a = i.completion;
|
|
513
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
514
|
-
if (i.tryLoc <= this.prev) {
|
|
515
|
-
var c = n.call(i, "catchLoc"),
|
|
516
|
-
u = n.call(i, "finallyLoc");
|
|
517
|
-
if (c && u) {
|
|
518
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
519
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
520
|
-
} else if (c) {
|
|
521
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
522
|
-
} else {
|
|
523
|
-
if (!u) throw new Error("try statement without catch or finally");
|
|
524
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
},
|
|
529
|
-
abrupt: function abrupt(t, e) {
|
|
530
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
531
|
-
var o = this.tryEntries[r];
|
|
532
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
533
|
-
var i = o;
|
|
534
|
-
break;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
538
|
-
var a = i ? i.completion : {};
|
|
539
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
540
|
-
},
|
|
541
|
-
complete: function complete(t, e) {
|
|
542
|
-
if ("throw" === t.type) throw t.arg;
|
|
543
|
-
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;
|
|
544
|
-
},
|
|
545
|
-
finish: function finish(t) {
|
|
546
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
547
|
-
var r = this.tryEntries[e];
|
|
548
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
549
|
-
}
|
|
550
|
-
},
|
|
551
|
-
"catch": function _catch(t) {
|
|
552
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
553
|
-
var r = this.tryEntries[e];
|
|
554
|
-
if (r.tryLoc === t) {
|
|
555
|
-
var n = r.completion;
|
|
556
|
-
if ("throw" === n.type) {
|
|
557
|
-
var o = n.arg;
|
|
558
|
-
resetTryEntry(r);
|
|
559
|
-
}
|
|
560
|
-
return o;
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
throw new Error("illegal catch attempt");
|
|
564
|
-
},
|
|
565
|
-
delegateYield: function delegateYield(e, r, n) {
|
|
566
|
-
return this.delegate = {
|
|
567
|
-
iterator: values(e),
|
|
568
|
-
resultName: r,
|
|
569
|
-
nextLoc: n
|
|
570
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
571
|
-
}
|
|
572
|
-
}, e;
|
|
573
|
-
}
|
|
574
|
-
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
575
|
-
} (regeneratorRuntime$1));
|
|
576
|
-
|
|
577
|
-
var regeneratorRuntimeExports = regeneratorRuntime$1.exports;
|
|
578
|
-
|
|
579
|
-
// TODO(Babel 8): Remove this file.
|
|
580
|
-
|
|
581
|
-
var runtime = regeneratorRuntimeExports();
|
|
582
|
-
var regenerator = runtime;
|
|
583
|
-
|
|
584
|
-
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
|
|
585
|
-
try {
|
|
586
|
-
regeneratorRuntime = runtime;
|
|
587
|
-
} catch (accidentalStrictMode) {
|
|
588
|
-
if (typeof globalThis === "object") {
|
|
589
|
-
globalThis.regeneratorRuntime = runtime;
|
|
590
|
-
} else {
|
|
591
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
|
|
596
|
-
|
|
597
|
-
function _arrayWithHoles(arr) {
|
|
598
|
-
if (Array.isArray(arr)) return arr;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
function _iterableToArrayLimit(r, l) {
|
|
602
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
603
|
-
if (null != t) {
|
|
604
|
-
var e,
|
|
605
|
-
n,
|
|
606
|
-
i,
|
|
607
|
-
u,
|
|
608
|
-
a = [],
|
|
609
|
-
f = !0,
|
|
610
|
-
o = !1;
|
|
611
|
-
try {
|
|
612
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
613
|
-
if (Object(t) !== t) return;
|
|
614
|
-
f = !1;
|
|
615
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
616
|
-
} catch (r) {
|
|
617
|
-
o = !0, n = r;
|
|
618
|
-
} finally {
|
|
619
|
-
try {
|
|
620
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
621
|
-
} finally {
|
|
622
|
-
if (o) throw n;
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
return a;
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
function _nonIterableRest() {
|
|
630
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
function _slicedToArray(arr, i) {
|
|
634
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
635
|
-
}
|
|
636
|
-
|
|
637
145
|
var DELIVERY_TAB = {
|
|
638
146
|
response: "response",
|
|
639
147
|
request: "request"
|
|
@@ -777,7 +285,7 @@ var Details = function Details(_ref) {
|
|
|
777
285
|
_useShowDelivery$data2 = _useShowDelivery$data === void 0 ? {} : _useShowDelivery$data,
|
|
778
286
|
delivery = _useShowDelivery$data2.delivery;
|
|
779
287
|
var handleRedeliverClick = /*#__PURE__*/function () {
|
|
780
|
-
var _ref2 = _asyncToGenerator(
|
|
288
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
781
289
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
782
290
|
while (1) switch (_context.prev = _context.next) {
|
|
783
291
|
case 0:
|
|
@@ -798,7 +306,10 @@ var Details = function Details(_ref) {
|
|
|
798
306
|
isOpen: isPresent(deliveryId),
|
|
799
307
|
size: "large",
|
|
800
308
|
children: /*#__PURE__*/jsx(Fragment, {
|
|
801
|
-
children: isLoading ? /*#__PURE__*/jsx(
|
|
309
|
+
children: isLoading ? /*#__PURE__*/jsx("div", {
|
|
310
|
+
className: "flex h-full w-full items-center justify-center",
|
|
311
|
+
children: /*#__PURE__*/jsx(Spinner, {})
|
|
312
|
+
}) : /*#__PURE__*/jsxs(Fragment, {
|
|
802
313
|
children: [/*#__PURE__*/jsx(Pane.Header, {
|
|
803
314
|
children: /*#__PURE__*/jsxs(Fragment, {
|
|
804
315
|
children: [/*#__PURE__*/jsx(DateFormat.Date, {
|
|
@@ -949,7 +460,12 @@ var Deliveries = function Deliveries(_ref) {
|
|
|
949
460
|
link: window.location.pathname,
|
|
950
461
|
text: endpoint
|
|
951
462
|
}]);
|
|
952
|
-
if (isLoading)
|
|
463
|
+
if (isLoading) {
|
|
464
|
+
return /*#__PURE__*/jsx("div", {
|
|
465
|
+
className: "flex h-full w-full items-center justify-center",
|
|
466
|
+
children: /*#__PURE__*/jsx(Spinner, {})
|
|
467
|
+
});
|
|
468
|
+
}
|
|
953
469
|
return /*#__PURE__*/jsxs(Container, {
|
|
954
470
|
className: "w-full",
|
|
955
471
|
children: [/*#__PURE__*/jsx(Header$2, {
|
|
@@ -1038,7 +554,7 @@ var useCreateWebhook = function useCreateWebhook(options) {
|
|
|
1038
554
|
keysToInvalidate: [[QUERY_KEYS.WEBHOOK_LIST]],
|
|
1039
555
|
onSuccess: function onSuccess() {
|
|
1040
556
|
var _options$onSuccess;
|
|
1041
|
-
options === null || options === void 0
|
|
557
|
+
options === null || options === void 0 ? void 0 : (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 ? void 0 : _options$onSuccess.call(options);
|
|
1042
558
|
}
|
|
1043
559
|
});
|
|
1044
560
|
};
|
|
@@ -1061,7 +577,7 @@ var useUpdateWebhook = function useUpdateWebhook(id, options) {
|
|
|
1061
577
|
keysToInvalidate: [[QUERY_KEYS.WEBHOOK_LIST], [QUERY_KEYS.WEBHOOK_DETAILS, id], [QUERY_KEYS.DELIVERY_LIST, id]],
|
|
1062
578
|
onSuccess: function onSuccess() {
|
|
1063
579
|
var _options$onSuccess2;
|
|
1064
|
-
options === null || options === void 0
|
|
580
|
+
options === null || options === void 0 ? void 0 : (_options$onSuccess2 = options.onSuccess) === null || _options$onSuccess2 === void 0 ? void 0 : _options$onSuccess2.call(options);
|
|
1065
581
|
}
|
|
1066
582
|
});
|
|
1067
583
|
};
|
|
@@ -1070,7 +586,7 @@ var useDestroyWebhook = function useDestroyWebhook(options) {
|
|
|
1070
586
|
keysToInvalidate: [[QUERY_KEYS.WEBHOOK_LIST]],
|
|
1071
587
|
onSuccess: function onSuccess() {
|
|
1072
588
|
var _options$onSuccess3;
|
|
1073
|
-
options === null || options === void 0
|
|
589
|
+
options === null || options === void 0 ? void 0 : (_options$onSuccess3 = options.onSuccess) === null || _options$onSuccess3 === void 0 ? void 0 : _options$onSuccess3.call(options);
|
|
1074
590
|
}
|
|
1075
591
|
});
|
|
1076
592
|
};
|
|
@@ -1094,13 +610,14 @@ var useFetchEvents = function useFetchEvents() {
|
|
|
1094
610
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
1095
611
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
1096
612
|
// generators (like Math.random()).
|
|
1097
|
-
|
|
1098
|
-
|
|
613
|
+
var getRandomValues;
|
|
614
|
+
var rnds8 = new Uint8Array(16);
|
|
1099
615
|
function rng() {
|
|
1100
616
|
// lazy load so that environments that need to polyfill have a chance to do so
|
|
1101
617
|
if (!getRandomValues) {
|
|
1102
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
1103
|
-
|
|
618
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
619
|
+
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
620
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
1104
621
|
|
|
1105
622
|
if (!getRandomValues) {
|
|
1106
623
|
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
@@ -1110,50 +627,48 @@ function rng() {
|
|
|
1110
627
|
return getRandomValues(rnds8);
|
|
1111
628
|
}
|
|
1112
629
|
|
|
630
|
+
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;
|
|
631
|
+
|
|
632
|
+
function validate(uuid) {
|
|
633
|
+
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
634
|
+
}
|
|
635
|
+
|
|
1113
636
|
/**
|
|
1114
637
|
* Convert array of 16 byte values to UUID string format of the form:
|
|
1115
638
|
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
1116
639
|
*/
|
|
1117
640
|
|
|
1118
|
-
|
|
641
|
+
var byteToHex = [];
|
|
1119
642
|
|
|
1120
|
-
for (
|
|
1121
|
-
byteToHex.push((i + 0x100).toString(16).
|
|
643
|
+
for (var i = 0; i < 256; ++i) {
|
|
644
|
+
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
1122
645
|
}
|
|
1123
646
|
|
|
1124
|
-
function
|
|
647
|
+
function stringify(arr) {
|
|
648
|
+
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1125
649
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
1126
650
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
1127
|
-
|
|
1128
|
-
|
|
651
|
+
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
|
|
652
|
+
// of the following:
|
|
653
|
+
// - One or more input array values don't map to a hex octet (leading to
|
|
654
|
+
// "undefined" in the uuid)
|
|
655
|
+
// - Invalid input values for the RFC `version` or `variant` fields
|
|
656
|
+
|
|
657
|
+
if (!validate(uuid)) {
|
|
658
|
+
throw TypeError('Stringified UUID is invalid');
|
|
659
|
+
}
|
|
1129
660
|
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
randomUUID
|
|
1133
|
-
};
|
|
661
|
+
return uuid;
|
|
662
|
+
}
|
|
1134
663
|
|
|
1135
664
|
function v4(options, buf, offset) {
|
|
1136
|
-
if (native.randomUUID && !buf && !options) {
|
|
1137
|
-
return native.randomUUID();
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
665
|
options = options || {};
|
|
1141
|
-
|
|
666
|
+
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
1142
667
|
|
|
1143
668
|
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
1144
669
|
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
1145
670
|
|
|
1146
|
-
|
|
1147
|
-
offset = offset || 0;
|
|
1148
|
-
|
|
1149
|
-
for (let i = 0; i < 16; ++i) {
|
|
1150
|
-
buf[offset + i] = rnds[i];
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
return buf;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
return unsafeStringify(rnds);
|
|
671
|
+
return stringify(rnds);
|
|
1157
672
|
}
|
|
1158
673
|
|
|
1159
674
|
var MENU_ITEMS = {
|
|
@@ -1289,7 +804,7 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1289
804
|
var _useCreateWebhook = useCreateWebhook({
|
|
1290
805
|
onSuccess: function onSuccess() {
|
|
1291
806
|
onClose();
|
|
1292
|
-
onCreate === null || onCreate === void 0
|
|
807
|
+
onCreate === null || onCreate === void 0 ? void 0 : onCreate();
|
|
1293
808
|
}
|
|
1294
809
|
}),
|
|
1295
810
|
createWebhook = _useCreateWebhook.mutate;
|
|
@@ -1546,7 +1061,7 @@ var Webhooks = function Webhooks(_ref) {
|
|
|
1546
1061
|
var _useDestroyWebhook = useDestroyWebhook({
|
|
1547
1062
|
onSuccess: function onSuccess() {
|
|
1548
1063
|
setIsDeleteAlertOpen(false);
|
|
1549
|
-
onDelete === null || onDelete === void 0
|
|
1064
|
+
onDelete === null || onDelete === void 0 ? void 0 : onDelete();
|
|
1550
1065
|
}
|
|
1551
1066
|
}),
|
|
1552
1067
|
isDeleting = _useDestroyWebhook.isPending,
|
|
@@ -1564,7 +1079,10 @@ var Webhooks = function Webhooks(_ref) {
|
|
|
1564
1079
|
setIsDeleteAlertOpen(true);
|
|
1565
1080
|
}, []);
|
|
1566
1081
|
if (isLoading) {
|
|
1567
|
-
return /*#__PURE__*/jsx(
|
|
1082
|
+
return /*#__PURE__*/jsx("div", {
|
|
1083
|
+
className: "flex h-full w-full items-center justify-center",
|
|
1084
|
+
children: /*#__PURE__*/jsx(Spinner, {})
|
|
1085
|
+
});
|
|
1568
1086
|
}
|
|
1569
1087
|
return /*#__PURE__*/jsxs(Container, {
|
|
1570
1088
|
className: containerClassName,
|