@bigbinary/neeto-webhooks-frontend 1.6.7 → 1.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +115 -12
- package/dist/index.cjs.js +301 -283
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +315 -297
- package/dist/index.js.map +1 -1
- package/package.json +78 -69
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { QueryClient, QueryCache, QueryClientProvider, useQuery, useQueryClient,
|
|
|
12
12
|
import { ReactQueryDevtools } from 'react-query/devtools';
|
|
13
13
|
import axios from 'axios';
|
|
14
14
|
import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
|
|
15
|
-
import { t } from 'i18next';
|
|
15
|
+
import { t as t$1 } from 'i18next';
|
|
16
16
|
import { prop, pluck, assoc } from 'ramda';
|
|
17
17
|
import { Info } from '@bigbinary/neeto-icons';
|
|
18
18
|
import { Form, Textarea, Select, Input, Switch, ActionBlock } from '@bigbinary/neetoui/formik';
|
|
@@ -59,31 +59,31 @@ function _arrayWithHoles(arr) {
|
|
|
59
59
|
if (Array.isArray(arr)) return arr;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
function _iterableToArrayLimit(
|
|
63
|
-
var
|
|
64
|
-
if (null !=
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
function _iterableToArrayLimit(r, l) {
|
|
63
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
64
|
+
if (null != t) {
|
|
65
|
+
var e,
|
|
66
|
+
n,
|
|
67
|
+
i,
|
|
68
|
+
u,
|
|
69
|
+
a = [],
|
|
70
|
+
f = !0,
|
|
71
|
+
o = !1;
|
|
72
72
|
try {
|
|
73
|
-
if (
|
|
74
|
-
if (Object(
|
|
75
|
-
|
|
76
|
-
} else for (; !(
|
|
77
|
-
} catch (
|
|
78
|
-
|
|
73
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
74
|
+
if (Object(t) !== t) return;
|
|
75
|
+
f = !1;
|
|
76
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
77
|
+
} catch (r) {
|
|
78
|
+
o = !0, n = r;
|
|
79
79
|
} finally {
|
|
80
80
|
try {
|
|
81
|
-
if (!
|
|
81
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
82
82
|
} finally {
|
|
83
|
-
if (
|
|
83
|
+
if (o) throw n;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
return
|
|
86
|
+
return a;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -213,14 +213,14 @@ var _typeof$1 = {exports: {}};
|
|
|
213
213
|
_typeof$1.exports;
|
|
214
214
|
|
|
215
215
|
(function (module) {
|
|
216
|
-
function _typeof(
|
|
216
|
+
function _typeof(o) {
|
|
217
217
|
"@babel/helpers - typeof";
|
|
218
218
|
|
|
219
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
220
|
-
return typeof
|
|
221
|
-
} : function (
|
|
222
|
-
return
|
|
223
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(
|
|
219
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
220
|
+
return typeof o;
|
|
221
|
+
} : function (o) {
|
|
222
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
223
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
|
|
224
224
|
}
|
|
225
225
|
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
226
226
|
} (_typeof$1));
|
|
@@ -233,304 +233,304 @@ regeneratorRuntime$1.exports;
|
|
|
233
233
|
var _typeof = _typeofExports["default"];
|
|
234
234
|
function _regeneratorRuntime() {
|
|
235
235
|
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
236
|
-
return
|
|
236
|
+
return e;
|
|
237
237
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
238
|
-
var
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
238
|
+
var t,
|
|
239
|
+
e = {},
|
|
240
|
+
r = Object.prototype,
|
|
241
|
+
n = r.hasOwnProperty,
|
|
242
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
243
|
+
t[e] = r.value;
|
|
243
244
|
},
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
function define(
|
|
249
|
-
return Object.defineProperty(
|
|
250
|
-
value:
|
|
245
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
246
|
+
a = i.iterator || "@@iterator",
|
|
247
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
248
|
+
u = i.toStringTag || "@@toStringTag";
|
|
249
|
+
function define(t, e, r) {
|
|
250
|
+
return Object.defineProperty(t, e, {
|
|
251
|
+
value: r,
|
|
251
252
|
enumerable: !0,
|
|
252
253
|
configurable: !0,
|
|
253
254
|
writable: !0
|
|
254
|
-
}),
|
|
255
|
+
}), t[e];
|
|
255
256
|
}
|
|
256
257
|
try {
|
|
257
258
|
define({}, "");
|
|
258
|
-
} catch (
|
|
259
|
-
define = function define(
|
|
260
|
-
return
|
|
259
|
+
} catch (t) {
|
|
260
|
+
define = function define(t, e, r) {
|
|
261
|
+
return t[e] = r;
|
|
261
262
|
};
|
|
262
263
|
}
|
|
263
|
-
function wrap(
|
|
264
|
-
var
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
return
|
|
268
|
-
value: makeInvokeMethod(
|
|
269
|
-
}),
|
|
264
|
+
function wrap(t, e, r, n) {
|
|
265
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
266
|
+
a = Object.create(i.prototype),
|
|
267
|
+
c = new Context(n || []);
|
|
268
|
+
return o(a, "_invoke", {
|
|
269
|
+
value: makeInvokeMethod(t, r, c)
|
|
270
|
+
}), a;
|
|
270
271
|
}
|
|
271
|
-
function tryCatch(
|
|
272
|
+
function tryCatch(t, e, r) {
|
|
272
273
|
try {
|
|
273
274
|
return {
|
|
274
275
|
type: "normal",
|
|
275
|
-
arg:
|
|
276
|
+
arg: t.call(e, r)
|
|
276
277
|
};
|
|
277
|
-
} catch (
|
|
278
|
+
} catch (t) {
|
|
278
279
|
return {
|
|
279
280
|
type: "throw",
|
|
280
|
-
arg:
|
|
281
|
+
arg: t
|
|
281
282
|
};
|
|
282
283
|
}
|
|
283
284
|
}
|
|
284
|
-
|
|
285
|
-
var
|
|
285
|
+
e.wrap = wrap;
|
|
286
|
+
var h = "suspendedStart",
|
|
287
|
+
l = "suspendedYield",
|
|
288
|
+
f = "executing",
|
|
289
|
+
s = "completed",
|
|
290
|
+
y = {};
|
|
286
291
|
function Generator() {}
|
|
287
292
|
function GeneratorFunction() {}
|
|
288
293
|
function GeneratorFunctionPrototype() {}
|
|
289
|
-
var
|
|
290
|
-
define(
|
|
294
|
+
var p = {};
|
|
295
|
+
define(p, a, function () {
|
|
291
296
|
return this;
|
|
292
297
|
});
|
|
293
|
-
var
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
var
|
|
297
|
-
function defineIteratorMethods(
|
|
298
|
-
["next", "throw", "return"].forEach(function (
|
|
299
|
-
define(
|
|
300
|
-
return this._invoke(
|
|
298
|
+
var d = Object.getPrototypeOf,
|
|
299
|
+
v = d && d(d(values([])));
|
|
300
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
301
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
302
|
+
function defineIteratorMethods(t) {
|
|
303
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
304
|
+
define(t, e, function (t) {
|
|
305
|
+
return this._invoke(e, t);
|
|
301
306
|
});
|
|
302
307
|
});
|
|
303
308
|
}
|
|
304
|
-
function AsyncIterator(
|
|
305
|
-
function invoke(
|
|
306
|
-
var
|
|
307
|
-
if ("throw" !==
|
|
308
|
-
var
|
|
309
|
-
|
|
310
|
-
return
|
|
311
|
-
invoke("next",
|
|
312
|
-
}, function (
|
|
313
|
-
invoke("throw",
|
|
314
|
-
}) :
|
|
315
|
-
|
|
316
|
-
}, function (
|
|
317
|
-
return invoke("throw",
|
|
309
|
+
function AsyncIterator(t, e) {
|
|
310
|
+
function invoke(r, o, i, a) {
|
|
311
|
+
var c = tryCatch(t[r], t, o);
|
|
312
|
+
if ("throw" !== c.type) {
|
|
313
|
+
var u = c.arg,
|
|
314
|
+
h = u.value;
|
|
315
|
+
return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
316
|
+
invoke("next", t, i, a);
|
|
317
|
+
}, function (t) {
|
|
318
|
+
invoke("throw", t, i, a);
|
|
319
|
+
}) : e.resolve(h).then(function (t) {
|
|
320
|
+
u.value = t, i(u);
|
|
321
|
+
}, function (t) {
|
|
322
|
+
return invoke("throw", t, i, a);
|
|
318
323
|
});
|
|
319
324
|
}
|
|
320
|
-
|
|
325
|
+
a(c.arg);
|
|
321
326
|
}
|
|
322
|
-
var
|
|
323
|
-
|
|
324
|
-
value: function value(
|
|
327
|
+
var r;
|
|
328
|
+
o(this, "_invoke", {
|
|
329
|
+
value: function value(t, n) {
|
|
325
330
|
function callInvokeWithMethodAndArg() {
|
|
326
|
-
return new
|
|
327
|
-
invoke(
|
|
331
|
+
return new e(function (e, r) {
|
|
332
|
+
invoke(t, n, e, r);
|
|
328
333
|
});
|
|
329
334
|
}
|
|
330
|
-
return
|
|
335
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
331
336
|
}
|
|
332
337
|
});
|
|
333
338
|
}
|
|
334
|
-
function makeInvokeMethod(
|
|
335
|
-
var
|
|
336
|
-
return function (
|
|
337
|
-
if (
|
|
338
|
-
if (
|
|
339
|
-
if ("throw" ===
|
|
340
|
-
return
|
|
339
|
+
function makeInvokeMethod(e, r, n) {
|
|
340
|
+
var o = h;
|
|
341
|
+
return function (i, a) {
|
|
342
|
+
if (o === f) throw new Error("Generator is already running");
|
|
343
|
+
if (o === s) {
|
|
344
|
+
if ("throw" === i) throw a;
|
|
345
|
+
return {
|
|
346
|
+
value: t,
|
|
347
|
+
done: !0
|
|
348
|
+
};
|
|
341
349
|
}
|
|
342
|
-
for (
|
|
343
|
-
var
|
|
344
|
-
if (
|
|
345
|
-
var
|
|
346
|
-
if (
|
|
347
|
-
if (
|
|
348
|
-
return
|
|
350
|
+
for (n.method = i, n.arg = a;;) {
|
|
351
|
+
var c = n.delegate;
|
|
352
|
+
if (c) {
|
|
353
|
+
var u = maybeInvokeDelegate(c, n);
|
|
354
|
+
if (u) {
|
|
355
|
+
if (u === y) continue;
|
|
356
|
+
return u;
|
|
349
357
|
}
|
|
350
358
|
}
|
|
351
|
-
if ("next" ===
|
|
352
|
-
if (
|
|
353
|
-
|
|
354
|
-
} else "return" ===
|
|
355
|
-
|
|
356
|
-
var
|
|
357
|
-
if ("normal" ===
|
|
358
|
-
if (
|
|
359
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
360
|
+
if (o === h) throw o = s, n.arg;
|
|
361
|
+
n.dispatchException(n.arg);
|
|
362
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
363
|
+
o = f;
|
|
364
|
+
var p = tryCatch(e, r, n);
|
|
365
|
+
if ("normal" === p.type) {
|
|
366
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
359
367
|
return {
|
|
360
|
-
value:
|
|
361
|
-
done:
|
|
368
|
+
value: p.arg,
|
|
369
|
+
done: n.done
|
|
362
370
|
};
|
|
363
371
|
}
|
|
364
|
-
"throw" ===
|
|
372
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
365
373
|
}
|
|
366
374
|
};
|
|
367
375
|
}
|
|
368
|
-
function maybeInvokeDelegate(
|
|
369
|
-
var
|
|
370
|
-
|
|
371
|
-
if (
|
|
372
|
-
var
|
|
373
|
-
if ("throw" ===
|
|
374
|
-
var
|
|
375
|
-
return
|
|
376
|
+
function maybeInvokeDelegate(e, r) {
|
|
377
|
+
var n = r.method,
|
|
378
|
+
o = e.iterator[n];
|
|
379
|
+
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;
|
|
380
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
381
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
382
|
+
var a = i.arg;
|
|
383
|
+
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);
|
|
376
384
|
}
|
|
377
|
-
function pushTryEntry(
|
|
378
|
-
var
|
|
379
|
-
tryLoc:
|
|
385
|
+
function pushTryEntry(t) {
|
|
386
|
+
var e = {
|
|
387
|
+
tryLoc: t[0]
|
|
380
388
|
};
|
|
381
|
-
1 in
|
|
389
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
382
390
|
}
|
|
383
|
-
function resetTryEntry(
|
|
384
|
-
var
|
|
385
|
-
|
|
391
|
+
function resetTryEntry(t) {
|
|
392
|
+
var e = t.completion || {};
|
|
393
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
386
394
|
}
|
|
387
|
-
function Context(
|
|
395
|
+
function Context(t) {
|
|
388
396
|
this.tryEntries = [{
|
|
389
397
|
tryLoc: "root"
|
|
390
|
-
}],
|
|
398
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
391
399
|
}
|
|
392
|
-
function values(
|
|
393
|
-
if (
|
|
394
|
-
var
|
|
395
|
-
if (
|
|
396
|
-
if ("function" == typeof
|
|
397
|
-
if (!isNaN(
|
|
398
|
-
var
|
|
399
|
-
|
|
400
|
-
for (; ++
|
|
401
|
-
return next.value =
|
|
400
|
+
function values(e) {
|
|
401
|
+
if (e || "" === e) {
|
|
402
|
+
var r = e[a];
|
|
403
|
+
if (r) return r.call(e);
|
|
404
|
+
if ("function" == typeof e.next) return e;
|
|
405
|
+
if (!isNaN(e.length)) {
|
|
406
|
+
var o = -1,
|
|
407
|
+
i = function next() {
|
|
408
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
409
|
+
return next.value = t, next.done = !0, next;
|
|
402
410
|
};
|
|
403
|
-
return
|
|
411
|
+
return i.next = i;
|
|
404
412
|
}
|
|
405
413
|
}
|
|
406
|
-
|
|
407
|
-
next: doneResult
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
function doneResult() {
|
|
411
|
-
return {
|
|
412
|
-
value: undefined,
|
|
413
|
-
done: !0
|
|
414
|
-
};
|
|
414
|
+
throw new TypeError(_typeof(e) + " is not iterable");
|
|
415
415
|
}
|
|
416
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
416
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
417
417
|
value: GeneratorFunctionPrototype,
|
|
418
418
|
configurable: !0
|
|
419
|
-
}),
|
|
419
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
420
420
|
value: GeneratorFunction,
|
|
421
421
|
configurable: !0
|
|
422
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
423
|
-
var
|
|
424
|
-
return !!
|
|
425
|
-
},
|
|
426
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
427
|
-
},
|
|
422
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
423
|
+
var e = "function" == typeof t && t.constructor;
|
|
424
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
425
|
+
}, e.mark = function (t) {
|
|
426
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
427
|
+
}, e.awrap = function (t) {
|
|
428
428
|
return {
|
|
429
|
-
__await:
|
|
429
|
+
__await: t
|
|
430
430
|
};
|
|
431
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
431
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
432
432
|
return this;
|
|
433
|
-
}),
|
|
434
|
-
void 0 ===
|
|
435
|
-
var
|
|
436
|
-
return
|
|
437
|
-
return
|
|
433
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
434
|
+
void 0 === i && (i = Promise);
|
|
435
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
436
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
437
|
+
return t.done ? t.value : a.next();
|
|
438
438
|
});
|
|
439
|
-
}, defineIteratorMethods(
|
|
439
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
440
440
|
return this;
|
|
441
|
-
}), define(
|
|
441
|
+
}), define(g, "toString", function () {
|
|
442
442
|
return "[object Generator]";
|
|
443
|
-
}),
|
|
444
|
-
var
|
|
445
|
-
|
|
446
|
-
for (var
|
|
447
|
-
return
|
|
448
|
-
for (;
|
|
449
|
-
var
|
|
450
|
-
if (
|
|
443
|
+
}), e.keys = function (t) {
|
|
444
|
+
var e = Object(t),
|
|
445
|
+
r = [];
|
|
446
|
+
for (var n in e) r.push(n);
|
|
447
|
+
return r.reverse(), function next() {
|
|
448
|
+
for (; r.length;) {
|
|
449
|
+
var t = r.pop();
|
|
450
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
451
451
|
}
|
|
452
452
|
return next.done = !0, next;
|
|
453
453
|
};
|
|
454
|
-
},
|
|
454
|
+
}, e.values = values, Context.prototype = {
|
|
455
455
|
constructor: Context,
|
|
456
|
-
reset: function reset(
|
|
457
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
456
|
+
reset: function reset(e) {
|
|
457
|
+
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);
|
|
458
458
|
},
|
|
459
459
|
stop: function stop() {
|
|
460
460
|
this.done = !0;
|
|
461
|
-
var
|
|
462
|
-
if ("throw" ===
|
|
461
|
+
var t = this.tryEntries[0].completion;
|
|
462
|
+
if ("throw" === t.type) throw t.arg;
|
|
463
463
|
return this.rval;
|
|
464
464
|
},
|
|
465
|
-
dispatchException: function dispatchException(
|
|
466
|
-
if (this.done) throw
|
|
467
|
-
var
|
|
468
|
-
function handle(
|
|
469
|
-
return
|
|
465
|
+
dispatchException: function dispatchException(e) {
|
|
466
|
+
if (this.done) throw e;
|
|
467
|
+
var r = this;
|
|
468
|
+
function handle(n, o) {
|
|
469
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
470
470
|
}
|
|
471
|
-
for (var
|
|
472
|
-
var
|
|
473
|
-
|
|
474
|
-
if ("root" ===
|
|
475
|
-
if (
|
|
476
|
-
var
|
|
477
|
-
|
|
478
|
-
if (
|
|
479
|
-
if (this.prev <
|
|
480
|
-
if (this.prev <
|
|
481
|
-
} else if (
|
|
482
|
-
if (this.prev <
|
|
471
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
472
|
+
var i = this.tryEntries[o],
|
|
473
|
+
a = i.completion;
|
|
474
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
475
|
+
if (i.tryLoc <= this.prev) {
|
|
476
|
+
var c = n.call(i, "catchLoc"),
|
|
477
|
+
u = n.call(i, "finallyLoc");
|
|
478
|
+
if (c && u) {
|
|
479
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
480
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
481
|
+
} else if (c) {
|
|
482
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
483
483
|
} else {
|
|
484
|
-
if (!
|
|
485
|
-
if (this.prev <
|
|
484
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
485
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
},
|
|
490
|
-
abrupt: function abrupt(
|
|
491
|
-
for (var
|
|
492
|
-
var
|
|
493
|
-
if (
|
|
494
|
-
var
|
|
490
|
+
abrupt: function abrupt(t, e) {
|
|
491
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
492
|
+
var o = this.tryEntries[r];
|
|
493
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
494
|
+
var i = o;
|
|
495
495
|
break;
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
|
|
499
|
-
var
|
|
500
|
-
return
|
|
498
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
499
|
+
var a = i ? i.completion : {};
|
|
500
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
501
501
|
},
|
|
502
|
-
complete: function complete(
|
|
503
|
-
if ("throw" ===
|
|
504
|
-
return "break" ===
|
|
502
|
+
complete: function complete(t, e) {
|
|
503
|
+
if ("throw" === t.type) throw t.arg;
|
|
504
|
+
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;
|
|
505
505
|
},
|
|
506
|
-
finish: function finish(
|
|
507
|
-
for (var
|
|
508
|
-
var
|
|
509
|
-
if (
|
|
506
|
+
finish: function finish(t) {
|
|
507
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
508
|
+
var r = this.tryEntries[e];
|
|
509
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
510
510
|
}
|
|
511
511
|
},
|
|
512
|
-
"catch": function _catch(
|
|
513
|
-
for (var
|
|
514
|
-
var
|
|
515
|
-
if (
|
|
516
|
-
var
|
|
517
|
-
if ("throw" ===
|
|
518
|
-
var
|
|
519
|
-
resetTryEntry(
|
|
512
|
+
"catch": function _catch(t) {
|
|
513
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
514
|
+
var r = this.tryEntries[e];
|
|
515
|
+
if (r.tryLoc === t) {
|
|
516
|
+
var n = r.completion;
|
|
517
|
+
if ("throw" === n.type) {
|
|
518
|
+
var o = n.arg;
|
|
519
|
+
resetTryEntry(r);
|
|
520
520
|
}
|
|
521
|
-
return
|
|
521
|
+
return o;
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
throw new Error("illegal catch attempt");
|
|
525
525
|
},
|
|
526
|
-
delegateYield: function delegateYield(
|
|
526
|
+
delegateYield: function delegateYield(e, r, n) {
|
|
527
527
|
return this.delegate = {
|
|
528
|
-
iterator: values(
|
|
529
|
-
resultName:
|
|
530
|
-
nextLoc:
|
|
531
|
-
}, "next" === this.method && (this.arg =
|
|
528
|
+
iterator: values(e),
|
|
529
|
+
resultName: r,
|
|
530
|
+
nextLoc: n
|
|
531
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
532
532
|
}
|
|
533
|
-
},
|
|
533
|
+
}, e;
|
|
534
534
|
}
|
|
535
535
|
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
536
536
|
} (regeneratorRuntime$1));
|
|
@@ -561,9 +561,12 @@ var DELIVERY_TAB = {
|
|
|
561
561
|
};
|
|
562
562
|
|
|
563
563
|
var Snippet = function Snippet(_ref) {
|
|
564
|
-
var children = _ref.children
|
|
564
|
+
var children = _ref.children,
|
|
565
|
+
_ref$dataCy = _ref.dataCy,
|
|
566
|
+
dataCy = _ref$dataCy === void 0 ? "" : _ref$dataCy;
|
|
565
567
|
return /*#__PURE__*/React.createElement("div", {
|
|
566
|
-
className: "neeto-ui-rounded neeto-ui-border-gray-300 neeto-ui-bg-gray-100 my-2 whitespace-pre-wrap break-all border p-4"
|
|
568
|
+
className: "neeto-ui-rounded neeto-ui-border-gray-300 neeto-ui-bg-gray-100 my-2 whitespace-pre-wrap break-all border p-4",
|
|
569
|
+
"data-cy": dataCy
|
|
567
570
|
}, children);
|
|
568
571
|
};
|
|
569
572
|
|
|
@@ -598,11 +601,13 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
598
601
|
className: "flex items-center space-x-1"
|
|
599
602
|
}, t("neetoWebhooks.delivery.identifier"), ":", /*#__PURE__*/React.createElement(Typography, {
|
|
600
603
|
className: "px-2 font-bold",
|
|
604
|
+
"data-cy": "delivery-identifier",
|
|
601
605
|
style: "body2"
|
|
602
606
|
}, identifier)), /*#__PURE__*/React.createElement("span", {
|
|
603
607
|
className: "flex items-center"
|
|
604
608
|
}, t("neetoWebhooks.common.responseStatus"), ":", /*#__PURE__*/React.createElement(Typography, {
|
|
605
609
|
className: "px-2 font-bold",
|
|
610
|
+
"data-cy": "delivery-response-code",
|
|
606
611
|
style: "body2"
|
|
607
612
|
}, responseStatusCode), /*#__PURE__*/React.createElement(Tag, {
|
|
608
613
|
style: status === "success" ? "success" : "warning"
|
|
@@ -622,15 +627,23 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
622
627
|
className: "space-y-4"
|
|
623
628
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Typography, {
|
|
624
629
|
style: "h5"
|
|
625
|
-
}, t("neetoWebhooks.delivery.header")), /*#__PURE__*/React.createElement(Snippet,
|
|
630
|
+
}, t("neetoWebhooks.delivery.header")), /*#__PURE__*/React.createElement(Snippet, {
|
|
631
|
+
dataCy: "delivery-request-header"
|
|
632
|
+
}, deliveryDetails.requestHeader)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Typography, {
|
|
626
633
|
style: "h5"
|
|
627
|
-
}, t("neetoWebhooks.delivery.payload")), /*#__PURE__*/React.createElement(Snippet,
|
|
634
|
+
}, t("neetoWebhooks.delivery.payload")), /*#__PURE__*/React.createElement(Snippet, {
|
|
635
|
+
dataCy: "delivery-request-payload"
|
|
636
|
+
}, JSON.stringify(JSON.parse(deliveryDetails.requestBody), null, 2)))) : /*#__PURE__*/React.createElement("div", {
|
|
628
637
|
className: "space-y-4"
|
|
629
638
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Typography, {
|
|
630
639
|
style: "h5"
|
|
631
|
-
}, t("neetoWebhooks.delivery.header")), /*#__PURE__*/React.createElement(Snippet,
|
|
640
|
+
}, t("neetoWebhooks.delivery.header")), /*#__PURE__*/React.createElement(Snippet, {
|
|
641
|
+
dataCy: "delivery-response-header"
|
|
642
|
+
}, deliveryDetails.responseHeader)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Typography, {
|
|
632
643
|
style: "h5"
|
|
633
|
-
}, t("neetoWebhooks.delivery.body")), /*#__PURE__*/React.createElement(Snippet,
|
|
644
|
+
}, t("neetoWebhooks.delivery.body")), /*#__PURE__*/React.createElement(Snippet, {
|
|
645
|
+
dataCy: "delivery-response-body"
|
|
646
|
+
}, deliveryDetails.responseBody)))));
|
|
634
647
|
};
|
|
635
648
|
|
|
636
649
|
var Details = function Details(_ref) {
|
|
@@ -703,25 +716,28 @@ var Details = function Details(_ref) {
|
|
|
703
716
|
var buildColumns$1 = function buildColumns(_ref) {
|
|
704
717
|
var handleDetailsClick = _ref.handleDetailsClick;
|
|
705
718
|
return [{
|
|
706
|
-
title: t("neetoWebhooks.delivery.identifier", SINGULAR),
|
|
719
|
+
title: t$1("neetoWebhooks.delivery.identifier", SINGULAR),
|
|
707
720
|
key: "identifier",
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
redelivery = _ref2.redelivery;
|
|
721
|
+
dataIndex: "identifier",
|
|
722
|
+
width: 390,
|
|
723
|
+
render: function render(_, delivery) {
|
|
712
724
|
return /*#__PURE__*/React.createElement("div", {
|
|
713
725
|
className: "flex items-center gap-x-3"
|
|
714
|
-
}, /*#__PURE__*/React.createElement(
|
|
715
|
-
style: "
|
|
716
|
-
weight: "semibold"
|
|
717
|
-
|
|
726
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
727
|
+
style: "link",
|
|
728
|
+
weight: "semibold",
|
|
729
|
+
onClick: function onClick() {
|
|
730
|
+
return handleDetailsClick(delivery);
|
|
731
|
+
}
|
|
732
|
+
}, delivery.identifier), delivery.redelivery && /*#__PURE__*/React.createElement(Tag, {
|
|
718
733
|
style: "info"
|
|
719
|
-
}, t("neetoWebhooks.delivery.redelivery")));
|
|
734
|
+
}, t$1("neetoWebhooks.delivery.redelivery")));
|
|
720
735
|
}
|
|
721
736
|
}, {
|
|
722
|
-
title: t("neetoWebhooks.tableHeaders.createdAt"),
|
|
737
|
+
title: t$1("neetoWebhooks.tableHeaders.createdAt"),
|
|
723
738
|
key: "createdAt",
|
|
724
739
|
dataIndex: "createdAt",
|
|
740
|
+
width: 280,
|
|
725
741
|
render: function render(createdAt) {
|
|
726
742
|
return /*#__PURE__*/React.createElement("div", {
|
|
727
743
|
className: "flex items-center justify-between space-x-1"
|
|
@@ -730,12 +746,12 @@ var buildColumns$1 = function buildColumns(_ref) {
|
|
|
730
746
|
})));
|
|
731
747
|
}
|
|
732
748
|
}, {
|
|
733
|
-
title: t("neetoWebhooks.common.responseStatus"),
|
|
749
|
+
title: t$1("neetoWebhooks.common.responseStatus"),
|
|
734
750
|
key: "responseStatusCode",
|
|
735
|
-
width:
|
|
736
|
-
render: function render(
|
|
737
|
-
var responseStatusCode =
|
|
738
|
-
status =
|
|
751
|
+
width: 160,
|
|
752
|
+
render: function render(_ref2) {
|
|
753
|
+
var responseStatusCode = _ref2.responseStatusCode,
|
|
754
|
+
status = _ref2.status;
|
|
739
755
|
return /*#__PURE__*/React.createElement("span", {
|
|
740
756
|
className: "flex items-center"
|
|
741
757
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
@@ -746,23 +762,11 @@ var buildColumns$1 = function buildColumns(_ref) {
|
|
|
746
762
|
}, status));
|
|
747
763
|
}
|
|
748
764
|
}, {
|
|
749
|
-
title: t("neetoWebhooks.common.event", SINGULAR),
|
|
765
|
+
title: t$1("neetoWebhooks.common.event", SINGULAR),
|
|
750
766
|
key: "event",
|
|
751
767
|
dataIndex: "event",
|
|
768
|
+
width: 270,
|
|
752
769
|
render: prop("label")
|
|
753
|
-
}, {
|
|
754
|
-
title: t("neetoWebhooks.tableHeaders.details"),
|
|
755
|
-
key: "details",
|
|
756
|
-
dataIndex: "details",
|
|
757
|
-
render: function render(_, delivery) {
|
|
758
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
759
|
-
label: t("neetoWebhooks.buttons.viewDetails"),
|
|
760
|
-
size: "small",
|
|
761
|
-
onClick: function onClick() {
|
|
762
|
-
return handleDetailsClick(delivery);
|
|
763
|
-
}
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
770
|
}];
|
|
767
771
|
};
|
|
768
772
|
|
|
@@ -882,7 +886,7 @@ var useCreateWebhook = function useCreateWebhook(options) {
|
|
|
882
886
|
onSuccess: function onSuccess() {
|
|
883
887
|
var _options$onSuccess;
|
|
884
888
|
queryClient.invalidateQueries(QUERY_KEYS.WEBHOOK_LIST);
|
|
885
|
-
options === null || options === void 0 || (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0
|
|
889
|
+
options === null || options === void 0 || (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 || _options$onSuccess.call(options);
|
|
886
890
|
}
|
|
887
891
|
});
|
|
888
892
|
};
|
|
@@ -906,7 +910,7 @@ var useUpdateWebhook = function useUpdateWebhook(id, options) {
|
|
|
906
910
|
queryClient.invalidateQueries(QUERY_KEYS.WEBHOOK_LIST);
|
|
907
911
|
queryClient.invalidateQueries([QUERY_KEYS.WEBHOOK_DETAILS, id]);
|
|
908
912
|
queryClient.invalidateQueries([QUERY_KEYS.DELIVERY_LIST, id]);
|
|
909
|
-
options === null || options === void 0 || (_options$onSuccess2 = options.onSuccess) === null || _options$onSuccess2 === void 0
|
|
913
|
+
options === null || options === void 0 || (_options$onSuccess2 = options.onSuccess) === null || _options$onSuccess2 === void 0 || _options$onSuccess2.call(options);
|
|
910
914
|
}
|
|
911
915
|
});
|
|
912
916
|
};
|
|
@@ -916,19 +920,19 @@ var useDestroyWebhook = function useDestroyWebhook(options) {
|
|
|
916
920
|
onSuccess: function onSuccess() {
|
|
917
921
|
var _options$onSuccess3;
|
|
918
922
|
queryClient.invalidateQueries(QUERY_KEYS.WEBHOOK_LIST);
|
|
919
|
-
options === null || options === void 0 || (_options$onSuccess3 = options.onSuccess) === null || _options$onSuccess3 === void 0
|
|
923
|
+
options === null || options === void 0 || (_options$onSuccess3 = options.onSuccess) === null || _options$onSuccess3 === void 0 || _options$onSuccess3.call(options);
|
|
920
924
|
}
|
|
921
925
|
});
|
|
922
926
|
};
|
|
923
927
|
|
|
924
|
-
function _typeof(
|
|
928
|
+
function _typeof(o) {
|
|
925
929
|
"@babel/helpers - typeof";
|
|
926
930
|
|
|
927
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
928
|
-
return typeof
|
|
929
|
-
} : function (
|
|
930
|
-
return
|
|
931
|
-
}, _typeof(
|
|
931
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
932
|
+
return typeof o;
|
|
933
|
+
} : function (o) {
|
|
934
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
935
|
+
}, _typeof(o);
|
|
932
936
|
}
|
|
933
937
|
|
|
934
938
|
function _toPrimitive(input, hint) {
|
|
@@ -983,27 +987,27 @@ var MENU_ITEMS = {
|
|
|
983
987
|
DELETE: "delete"
|
|
984
988
|
};
|
|
985
989
|
|
|
986
|
-
function ownKeys$1(
|
|
987
|
-
function _objectSpread$1(
|
|
990
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
991
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
988
992
|
var getMenuItems = function getMenuItems(_ref) {
|
|
989
993
|
var onEdit = _ref.onEdit,
|
|
990
994
|
onDelete = _ref.onDelete;
|
|
991
995
|
return [{
|
|
992
996
|
key: MENU_ITEMS.EDIT,
|
|
993
|
-
label: t("neetoWebhooks.buttons.edit"),
|
|
997
|
+
label: t$1("neetoWebhooks.buttons.edit"),
|
|
994
998
|
onClick: onEdit
|
|
995
999
|
}, {
|
|
996
1000
|
key: MENU_ITEMS.DELETE,
|
|
997
|
-
label: t("neetoWebhooks.buttons.delete"),
|
|
1001
|
+
label: t$1("neetoWebhooks.buttons.delete"),
|
|
998
1002
|
onClick: onDelete
|
|
999
1003
|
}];
|
|
1000
1004
|
};
|
|
1001
1005
|
var getValidationSchema = function getValidationSchema(webhooks) {
|
|
1002
1006
|
return yup.object().shape({
|
|
1003
|
-
endpoint: yup.string().trim().matches(/^(https?):\/\//i, t("neetoWebhooks.errors.webhook.invalidUrlProtocol")).url(t("neetoWebhooks.errors.webhook.invalidUrl")).required(t("neetoWebhooks.errors.webhook.required")).test("Is endpoint unique", t("neetoWebhooks.errors.webhook.urlNotUnique"), function (endpoint, ctx) {
|
|
1007
|
+
endpoint: yup.string().trim().matches(/^(https?):\/\//i, t$1("neetoWebhooks.errors.webhook.invalidUrlProtocol")).url(t$1("neetoWebhooks.errors.webhook.invalidUrl")).required(t$1("neetoWebhooks.errors.webhook.required")).test("Is endpoint unique", t$1("neetoWebhooks.errors.webhook.urlNotUnique"), function (endpoint, ctx) {
|
|
1004
1008
|
return !pluck("endpoint", removeById(ctx.parent.id, webhooks)).includes(endpoint === null || endpoint === void 0 ? void 0 : endpoint.trim());
|
|
1005
1009
|
}),
|
|
1006
|
-
events: yup.array().min(1, t("neetoWebhooks.errors.webhook.events.required")),
|
|
1010
|
+
events: yup.array().min(1, t$1("neetoWebhooks.errors.webhook.events.required")),
|
|
1007
1011
|
secret: yup.string().trim().nullable()
|
|
1008
1012
|
});
|
|
1009
1013
|
};
|
|
@@ -1042,9 +1046,10 @@ var buildColumns = function buildColumns(_ref6) {
|
|
|
1042
1046
|
handleEdit = _ref6.handleEdit,
|
|
1043
1047
|
deliveriesPath = _ref6.deliveriesPath;
|
|
1044
1048
|
return [{
|
|
1045
|
-
title: t("neetoWebhooks.common.endpoint"),
|
|
1049
|
+
title: t$1("neetoWebhooks.common.endpoint"),
|
|
1046
1050
|
key: "endpoint",
|
|
1047
1051
|
dataIndex: "endpoint",
|
|
1052
|
+
width: 830,
|
|
1048
1053
|
render: function render(endpoint, webhook) {
|
|
1049
1054
|
return /*#__PURE__*/React.createElement("div", {
|
|
1050
1055
|
className: "flex items-center justify-between space-x-3"
|
|
@@ -1068,15 +1073,15 @@ var buildColumns = function buildColumns(_ref6) {
|
|
|
1068
1073
|
}));
|
|
1069
1074
|
}
|
|
1070
1075
|
}, {
|
|
1071
|
-
title: t("neetoWebhooks.webhook.active"),
|
|
1076
|
+
title: t$1("neetoWebhooks.webhook.active"),
|
|
1072
1077
|
key: "isActive",
|
|
1073
1078
|
dataIndex: "isActive",
|
|
1074
1079
|
render: function render(isActive) {
|
|
1075
|
-
return isActive ? t("neetoWebhooks.webhook.activeStatuses.yes") : t("neetoWebhooks.webhook.activeStatuses.no");
|
|
1080
|
+
return isActive ? t$1("neetoWebhooks.webhook.activeStatuses.yes") : t$1("neetoWebhooks.webhook.activeStatuses.no");
|
|
1076
1081
|
},
|
|
1077
1082
|
width: 100
|
|
1078
1083
|
}, {
|
|
1079
|
-
title: t("neetoWebhooks.common.event", PLURAL),
|
|
1084
|
+
title: t$1("neetoWebhooks.common.event", PLURAL),
|
|
1080
1085
|
dataIndex: "events",
|
|
1081
1086
|
key: "events",
|
|
1082
1087
|
render: function render(events) {
|
|
@@ -1086,20 +1091,22 @@ var buildColumns = function buildColumns(_ref6) {
|
|
|
1086
1091
|
}];
|
|
1087
1092
|
};
|
|
1088
1093
|
|
|
1089
|
-
function ownKeys(
|
|
1090
|
-
function _objectSpread(
|
|
1094
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1095
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1091
1096
|
var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
1092
1097
|
var editingWebhookId = _ref.editingWebhookId,
|
|
1093
1098
|
entityId = _ref.entityId,
|
|
1094
1099
|
entityType = _ref.entityType,
|
|
1095
1100
|
isOpen = _ref.isOpen,
|
|
1096
1101
|
onClose = _ref.onClose,
|
|
1102
|
+
onCreate = _ref.onCreate,
|
|
1097
1103
|
webhooks = _ref.webhooks;
|
|
1098
1104
|
var _useTranslation = useTranslation(),
|
|
1099
1105
|
t = _useTranslation.t;
|
|
1100
1106
|
var _useCreateWebhook = useCreateWebhook({
|
|
1101
1107
|
onSuccess: function onSuccess() {
|
|
1102
|
-
|
|
1108
|
+
onClose();
|
|
1109
|
+
onCreate === null || onCreate === void 0 || onCreate();
|
|
1103
1110
|
}
|
|
1104
1111
|
}),
|
|
1105
1112
|
createWebhook = _useCreateWebhook.mutate;
|
|
@@ -1109,9 +1116,7 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1109
1116
|
_useShowWebhook$data3 = _useShowWebhook$data2.webhook,
|
|
1110
1117
|
webhook = _useShowWebhook$data3 === void 0 ? {} : _useShowWebhook$data3;
|
|
1111
1118
|
var _useUpdateWebhook = useUpdateWebhook(editingWebhookId, {
|
|
1112
|
-
onSuccess:
|
|
1113
|
-
return onClose();
|
|
1114
|
-
}
|
|
1119
|
+
onSuccess: onClose
|
|
1115
1120
|
}),
|
|
1116
1121
|
updateWebhook = _useUpdateWebhook.mutate;
|
|
1117
1122
|
var endpointRef = useRef();
|
|
@@ -1139,9 +1144,9 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1139
1144
|
}));
|
|
1140
1145
|
};
|
|
1141
1146
|
return /*#__PURE__*/React.createElement(Pane, {
|
|
1142
|
-
initialFocusRef: endpointRef,
|
|
1143
1147
|
isOpen: isOpen,
|
|
1144
|
-
onClose: onClose
|
|
1148
|
+
onClose: onClose,
|
|
1149
|
+
initialFocusRef: endpointRef
|
|
1145
1150
|
}, /*#__PURE__*/React.createElement(Pane.Header, {
|
|
1146
1151
|
className: "flex items-center space-x-3"
|
|
1147
1152
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
@@ -1256,7 +1261,9 @@ var Webhooks = function Webhooks(_ref) {
|
|
|
1256
1261
|
var deliveriesPath = _ref.deliveriesPath,
|
|
1257
1262
|
entityType = _ref.entityType,
|
|
1258
1263
|
breadcrumbs = _ref.breadcrumbs,
|
|
1259
|
-
entityId = _ref.entityId
|
|
1264
|
+
entityId = _ref.entityId,
|
|
1265
|
+
onCreate = _ref.onCreate,
|
|
1266
|
+
onDelete = _ref.onDelete;
|
|
1260
1267
|
var _useState = useState(),
|
|
1261
1268
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1262
1269
|
editingWebhookId = _useState2[0],
|
|
@@ -1294,7 +1301,8 @@ var Webhooks = function Webhooks(_ref) {
|
|
|
1294
1301
|
totalCount = _useFetchWebhooks$dat4 === void 0 ? 0 : _useFetchWebhooks$dat4;
|
|
1295
1302
|
var _useDestroyWebhook = useDestroyWebhook({
|
|
1296
1303
|
onSuccess: function onSuccess() {
|
|
1297
|
-
|
|
1304
|
+
setIsDeleteAlertOpen(false);
|
|
1305
|
+
onDelete === null || onDelete === void 0 || onDelete();
|
|
1298
1306
|
}
|
|
1299
1307
|
}),
|
|
1300
1308
|
isDeleting = _useDestroyWebhook.isLoading,
|
|
@@ -1344,6 +1352,7 @@ var Webhooks = function Webhooks(_ref) {
|
|
|
1344
1352
|
editingWebhookId: editingWebhookId,
|
|
1345
1353
|
entityId: entityId,
|
|
1346
1354
|
entityType: entityType,
|
|
1355
|
+
onCreate: onCreate,
|
|
1347
1356
|
webhooks: webhooks,
|
|
1348
1357
|
isOpen: isAddWebhookPaneOpen,
|
|
1349
1358
|
onClose: handlePaneClose
|
|
@@ -1371,7 +1380,9 @@ var NeetoWebhooks = function NeetoWebhooks(_ref) {
|
|
|
1371
1380
|
var entityType = _ref.entityType,
|
|
1372
1381
|
entityId = _ref.entityId,
|
|
1373
1382
|
_ref$breadcrumbs = _ref.breadcrumbs,
|
|
1374
|
-
breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs
|
|
1383
|
+
breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
|
|
1384
|
+
onCreate = _ref.onCreate,
|
|
1385
|
+
onDelete = _ref.onDelete;
|
|
1375
1386
|
var _useRouteMatch = useRouteMatch(),
|
|
1376
1387
|
webhooksPath = _useRouteMatch.path,
|
|
1377
1388
|
webhooksUrl = _useRouteMatch.url;
|
|
@@ -1384,19 +1395,26 @@ var NeetoWebhooks = function NeetoWebhooks(_ref) {
|
|
|
1384
1395
|
breadcrumbs: breadcrumbs,
|
|
1385
1396
|
deliveriesPath: deliveriesPath,
|
|
1386
1397
|
entityId: entityId,
|
|
1387
|
-
entityType: entityType
|
|
1398
|
+
entityType: entityType,
|
|
1399
|
+
onCreate: onCreate,
|
|
1400
|
+
onDelete: onDelete
|
|
1388
1401
|
});
|
|
1389
1402
|
}
|
|
1390
1403
|
}), /*#__PURE__*/React.createElement(Route, {
|
|
1391
|
-
path: deliveriesPath,
|
|
1392
1404
|
component: function component() {
|
|
1393
1405
|
return /*#__PURE__*/React.createElement(Deliveries$1, {
|
|
1394
1406
|
breadcrumbs: breadcrumbs,
|
|
1395
1407
|
webhooksUrl: webhooksUrl
|
|
1396
1408
|
});
|
|
1397
|
-
}
|
|
1409
|
+
},
|
|
1410
|
+
path: deliveriesPath
|
|
1398
1411
|
}));
|
|
1399
1412
|
};
|
|
1400
1413
|
|
|
1414
|
+
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
1415
|
+
|
|
1416
|
+
var css = ".neeto-molecules-header .neeto-molecules-header__breadcrumbs-wrap{flex-wrap:wrap}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3NyYy9zdHlsZXNoZWV0cy9tYWluLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0Usa0VBQ0UsY0FBSiIsInNvdXJjZXNDb250ZW50IjpbIi5uZWV0by1tb2xlY3VsZXMtaGVhZGVyIHtcbiAgLm5lZXRvLW1vbGVjdWxlcy1oZWFkZXJfX2JyZWFkY3J1bWJzLXdyYXAge1xuICAgIGZsZXgtd3JhcDogd3JhcDtcbiAgfVxufVxuIl19 */";
|
|
1417
|
+
n(css,{});
|
|
1418
|
+
|
|
1401
1419
|
export { NeetoWebhooks };
|
|
1402
1420
|
//# sourceMappingURL=index.js.map
|