@devtable/settings-form 5.3.0 → 5.5.0-alpha
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/account/account-list.d.ts +0 -1
- package/dist/account/login/index.d.ts +1 -2
- package/dist/api-caller/api-key.d.ts +7 -0
- package/dist/api-caller/api-key.typed.d.ts +6 -0
- package/dist/api-caller/index.d.ts +5 -0
- package/dist/api-caller/request.d.ts +2 -0
- package/dist/api-key/add-api-key.d.ts +9 -0
- package/dist/api-key/api-key-list.d.ts +8 -0
- package/dist/api-key/delete-api-key.d.ts +10 -0
- package/dist/api-key/index.d.ts +3 -0
- package/dist/api-key/styles.d.ts +9 -0
- package/dist/datasource/data-source-list.d.ts +0 -1
- package/dist/global.d.ts +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/settings-form.es.js +1103 -768
- package/dist/settings-form.umd.js +10 -10
- package/package.json +1 -1
- package/dist/account/types.d.ts +0 -3
- package/dist/datasource/types.d.ts +0 -3
package/dist/settings-form.es.js
CHANGED
|
@@ -1,39 +1,45 @@
|
|
|
1
|
-
import { Modal as
|
|
2
|
-
import { showNotification as
|
|
3
|
-
import
|
|
4
|
-
import { useForm as
|
|
5
|
-
import { PlaylistAdd as
|
|
1
|
+
import { Modal as oe, Button as D, Box as L, SegmentedControl as qr, TextInput as I, Divider as er, Group as j, NumberInput as Lr, PasswordInput as se, Text as ye, LoadingOverlay as _e, Table as Pe, Stack as rr, Select as Nr, Switch as Ur } from "@mantine/core";
|
|
2
|
+
import { showNotification as M, updateNotification as A } from "@mantine/notifications";
|
|
3
|
+
import H, { forwardRef as tr, useMemo as nr } from "react";
|
|
4
|
+
import { useForm as ee, Controller as P } from "react-hook-form";
|
|
5
|
+
import { PlaylistAdd as Ee, Trash as Ce, Edit as Mr } from "tabler-icons-react";
|
|
6
6
|
import $r from "axios";
|
|
7
|
-
import { useRequest as
|
|
8
|
-
import { useModals as
|
|
9
|
-
const
|
|
7
|
+
import { useRequest as G } from "ahooks";
|
|
8
|
+
import { useModals as ce, closeAllModals as Wr } from "@mantine/modals";
|
|
9
|
+
const C = {
|
|
10
10
|
baseURL: "http://localhost:31200",
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
apiKey: "",
|
|
12
|
+
getRequest(t) {
|
|
13
|
+
return (a, s, c = {}) => {
|
|
14
|
+
const u = window.localStorage.getItem("token"), i = {
|
|
14
15
|
"X-Requested-With": "XMLHttpRequest",
|
|
15
16
|
"Content-Type": c.string ? "application/x-www-form-urlencoded" : "application/json",
|
|
16
|
-
authorization:
|
|
17
|
+
authorization: u ? `bearer ${u}` : "",
|
|
18
|
+
"x-api-key": this.apiKey,
|
|
17
19
|
...c.headers
|
|
18
|
-
},
|
|
20
|
+
}, l = {
|
|
19
21
|
baseURL: this.baseURL,
|
|
20
|
-
method:
|
|
21
|
-
url:
|
|
22
|
-
params:
|
|
23
|
-
headers:
|
|
22
|
+
method: t,
|
|
23
|
+
url: a,
|
|
24
|
+
params: t === "GET" ? s : c.params,
|
|
25
|
+
headers: i
|
|
24
26
|
};
|
|
25
|
-
return ["POST", "PUT"].includes(
|
|
27
|
+
return ["POST", "PUT"].includes(t) && (l.data = c.string ? JSON.stringify(s) : s), $r(l).then((f) => f.data).catch((f) => Promise.reject(f));
|
|
26
28
|
};
|
|
27
29
|
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
+
};
|
|
31
|
+
function le(t) {
|
|
32
|
+
C.baseURL !== t.apiBaseURL && (C.baseURL = t.apiBaseURL), t.apiKey && (C.apiKey = t.apiKey);
|
|
33
|
+
}
|
|
34
|
+
const Kr = {
|
|
35
|
+
login: async (t, a) => {
|
|
30
36
|
const s = {
|
|
31
|
-
name:
|
|
32
|
-
password:
|
|
37
|
+
name: t,
|
|
38
|
+
password: a
|
|
33
39
|
};
|
|
34
|
-
return await
|
|
40
|
+
return await C.getRequest("POST")("/account/login", s);
|
|
35
41
|
},
|
|
36
|
-
list: async () => await
|
|
42
|
+
list: async () => await C.getRequest("POST")("/account/list", {
|
|
37
43
|
filter: {
|
|
38
44
|
search: ""
|
|
39
45
|
},
|
|
@@ -46,34 +52,57 @@ const y = {
|
|
|
46
52
|
pagesize: 100
|
|
47
53
|
}
|
|
48
54
|
}),
|
|
49
|
-
get: async () => await
|
|
50
|
-
update: async (
|
|
55
|
+
get: async () => await C.getRequest("GET")("/account/get", {}),
|
|
56
|
+
update: async (t, a) => {
|
|
51
57
|
const s = {
|
|
52
|
-
name:
|
|
53
|
-
email:
|
|
58
|
+
name: t,
|
|
59
|
+
email: a
|
|
54
60
|
};
|
|
55
|
-
return await
|
|
61
|
+
return await C.getRequest("PUT")("/account/update", s);
|
|
56
62
|
},
|
|
57
|
-
changepassword: async (
|
|
63
|
+
changepassword: async (t, a) => {
|
|
58
64
|
const s = {
|
|
59
|
-
old_password:
|
|
60
|
-
new_password:
|
|
65
|
+
old_password: t,
|
|
66
|
+
new_password: a
|
|
61
67
|
};
|
|
62
|
-
return await
|
|
68
|
+
return await C.getRequest("POST")("/account/changepassword", s);
|
|
63
69
|
},
|
|
64
|
-
create: async (
|
|
65
|
-
name:
|
|
66
|
-
email:
|
|
70
|
+
create: async (t, a, s, c) => await C.getRequest("POST")("/account/create", {
|
|
71
|
+
name: t,
|
|
72
|
+
email: a,
|
|
67
73
|
password: s,
|
|
68
74
|
role_id: c
|
|
69
75
|
}),
|
|
70
|
-
edit: async (
|
|
71
|
-
delete: async (
|
|
72
|
-
if (!!
|
|
73
|
-
return
|
|
76
|
+
edit: async (t) => (t.reset_password || (t.new_password = void 0), await C.getRequest("PUT")("/account/edit", t)),
|
|
77
|
+
delete: async (t) => {
|
|
78
|
+
if (!!t)
|
|
79
|
+
return C.getRequest("POST")("/account/delete", { id: t });
|
|
80
|
+
}
|
|
81
|
+
}, Vr = {
|
|
82
|
+
list: async () => await C.getRequest("POST")("/api/key/list", {
|
|
83
|
+
filter: {
|
|
84
|
+
search: ""
|
|
85
|
+
},
|
|
86
|
+
sort: {
|
|
87
|
+
field: "name",
|
|
88
|
+
order: "ASC"
|
|
89
|
+
},
|
|
90
|
+
pagination: {
|
|
91
|
+
page: 1,
|
|
92
|
+
pagesize: 100
|
|
93
|
+
}
|
|
94
|
+
}),
|
|
95
|
+
create: async (t, a, s) => await C.getRequest("POST")("/api/key/create", {
|
|
96
|
+
name: t,
|
|
97
|
+
role_id: a,
|
|
98
|
+
domain: s
|
|
99
|
+
}),
|
|
100
|
+
delete: async (t) => {
|
|
101
|
+
if (!!t)
|
|
102
|
+
return C.getRequest("POST")("/api/key/delete", { id: t });
|
|
74
103
|
}
|
|
75
|
-
},
|
|
76
|
-
list: async () => await
|
|
104
|
+
}, Yr = {
|
|
105
|
+
list: async () => await C.getRequest("POST")("/datasource/list", {
|
|
77
106
|
filter: {},
|
|
78
107
|
sort: {
|
|
79
108
|
field: "create_time",
|
|
@@ -84,30 +113,31 @@ const y = {
|
|
|
84
113
|
pagesize: 100
|
|
85
114
|
}
|
|
86
115
|
}),
|
|
87
|
-
create: async (
|
|
116
|
+
create: async (t, a, s) => {
|
|
88
117
|
try {
|
|
89
|
-
return await
|
|
118
|
+
return await C.getRequest("POST")("/datasource/create", { type: t, key: a, config: s });
|
|
90
119
|
} catch (c) {
|
|
91
120
|
return console.error(c), !1;
|
|
92
121
|
}
|
|
93
122
|
},
|
|
94
|
-
delete: async (
|
|
95
|
-
await
|
|
123
|
+
delete: async (t) => {
|
|
124
|
+
await C.getRequest("POST")("/datasource/delete", { id: t });
|
|
96
125
|
}
|
|
97
|
-
},
|
|
98
|
-
list: async () => await
|
|
99
|
-
},
|
|
100
|
-
datasource:
|
|
101
|
-
account:
|
|
102
|
-
role:
|
|
103
|
-
|
|
126
|
+
}, Br = {
|
|
127
|
+
list: async () => await C.getRequest("GET")("/role/list", {})
|
|
128
|
+
}, x = {
|
|
129
|
+
datasource: Yr,
|
|
130
|
+
account: Kr,
|
|
131
|
+
role: Br,
|
|
132
|
+
api_key: Vr
|
|
133
|
+
}, ue = {
|
|
104
134
|
size: "sm",
|
|
105
135
|
spacing: "md",
|
|
106
136
|
button: {
|
|
107
137
|
size: "xs"
|
|
108
138
|
}
|
|
109
139
|
};
|
|
110
|
-
var
|
|
140
|
+
var de = { exports: {} }, Q = {};
|
|
111
141
|
/**
|
|
112
142
|
* @license React
|
|
113
143
|
* react-jsx-runtime.production.min.js
|
|
@@ -117,25 +147,25 @@ var ce = { exports: {} }, X = {};
|
|
|
117
147
|
* This source code is licensed under the MIT license found in the
|
|
118
148
|
* LICENSE file in the root directory of this source tree.
|
|
119
149
|
*/
|
|
120
|
-
var
|
|
121
|
-
function
|
|
122
|
-
if (
|
|
123
|
-
return
|
|
124
|
-
|
|
125
|
-
var
|
|
126
|
-
function
|
|
127
|
-
var
|
|
128
|
-
|
|
129
|
-
for (
|
|
130
|
-
c.call(
|
|
150
|
+
var Qe;
|
|
151
|
+
function Gr() {
|
|
152
|
+
if (Qe)
|
|
153
|
+
return Q;
|
|
154
|
+
Qe = 1;
|
|
155
|
+
var t = H, a = Symbol.for("react.element"), s = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, u = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
156
|
+
function l(f, v, R) {
|
|
157
|
+
var y, h = {}, d = null, O = null;
|
|
158
|
+
R !== void 0 && (d = "" + R), v.key !== void 0 && (d = "" + v.key), v.ref !== void 0 && (O = v.ref);
|
|
159
|
+
for (y in v)
|
|
160
|
+
c.call(v, y) && !i.hasOwnProperty(y) && (h[y] = v[y]);
|
|
131
161
|
if (f && f.defaultProps)
|
|
132
|
-
for (
|
|
133
|
-
|
|
134
|
-
return { $$typeof:
|
|
162
|
+
for (y in v = f.defaultProps, v)
|
|
163
|
+
h[y] === void 0 && (h[y] = v[y]);
|
|
164
|
+
return { $$typeof: a, type: f, key: d, ref: O, props: h, _owner: u.current };
|
|
135
165
|
}
|
|
136
|
-
return
|
|
166
|
+
return Q.Fragment = s, Q.jsx = l, Q.jsxs = l, Q;
|
|
137
167
|
}
|
|
138
|
-
var
|
|
168
|
+
var Z = {};
|
|
139
169
|
/**
|
|
140
170
|
* @license React
|
|
141
171
|
* react-jsx-runtime.development.js
|
|
@@ -145,53 +175,53 @@ var K = {};
|
|
|
145
175
|
* This source code is licensed under the MIT license found in the
|
|
146
176
|
* LICENSE file in the root directory of this source tree.
|
|
147
177
|
*/
|
|
148
|
-
var
|
|
149
|
-
function
|
|
150
|
-
return
|
|
151
|
-
var
|
|
152
|
-
function
|
|
178
|
+
var Ze;
|
|
179
|
+
function Hr() {
|
|
180
|
+
return Ze || (Ze = 1, process.env.NODE_ENV !== "production" && function() {
|
|
181
|
+
var t = H, a = Symbol.for("react.element"), s = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), f = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), N = Symbol.iterator, K = "@@iterator";
|
|
182
|
+
function pe(e) {
|
|
153
183
|
if (e === null || typeof e != "object")
|
|
154
184
|
return null;
|
|
155
|
-
var
|
|
156
|
-
return typeof
|
|
185
|
+
var n = N && e[N] || e[K];
|
|
186
|
+
return typeof n == "function" ? n : null;
|
|
157
187
|
}
|
|
158
|
-
var
|
|
159
|
-
function
|
|
188
|
+
var U = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
189
|
+
function T(e) {
|
|
160
190
|
{
|
|
161
|
-
for (var
|
|
162
|
-
|
|
163
|
-
|
|
191
|
+
for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), p = 1; p < n; p++)
|
|
192
|
+
o[p - 1] = arguments[p];
|
|
193
|
+
ar("error", e, o);
|
|
164
194
|
}
|
|
165
195
|
}
|
|
166
|
-
function
|
|
196
|
+
function ar(e, n, o) {
|
|
167
197
|
{
|
|
168
|
-
var
|
|
169
|
-
|
|
170
|
-
var
|
|
198
|
+
var p = U.ReactDebugCurrentFrame, b = p.getStackAddendum();
|
|
199
|
+
b !== "" && (n += "%s", o = o.concat([b]));
|
|
200
|
+
var S = o.map(function(m) {
|
|
171
201
|
return String(m);
|
|
172
202
|
});
|
|
173
|
-
|
|
203
|
+
S.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, S);
|
|
174
204
|
}
|
|
175
205
|
}
|
|
176
|
-
var
|
|
177
|
-
|
|
178
|
-
function
|
|
179
|
-
return !!(typeof e == "string" || typeof e == "function" || e === c || e ===
|
|
206
|
+
var ir = !1, or = !1, sr = !1, cr = !1, lr = !1, ze;
|
|
207
|
+
ze = Symbol.for("react.module.reference");
|
|
208
|
+
function ur(e) {
|
|
209
|
+
return !!(typeof e == "string" || typeof e == "function" || e === c || e === i || lr || e === u || e === R || e === y || cr || e === O || ir || or || sr || typeof e == "object" && e !== null && (e.$$typeof === d || e.$$typeof === h || e.$$typeof === l || e.$$typeof === f || e.$$typeof === v || e.$$typeof === ze || e.getModuleId !== void 0));
|
|
180
210
|
}
|
|
181
|
-
function
|
|
182
|
-
var
|
|
183
|
-
if (
|
|
184
|
-
return
|
|
185
|
-
var
|
|
186
|
-
return
|
|
211
|
+
function dr(e, n, o) {
|
|
212
|
+
var p = e.displayName;
|
|
213
|
+
if (p)
|
|
214
|
+
return p;
|
|
215
|
+
var b = n.displayName || n.name || "";
|
|
216
|
+
return b !== "" ? o + "(" + b + ")" : o;
|
|
187
217
|
}
|
|
188
|
-
function
|
|
218
|
+
function Ae(e) {
|
|
189
219
|
return e.displayName || "Context";
|
|
190
220
|
}
|
|
191
|
-
function
|
|
221
|
+
function F(e) {
|
|
192
222
|
if (e == null)
|
|
193
223
|
return null;
|
|
194
|
-
if (typeof e.tag == "number" &&
|
|
224
|
+
if (typeof e.tag == "number" && T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
195
225
|
return e.displayName || e.name || null;
|
|
196
226
|
if (typeof e == "string")
|
|
197
227
|
return e;
|
|
@@ -200,32 +230,32 @@ function Vr() {
|
|
|
200
230
|
return "Fragment";
|
|
201
231
|
case s:
|
|
202
232
|
return "Portal";
|
|
203
|
-
case
|
|
233
|
+
case i:
|
|
204
234
|
return "Profiler";
|
|
205
|
-
case
|
|
235
|
+
case u:
|
|
206
236
|
return "StrictMode";
|
|
207
|
-
case
|
|
237
|
+
case R:
|
|
208
238
|
return "Suspense";
|
|
209
|
-
case
|
|
239
|
+
case y:
|
|
210
240
|
return "SuspenseList";
|
|
211
241
|
}
|
|
212
242
|
if (typeof e == "object")
|
|
213
243
|
switch (e.$$typeof) {
|
|
214
244
|
case f:
|
|
215
|
-
var
|
|
216
|
-
return
|
|
217
|
-
case
|
|
218
|
-
var
|
|
219
|
-
return
|
|
220
|
-
case
|
|
221
|
-
return
|
|
222
|
-
case
|
|
223
|
-
var
|
|
224
|
-
return
|
|
225
|
-
case
|
|
226
|
-
var
|
|
245
|
+
var n = e;
|
|
246
|
+
return Ae(n) + ".Consumer";
|
|
247
|
+
case l:
|
|
248
|
+
var o = e;
|
|
249
|
+
return Ae(o._context) + ".Provider";
|
|
250
|
+
case v:
|
|
251
|
+
return dr(e, e.render, "ForwardRef");
|
|
252
|
+
case h:
|
|
253
|
+
var p = e.displayName || null;
|
|
254
|
+
return p !== null ? p : F(e.type) || "Memo";
|
|
255
|
+
case d: {
|
|
256
|
+
var b = e, S = b._payload, m = b._init;
|
|
227
257
|
try {
|
|
228
|
-
return
|
|
258
|
+
return F(m(S));
|
|
229
259
|
} catch {
|
|
230
260
|
return null;
|
|
231
261
|
}
|
|
@@ -233,18 +263,18 @@ function Vr() {
|
|
|
233
263
|
}
|
|
234
264
|
return null;
|
|
235
265
|
}
|
|
236
|
-
var
|
|
237
|
-
function
|
|
266
|
+
var V = Object.assign, J = 0, Oe, xe, De, ke, Ie, je, Fe;
|
|
267
|
+
function qe() {
|
|
238
268
|
}
|
|
239
|
-
|
|
240
|
-
function
|
|
269
|
+
qe.__reactDisabledLog = !0;
|
|
270
|
+
function fr() {
|
|
241
271
|
{
|
|
242
|
-
if (
|
|
243
|
-
|
|
272
|
+
if (J === 0) {
|
|
273
|
+
Oe = console.log, xe = console.info, De = console.warn, ke = console.error, Ie = console.group, je = console.groupCollapsed, Fe = console.groupEnd;
|
|
244
274
|
var e = {
|
|
245
275
|
configurable: !0,
|
|
246
276
|
enumerable: !0,
|
|
247
|
-
value:
|
|
277
|
+
value: qe,
|
|
248
278
|
writable: !0
|
|
249
279
|
};
|
|
250
280
|
Object.defineProperties(console, {
|
|
@@ -257,79 +287,79 @@ function Vr() {
|
|
|
257
287
|
groupEnd: e
|
|
258
288
|
});
|
|
259
289
|
}
|
|
260
|
-
|
|
290
|
+
J++;
|
|
261
291
|
}
|
|
262
292
|
}
|
|
263
|
-
function
|
|
293
|
+
function pr() {
|
|
264
294
|
{
|
|
265
|
-
if (
|
|
295
|
+
if (J--, J === 0) {
|
|
266
296
|
var e = {
|
|
267
297
|
configurable: !0,
|
|
268
298
|
enumerable: !0,
|
|
269
299
|
writable: !0
|
|
270
300
|
};
|
|
271
301
|
Object.defineProperties(console, {
|
|
272
|
-
log:
|
|
273
|
-
value:
|
|
302
|
+
log: V({}, e, {
|
|
303
|
+
value: Oe
|
|
274
304
|
}),
|
|
275
|
-
info:
|
|
276
|
-
value:
|
|
305
|
+
info: V({}, e, {
|
|
306
|
+
value: xe
|
|
277
307
|
}),
|
|
278
|
-
warn:
|
|
279
|
-
value:
|
|
308
|
+
warn: V({}, e, {
|
|
309
|
+
value: De
|
|
280
310
|
}),
|
|
281
|
-
error:
|
|
282
|
-
value:
|
|
311
|
+
error: V({}, e, {
|
|
312
|
+
value: ke
|
|
283
313
|
}),
|
|
284
|
-
group:
|
|
285
|
-
value:
|
|
314
|
+
group: V({}, e, {
|
|
315
|
+
value: Ie
|
|
286
316
|
}),
|
|
287
|
-
groupCollapsed:
|
|
288
|
-
value:
|
|
317
|
+
groupCollapsed: V({}, e, {
|
|
318
|
+
value: je
|
|
289
319
|
}),
|
|
290
|
-
groupEnd:
|
|
291
|
-
value:
|
|
320
|
+
groupEnd: V({}, e, {
|
|
321
|
+
value: Fe
|
|
292
322
|
})
|
|
293
323
|
});
|
|
294
324
|
}
|
|
295
|
-
|
|
325
|
+
J < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
296
326
|
}
|
|
297
327
|
}
|
|
298
|
-
var
|
|
299
|
-
function
|
|
328
|
+
var ge = U.ReactCurrentDispatcher, me;
|
|
329
|
+
function re(e, n, o) {
|
|
300
330
|
{
|
|
301
|
-
if (
|
|
331
|
+
if (me === void 0)
|
|
302
332
|
try {
|
|
303
333
|
throw Error();
|
|
304
|
-
} catch (
|
|
305
|
-
var
|
|
306
|
-
|
|
334
|
+
} catch (b) {
|
|
335
|
+
var p = b.stack.trim().match(/\n( *(at )?)/);
|
|
336
|
+
me = p && p[1] || "";
|
|
307
337
|
}
|
|
308
338
|
return `
|
|
309
|
-
` +
|
|
339
|
+
` + me + e;
|
|
310
340
|
}
|
|
311
341
|
}
|
|
312
|
-
var
|
|
342
|
+
var he = !1, te;
|
|
313
343
|
{
|
|
314
|
-
var
|
|
315
|
-
|
|
344
|
+
var gr = typeof WeakMap == "function" ? WeakMap : Map;
|
|
345
|
+
te = new gr();
|
|
316
346
|
}
|
|
317
|
-
function
|
|
318
|
-
if (!e ||
|
|
347
|
+
function Le(e, n) {
|
|
348
|
+
if (!e || he)
|
|
319
349
|
return "";
|
|
320
350
|
{
|
|
321
|
-
var
|
|
322
|
-
if (
|
|
323
|
-
return
|
|
351
|
+
var o = te.get(e);
|
|
352
|
+
if (o !== void 0)
|
|
353
|
+
return o;
|
|
324
354
|
}
|
|
325
|
-
var
|
|
326
|
-
|
|
327
|
-
var
|
|
355
|
+
var p;
|
|
356
|
+
he = !0;
|
|
357
|
+
var b = Error.prepareStackTrace;
|
|
328
358
|
Error.prepareStackTrace = void 0;
|
|
329
|
-
var
|
|
330
|
-
|
|
359
|
+
var S;
|
|
360
|
+
S = ge.current, ge.current = null, fr();
|
|
331
361
|
try {
|
|
332
|
-
if (
|
|
362
|
+
if (n) {
|
|
333
363
|
var m = function() {
|
|
334
364
|
throw Error();
|
|
335
365
|
};
|
|
@@ -340,250 +370,250 @@ function Vr() {
|
|
|
340
370
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
341
371
|
try {
|
|
342
372
|
Reflect.construct(m, []);
|
|
343
|
-
} catch (
|
|
344
|
-
|
|
373
|
+
} catch (q) {
|
|
374
|
+
p = q;
|
|
345
375
|
}
|
|
346
376
|
Reflect.construct(e, [], m);
|
|
347
377
|
} else {
|
|
348
378
|
try {
|
|
349
379
|
m.call();
|
|
350
|
-
} catch (
|
|
351
|
-
|
|
380
|
+
} catch (q) {
|
|
381
|
+
p = q;
|
|
352
382
|
}
|
|
353
383
|
e.call(m.prototype);
|
|
354
384
|
}
|
|
355
385
|
} else {
|
|
356
386
|
try {
|
|
357
387
|
throw Error();
|
|
358
|
-
} catch (
|
|
359
|
-
|
|
388
|
+
} catch (q) {
|
|
389
|
+
p = q;
|
|
360
390
|
}
|
|
361
391
|
e();
|
|
362
392
|
}
|
|
363
|
-
} catch (
|
|
364
|
-
if (
|
|
365
|
-
for (var
|
|
366
|
-
`),
|
|
367
|
-
`),
|
|
368
|
-
|
|
369
|
-
for (;
|
|
370
|
-
if (
|
|
371
|
-
if (
|
|
393
|
+
} catch (q) {
|
|
394
|
+
if (q && p && typeof q.stack == "string") {
|
|
395
|
+
for (var g = q.stack.split(`
|
|
396
|
+
`), z = p.stack.split(`
|
|
397
|
+
`), _ = g.length - 1, E = z.length - 1; _ >= 1 && E >= 0 && g[_] !== z[E]; )
|
|
398
|
+
E--;
|
|
399
|
+
for (; _ >= 1 && E >= 0; _--, E--)
|
|
400
|
+
if (g[_] !== z[E]) {
|
|
401
|
+
if (_ !== 1 || E !== 1)
|
|
372
402
|
do
|
|
373
|
-
if (
|
|
374
|
-
var
|
|
375
|
-
` +
|
|
376
|
-
return e.displayName &&
|
|
403
|
+
if (_--, E--, E < 0 || g[_] !== z[E]) {
|
|
404
|
+
var k = `
|
|
405
|
+
` + g[_].replace(" at new ", " at ");
|
|
406
|
+
return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && te.set(e, k), k;
|
|
377
407
|
}
|
|
378
|
-
while (
|
|
408
|
+
while (_ >= 1 && E >= 0);
|
|
379
409
|
break;
|
|
380
410
|
}
|
|
381
411
|
}
|
|
382
412
|
} finally {
|
|
383
|
-
|
|
413
|
+
he = !1, ge.current = S, pr(), Error.prepareStackTrace = b;
|
|
384
414
|
}
|
|
385
|
-
var
|
|
386
|
-
return typeof e == "function" &&
|
|
415
|
+
var B = e ? e.displayName || e.name : "", Xe = B ? re(B) : "";
|
|
416
|
+
return typeof e == "function" && te.set(e, Xe), Xe;
|
|
387
417
|
}
|
|
388
|
-
function
|
|
389
|
-
return
|
|
418
|
+
function mr(e, n, o) {
|
|
419
|
+
return Le(e, !1);
|
|
390
420
|
}
|
|
391
|
-
function
|
|
392
|
-
var
|
|
393
|
-
return !!(
|
|
421
|
+
function hr(e) {
|
|
422
|
+
var n = e.prototype;
|
|
423
|
+
return !!(n && n.isReactComponent);
|
|
394
424
|
}
|
|
395
|
-
function
|
|
425
|
+
function ne(e, n, o) {
|
|
396
426
|
if (e == null)
|
|
397
427
|
return "";
|
|
398
428
|
if (typeof e == "function")
|
|
399
|
-
return
|
|
429
|
+
return Le(e, hr(e));
|
|
400
430
|
if (typeof e == "string")
|
|
401
|
-
return
|
|
431
|
+
return re(e);
|
|
402
432
|
switch (e) {
|
|
403
|
-
case
|
|
404
|
-
return
|
|
405
|
-
case
|
|
406
|
-
return
|
|
433
|
+
case R:
|
|
434
|
+
return re("Suspense");
|
|
435
|
+
case y:
|
|
436
|
+
return re("SuspenseList");
|
|
407
437
|
}
|
|
408
438
|
if (typeof e == "object")
|
|
409
439
|
switch (e.$$typeof) {
|
|
410
|
-
case
|
|
411
|
-
return
|
|
412
|
-
case
|
|
413
|
-
return
|
|
414
|
-
case
|
|
415
|
-
var
|
|
440
|
+
case v:
|
|
441
|
+
return mr(e.render);
|
|
442
|
+
case h:
|
|
443
|
+
return ne(e.type, n, o);
|
|
444
|
+
case d: {
|
|
445
|
+
var p = e, b = p._payload, S = p._init;
|
|
416
446
|
try {
|
|
417
|
-
return
|
|
447
|
+
return ne(S(b), n, o);
|
|
418
448
|
} catch {
|
|
419
449
|
}
|
|
420
450
|
}
|
|
421
451
|
}
|
|
422
452
|
return "";
|
|
423
453
|
}
|
|
424
|
-
var
|
|
425
|
-
function
|
|
454
|
+
var ae = Object.prototype.hasOwnProperty, Ne = {}, Ue = U.ReactDebugCurrentFrame;
|
|
455
|
+
function ie(e) {
|
|
426
456
|
if (e) {
|
|
427
|
-
var
|
|
428
|
-
|
|
457
|
+
var n = e._owner, o = ne(e.type, e._source, n ? n.type : null);
|
|
458
|
+
Ue.setExtraStackFrame(o);
|
|
429
459
|
} else
|
|
430
|
-
|
|
460
|
+
Ue.setExtraStackFrame(null);
|
|
431
461
|
}
|
|
432
|
-
function
|
|
462
|
+
function vr(e, n, o, p, b) {
|
|
433
463
|
{
|
|
434
|
-
var
|
|
464
|
+
var S = Function.call.bind(ae);
|
|
435
465
|
for (var m in e)
|
|
436
|
-
if (
|
|
437
|
-
var
|
|
466
|
+
if (S(e, m)) {
|
|
467
|
+
var g = void 0;
|
|
438
468
|
try {
|
|
439
469
|
if (typeof e[m] != "function") {
|
|
440
|
-
var
|
|
441
|
-
throw
|
|
470
|
+
var z = Error((p || "React class") + ": " + o + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
471
|
+
throw z.name = "Invariant Violation", z;
|
|
442
472
|
}
|
|
443
|
-
|
|
444
|
-
} catch (
|
|
445
|
-
|
|
473
|
+
g = e[m](n, m, p, o, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
474
|
+
} catch (_) {
|
|
475
|
+
g = _;
|
|
446
476
|
}
|
|
447
|
-
|
|
477
|
+
g && !(g instanceof Error) && (ie(b), T("%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).", p || "React class", o, m, typeof g), ie(null)), g instanceof Error && !(g.message in Ne) && (Ne[g.message] = !0, ie(b), T("Failed %s type: %s", o, g.message), ie(null));
|
|
448
478
|
}
|
|
449
479
|
}
|
|
450
480
|
}
|
|
451
|
-
var
|
|
452
|
-
function
|
|
453
|
-
return
|
|
481
|
+
var br = Array.isArray;
|
|
482
|
+
function ve(e) {
|
|
483
|
+
return br(e);
|
|
454
484
|
}
|
|
455
|
-
function
|
|
485
|
+
function wr(e) {
|
|
456
486
|
{
|
|
457
|
-
var
|
|
458
|
-
return
|
|
487
|
+
var n = typeof Symbol == "function" && Symbol.toStringTag, o = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
488
|
+
return o;
|
|
459
489
|
}
|
|
460
490
|
}
|
|
461
|
-
function
|
|
491
|
+
function Sr(e) {
|
|
462
492
|
try {
|
|
463
|
-
return
|
|
493
|
+
return Me(e), !1;
|
|
464
494
|
} catch {
|
|
465
495
|
return !0;
|
|
466
496
|
}
|
|
467
497
|
}
|
|
468
|
-
function
|
|
498
|
+
function Me(e) {
|
|
469
499
|
return "" + e;
|
|
470
500
|
}
|
|
471
|
-
function
|
|
472
|
-
if (
|
|
473
|
-
return
|
|
501
|
+
function $e(e) {
|
|
502
|
+
if (Sr(e))
|
|
503
|
+
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", wr(e)), Me(e);
|
|
474
504
|
}
|
|
475
|
-
var
|
|
505
|
+
var X = U.ReactCurrentOwner, Rr = {
|
|
476
506
|
key: !0,
|
|
477
507
|
ref: !0,
|
|
478
508
|
__self: !0,
|
|
479
509
|
__source: !0
|
|
480
|
-
},
|
|
481
|
-
|
|
482
|
-
function
|
|
483
|
-
if (
|
|
484
|
-
var
|
|
485
|
-
if (
|
|
510
|
+
}, We, Ke, be;
|
|
511
|
+
be = {};
|
|
512
|
+
function yr(e) {
|
|
513
|
+
if (ae.call(e, "ref")) {
|
|
514
|
+
var n = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
515
|
+
if (n && n.isReactWarning)
|
|
486
516
|
return !1;
|
|
487
517
|
}
|
|
488
518
|
return e.ref !== void 0;
|
|
489
519
|
}
|
|
490
|
-
function
|
|
491
|
-
if (
|
|
492
|
-
var
|
|
493
|
-
if (
|
|
520
|
+
function _r(e) {
|
|
521
|
+
if (ae.call(e, "key")) {
|
|
522
|
+
var n = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
523
|
+
if (n && n.isReactWarning)
|
|
494
524
|
return !1;
|
|
495
525
|
}
|
|
496
526
|
return e.key !== void 0;
|
|
497
527
|
}
|
|
498
|
-
function
|
|
499
|
-
if (typeof e.ref == "string" &&
|
|
500
|
-
var
|
|
501
|
-
|
|
528
|
+
function Pr(e, n) {
|
|
529
|
+
if (typeof e.ref == "string" && X.current && n && X.current.stateNode !== n) {
|
|
530
|
+
var o = F(X.current.type);
|
|
531
|
+
be[o] || (T('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', F(X.current.type), e.ref), be[o] = !0);
|
|
502
532
|
}
|
|
503
533
|
}
|
|
504
|
-
function
|
|
534
|
+
function Er(e, n) {
|
|
505
535
|
{
|
|
506
|
-
var
|
|
507
|
-
|
|
536
|
+
var o = function() {
|
|
537
|
+
We || (We = !0, T("%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)", n));
|
|
508
538
|
};
|
|
509
|
-
|
|
510
|
-
get:
|
|
539
|
+
o.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
540
|
+
get: o,
|
|
511
541
|
configurable: !0
|
|
512
542
|
});
|
|
513
543
|
}
|
|
514
544
|
}
|
|
515
|
-
function
|
|
545
|
+
function Cr(e, n) {
|
|
516
546
|
{
|
|
517
|
-
var
|
|
518
|
-
|
|
547
|
+
var o = function() {
|
|
548
|
+
Ke || (Ke = !0, T("%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)", n));
|
|
519
549
|
};
|
|
520
|
-
|
|
521
|
-
get:
|
|
550
|
+
o.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
551
|
+
get: o,
|
|
522
552
|
configurable: !0
|
|
523
553
|
});
|
|
524
554
|
}
|
|
525
555
|
}
|
|
526
|
-
var
|
|
527
|
-
var
|
|
528
|
-
$$typeof:
|
|
556
|
+
var Tr = function(e, n, o, p, b, S, m) {
|
|
557
|
+
var g = {
|
|
558
|
+
$$typeof: a,
|
|
529
559
|
type: e,
|
|
530
|
-
key:
|
|
531
|
-
ref:
|
|
560
|
+
key: n,
|
|
561
|
+
ref: o,
|
|
532
562
|
props: m,
|
|
533
|
-
_owner:
|
|
563
|
+
_owner: S
|
|
534
564
|
};
|
|
535
|
-
return
|
|
565
|
+
return g._store = {}, Object.defineProperty(g._store, "validated", {
|
|
536
566
|
configurable: !1,
|
|
537
567
|
enumerable: !1,
|
|
538
568
|
writable: !0,
|
|
539
569
|
value: !1
|
|
540
|
-
}), Object.defineProperty(
|
|
570
|
+
}), Object.defineProperty(g, "_self", {
|
|
541
571
|
configurable: !1,
|
|
542
572
|
enumerable: !1,
|
|
543
573
|
writable: !1,
|
|
544
|
-
value:
|
|
545
|
-
}), Object.defineProperty(
|
|
574
|
+
value: p
|
|
575
|
+
}), Object.defineProperty(g, "_source", {
|
|
546
576
|
configurable: !1,
|
|
547
577
|
enumerable: !1,
|
|
548
578
|
writable: !1,
|
|
549
|
-
value:
|
|
550
|
-
}), Object.freeze && (Object.freeze(
|
|
579
|
+
value: b
|
|
580
|
+
}), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
|
|
551
581
|
};
|
|
552
|
-
function
|
|
582
|
+
function zr(e, n, o, p, b) {
|
|
553
583
|
{
|
|
554
|
-
var
|
|
555
|
-
|
|
556
|
-
for (
|
|
557
|
-
|
|
584
|
+
var S, m = {}, g = null, z = null;
|
|
585
|
+
o !== void 0 && ($e(o), g = "" + o), _r(n) && ($e(n.key), g = "" + n.key), yr(n) && (z = n.ref, Pr(n, b));
|
|
586
|
+
for (S in n)
|
|
587
|
+
ae.call(n, S) && !Rr.hasOwnProperty(S) && (m[S] = n[S]);
|
|
558
588
|
if (e && e.defaultProps) {
|
|
559
|
-
var
|
|
560
|
-
for (
|
|
561
|
-
m[
|
|
589
|
+
var _ = e.defaultProps;
|
|
590
|
+
for (S in _)
|
|
591
|
+
m[S] === void 0 && (m[S] = _[S]);
|
|
562
592
|
}
|
|
563
|
-
if (
|
|
564
|
-
var
|
|
565
|
-
|
|
593
|
+
if (g || z) {
|
|
594
|
+
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
595
|
+
g && Er(m, E), z && Cr(m, E);
|
|
566
596
|
}
|
|
567
|
-
return
|
|
597
|
+
return Tr(e, g, z, b, p, X.current, m);
|
|
568
598
|
}
|
|
569
599
|
}
|
|
570
|
-
var
|
|
571
|
-
function
|
|
600
|
+
var we = U.ReactCurrentOwner, Ve = U.ReactDebugCurrentFrame;
|
|
601
|
+
function Y(e) {
|
|
572
602
|
if (e) {
|
|
573
|
-
var
|
|
574
|
-
|
|
603
|
+
var n = e._owner, o = ne(e.type, e._source, n ? n.type : null);
|
|
604
|
+
Ve.setExtraStackFrame(o);
|
|
575
605
|
} else
|
|
576
|
-
|
|
606
|
+
Ve.setExtraStackFrame(null);
|
|
577
607
|
}
|
|
578
|
-
var
|
|
579
|
-
|
|
580
|
-
function
|
|
581
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
608
|
+
var Se;
|
|
609
|
+
Se = !1;
|
|
610
|
+
function Re(e) {
|
|
611
|
+
return typeof e == "object" && e !== null && e.$$typeof === a;
|
|
582
612
|
}
|
|
583
|
-
function
|
|
613
|
+
function Ye() {
|
|
584
614
|
{
|
|
585
|
-
if (
|
|
586
|
-
var e =
|
|
615
|
+
if (we.current) {
|
|
616
|
+
var e = F(we.current.type);
|
|
587
617
|
if (e)
|
|
588
618
|
return `
|
|
589
619
|
|
|
@@ -592,149 +622,149 @@ Check the render method of \`` + e + "`.";
|
|
|
592
622
|
return "";
|
|
593
623
|
}
|
|
594
624
|
}
|
|
595
|
-
function
|
|
625
|
+
function Ar(e) {
|
|
596
626
|
{
|
|
597
627
|
if (e !== void 0) {
|
|
598
|
-
var
|
|
628
|
+
var n = e.fileName.replace(/^.*[\\\/]/, ""), o = e.lineNumber;
|
|
599
629
|
return `
|
|
600
630
|
|
|
601
|
-
Check your code at ` +
|
|
631
|
+
Check your code at ` + n + ":" + o + ".";
|
|
602
632
|
}
|
|
603
633
|
return "";
|
|
604
634
|
}
|
|
605
635
|
}
|
|
606
|
-
var
|
|
607
|
-
function
|
|
636
|
+
var Be = {};
|
|
637
|
+
function Or(e) {
|
|
608
638
|
{
|
|
609
|
-
var
|
|
610
|
-
if (!
|
|
611
|
-
var
|
|
612
|
-
|
|
639
|
+
var n = Ye();
|
|
640
|
+
if (!n) {
|
|
641
|
+
var o = typeof e == "string" ? e : e.displayName || e.name;
|
|
642
|
+
o && (n = `
|
|
613
643
|
|
|
614
|
-
Check the top-level render call using <` +
|
|
644
|
+
Check the top-level render call using <` + o + ">.");
|
|
615
645
|
}
|
|
616
|
-
return
|
|
646
|
+
return n;
|
|
617
647
|
}
|
|
618
648
|
}
|
|
619
|
-
function
|
|
649
|
+
function Ge(e, n) {
|
|
620
650
|
{
|
|
621
651
|
if (!e._store || e._store.validated || e.key != null)
|
|
622
652
|
return;
|
|
623
653
|
e._store.validated = !0;
|
|
624
|
-
var
|
|
625
|
-
if (
|
|
654
|
+
var o = Or(n);
|
|
655
|
+
if (Be[o])
|
|
626
656
|
return;
|
|
627
|
-
|
|
628
|
-
var
|
|
629
|
-
e && e._owner && e._owner !==
|
|
657
|
+
Be[o] = !0;
|
|
658
|
+
var p = "";
|
|
659
|
+
e && e._owner && e._owner !== we.current && (p = " It was passed a child from " + F(e._owner.type) + "."), Y(e), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', o, p), Y(null);
|
|
630
660
|
}
|
|
631
661
|
}
|
|
632
|
-
function
|
|
662
|
+
function He(e, n) {
|
|
633
663
|
{
|
|
634
664
|
if (typeof e != "object")
|
|
635
665
|
return;
|
|
636
|
-
if (
|
|
637
|
-
for (var
|
|
638
|
-
var
|
|
639
|
-
|
|
666
|
+
if (ve(e))
|
|
667
|
+
for (var o = 0; o < e.length; o++) {
|
|
668
|
+
var p = e[o];
|
|
669
|
+
Re(p) && Ge(p, n);
|
|
640
670
|
}
|
|
641
|
-
else if (
|
|
671
|
+
else if (Re(e))
|
|
642
672
|
e._store && (e._store.validated = !0);
|
|
643
673
|
else if (e) {
|
|
644
|
-
var
|
|
645
|
-
if (typeof
|
|
646
|
-
for (var
|
|
647
|
-
|
|
674
|
+
var b = pe(e);
|
|
675
|
+
if (typeof b == "function" && b !== e.entries)
|
|
676
|
+
for (var S = b.call(e), m; !(m = S.next()).done; )
|
|
677
|
+
Re(m.value) && Ge(m.value, n);
|
|
648
678
|
}
|
|
649
679
|
}
|
|
650
680
|
}
|
|
651
|
-
function
|
|
681
|
+
function xr(e) {
|
|
652
682
|
{
|
|
653
|
-
var
|
|
654
|
-
if (
|
|
683
|
+
var n = e.type;
|
|
684
|
+
if (n == null || typeof n == "string")
|
|
655
685
|
return;
|
|
656
|
-
var
|
|
657
|
-
if (typeof
|
|
658
|
-
|
|
659
|
-
else if (typeof
|
|
660
|
-
|
|
686
|
+
var o;
|
|
687
|
+
if (typeof n == "function")
|
|
688
|
+
o = n.propTypes;
|
|
689
|
+
else if (typeof n == "object" && (n.$$typeof === v || n.$$typeof === h))
|
|
690
|
+
o = n.propTypes;
|
|
661
691
|
else
|
|
662
692
|
return;
|
|
663
|
-
if (
|
|
664
|
-
var
|
|
665
|
-
|
|
666
|
-
} else if (
|
|
667
|
-
|
|
668
|
-
var
|
|
669
|
-
|
|
693
|
+
if (o) {
|
|
694
|
+
var p = F(n);
|
|
695
|
+
vr(o, e.props, "prop", p, e);
|
|
696
|
+
} else if (n.PropTypes !== void 0 && !Se) {
|
|
697
|
+
Se = !0;
|
|
698
|
+
var b = F(n);
|
|
699
|
+
T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
|
|
670
700
|
}
|
|
671
|
-
typeof
|
|
701
|
+
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
672
702
|
}
|
|
673
703
|
}
|
|
674
|
-
function
|
|
704
|
+
function Dr(e) {
|
|
675
705
|
{
|
|
676
|
-
for (var
|
|
677
|
-
var
|
|
678
|
-
if (
|
|
679
|
-
|
|
706
|
+
for (var n = Object.keys(e.props), o = 0; o < n.length; o++) {
|
|
707
|
+
var p = n[o];
|
|
708
|
+
if (p !== "children" && p !== "key") {
|
|
709
|
+
Y(e), T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), Y(null);
|
|
680
710
|
break;
|
|
681
711
|
}
|
|
682
712
|
}
|
|
683
|
-
e.ref !== null && (
|
|
713
|
+
e.ref !== null && (Y(e), T("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null));
|
|
684
714
|
}
|
|
685
715
|
}
|
|
686
|
-
function
|
|
716
|
+
function Je(e, n, o, p, b, S) {
|
|
687
717
|
{
|
|
688
|
-
var m =
|
|
718
|
+
var m = ur(e);
|
|
689
719
|
if (!m) {
|
|
690
|
-
var
|
|
691
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
692
|
-
var
|
|
693
|
-
|
|
694
|
-
var
|
|
695
|
-
e === null ?
|
|
720
|
+
var g = "";
|
|
721
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (g += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
722
|
+
var z = Ar(b);
|
|
723
|
+
z ? g += z : g += Ye();
|
|
724
|
+
var _;
|
|
725
|
+
e === null ? _ = "null" : ve(e) ? _ = "array" : e !== void 0 && e.$$typeof === a ? (_ = "<" + (F(e.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : _ = typeof e, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", _, g);
|
|
696
726
|
}
|
|
697
|
-
var
|
|
698
|
-
if (
|
|
699
|
-
return
|
|
727
|
+
var E = zr(e, n, o, b, S);
|
|
728
|
+
if (E == null)
|
|
729
|
+
return E;
|
|
700
730
|
if (m) {
|
|
701
|
-
var
|
|
702
|
-
if (
|
|
703
|
-
if (
|
|
704
|
-
if (
|
|
705
|
-
for (var
|
|
706
|
-
|
|
707
|
-
Object.freeze && Object.freeze(
|
|
731
|
+
var k = n.children;
|
|
732
|
+
if (k !== void 0)
|
|
733
|
+
if (p)
|
|
734
|
+
if (ve(k)) {
|
|
735
|
+
for (var B = 0; B < k.length; B++)
|
|
736
|
+
He(k[B], e);
|
|
737
|
+
Object.freeze && Object.freeze(k);
|
|
708
738
|
} else
|
|
709
|
-
|
|
739
|
+
T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
710
740
|
else
|
|
711
|
-
|
|
741
|
+
He(k, e);
|
|
712
742
|
}
|
|
713
|
-
return e === c ?
|
|
743
|
+
return e === c ? Dr(E) : xr(E), E;
|
|
714
744
|
}
|
|
715
745
|
}
|
|
716
|
-
function
|
|
717
|
-
return
|
|
746
|
+
function kr(e, n, o) {
|
|
747
|
+
return Je(e, n, o, !0);
|
|
718
748
|
}
|
|
719
|
-
function
|
|
720
|
-
return
|
|
749
|
+
function Ir(e, n, o) {
|
|
750
|
+
return Je(e, n, o, !1);
|
|
721
751
|
}
|
|
722
|
-
var
|
|
723
|
-
|
|
724
|
-
}()),
|
|
752
|
+
var jr = Ir, Fr = kr;
|
|
753
|
+
Z.Fragment = c, Z.jsx = jr, Z.jsxs = Fr;
|
|
754
|
+
}()), Z;
|
|
725
755
|
}
|
|
726
|
-
(function(
|
|
727
|
-
process.env.NODE_ENV === "production" ?
|
|
728
|
-
})(
|
|
729
|
-
const
|
|
730
|
-
function
|
|
731
|
-
postSubmit:
|
|
732
|
-
styles:
|
|
756
|
+
(function(t) {
|
|
757
|
+
process.env.NODE_ENV === "production" ? t.exports = Gr() : t.exports = Hr();
|
|
758
|
+
})(de);
|
|
759
|
+
const $ = de.exports.Fragment, r = de.exports.jsx, w = de.exports.jsxs;
|
|
760
|
+
function Jr({
|
|
761
|
+
postSubmit: t,
|
|
762
|
+
styles: a = ue
|
|
733
763
|
}) {
|
|
734
764
|
const {
|
|
735
765
|
control: s,
|
|
736
766
|
handleSubmit: c
|
|
737
|
-
} =
|
|
767
|
+
} = ee({
|
|
738
768
|
defaultValues: {
|
|
739
769
|
type: "postgresql",
|
|
740
770
|
key: "",
|
|
@@ -747,20 +777,20 @@ function Br({
|
|
|
747
777
|
}
|
|
748
778
|
}
|
|
749
779
|
});
|
|
750
|
-
return /* @__PURE__ */ r(
|
|
780
|
+
return /* @__PURE__ */ r(L, {
|
|
751
781
|
mx: "auto",
|
|
752
|
-
children: /* @__PURE__ */
|
|
782
|
+
children: /* @__PURE__ */ w("form", {
|
|
753
783
|
onSubmit: c(async ({
|
|
754
|
-
type:
|
|
755
|
-
key:
|
|
784
|
+
type: i,
|
|
785
|
+
key: l,
|
|
756
786
|
config: f
|
|
757
787
|
}) => {
|
|
758
|
-
if (
|
|
788
|
+
if (M({
|
|
759
789
|
id: "for-creating",
|
|
760
790
|
title: "Pending",
|
|
761
791
|
message: "Adding data source...",
|
|
762
792
|
loading: !0
|
|
763
|
-
}), !await
|
|
793
|
+
}), !await x.datasource.create(i, l, f)) {
|
|
764
794
|
A({
|
|
765
795
|
id: "for-creating",
|
|
766
796
|
title: "Failed",
|
|
@@ -774,17 +804,17 @@ function Br({
|
|
|
774
804
|
title: "Successful",
|
|
775
805
|
message: "Data source is added",
|
|
776
806
|
color: "green"
|
|
777
|
-
}),
|
|
807
|
+
}), t();
|
|
778
808
|
}),
|
|
779
|
-
children: [/* @__PURE__ */ r(
|
|
809
|
+
children: [/* @__PURE__ */ r(P, {
|
|
780
810
|
name: "type",
|
|
781
811
|
control: s,
|
|
782
812
|
render: ({
|
|
783
|
-
field:
|
|
784
|
-
}) => /* @__PURE__ */ r(
|
|
813
|
+
field: i
|
|
814
|
+
}) => /* @__PURE__ */ r(qr, {
|
|
785
815
|
fullWidth: !0,
|
|
786
|
-
mb:
|
|
787
|
-
size:
|
|
816
|
+
mb: a.spacing,
|
|
817
|
+
size: a.size,
|
|
788
818
|
data: [{
|
|
789
819
|
label: "PostgreSQL",
|
|
790
820
|
value: "postgresql"
|
|
@@ -796,113 +826,113 @@ function Br({
|
|
|
796
826
|
value: "http",
|
|
797
827
|
disabled: !0
|
|
798
828
|
}],
|
|
799
|
-
...
|
|
829
|
+
...i
|
|
800
830
|
})
|
|
801
|
-
}), /* @__PURE__ */ r(
|
|
831
|
+
}), /* @__PURE__ */ r(P, {
|
|
802
832
|
name: "key",
|
|
803
833
|
control: s,
|
|
804
834
|
render: ({
|
|
805
|
-
field:
|
|
806
|
-
}) => /* @__PURE__ */ r(
|
|
807
|
-
mb:
|
|
808
|
-
size:
|
|
835
|
+
field: i
|
|
836
|
+
}) => /* @__PURE__ */ r(I, {
|
|
837
|
+
mb: a.spacing,
|
|
838
|
+
size: a.size,
|
|
809
839
|
required: !0,
|
|
810
840
|
label: "Name",
|
|
811
841
|
placeholder: "A unique name",
|
|
812
|
-
...
|
|
842
|
+
...i
|
|
813
843
|
})
|
|
814
|
-
}), /* @__PURE__ */ r(
|
|
844
|
+
}), /* @__PURE__ */ r(er, {
|
|
815
845
|
label: "Connection Info",
|
|
816
846
|
labelPosition: "center"
|
|
817
|
-
}), /* @__PURE__ */
|
|
847
|
+
}), /* @__PURE__ */ w(j, {
|
|
818
848
|
grow: !0,
|
|
819
|
-
children: [/* @__PURE__ */ r(
|
|
849
|
+
children: [/* @__PURE__ */ r(P, {
|
|
820
850
|
name: "config.host",
|
|
821
851
|
control: s,
|
|
822
852
|
render: ({
|
|
823
|
-
field:
|
|
824
|
-
}) => /* @__PURE__ */ r(
|
|
825
|
-
mb:
|
|
826
|
-
size:
|
|
853
|
+
field: i
|
|
854
|
+
}) => /* @__PURE__ */ r(I, {
|
|
855
|
+
mb: a.spacing,
|
|
856
|
+
size: a.size,
|
|
827
857
|
required: !0,
|
|
828
858
|
label: "Host",
|
|
829
859
|
sx: {
|
|
830
860
|
flexGrow: 1
|
|
831
861
|
},
|
|
832
|
-
...
|
|
862
|
+
...i
|
|
833
863
|
})
|
|
834
|
-
}), /* @__PURE__ */ r(
|
|
864
|
+
}), /* @__PURE__ */ r(P, {
|
|
835
865
|
name: "config.port",
|
|
836
866
|
control: s,
|
|
837
867
|
render: ({
|
|
838
|
-
field:
|
|
839
|
-
}) => /* @__PURE__ */ r(
|
|
840
|
-
mb:
|
|
841
|
-
size:
|
|
868
|
+
field: i
|
|
869
|
+
}) => /* @__PURE__ */ r(Lr, {
|
|
870
|
+
mb: a.spacing,
|
|
871
|
+
size: a.size,
|
|
842
872
|
required: !0,
|
|
843
873
|
label: "Port",
|
|
844
874
|
hideControls: !0,
|
|
845
875
|
sx: {
|
|
846
876
|
width: "8em"
|
|
847
877
|
},
|
|
848
|
-
...
|
|
878
|
+
...i
|
|
849
879
|
})
|
|
850
880
|
})]
|
|
851
|
-
}), /* @__PURE__ */ r(
|
|
881
|
+
}), /* @__PURE__ */ r(P, {
|
|
852
882
|
name: "config.username",
|
|
853
883
|
control: s,
|
|
854
884
|
render: ({
|
|
855
|
-
field:
|
|
856
|
-
}) => /* @__PURE__ */ r(
|
|
857
|
-
mb:
|
|
858
|
-
size:
|
|
885
|
+
field: i
|
|
886
|
+
}) => /* @__PURE__ */ r(I, {
|
|
887
|
+
mb: a.spacing,
|
|
888
|
+
size: a.size,
|
|
859
889
|
required: !0,
|
|
860
890
|
label: "Username",
|
|
861
|
-
...
|
|
891
|
+
...i
|
|
862
892
|
})
|
|
863
|
-
}), /* @__PURE__ */ r(
|
|
893
|
+
}), /* @__PURE__ */ r(P, {
|
|
864
894
|
name: "config.password",
|
|
865
895
|
control: s,
|
|
866
896
|
render: ({
|
|
867
|
-
field:
|
|
868
|
-
}) => /* @__PURE__ */ r(
|
|
869
|
-
mb:
|
|
870
|
-
size:
|
|
897
|
+
field: i
|
|
898
|
+
}) => /* @__PURE__ */ r(se, {
|
|
899
|
+
mb: a.spacing,
|
|
900
|
+
size: a.size,
|
|
871
901
|
required: !0,
|
|
872
902
|
label: "Password",
|
|
873
|
-
...
|
|
903
|
+
...i
|
|
874
904
|
})
|
|
875
|
-
}), /* @__PURE__ */ r(
|
|
905
|
+
}), /* @__PURE__ */ r(P, {
|
|
876
906
|
name: "config.database",
|
|
877
907
|
control: s,
|
|
878
908
|
render: ({
|
|
879
|
-
field:
|
|
880
|
-
}) => /* @__PURE__ */ r(
|
|
881
|
-
mb:
|
|
882
|
-
size:
|
|
909
|
+
field: i
|
|
910
|
+
}) => /* @__PURE__ */ r(I, {
|
|
911
|
+
mb: a.spacing,
|
|
912
|
+
size: a.size,
|
|
883
913
|
required: !0,
|
|
884
914
|
label: "Database",
|
|
885
|
-
...
|
|
915
|
+
...i
|
|
886
916
|
})
|
|
887
|
-
}), /* @__PURE__ */ r(
|
|
917
|
+
}), /* @__PURE__ */ r(j, {
|
|
888
918
|
position: "right",
|
|
889
|
-
mt:
|
|
890
|
-
children: /* @__PURE__ */ r(
|
|
919
|
+
mt: a.spacing,
|
|
920
|
+
children: /* @__PURE__ */ r(D, {
|
|
891
921
|
type: "submit",
|
|
892
|
-
size:
|
|
922
|
+
size: a.button.size,
|
|
893
923
|
children: "Save"
|
|
894
924
|
})
|
|
895
925
|
})]
|
|
896
926
|
})
|
|
897
927
|
});
|
|
898
928
|
}
|
|
899
|
-
function
|
|
900
|
-
onSuccess:
|
|
901
|
-
styles:
|
|
929
|
+
function Xr({
|
|
930
|
+
onSuccess: t,
|
|
931
|
+
styles: a = ue
|
|
902
932
|
}) {
|
|
903
|
-
const [s, c] =
|
|
904
|
-
return /* @__PURE__ */
|
|
905
|
-
children: [/* @__PURE__ */ r(
|
|
933
|
+
const [s, c] = H.useState(!1), u = () => c(!0), i = () => c(!1);
|
|
934
|
+
return /* @__PURE__ */ w($, {
|
|
935
|
+
children: [/* @__PURE__ */ r(oe, {
|
|
906
936
|
overflow: "inside",
|
|
907
937
|
opened: s,
|
|
908
938
|
onClose: () => c(!1),
|
|
@@ -911,43 +941,43 @@ function Gr({
|
|
|
911
941
|
onDragStart: (f) => {
|
|
912
942
|
f.stopPropagation();
|
|
913
943
|
},
|
|
914
|
-
children: /* @__PURE__ */ r(
|
|
944
|
+
children: /* @__PURE__ */ r(Jr, {
|
|
915
945
|
postSubmit: () => {
|
|
916
|
-
|
|
946
|
+
t(), i();
|
|
917
947
|
},
|
|
918
|
-
styles:
|
|
948
|
+
styles: a
|
|
919
949
|
})
|
|
920
|
-
}), /* @__PURE__ */ r(
|
|
921
|
-
size:
|
|
922
|
-
onClick:
|
|
923
|
-
leftIcon: /* @__PURE__ */ r(
|
|
950
|
+
}), /* @__PURE__ */ r(D, {
|
|
951
|
+
size: a.button.size,
|
|
952
|
+
onClick: u,
|
|
953
|
+
leftIcon: /* @__PURE__ */ r(Ee, {
|
|
924
954
|
size: 20
|
|
925
955
|
}),
|
|
926
956
|
children: "Add a Data Source"
|
|
927
957
|
})]
|
|
928
958
|
});
|
|
929
959
|
}
|
|
930
|
-
function
|
|
931
|
-
id:
|
|
932
|
-
name:
|
|
960
|
+
function Qr({
|
|
961
|
+
id: t,
|
|
962
|
+
name: a,
|
|
933
963
|
onSuccess: s,
|
|
934
|
-
styles: c =
|
|
964
|
+
styles: c = ue
|
|
935
965
|
}) {
|
|
936
|
-
const
|
|
937
|
-
!
|
|
966
|
+
const u = ce(), i = async () => {
|
|
967
|
+
!t || (M({
|
|
938
968
|
id: "for-deleting",
|
|
939
969
|
title: "Pending",
|
|
940
970
|
message: "Deleting data source...",
|
|
941
971
|
loading: !0
|
|
942
|
-
}), await
|
|
972
|
+
}), await x.datasource.delete(t), A({
|
|
943
973
|
id: "for-deleting",
|
|
944
974
|
title: "Successful",
|
|
945
|
-
message: `Data source [${
|
|
975
|
+
message: `Data source [${a}] is deleted`,
|
|
946
976
|
color: "green"
|
|
947
977
|
}), s());
|
|
948
|
-
},
|
|
978
|
+
}, l = () => u.openConfirmModal({
|
|
949
979
|
title: "Delete this data source?",
|
|
950
|
-
children: /* @__PURE__ */ r(
|
|
980
|
+
children: /* @__PURE__ */ r(ye, {
|
|
951
981
|
size: c.size,
|
|
952
982
|
children: "This action won't affect your database."
|
|
953
983
|
}),
|
|
@@ -956,55 +986,56 @@ function Hr({
|
|
|
956
986
|
cancel: "Cancel"
|
|
957
987
|
},
|
|
958
988
|
onCancel: () => console.log("Cancel"),
|
|
959
|
-
onConfirm:
|
|
989
|
+
onConfirm: i
|
|
960
990
|
});
|
|
961
|
-
return /* @__PURE__ */ r(
|
|
991
|
+
return /* @__PURE__ */ r(D, {
|
|
962
992
|
size: c.button.size,
|
|
963
993
|
color: "red",
|
|
964
|
-
onClick:
|
|
965
|
-
leftIcon: /* @__PURE__ */ r(
|
|
994
|
+
onClick: l,
|
|
995
|
+
leftIcon: /* @__PURE__ */ r(Ce, {
|
|
966
996
|
size: 20
|
|
967
997
|
}),
|
|
968
998
|
children: "Delete"
|
|
969
999
|
});
|
|
970
1000
|
}
|
|
971
|
-
function
|
|
972
|
-
styles:
|
|
973
|
-
config:
|
|
1001
|
+
function vt({
|
|
1002
|
+
styles: t = ue,
|
|
1003
|
+
config: a
|
|
974
1004
|
}) {
|
|
1005
|
+
le(a);
|
|
975
1006
|
const {
|
|
976
1007
|
data: s = [],
|
|
977
1008
|
loading: c,
|
|
978
|
-
refresh:
|
|
979
|
-
} =
|
|
1009
|
+
refresh: u
|
|
1010
|
+
} = G(async () => {
|
|
980
1011
|
const {
|
|
981
|
-
data:
|
|
982
|
-
} = await
|
|
983
|
-
return
|
|
1012
|
+
data: i
|
|
1013
|
+
} = await x.datasource.list();
|
|
1014
|
+
return i;
|
|
984
1015
|
}, {
|
|
985
1016
|
refreshDeps: []
|
|
986
1017
|
});
|
|
987
|
-
return
|
|
988
|
-
children: [/* @__PURE__ */ r(
|
|
989
|
-
pt:
|
|
1018
|
+
return /* @__PURE__ */ w($, {
|
|
1019
|
+
children: [/* @__PURE__ */ r(j, {
|
|
1020
|
+
pt: t.spacing,
|
|
990
1021
|
position: "right",
|
|
991
|
-
children: /* @__PURE__ */ r(
|
|
992
|
-
onSuccess:
|
|
1022
|
+
children: /* @__PURE__ */ r(Xr, {
|
|
1023
|
+
onSuccess: u
|
|
993
1024
|
})
|
|
994
|
-
}), /* @__PURE__ */
|
|
995
|
-
mt:
|
|
1025
|
+
}), /* @__PURE__ */ w(L, {
|
|
1026
|
+
mt: t.spacing,
|
|
996
1027
|
sx: {
|
|
997
1028
|
position: "relative"
|
|
998
1029
|
},
|
|
999
|
-
children: [/* @__PURE__ */ r(
|
|
1030
|
+
children: [/* @__PURE__ */ r(_e, {
|
|
1000
1031
|
visible: c
|
|
1001
|
-
}), /* @__PURE__ */
|
|
1002
|
-
horizontalSpacing:
|
|
1003
|
-
verticalSpacing:
|
|
1004
|
-
fontSize:
|
|
1032
|
+
}), /* @__PURE__ */ w(Pe, {
|
|
1033
|
+
horizontalSpacing: t.spacing,
|
|
1034
|
+
verticalSpacing: t.spacing,
|
|
1035
|
+
fontSize: t.size,
|
|
1005
1036
|
highlightOnHover: !0,
|
|
1006
1037
|
children: [/* @__PURE__ */ r("thead", {
|
|
1007
|
-
children: /* @__PURE__ */
|
|
1038
|
+
children: /* @__PURE__ */ w("tr", {
|
|
1008
1039
|
children: [/* @__PURE__ */ r("th", {
|
|
1009
1040
|
children: "Type"
|
|
1010
1041
|
}), /* @__PURE__ */ r("th", {
|
|
@@ -1015,59 +1046,59 @@ function ut({
|
|
|
1015
1046
|
})
|
|
1016
1047
|
}), /* @__PURE__ */ r("tbody", {
|
|
1017
1048
|
children: s.map(({
|
|
1018
|
-
id:
|
|
1019
|
-
key:
|
|
1049
|
+
id: i,
|
|
1050
|
+
key: l,
|
|
1020
1051
|
type: f
|
|
1021
|
-
}) => /* @__PURE__ */
|
|
1052
|
+
}) => /* @__PURE__ */ w("tr", {
|
|
1022
1053
|
children: [/* @__PURE__ */ r("td", {
|
|
1023
1054
|
width: 200,
|
|
1024
1055
|
children: f
|
|
1025
1056
|
}), /* @__PURE__ */ r("td", {
|
|
1026
|
-
children:
|
|
1057
|
+
children: l
|
|
1027
1058
|
}), /* @__PURE__ */ r("td", {
|
|
1028
1059
|
width: 200,
|
|
1029
|
-
children: /* @__PURE__ */ r(
|
|
1060
|
+
children: /* @__PURE__ */ r(j, {
|
|
1030
1061
|
position: "left",
|
|
1031
|
-
children: /* @__PURE__ */ r(
|
|
1032
|
-
id:
|
|
1033
|
-
name:
|
|
1034
|
-
onSuccess:
|
|
1062
|
+
children: /* @__PURE__ */ r(Qr, {
|
|
1063
|
+
id: i,
|
|
1064
|
+
name: l,
|
|
1065
|
+
onSuccess: u
|
|
1035
1066
|
})
|
|
1036
1067
|
})
|
|
1037
1068
|
})]
|
|
1038
|
-
},
|
|
1069
|
+
}, l))
|
|
1039
1070
|
})]
|
|
1040
1071
|
})]
|
|
1041
1072
|
})]
|
|
1042
1073
|
});
|
|
1043
1074
|
}
|
|
1044
|
-
const
|
|
1045
|
-
label:
|
|
1046
|
-
value:
|
|
1075
|
+
const Zr = tr(({
|
|
1076
|
+
label: t,
|
|
1077
|
+
value: a,
|
|
1047
1078
|
description: s,
|
|
1048
1079
|
...c
|
|
1049
|
-
},
|
|
1080
|
+
}, u) => /* @__PURE__ */ w(rr, {
|
|
1050
1081
|
spacing: 2,
|
|
1051
|
-
ref:
|
|
1082
|
+
ref: u,
|
|
1052
1083
|
...c,
|
|
1053
|
-
children: [/* @__PURE__ */ r(
|
|
1084
|
+
children: [/* @__PURE__ */ r(ye, {
|
|
1054
1085
|
size: "sm",
|
|
1055
|
-
children:
|
|
1056
|
-
}), /* @__PURE__ */ r(
|
|
1086
|
+
children: t
|
|
1087
|
+
}), /* @__PURE__ */ r(ye, {
|
|
1057
1088
|
size: "xs",
|
|
1058
1089
|
color: "dimmed",
|
|
1059
1090
|
className: "role-description",
|
|
1060
1091
|
children: s
|
|
1061
1092
|
})]
|
|
1062
|
-
})),
|
|
1063
|
-
styles:
|
|
1064
|
-
value:
|
|
1093
|
+
})), Te = tr(({
|
|
1094
|
+
styles: t,
|
|
1095
|
+
value: a,
|
|
1065
1096
|
onChange: s
|
|
1066
1097
|
}, c) => {
|
|
1067
1098
|
const {
|
|
1068
|
-
data:
|
|
1069
|
-
loading:
|
|
1070
|
-
} =
|
|
1099
|
+
data: u = [],
|
|
1100
|
+
loading: i
|
|
1101
|
+
} = G(async () => (await x.role.list()).map((f) => ({
|
|
1071
1102
|
label: f.name,
|
|
1072
1103
|
value: f.id,
|
|
1073
1104
|
description: f.description,
|
|
@@ -1075,15 +1106,15 @@ const Jr = Je(({
|
|
|
1075
1106
|
})), {
|
|
1076
1107
|
refreshDeps: []
|
|
1077
1108
|
});
|
|
1078
|
-
return /* @__PURE__ */ r(
|
|
1109
|
+
return /* @__PURE__ */ r(Nr, {
|
|
1079
1110
|
ref: c,
|
|
1080
|
-
mb:
|
|
1081
|
-
size:
|
|
1111
|
+
mb: t.spacing,
|
|
1112
|
+
size: t.size,
|
|
1082
1113
|
required: !0,
|
|
1083
1114
|
label: "Role",
|
|
1084
|
-
itemComponent:
|
|
1085
|
-
data:
|
|
1086
|
-
disabled:
|
|
1115
|
+
itemComponent: Zr,
|
|
1116
|
+
data: u,
|
|
1117
|
+
disabled: i,
|
|
1087
1118
|
styles: () => ({
|
|
1088
1119
|
item: {
|
|
1089
1120
|
"&[data-selected]": {
|
|
@@ -1095,25 +1126,25 @@ const Jr = Je(({
|
|
|
1095
1126
|
}
|
|
1096
1127
|
}
|
|
1097
1128
|
}),
|
|
1098
|
-
value:
|
|
1129
|
+
value: a,
|
|
1099
1130
|
onChange: s
|
|
1100
1131
|
});
|
|
1101
|
-
}),
|
|
1132
|
+
}), W = {
|
|
1102
1133
|
size: "sm",
|
|
1103
1134
|
spacing: "md",
|
|
1104
1135
|
button: {
|
|
1105
1136
|
size: "xs"
|
|
1106
1137
|
}
|
|
1107
1138
|
};
|
|
1108
|
-
function
|
|
1109
|
-
postSubmit:
|
|
1110
|
-
styles:
|
|
1139
|
+
function et({
|
|
1140
|
+
postSubmit: t,
|
|
1141
|
+
styles: a = W,
|
|
1111
1142
|
initialRoleID: s
|
|
1112
1143
|
}) {
|
|
1113
1144
|
const {
|
|
1114
1145
|
control: c,
|
|
1115
|
-
handleSubmit:
|
|
1116
|
-
} =
|
|
1146
|
+
handleSubmit: u
|
|
1147
|
+
} = ee({
|
|
1117
1148
|
defaultValues: {
|
|
1118
1149
|
name: "",
|
|
1119
1150
|
email: "",
|
|
@@ -1121,146 +1152,146 @@ function Xr({
|
|
|
1121
1152
|
password: ""
|
|
1122
1153
|
}
|
|
1123
1154
|
});
|
|
1124
|
-
return /* @__PURE__ */ r(
|
|
1155
|
+
return /* @__PURE__ */ r(L, {
|
|
1125
1156
|
mx: "auto",
|
|
1126
|
-
children: /* @__PURE__ */
|
|
1127
|
-
onSubmit:
|
|
1128
|
-
name:
|
|
1157
|
+
children: /* @__PURE__ */ w("form", {
|
|
1158
|
+
onSubmit: u(async ({
|
|
1159
|
+
name: l,
|
|
1129
1160
|
email: f,
|
|
1130
|
-
password:
|
|
1131
|
-
role_id:
|
|
1161
|
+
password: v,
|
|
1162
|
+
role_id: R
|
|
1132
1163
|
}) => {
|
|
1133
1164
|
try {
|
|
1134
|
-
|
|
1165
|
+
M({
|
|
1135
1166
|
id: "for-creating",
|
|
1136
1167
|
title: "Pending",
|
|
1137
1168
|
message: "Adding account...",
|
|
1138
1169
|
loading: !0
|
|
1139
|
-
}), await
|
|
1170
|
+
}), await x.account.create(l, f, v, R), A({
|
|
1140
1171
|
id: "for-creating",
|
|
1141
1172
|
title: "Successful",
|
|
1142
1173
|
message: "Account is added",
|
|
1143
1174
|
color: "green"
|
|
1144
|
-
}),
|
|
1145
|
-
} catch (
|
|
1175
|
+
}), t();
|
|
1176
|
+
} catch (y) {
|
|
1146
1177
|
A({
|
|
1147
1178
|
id: "for-creating",
|
|
1148
1179
|
title: "Failed",
|
|
1149
|
-
message:
|
|
1180
|
+
message: y.message,
|
|
1150
1181
|
color: "red"
|
|
1151
1182
|
});
|
|
1152
1183
|
}
|
|
1153
1184
|
}),
|
|
1154
|
-
children: [/* @__PURE__ */ r(
|
|
1185
|
+
children: [/* @__PURE__ */ r(P, {
|
|
1155
1186
|
name: "name",
|
|
1156
1187
|
control: c,
|
|
1157
1188
|
render: ({
|
|
1158
|
-
field:
|
|
1159
|
-
}) => /* @__PURE__ */ r(
|
|
1160
|
-
mb:
|
|
1161
|
-
size:
|
|
1189
|
+
field: l
|
|
1190
|
+
}) => /* @__PURE__ */ r(I, {
|
|
1191
|
+
mb: a.spacing,
|
|
1192
|
+
size: a.size,
|
|
1162
1193
|
required: !0,
|
|
1163
1194
|
label: "Username",
|
|
1164
|
-
...
|
|
1195
|
+
...l
|
|
1165
1196
|
})
|
|
1166
|
-
}), /* @__PURE__ */ r(
|
|
1197
|
+
}), /* @__PURE__ */ r(P, {
|
|
1167
1198
|
name: "email",
|
|
1168
1199
|
control: c,
|
|
1169
1200
|
render: ({
|
|
1170
|
-
field:
|
|
1171
|
-
}) => /* @__PURE__ */ r(
|
|
1172
|
-
mb:
|
|
1173
|
-
size:
|
|
1201
|
+
field: l
|
|
1202
|
+
}) => /* @__PURE__ */ r(I, {
|
|
1203
|
+
mb: a.spacing,
|
|
1204
|
+
size: a.size,
|
|
1174
1205
|
required: !0,
|
|
1175
1206
|
label: "Email",
|
|
1176
|
-
...
|
|
1207
|
+
...l
|
|
1177
1208
|
})
|
|
1178
|
-
}), /* @__PURE__ */ r(
|
|
1209
|
+
}), /* @__PURE__ */ r(P, {
|
|
1179
1210
|
name: "password",
|
|
1180
1211
|
control: c,
|
|
1181
1212
|
render: ({
|
|
1182
|
-
field:
|
|
1183
|
-
}) => /* @__PURE__ */ r(
|
|
1184
|
-
mb:
|
|
1185
|
-
size:
|
|
1213
|
+
field: l
|
|
1214
|
+
}) => /* @__PURE__ */ r(se, {
|
|
1215
|
+
mb: a.spacing,
|
|
1216
|
+
size: a.size,
|
|
1186
1217
|
required: !0,
|
|
1187
1218
|
label: "Password",
|
|
1188
1219
|
description: "Password must be at least 8 characters long",
|
|
1189
|
-
...
|
|
1220
|
+
...l
|
|
1190
1221
|
})
|
|
1191
|
-
}), /* @__PURE__ */ r(
|
|
1222
|
+
}), /* @__PURE__ */ r(P, {
|
|
1192
1223
|
name: "role_id",
|
|
1193
1224
|
control: c,
|
|
1194
1225
|
render: ({
|
|
1195
|
-
field:
|
|
1196
|
-
}) => /* @__PURE__ */ r(
|
|
1197
|
-
styles:
|
|
1198
|
-
...
|
|
1226
|
+
field: l
|
|
1227
|
+
}) => /* @__PURE__ */ r(Te, {
|
|
1228
|
+
styles: a,
|
|
1229
|
+
...l
|
|
1199
1230
|
})
|
|
1200
|
-
}), /* @__PURE__ */ r(
|
|
1231
|
+
}), /* @__PURE__ */ r(j, {
|
|
1201
1232
|
position: "right",
|
|
1202
|
-
mt:
|
|
1203
|
-
children: /* @__PURE__ */ r(
|
|
1233
|
+
mt: a.spacing,
|
|
1234
|
+
children: /* @__PURE__ */ r(D, {
|
|
1204
1235
|
type: "submit",
|
|
1205
|
-
size:
|
|
1236
|
+
size: a.button.size,
|
|
1206
1237
|
children: "Save"
|
|
1207
1238
|
})
|
|
1208
1239
|
})]
|
|
1209
1240
|
})
|
|
1210
1241
|
});
|
|
1211
1242
|
}
|
|
1212
|
-
function
|
|
1213
|
-
onSuccess:
|
|
1214
|
-
styles:
|
|
1243
|
+
function rt({
|
|
1244
|
+
onSuccess: t,
|
|
1245
|
+
styles: a = W,
|
|
1215
1246
|
initialRoleID: s
|
|
1216
1247
|
}) {
|
|
1217
|
-
const [c,
|
|
1218
|
-
return /* @__PURE__ */
|
|
1219
|
-
children: [/* @__PURE__ */ r(
|
|
1248
|
+
const [c, u] = H.useState(!1), i = () => u(!0), l = () => u(!1);
|
|
1249
|
+
return /* @__PURE__ */ w($, {
|
|
1250
|
+
children: [/* @__PURE__ */ r(oe, {
|
|
1220
1251
|
overflow: "inside",
|
|
1221
1252
|
opened: c,
|
|
1222
|
-
onClose: () =>
|
|
1253
|
+
onClose: () => u(!1),
|
|
1223
1254
|
title: "Add an Account",
|
|
1224
1255
|
trapFocus: !0,
|
|
1225
|
-
onDragStart: (
|
|
1226
|
-
|
|
1256
|
+
onDragStart: (v) => {
|
|
1257
|
+
v.stopPropagation();
|
|
1227
1258
|
},
|
|
1228
|
-
children: /* @__PURE__ */ r(
|
|
1259
|
+
children: /* @__PURE__ */ r(et, {
|
|
1229
1260
|
postSubmit: () => {
|
|
1230
|
-
|
|
1261
|
+
t(), l();
|
|
1231
1262
|
},
|
|
1232
|
-
styles:
|
|
1263
|
+
styles: a,
|
|
1233
1264
|
initialRoleID: s
|
|
1234
1265
|
})
|
|
1235
|
-
}), /* @__PURE__ */ r(
|
|
1236
|
-
size:
|
|
1237
|
-
onClick:
|
|
1238
|
-
leftIcon: /* @__PURE__ */ r(
|
|
1266
|
+
}), /* @__PURE__ */ r(D, {
|
|
1267
|
+
size: a.button.size,
|
|
1268
|
+
onClick: i,
|
|
1269
|
+
leftIcon: /* @__PURE__ */ r(Ee, {
|
|
1239
1270
|
size: 20
|
|
1240
1271
|
}),
|
|
1241
1272
|
children: "Add an Account"
|
|
1242
1273
|
})]
|
|
1243
1274
|
});
|
|
1244
1275
|
}
|
|
1245
|
-
function
|
|
1246
|
-
id:
|
|
1247
|
-
name:
|
|
1276
|
+
function tt({
|
|
1277
|
+
id: t,
|
|
1278
|
+
name: a,
|
|
1248
1279
|
onSuccess: s,
|
|
1249
|
-
styles: c =
|
|
1280
|
+
styles: c = W
|
|
1250
1281
|
}) {
|
|
1251
|
-
const
|
|
1252
|
-
if (!!
|
|
1253
|
-
|
|
1282
|
+
const u = ce(), i = async () => {
|
|
1283
|
+
if (!!t) {
|
|
1284
|
+
M({
|
|
1254
1285
|
id: "for-deleting",
|
|
1255
1286
|
title: "Pending",
|
|
1256
1287
|
message: "Deleting account...",
|
|
1257
1288
|
loading: !0
|
|
1258
1289
|
});
|
|
1259
1290
|
try {
|
|
1260
|
-
await
|
|
1291
|
+
await x.account.delete(t), A({
|
|
1261
1292
|
id: "for-deleting",
|
|
1262
1293
|
title: "Successful",
|
|
1263
|
-
message: `Account [${
|
|
1294
|
+
message: `Account [${a}] is deleted`,
|
|
1264
1295
|
color: "green"
|
|
1265
1296
|
}), s();
|
|
1266
1297
|
} catch (f) {
|
|
@@ -1272,250 +1303,251 @@ function Qr({
|
|
|
1272
1303
|
});
|
|
1273
1304
|
}
|
|
1274
1305
|
}
|
|
1275
|
-
},
|
|
1306
|
+
}, l = () => u.openConfirmModal({
|
|
1276
1307
|
title: "Delete this account?",
|
|
1277
1308
|
labels: {
|
|
1278
1309
|
confirm: "Confirm",
|
|
1279
1310
|
cancel: "Cancel"
|
|
1280
1311
|
},
|
|
1281
1312
|
onCancel: () => console.log("Cancel"),
|
|
1282
|
-
onConfirm:
|
|
1313
|
+
onConfirm: i
|
|
1283
1314
|
});
|
|
1284
|
-
return /* @__PURE__ */ r(
|
|
1315
|
+
return /* @__PURE__ */ r(D, {
|
|
1285
1316
|
size: c.button.size,
|
|
1286
1317
|
color: "red",
|
|
1287
|
-
onClick:
|
|
1288
|
-
leftIcon: /* @__PURE__ */ r(
|
|
1318
|
+
onClick: l,
|
|
1319
|
+
leftIcon: /* @__PURE__ */ r(Ce, {
|
|
1289
1320
|
size: 20
|
|
1290
1321
|
}),
|
|
1291
1322
|
children: "Delete"
|
|
1292
1323
|
});
|
|
1293
1324
|
}
|
|
1294
|
-
function
|
|
1295
|
-
id:
|
|
1296
|
-
name:
|
|
1325
|
+
function nt({
|
|
1326
|
+
id: t,
|
|
1327
|
+
name: a,
|
|
1297
1328
|
email: s,
|
|
1298
1329
|
role_id: c,
|
|
1299
|
-
postSubmit:
|
|
1300
|
-
styles:
|
|
1330
|
+
postSubmit: u,
|
|
1331
|
+
styles: i = W
|
|
1301
1332
|
}) {
|
|
1302
1333
|
const {
|
|
1303
|
-
control:
|
|
1334
|
+
control: l,
|
|
1304
1335
|
handleSubmit: f,
|
|
1305
|
-
watch:
|
|
1306
|
-
} =
|
|
1336
|
+
watch: v
|
|
1337
|
+
} = ee({
|
|
1307
1338
|
defaultValues: {
|
|
1308
|
-
name:
|
|
1339
|
+
name: a,
|
|
1309
1340
|
email: s,
|
|
1310
1341
|
role_id: c,
|
|
1311
1342
|
reset_password: !1,
|
|
1312
1343
|
new_password: ""
|
|
1313
1344
|
}
|
|
1314
|
-
}),
|
|
1315
|
-
name:
|
|
1316
|
-
email:
|
|
1317
|
-
role_id:
|
|
1318
|
-
reset_password:
|
|
1319
|
-
new_password:
|
|
1345
|
+
}), R = async ({
|
|
1346
|
+
name: d,
|
|
1347
|
+
email: O,
|
|
1348
|
+
role_id: N,
|
|
1349
|
+
reset_password: K,
|
|
1350
|
+
new_password: pe
|
|
1320
1351
|
}) => {
|
|
1321
1352
|
try {
|
|
1322
|
-
|
|
1353
|
+
M({
|
|
1323
1354
|
id: "for-updating",
|
|
1324
1355
|
title: "Pending",
|
|
1325
1356
|
message: "Updating account...",
|
|
1326
1357
|
loading: !0
|
|
1327
|
-
}), await
|
|
1328
|
-
id:
|
|
1329
|
-
name:
|
|
1330
|
-
email:
|
|
1331
|
-
role_id:
|
|
1332
|
-
reset_password:
|
|
1333
|
-
new_password:
|
|
1358
|
+
}), await x.account.edit({
|
|
1359
|
+
id: t,
|
|
1360
|
+
name: d,
|
|
1361
|
+
email: O,
|
|
1362
|
+
role_id: N,
|
|
1363
|
+
reset_password: K,
|
|
1364
|
+
new_password: pe
|
|
1334
1365
|
}), A({
|
|
1335
1366
|
id: "for-updating",
|
|
1336
1367
|
title: "Successful",
|
|
1337
1368
|
message: "Account is updated",
|
|
1338
1369
|
color: "green"
|
|
1339
|
-
}),
|
|
1340
|
-
} catch (
|
|
1370
|
+
}), u();
|
|
1371
|
+
} catch (U) {
|
|
1341
1372
|
A({
|
|
1342
1373
|
id: "for-updating",
|
|
1343
1374
|
title: "Failed",
|
|
1344
|
-
message:
|
|
1375
|
+
message: U.message,
|
|
1345
1376
|
color: "red"
|
|
1346
1377
|
});
|
|
1347
1378
|
}
|
|
1348
|
-
}, [
|
|
1349
|
-
return /* @__PURE__ */ r(
|
|
1379
|
+
}, [y, h] = v(["reset_password", "new_password"]);
|
|
1380
|
+
return /* @__PURE__ */ r(L, {
|
|
1350
1381
|
mx: "auto",
|
|
1351
|
-
children: /* @__PURE__ */
|
|
1352
|
-
onSubmit: f(
|
|
1353
|
-
children: [/* @__PURE__ */ r(
|
|
1382
|
+
children: /* @__PURE__ */ w("form", {
|
|
1383
|
+
onSubmit: f(R),
|
|
1384
|
+
children: [/* @__PURE__ */ r(P, {
|
|
1354
1385
|
name: "name",
|
|
1355
|
-
control:
|
|
1386
|
+
control: l,
|
|
1356
1387
|
render: ({
|
|
1357
|
-
field:
|
|
1358
|
-
}) => /* @__PURE__ */ r(
|
|
1359
|
-
mb:
|
|
1360
|
-
size:
|
|
1388
|
+
field: d
|
|
1389
|
+
}) => /* @__PURE__ */ r(I, {
|
|
1390
|
+
mb: i.spacing,
|
|
1391
|
+
size: i.size,
|
|
1361
1392
|
required: !0,
|
|
1362
1393
|
label: "Username",
|
|
1363
|
-
...
|
|
1394
|
+
...d
|
|
1364
1395
|
})
|
|
1365
|
-
}), /* @__PURE__ */ r(
|
|
1396
|
+
}), /* @__PURE__ */ r(P, {
|
|
1366
1397
|
name: "email",
|
|
1367
|
-
control:
|
|
1398
|
+
control: l,
|
|
1368
1399
|
render: ({
|
|
1369
|
-
field:
|
|
1370
|
-
}) => /* @__PURE__ */ r(
|
|
1371
|
-
mb:
|
|
1372
|
-
size:
|
|
1400
|
+
field: d
|
|
1401
|
+
}) => /* @__PURE__ */ r(I, {
|
|
1402
|
+
mb: i.spacing,
|
|
1403
|
+
size: i.size,
|
|
1373
1404
|
required: !0,
|
|
1374
1405
|
label: "Email",
|
|
1375
|
-
...
|
|
1406
|
+
...d
|
|
1376
1407
|
})
|
|
1377
|
-
}), /* @__PURE__ */ r(
|
|
1408
|
+
}), /* @__PURE__ */ r(P, {
|
|
1378
1409
|
name: "role_id",
|
|
1379
|
-
control:
|
|
1410
|
+
control: l,
|
|
1380
1411
|
render: ({
|
|
1381
|
-
field:
|
|
1382
|
-
}) => /* @__PURE__ */ r(
|
|
1383
|
-
styles:
|
|
1384
|
-
...
|
|
1412
|
+
field: d
|
|
1413
|
+
}) => /* @__PURE__ */ r(Te, {
|
|
1414
|
+
styles: i,
|
|
1415
|
+
...d
|
|
1385
1416
|
})
|
|
1386
|
-
}), /* @__PURE__ */ r(
|
|
1417
|
+
}), /* @__PURE__ */ r(er, {
|
|
1387
1418
|
my: 20,
|
|
1388
1419
|
variant: "dashed",
|
|
1389
1420
|
label: "",
|
|
1390
1421
|
labelPosition: "center"
|
|
1391
|
-
}), /* @__PURE__ */ r(
|
|
1422
|
+
}), /* @__PURE__ */ r(P, {
|
|
1392
1423
|
name: "reset_password",
|
|
1393
|
-
control:
|
|
1424
|
+
control: l,
|
|
1394
1425
|
render: ({
|
|
1395
|
-
field:
|
|
1396
|
-
}) => /* @__PURE__ */ r(
|
|
1397
|
-
mb:
|
|
1398
|
-
size:
|
|
1426
|
+
field: d
|
|
1427
|
+
}) => /* @__PURE__ */ r(Ur, {
|
|
1428
|
+
mb: i.spacing,
|
|
1429
|
+
size: i.size,
|
|
1399
1430
|
label: "Reset password",
|
|
1400
|
-
checked:
|
|
1401
|
-
onChange: (
|
|
1431
|
+
checked: d.value,
|
|
1432
|
+
onChange: (O) => d.onChange(O.currentTarget.checked),
|
|
1402
1433
|
styles: {
|
|
1403
1434
|
label: {
|
|
1404
1435
|
verticalAlign: "middle"
|
|
1405
1436
|
}
|
|
1406
1437
|
}
|
|
1407
1438
|
})
|
|
1408
|
-
}),
|
|
1439
|
+
}), y && /* @__PURE__ */ r(P, {
|
|
1409
1440
|
name: "new_password",
|
|
1410
|
-
control:
|
|
1441
|
+
control: l,
|
|
1411
1442
|
render: ({
|
|
1412
|
-
field:
|
|
1413
|
-
}) => /* @__PURE__ */ r(
|
|
1443
|
+
field: d
|
|
1444
|
+
}) => /* @__PURE__ */ r(se, {
|
|
1414
1445
|
autoComplete: "off",
|
|
1415
|
-
mb:
|
|
1416
|
-
size:
|
|
1446
|
+
mb: i.spacing,
|
|
1447
|
+
size: i.size,
|
|
1417
1448
|
required: !0,
|
|
1418
1449
|
description: "Password must be at least 8 characters long",
|
|
1419
1450
|
label: "New Password",
|
|
1420
|
-
...
|
|
1451
|
+
...d
|
|
1421
1452
|
})
|
|
1422
|
-
}), /* @__PURE__ */ r(
|
|
1453
|
+
}), /* @__PURE__ */ r(j, {
|
|
1423
1454
|
position: "right",
|
|
1424
|
-
mt:
|
|
1425
|
-
children: /* @__PURE__ */ r(
|
|
1455
|
+
mt: i.spacing,
|
|
1456
|
+
children: /* @__PURE__ */ r(D, {
|
|
1426
1457
|
type: "submit",
|
|
1427
|
-
size:
|
|
1458
|
+
size: i.button.size,
|
|
1428
1459
|
children: "Submit"
|
|
1429
1460
|
})
|
|
1430
1461
|
})]
|
|
1431
1462
|
})
|
|
1432
1463
|
});
|
|
1433
1464
|
}
|
|
1434
|
-
function
|
|
1435
|
-
account:
|
|
1436
|
-
onSuccess:
|
|
1437
|
-
styles: s =
|
|
1465
|
+
function at({
|
|
1466
|
+
account: t,
|
|
1467
|
+
onSuccess: a,
|
|
1468
|
+
styles: s = W
|
|
1438
1469
|
}) {
|
|
1439
|
-
const [c,
|
|
1440
|
-
|
|
1470
|
+
const [c, u] = H.useState(!1), i = () => u(!0), l = () => u(!1), f = () => {
|
|
1471
|
+
a(), l();
|
|
1441
1472
|
};
|
|
1442
|
-
return /* @__PURE__ */
|
|
1443
|
-
children: [/* @__PURE__ */ r(
|
|
1473
|
+
return /* @__PURE__ */ w($, {
|
|
1474
|
+
children: [/* @__PURE__ */ r(oe, {
|
|
1444
1475
|
overflow: "inside",
|
|
1445
1476
|
opened: c,
|
|
1446
|
-
onClose: () =>
|
|
1447
|
-
title: `Editing ${
|
|
1477
|
+
onClose: () => u(!1),
|
|
1478
|
+
title: `Editing ${t.name}`,
|
|
1448
1479
|
trapFocus: !0,
|
|
1449
|
-
onDragStart: (
|
|
1450
|
-
|
|
1480
|
+
onDragStart: (v) => {
|
|
1481
|
+
v.stopPropagation();
|
|
1451
1482
|
},
|
|
1452
|
-
children: /* @__PURE__ */ r(
|
|
1453
|
-
...
|
|
1483
|
+
children: /* @__PURE__ */ r(nt, {
|
|
1484
|
+
...t,
|
|
1454
1485
|
postSubmit: f,
|
|
1455
1486
|
styles: s
|
|
1456
1487
|
})
|
|
1457
|
-
}), /* @__PURE__ */ r(
|
|
1488
|
+
}), /* @__PURE__ */ r(D, {
|
|
1458
1489
|
size: s.button.size,
|
|
1459
|
-
onClick:
|
|
1460
|
-
leftIcon: /* @__PURE__ */ r(
|
|
1490
|
+
onClick: i,
|
|
1491
|
+
leftIcon: /* @__PURE__ */ r(Mr, {
|
|
1461
1492
|
size: 20
|
|
1462
1493
|
}),
|
|
1463
1494
|
children: "Edit"
|
|
1464
1495
|
})]
|
|
1465
1496
|
});
|
|
1466
1497
|
}
|
|
1467
|
-
function
|
|
1468
|
-
styles:
|
|
1469
|
-
config:
|
|
1498
|
+
function bt({
|
|
1499
|
+
styles: t = W,
|
|
1500
|
+
config: a
|
|
1470
1501
|
}) {
|
|
1471
|
-
var
|
|
1502
|
+
var R, y;
|
|
1503
|
+
le(a);
|
|
1472
1504
|
const {
|
|
1473
1505
|
data: s = [],
|
|
1474
1506
|
loading: c,
|
|
1475
|
-
refresh:
|
|
1476
|
-
} =
|
|
1507
|
+
refresh: u
|
|
1508
|
+
} = G(async () => {
|
|
1477
1509
|
const {
|
|
1478
|
-
data:
|
|
1479
|
-
} = await
|
|
1480
|
-
return
|
|
1510
|
+
data: h
|
|
1511
|
+
} = await x.account.list();
|
|
1512
|
+
return h;
|
|
1481
1513
|
}, {
|
|
1482
1514
|
refreshDeps: []
|
|
1483
1515
|
}), {
|
|
1484
|
-
data:
|
|
1485
|
-
loading:
|
|
1486
|
-
} =
|
|
1487
|
-
label:
|
|
1488
|
-
value:
|
|
1489
|
-
description:
|
|
1490
|
-
disabled:
|
|
1516
|
+
data: i = [],
|
|
1517
|
+
loading: l
|
|
1518
|
+
} = G(async () => (await x.role.list()).map((d) => ({
|
|
1519
|
+
label: d.name,
|
|
1520
|
+
value: d.id,
|
|
1521
|
+
description: d.description,
|
|
1522
|
+
disabled: d.id === 50
|
|
1491
1523
|
})), {
|
|
1492
1524
|
refreshDeps: []
|
|
1493
|
-
}), f =
|
|
1494
|
-
var
|
|
1495
|
-
return (
|
|
1525
|
+
}), f = nr(() => i.reduce((h, d) => (h.set(d.value, d.label), h), /* @__PURE__ */ new Map()), [i]), v = (h) => {
|
|
1526
|
+
var d;
|
|
1527
|
+
return (d = f.get(h)) != null ? d : h;
|
|
1496
1528
|
};
|
|
1497
|
-
return
|
|
1498
|
-
children: [/* @__PURE__ */ r(
|
|
1499
|
-
pt:
|
|
1529
|
+
return /* @__PURE__ */ w($, {
|
|
1530
|
+
children: [/* @__PURE__ */ r(j, {
|
|
1531
|
+
pt: t.spacing,
|
|
1500
1532
|
position: "right",
|
|
1501
|
-
children: /* @__PURE__ */ r(
|
|
1502
|
-
onSuccess:
|
|
1503
|
-
initialRoleID: (
|
|
1533
|
+
children: /* @__PURE__ */ r(rt, {
|
|
1534
|
+
onSuccess: u,
|
|
1535
|
+
initialRoleID: (y = (R = i == null ? void 0 : i[0]) == null ? void 0 : R.value) != null ? y : 0
|
|
1504
1536
|
})
|
|
1505
|
-
}), /* @__PURE__ */
|
|
1506
|
-
mt:
|
|
1537
|
+
}), /* @__PURE__ */ w(L, {
|
|
1538
|
+
mt: t.spacing,
|
|
1507
1539
|
sx: {
|
|
1508
1540
|
position: "relative"
|
|
1509
1541
|
},
|
|
1510
|
-
children: [/* @__PURE__ */ r(
|
|
1511
|
-
visible: c ||
|
|
1512
|
-
}), /* @__PURE__ */
|
|
1513
|
-
horizontalSpacing:
|
|
1514
|
-
verticalSpacing:
|
|
1515
|
-
fontSize:
|
|
1542
|
+
children: [/* @__PURE__ */ r(_e, {
|
|
1543
|
+
visible: c || l
|
|
1544
|
+
}), /* @__PURE__ */ w(Pe, {
|
|
1545
|
+
horizontalSpacing: t.spacing,
|
|
1546
|
+
verticalSpacing: t.spacing,
|
|
1547
|
+
fontSize: t.size,
|
|
1516
1548
|
highlightOnHover: !0,
|
|
1517
1549
|
children: [/* @__PURE__ */ r("thead", {
|
|
1518
|
-
children: /* @__PURE__ */
|
|
1550
|
+
children: /* @__PURE__ */ w("tr", {
|
|
1519
1551
|
children: [/* @__PURE__ */ r("th", {
|
|
1520
1552
|
children: "Username"
|
|
1521
1553
|
}), /* @__PURE__ */ r("th", {
|
|
@@ -1527,78 +1559,78 @@ function dt({
|
|
|
1527
1559
|
})]
|
|
1528
1560
|
})
|
|
1529
1561
|
}), /* @__PURE__ */ r("tbody", {
|
|
1530
|
-
children: s.map((
|
|
1562
|
+
children: s.map((h) => {
|
|
1531
1563
|
const {
|
|
1532
|
-
id:
|
|
1533
|
-
name:
|
|
1534
|
-
email:
|
|
1535
|
-
role_id:
|
|
1536
|
-
} =
|
|
1537
|
-
return /* @__PURE__ */
|
|
1564
|
+
id: d,
|
|
1565
|
+
name: O,
|
|
1566
|
+
email: N,
|
|
1567
|
+
role_id: K
|
|
1568
|
+
} = h;
|
|
1569
|
+
return /* @__PURE__ */ w("tr", {
|
|
1538
1570
|
children: [/* @__PURE__ */ r("td", {
|
|
1539
1571
|
width: 200,
|
|
1540
|
-
children:
|
|
1572
|
+
children: O
|
|
1541
1573
|
}), /* @__PURE__ */ r("td", {
|
|
1542
1574
|
width: 200,
|
|
1543
|
-
children:
|
|
1575
|
+
children: N
|
|
1544
1576
|
}), /* @__PURE__ */ r("td", {
|
|
1545
1577
|
width: 200,
|
|
1546
|
-
children:
|
|
1578
|
+
children: v(K)
|
|
1547
1579
|
}), /* @__PURE__ */ r("td", {
|
|
1548
1580
|
width: 200,
|
|
1549
|
-
children: /* @__PURE__ */
|
|
1581
|
+
children: /* @__PURE__ */ w(j, {
|
|
1550
1582
|
position: "left",
|
|
1551
|
-
children: [/* @__PURE__ */ r(
|
|
1552
|
-
account:
|
|
1553
|
-
onSuccess:
|
|
1554
|
-
}), /* @__PURE__ */ r(
|
|
1555
|
-
id:
|
|
1556
|
-
name:
|
|
1557
|
-
onSuccess:
|
|
1583
|
+
children: [/* @__PURE__ */ r(at, {
|
|
1584
|
+
account: h,
|
|
1585
|
+
onSuccess: u
|
|
1586
|
+
}), /* @__PURE__ */ r(tt, {
|
|
1587
|
+
id: d,
|
|
1588
|
+
name: O,
|
|
1589
|
+
onSuccess: u
|
|
1558
1590
|
})]
|
|
1559
1591
|
})
|
|
1560
1592
|
})]
|
|
1561
|
-
},
|
|
1593
|
+
}, d);
|
|
1562
1594
|
})
|
|
1563
1595
|
})]
|
|
1564
1596
|
})]
|
|
1565
1597
|
})]
|
|
1566
1598
|
});
|
|
1567
1599
|
}
|
|
1568
|
-
function
|
|
1569
|
-
postSubmit:
|
|
1570
|
-
styles:
|
|
1600
|
+
function it({
|
|
1601
|
+
postSubmit: t,
|
|
1602
|
+
styles: a = W
|
|
1571
1603
|
}) {
|
|
1572
1604
|
const {
|
|
1573
1605
|
control: s,
|
|
1574
1606
|
handleSubmit: c
|
|
1575
|
-
} =
|
|
1607
|
+
} = ee({
|
|
1576
1608
|
defaultValues: {
|
|
1577
1609
|
name: "",
|
|
1578
1610
|
password: ""
|
|
1579
1611
|
}
|
|
1580
1612
|
});
|
|
1581
|
-
return /* @__PURE__ */ r(
|
|
1613
|
+
return /* @__PURE__ */ r(L, {
|
|
1582
1614
|
mx: "auto",
|
|
1583
|
-
children: /* @__PURE__ */
|
|
1615
|
+
children: /* @__PURE__ */ w("form", {
|
|
1584
1616
|
onSubmit: c(async ({
|
|
1585
|
-
name:
|
|
1586
|
-
password:
|
|
1617
|
+
name: i,
|
|
1618
|
+
password: l
|
|
1587
1619
|
}) => {
|
|
1588
1620
|
try {
|
|
1589
|
-
|
|
1621
|
+
M({
|
|
1590
1622
|
id: "for-login",
|
|
1591
1623
|
title: "Pending",
|
|
1592
1624
|
message: "Loggin in...",
|
|
1593
1625
|
loading: !0
|
|
1594
1626
|
});
|
|
1595
|
-
const f = await
|
|
1627
|
+
const f = await x.account.login(i, l);
|
|
1596
1628
|
window.localStorage.setItem("token", f.token), A({
|
|
1597
1629
|
id: "for-login",
|
|
1598
1630
|
title: "Successful",
|
|
1599
1631
|
message: "Logged in",
|
|
1600
1632
|
color: "green"
|
|
1601
|
-
}),
|
|
1633
|
+
}), t(f);
|
|
1602
1634
|
} catch (f) {
|
|
1603
1635
|
A({
|
|
1604
1636
|
id: "for-login",
|
|
@@ -1608,66 +1640,369 @@ function rt({
|
|
|
1608
1640
|
});
|
|
1609
1641
|
}
|
|
1610
1642
|
}),
|
|
1611
|
-
children: [/* @__PURE__ */ r(
|
|
1643
|
+
children: [/* @__PURE__ */ r(P, {
|
|
1612
1644
|
name: "name",
|
|
1613
1645
|
control: s,
|
|
1614
1646
|
render: ({
|
|
1615
|
-
field:
|
|
1616
|
-
}) => /* @__PURE__ */ r(
|
|
1617
|
-
mb:
|
|
1618
|
-
size:
|
|
1647
|
+
field: i
|
|
1648
|
+
}) => /* @__PURE__ */ r(I, {
|
|
1649
|
+
mb: a.spacing,
|
|
1650
|
+
size: a.size,
|
|
1619
1651
|
required: !0,
|
|
1620
1652
|
label: "Username",
|
|
1621
|
-
...
|
|
1653
|
+
...i
|
|
1622
1654
|
})
|
|
1623
|
-
}), /* @__PURE__ */ r(
|
|
1655
|
+
}), /* @__PURE__ */ r(P, {
|
|
1624
1656
|
name: "password",
|
|
1625
1657
|
control: s,
|
|
1626
1658
|
render: ({
|
|
1627
|
-
field:
|
|
1628
|
-
}) => /* @__PURE__ */ r(
|
|
1629
|
-
mb:
|
|
1630
|
-
size:
|
|
1659
|
+
field: i
|
|
1660
|
+
}) => /* @__PURE__ */ r(se, {
|
|
1661
|
+
mb: a.spacing,
|
|
1662
|
+
size: a.size,
|
|
1631
1663
|
required: !0,
|
|
1632
1664
|
label: "Password",
|
|
1633
|
-
...
|
|
1665
|
+
...i
|
|
1634
1666
|
})
|
|
1635
|
-
}), /* @__PURE__ */ r(
|
|
1667
|
+
}), /* @__PURE__ */ r(j, {
|
|
1636
1668
|
position: "right",
|
|
1637
|
-
mt:
|
|
1638
|
-
children: /* @__PURE__ */ r(
|
|
1669
|
+
mt: a.spacing,
|
|
1670
|
+
children: /* @__PURE__ */ r(D, {
|
|
1639
1671
|
type: "submit",
|
|
1640
|
-
size:
|
|
1672
|
+
size: a.button.size,
|
|
1641
1673
|
children: "Submit"
|
|
1642
1674
|
})
|
|
1643
1675
|
})]
|
|
1644
1676
|
})
|
|
1645
1677
|
});
|
|
1646
1678
|
}
|
|
1647
|
-
function
|
|
1648
|
-
styles:
|
|
1649
|
-
config:
|
|
1679
|
+
function wt({
|
|
1680
|
+
styles: t = W,
|
|
1681
|
+
config: a,
|
|
1650
1682
|
onSuccess: s
|
|
1651
1683
|
}) {
|
|
1652
|
-
return
|
|
1653
|
-
children: /* @__PURE__ */ r(
|
|
1654
|
-
mt:
|
|
1684
|
+
return le(a), /* @__PURE__ */ r($, {
|
|
1685
|
+
children: /* @__PURE__ */ r(L, {
|
|
1686
|
+
mt: t.spacing,
|
|
1655
1687
|
sx: {
|
|
1656
1688
|
position: "relative"
|
|
1657
1689
|
},
|
|
1658
|
-
children: /* @__PURE__ */ r(
|
|
1659
|
-
styles:
|
|
1690
|
+
children: /* @__PURE__ */ r(it, {
|
|
1691
|
+
styles: t,
|
|
1660
1692
|
postSubmit: s
|
|
1661
1693
|
})
|
|
1662
1694
|
})
|
|
1663
1695
|
});
|
|
1664
1696
|
}
|
|
1697
|
+
const fe = {
|
|
1698
|
+
size: "sm",
|
|
1699
|
+
spacing: "md",
|
|
1700
|
+
button: {
|
|
1701
|
+
size: "xs"
|
|
1702
|
+
}
|
|
1703
|
+
};
|
|
1704
|
+
function ot({
|
|
1705
|
+
postSubmit: t,
|
|
1706
|
+
styles: a = fe,
|
|
1707
|
+
initialRoleID: s
|
|
1708
|
+
}) {
|
|
1709
|
+
const {
|
|
1710
|
+
control: c,
|
|
1711
|
+
handleSubmit: u
|
|
1712
|
+
} = ee({
|
|
1713
|
+
defaultValues: {
|
|
1714
|
+
name: "",
|
|
1715
|
+
role_id: s,
|
|
1716
|
+
domain: ""
|
|
1717
|
+
}
|
|
1718
|
+
});
|
|
1719
|
+
return /* @__PURE__ */ r(L, {
|
|
1720
|
+
mx: "auto",
|
|
1721
|
+
children: /* @__PURE__ */ w("form", {
|
|
1722
|
+
onSubmit: u(async ({
|
|
1723
|
+
name: l,
|
|
1724
|
+
role_id: f,
|
|
1725
|
+
domain: v
|
|
1726
|
+
}) => {
|
|
1727
|
+
try {
|
|
1728
|
+
M({
|
|
1729
|
+
id: "for-creating",
|
|
1730
|
+
title: "Pending",
|
|
1731
|
+
message: "Adding API Key...",
|
|
1732
|
+
loading: !0
|
|
1733
|
+
});
|
|
1734
|
+
const R = await x.api_key.create(l, f, v);
|
|
1735
|
+
A({
|
|
1736
|
+
id: "for-creating",
|
|
1737
|
+
title: "Successful",
|
|
1738
|
+
message: "API Key is added",
|
|
1739
|
+
color: "green"
|
|
1740
|
+
}), t(R);
|
|
1741
|
+
} catch (R) {
|
|
1742
|
+
A({
|
|
1743
|
+
id: "for-creating",
|
|
1744
|
+
title: "Failed",
|
|
1745
|
+
message: R.message,
|
|
1746
|
+
color: "red"
|
|
1747
|
+
});
|
|
1748
|
+
}
|
|
1749
|
+
}),
|
|
1750
|
+
children: [/* @__PURE__ */ r(P, {
|
|
1751
|
+
name: "name",
|
|
1752
|
+
control: c,
|
|
1753
|
+
render: ({
|
|
1754
|
+
field: l
|
|
1755
|
+
}) => /* @__PURE__ */ r(I, {
|
|
1756
|
+
mb: a.spacing,
|
|
1757
|
+
size: a.size,
|
|
1758
|
+
required: !0,
|
|
1759
|
+
label: "Name",
|
|
1760
|
+
...l
|
|
1761
|
+
})
|
|
1762
|
+
}), /* @__PURE__ */ r(P, {
|
|
1763
|
+
name: "domain",
|
|
1764
|
+
control: c,
|
|
1765
|
+
render: ({
|
|
1766
|
+
field: l
|
|
1767
|
+
}) => /* @__PURE__ */ r(I, {
|
|
1768
|
+
mb: a.spacing,
|
|
1769
|
+
size: a.size,
|
|
1770
|
+
required: !0,
|
|
1771
|
+
label: "Domain",
|
|
1772
|
+
...l
|
|
1773
|
+
})
|
|
1774
|
+
}), /* @__PURE__ */ r(P, {
|
|
1775
|
+
name: "role_id",
|
|
1776
|
+
control: c,
|
|
1777
|
+
render: ({
|
|
1778
|
+
field: l
|
|
1779
|
+
}) => /* @__PURE__ */ r(Te, {
|
|
1780
|
+
styles: a,
|
|
1781
|
+
...l
|
|
1782
|
+
})
|
|
1783
|
+
}), /* @__PURE__ */ r(j, {
|
|
1784
|
+
position: "right",
|
|
1785
|
+
mt: a.spacing,
|
|
1786
|
+
children: /* @__PURE__ */ r(D, {
|
|
1787
|
+
type: "submit",
|
|
1788
|
+
size: a.button.size,
|
|
1789
|
+
children: "Save"
|
|
1790
|
+
})
|
|
1791
|
+
})]
|
|
1792
|
+
})
|
|
1793
|
+
});
|
|
1794
|
+
}
|
|
1795
|
+
function st({
|
|
1796
|
+
onSuccess: t,
|
|
1797
|
+
styles: a = fe,
|
|
1798
|
+
initialRoleID: s
|
|
1799
|
+
}) {
|
|
1800
|
+
const c = ce(), [u, i] = H.useState(!1), l = () => i(!0), f = () => i(!1);
|
|
1801
|
+
return /* @__PURE__ */ w($, {
|
|
1802
|
+
children: [/* @__PURE__ */ r(oe, {
|
|
1803
|
+
overflow: "inside",
|
|
1804
|
+
opened: u,
|
|
1805
|
+
onClose: () => i(!1),
|
|
1806
|
+
title: "Add an API Key",
|
|
1807
|
+
trapFocus: !0,
|
|
1808
|
+
onDragStart: (R) => {
|
|
1809
|
+
R.stopPropagation();
|
|
1810
|
+
},
|
|
1811
|
+
children: /* @__PURE__ */ r(ot, {
|
|
1812
|
+
postSubmit: (R) => {
|
|
1813
|
+
f(), c.openModal({
|
|
1814
|
+
title: "API Key is generated",
|
|
1815
|
+
children: /* @__PURE__ */ w(rr, {
|
|
1816
|
+
children: [/* @__PURE__ */ r(I, {
|
|
1817
|
+
defaultValue: R,
|
|
1818
|
+
disabled: !0,
|
|
1819
|
+
label: "Generated API Key",
|
|
1820
|
+
description: "Make sure you save it - you won't be able to access it again.",
|
|
1821
|
+
styles: {
|
|
1822
|
+
input: {
|
|
1823
|
+
cursor: "text !important"
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
}), /* @__PURE__ */ r(D, {
|
|
1827
|
+
size: "sm",
|
|
1828
|
+
onClick: () => {
|
|
1829
|
+
Wr(), t();
|
|
1830
|
+
},
|
|
1831
|
+
children: "I've saved this API Key"
|
|
1832
|
+
})]
|
|
1833
|
+
})
|
|
1834
|
+
});
|
|
1835
|
+
},
|
|
1836
|
+
styles: a,
|
|
1837
|
+
initialRoleID: s
|
|
1838
|
+
})
|
|
1839
|
+
}), /* @__PURE__ */ r(D, {
|
|
1840
|
+
size: a.button.size,
|
|
1841
|
+
onClick: l,
|
|
1842
|
+
leftIcon: /* @__PURE__ */ r(Ee, {
|
|
1843
|
+
size: 20
|
|
1844
|
+
}),
|
|
1845
|
+
children: "Add an API Key"
|
|
1846
|
+
})]
|
|
1847
|
+
});
|
|
1848
|
+
}
|
|
1849
|
+
function ct({
|
|
1850
|
+
id: t,
|
|
1851
|
+
name: a,
|
|
1852
|
+
onSuccess: s,
|
|
1853
|
+
styles: c = fe
|
|
1854
|
+
}) {
|
|
1855
|
+
const u = ce(), i = async () => {
|
|
1856
|
+
if (!!t) {
|
|
1857
|
+
M({
|
|
1858
|
+
id: "for-deleting",
|
|
1859
|
+
title: "Pending",
|
|
1860
|
+
message: "Deleting API Key...",
|
|
1861
|
+
loading: !0
|
|
1862
|
+
});
|
|
1863
|
+
try {
|
|
1864
|
+
await x.api_key.delete(t), A({
|
|
1865
|
+
id: "for-deleting",
|
|
1866
|
+
title: "Successful",
|
|
1867
|
+
message: `API Key [${a}] is deleted`,
|
|
1868
|
+
color: "green"
|
|
1869
|
+
}), s();
|
|
1870
|
+
} catch (f) {
|
|
1871
|
+
A({
|
|
1872
|
+
id: "for-deleting",
|
|
1873
|
+
title: "Failed",
|
|
1874
|
+
message: f.message,
|
|
1875
|
+
color: "red"
|
|
1876
|
+
});
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
}, l = () => u.openConfirmModal({
|
|
1880
|
+
title: "Delete this api-key?",
|
|
1881
|
+
labels: {
|
|
1882
|
+
confirm: "Confirm",
|
|
1883
|
+
cancel: "Cancel"
|
|
1884
|
+
},
|
|
1885
|
+
onCancel: () => console.log("Cancel"),
|
|
1886
|
+
onConfirm: i
|
|
1887
|
+
});
|
|
1888
|
+
return /* @__PURE__ */ r(D, {
|
|
1889
|
+
size: c.button.size,
|
|
1890
|
+
color: "red",
|
|
1891
|
+
onClick: l,
|
|
1892
|
+
leftIcon: /* @__PURE__ */ r(Ce, {
|
|
1893
|
+
size: 20
|
|
1894
|
+
}),
|
|
1895
|
+
children: "Delete"
|
|
1896
|
+
});
|
|
1897
|
+
}
|
|
1898
|
+
function St({
|
|
1899
|
+
styles: t = fe,
|
|
1900
|
+
config: a
|
|
1901
|
+
}) {
|
|
1902
|
+
var R, y;
|
|
1903
|
+
le(a);
|
|
1904
|
+
const {
|
|
1905
|
+
data: s = [],
|
|
1906
|
+
loading: c,
|
|
1907
|
+
refresh: u
|
|
1908
|
+
} = G(async () => {
|
|
1909
|
+
const {
|
|
1910
|
+
data: h
|
|
1911
|
+
} = await x.api_key.list();
|
|
1912
|
+
return h;
|
|
1913
|
+
}, {
|
|
1914
|
+
refreshDeps: []
|
|
1915
|
+
}), {
|
|
1916
|
+
data: i = [],
|
|
1917
|
+
loading: l
|
|
1918
|
+
} = G(async () => (await x.role.list()).map((d) => ({
|
|
1919
|
+
label: d.name,
|
|
1920
|
+
value: d.id,
|
|
1921
|
+
description: d.description,
|
|
1922
|
+
disabled: d.id === 50
|
|
1923
|
+
})), {
|
|
1924
|
+
refreshDeps: []
|
|
1925
|
+
}), f = nr(() => i.reduce((h, d) => (h.set(d.value, d.label), h), /* @__PURE__ */ new Map()), [i]), v = (h) => {
|
|
1926
|
+
var d;
|
|
1927
|
+
return (d = f.get(h)) != null ? d : h;
|
|
1928
|
+
};
|
|
1929
|
+
return /* @__PURE__ */ w($, {
|
|
1930
|
+
children: [/* @__PURE__ */ r(j, {
|
|
1931
|
+
pt: t.spacing,
|
|
1932
|
+
position: "right",
|
|
1933
|
+
children: /* @__PURE__ */ r(st, {
|
|
1934
|
+
onSuccess: u,
|
|
1935
|
+
initialRoleID: (y = (R = i == null ? void 0 : i[0]) == null ? void 0 : R.value) != null ? y : 0
|
|
1936
|
+
})
|
|
1937
|
+
}), /* @__PURE__ */ w(L, {
|
|
1938
|
+
mt: t.spacing,
|
|
1939
|
+
sx: {
|
|
1940
|
+
position: "relative"
|
|
1941
|
+
},
|
|
1942
|
+
children: [/* @__PURE__ */ r(_e, {
|
|
1943
|
+
visible: c || l
|
|
1944
|
+
}), /* @__PURE__ */ w(Pe, {
|
|
1945
|
+
horizontalSpacing: t.spacing,
|
|
1946
|
+
verticalSpacing: t.spacing,
|
|
1947
|
+
fontSize: t.size,
|
|
1948
|
+
highlightOnHover: !0,
|
|
1949
|
+
children: [/* @__PURE__ */ r("thead", {
|
|
1950
|
+
children: /* @__PURE__ */ w("tr", {
|
|
1951
|
+
children: [/* @__PURE__ */ r("th", {
|
|
1952
|
+
children: "Name"
|
|
1953
|
+
}), /* @__PURE__ */ r("th", {
|
|
1954
|
+
children: "Domain"
|
|
1955
|
+
}), /* @__PURE__ */ r("th", {
|
|
1956
|
+
children: "Role"
|
|
1957
|
+
}), /* @__PURE__ */ r("th", {
|
|
1958
|
+
children: "Action"
|
|
1959
|
+
})]
|
|
1960
|
+
})
|
|
1961
|
+
}), /* @__PURE__ */ r("tbody", {
|
|
1962
|
+
children: s.map((h) => {
|
|
1963
|
+
const {
|
|
1964
|
+
id: d,
|
|
1965
|
+
name: O,
|
|
1966
|
+
domain: N,
|
|
1967
|
+
role_id: K
|
|
1968
|
+
} = h;
|
|
1969
|
+
return /* @__PURE__ */ w("tr", {
|
|
1970
|
+
children: [/* @__PURE__ */ r("td", {
|
|
1971
|
+
width: 200,
|
|
1972
|
+
children: O
|
|
1973
|
+
}), /* @__PURE__ */ r("td", {
|
|
1974
|
+
width: 200,
|
|
1975
|
+
children: N
|
|
1976
|
+
}), /* @__PURE__ */ r("td", {
|
|
1977
|
+
width: 200,
|
|
1978
|
+
children: v(K)
|
|
1979
|
+
}), /* @__PURE__ */ r("td", {
|
|
1980
|
+
width: 200,
|
|
1981
|
+
children: /* @__PURE__ */ r(j, {
|
|
1982
|
+
position: "left",
|
|
1983
|
+
children: /* @__PURE__ */ r(ct, {
|
|
1984
|
+
id: d,
|
|
1985
|
+
name: O,
|
|
1986
|
+
onSuccess: u
|
|
1987
|
+
})
|
|
1988
|
+
})
|
|
1989
|
+
})]
|
|
1990
|
+
}, d);
|
|
1991
|
+
})
|
|
1992
|
+
})]
|
|
1993
|
+
})]
|
|
1994
|
+
})]
|
|
1995
|
+
});
|
|
1996
|
+
}
|
|
1665
1997
|
export {
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1998
|
+
St as APIKeyList,
|
|
1999
|
+
bt as AccountList,
|
|
2000
|
+
st as AddAPIKey,
|
|
2001
|
+
rt as AddAccount,
|
|
2002
|
+
Xr as AddDataSource,
|
|
2003
|
+
vt as DataSourceList,
|
|
2004
|
+
ct as DeleteAPIKey,
|
|
2005
|
+
tt as DeleteAccount,
|
|
2006
|
+
Qr as DeleteDataSource,
|
|
2007
|
+
wt as Login
|
|
1673
2008
|
};
|