@devtable/settings-form 8.13.5 → 8.13.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/settings-form.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Box as F, TextInput as D, Divider as Te, Group as O, NumberInput as
|
|
2
|
-
import { showNotification as V, updateNotification as
|
|
1
|
+
import { Box as F, TextInput as D, Divider as Te, Group as O, NumberInput as Wr, PasswordInput as de, Button as T, Modal as ne, Stack as ze, SegmentedControl as Yr, useMantineTheme as Kr, Tooltip as Br, Text as ue, LoadingOverlay as Oe, Table as Ae, Select as Gr, Switch as Hr } from "@mantine/core";
|
|
2
|
+
import { showNotification as V, updateNotification as k } from "@mantine/notifications";
|
|
3
3
|
import * as ee from "react";
|
|
4
|
-
import H, { useEffect as
|
|
5
|
-
import { Recycle as Jr, PlaylistAdd as
|
|
4
|
+
import H, { useEffect as xe, forwardRef as ke, useState as lr, useMemo as ur } from "react";
|
|
5
|
+
import { Recycle as Jr, PlaylistAdd as De, Trash as je, Edit as Xr } from "tabler-icons-react";
|
|
6
6
|
import Qr from "axios";
|
|
7
7
|
import Zr from "crypto-js";
|
|
8
8
|
import et from "lodash";
|
|
@@ -192,21 +192,21 @@ var ge = { exports: {} }, re = {};
|
|
|
192
192
|
* This source code is licensed under the MIT license found in the
|
|
193
193
|
* LICENSE file in the root directory of this source tree.
|
|
194
194
|
*/
|
|
195
|
-
var
|
|
195
|
+
var or;
|
|
196
196
|
function ut() {
|
|
197
|
-
if (
|
|
197
|
+
if (or)
|
|
198
198
|
return re;
|
|
199
|
-
|
|
199
|
+
or = 1;
|
|
200
200
|
var t = H, n = Symbol.for("react.element"), i = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, l = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
201
|
-
function c(d, p,
|
|
202
|
-
var S,
|
|
203
|
-
|
|
201
|
+
function c(d, p, v) {
|
|
202
|
+
var S, h = {}, f = null, z = null;
|
|
203
|
+
v !== void 0 && (f = "" + v), p.key !== void 0 && (f = "" + p.key), p.ref !== void 0 && (z = p.ref);
|
|
204
204
|
for (S in p)
|
|
205
|
-
o.call(p, S) && !s.hasOwnProperty(S) && (
|
|
205
|
+
o.call(p, S) && !s.hasOwnProperty(S) && (h[S] = p[S]);
|
|
206
206
|
if (d && d.defaultProps)
|
|
207
207
|
for (S in p = d.defaultProps, p)
|
|
208
|
-
|
|
209
|
-
return { $$typeof: n, type: d, key: f, ref: z, props:
|
|
208
|
+
h[S] === void 0 && (h[S] = p[S]);
|
|
209
|
+
return { $$typeof: n, type: d, key: f, ref: z, props: h, _owner: l.current };
|
|
210
210
|
}
|
|
211
211
|
return re.Fragment = i, re.jsx = c, re.jsxs = c, re;
|
|
212
212
|
}
|
|
@@ -220,18 +220,18 @@ var te = {};
|
|
|
220
220
|
* This source code is licensed under the MIT license found in the
|
|
221
221
|
* LICENSE file in the root directory of this source tree.
|
|
222
222
|
*/
|
|
223
|
-
var
|
|
223
|
+
var sr;
|
|
224
224
|
function dt() {
|
|
225
|
-
return
|
|
226
|
-
var t = H, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), d = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"),
|
|
227
|
-
function
|
|
225
|
+
return sr || (sr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
226
|
+
var t = H, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), d = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), z = Symbol.for("react.offscreen"), q = Symbol.iterator, W = "@@iterator";
|
|
227
|
+
function me(e) {
|
|
228
228
|
if (e === null || typeof e != "object")
|
|
229
229
|
return null;
|
|
230
|
-
var a = q && e[q] || e[
|
|
230
|
+
var a = q && e[q] || e[W];
|
|
231
231
|
return typeof a == "function" ? a : null;
|
|
232
232
|
}
|
|
233
233
|
var U = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
234
|
-
function
|
|
234
|
+
function A(e) {
|
|
235
235
|
{
|
|
236
236
|
for (var a = arguments.length, u = new Array(a > 1 ? a - 1 : 0), g = 1; g < a; g++)
|
|
237
237
|
u[g - 1] = arguments[g];
|
|
@@ -248,25 +248,25 @@ function dt() {
|
|
|
248
248
|
y.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, y);
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
var fr = !1, pr = !1, gr = !1,
|
|
252
|
-
|
|
253
|
-
function
|
|
254
|
-
return !!(typeof e == "string" || typeof e == "function" || e === o || e === s ||
|
|
251
|
+
var fr = !1, pr = !1, gr = !1, hr = !1, mr = !1, Fe;
|
|
252
|
+
Fe = Symbol.for("react.module.reference");
|
|
253
|
+
function br(e) {
|
|
254
|
+
return !!(typeof e == "string" || typeof e == "function" || e === o || e === s || mr || e === l || e === v || e === S || hr || e === z || fr || pr || gr || typeof e == "object" && e !== null && (e.$$typeof === f || e.$$typeof === h || e.$$typeof === c || e.$$typeof === d || e.$$typeof === p || e.$$typeof === Fe || e.getModuleId !== void 0));
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function vr(e, a, u) {
|
|
257
257
|
var g = e.displayName;
|
|
258
258
|
if (g)
|
|
259
259
|
return g;
|
|
260
260
|
var _ = a.displayName || a.name || "";
|
|
261
261
|
return _ !== "" ? u + "(" + _ + ")" : u;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function qe(e) {
|
|
264
264
|
return e.displayName || "Context";
|
|
265
265
|
}
|
|
266
266
|
function L(e) {
|
|
267
267
|
if (e == null)
|
|
268
268
|
return null;
|
|
269
|
-
if (typeof e.tag == "number" &&
|
|
269
|
+
if (typeof e.tag == "number" && A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
270
270
|
return e.displayName || e.name || null;
|
|
271
271
|
if (typeof e == "string")
|
|
272
272
|
return e;
|
|
@@ -279,7 +279,7 @@ function dt() {
|
|
|
279
279
|
return "Profiler";
|
|
280
280
|
case l:
|
|
281
281
|
return "StrictMode";
|
|
282
|
-
case
|
|
282
|
+
case v:
|
|
283
283
|
return "Suspense";
|
|
284
284
|
case S:
|
|
285
285
|
return "SuspenseList";
|
|
@@ -288,13 +288,13 @@ function dt() {
|
|
|
288
288
|
switch (e.$$typeof) {
|
|
289
289
|
case d:
|
|
290
290
|
var a = e;
|
|
291
|
-
return
|
|
291
|
+
return qe(a) + ".Consumer";
|
|
292
292
|
case c:
|
|
293
293
|
var u = e;
|
|
294
|
-
return
|
|
294
|
+
return qe(u._context) + ".Provider";
|
|
295
295
|
case p:
|
|
296
|
-
return
|
|
297
|
-
case
|
|
296
|
+
return vr(e, e.render, "ForwardRef");
|
|
297
|
+
case h:
|
|
298
298
|
var g = e.displayName || null;
|
|
299
299
|
return g !== null ? g : L(e.type) || "Memo";
|
|
300
300
|
case f: {
|
|
@@ -308,18 +308,18 @@ function dt() {
|
|
|
308
308
|
}
|
|
309
309
|
return null;
|
|
310
310
|
}
|
|
311
|
-
var Y = Object.assign, Q = 0,
|
|
312
|
-
function
|
|
311
|
+
var Y = Object.assign, Q = 0, Le, Me, Ne, Ue, Ve, $e, We;
|
|
312
|
+
function Ye() {
|
|
313
313
|
}
|
|
314
|
-
|
|
314
|
+
Ye.__reactDisabledLog = !0;
|
|
315
315
|
function wr() {
|
|
316
316
|
{
|
|
317
317
|
if (Q === 0) {
|
|
318
|
-
|
|
318
|
+
Le = console.log, Me = console.info, Ne = console.warn, Ue = console.error, Ve = console.group, $e = console.groupCollapsed, We = console.groupEnd;
|
|
319
319
|
var e = {
|
|
320
320
|
configurable: !0,
|
|
321
321
|
enumerable: !0,
|
|
322
|
-
value:
|
|
322
|
+
value: Ye,
|
|
323
323
|
writable: !0
|
|
324
324
|
};
|
|
325
325
|
Object.defineProperties(console, {
|
|
@@ -345,43 +345,43 @@ function dt() {
|
|
|
345
345
|
};
|
|
346
346
|
Object.defineProperties(console, {
|
|
347
347
|
log: Y({}, e, {
|
|
348
|
-
value:
|
|
348
|
+
value: Le
|
|
349
349
|
}),
|
|
350
350
|
info: Y({}, e, {
|
|
351
|
-
value:
|
|
351
|
+
value: Me
|
|
352
352
|
}),
|
|
353
353
|
warn: Y({}, e, {
|
|
354
|
-
value:
|
|
354
|
+
value: Ne
|
|
355
355
|
}),
|
|
356
356
|
error: Y({}, e, {
|
|
357
|
-
value:
|
|
357
|
+
value: Ue
|
|
358
358
|
}),
|
|
359
359
|
group: Y({}, e, {
|
|
360
|
-
value:
|
|
360
|
+
value: Ve
|
|
361
361
|
}),
|
|
362
362
|
groupCollapsed: Y({}, e, {
|
|
363
|
-
value:
|
|
363
|
+
value: $e
|
|
364
364
|
}),
|
|
365
365
|
groupEnd: Y({}, e, {
|
|
366
366
|
value: We
|
|
367
367
|
})
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
|
-
Q < 0 &&
|
|
370
|
+
Q < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
var
|
|
373
|
+
var be = U.ReactCurrentDispatcher, ve;
|
|
374
374
|
function ae(e, a, u) {
|
|
375
375
|
{
|
|
376
|
-
if (
|
|
376
|
+
if (ve === void 0)
|
|
377
377
|
try {
|
|
378
378
|
throw Error();
|
|
379
379
|
} catch (_) {
|
|
380
380
|
var g = _.stack.trim().match(/\n( *(at )?)/);
|
|
381
|
-
|
|
381
|
+
ve = g && g[1] || "";
|
|
382
382
|
}
|
|
383
383
|
return `
|
|
384
|
-
` +
|
|
384
|
+
` + ve + e;
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
var we = !1, ie;
|
|
@@ -389,7 +389,7 @@ function dt() {
|
|
|
389
389
|
var _r = typeof WeakMap == "function" ? WeakMap : Map;
|
|
390
390
|
ie = new _r();
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function Ke(e, a) {
|
|
393
393
|
if (!e || we)
|
|
394
394
|
return "";
|
|
395
395
|
{
|
|
@@ -402,7 +402,7 @@ function dt() {
|
|
|
402
402
|
var _ = Error.prepareStackTrace;
|
|
403
403
|
Error.prepareStackTrace = void 0;
|
|
404
404
|
var y;
|
|
405
|
-
y =
|
|
405
|
+
y = be.current, be.current = null, wr();
|
|
406
406
|
try {
|
|
407
407
|
if (a) {
|
|
408
408
|
var w = function() {
|
|
@@ -437,17 +437,17 @@ function dt() {
|
|
|
437
437
|
}
|
|
438
438
|
} catch (M) {
|
|
439
439
|
if (M && g && typeof M.stack == "string") {
|
|
440
|
-
for (var
|
|
441
|
-
`),
|
|
442
|
-
`), P =
|
|
440
|
+
for (var m = M.stack.split(`
|
|
441
|
+
`), x = g.stack.split(`
|
|
442
|
+
`), P = m.length - 1, E = x.length - 1; P >= 1 && E >= 0 && m[P] !== x[E]; )
|
|
443
443
|
E--;
|
|
444
444
|
for (; P >= 1 && E >= 0; P--, E--)
|
|
445
|
-
if (
|
|
445
|
+
if (m[P] !== x[E]) {
|
|
446
446
|
if (P !== 1 || E !== 1)
|
|
447
447
|
do
|
|
448
|
-
if (P--, E--, E < 0 ||
|
|
448
|
+
if (P--, E--, E < 0 || m[P] !== x[E]) {
|
|
449
449
|
var I = `
|
|
450
|
-
` +
|
|
450
|
+
` + m[P].replace(" at new ", " at ");
|
|
451
451
|
return e.displayName && I.includes("<anonymous>") && (I = I.replace("<anonymous>", e.displayName)), typeof e == "function" && ie.set(e, I), I;
|
|
452
452
|
}
|
|
453
453
|
while (P >= 1 && E >= 0);
|
|
@@ -455,13 +455,13 @@ function dt() {
|
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
} finally {
|
|
458
|
-
we = !1,
|
|
458
|
+
we = !1, be.current = y, Sr(), Error.prepareStackTrace = _;
|
|
459
459
|
}
|
|
460
|
-
var B = e ? e.displayName || e.name : "",
|
|
461
|
-
return typeof e == "function" && ie.set(e,
|
|
460
|
+
var B = e ? e.displayName || e.name : "", ir = B ? ae(B) : "";
|
|
461
|
+
return typeof e == "function" && ie.set(e, ir), ir;
|
|
462
462
|
}
|
|
463
463
|
function yr(e, a, u) {
|
|
464
|
-
return
|
|
464
|
+
return Ke(e, !1);
|
|
465
465
|
}
|
|
466
466
|
function Rr(e) {
|
|
467
467
|
var a = e.prototype;
|
|
@@ -471,11 +471,11 @@ function dt() {
|
|
|
471
471
|
if (e == null)
|
|
472
472
|
return "";
|
|
473
473
|
if (typeof e == "function")
|
|
474
|
-
return
|
|
474
|
+
return Ke(e, Rr(e));
|
|
475
475
|
if (typeof e == "string")
|
|
476
476
|
return ae(e);
|
|
477
477
|
switch (e) {
|
|
478
|
-
case
|
|
478
|
+
case v:
|
|
479
479
|
return ae("Suspense");
|
|
480
480
|
case S:
|
|
481
481
|
return ae("SuspenseList");
|
|
@@ -484,7 +484,7 @@ function dt() {
|
|
|
484
484
|
switch (e.$$typeof) {
|
|
485
485
|
case p:
|
|
486
486
|
return yr(e.render);
|
|
487
|
-
case
|
|
487
|
+
case h:
|
|
488
488
|
return oe(e.type, a, u);
|
|
489
489
|
case f: {
|
|
490
490
|
var g = e, _ = g._payload, y = g._init;
|
|
@@ -496,30 +496,30 @@ function dt() {
|
|
|
496
496
|
}
|
|
497
497
|
return "";
|
|
498
498
|
}
|
|
499
|
-
var se = Object.prototype.hasOwnProperty,
|
|
499
|
+
var se = Object.prototype.hasOwnProperty, Be = {}, Ge = U.ReactDebugCurrentFrame;
|
|
500
500
|
function ce(e) {
|
|
501
501
|
if (e) {
|
|
502
502
|
var a = e._owner, u = oe(e.type, e._source, a ? a.type : null);
|
|
503
|
-
|
|
503
|
+
Ge.setExtraStackFrame(u);
|
|
504
504
|
} else
|
|
505
|
-
|
|
505
|
+
Ge.setExtraStackFrame(null);
|
|
506
506
|
}
|
|
507
507
|
function Pr(e, a, u, g, _) {
|
|
508
508
|
{
|
|
509
509
|
var y = Function.call.bind(se);
|
|
510
510
|
for (var w in e)
|
|
511
511
|
if (y(e, w)) {
|
|
512
|
-
var
|
|
512
|
+
var m = void 0;
|
|
513
513
|
try {
|
|
514
514
|
if (typeof e[w] != "function") {
|
|
515
|
-
var
|
|
516
|
-
throw
|
|
515
|
+
var x = Error((g || "React class") + ": " + u + " type `" + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[w] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
516
|
+
throw x.name = "Invariant Violation", x;
|
|
517
517
|
}
|
|
518
|
-
|
|
518
|
+
m = e[w](a, w, g, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
519
519
|
} catch (P) {
|
|
520
|
-
|
|
520
|
+
m = P;
|
|
521
521
|
}
|
|
522
|
-
|
|
522
|
+
m && !(m instanceof Error) && (ce(_), A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", u, w, typeof m), ce(null)), m instanceof Error && !(m.message in Be) && (Be[m.message] = !0, ce(_), A("Failed %s type: %s", u, m.message), ce(null));
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
}
|
|
@@ -535,24 +535,24 @@ function dt() {
|
|
|
535
535
|
}
|
|
536
536
|
function Tr(e) {
|
|
537
537
|
try {
|
|
538
|
-
return
|
|
538
|
+
return He(e), !1;
|
|
539
539
|
} catch {
|
|
540
540
|
return !0;
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function He(e) {
|
|
544
544
|
return "" + e;
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function Je(e) {
|
|
547
547
|
if (Tr(e))
|
|
548
|
-
return
|
|
548
|
+
return A("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Cr(e)), He(e);
|
|
549
549
|
}
|
|
550
550
|
var Z = U.ReactCurrentOwner, zr = {
|
|
551
551
|
key: !0,
|
|
552
552
|
ref: !0,
|
|
553
553
|
__self: !0,
|
|
554
554
|
__source: !0
|
|
555
|
-
},
|
|
555
|
+
}, Xe, Qe, _e;
|
|
556
556
|
_e = {};
|
|
557
557
|
function Or(e) {
|
|
558
558
|
if (se.call(e, "ref")) {
|
|
@@ -562,7 +562,7 @@ function dt() {
|
|
|
562
562
|
}
|
|
563
563
|
return e.ref !== void 0;
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function Ar(e) {
|
|
566
566
|
if (se.call(e, "key")) {
|
|
567
567
|
var a = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
568
568
|
if (a && a.isReactWarning)
|
|
@@ -570,16 +570,16 @@ function dt() {
|
|
|
570
570
|
}
|
|
571
571
|
return e.key !== void 0;
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function xr(e, a) {
|
|
574
574
|
if (typeof e.ref == "string" && Z.current && a && Z.current.stateNode !== a) {
|
|
575
575
|
var u = L(Z.current.type);
|
|
576
|
-
_e[u] || (
|
|
576
|
+
_e[u] || (A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', L(Z.current.type), e.ref), _e[u] = !0);
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function kr(e, a) {
|
|
580
580
|
{
|
|
581
581
|
var u = function() {
|
|
582
|
-
|
|
582
|
+
Xe || (Xe = !0, A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
|
|
583
583
|
};
|
|
584
584
|
u.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
585
585
|
get: u,
|
|
@@ -590,7 +590,7 @@ function dt() {
|
|
|
590
590
|
function Dr(e, a) {
|
|
591
591
|
{
|
|
592
592
|
var u = function() {
|
|
593
|
-
|
|
593
|
+
Qe || (Qe = !0, A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
|
|
594
594
|
};
|
|
595
595
|
u.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
596
596
|
get: u,
|
|
@@ -599,7 +599,7 @@ function dt() {
|
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
var jr = function(e, a, u, g, _, y, w) {
|
|
602
|
-
var
|
|
602
|
+
var m = {
|
|
603
603
|
$$typeof: n,
|
|
604
604
|
type: e,
|
|
605
605
|
key: a,
|
|
@@ -607,27 +607,27 @@ function dt() {
|
|
|
607
607
|
props: w,
|
|
608
608
|
_owner: y
|
|
609
609
|
};
|
|
610
|
-
return
|
|
610
|
+
return m._store = {}, Object.defineProperty(m._store, "validated", {
|
|
611
611
|
configurable: !1,
|
|
612
612
|
enumerable: !1,
|
|
613
613
|
writable: !0,
|
|
614
614
|
value: !1
|
|
615
|
-
}), Object.defineProperty(
|
|
615
|
+
}), Object.defineProperty(m, "_self", {
|
|
616
616
|
configurable: !1,
|
|
617
617
|
enumerable: !1,
|
|
618
618
|
writable: !1,
|
|
619
619
|
value: g
|
|
620
|
-
}), Object.defineProperty(
|
|
620
|
+
}), Object.defineProperty(m, "_source", {
|
|
621
621
|
configurable: !1,
|
|
622
622
|
enumerable: !1,
|
|
623
623
|
writable: !1,
|
|
624
624
|
value: _
|
|
625
|
-
}), Object.freeze && (Object.freeze(
|
|
625
|
+
}), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
|
|
626
626
|
};
|
|
627
627
|
function Ir(e, a, u, g, _) {
|
|
628
628
|
{
|
|
629
|
-
var y, w = {},
|
|
630
|
-
u !== void 0 && (
|
|
629
|
+
var y, w = {}, m = null, x = null;
|
|
630
|
+
u !== void 0 && (Je(u), m = "" + u), Ar(a) && (Je(a.key), m = "" + a.key), Or(a) && (x = a.ref, xr(a, _));
|
|
631
631
|
for (y in a)
|
|
632
632
|
se.call(a, y) && !zr.hasOwnProperty(y) && (w[y] = a[y]);
|
|
633
633
|
if (e && e.defaultProps) {
|
|
@@ -635,27 +635,27 @@ function dt() {
|
|
|
635
635
|
for (y in P)
|
|
636
636
|
w[y] === void 0 && (w[y] = P[y]);
|
|
637
637
|
}
|
|
638
|
-
if (
|
|
638
|
+
if (m || x) {
|
|
639
639
|
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
640
|
-
|
|
640
|
+
m && kr(w, E), x && Dr(w, E);
|
|
641
641
|
}
|
|
642
|
-
return jr(e,
|
|
642
|
+
return jr(e, m, x, _, g, Z.current, w);
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
|
-
var ye = U.ReactCurrentOwner,
|
|
645
|
+
var ye = U.ReactCurrentOwner, Ze = U.ReactDebugCurrentFrame;
|
|
646
646
|
function K(e) {
|
|
647
647
|
if (e) {
|
|
648
648
|
var a = e._owner, u = oe(e.type, e._source, a ? a.type : null);
|
|
649
|
-
|
|
649
|
+
Ze.setExtraStackFrame(u);
|
|
650
650
|
} else
|
|
651
|
-
|
|
651
|
+
Ze.setExtraStackFrame(null);
|
|
652
652
|
}
|
|
653
653
|
var Re;
|
|
654
654
|
Re = !1;
|
|
655
655
|
function Pe(e) {
|
|
656
656
|
return typeof e == "object" && e !== null && e.$$typeof === n;
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function er() {
|
|
659
659
|
{
|
|
660
660
|
if (ye.current) {
|
|
661
661
|
var e = L(ye.current.type);
|
|
@@ -678,10 +678,10 @@ Check your code at ` + a + ":" + u + ".";
|
|
|
678
678
|
return "";
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
var
|
|
681
|
+
var rr = {};
|
|
682
682
|
function qr(e) {
|
|
683
683
|
{
|
|
684
|
-
var a =
|
|
684
|
+
var a = er();
|
|
685
685
|
if (!a) {
|
|
686
686
|
var u = typeof e == "string" ? e : e.displayName || e.name;
|
|
687
687
|
u && (a = `
|
|
@@ -691,35 +691,35 @@ Check the top-level render call using <` + u + ">.");
|
|
|
691
691
|
return a;
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function tr(e, a) {
|
|
695
695
|
{
|
|
696
696
|
if (!e._store || e._store.validated || e.key != null)
|
|
697
697
|
return;
|
|
698
698
|
e._store.validated = !0;
|
|
699
699
|
var u = qr(a);
|
|
700
|
-
if (
|
|
700
|
+
if (rr[u])
|
|
701
701
|
return;
|
|
702
|
-
|
|
702
|
+
rr[u] = !0;
|
|
703
703
|
var g = "";
|
|
704
|
-
e && e._owner && e._owner !== ye.current && (g = " It was passed a child from " + L(e._owner.type) + "."), K(e),
|
|
704
|
+
e && e._owner && e._owner !== ye.current && (g = " It was passed a child from " + L(e._owner.type) + "."), K(e), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, g), K(null);
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function nr(e, a) {
|
|
708
708
|
{
|
|
709
709
|
if (typeof e != "object")
|
|
710
710
|
return;
|
|
711
711
|
if (Se(e))
|
|
712
712
|
for (var u = 0; u < e.length; u++) {
|
|
713
713
|
var g = e[u];
|
|
714
|
-
Pe(g) &&
|
|
714
|
+
Pe(g) && tr(g, a);
|
|
715
715
|
}
|
|
716
716
|
else if (Pe(e))
|
|
717
717
|
e._store && (e._store.validated = !0);
|
|
718
718
|
else if (e) {
|
|
719
|
-
var _ =
|
|
719
|
+
var _ = me(e);
|
|
720
720
|
if (typeof _ == "function" && _ !== e.entries)
|
|
721
721
|
for (var y = _.call(e), w; !(w = y.next()).done; )
|
|
722
|
-
Pe(w.value) &&
|
|
722
|
+
Pe(w.value) && tr(w.value, a);
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
725
|
}
|
|
@@ -731,7 +731,7 @@ Check the top-level render call using <` + u + ">.");
|
|
|
731
731
|
var u;
|
|
732
732
|
if (typeof a == "function")
|
|
733
733
|
u = a.propTypes;
|
|
734
|
-
else if (typeof a == "object" && (a.$$typeof === p || a.$$typeof ===
|
|
734
|
+
else if (typeof a == "object" && (a.$$typeof === p || a.$$typeof === h))
|
|
735
735
|
u = a.propTypes;
|
|
736
736
|
else
|
|
737
737
|
return;
|
|
@@ -741,9 +741,9 @@ Check the top-level render call using <` + u + ">.");
|
|
|
741
741
|
} else if (a.PropTypes !== void 0 && !Re) {
|
|
742
742
|
Re = !0;
|
|
743
743
|
var _ = L(a);
|
|
744
|
-
|
|
744
|
+
A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _ || "Unknown");
|
|
745
745
|
}
|
|
746
|
-
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved &&
|
|
746
|
+
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
749
|
function Mr(e) {
|
|
@@ -751,23 +751,23 @@ Check the top-level render call using <` + u + ">.");
|
|
|
751
751
|
for (var a = Object.keys(e.props), u = 0; u < a.length; u++) {
|
|
752
752
|
var g = a[u];
|
|
753
753
|
if (g !== "children" && g !== "key") {
|
|
754
|
-
K(e),
|
|
754
|
+
K(e), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), K(null);
|
|
755
755
|
break;
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
|
-
e.ref !== null && (K(e),
|
|
758
|
+
e.ref !== null && (K(e), A("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function ar(e, a, u, g, _, y) {
|
|
762
762
|
{
|
|
763
|
-
var w =
|
|
763
|
+
var w = br(e);
|
|
764
764
|
if (!w) {
|
|
765
|
-
var
|
|
766
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
767
|
-
var
|
|
768
|
-
|
|
765
|
+
var m = "";
|
|
766
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (m += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
767
|
+
var x = Fr(_);
|
|
768
|
+
x ? m += x : m += er();
|
|
769
769
|
var P;
|
|
770
|
-
e === null ? P = "null" : Se(e) ? P = "array" : e !== void 0 && e.$$typeof === n ? (P = "<" + (L(e.type) || "Unknown") + " />",
|
|
770
|
+
e === null ? P = "null" : Se(e) ? P = "array" : e !== void 0 && e.$$typeof === n ? (P = "<" + (L(e.type) || "Unknown") + " />", m = " Did you accidentally export a JSX literal instead of a component?") : P = typeof e, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", P, m);
|
|
771
771
|
}
|
|
772
772
|
var E = Ir(e, a, u, _, y);
|
|
773
773
|
if (E == null)
|
|
@@ -778,30 +778,30 @@ Check the top-level render call using <` + u + ">.");
|
|
|
778
778
|
if (g)
|
|
779
779
|
if (Se(I)) {
|
|
780
780
|
for (var B = 0; B < I.length; B++)
|
|
781
|
-
|
|
781
|
+
nr(I[B], e);
|
|
782
782
|
Object.freeze && Object.freeze(I);
|
|
783
783
|
} else
|
|
784
|
-
|
|
784
|
+
A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
785
785
|
else
|
|
786
|
-
|
|
786
|
+
nr(I, e);
|
|
787
787
|
}
|
|
788
788
|
return e === o ? Mr(E) : Lr(E), E;
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
function Nr(e, a, u) {
|
|
792
|
-
return
|
|
792
|
+
return ar(e, a, u, !0);
|
|
793
793
|
}
|
|
794
794
|
function Ur(e, a, u) {
|
|
795
|
-
return
|
|
795
|
+
return ar(e, a, u, !1);
|
|
796
796
|
}
|
|
797
|
-
var Vr = Ur,
|
|
798
|
-
te.Fragment = o, te.jsx = Vr, te.jsxs =
|
|
797
|
+
var Vr = Ur, $r = Nr;
|
|
798
|
+
te.Fragment = o, te.jsx = Vr, te.jsxs = $r;
|
|
799
799
|
}()), te;
|
|
800
800
|
}
|
|
801
801
|
(function(t) {
|
|
802
802
|
process.env.NODE_ENV === "production" ? t.exports = ut() : t.exports = dt();
|
|
803
803
|
})(ge);
|
|
804
|
-
const N = ge.exports.Fragment, r = ge.exports.jsx,
|
|
804
|
+
const N = ge.exports.Fragment, r = ge.exports.jsx, b = ge.exports.jsxs;
|
|
805
805
|
function ft({
|
|
806
806
|
submit: t,
|
|
807
807
|
styles: n = X,
|
|
@@ -824,11 +824,11 @@ function ft({
|
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
826
|
});
|
|
827
|
-
return
|
|
827
|
+
return xe(() => {
|
|
828
828
|
l("type", i);
|
|
829
829
|
}, [l, i]), /* @__PURE__ */ r(F, {
|
|
830
830
|
mx: "auto",
|
|
831
|
-
children: /* @__PURE__ */
|
|
831
|
+
children: /* @__PURE__ */ b("form", {
|
|
832
832
|
onSubmit: s(t),
|
|
833
833
|
children: [/* @__PURE__ */ r(R, {
|
|
834
834
|
name: "key",
|
|
@@ -846,7 +846,7 @@ function ft({
|
|
|
846
846
|
}), /* @__PURE__ */ r(Te, {
|
|
847
847
|
label: "Connection Info",
|
|
848
848
|
labelPosition: "center"
|
|
849
|
-
}), /* @__PURE__ */
|
|
849
|
+
}), /* @__PURE__ */ b(O, {
|
|
850
850
|
grow: !0,
|
|
851
851
|
children: [/* @__PURE__ */ r(R, {
|
|
852
852
|
name: "config.host",
|
|
@@ -868,7 +868,7 @@ function ft({
|
|
|
868
868
|
control: o,
|
|
869
869
|
render: ({
|
|
870
870
|
field: c
|
|
871
|
-
}) => /* @__PURE__ */ r(
|
|
871
|
+
}) => /* @__PURE__ */ r(Wr, {
|
|
872
872
|
mb: n.spacing,
|
|
873
873
|
size: n.size,
|
|
874
874
|
required: !0,
|
|
@@ -928,26 +928,7 @@ function ft({
|
|
|
928
928
|
})
|
|
929
929
|
});
|
|
930
930
|
}
|
|
931
|
-
|
|
932
|
-
getWorker: function(t, n) {
|
|
933
|
-
const i = (o, l) => new Worker(self.MonacoEnvironment.getWorker(o), {
|
|
934
|
-
name: l,
|
|
935
|
-
type: "module"
|
|
936
|
-
});
|
|
937
|
-
switch (n) {
|
|
938
|
-
case "typescript":
|
|
939
|
-
case "javascript":
|
|
940
|
-
return i("/monaco-editor/min/vs/language/typescript/ts.worker?worker", n);
|
|
941
|
-
default:
|
|
942
|
-
return i("/monaco-editor/min/vs/editor/editor.worker?worker", n);
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
};
|
|
946
|
-
function pt() {
|
|
947
|
-
Ee.__getMonacoInstance() || (console.log("loading monaco"), Ee.config({ paths: { vs: "/assets/monaco-editor/min/vs" } }), Ee.init().then((n) => console.log("here is the monaco instance:", n)));
|
|
948
|
-
}
|
|
949
|
-
pt();
|
|
950
|
-
const gt = ({
|
|
931
|
+
const pt = ({
|
|
951
932
|
value: t,
|
|
952
933
|
onChange: n
|
|
953
934
|
}) => /* @__PURE__ */ r(F, {
|
|
@@ -968,7 +949,7 @@ const gt = ({
|
|
|
968
949
|
}
|
|
969
950
|
}
|
|
970
951
|
})
|
|
971
|
-
}),
|
|
952
|
+
}), cr = ke(({
|
|
972
953
|
value: t,
|
|
973
954
|
onChange: n,
|
|
974
955
|
label: i,
|
|
@@ -978,17 +959,17 @@ const gt = ({
|
|
|
978
959
|
}, c) => {
|
|
979
960
|
const [d, {
|
|
980
961
|
setTrue: p,
|
|
981
|
-
setFalse:
|
|
982
|
-
}] = rt(), [S,
|
|
983
|
-
|
|
962
|
+
setFalse: v
|
|
963
|
+
}] = rt(), [S, h] = lr(t), f = () => {
|
|
964
|
+
v(), n(S);
|
|
984
965
|
}, z = () => {
|
|
985
|
-
|
|
966
|
+
v(), h(t);
|
|
986
967
|
}, q = () => {
|
|
987
|
-
|
|
968
|
+
h(l);
|
|
988
969
|
};
|
|
989
|
-
return
|
|
990
|
-
|
|
991
|
-
}, [t]), /* @__PURE__ */
|
|
970
|
+
return xe(() => {
|
|
971
|
+
h(t);
|
|
972
|
+
}, [t]), /* @__PURE__ */ b(N, {
|
|
992
973
|
children: [/* @__PURE__ */ r(T, {
|
|
993
974
|
variant: "filled",
|
|
994
975
|
size: s.button.size,
|
|
@@ -1001,14 +982,14 @@ const gt = ({
|
|
|
1001
982
|
size: 800,
|
|
1002
983
|
title: o,
|
|
1003
984
|
opened: d,
|
|
1004
|
-
onClose:
|
|
985
|
+
onClose: v,
|
|
1005
986
|
closeOnClickOutside: !1,
|
|
1006
987
|
withCloseButton: !1,
|
|
1007
|
-
children: d && /* @__PURE__ */
|
|
1008
|
-
children: [/* @__PURE__ */ r(
|
|
988
|
+
children: d && /* @__PURE__ */ b(ze, {
|
|
989
|
+
children: [/* @__PURE__ */ r(pt, {
|
|
1009
990
|
value: S,
|
|
1010
|
-
onChange:
|
|
1011
|
-
}), /* @__PURE__ */
|
|
991
|
+
onChange: h
|
|
992
|
+
}), /* @__PURE__ */ b(O, {
|
|
1012
993
|
position: "apart",
|
|
1013
994
|
children: [/* @__PURE__ */ r(T, {
|
|
1014
995
|
onClick: q,
|
|
@@ -1017,7 +998,7 @@ const gt = ({
|
|
|
1017
998
|
size: 20
|
|
1018
999
|
}),
|
|
1019
1000
|
children: "Rest"
|
|
1020
|
-
}), /* @__PURE__ */
|
|
1001
|
+
}), /* @__PURE__ */ b(O, {
|
|
1021
1002
|
position: "right",
|
|
1022
1003
|
children: [/* @__PURE__ */ r(T, {
|
|
1023
1004
|
onClick: z,
|
|
@@ -1038,7 +1019,7 @@ const gt = ({
|
|
|
1038
1019
|
post: ["function post_process(res, utils) {", " // your code goes here", " return data", "}"].join(`
|
|
1039
1020
|
`)
|
|
1040
1021
|
};
|
|
1041
|
-
function
|
|
1022
|
+
function gt({
|
|
1042
1023
|
submit: t,
|
|
1043
1024
|
styles: n = X
|
|
1044
1025
|
}) {
|
|
@@ -1061,7 +1042,7 @@ function mt({
|
|
|
1061
1042
|
});
|
|
1062
1043
|
return /* @__PURE__ */ r(F, {
|
|
1063
1044
|
mx: "auto",
|
|
1064
|
-
children: /* @__PURE__ */
|
|
1045
|
+
children: /* @__PURE__ */ b("form", {
|
|
1065
1046
|
onSubmit: l(t),
|
|
1066
1047
|
children: [/* @__PURE__ */ r(R, {
|
|
1067
1048
|
name: "key",
|
|
@@ -1094,14 +1075,14 @@ function mt({
|
|
|
1094
1075
|
},
|
|
1095
1076
|
...s
|
|
1096
1077
|
})
|
|
1097
|
-
}), /* @__PURE__ */
|
|
1078
|
+
}), /* @__PURE__ */ b(O, {
|
|
1098
1079
|
grow: !0,
|
|
1099
1080
|
children: [/* @__PURE__ */ r(R, {
|
|
1100
1081
|
name: "config.processing.pre",
|
|
1101
1082
|
control: i,
|
|
1102
1083
|
render: ({
|
|
1103
1084
|
field: s
|
|
1104
|
-
}) => /* @__PURE__ */ r(
|
|
1085
|
+
}) => /* @__PURE__ */ r(cr, {
|
|
1105
1086
|
label: "Pre Processing",
|
|
1106
1087
|
modalTitle: "This function will run before sending the request (for scenarios like encryption)",
|
|
1107
1088
|
defaultValue: le.pre,
|
|
@@ -1113,7 +1094,7 @@ function mt({
|
|
|
1113
1094
|
control: i,
|
|
1114
1095
|
render: ({
|
|
1115
1096
|
field: s
|
|
1116
|
-
}) => /* @__PURE__ */ r(
|
|
1097
|
+
}) => /* @__PURE__ */ r(cr, {
|
|
1117
1098
|
label: "Post Processing",
|
|
1118
1099
|
modalTitle: "This function will run after sending the request (for scenarios like decryption)",
|
|
1119
1100
|
defaultValue: le.post,
|
|
@@ -1140,7 +1121,7 @@ function ht({
|
|
|
1140
1121
|
const [i, o] = lr("postgresql"), l = async ({
|
|
1141
1122
|
type: d,
|
|
1142
1123
|
key: p,
|
|
1143
|
-
config:
|
|
1124
|
+
config: v
|
|
1144
1125
|
}) => {
|
|
1145
1126
|
V({
|
|
1146
1127
|
id: "for-creating",
|
|
@@ -1152,15 +1133,15 @@ function ht({
|
|
|
1152
1133
|
console.log({
|
|
1153
1134
|
type: d,
|
|
1154
1135
|
key: p,
|
|
1155
|
-
config:
|
|
1156
|
-
}), await j.datasource.create(d, p,
|
|
1136
|
+
config: v
|
|
1137
|
+
}), await j.datasource.create(d, p, v), k({
|
|
1157
1138
|
id: "for-creating",
|
|
1158
1139
|
title: "Successful",
|
|
1159
1140
|
message: "Data source is added",
|
|
1160
1141
|
color: "green"
|
|
1161
1142
|
}), t();
|
|
1162
1143
|
} catch (S) {
|
|
1163
|
-
|
|
1144
|
+
k({
|
|
1164
1145
|
id: "for-creating",
|
|
1165
1146
|
title: "Failed",
|
|
1166
1147
|
message: S.message,
|
|
@@ -1168,7 +1149,7 @@ function ht({
|
|
|
1168
1149
|
});
|
|
1169
1150
|
}
|
|
1170
1151
|
}, s = i === "postgresql" || i === "mysql", c = i === "http";
|
|
1171
|
-
return /* @__PURE__ */
|
|
1152
|
+
return /* @__PURE__ */ b(F, {
|
|
1172
1153
|
mx: "auto",
|
|
1173
1154
|
children: [/* @__PURE__ */ r(Yr, {
|
|
1174
1155
|
fullWidth: !0,
|
|
@@ -1190,18 +1171,18 @@ function ht({
|
|
|
1190
1171
|
submit: l,
|
|
1191
1172
|
styles: n,
|
|
1192
1173
|
type: i
|
|
1193
|
-
}), c && /* @__PURE__ */ r(
|
|
1174
|
+
}), c && /* @__PURE__ */ r(gt, {
|
|
1194
1175
|
submit: l,
|
|
1195
1176
|
styles: n
|
|
1196
1177
|
})]
|
|
1197
1178
|
});
|
|
1198
1179
|
}
|
|
1199
|
-
function
|
|
1180
|
+
function mt({
|
|
1200
1181
|
onSuccess: t,
|
|
1201
1182
|
styles: n = X
|
|
1202
1183
|
}) {
|
|
1203
1184
|
const [i, o] = H.useState(!1), l = () => o(!0), s = () => o(!1);
|
|
1204
|
-
return /* @__PURE__ */
|
|
1185
|
+
return /* @__PURE__ */ b(N, {
|
|
1205
1186
|
children: [/* @__PURE__ */ r(ne, {
|
|
1206
1187
|
overflow: "inside",
|
|
1207
1188
|
opened: i,
|
|
@@ -1220,13 +1201,23 @@ function vt({
|
|
|
1220
1201
|
}), /* @__PURE__ */ r(T, {
|
|
1221
1202
|
size: n.button.size,
|
|
1222
1203
|
onClick: l,
|
|
1223
|
-
leftIcon: /* @__PURE__ */ r(
|
|
1204
|
+
leftIcon: /* @__PURE__ */ r(De, {
|
|
1224
1205
|
size: 20
|
|
1225
1206
|
}),
|
|
1226
1207
|
children: "Add a Data Source"
|
|
1227
1208
|
})]
|
|
1228
1209
|
});
|
|
1229
1210
|
}
|
|
1211
|
+
const bt = (t) => t.replace(/([^:])(\/\/+)/g, "$1/");
|
|
1212
|
+
function vt(t) {
|
|
1213
|
+
xe(() => {
|
|
1214
|
+
if (Ee.__getMonacoInstance())
|
|
1215
|
+
return;
|
|
1216
|
+
console.log("loading monaco for @devtable/settings-form");
|
|
1217
|
+
const i = bt(t + "/assets/monaco-editor/min/vs");
|
|
1218
|
+
Ee.config({ paths: { vs: i } }), Ee.init().then((o) => console.log("monaco instance:", o));
|
|
1219
|
+
}, []);
|
|
1220
|
+
}
|
|
1230
1221
|
function Ce() {
|
|
1231
1222
|
return Ce = Object.assign ? Object.assign.bind() : function(t) {
|
|
1232
1223
|
for (var n = 1; n < arguments.length; n++) {
|
|
@@ -1237,15 +1228,15 @@ function Ce() {
|
|
|
1237
1228
|
return t;
|
|
1238
1229
|
}, Ce.apply(this, arguments);
|
|
1239
1230
|
}
|
|
1240
|
-
function
|
|
1231
|
+
function wt(t, n) {
|
|
1241
1232
|
if (t == null)
|
|
1242
1233
|
return {};
|
|
1243
1234
|
var i, o, l = function(c, d) {
|
|
1244
1235
|
if (c == null)
|
|
1245
1236
|
return {};
|
|
1246
|
-
var p,
|
|
1247
|
-
for (
|
|
1248
|
-
p =
|
|
1237
|
+
var p, v, S = {}, h = Object.keys(c);
|
|
1238
|
+
for (v = 0; v < h.length; v++)
|
|
1239
|
+
p = h[v], d.indexOf(p) >= 0 || (S[p] = c[p]);
|
|
1249
1240
|
return S;
|
|
1250
1241
|
}(t, n);
|
|
1251
1242
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -1255,12 +1246,12 @@ function bt(t, n) {
|
|
|
1255
1246
|
}
|
|
1256
1247
|
return l;
|
|
1257
1248
|
}
|
|
1258
|
-
var
|
|
1259
|
-
function
|
|
1260
|
-
var n = t.size, i = n === void 0 ? 24 : n, o = t.color, l = o === void 0 ? "currentColor" : o, s = t.stroke, c = s === void 0 ? 2 : s, d =
|
|
1249
|
+
var St = ["size", "color", "stroke"];
|
|
1250
|
+
function _t(t) {
|
|
1251
|
+
var n = t.size, i = n === void 0 ? 24 : n, o = t.color, l = o === void 0 ? "currentColor" : o, s = t.stroke, c = s === void 0 ? 2 : s, d = wt(t, St);
|
|
1261
1252
|
return ee.createElement("svg", Ce({ xmlns: "http://www.w3.org/2000/svg", className: "icon icon-tabler icon-tabler-lock", width: i, height: i, viewBox: "0 0 24 24", strokeWidth: c, stroke: l, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, d), ee.createElement("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), ee.createElement("rect", { x: 5, y: 11, width: 14, height: 10, rx: 2 }), ee.createElement("circle", { cx: 12, cy: 16, r: 1 }), ee.createElement("path", { d: "M8 11v-4a4 4 0 0 1 8 0v4" }));
|
|
1262
1253
|
}
|
|
1263
|
-
function
|
|
1254
|
+
function yt({
|
|
1264
1255
|
id: t,
|
|
1265
1256
|
name: n,
|
|
1266
1257
|
isProtected: i,
|
|
@@ -1273,7 +1264,7 @@ function _t({
|
|
|
1273
1264
|
title: "Pending",
|
|
1274
1265
|
message: "Deleting data source...",
|
|
1275
1266
|
loading: !0
|
|
1276
|
-
}), await j.datasource.delete(t),
|
|
1267
|
+
}), await j.datasource.delete(t), k({
|
|
1277
1268
|
id: "for-deleting",
|
|
1278
1269
|
title: "Successful",
|
|
1279
1270
|
message: `Data source [${n}] is deleted`,
|
|
@@ -1301,7 +1292,7 @@ function _t({
|
|
|
1301
1292
|
},
|
|
1302
1293
|
label: "This is a preset datasource, it can not be deleted",
|
|
1303
1294
|
children: /* @__PURE__ */ r("span", {
|
|
1304
|
-
children: /* @__PURE__ */ r(
|
|
1295
|
+
children: /* @__PURE__ */ r(_t, {
|
|
1305
1296
|
size: 16,
|
|
1306
1297
|
color: p.colors.gray[7]
|
|
1307
1298
|
})
|
|
@@ -1310,7 +1301,7 @@ function _t({
|
|
|
1310
1301
|
size: l.button.size,
|
|
1311
1302
|
color: "red",
|
|
1312
1303
|
onClick: d,
|
|
1313
|
-
leftIcon: /* @__PURE__ */ r(
|
|
1304
|
+
leftIcon: /* @__PURE__ */ r(je, {
|
|
1314
1305
|
size: 20
|
|
1315
1306
|
}),
|
|
1316
1307
|
children: "Delete"
|
|
@@ -1320,7 +1311,7 @@ function Wt({
|
|
|
1320
1311
|
styles: t = X,
|
|
1321
1312
|
config: n
|
|
1322
1313
|
}) {
|
|
1323
|
-
pe(n);
|
|
1314
|
+
vt(n.basename), pe(n);
|
|
1324
1315
|
const {
|
|
1325
1316
|
data: i = [],
|
|
1326
1317
|
loading: o,
|
|
@@ -1333,27 +1324,27 @@ function Wt({
|
|
|
1333
1324
|
}, {
|
|
1334
1325
|
refreshDeps: []
|
|
1335
1326
|
});
|
|
1336
|
-
return /* @__PURE__ */
|
|
1327
|
+
return /* @__PURE__ */ b(N, {
|
|
1337
1328
|
children: [/* @__PURE__ */ r(O, {
|
|
1338
1329
|
pt: t.spacing,
|
|
1339
1330
|
position: "right",
|
|
1340
|
-
children: /* @__PURE__ */ r(
|
|
1331
|
+
children: /* @__PURE__ */ r(mt, {
|
|
1341
1332
|
onSuccess: l
|
|
1342
1333
|
})
|
|
1343
|
-
}), /* @__PURE__ */
|
|
1334
|
+
}), /* @__PURE__ */ b(F, {
|
|
1344
1335
|
mt: t.spacing,
|
|
1345
1336
|
sx: {
|
|
1346
1337
|
position: "relative"
|
|
1347
1338
|
},
|
|
1348
1339
|
children: [/* @__PURE__ */ r(Oe, {
|
|
1349
1340
|
visible: o
|
|
1350
|
-
}), /* @__PURE__ */
|
|
1341
|
+
}), /* @__PURE__ */ b(Ae, {
|
|
1351
1342
|
horizontalSpacing: t.spacing,
|
|
1352
1343
|
verticalSpacing: t.spacing,
|
|
1353
1344
|
fontSize: t.size,
|
|
1354
1345
|
highlightOnHover: !0,
|
|
1355
1346
|
children: [/* @__PURE__ */ r("thead", {
|
|
1356
|
-
children: /* @__PURE__ */
|
|
1347
|
+
children: /* @__PURE__ */ b("tr", {
|
|
1357
1348
|
children: [/* @__PURE__ */ r("th", {
|
|
1358
1349
|
children: "Type"
|
|
1359
1350
|
}), /* @__PURE__ */ r("th", {
|
|
@@ -1368,7 +1359,7 @@ function Wt({
|
|
|
1368
1359
|
key: c,
|
|
1369
1360
|
type: d,
|
|
1370
1361
|
is_preset: p
|
|
1371
|
-
}) => /* @__PURE__ */
|
|
1362
|
+
}) => /* @__PURE__ */ b("tr", {
|
|
1372
1363
|
children: [/* @__PURE__ */ r("td", {
|
|
1373
1364
|
width: 200,
|
|
1374
1365
|
children: d
|
|
@@ -1378,7 +1369,7 @@ function Wt({
|
|
|
1378
1369
|
width: 200,
|
|
1379
1370
|
children: /* @__PURE__ */ r(O, {
|
|
1380
1371
|
position: "left",
|
|
1381
|
-
children: /* @__PURE__ */ r(
|
|
1372
|
+
children: /* @__PURE__ */ r(yt, {
|
|
1382
1373
|
isProtected: p,
|
|
1383
1374
|
id: s,
|
|
1384
1375
|
name: c,
|
|
@@ -1392,12 +1383,12 @@ function Wt({
|
|
|
1392
1383
|
})]
|
|
1393
1384
|
});
|
|
1394
1385
|
}
|
|
1395
|
-
const
|
|
1386
|
+
const Rt = ke(({
|
|
1396
1387
|
label: t,
|
|
1397
1388
|
value: n,
|
|
1398
1389
|
description: i,
|
|
1399
1390
|
...o
|
|
1400
|
-
}, l) => /* @__PURE__ */
|
|
1391
|
+
}, l) => /* @__PURE__ */ b(ze, {
|
|
1401
1392
|
spacing: 2,
|
|
1402
1393
|
ref: l,
|
|
1403
1394
|
...o,
|
|
@@ -1410,7 +1401,7 @@ const yt = Ae(({
|
|
|
1410
1401
|
className: "role-description",
|
|
1411
1402
|
children: i
|
|
1412
1403
|
})]
|
|
1413
|
-
})),
|
|
1404
|
+
})), Ie = ke(({
|
|
1414
1405
|
styles: t,
|
|
1415
1406
|
value: n,
|
|
1416
1407
|
onChange: i
|
|
@@ -1432,7 +1423,7 @@ const yt = Ae(({
|
|
|
1432
1423
|
size: t.size,
|
|
1433
1424
|
required: !0,
|
|
1434
1425
|
label: "Role",
|
|
1435
|
-
itemComponent:
|
|
1426
|
+
itemComponent: Rt,
|
|
1436
1427
|
data: l,
|
|
1437
1428
|
disabled: s,
|
|
1438
1429
|
styles: () => ({
|
|
@@ -1449,16 +1440,16 @@ const yt = Ae(({
|
|
|
1449
1440
|
value: n,
|
|
1450
1441
|
onChange: i
|
|
1451
1442
|
});
|
|
1452
|
-
}),
|
|
1443
|
+
}), $ = {
|
|
1453
1444
|
size: "sm",
|
|
1454
1445
|
spacing: "md",
|
|
1455
1446
|
button: {
|
|
1456
1447
|
size: "xs"
|
|
1457
1448
|
}
|
|
1458
1449
|
};
|
|
1459
|
-
function
|
|
1450
|
+
function Pt({
|
|
1460
1451
|
postSubmit: t,
|
|
1461
|
-
styles: n =
|
|
1452
|
+
styles: n = $,
|
|
1462
1453
|
initialRoleID: i
|
|
1463
1454
|
}) {
|
|
1464
1455
|
const {
|
|
@@ -1474,12 +1465,12 @@ function Rt({
|
|
|
1474
1465
|
});
|
|
1475
1466
|
return /* @__PURE__ */ r(F, {
|
|
1476
1467
|
mx: "auto",
|
|
1477
|
-
children: /* @__PURE__ */
|
|
1468
|
+
children: /* @__PURE__ */ b("form", {
|
|
1478
1469
|
onSubmit: l(async ({
|
|
1479
1470
|
name: c,
|
|
1480
1471
|
email: d,
|
|
1481
1472
|
password: p,
|
|
1482
|
-
role_id:
|
|
1473
|
+
role_id: v
|
|
1483
1474
|
}) => {
|
|
1484
1475
|
try {
|
|
1485
1476
|
V({
|
|
@@ -1487,14 +1478,14 @@ function Rt({
|
|
|
1487
1478
|
title: "Pending",
|
|
1488
1479
|
message: "Adding account...",
|
|
1489
1480
|
loading: !0
|
|
1490
|
-
}), await j.account.create(c, d, p,
|
|
1481
|
+
}), await j.account.create(c, d, p, v), k({
|
|
1491
1482
|
id: "for-creating",
|
|
1492
1483
|
title: "Successful",
|
|
1493
1484
|
message: "Account is added",
|
|
1494
1485
|
color: "green"
|
|
1495
1486
|
}), t();
|
|
1496
1487
|
} catch (S) {
|
|
1497
|
-
|
|
1488
|
+
k({
|
|
1498
1489
|
id: "for-creating",
|
|
1499
1490
|
title: "Failed",
|
|
1500
1491
|
message: S.message,
|
|
@@ -1544,7 +1535,7 @@ function Rt({
|
|
|
1544
1535
|
control: o,
|
|
1545
1536
|
render: ({
|
|
1546
1537
|
field: c
|
|
1547
|
-
}) => /* @__PURE__ */ r(
|
|
1538
|
+
}) => /* @__PURE__ */ r(Ie, {
|
|
1548
1539
|
styles: n,
|
|
1549
1540
|
...c
|
|
1550
1541
|
})
|
|
@@ -1560,13 +1551,13 @@ function Rt({
|
|
|
1560
1551
|
})
|
|
1561
1552
|
});
|
|
1562
1553
|
}
|
|
1563
|
-
function
|
|
1554
|
+
function Et({
|
|
1564
1555
|
onSuccess: t,
|
|
1565
|
-
styles: n =
|
|
1556
|
+
styles: n = $,
|
|
1566
1557
|
initialRoleID: i
|
|
1567
1558
|
}) {
|
|
1568
1559
|
const [o, l] = H.useState(!1), s = () => l(!0), c = () => l(!1);
|
|
1569
|
-
return /* @__PURE__ */
|
|
1560
|
+
return /* @__PURE__ */ b(N, {
|
|
1570
1561
|
children: [/* @__PURE__ */ r(ne, {
|
|
1571
1562
|
overflow: "inside",
|
|
1572
1563
|
opened: o,
|
|
@@ -1576,7 +1567,7 @@ function Pt({
|
|
|
1576
1567
|
onDragStart: (p) => {
|
|
1577
1568
|
p.stopPropagation();
|
|
1578
1569
|
},
|
|
1579
|
-
children: /* @__PURE__ */ r(
|
|
1570
|
+
children: /* @__PURE__ */ r(Pt, {
|
|
1580
1571
|
postSubmit: () => {
|
|
1581
1572
|
t(), c();
|
|
1582
1573
|
},
|
|
@@ -1586,18 +1577,18 @@ function Pt({
|
|
|
1586
1577
|
}), /* @__PURE__ */ r(T, {
|
|
1587
1578
|
size: n.button.size,
|
|
1588
1579
|
onClick: s,
|
|
1589
|
-
leftIcon: /* @__PURE__ */ r(
|
|
1580
|
+
leftIcon: /* @__PURE__ */ r(De, {
|
|
1590
1581
|
size: 20
|
|
1591
1582
|
}),
|
|
1592
1583
|
children: "Add an Account"
|
|
1593
1584
|
})]
|
|
1594
1585
|
});
|
|
1595
1586
|
}
|
|
1596
|
-
function
|
|
1587
|
+
function Ct({
|
|
1597
1588
|
id: t,
|
|
1598
1589
|
name: n,
|
|
1599
1590
|
onSuccess: i,
|
|
1600
|
-
styles: o =
|
|
1591
|
+
styles: o = $
|
|
1601
1592
|
}) {
|
|
1602
1593
|
const l = fe(), s = async () => {
|
|
1603
1594
|
if (!!t) {
|
|
@@ -1608,14 +1599,14 @@ function Et({
|
|
|
1608
1599
|
loading: !0
|
|
1609
1600
|
});
|
|
1610
1601
|
try {
|
|
1611
|
-
await j.account.delete(t),
|
|
1602
|
+
await j.account.delete(t), k({
|
|
1612
1603
|
id: "for-deleting",
|
|
1613
1604
|
title: "Successful",
|
|
1614
1605
|
message: `Account [${n}] is deleted`,
|
|
1615
1606
|
color: "green"
|
|
1616
1607
|
}), i();
|
|
1617
1608
|
} catch (d) {
|
|
1618
|
-
|
|
1609
|
+
k({
|
|
1619
1610
|
id: "for-deleting",
|
|
1620
1611
|
title: "Failed",
|
|
1621
1612
|
message: d.message,
|
|
@@ -1636,19 +1627,19 @@ function Et({
|
|
|
1636
1627
|
size: o.button.size,
|
|
1637
1628
|
color: "red",
|
|
1638
1629
|
onClick: c,
|
|
1639
|
-
leftIcon: /* @__PURE__ */ r(
|
|
1630
|
+
leftIcon: /* @__PURE__ */ r(je, {
|
|
1640
1631
|
size: 20
|
|
1641
1632
|
}),
|
|
1642
1633
|
children: "Delete"
|
|
1643
1634
|
});
|
|
1644
1635
|
}
|
|
1645
|
-
function
|
|
1636
|
+
function Tt({
|
|
1646
1637
|
id: t,
|
|
1647
1638
|
name: n,
|
|
1648
1639
|
email: i,
|
|
1649
1640
|
role_id: o,
|
|
1650
1641
|
postSubmit: l,
|
|
1651
|
-
styles: s =
|
|
1642
|
+
styles: s = $
|
|
1652
1643
|
}) {
|
|
1653
1644
|
const {
|
|
1654
1645
|
control: c,
|
|
@@ -1662,12 +1653,12 @@ function Ct({
|
|
|
1662
1653
|
reset_password: !1,
|
|
1663
1654
|
new_password: ""
|
|
1664
1655
|
}
|
|
1665
|
-
}),
|
|
1656
|
+
}), v = async ({
|
|
1666
1657
|
name: f,
|
|
1667
1658
|
email: z,
|
|
1668
1659
|
role_id: q,
|
|
1669
|
-
reset_password:
|
|
1670
|
-
new_password:
|
|
1660
|
+
reset_password: W,
|
|
1661
|
+
new_password: me
|
|
1671
1662
|
}) => {
|
|
1672
1663
|
try {
|
|
1673
1664
|
V({
|
|
@@ -1680,27 +1671,27 @@ function Ct({
|
|
|
1680
1671
|
name: f,
|
|
1681
1672
|
email: z,
|
|
1682
1673
|
role_id: q,
|
|
1683
|
-
reset_password:
|
|
1684
|
-
new_password:
|
|
1685
|
-
}),
|
|
1674
|
+
reset_password: W,
|
|
1675
|
+
new_password: me
|
|
1676
|
+
}), k({
|
|
1686
1677
|
id: "for-updating",
|
|
1687
1678
|
title: "Successful",
|
|
1688
1679
|
message: "Account is updated",
|
|
1689
1680
|
color: "green"
|
|
1690
1681
|
}), l();
|
|
1691
1682
|
} catch (U) {
|
|
1692
|
-
|
|
1683
|
+
k({
|
|
1693
1684
|
id: "for-updating",
|
|
1694
1685
|
title: "Failed",
|
|
1695
1686
|
message: U.message,
|
|
1696
1687
|
color: "red"
|
|
1697
1688
|
});
|
|
1698
1689
|
}
|
|
1699
|
-
}, [S,
|
|
1690
|
+
}, [S, h] = p(["reset_password", "new_password"]);
|
|
1700
1691
|
return /* @__PURE__ */ r(F, {
|
|
1701
1692
|
mx: "auto",
|
|
1702
|
-
children: /* @__PURE__ */
|
|
1703
|
-
onSubmit: d(
|
|
1693
|
+
children: /* @__PURE__ */ b("form", {
|
|
1694
|
+
onSubmit: d(v),
|
|
1704
1695
|
children: [/* @__PURE__ */ r(R, {
|
|
1705
1696
|
name: "name",
|
|
1706
1697
|
control: c,
|
|
@@ -1730,7 +1721,7 @@ function Ct({
|
|
|
1730
1721
|
control: c,
|
|
1731
1722
|
render: ({
|
|
1732
1723
|
field: f
|
|
1733
|
-
}) => /* @__PURE__ */ r(
|
|
1724
|
+
}) => /* @__PURE__ */ r(Ie, {
|
|
1734
1725
|
styles: s,
|
|
1735
1726
|
...f
|
|
1736
1727
|
})
|
|
@@ -1782,15 +1773,15 @@ function Ct({
|
|
|
1782
1773
|
})
|
|
1783
1774
|
});
|
|
1784
1775
|
}
|
|
1785
|
-
function
|
|
1776
|
+
function zt({
|
|
1786
1777
|
account: t,
|
|
1787
1778
|
onSuccess: n,
|
|
1788
|
-
styles: i =
|
|
1779
|
+
styles: i = $
|
|
1789
1780
|
}) {
|
|
1790
1781
|
const [o, l] = H.useState(!1), s = () => l(!0), c = () => l(!1), d = () => {
|
|
1791
1782
|
n(), c();
|
|
1792
1783
|
};
|
|
1793
|
-
return /* @__PURE__ */
|
|
1784
|
+
return /* @__PURE__ */ b(N, {
|
|
1794
1785
|
children: [/* @__PURE__ */ r(ne, {
|
|
1795
1786
|
overflow: "inside",
|
|
1796
1787
|
opened: o,
|
|
@@ -1800,7 +1791,7 @@ function Tt({
|
|
|
1800
1791
|
onDragStart: (p) => {
|
|
1801
1792
|
p.stopPropagation();
|
|
1802
1793
|
},
|
|
1803
|
-
children: /* @__PURE__ */ r(
|
|
1794
|
+
children: /* @__PURE__ */ r(Tt, {
|
|
1804
1795
|
...t,
|
|
1805
1796
|
postSubmit: d,
|
|
1806
1797
|
styles: i
|
|
@@ -1815,11 +1806,11 @@ function Tt({
|
|
|
1815
1806
|
})]
|
|
1816
1807
|
});
|
|
1817
1808
|
}
|
|
1818
|
-
function
|
|
1819
|
-
styles: t =
|
|
1809
|
+
function Yt({
|
|
1810
|
+
styles: t = $,
|
|
1820
1811
|
config: n
|
|
1821
1812
|
}) {
|
|
1822
|
-
var
|
|
1813
|
+
var v, S;
|
|
1823
1814
|
pe(n);
|
|
1824
1815
|
const {
|
|
1825
1816
|
data: i = [],
|
|
@@ -1827,9 +1818,9 @@ function $t({
|
|
|
1827
1818
|
refresh: l
|
|
1828
1819
|
} = G(async () => {
|
|
1829
1820
|
const {
|
|
1830
|
-
data:
|
|
1821
|
+
data: h
|
|
1831
1822
|
} = await j.account.list();
|
|
1832
|
-
return
|
|
1823
|
+
return h;
|
|
1833
1824
|
}, {
|
|
1834
1825
|
refreshDeps: []
|
|
1835
1826
|
}), {
|
|
@@ -1842,32 +1833,32 @@ function $t({
|
|
|
1842
1833
|
disabled: f.id === 50
|
|
1843
1834
|
})), {
|
|
1844
1835
|
refreshDeps: []
|
|
1845
|
-
}), d = ur(() => s.reduce((
|
|
1836
|
+
}), d = ur(() => s.reduce((h, f) => (h.set(f.value, f.label), h), /* @__PURE__ */ new Map()), [s]), p = (h) => {
|
|
1846
1837
|
var f;
|
|
1847
|
-
return (f = d.get(
|
|
1838
|
+
return (f = d.get(h)) != null ? f : h;
|
|
1848
1839
|
};
|
|
1849
|
-
return /* @__PURE__ */
|
|
1840
|
+
return /* @__PURE__ */ b(N, {
|
|
1850
1841
|
children: [/* @__PURE__ */ r(O, {
|
|
1851
1842
|
pt: t.spacing,
|
|
1852
1843
|
position: "right",
|
|
1853
|
-
children: /* @__PURE__ */ r(
|
|
1844
|
+
children: /* @__PURE__ */ r(Et, {
|
|
1854
1845
|
onSuccess: l,
|
|
1855
|
-
initialRoleID: (S = (
|
|
1846
|
+
initialRoleID: (S = (v = s == null ? void 0 : s[0]) == null ? void 0 : v.value) != null ? S : 0
|
|
1856
1847
|
})
|
|
1857
|
-
}), /* @__PURE__ */
|
|
1848
|
+
}), /* @__PURE__ */ b(F, {
|
|
1858
1849
|
mt: t.spacing,
|
|
1859
1850
|
sx: {
|
|
1860
1851
|
position: "relative"
|
|
1861
1852
|
},
|
|
1862
1853
|
children: [/* @__PURE__ */ r(Oe, {
|
|
1863
1854
|
visible: o || c
|
|
1864
|
-
}), /* @__PURE__ */
|
|
1855
|
+
}), /* @__PURE__ */ b(Ae, {
|
|
1865
1856
|
horizontalSpacing: t.spacing,
|
|
1866
1857
|
verticalSpacing: t.spacing,
|
|
1867
1858
|
fontSize: t.size,
|
|
1868
1859
|
highlightOnHover: !0,
|
|
1869
1860
|
children: [/* @__PURE__ */ r("thead", {
|
|
1870
|
-
children: /* @__PURE__ */
|
|
1861
|
+
children: /* @__PURE__ */ b("tr", {
|
|
1871
1862
|
children: [/* @__PURE__ */ r("th", {
|
|
1872
1863
|
children: "Username"
|
|
1873
1864
|
}), /* @__PURE__ */ r("th", {
|
|
@@ -1879,14 +1870,14 @@ function $t({
|
|
|
1879
1870
|
})]
|
|
1880
1871
|
})
|
|
1881
1872
|
}), /* @__PURE__ */ r("tbody", {
|
|
1882
|
-
children: i.map((
|
|
1873
|
+
children: i.map((h) => {
|
|
1883
1874
|
const {
|
|
1884
1875
|
id: f,
|
|
1885
1876
|
name: z,
|
|
1886
1877
|
email: q,
|
|
1887
|
-
role_id:
|
|
1888
|
-
} =
|
|
1889
|
-
return /* @__PURE__ */
|
|
1878
|
+
role_id: W
|
|
1879
|
+
} = h;
|
|
1880
|
+
return /* @__PURE__ */ b("tr", {
|
|
1890
1881
|
children: [/* @__PURE__ */ r("td", {
|
|
1891
1882
|
width: 200,
|
|
1892
1883
|
children: z
|
|
@@ -1895,15 +1886,15 @@ function $t({
|
|
|
1895
1886
|
children: q
|
|
1896
1887
|
}), /* @__PURE__ */ r("td", {
|
|
1897
1888
|
width: 200,
|
|
1898
|
-
children: p(
|
|
1889
|
+
children: p(W)
|
|
1899
1890
|
}), /* @__PURE__ */ r("td", {
|
|
1900
1891
|
width: 200,
|
|
1901
|
-
children: /* @__PURE__ */
|
|
1892
|
+
children: /* @__PURE__ */ b(O, {
|
|
1902
1893
|
position: "left",
|
|
1903
|
-
children: [/* @__PURE__ */ r(
|
|
1904
|
-
account:
|
|
1894
|
+
children: [/* @__PURE__ */ r(zt, {
|
|
1895
|
+
account: h,
|
|
1905
1896
|
onSuccess: l
|
|
1906
|
-
}), /* @__PURE__ */ r(
|
|
1897
|
+
}), /* @__PURE__ */ r(Ct, {
|
|
1907
1898
|
id: f,
|
|
1908
1899
|
name: z,
|
|
1909
1900
|
onSuccess: l
|
|
@@ -1917,9 +1908,9 @@ function $t({
|
|
|
1917
1908
|
})]
|
|
1918
1909
|
});
|
|
1919
1910
|
}
|
|
1920
|
-
function
|
|
1911
|
+
function Ot({
|
|
1921
1912
|
postSubmit: t,
|
|
1922
|
-
styles: n =
|
|
1913
|
+
styles: n = $
|
|
1923
1914
|
}) {
|
|
1924
1915
|
const {
|
|
1925
1916
|
control: i,
|
|
@@ -1932,7 +1923,7 @@ function zt({
|
|
|
1932
1923
|
});
|
|
1933
1924
|
return /* @__PURE__ */ r(F, {
|
|
1934
1925
|
mx: "auto",
|
|
1935
|
-
children: /* @__PURE__ */
|
|
1926
|
+
children: /* @__PURE__ */ b("form", {
|
|
1936
1927
|
onSubmit: o(async ({
|
|
1937
1928
|
name: s,
|
|
1938
1929
|
password: c
|
|
@@ -1945,14 +1936,14 @@ function zt({
|
|
|
1945
1936
|
loading: !0
|
|
1946
1937
|
});
|
|
1947
1938
|
const d = await j.account.login(s, c);
|
|
1948
|
-
window.localStorage.setItem("token", d.token),
|
|
1939
|
+
window.localStorage.setItem("token", d.token), k({
|
|
1949
1940
|
id: "for-login",
|
|
1950
1941
|
title: "Successful",
|
|
1951
1942
|
message: "Logged in",
|
|
1952
1943
|
color: "green"
|
|
1953
1944
|
}), t(d);
|
|
1954
1945
|
} catch (d) {
|
|
1955
|
-
|
|
1946
|
+
k({
|
|
1956
1947
|
id: "for-login",
|
|
1957
1948
|
title: "Login Failed",
|
|
1958
1949
|
message: d.message,
|
|
@@ -1996,8 +1987,8 @@ function zt({
|
|
|
1996
1987
|
})
|
|
1997
1988
|
});
|
|
1998
1989
|
}
|
|
1999
|
-
function
|
|
2000
|
-
styles: t =
|
|
1990
|
+
function Kt({
|
|
1991
|
+
styles: t = $,
|
|
2001
1992
|
config: n,
|
|
2002
1993
|
onSuccess: i
|
|
2003
1994
|
}) {
|
|
@@ -2007,23 +1998,23 @@ function Yt({
|
|
|
2007
1998
|
sx: {
|
|
2008
1999
|
position: "relative"
|
|
2009
2000
|
},
|
|
2010
|
-
children: /* @__PURE__ */ r(
|
|
2001
|
+
children: /* @__PURE__ */ r(Ot, {
|
|
2011
2002
|
styles: t,
|
|
2012
2003
|
postSubmit: i
|
|
2013
2004
|
})
|
|
2014
2005
|
})
|
|
2015
2006
|
});
|
|
2016
2007
|
}
|
|
2017
|
-
const
|
|
2008
|
+
const he = {
|
|
2018
2009
|
size: "sm",
|
|
2019
2010
|
spacing: "md",
|
|
2020
2011
|
button: {
|
|
2021
2012
|
size: "xs"
|
|
2022
2013
|
}
|
|
2023
2014
|
};
|
|
2024
|
-
function
|
|
2015
|
+
function At({
|
|
2025
2016
|
postSubmit: t,
|
|
2026
|
-
styles: n =
|
|
2017
|
+
styles: n = he,
|
|
2027
2018
|
initialRoleID: i
|
|
2028
2019
|
}) {
|
|
2029
2020
|
const {
|
|
@@ -2037,7 +2028,7 @@ function Ot({
|
|
|
2037
2028
|
});
|
|
2038
2029
|
return /* @__PURE__ */ r(F, {
|
|
2039
2030
|
mx: "auto",
|
|
2040
|
-
children: /* @__PURE__ */
|
|
2031
|
+
children: /* @__PURE__ */ b("form", {
|
|
2041
2032
|
onSubmit: l(async ({
|
|
2042
2033
|
name: c,
|
|
2043
2034
|
role_id: d
|
|
@@ -2051,16 +2042,16 @@ function Ot({
|
|
|
2051
2042
|
});
|
|
2052
2043
|
const {
|
|
2053
2044
|
app_id: p,
|
|
2054
|
-
app_secret:
|
|
2045
|
+
app_secret: v
|
|
2055
2046
|
} = await j.api_key.create(c, d);
|
|
2056
|
-
|
|
2047
|
+
k({
|
|
2057
2048
|
id: "for-creating",
|
|
2058
2049
|
title: "Successful",
|
|
2059
2050
|
message: "API Key is added",
|
|
2060
2051
|
color: "green"
|
|
2061
|
-
}), t(p,
|
|
2052
|
+
}), t(p, v);
|
|
2062
2053
|
} catch (p) {
|
|
2063
|
-
|
|
2054
|
+
k({
|
|
2064
2055
|
id: "for-creating",
|
|
2065
2056
|
title: "Failed",
|
|
2066
2057
|
message: p.message,
|
|
@@ -2085,7 +2076,7 @@ function Ot({
|
|
|
2085
2076
|
control: o,
|
|
2086
2077
|
render: ({
|
|
2087
2078
|
field: c
|
|
2088
|
-
}) => /* @__PURE__ */ r(
|
|
2079
|
+
}) => /* @__PURE__ */ r(Ie, {
|
|
2089
2080
|
styles: n,
|
|
2090
2081
|
...c
|
|
2091
2082
|
})
|
|
@@ -2101,32 +2092,32 @@ function Ot({
|
|
|
2101
2092
|
})
|
|
2102
2093
|
});
|
|
2103
2094
|
}
|
|
2104
|
-
function
|
|
2095
|
+
function xt({
|
|
2105
2096
|
onSuccess: t,
|
|
2106
|
-
styles: n =
|
|
2097
|
+
styles: n = he,
|
|
2107
2098
|
initialRoleID: i
|
|
2108
2099
|
}) {
|
|
2109
2100
|
const o = fe(), [l, s] = H.useState(!1), c = () => s(!0), d = () => s(!1);
|
|
2110
|
-
return /* @__PURE__ */
|
|
2101
|
+
return /* @__PURE__ */ b(N, {
|
|
2111
2102
|
children: [/* @__PURE__ */ r(ne, {
|
|
2112
2103
|
overflow: "inside",
|
|
2113
2104
|
opened: l,
|
|
2114
2105
|
onClose: () => s(!1),
|
|
2115
2106
|
title: "Add an API Key",
|
|
2116
2107
|
trapFocus: !0,
|
|
2117
|
-
onDragStart: (
|
|
2118
|
-
|
|
2108
|
+
onDragStart: (v) => {
|
|
2109
|
+
v.stopPropagation();
|
|
2119
2110
|
},
|
|
2120
|
-
children: /* @__PURE__ */ r(
|
|
2121
|
-
postSubmit: (
|
|
2111
|
+
children: /* @__PURE__ */ r(At, {
|
|
2112
|
+
postSubmit: (v, S) => {
|
|
2122
2113
|
d(), o.openModal({
|
|
2123
2114
|
title: "API Key is generated",
|
|
2124
|
-
children: /* @__PURE__ */
|
|
2115
|
+
children: /* @__PURE__ */ b(ze, {
|
|
2125
2116
|
children: [/* @__PURE__ */ r(ue, {
|
|
2126
2117
|
color: "dimmed",
|
|
2127
2118
|
children: "Make sure you save it - you won't be able to access it again."
|
|
2128
2119
|
}), /* @__PURE__ */ r(D, {
|
|
2129
|
-
defaultValue:
|
|
2120
|
+
defaultValue: v,
|
|
2130
2121
|
disabled: !0,
|
|
2131
2122
|
label: "APP ID",
|
|
2132
2123
|
styles: {
|
|
@@ -2162,18 +2153,18 @@ function kt({
|
|
|
2162
2153
|
}), /* @__PURE__ */ r(T, {
|
|
2163
2154
|
size: n.button.size,
|
|
2164
2155
|
onClick: c,
|
|
2165
|
-
leftIcon: /* @__PURE__ */ r(
|
|
2156
|
+
leftIcon: /* @__PURE__ */ r(De, {
|
|
2166
2157
|
size: 20
|
|
2167
2158
|
}),
|
|
2168
2159
|
children: "Add an API Key"
|
|
2169
2160
|
})]
|
|
2170
2161
|
});
|
|
2171
2162
|
}
|
|
2172
|
-
function
|
|
2163
|
+
function kt({
|
|
2173
2164
|
id: t,
|
|
2174
2165
|
name: n,
|
|
2175
2166
|
onSuccess: i,
|
|
2176
|
-
styles: o =
|
|
2167
|
+
styles: o = he
|
|
2177
2168
|
}) {
|
|
2178
2169
|
const l = fe(), s = async () => {
|
|
2179
2170
|
if (!!t) {
|
|
@@ -2184,14 +2175,14 @@ function At({
|
|
|
2184
2175
|
loading: !0
|
|
2185
2176
|
});
|
|
2186
2177
|
try {
|
|
2187
|
-
await j.api_key.delete(t),
|
|
2178
|
+
await j.api_key.delete(t), k({
|
|
2188
2179
|
id: "for-deleting",
|
|
2189
2180
|
title: "Successful",
|
|
2190
2181
|
message: `API Key [${n}] is deleted`,
|
|
2191
2182
|
color: "green"
|
|
2192
2183
|
}), i();
|
|
2193
2184
|
} catch (d) {
|
|
2194
|
-
|
|
2185
|
+
k({
|
|
2195
2186
|
id: "for-deleting",
|
|
2196
2187
|
title: "Failed",
|
|
2197
2188
|
message: d.message,
|
|
@@ -2212,17 +2203,17 @@ function At({
|
|
|
2212
2203
|
size: o.button.size,
|
|
2213
2204
|
color: "red",
|
|
2214
2205
|
onClick: c,
|
|
2215
|
-
leftIcon: /* @__PURE__ */ r(
|
|
2206
|
+
leftIcon: /* @__PURE__ */ r(je, {
|
|
2216
2207
|
size: 20
|
|
2217
2208
|
}),
|
|
2218
2209
|
children: "Delete"
|
|
2219
2210
|
});
|
|
2220
2211
|
}
|
|
2221
|
-
function
|
|
2222
|
-
styles: t =
|
|
2212
|
+
function Bt({
|
|
2213
|
+
styles: t = he,
|
|
2223
2214
|
config: n
|
|
2224
2215
|
}) {
|
|
2225
|
-
var
|
|
2216
|
+
var v, S;
|
|
2226
2217
|
pe(n);
|
|
2227
2218
|
const {
|
|
2228
2219
|
data: i = [],
|
|
@@ -2230,9 +2221,9 @@ function Kt({
|
|
|
2230
2221
|
refresh: l
|
|
2231
2222
|
} = G(async () => {
|
|
2232
2223
|
const {
|
|
2233
|
-
data:
|
|
2224
|
+
data: h
|
|
2234
2225
|
} = await j.api_key.list();
|
|
2235
|
-
return
|
|
2226
|
+
return h;
|
|
2236
2227
|
}, {
|
|
2237
2228
|
refreshDeps: []
|
|
2238
2229
|
}), {
|
|
@@ -2245,32 +2236,32 @@ function Kt({
|
|
|
2245
2236
|
disabled: f.id === 50
|
|
2246
2237
|
})), {
|
|
2247
2238
|
refreshDeps: []
|
|
2248
|
-
}), d = ur(() => s.reduce((
|
|
2239
|
+
}), d = ur(() => s.reduce((h, f) => (h.set(f.value, f.label), h), /* @__PURE__ */ new Map()), [s]), p = (h) => {
|
|
2249
2240
|
var f;
|
|
2250
|
-
return (f = d.get(
|
|
2241
|
+
return (f = d.get(h)) != null ? f : h;
|
|
2251
2242
|
};
|
|
2252
|
-
return /* @__PURE__ */
|
|
2243
|
+
return /* @__PURE__ */ b(N, {
|
|
2253
2244
|
children: [/* @__PURE__ */ r(O, {
|
|
2254
2245
|
pt: t.spacing,
|
|
2255
2246
|
position: "right",
|
|
2256
|
-
children: /* @__PURE__ */ r(
|
|
2247
|
+
children: /* @__PURE__ */ r(xt, {
|
|
2257
2248
|
onSuccess: l,
|
|
2258
|
-
initialRoleID: (S = (
|
|
2249
|
+
initialRoleID: (S = (v = s == null ? void 0 : s[0]) == null ? void 0 : v.value) != null ? S : 0
|
|
2259
2250
|
})
|
|
2260
|
-
}), /* @__PURE__ */
|
|
2251
|
+
}), /* @__PURE__ */ b(F, {
|
|
2261
2252
|
mt: t.spacing,
|
|
2262
2253
|
sx: {
|
|
2263
2254
|
position: "relative"
|
|
2264
2255
|
},
|
|
2265
2256
|
children: [/* @__PURE__ */ r(Oe, {
|
|
2266
2257
|
visible: o || c
|
|
2267
|
-
}), /* @__PURE__ */
|
|
2258
|
+
}), /* @__PURE__ */ b(Ae, {
|
|
2268
2259
|
horizontalSpacing: t.spacing,
|
|
2269
2260
|
verticalSpacing: t.spacing,
|
|
2270
2261
|
fontSize: t.size,
|
|
2271
2262
|
highlightOnHover: !0,
|
|
2272
2263
|
children: [/* @__PURE__ */ r("thead", {
|
|
2273
|
-
children: /* @__PURE__ */
|
|
2264
|
+
children: /* @__PURE__ */ b("tr", {
|
|
2274
2265
|
children: [/* @__PURE__ */ r("th", {
|
|
2275
2266
|
children: "Name"
|
|
2276
2267
|
}), /* @__PURE__ */ r("th", {
|
|
@@ -2282,14 +2273,14 @@ function Kt({
|
|
|
2282
2273
|
})]
|
|
2283
2274
|
})
|
|
2284
2275
|
}), /* @__PURE__ */ r("tbody", {
|
|
2285
|
-
children: i.map((
|
|
2276
|
+
children: i.map((h) => {
|
|
2286
2277
|
const {
|
|
2287
2278
|
id: f,
|
|
2288
2279
|
name: z,
|
|
2289
2280
|
app_id: q,
|
|
2290
|
-
role_id:
|
|
2291
|
-
} =
|
|
2292
|
-
return /* @__PURE__ */
|
|
2281
|
+
role_id: W
|
|
2282
|
+
} = h;
|
|
2283
|
+
return /* @__PURE__ */ b("tr", {
|
|
2293
2284
|
children: [/* @__PURE__ */ r("td", {
|
|
2294
2285
|
width: 200,
|
|
2295
2286
|
children: z
|
|
@@ -2298,12 +2289,12 @@ function Kt({
|
|
|
2298
2289
|
children: q
|
|
2299
2290
|
}), /* @__PURE__ */ r("td", {
|
|
2300
2291
|
width: 200,
|
|
2301
|
-
children: p(
|
|
2292
|
+
children: p(W)
|
|
2302
2293
|
}), /* @__PURE__ */ r("td", {
|
|
2303
2294
|
width: 200,
|
|
2304
2295
|
children: /* @__PURE__ */ r(O, {
|
|
2305
2296
|
position: "left",
|
|
2306
|
-
children: /* @__PURE__ */ r(
|
|
2297
|
+
children: /* @__PURE__ */ r(kt, {
|
|
2307
2298
|
id: f,
|
|
2308
2299
|
name: z,
|
|
2309
2300
|
onSuccess: l
|
|
@@ -2317,17 +2308,17 @@ function Kt({
|
|
|
2317
2308
|
})]
|
|
2318
2309
|
});
|
|
2319
2310
|
}
|
|
2320
|
-
const
|
|
2311
|
+
const Gt = () => import("./package.0e12772e.mjs").then(({ version: t }) => (console.log(`[@devtable/dashboard] version: ${t}`), t));
|
|
2321
2312
|
export {
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2313
|
+
Bt as APIKeyList,
|
|
2314
|
+
Yt as AccountList,
|
|
2315
|
+
xt as AddAPIKey,
|
|
2316
|
+
Et as AddAccount,
|
|
2317
|
+
mt as AddDataSource,
|
|
2327
2318
|
Wt as DataSourceList,
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2319
|
+
kt as DeleteAPIKey,
|
|
2320
|
+
Ct as DeleteAccount,
|
|
2321
|
+
yt as DeleteDataSource,
|
|
2322
|
+
Kt as Login,
|
|
2323
|
+
Gt as getVersion
|
|
2333
2324
|
};
|