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