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