@devtable/settings-form 8.13.3 → 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,43 +1,37 @@
|
|
|
1
|
-
import { Box as F, TextInput as D, Divider as Te, Group as O, NumberInput as
|
|
2
|
-
import { showNotification 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";
|
|
9
9
|
import { useForm as J, Controller as R } from "react-hook-form";
|
|
10
10
|
import { useBoolean as rt, useRequest as G } from "ahooks";
|
|
11
11
|
import tt, { loader as Ee } from "@monaco-editor/react";
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
import at from "monaco-editor/esm/vs/language/css/css.worker?worker";
|
|
15
|
-
import ot from "monaco-editor/esm/vs/language/html/html.worker?worker";
|
|
16
|
-
import st from "monaco-editor/esm/vs/language/json/json.worker?worker";
|
|
17
|
-
import ct from "monaco-editor/esm/vs/language/typescript/ts.worker?worker";
|
|
18
|
-
import { useModals as fe, closeAllModals as lt } from "@mantine/modals";
|
|
19
|
-
function ut(t) {
|
|
12
|
+
import { useModals as fe, closeAllModals as nt } from "@mantine/modals";
|
|
13
|
+
function at(t) {
|
|
20
14
|
t = t || {};
|
|
21
|
-
const n = Object.keys(t).sort(),
|
|
15
|
+
const n = Object.keys(t).sort(), i = [];
|
|
22
16
|
for (let o = 0; o < n.length; o++) {
|
|
23
17
|
const l = n[o];
|
|
24
18
|
if (l != "authentication" && t[l])
|
|
25
|
-
|
|
19
|
+
i.push(n[o] + "=" + (typeof t[l] == "object" ? JSON.stringify(t[l]) : t[l]));
|
|
26
20
|
else {
|
|
27
21
|
const s = Object.keys(t[l]).sort();
|
|
28
22
|
for (let c = 0; c < s.length; c++) {
|
|
29
23
|
const d = s[c];
|
|
30
|
-
d != "sign" && t[l][d] &&
|
|
24
|
+
d != "sign" && t[l][d] && i.push(
|
|
31
25
|
s[c] + "=" + (typeof t[l][d] == "object" ? JSON.stringify(t[l][d]) : t[l][d])
|
|
32
26
|
);
|
|
33
27
|
}
|
|
34
28
|
}
|
|
35
29
|
}
|
|
36
|
-
return
|
|
30
|
+
return i.sort().join("&");
|
|
37
31
|
}
|
|
38
|
-
function
|
|
39
|
-
let
|
|
40
|
-
return
|
|
32
|
+
function it(t, n) {
|
|
33
|
+
let i = at(t);
|
|
34
|
+
return i += "&key=" + n, Zr.MD5(i).toString().toUpperCase();
|
|
41
35
|
}
|
|
42
36
|
const C = {
|
|
43
37
|
baseURL: "http://localhost:31200",
|
|
@@ -50,7 +44,7 @@ const C = {
|
|
|
50
44
|
return {
|
|
51
45
|
app_id: this.app_id,
|
|
52
46
|
nonce_str: n,
|
|
53
|
-
sign:
|
|
47
|
+
sign: it(
|
|
54
48
|
{
|
|
55
49
|
app_id: this.app_id,
|
|
56
50
|
nonce_str: n,
|
|
@@ -61,7 +55,7 @@ const C = {
|
|
|
61
55
|
};
|
|
62
56
|
},
|
|
63
57
|
getRequest(t) {
|
|
64
|
-
return (n,
|
|
58
|
+
return (n, i, o = {}) => {
|
|
65
59
|
const l = window.localStorage.getItem("token"), s = {
|
|
66
60
|
"X-Requested-With": "XMLHttpRequest",
|
|
67
61
|
"Content-Type": o.string ? "application/x-www-form-urlencoded" : "application/json",
|
|
@@ -71,23 +65,23 @@ const C = {
|
|
|
71
65
|
baseURL: this.baseURL,
|
|
72
66
|
method: t,
|
|
73
67
|
url: n,
|
|
74
|
-
params: t === "GET" ?
|
|
68
|
+
params: t === "GET" ? i : o.params,
|
|
75
69
|
headers: s
|
|
76
70
|
};
|
|
77
|
-
return ["POST", "PUT"].includes(t) && (c.data = o.string ? JSON.stringify(
|
|
71
|
+
return ["POST", "PUT"].includes(t) && (c.data = o.string ? JSON.stringify(i) : i, c.data.authentication = this.getAuthentication(c.data)), Qr(c).then((d) => d.data).catch((d) => et.has(d, "response.data.detail.message") ? Promise.reject(new Error(d.response.data.detail.message)) : Promise.reject(d));
|
|
78
72
|
};
|
|
79
73
|
}
|
|
80
74
|
};
|
|
81
75
|
function pe(t) {
|
|
82
76
|
C.baseURL !== t.apiBaseURL && (C.baseURL = t.apiBaseURL), t.app_id && (C.app_id = t.app_id), t.app_secret && (C.app_secret = t.app_secret);
|
|
83
77
|
}
|
|
84
|
-
const
|
|
78
|
+
const ot = {
|
|
85
79
|
login: async (t, n) => {
|
|
86
|
-
const
|
|
80
|
+
const i = {
|
|
87
81
|
name: t,
|
|
88
82
|
password: n
|
|
89
83
|
};
|
|
90
|
-
return await C.getRequest("POST")("/account/login",
|
|
84
|
+
return await C.getRequest("POST")("/account/login", i);
|
|
91
85
|
},
|
|
92
86
|
list: async () => await C.getRequest("POST")("/account/list", {
|
|
93
87
|
filter: {},
|
|
@@ -104,23 +98,23 @@ const ft = {
|
|
|
104
98
|
}),
|
|
105
99
|
get: async () => await C.getRequest("GET")("/account/get", {}),
|
|
106
100
|
update: async (t, n) => {
|
|
107
|
-
const
|
|
101
|
+
const i = {
|
|
108
102
|
name: t,
|
|
109
103
|
email: n
|
|
110
104
|
};
|
|
111
|
-
return await C.getRequest("PUT")("/account/update",
|
|
105
|
+
return await C.getRequest("PUT")("/account/update", i);
|
|
112
106
|
},
|
|
113
107
|
changepassword: async (t, n) => {
|
|
114
|
-
const
|
|
108
|
+
const i = {
|
|
115
109
|
old_password: t,
|
|
116
110
|
new_password: n
|
|
117
111
|
};
|
|
118
|
-
return await C.getRequest("POST")("/account/changepassword",
|
|
112
|
+
return await C.getRequest("POST")("/account/changepassword", i);
|
|
119
113
|
},
|
|
120
|
-
create: async (t, n,
|
|
114
|
+
create: async (t, n, i, o) => await C.getRequest("POST")("/account/create", {
|
|
121
115
|
name: t,
|
|
122
116
|
email: n,
|
|
123
|
-
password:
|
|
117
|
+
password: i,
|
|
124
118
|
role_id: o
|
|
125
119
|
}),
|
|
126
120
|
edit: async (t) => (t.reset_password || (t.new_password = void 0), await C.getRequest("PUT")("/account/edit", t)),
|
|
@@ -128,7 +122,7 @@ const ft = {
|
|
|
128
122
|
if (!!t)
|
|
129
123
|
return C.getRequest("POST")("/account/delete", { id: t });
|
|
130
124
|
}
|
|
131
|
-
},
|
|
125
|
+
}, st = {
|
|
132
126
|
list: async () => await C.getRequest("POST")("/api/key/list", {
|
|
133
127
|
filter: {
|
|
134
128
|
search: ""
|
|
@@ -152,7 +146,7 @@ const ft = {
|
|
|
152
146
|
if (!!t)
|
|
153
147
|
return C.getRequest("POST")("/api/key/delete", { id: t });
|
|
154
148
|
}
|
|
155
|
-
},
|
|
149
|
+
}, ct = {
|
|
156
150
|
list: async () => await C.getRequest("POST")("/datasource/list", {
|
|
157
151
|
filter: {},
|
|
158
152
|
sort: [
|
|
@@ -166,21 +160,21 @@ const ft = {
|
|
|
166
160
|
pagesize: 100
|
|
167
161
|
}
|
|
168
162
|
}),
|
|
169
|
-
create: async (t, n,
|
|
163
|
+
create: async (t, n, i) => await C.getRequest("POST")("/datasource/create", {
|
|
170
164
|
type: t,
|
|
171
165
|
key: n,
|
|
172
|
-
config:
|
|
166
|
+
config: i
|
|
173
167
|
}),
|
|
174
168
|
delete: async (t) => {
|
|
175
169
|
await C.getRequest("POST")("/datasource/delete", { id: t });
|
|
176
170
|
}
|
|
177
|
-
},
|
|
171
|
+
}, lt = {
|
|
178
172
|
list: async () => await C.getRequest("GET")("/role/list", {})
|
|
179
173
|
}, j = {
|
|
180
|
-
datasource:
|
|
181
|
-
account:
|
|
182
|
-
role:
|
|
183
|
-
api_key:
|
|
174
|
+
datasource: ct,
|
|
175
|
+
account: ot,
|
|
176
|
+
role: lt,
|
|
177
|
+
api_key: st
|
|
184
178
|
}, X = {
|
|
185
179
|
size: "sm",
|
|
186
180
|
spacing: "md",
|
|
@@ -198,23 +192,23 @@ var ge = { exports: {} }, re = {};
|
|
|
198
192
|
* This source code is licensed under the MIT license found in the
|
|
199
193
|
* LICENSE file in the root directory of this source tree.
|
|
200
194
|
*/
|
|
201
|
-
var
|
|
202
|
-
function
|
|
203
|
-
if (
|
|
195
|
+
var or;
|
|
196
|
+
function ut() {
|
|
197
|
+
if (or)
|
|
204
198
|
return re;
|
|
205
|
-
|
|
206
|
-
var t = H, n = Symbol.for("react.element"),
|
|
207
|
-
function c(d, p,
|
|
208
|
-
var S,
|
|
209
|
-
|
|
199
|
+
or = 1;
|
|
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, 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);
|
|
210
204
|
for (S in p)
|
|
211
|
-
o.call(p, S) && !s.hasOwnProperty(S) && (
|
|
205
|
+
o.call(p, S) && !s.hasOwnProperty(S) && (h[S] = p[S]);
|
|
212
206
|
if (d && d.defaultProps)
|
|
213
207
|
for (S in p = d.defaultProps, p)
|
|
214
|
-
|
|
215
|
-
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 };
|
|
216
210
|
}
|
|
217
|
-
return re.Fragment =
|
|
211
|
+
return re.Fragment = i, re.jsx = c, re.jsxs = c, re;
|
|
218
212
|
}
|
|
219
213
|
var te = {};
|
|
220
214
|
/**
|
|
@@ -226,47 +220,47 @@ var te = {};
|
|
|
226
220
|
* This source code is licensed under the MIT license found in the
|
|
227
221
|
* LICENSE file in the root directory of this source tree.
|
|
228
222
|
*/
|
|
229
|
-
var
|
|
230
|
-
function
|
|
231
|
-
return
|
|
232
|
-
var t = H, n = Symbol.for("react.element"),
|
|
233
|
-
function
|
|
223
|
+
var sr;
|
|
224
|
+
function dt() {
|
|
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) {
|
|
234
228
|
if (e === null || typeof e != "object")
|
|
235
229
|
return null;
|
|
236
|
-
var
|
|
237
|
-
return typeof
|
|
230
|
+
var a = q && e[q] || e[W];
|
|
231
|
+
return typeof a == "function" ? a : null;
|
|
238
232
|
}
|
|
239
233
|
var U = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
240
234
|
function A(e) {
|
|
241
235
|
{
|
|
242
|
-
for (var
|
|
236
|
+
for (var a = arguments.length, u = new Array(a > 1 ? a - 1 : 0), g = 1; g < a; g++)
|
|
243
237
|
u[g - 1] = arguments[g];
|
|
244
238
|
dr("error", e, u);
|
|
245
239
|
}
|
|
246
240
|
}
|
|
247
|
-
function dr(e,
|
|
241
|
+
function dr(e, a, u) {
|
|
248
242
|
{
|
|
249
243
|
var g = U.ReactDebugCurrentFrame, _ = g.getStackAddendum();
|
|
250
|
-
_ !== "" && (
|
|
244
|
+
_ !== "" && (a += "%s", u = u.concat([_]));
|
|
251
245
|
var y = u.map(function(w) {
|
|
252
246
|
return String(w);
|
|
253
247
|
});
|
|
254
|
-
y.unshift("Warning: " +
|
|
248
|
+
y.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, y);
|
|
255
249
|
}
|
|
256
250
|
}
|
|
257
|
-
var fr = !1, pr = !1, gr = !1,
|
|
258
|
-
|
|
259
|
-
function
|
|
260
|
-
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));
|
|
261
255
|
}
|
|
262
|
-
function
|
|
256
|
+
function vr(e, a, u) {
|
|
263
257
|
var g = e.displayName;
|
|
264
258
|
if (g)
|
|
265
259
|
return g;
|
|
266
|
-
var _ =
|
|
260
|
+
var _ = a.displayName || a.name || "";
|
|
267
261
|
return _ !== "" ? u + "(" + _ + ")" : u;
|
|
268
262
|
}
|
|
269
|
-
function
|
|
263
|
+
function qe(e) {
|
|
270
264
|
return e.displayName || "Context";
|
|
271
265
|
}
|
|
272
266
|
function L(e) {
|
|
@@ -279,13 +273,13 @@ function vt() {
|
|
|
279
273
|
switch (e) {
|
|
280
274
|
case o:
|
|
281
275
|
return "Fragment";
|
|
282
|
-
case
|
|
276
|
+
case i:
|
|
283
277
|
return "Portal";
|
|
284
278
|
case s:
|
|
285
279
|
return "Profiler";
|
|
286
280
|
case l:
|
|
287
281
|
return "StrictMode";
|
|
288
|
-
case
|
|
282
|
+
case v:
|
|
289
283
|
return "Suspense";
|
|
290
284
|
case S:
|
|
291
285
|
return "SuspenseList";
|
|
@@ -293,14 +287,14 @@ function vt() {
|
|
|
293
287
|
if (typeof e == "object")
|
|
294
288
|
switch (e.$$typeof) {
|
|
295
289
|
case d:
|
|
296
|
-
var
|
|
297
|
-
return
|
|
290
|
+
var a = e;
|
|
291
|
+
return qe(a) + ".Consumer";
|
|
298
292
|
case c:
|
|
299
293
|
var u = e;
|
|
300
|
-
return
|
|
294
|
+
return qe(u._context) + ".Provider";
|
|
301
295
|
case p:
|
|
302
|
-
return
|
|
303
|
-
case
|
|
296
|
+
return vr(e, e.render, "ForwardRef");
|
|
297
|
+
case h:
|
|
304
298
|
var g = e.displayName || null;
|
|
305
299
|
return g !== null ? g : L(e.type) || "Memo";
|
|
306
300
|
case f: {
|
|
@@ -314,18 +308,18 @@ function vt() {
|
|
|
314
308
|
}
|
|
315
309
|
return null;
|
|
316
310
|
}
|
|
317
|
-
var Y = Object.assign, Q = 0,
|
|
318
|
-
function
|
|
311
|
+
var Y = Object.assign, Q = 0, Le, Me, Ne, Ue, Ve, $e, We;
|
|
312
|
+
function Ye() {
|
|
319
313
|
}
|
|
320
|
-
|
|
314
|
+
Ye.__reactDisabledLog = !0;
|
|
321
315
|
function wr() {
|
|
322
316
|
{
|
|
323
317
|
if (Q === 0) {
|
|
324
|
-
|
|
318
|
+
Le = console.log, Me = console.info, Ne = console.warn, Ue = console.error, Ve = console.group, $e = console.groupCollapsed, We = console.groupEnd;
|
|
325
319
|
var e = {
|
|
326
320
|
configurable: !0,
|
|
327
321
|
enumerable: !0,
|
|
328
|
-
value:
|
|
322
|
+
value: Ye,
|
|
329
323
|
writable: !0
|
|
330
324
|
};
|
|
331
325
|
Object.defineProperties(console, {
|
|
@@ -351,55 +345,55 @@ function vt() {
|
|
|
351
345
|
};
|
|
352
346
|
Object.defineProperties(console, {
|
|
353
347
|
log: Y({}, e, {
|
|
354
|
-
value:
|
|
348
|
+
value: Le
|
|
355
349
|
}),
|
|
356
350
|
info: Y({}, e, {
|
|
357
|
-
value:
|
|
351
|
+
value: Me
|
|
358
352
|
}),
|
|
359
353
|
warn: Y({}, e, {
|
|
360
|
-
value:
|
|
354
|
+
value: Ne
|
|
361
355
|
}),
|
|
362
356
|
error: Y({}, e, {
|
|
363
|
-
value:
|
|
357
|
+
value: Ue
|
|
364
358
|
}),
|
|
365
359
|
group: Y({}, e, {
|
|
366
|
-
value:
|
|
360
|
+
value: Ve
|
|
367
361
|
}),
|
|
368
362
|
groupCollapsed: Y({}, e, {
|
|
369
|
-
value:
|
|
363
|
+
value: $e
|
|
370
364
|
}),
|
|
371
365
|
groupEnd: Y({}, e, {
|
|
372
|
-
value:
|
|
366
|
+
value: We
|
|
373
367
|
})
|
|
374
368
|
});
|
|
375
369
|
}
|
|
376
370
|
Q < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
377
371
|
}
|
|
378
372
|
}
|
|
379
|
-
var
|
|
380
|
-
function
|
|
373
|
+
var be = U.ReactCurrentDispatcher, ve;
|
|
374
|
+
function ae(e, a, u) {
|
|
381
375
|
{
|
|
382
|
-
if (
|
|
376
|
+
if (ve === void 0)
|
|
383
377
|
try {
|
|
384
378
|
throw Error();
|
|
385
379
|
} catch (_) {
|
|
386
380
|
var g = _.stack.trim().match(/\n( *(at )?)/);
|
|
387
|
-
|
|
381
|
+
ve = g && g[1] || "";
|
|
388
382
|
}
|
|
389
383
|
return `
|
|
390
|
-
` +
|
|
384
|
+
` + ve + e;
|
|
391
385
|
}
|
|
392
386
|
}
|
|
393
|
-
var we = !1,
|
|
387
|
+
var we = !1, ie;
|
|
394
388
|
{
|
|
395
389
|
var _r = typeof WeakMap == "function" ? WeakMap : Map;
|
|
396
|
-
|
|
390
|
+
ie = new _r();
|
|
397
391
|
}
|
|
398
|
-
function
|
|
392
|
+
function Ke(e, a) {
|
|
399
393
|
if (!e || we)
|
|
400
394
|
return "";
|
|
401
395
|
{
|
|
402
|
-
var u =
|
|
396
|
+
var u = ie.get(e);
|
|
403
397
|
if (u !== void 0)
|
|
404
398
|
return u;
|
|
405
399
|
}
|
|
@@ -408,9 +402,9 @@ function vt() {
|
|
|
408
402
|
var _ = Error.prepareStackTrace;
|
|
409
403
|
Error.prepareStackTrace = void 0;
|
|
410
404
|
var y;
|
|
411
|
-
y =
|
|
405
|
+
y = be.current, be.current = null, wr();
|
|
412
406
|
try {
|
|
413
|
-
if (
|
|
407
|
+
if (a) {
|
|
414
408
|
var w = function() {
|
|
415
409
|
throw Error();
|
|
416
410
|
};
|
|
@@ -443,89 +437,89 @@ function vt() {
|
|
|
443
437
|
}
|
|
444
438
|
} catch (M) {
|
|
445
439
|
if (M && g && typeof M.stack == "string") {
|
|
446
|
-
for (var
|
|
447
|
-
`),
|
|
448
|
-
`), 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]; )
|
|
449
443
|
E--;
|
|
450
444
|
for (; P >= 1 && E >= 0; P--, E--)
|
|
451
|
-
if (
|
|
445
|
+
if (m[P] !== x[E]) {
|
|
452
446
|
if (P !== 1 || E !== 1)
|
|
453
447
|
do
|
|
454
|
-
if (P--, E--, E < 0 ||
|
|
448
|
+
if (P--, E--, E < 0 || m[P] !== x[E]) {
|
|
455
449
|
var I = `
|
|
456
|
-
` +
|
|
457
|
-
return e.displayName && I.includes("<anonymous>") && (I = I.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
450
|
+
` + m[P].replace(" at new ", " at ");
|
|
451
|
+
return e.displayName && I.includes("<anonymous>") && (I = I.replace("<anonymous>", e.displayName)), typeof e == "function" && ie.set(e, I), I;
|
|
458
452
|
}
|
|
459
453
|
while (P >= 1 && E >= 0);
|
|
460
454
|
break;
|
|
461
455
|
}
|
|
462
456
|
}
|
|
463
457
|
} finally {
|
|
464
|
-
we = !1,
|
|
458
|
+
we = !1, be.current = y, Sr(), Error.prepareStackTrace = _;
|
|
465
459
|
}
|
|
466
|
-
var B = e ? e.displayName || e.name : "", ir = B ?
|
|
467
|
-
return typeof e == "function" &&
|
|
460
|
+
var B = e ? e.displayName || e.name : "", ir = B ? ae(B) : "";
|
|
461
|
+
return typeof e == "function" && ie.set(e, ir), ir;
|
|
468
462
|
}
|
|
469
|
-
function yr(e,
|
|
470
|
-
return
|
|
463
|
+
function yr(e, a, u) {
|
|
464
|
+
return Ke(e, !1);
|
|
471
465
|
}
|
|
472
466
|
function Rr(e) {
|
|
473
|
-
var
|
|
474
|
-
return !!(
|
|
467
|
+
var a = e.prototype;
|
|
468
|
+
return !!(a && a.isReactComponent);
|
|
475
469
|
}
|
|
476
|
-
function oe(e,
|
|
470
|
+
function oe(e, a, u) {
|
|
477
471
|
if (e == null)
|
|
478
472
|
return "";
|
|
479
473
|
if (typeof e == "function")
|
|
480
|
-
return
|
|
474
|
+
return Ke(e, Rr(e));
|
|
481
475
|
if (typeof e == "string")
|
|
482
|
-
return
|
|
476
|
+
return ae(e);
|
|
483
477
|
switch (e) {
|
|
484
|
-
case
|
|
485
|
-
return
|
|
478
|
+
case v:
|
|
479
|
+
return ae("Suspense");
|
|
486
480
|
case S:
|
|
487
|
-
return
|
|
481
|
+
return ae("SuspenseList");
|
|
488
482
|
}
|
|
489
483
|
if (typeof e == "object")
|
|
490
484
|
switch (e.$$typeof) {
|
|
491
485
|
case p:
|
|
492
486
|
return yr(e.render);
|
|
493
|
-
case
|
|
494
|
-
return oe(e.type,
|
|
487
|
+
case h:
|
|
488
|
+
return oe(e.type, a, u);
|
|
495
489
|
case f: {
|
|
496
490
|
var g = e, _ = g._payload, y = g._init;
|
|
497
491
|
try {
|
|
498
|
-
return oe(y(_),
|
|
492
|
+
return oe(y(_), a, u);
|
|
499
493
|
} catch {
|
|
500
494
|
}
|
|
501
495
|
}
|
|
502
496
|
}
|
|
503
497
|
return "";
|
|
504
498
|
}
|
|
505
|
-
var se = Object.prototype.hasOwnProperty,
|
|
499
|
+
var se = Object.prototype.hasOwnProperty, Be = {}, Ge = U.ReactDebugCurrentFrame;
|
|
506
500
|
function ce(e) {
|
|
507
501
|
if (e) {
|
|
508
|
-
var
|
|
509
|
-
|
|
502
|
+
var a = e._owner, u = oe(e.type, e._source, a ? a.type : null);
|
|
503
|
+
Ge.setExtraStackFrame(u);
|
|
510
504
|
} else
|
|
511
|
-
|
|
505
|
+
Ge.setExtraStackFrame(null);
|
|
512
506
|
}
|
|
513
|
-
function Pr(e,
|
|
507
|
+
function Pr(e, a, u, g, _) {
|
|
514
508
|
{
|
|
515
509
|
var y = Function.call.bind(se);
|
|
516
510
|
for (var w in e)
|
|
517
511
|
if (y(e, w)) {
|
|
518
|
-
var
|
|
512
|
+
var m = void 0;
|
|
519
513
|
try {
|
|
520
514
|
if (typeof e[w] != "function") {
|
|
521
|
-
var
|
|
522
|
-
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;
|
|
523
517
|
}
|
|
524
|
-
|
|
518
|
+
m = e[w](a, w, g, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
525
519
|
} catch (P) {
|
|
526
|
-
|
|
520
|
+
m = P;
|
|
527
521
|
}
|
|
528
|
-
|
|
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));
|
|
529
523
|
}
|
|
530
524
|
}
|
|
531
525
|
}
|
|
@@ -535,57 +529,57 @@ function vt() {
|
|
|
535
529
|
}
|
|
536
530
|
function Cr(e) {
|
|
537
531
|
{
|
|
538
|
-
var
|
|
532
|
+
var a = typeof Symbol == "function" && Symbol.toStringTag, u = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
539
533
|
return u;
|
|
540
534
|
}
|
|
541
535
|
}
|
|
542
536
|
function Tr(e) {
|
|
543
537
|
try {
|
|
544
|
-
return
|
|
538
|
+
return He(e), !1;
|
|
545
539
|
} catch {
|
|
546
540
|
return !0;
|
|
547
541
|
}
|
|
548
542
|
}
|
|
549
|
-
function
|
|
543
|
+
function He(e) {
|
|
550
544
|
return "" + e;
|
|
551
545
|
}
|
|
552
|
-
function
|
|
546
|
+
function Je(e) {
|
|
553
547
|
if (Tr(e))
|
|
554
|
-
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)),
|
|
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);
|
|
555
549
|
}
|
|
556
550
|
var Z = U.ReactCurrentOwner, zr = {
|
|
557
551
|
key: !0,
|
|
558
552
|
ref: !0,
|
|
559
553
|
__self: !0,
|
|
560
554
|
__source: !0
|
|
561
|
-
},
|
|
555
|
+
}, Xe, Qe, _e;
|
|
562
556
|
_e = {};
|
|
563
557
|
function Or(e) {
|
|
564
558
|
if (se.call(e, "ref")) {
|
|
565
|
-
var
|
|
566
|
-
if (
|
|
559
|
+
var a = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
560
|
+
if (a && a.isReactWarning)
|
|
567
561
|
return !1;
|
|
568
562
|
}
|
|
569
563
|
return e.ref !== void 0;
|
|
570
564
|
}
|
|
571
565
|
function Ar(e) {
|
|
572
566
|
if (se.call(e, "key")) {
|
|
573
|
-
var
|
|
574
|
-
if (
|
|
567
|
+
var a = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
568
|
+
if (a && a.isReactWarning)
|
|
575
569
|
return !1;
|
|
576
570
|
}
|
|
577
571
|
return e.key !== void 0;
|
|
578
572
|
}
|
|
579
|
-
function
|
|
580
|
-
if (typeof e.ref == "string" && Z.current &&
|
|
573
|
+
function xr(e, a) {
|
|
574
|
+
if (typeof e.ref == "string" && Z.current && a && Z.current.stateNode !== a) {
|
|
581
575
|
var u = L(Z.current.type);
|
|
582
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);
|
|
583
577
|
}
|
|
584
578
|
}
|
|
585
|
-
function
|
|
579
|
+
function kr(e, a) {
|
|
586
580
|
{
|
|
587
581
|
var u = function() {
|
|
588
|
-
|
|
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));
|
|
589
583
|
};
|
|
590
584
|
u.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
591
585
|
get: u,
|
|
@@ -593,10 +587,10 @@ function vt() {
|
|
|
593
587
|
});
|
|
594
588
|
}
|
|
595
589
|
}
|
|
596
|
-
function Dr(e,
|
|
590
|
+
function Dr(e, a) {
|
|
597
591
|
{
|
|
598
592
|
var u = function() {
|
|
599
|
-
|
|
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));
|
|
600
594
|
};
|
|
601
595
|
u.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
602
596
|
get: u,
|
|
@@ -604,64 +598,64 @@ function vt() {
|
|
|
604
598
|
});
|
|
605
599
|
}
|
|
606
600
|
}
|
|
607
|
-
var jr = function(e,
|
|
608
|
-
var
|
|
601
|
+
var jr = function(e, a, u, g, _, y, w) {
|
|
602
|
+
var m = {
|
|
609
603
|
$$typeof: n,
|
|
610
604
|
type: e,
|
|
611
|
-
key:
|
|
605
|
+
key: a,
|
|
612
606
|
ref: u,
|
|
613
607
|
props: w,
|
|
614
608
|
_owner: y
|
|
615
609
|
};
|
|
616
|
-
return
|
|
610
|
+
return m._store = {}, Object.defineProperty(m._store, "validated", {
|
|
617
611
|
configurable: !1,
|
|
618
612
|
enumerable: !1,
|
|
619
613
|
writable: !0,
|
|
620
614
|
value: !1
|
|
621
|
-
}), Object.defineProperty(
|
|
615
|
+
}), Object.defineProperty(m, "_self", {
|
|
622
616
|
configurable: !1,
|
|
623
617
|
enumerable: !1,
|
|
624
618
|
writable: !1,
|
|
625
619
|
value: g
|
|
626
|
-
}), Object.defineProperty(
|
|
620
|
+
}), Object.defineProperty(m, "_source", {
|
|
627
621
|
configurable: !1,
|
|
628
622
|
enumerable: !1,
|
|
629
623
|
writable: !1,
|
|
630
624
|
value: _
|
|
631
|
-
}), Object.freeze && (Object.freeze(
|
|
625
|
+
}), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
|
|
632
626
|
};
|
|
633
|
-
function Ir(e,
|
|
627
|
+
function Ir(e, a, u, g, _) {
|
|
634
628
|
{
|
|
635
|
-
var y, w = {},
|
|
636
|
-
u !== void 0 && (
|
|
637
|
-
for (y in
|
|
638
|
-
se.call(
|
|
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
|
+
for (y in a)
|
|
632
|
+
se.call(a, y) && !zr.hasOwnProperty(y) && (w[y] = a[y]);
|
|
639
633
|
if (e && e.defaultProps) {
|
|
640
634
|
var P = e.defaultProps;
|
|
641
635
|
for (y in P)
|
|
642
636
|
w[y] === void 0 && (w[y] = P[y]);
|
|
643
637
|
}
|
|
644
|
-
if (
|
|
638
|
+
if (m || x) {
|
|
645
639
|
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
646
|
-
|
|
640
|
+
m && kr(w, E), x && Dr(w, E);
|
|
647
641
|
}
|
|
648
|
-
return jr(e,
|
|
642
|
+
return jr(e, m, x, _, g, Z.current, w);
|
|
649
643
|
}
|
|
650
644
|
}
|
|
651
|
-
var ye = U.ReactCurrentOwner,
|
|
645
|
+
var ye = U.ReactCurrentOwner, Ze = U.ReactDebugCurrentFrame;
|
|
652
646
|
function K(e) {
|
|
653
647
|
if (e) {
|
|
654
|
-
var
|
|
655
|
-
|
|
648
|
+
var a = e._owner, u = oe(e.type, e._source, a ? a.type : null);
|
|
649
|
+
Ze.setExtraStackFrame(u);
|
|
656
650
|
} else
|
|
657
|
-
|
|
651
|
+
Ze.setExtraStackFrame(null);
|
|
658
652
|
}
|
|
659
653
|
var Re;
|
|
660
654
|
Re = !1;
|
|
661
655
|
function Pe(e) {
|
|
662
656
|
return typeof e == "object" && e !== null && e.$$typeof === n;
|
|
663
657
|
}
|
|
664
|
-
function
|
|
658
|
+
function er() {
|
|
665
659
|
{
|
|
666
660
|
if (ye.current) {
|
|
667
661
|
var e = L(ye.current.type);
|
|
@@ -676,86 +670,86 @@ Check the render method of \`` + e + "`.";
|
|
|
676
670
|
function Fr(e) {
|
|
677
671
|
{
|
|
678
672
|
if (e !== void 0) {
|
|
679
|
-
var
|
|
673
|
+
var a = e.fileName.replace(/^.*[\\\/]/, ""), u = e.lineNumber;
|
|
680
674
|
return `
|
|
681
675
|
|
|
682
|
-
Check your code at ` +
|
|
676
|
+
Check your code at ` + a + ":" + u + ".";
|
|
683
677
|
}
|
|
684
678
|
return "";
|
|
685
679
|
}
|
|
686
680
|
}
|
|
687
|
-
var
|
|
681
|
+
var rr = {};
|
|
688
682
|
function qr(e) {
|
|
689
683
|
{
|
|
690
|
-
var
|
|
691
|
-
if (!
|
|
684
|
+
var a = er();
|
|
685
|
+
if (!a) {
|
|
692
686
|
var u = typeof e == "string" ? e : e.displayName || e.name;
|
|
693
|
-
u && (
|
|
687
|
+
u && (a = `
|
|
694
688
|
|
|
695
689
|
Check the top-level render call using <` + u + ">.");
|
|
696
690
|
}
|
|
697
|
-
return
|
|
691
|
+
return a;
|
|
698
692
|
}
|
|
699
693
|
}
|
|
700
|
-
function
|
|
694
|
+
function tr(e, a) {
|
|
701
695
|
{
|
|
702
696
|
if (!e._store || e._store.validated || e.key != null)
|
|
703
697
|
return;
|
|
704
698
|
e._store.validated = !0;
|
|
705
|
-
var u = qr(
|
|
706
|
-
if (
|
|
699
|
+
var u = qr(a);
|
|
700
|
+
if (rr[u])
|
|
707
701
|
return;
|
|
708
|
-
|
|
702
|
+
rr[u] = !0;
|
|
709
703
|
var g = "";
|
|
710
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);
|
|
711
705
|
}
|
|
712
706
|
}
|
|
713
|
-
function
|
|
707
|
+
function nr(e, a) {
|
|
714
708
|
{
|
|
715
709
|
if (typeof e != "object")
|
|
716
710
|
return;
|
|
717
711
|
if (Se(e))
|
|
718
712
|
for (var u = 0; u < e.length; u++) {
|
|
719
713
|
var g = e[u];
|
|
720
|
-
Pe(g) &&
|
|
714
|
+
Pe(g) && tr(g, a);
|
|
721
715
|
}
|
|
722
716
|
else if (Pe(e))
|
|
723
717
|
e._store && (e._store.validated = !0);
|
|
724
718
|
else if (e) {
|
|
725
|
-
var _ =
|
|
719
|
+
var _ = me(e);
|
|
726
720
|
if (typeof _ == "function" && _ !== e.entries)
|
|
727
721
|
for (var y = _.call(e), w; !(w = y.next()).done; )
|
|
728
|
-
Pe(w.value) &&
|
|
722
|
+
Pe(w.value) && tr(w.value, a);
|
|
729
723
|
}
|
|
730
724
|
}
|
|
731
725
|
}
|
|
732
726
|
function Lr(e) {
|
|
733
727
|
{
|
|
734
|
-
var
|
|
735
|
-
if (
|
|
728
|
+
var a = e.type;
|
|
729
|
+
if (a == null || typeof a == "string")
|
|
736
730
|
return;
|
|
737
731
|
var u;
|
|
738
|
-
if (typeof
|
|
739
|
-
u =
|
|
740
|
-
else if (typeof
|
|
741
|
-
u =
|
|
732
|
+
if (typeof a == "function")
|
|
733
|
+
u = a.propTypes;
|
|
734
|
+
else if (typeof a == "object" && (a.$$typeof === p || a.$$typeof === h))
|
|
735
|
+
u = a.propTypes;
|
|
742
736
|
else
|
|
743
737
|
return;
|
|
744
738
|
if (u) {
|
|
745
|
-
var g = L(
|
|
739
|
+
var g = L(a);
|
|
746
740
|
Pr(u, e.props, "prop", g, e);
|
|
747
|
-
} else if (
|
|
741
|
+
} else if (a.PropTypes !== void 0 && !Re) {
|
|
748
742
|
Re = !0;
|
|
749
|
-
var _ = L(
|
|
743
|
+
var _ = L(a);
|
|
750
744
|
A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _ || "Unknown");
|
|
751
745
|
}
|
|
752
|
-
typeof
|
|
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.");
|
|
753
747
|
}
|
|
754
748
|
}
|
|
755
749
|
function Mr(e) {
|
|
756
750
|
{
|
|
757
|
-
for (var
|
|
758
|
-
var g =
|
|
751
|
+
for (var a = Object.keys(e.props), u = 0; u < a.length; u++) {
|
|
752
|
+
var g = a[u];
|
|
759
753
|
if (g !== "children" && g !== "key") {
|
|
760
754
|
K(e), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), K(null);
|
|
761
755
|
break;
|
|
@@ -764,54 +758,54 @@ Check the top-level render call using <` + u + ">.");
|
|
|
764
758
|
e.ref !== null && (K(e), A("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
|
|
765
759
|
}
|
|
766
760
|
}
|
|
767
|
-
function
|
|
761
|
+
function ar(e, a, u, g, _, y) {
|
|
768
762
|
{
|
|
769
|
-
var w =
|
|
763
|
+
var w = br(e);
|
|
770
764
|
if (!w) {
|
|
771
|
-
var
|
|
772
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
773
|
-
var
|
|
774
|
-
|
|
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();
|
|
775
769
|
var P;
|
|
776
|
-
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);
|
|
777
771
|
}
|
|
778
|
-
var E = Ir(e,
|
|
772
|
+
var E = Ir(e, a, u, _, y);
|
|
779
773
|
if (E == null)
|
|
780
774
|
return E;
|
|
781
775
|
if (w) {
|
|
782
|
-
var I =
|
|
776
|
+
var I = a.children;
|
|
783
777
|
if (I !== void 0)
|
|
784
778
|
if (g)
|
|
785
779
|
if (Se(I)) {
|
|
786
780
|
for (var B = 0; B < I.length; B++)
|
|
787
|
-
|
|
781
|
+
nr(I[B], e);
|
|
788
782
|
Object.freeze && Object.freeze(I);
|
|
789
783
|
} else
|
|
790
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.");
|
|
791
785
|
else
|
|
792
|
-
|
|
786
|
+
nr(I, e);
|
|
793
787
|
}
|
|
794
788
|
return e === o ? Mr(E) : Lr(E), E;
|
|
795
789
|
}
|
|
796
790
|
}
|
|
797
|
-
function Nr(e,
|
|
798
|
-
return
|
|
791
|
+
function Nr(e, a, u) {
|
|
792
|
+
return ar(e, a, u, !0);
|
|
799
793
|
}
|
|
800
|
-
function Ur(e,
|
|
801
|
-
return
|
|
794
|
+
function Ur(e, a, u) {
|
|
795
|
+
return ar(e, a, u, !1);
|
|
802
796
|
}
|
|
803
|
-
var
|
|
804
|
-
te.Fragment = o, te.jsx =
|
|
797
|
+
var Vr = Ur, $r = Nr;
|
|
798
|
+
te.Fragment = o, te.jsx = Vr, te.jsxs = $r;
|
|
805
799
|
}()), te;
|
|
806
800
|
}
|
|
807
801
|
(function(t) {
|
|
808
|
-
process.env.NODE_ENV === "production" ? t.exports =
|
|
802
|
+
process.env.NODE_ENV === "production" ? t.exports = ut() : t.exports = dt();
|
|
809
803
|
})(ge);
|
|
810
|
-
const N = ge.exports.Fragment, r = ge.exports.jsx,
|
|
811
|
-
function
|
|
804
|
+
const N = ge.exports.Fragment, r = ge.exports.jsx, b = ge.exports.jsxs;
|
|
805
|
+
function ft({
|
|
812
806
|
submit: t,
|
|
813
807
|
styles: n = X,
|
|
814
|
-
type:
|
|
808
|
+
type: i
|
|
815
809
|
}) {
|
|
816
810
|
const {
|
|
817
811
|
control: o,
|
|
@@ -819,7 +813,7 @@ function bt({
|
|
|
819
813
|
handleSubmit: s
|
|
820
814
|
} = J({
|
|
821
815
|
defaultValues: {
|
|
822
|
-
type:
|
|
816
|
+
type: i,
|
|
823
817
|
key: "",
|
|
824
818
|
config: {
|
|
825
819
|
host: "",
|
|
@@ -830,11 +824,11 @@ function bt({
|
|
|
830
824
|
}
|
|
831
825
|
}
|
|
832
826
|
});
|
|
833
|
-
return
|
|
834
|
-
l("type",
|
|
835
|
-
}, [l,
|
|
827
|
+
return xe(() => {
|
|
828
|
+
l("type", i);
|
|
829
|
+
}, [l, i]), /* @__PURE__ */ r(F, {
|
|
836
830
|
mx: "auto",
|
|
837
|
-
children: /* @__PURE__ */
|
|
831
|
+
children: /* @__PURE__ */ b("form", {
|
|
838
832
|
onSubmit: s(t),
|
|
839
833
|
children: [/* @__PURE__ */ r(R, {
|
|
840
834
|
name: "key",
|
|
@@ -852,7 +846,7 @@ function bt({
|
|
|
852
846
|
}), /* @__PURE__ */ r(Te, {
|
|
853
847
|
label: "Connection Info",
|
|
854
848
|
labelPosition: "center"
|
|
855
|
-
}), /* @__PURE__ */
|
|
849
|
+
}), /* @__PURE__ */ b(O, {
|
|
856
850
|
grow: !0,
|
|
857
851
|
children: [/* @__PURE__ */ r(R, {
|
|
858
852
|
name: "config.host",
|
|
@@ -874,7 +868,7 @@ function bt({
|
|
|
874
868
|
control: o,
|
|
875
869
|
render: ({
|
|
876
870
|
field: c
|
|
877
|
-
}) => /* @__PURE__ */ r(
|
|
871
|
+
}) => /* @__PURE__ */ r(Wr, {
|
|
878
872
|
mb: n.spacing,
|
|
879
873
|
size: n.size,
|
|
880
874
|
required: !0,
|
|
@@ -934,16 +928,7 @@ function bt({
|
|
|
934
928
|
})
|
|
935
929
|
});
|
|
936
930
|
}
|
|
937
|
-
|
|
938
|
-
getWorker(t, n) {
|
|
939
|
-
return n === "json" ? new st() : n === "css" || n === "scss" || n === "less" ? new at() : n === "html" || n === "handlebars" || n === "razor" ? new ot() : n === "typescript" || n === "javascript" ? new ct() : new it();
|
|
940
|
-
}
|
|
941
|
-
};
|
|
942
|
-
function wt() {
|
|
943
|
-
Ee.__getMonacoInstance() || (console.log("loading monaco"), Ee.config({ monaco: nt }), Ee.init().then((n) => console.log("here is the monaco instance:", n)));
|
|
944
|
-
}
|
|
945
|
-
wt();
|
|
946
|
-
const St = ({
|
|
931
|
+
const pt = ({
|
|
947
932
|
value: t,
|
|
948
933
|
onChange: n
|
|
949
934
|
}) => /* @__PURE__ */ r(F, {
|
|
@@ -964,27 +949,27 @@ const St = ({
|
|
|
964
949
|
}
|
|
965
950
|
}
|
|
966
951
|
})
|
|
967
|
-
}),
|
|
952
|
+
}), cr = ke(({
|
|
968
953
|
value: t,
|
|
969
954
|
onChange: n,
|
|
970
|
-
label:
|
|
955
|
+
label: i,
|
|
971
956
|
modalTitle: o,
|
|
972
957
|
defaultValue: l,
|
|
973
958
|
styles: s
|
|
974
959
|
}, c) => {
|
|
975
960
|
const [d, {
|
|
976
961
|
setTrue: p,
|
|
977
|
-
setFalse:
|
|
978
|
-
}] = rt(), [S,
|
|
979
|
-
|
|
962
|
+
setFalse: v
|
|
963
|
+
}] = rt(), [S, h] = lr(t), f = () => {
|
|
964
|
+
v(), n(S);
|
|
980
965
|
}, z = () => {
|
|
981
|
-
|
|
966
|
+
v(), h(t);
|
|
982
967
|
}, q = () => {
|
|
983
|
-
|
|
968
|
+
h(l);
|
|
984
969
|
};
|
|
985
|
-
return
|
|
986
|
-
|
|
987
|
-
}, [t]), /* @__PURE__ */
|
|
970
|
+
return xe(() => {
|
|
971
|
+
h(t);
|
|
972
|
+
}, [t]), /* @__PURE__ */ b(N, {
|
|
988
973
|
children: [/* @__PURE__ */ r(T, {
|
|
989
974
|
variant: "filled",
|
|
990
975
|
size: s.button.size,
|
|
@@ -992,19 +977,19 @@ const St = ({
|
|
|
992
977
|
sx: {
|
|
993
978
|
flexGrow: 1
|
|
994
979
|
},
|
|
995
|
-
children:
|
|
980
|
+
children: i
|
|
996
981
|
}), /* @__PURE__ */ r(ne, {
|
|
997
982
|
size: 800,
|
|
998
983
|
title: o,
|
|
999
984
|
opened: d,
|
|
1000
|
-
onClose:
|
|
985
|
+
onClose: v,
|
|
1001
986
|
closeOnClickOutside: !1,
|
|
1002
987
|
withCloseButton: !1,
|
|
1003
|
-
children: d && /* @__PURE__ */
|
|
1004
|
-
children: [/* @__PURE__ */ r(
|
|
988
|
+
children: d && /* @__PURE__ */ b(ze, {
|
|
989
|
+
children: [/* @__PURE__ */ r(pt, {
|
|
1005
990
|
value: S,
|
|
1006
|
-
onChange:
|
|
1007
|
-
}), /* @__PURE__ */
|
|
991
|
+
onChange: h
|
|
992
|
+
}), /* @__PURE__ */ b(O, {
|
|
1008
993
|
position: "apart",
|
|
1009
994
|
children: [/* @__PURE__ */ r(T, {
|
|
1010
995
|
onClick: q,
|
|
@@ -1013,7 +998,7 @@ const St = ({
|
|
|
1013
998
|
size: 20
|
|
1014
999
|
}),
|
|
1015
1000
|
children: "Rest"
|
|
1016
|
-
}), /* @__PURE__ */
|
|
1001
|
+
}), /* @__PURE__ */ b(O, {
|
|
1017
1002
|
position: "right",
|
|
1018
1003
|
children: [/* @__PURE__ */ r(T, {
|
|
1019
1004
|
onClick: z,
|
|
@@ -1034,12 +1019,12 @@ const St = ({
|
|
|
1034
1019
|
post: ["function post_process(res, utils) {", " // your code goes here", " return data", "}"].join(`
|
|
1035
1020
|
`)
|
|
1036
1021
|
};
|
|
1037
|
-
function
|
|
1022
|
+
function gt({
|
|
1038
1023
|
submit: t,
|
|
1039
1024
|
styles: n = X
|
|
1040
1025
|
}) {
|
|
1041
1026
|
const {
|
|
1042
|
-
control:
|
|
1027
|
+
control: i,
|
|
1043
1028
|
setValue: o,
|
|
1044
1029
|
handleSubmit: l
|
|
1045
1030
|
} = J({
|
|
@@ -1057,11 +1042,11 @@ function _t({
|
|
|
1057
1042
|
});
|
|
1058
1043
|
return /* @__PURE__ */ r(F, {
|
|
1059
1044
|
mx: "auto",
|
|
1060
|
-
children: /* @__PURE__ */
|
|
1045
|
+
children: /* @__PURE__ */ b("form", {
|
|
1061
1046
|
onSubmit: l(t),
|
|
1062
1047
|
children: [/* @__PURE__ */ r(R, {
|
|
1063
1048
|
name: "key",
|
|
1064
|
-
control:
|
|
1049
|
+
control: i,
|
|
1065
1050
|
render: ({
|
|
1066
1051
|
field: s
|
|
1067
1052
|
}) => /* @__PURE__ */ r(D, {
|
|
@@ -1077,7 +1062,7 @@ function _t({
|
|
|
1077
1062
|
labelPosition: "center"
|
|
1078
1063
|
}), /* @__PURE__ */ r(R, {
|
|
1079
1064
|
name: "config.host",
|
|
1080
|
-
control:
|
|
1065
|
+
control: i,
|
|
1081
1066
|
render: ({
|
|
1082
1067
|
field: s
|
|
1083
1068
|
}) => /* @__PURE__ */ r(D, {
|
|
@@ -1090,14 +1075,14 @@ function _t({
|
|
|
1090
1075
|
},
|
|
1091
1076
|
...s
|
|
1092
1077
|
})
|
|
1093
|
-
}), /* @__PURE__ */
|
|
1078
|
+
}), /* @__PURE__ */ b(O, {
|
|
1094
1079
|
grow: !0,
|
|
1095
1080
|
children: [/* @__PURE__ */ r(R, {
|
|
1096
1081
|
name: "config.processing.pre",
|
|
1097
|
-
control:
|
|
1082
|
+
control: i,
|
|
1098
1083
|
render: ({
|
|
1099
1084
|
field: s
|
|
1100
|
-
}) => /* @__PURE__ */ r(
|
|
1085
|
+
}) => /* @__PURE__ */ r(cr, {
|
|
1101
1086
|
label: "Pre Processing",
|
|
1102
1087
|
modalTitle: "This function will run before sending the request (for scenarios like encryption)",
|
|
1103
1088
|
defaultValue: le.pre,
|
|
@@ -1106,10 +1091,10 @@ function _t({
|
|
|
1106
1091
|
})
|
|
1107
1092
|
}), /* @__PURE__ */ r(R, {
|
|
1108
1093
|
name: "config.processing.post",
|
|
1109
|
-
control:
|
|
1094
|
+
control: i,
|
|
1110
1095
|
render: ({
|
|
1111
1096
|
field: s
|
|
1112
|
-
}) => /* @__PURE__ */ r(
|
|
1097
|
+
}) => /* @__PURE__ */ r(cr, {
|
|
1113
1098
|
label: "Post Processing",
|
|
1114
1099
|
modalTitle: "This function will run after sending the request (for scenarios like decryption)",
|
|
1115
1100
|
defaultValue: le.post,
|
|
@@ -1129,16 +1114,16 @@ function _t({
|
|
|
1129
1114
|
})
|
|
1130
1115
|
});
|
|
1131
1116
|
}
|
|
1132
|
-
function
|
|
1117
|
+
function ht({
|
|
1133
1118
|
postSubmit: t,
|
|
1134
1119
|
styles: n = X
|
|
1135
1120
|
}) {
|
|
1136
|
-
const [
|
|
1121
|
+
const [i, o] = lr("postgresql"), l = async ({
|
|
1137
1122
|
type: d,
|
|
1138
1123
|
key: p,
|
|
1139
|
-
config:
|
|
1124
|
+
config: v
|
|
1140
1125
|
}) => {
|
|
1141
|
-
|
|
1126
|
+
V({
|
|
1142
1127
|
id: "for-creating",
|
|
1143
1128
|
title: "Pending",
|
|
1144
1129
|
message: "Adding data source...",
|
|
@@ -1148,23 +1133,23 @@ function yt({
|
|
|
1148
1133
|
console.log({
|
|
1149
1134
|
type: d,
|
|
1150
1135
|
key: p,
|
|
1151
|
-
config:
|
|
1152
|
-
}), await j.datasource.create(d, p,
|
|
1136
|
+
config: v
|
|
1137
|
+
}), await j.datasource.create(d, p, v), k({
|
|
1153
1138
|
id: "for-creating",
|
|
1154
1139
|
title: "Successful",
|
|
1155
1140
|
message: "Data source is added",
|
|
1156
1141
|
color: "green"
|
|
1157
1142
|
}), t();
|
|
1158
1143
|
} catch (S) {
|
|
1159
|
-
|
|
1144
|
+
k({
|
|
1160
1145
|
id: "for-creating",
|
|
1161
1146
|
title: "Failed",
|
|
1162
1147
|
message: S.message,
|
|
1163
1148
|
color: "red"
|
|
1164
1149
|
});
|
|
1165
1150
|
}
|
|
1166
|
-
}, s =
|
|
1167
|
-
return /* @__PURE__ */
|
|
1151
|
+
}, s = i === "postgresql" || i === "mysql", c = i === "http";
|
|
1152
|
+
return /* @__PURE__ */ b(F, {
|
|
1168
1153
|
mx: "auto",
|
|
1169
1154
|
children: [/* @__PURE__ */ r(Yr, {
|
|
1170
1155
|
fullWidth: !0,
|
|
@@ -1180,34 +1165,34 @@ function yt({
|
|
|
1180
1165
|
label: "HTTP",
|
|
1181
1166
|
value: "http"
|
|
1182
1167
|
}],
|
|
1183
|
-
value:
|
|
1168
|
+
value: i,
|
|
1184
1169
|
onChange: (d) => o(d)
|
|
1185
|
-
}), s && /* @__PURE__ */ r(
|
|
1170
|
+
}), s && /* @__PURE__ */ r(ft, {
|
|
1186
1171
|
submit: l,
|
|
1187
1172
|
styles: n,
|
|
1188
|
-
type:
|
|
1189
|
-
}), c && /* @__PURE__ */ r(
|
|
1173
|
+
type: i
|
|
1174
|
+
}), c && /* @__PURE__ */ r(gt, {
|
|
1190
1175
|
submit: l,
|
|
1191
1176
|
styles: n
|
|
1192
1177
|
})]
|
|
1193
1178
|
});
|
|
1194
1179
|
}
|
|
1195
|
-
function
|
|
1180
|
+
function mt({
|
|
1196
1181
|
onSuccess: t,
|
|
1197
1182
|
styles: n = X
|
|
1198
1183
|
}) {
|
|
1199
|
-
const [
|
|
1200
|
-
return /* @__PURE__ */
|
|
1184
|
+
const [i, o] = H.useState(!1), l = () => o(!0), s = () => o(!1);
|
|
1185
|
+
return /* @__PURE__ */ b(N, {
|
|
1201
1186
|
children: [/* @__PURE__ */ r(ne, {
|
|
1202
1187
|
overflow: "inside",
|
|
1203
|
-
opened:
|
|
1188
|
+
opened: i,
|
|
1204
1189
|
onClose: () => o(!1),
|
|
1205
1190
|
title: "Add a data source",
|
|
1206
1191
|
trapFocus: !0,
|
|
1207
1192
|
onDragStart: (d) => {
|
|
1208
1193
|
d.stopPropagation();
|
|
1209
1194
|
},
|
|
1210
|
-
children: /* @__PURE__ */ r(
|
|
1195
|
+
children: /* @__PURE__ */ r(ht, {
|
|
1211
1196
|
postSubmit: () => {
|
|
1212
1197
|
t(), s();
|
|
1213
1198
|
},
|
|
@@ -1216,60 +1201,70 @@ function Rt({
|
|
|
1216
1201
|
}), /* @__PURE__ */ r(T, {
|
|
1217
1202
|
size: n.button.size,
|
|
1218
1203
|
onClick: l,
|
|
1219
|
-
leftIcon: /* @__PURE__ */ r(
|
|
1204
|
+
leftIcon: /* @__PURE__ */ r(De, {
|
|
1220
1205
|
size: 20
|
|
1221
1206
|
}),
|
|
1222
1207
|
children: "Add a Data Source"
|
|
1223
1208
|
})]
|
|
1224
1209
|
});
|
|
1225
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
|
+
}
|
|
1226
1221
|
function Ce() {
|
|
1227
1222
|
return Ce = Object.assign ? Object.assign.bind() : function(t) {
|
|
1228
1223
|
for (var n = 1; n < arguments.length; n++) {
|
|
1229
|
-
var
|
|
1230
|
-
for (var o in
|
|
1231
|
-
Object.prototype.hasOwnProperty.call(
|
|
1224
|
+
var i = arguments[n];
|
|
1225
|
+
for (var o in i)
|
|
1226
|
+
Object.prototype.hasOwnProperty.call(i, o) && (t[o] = i[o]);
|
|
1232
1227
|
}
|
|
1233
1228
|
return t;
|
|
1234
1229
|
}, Ce.apply(this, arguments);
|
|
1235
1230
|
}
|
|
1236
|
-
function
|
|
1231
|
+
function wt(t, n) {
|
|
1237
1232
|
if (t == null)
|
|
1238
1233
|
return {};
|
|
1239
|
-
var
|
|
1234
|
+
var i, o, l = function(c, d) {
|
|
1240
1235
|
if (c == null)
|
|
1241
1236
|
return {};
|
|
1242
|
-
var p,
|
|
1243
|
-
for (
|
|
1244
|
-
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]);
|
|
1245
1240
|
return S;
|
|
1246
1241
|
}(t, n);
|
|
1247
1242
|
if (Object.getOwnPropertySymbols) {
|
|
1248
1243
|
var s = Object.getOwnPropertySymbols(t);
|
|
1249
1244
|
for (o = 0; o < s.length; o++)
|
|
1250
|
-
|
|
1245
|
+
i = s[o], n.indexOf(i) >= 0 || Object.prototype.propertyIsEnumerable.call(t, i) && (l[i] = t[i]);
|
|
1251
1246
|
}
|
|
1252
1247
|
return l;
|
|
1253
1248
|
}
|
|
1254
|
-
var
|
|
1255
|
-
function
|
|
1256
|
-
var n = t.size,
|
|
1257
|
-
return ee.createElement("svg", Ce({ xmlns: "http://www.w3.org/2000/svg", className: "icon icon-tabler icon-tabler-lock", width:
|
|
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);
|
|
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" }));
|
|
1258
1253
|
}
|
|
1259
|
-
function
|
|
1254
|
+
function yt({
|
|
1260
1255
|
id: t,
|
|
1261
1256
|
name: n,
|
|
1262
|
-
isProtected:
|
|
1257
|
+
isProtected: i,
|
|
1263
1258
|
onSuccess: o,
|
|
1264
1259
|
styles: l = X
|
|
1265
1260
|
}) {
|
|
1266
1261
|
const s = fe(), c = async () => {
|
|
1267
|
-
!t || (
|
|
1262
|
+
!t || (V({
|
|
1268
1263
|
id: "for-deleting",
|
|
1269
1264
|
title: "Pending",
|
|
1270
1265
|
message: "Deleting data source...",
|
|
1271
1266
|
loading: !0
|
|
1272
|
-
}), await j.datasource.delete(t),
|
|
1267
|
+
}), await j.datasource.delete(t), k({
|
|
1273
1268
|
id: "for-deleting",
|
|
1274
1269
|
title: "Successful",
|
|
1275
1270
|
message: `Data source [${n}] is deleted`,
|
|
@@ -1288,7 +1283,7 @@ function Tt({
|
|
|
1288
1283
|
onCancel: () => console.log("Cancel"),
|
|
1289
1284
|
onConfirm: c
|
|
1290
1285
|
}), p = Kr();
|
|
1291
|
-
return
|
|
1286
|
+
return i ? /* @__PURE__ */ r(Br, {
|
|
1292
1287
|
withArrow: !0,
|
|
1293
1288
|
events: {
|
|
1294
1289
|
hover: !0,
|
|
@@ -1297,7 +1292,7 @@ function Tt({
|
|
|
1297
1292
|
},
|
|
1298
1293
|
label: "This is a preset datasource, it can not be deleted",
|
|
1299
1294
|
children: /* @__PURE__ */ r("span", {
|
|
1300
|
-
children: /* @__PURE__ */ r(
|
|
1295
|
+
children: /* @__PURE__ */ r(_t, {
|
|
1301
1296
|
size: 16,
|
|
1302
1297
|
color: p.colors.gray[7]
|
|
1303
1298
|
})
|
|
@@ -1306,19 +1301,19 @@ function Tt({
|
|
|
1306
1301
|
size: l.button.size,
|
|
1307
1302
|
color: "red",
|
|
1308
1303
|
onClick: d,
|
|
1309
|
-
leftIcon: /* @__PURE__ */ r(
|
|
1304
|
+
leftIcon: /* @__PURE__ */ r(je, {
|
|
1310
1305
|
size: 20
|
|
1311
1306
|
}),
|
|
1312
1307
|
children: "Delete"
|
|
1313
1308
|
});
|
|
1314
1309
|
}
|
|
1315
|
-
function
|
|
1310
|
+
function Wt({
|
|
1316
1311
|
styles: t = X,
|
|
1317
1312
|
config: n
|
|
1318
1313
|
}) {
|
|
1319
|
-
pe(n);
|
|
1314
|
+
vt(n.basename), pe(n);
|
|
1320
1315
|
const {
|
|
1321
|
-
data:
|
|
1316
|
+
data: i = [],
|
|
1322
1317
|
loading: o,
|
|
1323
1318
|
refresh: l
|
|
1324
1319
|
} = G(async () => {
|
|
@@ -1329,27 +1324,27 @@ function en({
|
|
|
1329
1324
|
}, {
|
|
1330
1325
|
refreshDeps: []
|
|
1331
1326
|
});
|
|
1332
|
-
return /* @__PURE__ */
|
|
1327
|
+
return /* @__PURE__ */ b(N, {
|
|
1333
1328
|
children: [/* @__PURE__ */ r(O, {
|
|
1334
1329
|
pt: t.spacing,
|
|
1335
1330
|
position: "right",
|
|
1336
|
-
children: /* @__PURE__ */ r(
|
|
1331
|
+
children: /* @__PURE__ */ r(mt, {
|
|
1337
1332
|
onSuccess: l
|
|
1338
1333
|
})
|
|
1339
|
-
}), /* @__PURE__ */
|
|
1334
|
+
}), /* @__PURE__ */ b(F, {
|
|
1340
1335
|
mt: t.spacing,
|
|
1341
1336
|
sx: {
|
|
1342
1337
|
position: "relative"
|
|
1343
1338
|
},
|
|
1344
1339
|
children: [/* @__PURE__ */ r(Oe, {
|
|
1345
1340
|
visible: o
|
|
1346
|
-
}), /* @__PURE__ */
|
|
1341
|
+
}), /* @__PURE__ */ b(Ae, {
|
|
1347
1342
|
horizontalSpacing: t.spacing,
|
|
1348
1343
|
verticalSpacing: t.spacing,
|
|
1349
1344
|
fontSize: t.size,
|
|
1350
1345
|
highlightOnHover: !0,
|
|
1351
1346
|
children: [/* @__PURE__ */ r("thead", {
|
|
1352
|
-
children: /* @__PURE__ */
|
|
1347
|
+
children: /* @__PURE__ */ b("tr", {
|
|
1353
1348
|
children: [/* @__PURE__ */ r("th", {
|
|
1354
1349
|
children: "Type"
|
|
1355
1350
|
}), /* @__PURE__ */ r("th", {
|
|
@@ -1359,12 +1354,12 @@ function en({
|
|
|
1359
1354
|
})]
|
|
1360
1355
|
})
|
|
1361
1356
|
}), /* @__PURE__ */ r("tbody", {
|
|
1362
|
-
children:
|
|
1357
|
+
children: i.map(({
|
|
1363
1358
|
id: s,
|
|
1364
1359
|
key: c,
|
|
1365
1360
|
type: d,
|
|
1366
1361
|
is_preset: p
|
|
1367
|
-
}) => /* @__PURE__ */
|
|
1362
|
+
}) => /* @__PURE__ */ b("tr", {
|
|
1368
1363
|
children: [/* @__PURE__ */ r("td", {
|
|
1369
1364
|
width: 200,
|
|
1370
1365
|
children: d
|
|
@@ -1374,7 +1369,7 @@ function en({
|
|
|
1374
1369
|
width: 200,
|
|
1375
1370
|
children: /* @__PURE__ */ r(O, {
|
|
1376
1371
|
position: "left",
|
|
1377
|
-
children: /* @__PURE__ */ r(
|
|
1372
|
+
children: /* @__PURE__ */ r(yt, {
|
|
1378
1373
|
isProtected: p,
|
|
1379
1374
|
id: s,
|
|
1380
1375
|
name: c,
|
|
@@ -1388,12 +1383,12 @@ function en({
|
|
|
1388
1383
|
})]
|
|
1389
1384
|
});
|
|
1390
1385
|
}
|
|
1391
|
-
const
|
|
1386
|
+
const Rt = ke(({
|
|
1392
1387
|
label: t,
|
|
1393
1388
|
value: n,
|
|
1394
|
-
description:
|
|
1389
|
+
description: i,
|
|
1395
1390
|
...o
|
|
1396
|
-
}, l) => /* @__PURE__ */
|
|
1391
|
+
}, l) => /* @__PURE__ */ b(ze, {
|
|
1397
1392
|
spacing: 2,
|
|
1398
1393
|
ref: l,
|
|
1399
1394
|
...o,
|
|
@@ -1404,12 +1399,12 @@ const zt = ke(({
|
|
|
1404
1399
|
size: "xs",
|
|
1405
1400
|
color: "dimmed",
|
|
1406
1401
|
className: "role-description",
|
|
1407
|
-
children:
|
|
1402
|
+
children: i
|
|
1408
1403
|
})]
|
|
1409
|
-
})),
|
|
1404
|
+
})), Ie = ke(({
|
|
1410
1405
|
styles: t,
|
|
1411
1406
|
value: n,
|
|
1412
|
-
onChange:
|
|
1407
|
+
onChange: i
|
|
1413
1408
|
}, o) => {
|
|
1414
1409
|
const {
|
|
1415
1410
|
data: l = [],
|
|
@@ -1428,7 +1423,7 @@ const zt = ke(({
|
|
|
1428
1423
|
size: t.size,
|
|
1429
1424
|
required: !0,
|
|
1430
1425
|
label: "Role",
|
|
1431
|
-
itemComponent:
|
|
1426
|
+
itemComponent: Rt,
|
|
1432
1427
|
data: l,
|
|
1433
1428
|
disabled: s,
|
|
1434
1429
|
styles: () => ({
|
|
@@ -1443,19 +1438,19 @@ const zt = ke(({
|
|
|
1443
1438
|
}
|
|
1444
1439
|
}),
|
|
1445
1440
|
value: n,
|
|
1446
|
-
onChange:
|
|
1441
|
+
onChange: i
|
|
1447
1442
|
});
|
|
1448
|
-
}),
|
|
1443
|
+
}), $ = {
|
|
1449
1444
|
size: "sm",
|
|
1450
1445
|
spacing: "md",
|
|
1451
1446
|
button: {
|
|
1452
1447
|
size: "xs"
|
|
1453
1448
|
}
|
|
1454
1449
|
};
|
|
1455
|
-
function
|
|
1450
|
+
function Pt({
|
|
1456
1451
|
postSubmit: t,
|
|
1457
|
-
styles: n =
|
|
1458
|
-
initialRoleID:
|
|
1452
|
+
styles: n = $,
|
|
1453
|
+
initialRoleID: i
|
|
1459
1454
|
}) {
|
|
1460
1455
|
const {
|
|
1461
1456
|
control: o,
|
|
@@ -1464,33 +1459,33 @@ function Ot({
|
|
|
1464
1459
|
defaultValues: {
|
|
1465
1460
|
name: "",
|
|
1466
1461
|
email: "",
|
|
1467
|
-
role_id:
|
|
1462
|
+
role_id: i,
|
|
1468
1463
|
password: ""
|
|
1469
1464
|
}
|
|
1470
1465
|
});
|
|
1471
1466
|
return /* @__PURE__ */ r(F, {
|
|
1472
1467
|
mx: "auto",
|
|
1473
|
-
children: /* @__PURE__ */
|
|
1468
|
+
children: /* @__PURE__ */ b("form", {
|
|
1474
1469
|
onSubmit: l(async ({
|
|
1475
1470
|
name: c,
|
|
1476
1471
|
email: d,
|
|
1477
1472
|
password: p,
|
|
1478
|
-
role_id:
|
|
1473
|
+
role_id: v
|
|
1479
1474
|
}) => {
|
|
1480
1475
|
try {
|
|
1481
|
-
|
|
1476
|
+
V({
|
|
1482
1477
|
id: "for-creating",
|
|
1483
1478
|
title: "Pending",
|
|
1484
1479
|
message: "Adding account...",
|
|
1485
1480
|
loading: !0
|
|
1486
|
-
}), await j.account.create(c, d, p,
|
|
1481
|
+
}), await j.account.create(c, d, p, v), k({
|
|
1487
1482
|
id: "for-creating",
|
|
1488
1483
|
title: "Successful",
|
|
1489
1484
|
message: "Account is added",
|
|
1490
1485
|
color: "green"
|
|
1491
1486
|
}), t();
|
|
1492
1487
|
} catch (S) {
|
|
1493
|
-
|
|
1488
|
+
k({
|
|
1494
1489
|
id: "for-creating",
|
|
1495
1490
|
title: "Failed",
|
|
1496
1491
|
message: S.message,
|
|
@@ -1540,7 +1535,7 @@ function Ot({
|
|
|
1540
1535
|
control: o,
|
|
1541
1536
|
render: ({
|
|
1542
1537
|
field: c
|
|
1543
|
-
}) => /* @__PURE__ */ r(
|
|
1538
|
+
}) => /* @__PURE__ */ r(Ie, {
|
|
1544
1539
|
styles: n,
|
|
1545
1540
|
...c
|
|
1546
1541
|
})
|
|
@@ -1556,13 +1551,13 @@ function Ot({
|
|
|
1556
1551
|
})
|
|
1557
1552
|
});
|
|
1558
1553
|
}
|
|
1559
|
-
function
|
|
1554
|
+
function Et({
|
|
1560
1555
|
onSuccess: t,
|
|
1561
|
-
styles: n =
|
|
1562
|
-
initialRoleID:
|
|
1556
|
+
styles: n = $,
|
|
1557
|
+
initialRoleID: i
|
|
1563
1558
|
}) {
|
|
1564
1559
|
const [o, l] = H.useState(!1), s = () => l(!0), c = () => l(!1);
|
|
1565
|
-
return /* @__PURE__ */
|
|
1560
|
+
return /* @__PURE__ */ b(N, {
|
|
1566
1561
|
children: [/* @__PURE__ */ r(ne, {
|
|
1567
1562
|
overflow: "inside",
|
|
1568
1563
|
opened: o,
|
|
@@ -1572,46 +1567,46 @@ function At({
|
|
|
1572
1567
|
onDragStart: (p) => {
|
|
1573
1568
|
p.stopPropagation();
|
|
1574
1569
|
},
|
|
1575
|
-
children: /* @__PURE__ */ r(
|
|
1570
|
+
children: /* @__PURE__ */ r(Pt, {
|
|
1576
1571
|
postSubmit: () => {
|
|
1577
1572
|
t(), c();
|
|
1578
1573
|
},
|
|
1579
1574
|
styles: n,
|
|
1580
|
-
initialRoleID:
|
|
1575
|
+
initialRoleID: i
|
|
1581
1576
|
})
|
|
1582
1577
|
}), /* @__PURE__ */ r(T, {
|
|
1583
1578
|
size: n.button.size,
|
|
1584
1579
|
onClick: s,
|
|
1585
|
-
leftIcon: /* @__PURE__ */ r(
|
|
1580
|
+
leftIcon: /* @__PURE__ */ r(De, {
|
|
1586
1581
|
size: 20
|
|
1587
1582
|
}),
|
|
1588
1583
|
children: "Add an Account"
|
|
1589
1584
|
})]
|
|
1590
1585
|
});
|
|
1591
1586
|
}
|
|
1592
|
-
function
|
|
1587
|
+
function Ct({
|
|
1593
1588
|
id: t,
|
|
1594
1589
|
name: n,
|
|
1595
|
-
onSuccess:
|
|
1596
|
-
styles: o =
|
|
1590
|
+
onSuccess: i,
|
|
1591
|
+
styles: o = $
|
|
1597
1592
|
}) {
|
|
1598
1593
|
const l = fe(), s = async () => {
|
|
1599
1594
|
if (!!t) {
|
|
1600
|
-
|
|
1595
|
+
V({
|
|
1601
1596
|
id: "for-deleting",
|
|
1602
1597
|
title: "Pending",
|
|
1603
1598
|
message: "Deleting account...",
|
|
1604
1599
|
loading: !0
|
|
1605
1600
|
});
|
|
1606
1601
|
try {
|
|
1607
|
-
await j.account.delete(t),
|
|
1602
|
+
await j.account.delete(t), k({
|
|
1608
1603
|
id: "for-deleting",
|
|
1609
1604
|
title: "Successful",
|
|
1610
1605
|
message: `Account [${n}] is deleted`,
|
|
1611
1606
|
color: "green"
|
|
1612
|
-
}),
|
|
1607
|
+
}), i();
|
|
1613
1608
|
} catch (d) {
|
|
1614
|
-
|
|
1609
|
+
k({
|
|
1615
1610
|
id: "for-deleting",
|
|
1616
1611
|
title: "Failed",
|
|
1617
1612
|
message: d.message,
|
|
@@ -1632,19 +1627,19 @@ function kt({
|
|
|
1632
1627
|
size: o.button.size,
|
|
1633
1628
|
color: "red",
|
|
1634
1629
|
onClick: c,
|
|
1635
|
-
leftIcon: /* @__PURE__ */ r(
|
|
1630
|
+
leftIcon: /* @__PURE__ */ r(je, {
|
|
1636
1631
|
size: 20
|
|
1637
1632
|
}),
|
|
1638
1633
|
children: "Delete"
|
|
1639
1634
|
});
|
|
1640
1635
|
}
|
|
1641
|
-
function
|
|
1636
|
+
function Tt({
|
|
1642
1637
|
id: t,
|
|
1643
1638
|
name: n,
|
|
1644
|
-
email:
|
|
1639
|
+
email: i,
|
|
1645
1640
|
role_id: o,
|
|
1646
1641
|
postSubmit: l,
|
|
1647
|
-
styles: s =
|
|
1642
|
+
styles: s = $
|
|
1648
1643
|
}) {
|
|
1649
1644
|
const {
|
|
1650
1645
|
control: c,
|
|
@@ -1653,20 +1648,20 @@ function xt({
|
|
|
1653
1648
|
} = J({
|
|
1654
1649
|
defaultValues: {
|
|
1655
1650
|
name: n,
|
|
1656
|
-
email:
|
|
1651
|
+
email: i,
|
|
1657
1652
|
role_id: o,
|
|
1658
1653
|
reset_password: !1,
|
|
1659
1654
|
new_password: ""
|
|
1660
1655
|
}
|
|
1661
|
-
}),
|
|
1656
|
+
}), v = async ({
|
|
1662
1657
|
name: f,
|
|
1663
1658
|
email: z,
|
|
1664
1659
|
role_id: q,
|
|
1665
|
-
reset_password:
|
|
1666
|
-
new_password:
|
|
1660
|
+
reset_password: W,
|
|
1661
|
+
new_password: me
|
|
1667
1662
|
}) => {
|
|
1668
1663
|
try {
|
|
1669
|
-
|
|
1664
|
+
V({
|
|
1670
1665
|
id: "for-updating",
|
|
1671
1666
|
title: "Pending",
|
|
1672
1667
|
message: "Updating account...",
|
|
@@ -1676,27 +1671,27 @@ function xt({
|
|
|
1676
1671
|
name: f,
|
|
1677
1672
|
email: z,
|
|
1678
1673
|
role_id: q,
|
|
1679
|
-
reset_password:
|
|
1680
|
-
new_password:
|
|
1681
|
-
}),
|
|
1674
|
+
reset_password: W,
|
|
1675
|
+
new_password: me
|
|
1676
|
+
}), k({
|
|
1682
1677
|
id: "for-updating",
|
|
1683
1678
|
title: "Successful",
|
|
1684
1679
|
message: "Account is updated",
|
|
1685
1680
|
color: "green"
|
|
1686
1681
|
}), l();
|
|
1687
1682
|
} catch (U) {
|
|
1688
|
-
|
|
1683
|
+
k({
|
|
1689
1684
|
id: "for-updating",
|
|
1690
1685
|
title: "Failed",
|
|
1691
1686
|
message: U.message,
|
|
1692
1687
|
color: "red"
|
|
1693
1688
|
});
|
|
1694
1689
|
}
|
|
1695
|
-
}, [S,
|
|
1690
|
+
}, [S, h] = p(["reset_password", "new_password"]);
|
|
1696
1691
|
return /* @__PURE__ */ r(F, {
|
|
1697
1692
|
mx: "auto",
|
|
1698
|
-
children: /* @__PURE__ */
|
|
1699
|
-
onSubmit: d(
|
|
1693
|
+
children: /* @__PURE__ */ b("form", {
|
|
1694
|
+
onSubmit: d(v),
|
|
1700
1695
|
children: [/* @__PURE__ */ r(R, {
|
|
1701
1696
|
name: "name",
|
|
1702
1697
|
control: c,
|
|
@@ -1726,7 +1721,7 @@ function xt({
|
|
|
1726
1721
|
control: c,
|
|
1727
1722
|
render: ({
|
|
1728
1723
|
field: f
|
|
1729
|
-
}) => /* @__PURE__ */ r(
|
|
1724
|
+
}) => /* @__PURE__ */ r(Ie, {
|
|
1730
1725
|
styles: s,
|
|
1731
1726
|
...f
|
|
1732
1727
|
})
|
|
@@ -1778,15 +1773,15 @@ function xt({
|
|
|
1778
1773
|
})
|
|
1779
1774
|
});
|
|
1780
1775
|
}
|
|
1781
|
-
function
|
|
1776
|
+
function zt({
|
|
1782
1777
|
account: t,
|
|
1783
1778
|
onSuccess: n,
|
|
1784
|
-
styles:
|
|
1779
|
+
styles: i = $
|
|
1785
1780
|
}) {
|
|
1786
1781
|
const [o, l] = H.useState(!1), s = () => l(!0), c = () => l(!1), d = () => {
|
|
1787
1782
|
n(), c();
|
|
1788
1783
|
};
|
|
1789
|
-
return /* @__PURE__ */
|
|
1784
|
+
return /* @__PURE__ */ b(N, {
|
|
1790
1785
|
children: [/* @__PURE__ */ r(ne, {
|
|
1791
1786
|
overflow: "inside",
|
|
1792
1787
|
opened: o,
|
|
@@ -1796,13 +1791,13 @@ function Dt({
|
|
|
1796
1791
|
onDragStart: (p) => {
|
|
1797
1792
|
p.stopPropagation();
|
|
1798
1793
|
},
|
|
1799
|
-
children: /* @__PURE__ */ r(
|
|
1794
|
+
children: /* @__PURE__ */ r(Tt, {
|
|
1800
1795
|
...t,
|
|
1801
1796
|
postSubmit: d,
|
|
1802
|
-
styles:
|
|
1797
|
+
styles: i
|
|
1803
1798
|
})
|
|
1804
1799
|
}), /* @__PURE__ */ r(T, {
|
|
1805
|
-
size:
|
|
1800
|
+
size: i.button.size,
|
|
1806
1801
|
onClick: s,
|
|
1807
1802
|
leftIcon: /* @__PURE__ */ r(Xr, {
|
|
1808
1803
|
size: 20
|
|
@@ -1811,21 +1806,21 @@ function Dt({
|
|
|
1811
1806
|
})]
|
|
1812
1807
|
});
|
|
1813
1808
|
}
|
|
1814
|
-
function
|
|
1815
|
-
styles: t =
|
|
1809
|
+
function Yt({
|
|
1810
|
+
styles: t = $,
|
|
1816
1811
|
config: n
|
|
1817
1812
|
}) {
|
|
1818
|
-
var
|
|
1813
|
+
var v, S;
|
|
1819
1814
|
pe(n);
|
|
1820
1815
|
const {
|
|
1821
|
-
data:
|
|
1816
|
+
data: i = [],
|
|
1822
1817
|
loading: o,
|
|
1823
1818
|
refresh: l
|
|
1824
1819
|
} = G(async () => {
|
|
1825
1820
|
const {
|
|
1826
|
-
data:
|
|
1821
|
+
data: h
|
|
1827
1822
|
} = await j.account.list();
|
|
1828
|
-
return
|
|
1823
|
+
return h;
|
|
1829
1824
|
}, {
|
|
1830
1825
|
refreshDeps: []
|
|
1831
1826
|
}), {
|
|
@@ -1838,32 +1833,32 @@ function rn({
|
|
|
1838
1833
|
disabled: f.id === 50
|
|
1839
1834
|
})), {
|
|
1840
1835
|
refreshDeps: []
|
|
1841
|
-
}), d = ur(() => s.reduce((
|
|
1836
|
+
}), d = ur(() => s.reduce((h, f) => (h.set(f.value, f.label), h), /* @__PURE__ */ new Map()), [s]), p = (h) => {
|
|
1842
1837
|
var f;
|
|
1843
|
-
return (f = d.get(
|
|
1838
|
+
return (f = d.get(h)) != null ? f : h;
|
|
1844
1839
|
};
|
|
1845
|
-
return /* @__PURE__ */
|
|
1840
|
+
return /* @__PURE__ */ b(N, {
|
|
1846
1841
|
children: [/* @__PURE__ */ r(O, {
|
|
1847
1842
|
pt: t.spacing,
|
|
1848
1843
|
position: "right",
|
|
1849
|
-
children: /* @__PURE__ */ r(
|
|
1844
|
+
children: /* @__PURE__ */ r(Et, {
|
|
1850
1845
|
onSuccess: l,
|
|
1851
|
-
initialRoleID: (S = (
|
|
1846
|
+
initialRoleID: (S = (v = s == null ? void 0 : s[0]) == null ? void 0 : v.value) != null ? S : 0
|
|
1852
1847
|
})
|
|
1853
|
-
}), /* @__PURE__ */
|
|
1848
|
+
}), /* @__PURE__ */ b(F, {
|
|
1854
1849
|
mt: t.spacing,
|
|
1855
1850
|
sx: {
|
|
1856
1851
|
position: "relative"
|
|
1857
1852
|
},
|
|
1858
1853
|
children: [/* @__PURE__ */ r(Oe, {
|
|
1859
1854
|
visible: o || c
|
|
1860
|
-
}), /* @__PURE__ */
|
|
1855
|
+
}), /* @__PURE__ */ b(Ae, {
|
|
1861
1856
|
horizontalSpacing: t.spacing,
|
|
1862
1857
|
verticalSpacing: t.spacing,
|
|
1863
1858
|
fontSize: t.size,
|
|
1864
1859
|
highlightOnHover: !0,
|
|
1865
1860
|
children: [/* @__PURE__ */ r("thead", {
|
|
1866
|
-
children: /* @__PURE__ */
|
|
1861
|
+
children: /* @__PURE__ */ b("tr", {
|
|
1867
1862
|
children: [/* @__PURE__ */ r("th", {
|
|
1868
1863
|
children: "Username"
|
|
1869
1864
|
}), /* @__PURE__ */ r("th", {
|
|
@@ -1875,14 +1870,14 @@ function rn({
|
|
|
1875
1870
|
})]
|
|
1876
1871
|
})
|
|
1877
1872
|
}), /* @__PURE__ */ r("tbody", {
|
|
1878
|
-
children:
|
|
1873
|
+
children: i.map((h) => {
|
|
1879
1874
|
const {
|
|
1880
1875
|
id: f,
|
|
1881
1876
|
name: z,
|
|
1882
1877
|
email: q,
|
|
1883
|
-
role_id:
|
|
1884
|
-
} =
|
|
1885
|
-
return /* @__PURE__ */
|
|
1878
|
+
role_id: W
|
|
1879
|
+
} = h;
|
|
1880
|
+
return /* @__PURE__ */ b("tr", {
|
|
1886
1881
|
children: [/* @__PURE__ */ r("td", {
|
|
1887
1882
|
width: 200,
|
|
1888
1883
|
children: z
|
|
@@ -1891,15 +1886,15 @@ function rn({
|
|
|
1891
1886
|
children: q
|
|
1892
1887
|
}), /* @__PURE__ */ r("td", {
|
|
1893
1888
|
width: 200,
|
|
1894
|
-
children: p(
|
|
1889
|
+
children: p(W)
|
|
1895
1890
|
}), /* @__PURE__ */ r("td", {
|
|
1896
1891
|
width: 200,
|
|
1897
|
-
children: /* @__PURE__ */
|
|
1892
|
+
children: /* @__PURE__ */ b(O, {
|
|
1898
1893
|
position: "left",
|
|
1899
|
-
children: [/* @__PURE__ */ r(
|
|
1900
|
-
account:
|
|
1894
|
+
children: [/* @__PURE__ */ r(zt, {
|
|
1895
|
+
account: h,
|
|
1901
1896
|
onSuccess: l
|
|
1902
|
-
}), /* @__PURE__ */ r(
|
|
1897
|
+
}), /* @__PURE__ */ r(Ct, {
|
|
1903
1898
|
id: f,
|
|
1904
1899
|
name: z,
|
|
1905
1900
|
onSuccess: l
|
|
@@ -1913,12 +1908,12 @@ function rn({
|
|
|
1913
1908
|
})]
|
|
1914
1909
|
});
|
|
1915
1910
|
}
|
|
1916
|
-
function
|
|
1911
|
+
function Ot({
|
|
1917
1912
|
postSubmit: t,
|
|
1918
|
-
styles: n =
|
|
1913
|
+
styles: n = $
|
|
1919
1914
|
}) {
|
|
1920
1915
|
const {
|
|
1921
|
-
control:
|
|
1916
|
+
control: i,
|
|
1922
1917
|
handleSubmit: o
|
|
1923
1918
|
} = J({
|
|
1924
1919
|
defaultValues: {
|
|
@@ -1928,27 +1923,27 @@ function jt({
|
|
|
1928
1923
|
});
|
|
1929
1924
|
return /* @__PURE__ */ r(F, {
|
|
1930
1925
|
mx: "auto",
|
|
1931
|
-
children: /* @__PURE__ */
|
|
1926
|
+
children: /* @__PURE__ */ b("form", {
|
|
1932
1927
|
onSubmit: o(async ({
|
|
1933
1928
|
name: s,
|
|
1934
1929
|
password: c
|
|
1935
1930
|
}) => {
|
|
1936
1931
|
try {
|
|
1937
|
-
|
|
1932
|
+
V({
|
|
1938
1933
|
id: "for-login",
|
|
1939
1934
|
title: "Pending",
|
|
1940
1935
|
message: "Loggin in...",
|
|
1941
1936
|
loading: !0
|
|
1942
1937
|
});
|
|
1943
1938
|
const d = await j.account.login(s, c);
|
|
1944
|
-
window.localStorage.setItem("token", d.token),
|
|
1939
|
+
window.localStorage.setItem("token", d.token), k({
|
|
1945
1940
|
id: "for-login",
|
|
1946
1941
|
title: "Successful",
|
|
1947
1942
|
message: "Logged in",
|
|
1948
1943
|
color: "green"
|
|
1949
1944
|
}), t(d);
|
|
1950
1945
|
} catch (d) {
|
|
1951
|
-
|
|
1946
|
+
k({
|
|
1952
1947
|
id: "for-login",
|
|
1953
1948
|
title: "Login Failed",
|
|
1954
1949
|
message: d.message,
|
|
@@ -1958,7 +1953,7 @@ function jt({
|
|
|
1958
1953
|
}),
|
|
1959
1954
|
children: [/* @__PURE__ */ r(R, {
|
|
1960
1955
|
name: "name",
|
|
1961
|
-
control:
|
|
1956
|
+
control: i,
|
|
1962
1957
|
render: ({
|
|
1963
1958
|
field: s
|
|
1964
1959
|
}) => /* @__PURE__ */ r(D, {
|
|
@@ -1970,7 +1965,7 @@ function jt({
|
|
|
1970
1965
|
})
|
|
1971
1966
|
}), /* @__PURE__ */ r(R, {
|
|
1972
1967
|
name: "password",
|
|
1973
|
-
control:
|
|
1968
|
+
control: i,
|
|
1974
1969
|
render: ({
|
|
1975
1970
|
field: s
|
|
1976
1971
|
}) => /* @__PURE__ */ r(de, {
|
|
@@ -1992,10 +1987,10 @@ function jt({
|
|
|
1992
1987
|
})
|
|
1993
1988
|
});
|
|
1994
1989
|
}
|
|
1995
|
-
function
|
|
1996
|
-
styles: t =
|
|
1990
|
+
function Kt({
|
|
1991
|
+
styles: t = $,
|
|
1997
1992
|
config: n,
|
|
1998
|
-
onSuccess:
|
|
1993
|
+
onSuccess: i
|
|
1999
1994
|
}) {
|
|
2000
1995
|
return pe(n), /* @__PURE__ */ r(N, {
|
|
2001
1996
|
children: /* @__PURE__ */ r(F, {
|
|
@@ -2003,24 +1998,24 @@ function tn({
|
|
|
2003
1998
|
sx: {
|
|
2004
1999
|
position: "relative"
|
|
2005
2000
|
},
|
|
2006
|
-
children: /* @__PURE__ */ r(
|
|
2001
|
+
children: /* @__PURE__ */ r(Ot, {
|
|
2007
2002
|
styles: t,
|
|
2008
|
-
postSubmit:
|
|
2003
|
+
postSubmit: i
|
|
2009
2004
|
})
|
|
2010
2005
|
})
|
|
2011
2006
|
});
|
|
2012
2007
|
}
|
|
2013
|
-
const
|
|
2008
|
+
const he = {
|
|
2014
2009
|
size: "sm",
|
|
2015
2010
|
spacing: "md",
|
|
2016
2011
|
button: {
|
|
2017
2012
|
size: "xs"
|
|
2018
2013
|
}
|
|
2019
2014
|
};
|
|
2020
|
-
function
|
|
2015
|
+
function At({
|
|
2021
2016
|
postSubmit: t,
|
|
2022
|
-
styles: n =
|
|
2023
|
-
initialRoleID:
|
|
2017
|
+
styles: n = he,
|
|
2018
|
+
initialRoleID: i
|
|
2024
2019
|
}) {
|
|
2025
2020
|
const {
|
|
2026
2021
|
control: o,
|
|
@@ -2028,18 +2023,18 @@ function It({
|
|
|
2028
2023
|
} = J({
|
|
2029
2024
|
defaultValues: {
|
|
2030
2025
|
name: "",
|
|
2031
|
-
role_id:
|
|
2026
|
+
role_id: i
|
|
2032
2027
|
}
|
|
2033
2028
|
});
|
|
2034
2029
|
return /* @__PURE__ */ r(F, {
|
|
2035
2030
|
mx: "auto",
|
|
2036
|
-
children: /* @__PURE__ */
|
|
2031
|
+
children: /* @__PURE__ */ b("form", {
|
|
2037
2032
|
onSubmit: l(async ({
|
|
2038
2033
|
name: c,
|
|
2039
2034
|
role_id: d
|
|
2040
2035
|
}) => {
|
|
2041
2036
|
try {
|
|
2042
|
-
|
|
2037
|
+
V({
|
|
2043
2038
|
id: "for-creating",
|
|
2044
2039
|
title: "Pending",
|
|
2045
2040
|
message: "Adding API Key...",
|
|
@@ -2047,16 +2042,16 @@ function It({
|
|
|
2047
2042
|
});
|
|
2048
2043
|
const {
|
|
2049
2044
|
app_id: p,
|
|
2050
|
-
app_secret:
|
|
2045
|
+
app_secret: v
|
|
2051
2046
|
} = await j.api_key.create(c, d);
|
|
2052
|
-
|
|
2047
|
+
k({
|
|
2053
2048
|
id: "for-creating",
|
|
2054
2049
|
title: "Successful",
|
|
2055
2050
|
message: "API Key is added",
|
|
2056
2051
|
color: "green"
|
|
2057
|
-
}), t(p,
|
|
2052
|
+
}), t(p, v);
|
|
2058
2053
|
} catch (p) {
|
|
2059
|
-
|
|
2054
|
+
k({
|
|
2060
2055
|
id: "for-creating",
|
|
2061
2056
|
title: "Failed",
|
|
2062
2057
|
message: p.message,
|
|
@@ -2081,7 +2076,7 @@ function It({
|
|
|
2081
2076
|
control: o,
|
|
2082
2077
|
render: ({
|
|
2083
2078
|
field: c
|
|
2084
|
-
}) => /* @__PURE__ */ r(
|
|
2079
|
+
}) => /* @__PURE__ */ r(Ie, {
|
|
2085
2080
|
styles: n,
|
|
2086
2081
|
...c
|
|
2087
2082
|
})
|
|
@@ -2097,32 +2092,32 @@ function It({
|
|
|
2097
2092
|
})
|
|
2098
2093
|
});
|
|
2099
2094
|
}
|
|
2100
|
-
function
|
|
2095
|
+
function xt({
|
|
2101
2096
|
onSuccess: t,
|
|
2102
|
-
styles: n =
|
|
2103
|
-
initialRoleID:
|
|
2097
|
+
styles: n = he,
|
|
2098
|
+
initialRoleID: i
|
|
2104
2099
|
}) {
|
|
2105
2100
|
const o = fe(), [l, s] = H.useState(!1), c = () => s(!0), d = () => s(!1);
|
|
2106
|
-
return /* @__PURE__ */
|
|
2101
|
+
return /* @__PURE__ */ b(N, {
|
|
2107
2102
|
children: [/* @__PURE__ */ r(ne, {
|
|
2108
2103
|
overflow: "inside",
|
|
2109
2104
|
opened: l,
|
|
2110
2105
|
onClose: () => s(!1),
|
|
2111
2106
|
title: "Add an API Key",
|
|
2112
2107
|
trapFocus: !0,
|
|
2113
|
-
onDragStart: (
|
|
2114
|
-
|
|
2108
|
+
onDragStart: (v) => {
|
|
2109
|
+
v.stopPropagation();
|
|
2115
2110
|
},
|
|
2116
|
-
children: /* @__PURE__ */ r(
|
|
2117
|
-
postSubmit: (
|
|
2111
|
+
children: /* @__PURE__ */ r(At, {
|
|
2112
|
+
postSubmit: (v, S) => {
|
|
2118
2113
|
d(), o.openModal({
|
|
2119
2114
|
title: "API Key is generated",
|
|
2120
|
-
children: /* @__PURE__ */
|
|
2115
|
+
children: /* @__PURE__ */ b(ze, {
|
|
2121
2116
|
children: [/* @__PURE__ */ r(ue, {
|
|
2122
2117
|
color: "dimmed",
|
|
2123
2118
|
children: "Make sure you save it - you won't be able to access it again."
|
|
2124
2119
|
}), /* @__PURE__ */ r(D, {
|
|
2125
|
-
defaultValue:
|
|
2120
|
+
defaultValue: v,
|
|
2126
2121
|
disabled: !0,
|
|
2127
2122
|
label: "APP ID",
|
|
2128
2123
|
styles: {
|
|
@@ -2142,7 +2137,7 @@ function Ft({
|
|
|
2142
2137
|
}), /* @__PURE__ */ r(T, {
|
|
2143
2138
|
size: "sm",
|
|
2144
2139
|
onClick: () => {
|
|
2145
|
-
|
|
2140
|
+
nt();
|
|
2146
2141
|
},
|
|
2147
2142
|
children: "I've saved this API Key"
|
|
2148
2143
|
})]
|
|
@@ -2153,41 +2148,41 @@ function Ft({
|
|
|
2153
2148
|
});
|
|
2154
2149
|
},
|
|
2155
2150
|
styles: n,
|
|
2156
|
-
initialRoleID:
|
|
2151
|
+
initialRoleID: i
|
|
2157
2152
|
})
|
|
2158
2153
|
}), /* @__PURE__ */ r(T, {
|
|
2159
2154
|
size: n.button.size,
|
|
2160
2155
|
onClick: c,
|
|
2161
|
-
leftIcon: /* @__PURE__ */ r(
|
|
2156
|
+
leftIcon: /* @__PURE__ */ r(De, {
|
|
2162
2157
|
size: 20
|
|
2163
2158
|
}),
|
|
2164
2159
|
children: "Add an API Key"
|
|
2165
2160
|
})]
|
|
2166
2161
|
});
|
|
2167
2162
|
}
|
|
2168
|
-
function
|
|
2163
|
+
function kt({
|
|
2169
2164
|
id: t,
|
|
2170
2165
|
name: n,
|
|
2171
|
-
onSuccess:
|
|
2172
|
-
styles: o =
|
|
2166
|
+
onSuccess: i,
|
|
2167
|
+
styles: o = he
|
|
2173
2168
|
}) {
|
|
2174
2169
|
const l = fe(), s = async () => {
|
|
2175
2170
|
if (!!t) {
|
|
2176
|
-
|
|
2171
|
+
V({
|
|
2177
2172
|
id: "for-deleting",
|
|
2178
2173
|
title: "Pending",
|
|
2179
2174
|
message: "Deleting API Key...",
|
|
2180
2175
|
loading: !0
|
|
2181
2176
|
});
|
|
2182
2177
|
try {
|
|
2183
|
-
await j.api_key.delete(t),
|
|
2178
|
+
await j.api_key.delete(t), k({
|
|
2184
2179
|
id: "for-deleting",
|
|
2185
2180
|
title: "Successful",
|
|
2186
2181
|
message: `API Key [${n}] is deleted`,
|
|
2187
2182
|
color: "green"
|
|
2188
|
-
}),
|
|
2183
|
+
}), i();
|
|
2189
2184
|
} catch (d) {
|
|
2190
|
-
|
|
2185
|
+
k({
|
|
2191
2186
|
id: "for-deleting",
|
|
2192
2187
|
title: "Failed",
|
|
2193
2188
|
message: d.message,
|
|
@@ -2208,27 +2203,27 @@ function qt({
|
|
|
2208
2203
|
size: o.button.size,
|
|
2209
2204
|
color: "red",
|
|
2210
2205
|
onClick: c,
|
|
2211
|
-
leftIcon: /* @__PURE__ */ r(
|
|
2206
|
+
leftIcon: /* @__PURE__ */ r(je, {
|
|
2212
2207
|
size: 20
|
|
2213
2208
|
}),
|
|
2214
2209
|
children: "Delete"
|
|
2215
2210
|
});
|
|
2216
2211
|
}
|
|
2217
|
-
function
|
|
2218
|
-
styles: t =
|
|
2212
|
+
function Bt({
|
|
2213
|
+
styles: t = he,
|
|
2219
2214
|
config: n
|
|
2220
2215
|
}) {
|
|
2221
|
-
var
|
|
2216
|
+
var v, S;
|
|
2222
2217
|
pe(n);
|
|
2223
2218
|
const {
|
|
2224
|
-
data:
|
|
2219
|
+
data: i = [],
|
|
2225
2220
|
loading: o,
|
|
2226
2221
|
refresh: l
|
|
2227
2222
|
} = G(async () => {
|
|
2228
2223
|
const {
|
|
2229
|
-
data:
|
|
2224
|
+
data: h
|
|
2230
2225
|
} = await j.api_key.list();
|
|
2231
|
-
return
|
|
2226
|
+
return h;
|
|
2232
2227
|
}, {
|
|
2233
2228
|
refreshDeps: []
|
|
2234
2229
|
}), {
|
|
@@ -2241,32 +2236,32 @@ function nn({
|
|
|
2241
2236
|
disabled: f.id === 50
|
|
2242
2237
|
})), {
|
|
2243
2238
|
refreshDeps: []
|
|
2244
|
-
}), d = ur(() => s.reduce((
|
|
2239
|
+
}), d = ur(() => s.reduce((h, f) => (h.set(f.value, f.label), h), /* @__PURE__ */ new Map()), [s]), p = (h) => {
|
|
2245
2240
|
var f;
|
|
2246
|
-
return (f = d.get(
|
|
2241
|
+
return (f = d.get(h)) != null ? f : h;
|
|
2247
2242
|
};
|
|
2248
|
-
return /* @__PURE__ */
|
|
2243
|
+
return /* @__PURE__ */ b(N, {
|
|
2249
2244
|
children: [/* @__PURE__ */ r(O, {
|
|
2250
2245
|
pt: t.spacing,
|
|
2251
2246
|
position: "right",
|
|
2252
|
-
children: /* @__PURE__ */ r(
|
|
2247
|
+
children: /* @__PURE__ */ r(xt, {
|
|
2253
2248
|
onSuccess: l,
|
|
2254
|
-
initialRoleID: (S = (
|
|
2249
|
+
initialRoleID: (S = (v = s == null ? void 0 : s[0]) == null ? void 0 : v.value) != null ? S : 0
|
|
2255
2250
|
})
|
|
2256
|
-
}), /* @__PURE__ */
|
|
2251
|
+
}), /* @__PURE__ */ b(F, {
|
|
2257
2252
|
mt: t.spacing,
|
|
2258
2253
|
sx: {
|
|
2259
2254
|
position: "relative"
|
|
2260
2255
|
},
|
|
2261
2256
|
children: [/* @__PURE__ */ r(Oe, {
|
|
2262
2257
|
visible: o || c
|
|
2263
|
-
}), /* @__PURE__ */
|
|
2258
|
+
}), /* @__PURE__ */ b(Ae, {
|
|
2264
2259
|
horizontalSpacing: t.spacing,
|
|
2265
2260
|
verticalSpacing: t.spacing,
|
|
2266
2261
|
fontSize: t.size,
|
|
2267
2262
|
highlightOnHover: !0,
|
|
2268
2263
|
children: [/* @__PURE__ */ r("thead", {
|
|
2269
|
-
children: /* @__PURE__ */
|
|
2264
|
+
children: /* @__PURE__ */ b("tr", {
|
|
2270
2265
|
children: [/* @__PURE__ */ r("th", {
|
|
2271
2266
|
children: "Name"
|
|
2272
2267
|
}), /* @__PURE__ */ r("th", {
|
|
@@ -2278,14 +2273,14 @@ function nn({
|
|
|
2278
2273
|
})]
|
|
2279
2274
|
})
|
|
2280
2275
|
}), /* @__PURE__ */ r("tbody", {
|
|
2281
|
-
children:
|
|
2276
|
+
children: i.map((h) => {
|
|
2282
2277
|
const {
|
|
2283
2278
|
id: f,
|
|
2284
2279
|
name: z,
|
|
2285
2280
|
app_id: q,
|
|
2286
|
-
role_id:
|
|
2287
|
-
} =
|
|
2288
|
-
return /* @__PURE__ */
|
|
2281
|
+
role_id: W
|
|
2282
|
+
} = h;
|
|
2283
|
+
return /* @__PURE__ */ b("tr", {
|
|
2289
2284
|
children: [/* @__PURE__ */ r("td", {
|
|
2290
2285
|
width: 200,
|
|
2291
2286
|
children: z
|
|
@@ -2294,12 +2289,12 @@ function nn({
|
|
|
2294
2289
|
children: q
|
|
2295
2290
|
}), /* @__PURE__ */ r("td", {
|
|
2296
2291
|
width: 200,
|
|
2297
|
-
children: p(
|
|
2292
|
+
children: p(W)
|
|
2298
2293
|
}), /* @__PURE__ */ r("td", {
|
|
2299
2294
|
width: 200,
|
|
2300
2295
|
children: /* @__PURE__ */ r(O, {
|
|
2301
2296
|
position: "left",
|
|
2302
|
-
children: /* @__PURE__ */ r(
|
|
2297
|
+
children: /* @__PURE__ */ r(kt, {
|
|
2303
2298
|
id: f,
|
|
2304
2299
|
name: z,
|
|
2305
2300
|
onSuccess: l
|
|
@@ -2313,17 +2308,17 @@ function nn({
|
|
|
2313
2308
|
})]
|
|
2314
2309
|
});
|
|
2315
2310
|
}
|
|
2316
|
-
const
|
|
2311
|
+
const Gt = () => import("./package.0e12772e.mjs").then(({ version: t }) => (console.log(`[@devtable/dashboard] version: ${t}`), t));
|
|
2317
2312
|
export {
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2313
|
+
Bt as APIKeyList,
|
|
2314
|
+
Yt as AccountList,
|
|
2315
|
+
xt as AddAPIKey,
|
|
2316
|
+
Et as AddAccount,
|
|
2317
|
+
mt as AddDataSource,
|
|
2318
|
+
Wt as DataSourceList,
|
|
2319
|
+
kt as DeleteAPIKey,
|
|
2320
|
+
Ct as DeleteAccount,
|
|
2321
|
+
yt as DeleteDataSource,
|
|
2322
|
+
Kt as Login,
|
|
2323
|
+
Gt as getVersion
|
|
2329
2324
|
};
|