@devtable/settings-form 13.43.13 → 13.44.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.
@@ -1,19 +1,19 @@
1
- import G, { forwardRef as ct, useEffect as Me, Suspense as Rn, useState as Ut } from "react";
1
+ import G, { forwardRef as ct, useEffect as Me, Suspense as An, useState as Ut } from "react";
2
2
  import { Box as M, Alert as Ht, Button as O, Loader as On, TextInput as I, Divider as Fe, Group as D, NumberInput as $n, PasswordInput as Le, Modal as ne, Stack as Ce, SegmentedControl as kn, ActionIcon as Yt, Text as ie, Tooltip as at, LoadingOverlay as qe, Table as h, Select as In, Switch as Mn, HoverCard as tt } from "@mantine/core";
3
3
  import { showNotification as Y, updateNotification as E } from "@mantine/notifications";
4
- import { IconAlertCircle as Fn, IconDeviceFloppy as Vt, IconMathFunction as Ln, IconRecycle as qn, IconPlaylistAdd as Ne, IconNetwork as Nn, IconBrandMysql as Un, IconDatabase as Hn, IconLock as Wt, IconTrash as Ue, IconEdit as $e, IconEye as Yn } from "@tabler/icons-react";
5
- import { Trans as Vn, useTranslation as C, initReactI18next as Wn, I18nextProvider as Bn } from "react-i18next";
6
- import * as Kn from "crypto-js";
7
- import Gn from "lodash";
4
+ import { IconAlertCircle as Fn, IconDeviceFloppy as Vt, IconMathFunction as Ln, IconRecycle as qn, IconPlaylistAdd as Ne, IconNetwork as Nn, IconBrandMysql as Un, IconDatabase as Hn, IconTopologyRing3 as Yn, IconLock as Wt, IconTrash as Ue, IconEdit as $e, IconEye as Vn } from "@tabler/icons-react";
5
+ import { Trans as Wn, useTranslation as C, initReactI18next as Bn, I18nextProvider as Kn } from "react-i18next";
6
+ import * as Gn from "crypto-js";
7
+ import Jn from "lodash";
8
8
  import It from "axios";
9
- import { useForm as J, Controller as y } from "react-hook-form";
9
+ import { useForm as J, Controller as w } from "react-hook-form";
10
10
  import Bt, { loader as nt } from "@monaco-editor/react";
11
- import { createInstance as Jn } from "i18next";
12
- import Qn from "i18next-browser-languagedetector";
11
+ import { createInstance as Qn } from "i18next";
12
+ import Xn from "i18next-browser-languagedetector";
13
13
  import "intl-pluralrules";
14
- import { useBoolean as Xn, useRequest as ce } from "ahooks";
15
- import { useModals as Te, closeAllModals as Zn } from "@mantine/modals";
16
- import { CodeHighlight as er } from "@mantine/code-highlight";
14
+ import { useBoolean as Zn, useRequest as ce } from "ahooks";
15
+ import { useModals as Te, closeAllModals as er } from "@mantine/modals";
16
+ import { CodeHighlight as tr } from "@mantine/code-highlight";
17
17
  var st = { exports: {} }, _e = {};
18
18
  /**
19
19
  * @license React
@@ -25,7 +25,7 @@ var st = { exports: {} }, _e = {};
25
25
  * LICENSE file in the root directory of this source tree.
26
26
  */
27
27
  var Mt;
28
- function tr() {
28
+ function nr() {
29
29
  if (Mt)
30
30
  return _e;
31
31
  Mt = 1;
@@ -53,7 +53,7 @@ var Se = {};
53
53
  * LICENSE file in the root directory of this source tree.
54
54
  */
55
55
  var Ft;
56
- function nr() {
56
+ function rr() {
57
57
  return Ft || (Ft = 1, process.env.NODE_ENV !== "production" && function() {
58
58
  var a = G, t = Symbol.for("react.element"), s = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), L = Symbol.iterator, V = "@@iterator";
59
59
  function X(r) {
@@ -63,7 +63,7 @@ function nr() {
63
63
  return typeof u == "function" ? u : null;
64
64
  }
65
65
  var q = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
66
- function w(r) {
66
+ function y(r) {
67
67
  {
68
68
  for (var u = arguments.length, p = new Array(u > 1 ? u - 1 : 0), g = 1; g < u; g++)
69
69
  p[g - 1] = arguments[g];
@@ -102,7 +102,7 @@ function nr() {
102
102
  function B(r) {
103
103
  if (r == null)
104
104
  return null;
105
- if (typeof r.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
105
+ if (typeof r.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
106
106
  return r.displayName || r.name || null;
107
107
  if (typeof r == "string")
108
108
  return r;
@@ -203,7 +203,7 @@ function nr() {
203
203
  })
204
204
  });
205
205
  }
206
- je < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
206
+ je < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
207
207
  }
208
208
  }
209
209
  var We = q.ReactCurrentDispatcher, Be;
@@ -275,18 +275,18 @@ function nr() {
275
275
  if (U && g && typeof U.stack == "string") {
276
276
  for (var v = U.stack.split(`
277
277
  `), N = g.stack.split(`
278
- `), P = v.length - 1, R = N.length - 1; P >= 1 && R >= 0 && v[P] !== N[R]; )
279
- R--;
280
- for (; P >= 1 && R >= 0; P--, R--)
281
- if (v[P] !== N[R]) {
282
- if (P !== 1 || R !== 1)
278
+ `), P = v.length - 1, A = N.length - 1; P >= 1 && A >= 0 && v[P] !== N[A]; )
279
+ A--;
280
+ for (; P >= 1 && A >= 0; P--, A--)
281
+ if (v[P] !== N[A]) {
282
+ if (P !== 1 || A !== 1)
283
283
  do
284
- if (P--, R--, R < 0 || v[P] !== N[R]) {
284
+ if (P--, A--, A < 0 || v[P] !== N[A]) {
285
285
  var H = `
286
286
  ` + v[P].replace(" at new ", " at ");
287
287
  return r.displayName && H.includes("<anonymous>") && (H = H.replace("<anonymous>", r.displayName)), typeof r == "function" && Ee.set(r, H), H;
288
288
  }
289
- while (P >= 1 && R >= 0);
289
+ while (P >= 1 && A >= 0);
290
290
  break;
291
291
  }
292
292
  }
@@ -332,13 +332,13 @@ function nr() {
332
332
  }
333
333
  return "";
334
334
  }
335
- var ve = Object.prototype.hasOwnProperty, wt = {}, yt = q.ReactDebugCurrentFrame;
336
- function Ae(r) {
335
+ var ve = Object.prototype.hasOwnProperty, yt = {}, wt = q.ReactDebugCurrentFrame;
336
+ function Re(r) {
337
337
  if (r) {
338
338
  var u = r._owner, p = Pe(r.type, r._source, u ? u.type : null);
339
- yt.setExtraStackFrame(p);
339
+ wt.setExtraStackFrame(p);
340
340
  } else
341
- yt.setExtraStackFrame(null);
341
+ wt.setExtraStackFrame(null);
342
342
  }
343
343
  function dn(r, u, p, g, _) {
344
344
  {
@@ -355,7 +355,7 @@ function nr() {
355
355
  } catch (P) {
356
356
  v = P;
357
357
  }
358
- v && !(v instanceof Error) && (Ae(_), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", p, b, typeof v), Ae(null)), v instanceof Error && !(v.message in wt) && (wt[v.message] = !0, Ae(_), w("Failed %s type: %s", p, v.message), Ae(null));
358
+ v && !(v instanceof Error) && (Re(_), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", p, b, typeof v), Re(null)), v instanceof Error && !(v.message in yt) && (yt[v.message] = !0, Re(_), y("Failed %s type: %s", p, v.message), Re(null));
359
359
  }
360
360
  }
361
361
  }
@@ -381,7 +381,7 @@ function nr() {
381
381
  }
382
382
  function Tt(r) {
383
383
  if (pn(r))
384
- return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", fn(r)), Ct(r);
384
+ return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", fn(r)), Ct(r);
385
385
  }
386
386
  var be = q.ReactCurrentOwner, mn = {
387
387
  key: !0,
@@ -409,13 +409,13 @@ function nr() {
409
409
  function xn(r, u) {
410
410
  if (typeof r.ref == "string" && be.current && u && be.current.stateNode !== u) {
411
411
  var p = B(be.current.type);
412
- Je[p] || (w('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', B(be.current.type), r.ref), Je[p] = !0);
412
+ Je[p] || (y('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', B(be.current.type), r.ref), Je[p] = !0);
413
413
  }
414
414
  }
415
415
  function jn(r, u) {
416
416
  {
417
417
  var p = function() {
418
- zt || (zt = !0, w("%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)", u));
418
+ zt || (zt = !0, y("%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)", u));
419
419
  };
420
420
  p.isReactWarning = !0, Object.defineProperty(r, "key", {
421
421
  get: p,
@@ -426,7 +426,7 @@ function nr() {
426
426
  function vn(r, u) {
427
427
  {
428
428
  var p = function() {
429
- Dt || (Dt = !0, w("%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)", u));
429
+ Dt || (Dt = !0, y("%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)", u));
430
430
  };
431
431
  p.isReactWarning = !0, Object.defineProperty(r, "ref", {
432
432
  get: p,
@@ -475,8 +475,8 @@ function nr() {
475
475
  b[z] === void 0 && (b[z] = P[z]);
476
476
  }
477
477
  if (v || N) {
478
- var R = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
479
- v && jn(b, R), N && vn(b, R);
478
+ var A = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
479
+ v && jn(b, A), N && vn(b, A);
480
480
  }
481
481
  return bn(r, v, N, _, g, be.current, b);
482
482
  }
@@ -517,8 +517,8 @@ Check your code at ` + u + ":" + p + ".";
517
517
  return "";
518
518
  }
519
519
  }
520
- var At = {};
521
- function wn(r) {
520
+ var Rt = {};
521
+ function yn(r) {
522
522
  {
523
523
  var u = Pt();
524
524
  if (!u) {
@@ -530,17 +530,17 @@ Check the top-level render call using <` + p + ">.");
530
530
  return u;
531
531
  }
532
532
  }
533
- function Rt(r, u) {
533
+ function At(r, u) {
534
534
  {
535
535
  if (!r._store || r._store.validated || r.key != null)
536
536
  return;
537
537
  r._store.validated = !0;
538
- var p = wn(u);
539
- if (At[p])
538
+ var p = yn(u);
539
+ if (Rt[p])
540
540
  return;
541
- At[p] = !0;
541
+ Rt[p] = !0;
542
542
  var g = "";
543
- r && r._owner && r._owner !== Qe.current && (g = " It was passed a child from " + B(r._owner.type) + "."), de(r), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, g), de(null);
543
+ r && r._owner && r._owner !== Qe.current && (g = " It was passed a child from " + B(r._owner.type) + "."), de(r), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, g), de(null);
544
544
  }
545
545
  }
546
546
  function Ot(r, u) {
@@ -550,7 +550,7 @@ Check the top-level render call using <` + p + ">.");
550
550
  if (Ge(r))
551
551
  for (var p = 0; p < r.length; p++) {
552
552
  var g = r[p];
553
- Ze(g) && Rt(g, u);
553
+ Ze(g) && At(g, u);
554
554
  }
555
555
  else if (Ze(r))
556
556
  r._store && (r._store.validated = !0);
@@ -558,11 +558,11 @@ Check the top-level render call using <` + p + ">.");
558
558
  var _ = X(r);
559
559
  if (typeof _ == "function" && _ !== r.entries)
560
560
  for (var z = _.call(r), b; !(b = z.next()).done; )
561
- Ze(b.value) && Rt(b.value, u);
561
+ Ze(b.value) && At(b.value, u);
562
562
  }
563
563
  }
564
564
  }
565
- function yn(r) {
565
+ function wn(r) {
566
566
  {
567
567
  var u = r.type;
568
568
  if (u == null || typeof u == "string")
@@ -582,9 +582,9 @@ Check the top-level render call using <` + p + ">.");
582
582
  } else if (u.PropTypes !== void 0 && !Xe) {
583
583
  Xe = !0;
584
584
  var _ = B(u);
585
- w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _ || "Unknown");
585
+ y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _ || "Unknown");
586
586
  }
587
- typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
587
+ typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
588
588
  }
589
589
  }
590
590
  function Cn(r) {
@@ -592,11 +592,11 @@ Check the top-level render call using <` + p + ">.");
592
592
  for (var u = Object.keys(r.props), p = 0; p < u.length; p++) {
593
593
  var g = u[p];
594
594
  if (g !== "children" && g !== "key") {
595
- de(r), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), de(null);
595
+ de(r), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), de(null);
596
596
  break;
597
597
  }
598
598
  }
599
- r.ref !== null && (de(r), w("Invalid attribute `ref` supplied to `React.Fragment`."), de(null));
599
+ r.ref !== null && (de(r), y("Invalid attribute `ref` supplied to `React.Fragment`."), de(null));
600
600
  }
601
601
  }
602
602
  var $t = {};
@@ -609,11 +609,11 @@ Check the top-level render call using <` + p + ">.");
609
609
  var N = Sn(_);
610
610
  N ? v += N : v += Pt();
611
611
  var P;
612
- r === null ? P = "null" : Ge(r) ? P = "array" : r !== void 0 && r.$$typeof === t ? (P = "<" + (B(r.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : P = typeof r, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", P, v);
612
+ r === null ? P = "null" : Ge(r) ? P = "array" : r !== void 0 && r.$$typeof === t ? (P = "<" + (B(r.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : P = typeof r, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", P, v);
613
613
  }
614
- var R = _n(r, u, p, _, z);
615
- if (R == null)
616
- return R;
614
+ var A = _n(r, u, p, _, z);
615
+ if (A == null)
616
+ return A;
617
617
  if (b) {
618
618
  var H = u.children;
619
619
  if (H !== void 0)
@@ -623,17 +623,17 @@ Check the top-level render call using <` + p + ">.");
623
623
  Ot(H[ue], r);
624
624
  Object.freeze && Object.freeze(H);
625
625
  } else
626
- w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
626
+ y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
627
627
  else
628
628
  Ot(H, r);
629
629
  }
630
630
  if (ve.call(u, "key")) {
631
- var se = B(r), U = Object.keys(u).filter(function(An) {
632
- return An !== "key";
631
+ var se = B(r), U = Object.keys(u).filter(function(Rn) {
632
+ return Rn !== "key";
633
633
  }), et = U.length > 0 ? "{key: someKey, " + U.join(": ..., ") + ": ...}" : "{key: someKey}";
634
634
  if (!$t[se + et]) {
635
635
  var Pn = U.length > 0 ? "{" + U.join(": ..., ") + ": ...}" : "{}";
636
- w(`A props object containing a "key" prop is being spread into JSX:
636
+ y(`A props object containing a "key" prop is being spread into JSX:
637
637
  let props = %s;
638
638
  <%s {...props} />
639
639
  React keys must be passed directly to JSX without using spread:
@@ -641,7 +641,7 @@ React keys must be passed directly to JSX without using spread:
641
641
  <%s key={someKey} {...props} />`, et, se, Pn, se), $t[se + et] = !0;
642
642
  }
643
643
  }
644
- return r === n ? Cn(R) : yn(R), R;
644
+ return r === n ? Cn(A) : wn(A), A;
645
645
  }
646
646
  }
647
647
  function Tn(r, u, p) {
@@ -654,9 +654,9 @@ React keys must be passed directly to JSX without using spread:
654
654
  Se.Fragment = n, Se.jsx = Dn, Se.jsxs = En;
655
655
  }()), Se;
656
656
  }
657
- process.env.NODE_ENV === "production" ? st.exports = tr() : st.exports = nr();
657
+ process.env.NODE_ENV === "production" ? st.exports = nr() : st.exports = rr();
658
658
  var e = st.exports;
659
- function rr(a) {
659
+ function ar(a) {
660
660
  a = a || {};
661
661
  const t = Object.keys(a).sort(), s = [];
662
662
  for (let n = 0; n < t.length; n++) {
@@ -673,11 +673,11 @@ function rr(a) {
673
673
  }
674
674
  return s.sort().join("&");
675
675
  }
676
- function ar(a, t) {
677
- let s = rr(a);
678
- return s += "&key=" + t, Kn.MD5(s).toString().toUpperCase();
676
+ function sr(a, t) {
677
+ let s = ar(a);
678
+ return s += "&key=" + t, Gn.MD5(s).toString().toUpperCase();
679
679
  }
680
- class sr {
680
+ class or {
681
681
  constructor() {
682
682
  this.type = "default_api_client", this.baseURL = "http://localhost:31200", this.app_id = "", this.app_secret = "";
683
683
  }
@@ -688,7 +688,7 @@ class sr {
688
688
  return {
689
689
  app_id: this.app_id,
690
690
  nonce_str: s,
691
- sign: ar({
691
+ sign: sr({
692
692
  app_id: this.app_id,
693
693
  nonce_str: s,
694
694
  ...t
@@ -701,7 +701,7 @@ class sr {
701
701
  return It(d).then((f) => l ? f : f.data).catch((f) => {
702
702
  if (It.isCancel(f))
703
703
  return Promise.reject(f);
704
- const m = f, x = Gn.get(m, "response.data.detail.message", m.message);
704
+ const m = f, x = Jn.get(m, "response.data.detail.message", m.message);
705
705
  return Promise.reject(new Error(x));
706
706
  });
707
707
  };
@@ -736,7 +736,7 @@ class sr {
736
736
  };
737
737
  }
738
738
  }
739
- class or {
739
+ class ir {
740
740
  constructor(t) {
741
741
  this.implementation = t;
742
742
  }
@@ -753,19 +753,19 @@ class or {
753
753
  return this.getRequest("PUT", t);
754
754
  }
755
755
  }
756
- const we = new sr(), ir = new or(we), A = ir;
757
- function cr(a) {
758
- we.baseURL !== a.apiBaseURL && (we.baseURL = a.apiBaseURL), a.app_id && (we.app_id = a.app_id), a.app_secret && (we.app_secret = a.app_secret);
756
+ const ye = new or(), cr = new ir(ye), R = cr;
757
+ function lr(a) {
758
+ ye.baseURL !== a.apiBaseURL && (ye.baseURL = a.apiBaseURL), a.app_id && (ye.app_id = a.app_id), a.app_secret && (ye.app_secret = a.app_secret);
759
759
  }
760
- const lr = {
760
+ const dr = {
761
761
  login: async (a, t) => {
762
762
  const s = {
763
763
  name: a,
764
764
  password: t
765
765
  };
766
- return await A.post()("/account/login", s, {});
766
+ return await R.post()("/account/login", s, {});
767
767
  },
768
- list: async () => await A.post()("/account/list", {
768
+ list: async () => await R.post()("/account/list", {
769
769
  filter: {},
770
770
  sort: [{
771
771
  field: "name",
@@ -779,7 +779,7 @@ const lr = {
779
779
  /**
780
780
  * get current account
781
781
  */
782
- get: async () => await A.get()("/account/get", {}, {}),
782
+ get: async () => await R.get()("/account/get", {}, {}),
783
783
  /**
784
784
  * update current account
785
785
  */
@@ -788,7 +788,7 @@ const lr = {
788
788
  name: a.trim(),
789
789
  email: t.trim()
790
790
  };
791
- return await A.put()("/account/update", s, {});
791
+ return await R.put()("/account/update", s, {});
792
792
  },
793
793
  /**
794
794
  * change current account's password
@@ -798,23 +798,23 @@ const lr = {
798
798
  old_password: a.trim(),
799
799
  new_password: t.trim()
800
800
  };
801
- return await A.post()("/account/changepassword", s, {});
801
+ return await R.post()("/account/changepassword", s, {});
802
802
  },
803
- create: async (a, t, s, n) => await A.post()("/account/create", {
803
+ create: async (a, t, s, n) => await R.post()("/account/create", {
804
804
  name: a.trim(),
805
805
  email: t.trim(),
806
806
  password: s.trim(),
807
807
  role_id: n
808
808
  }, {}),
809
- edit: async (a) => (a.reset_password || (a.new_password = void 0), await A.put()("/account/edit", a, {})),
809
+ edit: async (a) => (a.reset_password || (a.new_password = void 0), await R.put()("/account/edit", a, {})),
810
810
  delete: async (a) => {
811
811
  if (a)
812
- return A.post()("/account/delete", {
812
+ return R.post()("/account/delete", {
813
813
  id: a
814
814
  }, {});
815
815
  }
816
- }, dr = {
817
- list: async () => await A.post()("/api/key/list", {
816
+ }, ur = {
817
+ list: async () => await R.post()("/api/key/list", {
818
818
  filter: {
819
819
  search: ""
820
820
  },
@@ -827,18 +827,18 @@ const lr = {
827
827
  pagesize: 100
828
828
  }
829
829
  }, {}),
830
- create: async (a, t) => A.post()("/api/key/create", {
830
+ create: async (a, t) => R.post()("/api/key/create", {
831
831
  name: a,
832
832
  role_id: t
833
833
  }, {}),
834
834
  delete: async (a) => {
835
835
  if (a)
836
- return A.post()("/api/key/delete", {
836
+ return R.post()("/api/key/delete", {
837
837
  id: a
838
838
  }, {});
839
839
  }
840
- }, ur = {
841
- list: async () => await A.post()("/datasource/list", {
840
+ }, fr = {
841
+ list: async () => await R.post()("/datasource/list", {
842
842
  filter: {},
843
843
  sort: [{
844
844
  field: "create_time",
@@ -849,25 +849,25 @@ const lr = {
849
849
  pagesize: 100
850
850
  }
851
851
  }, {}),
852
- create: async (a, t, s) => await A.post()("/datasource/create", {
852
+ create: async (a, t, s) => await R.post()("/datasource/create", {
853
853
  type: a,
854
854
  key: t,
855
855
  config: s
856
856
  }, {}),
857
- update: async (a, t) => await A.put()("/datasource/update", {
857
+ update: async (a, t) => await R.put()("/datasource/update", {
858
858
  id: a,
859
859
  config: t
860
860
  }, {}),
861
861
  delete: async (a) => {
862
- await A.post()("/datasource/delete", {
862
+ await R.post()("/datasource/delete", {
863
863
  id: a
864
864
  }, {});
865
865
  }
866
- }, fr = {
867
- list: async () => await A.get()("/role/list", {}, {})
866
+ }, pr = {
867
+ list: async () => await R.get()("/role/list", {}, {})
868
868
  };
869
- var Kt = 60, Gt = Kt * 60, Jt = Gt * 24, pr = Jt * 7, ge = 1e3, rt = Kt * ge, Lt = Gt * ge, mr = Jt * ge, hr = pr * ge, lt = "millisecond", fe = "second", pe = "minute", me = "hour", ee = "day", Oe = "week", W = "month", Qt = "quarter", te = "year", he = "date", gr = "YYYY-MM-DDTHH:mm:ssZ", qt = "Invalid Date", xr = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, jr = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
870
- const vr = {
869
+ var Kt = 60, Gt = Kt * 60, Jt = Gt * 24, mr = Jt * 7, ge = 1e3, rt = Kt * ge, Lt = Gt * ge, hr = Jt * ge, gr = mr * ge, lt = "millisecond", fe = "second", pe = "minute", me = "hour", ee = "day", Oe = "week", W = "month", Qt = "quarter", te = "year", he = "date", xr = "YYYY-MM-DDTHH:mm:ssZ", qt = "Invalid Date", jr = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, vr = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
870
+ const br = {
871
871
  name: "en",
872
872
  weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
873
873
  months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
@@ -879,15 +879,15 @@ const vr = {
879
879
  var ot = function(t, s, n) {
880
880
  var o = String(t);
881
881
  return !o || o.length >= s ? t : "" + Array(s + 1 - o.length).join(n) + t;
882
- }, br = function(t) {
882
+ }, _r = function(t) {
883
883
  var s = -t.utcOffset(), n = Math.abs(s), o = Math.floor(n / 60), i = n % 60;
884
884
  return (s <= 0 ? "+" : "-") + ot(o, 2, "0") + ":" + ot(i, 2, "0");
885
- }, _r = function a(t, s) {
885
+ }, Sr = function a(t, s) {
886
886
  if (t.date() < s.date())
887
887
  return -a(s, t);
888
888
  var n = (s.year() - t.year()) * 12 + (s.month() - t.month()), o = t.clone().add(n, W), i = s - o < 0, l = t.clone().add(n + (i ? -1 : 1), W);
889
889
  return +(-(n + (s - o) / (i ? o - l : l - o)) || 0);
890
- }, Sr = function(t) {
890
+ }, yr = function(t) {
891
891
  return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
892
892
  }, wr = function(t) {
893
893
  var s = {
@@ -903,25 +903,25 @@ var ot = function(t, s, n) {
903
903
  Q: Qt
904
904
  };
905
905
  return s[t] || String(t || "").toLowerCase().replace(/s$/, "");
906
- }, yr = function(t) {
906
+ }, Cr = function(t) {
907
907
  return t === void 0;
908
908
  };
909
- const Cr = {
909
+ const Tr = {
910
910
  s: ot,
911
- z: br,
912
- m: _r,
913
- a: Sr,
911
+ z: _r,
912
+ m: Sr,
913
+ a: yr,
914
914
  p: wr,
915
- u: yr
915
+ u: Cr
916
916
  };
917
- var ye = "en", oe = {};
918
- oe[ye] = vr;
917
+ var we = "en", oe = {};
918
+ oe[we] = br;
919
919
  var dt = function(t) {
920
920
  return t instanceof He;
921
921
  }, ke = function a(t, s, n) {
922
922
  var o;
923
923
  if (!t)
924
- return ye;
924
+ return we;
925
925
  if (typeof t == "string") {
926
926
  var i = t.toLowerCase();
927
927
  oe[i] && (o = i), s && (oe[i] = s, o = i);
@@ -932,13 +932,13 @@ var dt = function(t) {
932
932
  var c = t.name;
933
933
  oe[c] = t, o = c;
934
934
  }
935
- return !n && o && (ye = o), o || !n && ye;
935
+ return !n && o && (we = o), o || !n && we;
936
936
  }, $ = function(t, s) {
937
937
  if (dt(t))
938
938
  return t.clone();
939
939
  var n = typeof s == "object" ? s : {};
940
940
  return n.date = t, n.args = arguments, new He(n);
941
- }, Tr = function(t, s) {
941
+ }, zr = function(t, s) {
942
942
  return $(t, {
943
943
  locale: s.$L,
944
944
  utc: s.$u,
@@ -946,11 +946,11 @@ var dt = function(t) {
946
946
  $offset: s.$offset
947
947
  // todo: refactor; do not use this.$offset in you code
948
948
  });
949
- }, T = Cr;
949
+ }, T = Tr;
950
950
  T.l = ke;
951
951
  T.i = dt;
952
- T.w = Tr;
953
- var zr = function(t) {
952
+ T.w = zr;
953
+ var Dr = function(t) {
954
954
  var s = t.date, n = t.utc;
955
955
  if (s === null)
956
956
  return /* @__PURE__ */ new Date(NaN);
@@ -959,7 +959,7 @@ var zr = function(t) {
959
959
  if (s instanceof Date)
960
960
  return new Date(s);
961
961
  if (typeof s == "string" && !/Z$/i.test(s)) {
962
- var o = s.match(xr);
962
+ var o = s.match(jr);
963
963
  if (o) {
964
964
  var i = o[2] - 1 || 0, l = (o[7] || "0").substring(0, 3);
965
965
  return n ? new Date(Date.UTC(o[1], i, o[3] || 1, o[4] || 0, o[5] || 0, o[6] || 0, l)) : new Date(o[1], i, o[3] || 1, o[4] || 0, o[5] || 0, o[6] || 0, l);
@@ -972,7 +972,7 @@ var zr = function(t) {
972
972
  }
973
973
  var t = a.prototype;
974
974
  return t.parse = function(n) {
975
- this.$d = zr(n), this.$x = n.x || {}, this.init();
975
+ this.$d = Dr(n), this.$x = n.x || {}, this.init();
976
976
  }, t.init = function() {
977
977
  var n = this.$d;
978
978
  this.$y = n.getFullYear(), this.$M = n.getMonth(), this.$D = n.getDate(), this.$W = n.getDay(), this.$H = n.getHours(), this.$m = n.getMinutes(), this.$s = n.getSeconds(), this.$ms = n.getMilliseconds();
@@ -994,15 +994,15 @@ var zr = function(t) {
994
994
  }, t.valueOf = function() {
995
995
  return this.$d.getTime();
996
996
  }, t.startOf = function(n, o) {
997
- var i = this, l = T.u(o) ? !0 : o, c = T.p(n), d = function(q, w) {
998
- var F = T.w(i.$u ? Date.UTC(i.$y, w, q) : new Date(i.$y, w, q), i);
997
+ var i = this, l = T.u(o) ? !0 : o, c = T.p(n), d = function(q, y) {
998
+ var F = T.w(i.$u ? Date.UTC(i.$y, y, q) : new Date(i.$y, y, q), i);
999
999
  return l ? F : F.endOf(ee);
1000
- }, f = function(q, w) {
1000
+ }, f = function(q, y) {
1001
1001
  var F = [0, 0, 0, 0], Z = [23, 59, 59, 999];
1002
1002
  return T.w(i.toDate()[q].apply(
1003
1003
  // eslint-disable-line prefer-spread
1004
1004
  i.toDate("s"),
1005
- (l ? F : Z).slice(w)
1005
+ (l ? F : Z).slice(y)
1006
1006
  ), i);
1007
1007
  }, m = this.$W, x = this.$M, j = this.$D, S = "set" + (this.$u ? "UTC" : "");
1008
1008
  switch (c) {
@@ -1063,12 +1063,12 @@ var zr = function(t) {
1063
1063
  var o = this, i = this.$locale();
1064
1064
  if (!this.isValid())
1065
1065
  return i.invalidDate || qt;
1066
- var l = n || gr, c = T.z(this), d = this.$H, f = this.$m, m = this.$M, x = i.weekdays, j = i.months, S = i.meridiem, L = function(F, Z, le, Ve) {
1066
+ var l = n || xr, c = T.z(this), d = this.$H, f = this.$m, m = this.$M, x = i.weekdays, j = i.months, S = i.meridiem, L = function(F, Z, le, Ve) {
1067
1067
  return F && (F[Z] || F(o, l)) || le[Z].slice(0, Ve);
1068
1068
  }, V = function(F) {
1069
1069
  return T.s(d % 12 || 12, F, "0");
1070
- }, X = S || function(w, F, Z) {
1071
- var le = w < 12 ? "AM" : "PM";
1070
+ }, X = S || function(y, F, Z) {
1071
+ var le = y < 12 ? "AM" : "PM";
1072
1072
  return Z ? le.toLowerCase() : le;
1073
1073
  }, q = function(F) {
1074
1074
  switch (F) {
@@ -1123,8 +1123,8 @@ var zr = function(t) {
1123
1123
  }
1124
1124
  return null;
1125
1125
  };
1126
- return l.replace(jr, function(w, F) {
1127
- return F || q(w) || c.replace(":", "");
1126
+ return l.replace(vr, function(y, F) {
1127
+ return F || q(y) || c.replace(":", "");
1128
1128
  });
1129
1129
  }, t.utcOffset = function() {
1130
1130
  return -Math.round(this.$d.getTimezoneOffset() / 15) * 15;
@@ -1143,10 +1143,10 @@ var zr = function(t) {
1143
1143
  j = x() / 3;
1144
1144
  break;
1145
1145
  case Oe:
1146
- j = (m - f) / hr;
1146
+ j = (m - f) / gr;
1147
1147
  break;
1148
1148
  case ee:
1149
- j = (m - f) / mr;
1149
+ j = (m - f) / hr;
1150
1150
  break;
1151
1151
  case me:
1152
1152
  j = m / Lt;
@@ -1197,14 +1197,14 @@ $.isDayjs = dt;
1197
1197
  $.unix = function(a) {
1198
1198
  return $(a * 1e3);
1199
1199
  };
1200
- $.en = oe[ye];
1200
+ $.en = oe[we];
1201
1201
  $.Ls = oe;
1202
1202
  $.p = {};
1203
- const Dr = {
1203
+ const Er = {
1204
1204
  list: async ({
1205
1205
  pagination: a
1206
1206
  }, t) => {
1207
- const s = await A.post(t)("/sql_snippet/list", {
1207
+ const s = await R.post(t)("/sql_snippet/list", {
1208
1208
  sort: [{
1209
1209
  field: "update_time",
1210
1210
  order: "DESC"
@@ -1215,20 +1215,20 @@ const Dr = {
1215
1215
  n.create_time = $(n.create_time).format("YYYY-MM-DD HH:mm:ss"), n.update_time = $(n.update_time).format("YYYY-MM-DD HH:mm:ss");
1216
1216
  }), s;
1217
1217
  },
1218
- get: async (a, t) => await A.post(t)("/sql_snippet/get", {
1218
+ get: async (a, t) => await R.post(t)("/sql_snippet/get", {
1219
1219
  id: a
1220
1220
  }, {}),
1221
- create: async (a, t) => await A.post(t)("/sql_snippet/create", a, {}),
1222
- update: async (a, t) => await A.put(t)("/sql_snippet/update", a, {}),
1223
- delete: async (a, t) => A.post(t)("/sql_snippet/delete", {
1221
+ create: async (a, t) => await R.post(t)("/sql_snippet/create", a, {}),
1222
+ update: async (a, t) => await R.put(t)("/sql_snippet/update", a, {}),
1223
+ delete: async (a, t) => R.post(t)("/sql_snippet/delete", {
1224
1224
  id: a
1225
1225
  }, {})
1226
1226
  }, k = {
1227
- datasource: ur,
1228
- account: lr,
1229
- role: fr,
1230
- api_key: dr,
1231
- sql_snippet: Dr
1227
+ datasource: fr,
1228
+ account: dr,
1229
+ role: pr,
1230
+ api_key: ur,
1231
+ sql_snippet: Er
1232
1232
  }, K = {
1233
1233
  size: "sm",
1234
1234
  spacing: "md",
@@ -1236,10 +1236,10 @@ const Dr = {
1236
1236
  size: "xs"
1237
1237
  }
1238
1238
  };
1239
- function Er({
1239
+ function Pr({
1240
1240
  styles: a = K
1241
1241
  }) {
1242
- return /* @__PURE__ */ e.jsx(M, { mx: "auto", children: /* @__PURE__ */ e.jsx(Ht, { mt: a.spacing, icon: /* @__PURE__ */ e.jsx(Fn, { size: 16 }), children: /* @__PURE__ */ e.jsxs(Vn, { i18nKey: "datasource.db.permission_tip", children: [
1242
+ return /* @__PURE__ */ e.jsx(M, { mx: "auto", children: /* @__PURE__ */ e.jsx(Ht, { mt: a.spacing, icon: /* @__PURE__ */ e.jsx(Fn, { size: 16 }), children: /* @__PURE__ */ e.jsxs(Wn, { i18nKey: "datasource.db.permission_tip", children: [
1243
1243
  "Only ",
1244
1244
  /* @__PURE__ */ e.jsx("b", { children: "SELECT" }),
1245
1245
  " privilege is needed."
@@ -1275,7 +1275,7 @@ function Q({
1275
1275
  } = C();
1276
1276
  return /* @__PURE__ */ e.jsx(O, { type: "submit", color: "green", leftSection: /* @__PURE__ */ e.jsx(Vt, { size: 16 }), size: a, disabled: t, children: s("common.actions.submit") });
1277
1277
  }
1278
- const Pr = {
1278
+ const Rr = {
1279
1279
  translation: {
1280
1280
  datasource: {
1281
1281
  label: "Data Source",
@@ -1539,33 +1539,33 @@ const Pr = {
1539
1539
  }
1540
1540
  }
1541
1541
  }
1542
- }, it = Jn({
1542
+ }, it = Qn({
1543
1543
  debug: !1,
1544
1544
  fallbackLng: "en",
1545
1545
  interpolation: {
1546
1546
  escapeValue: !1
1547
1547
  },
1548
1548
  resources: {
1549
- en: Pr,
1549
+ en: Rr,
1550
1550
  zh: Ar
1551
1551
  }
1552
- }).use(Qn).use(Wn);
1552
+ }).use(Xn).use(Bn);
1553
1553
  it.init();
1554
- function Rr({
1554
+ function Or({
1555
1555
  lang: a,
1556
1556
  children: t
1557
1557
  }) {
1558
1558
  return Me(() => {
1559
1559
  it.changeLanguage(a);
1560
- }, [a]), /* @__PURE__ */ e.jsx(Bn, { i18n: it, children: t });
1560
+ }, [a]), /* @__PURE__ */ e.jsx(Kn, { i18n: it, children: t });
1561
1561
  }
1562
- const Or = (a) => a.replace(/([^:])(\/\/+)/g, "$1/");
1563
- function $r(a) {
1562
+ const $r = (a) => a.replace(/([^:])(\/\/+)/g, "$1/");
1563
+ function kr(a) {
1564
1564
  Me(() => {
1565
1565
  if (nt.__getMonacoInstance())
1566
1566
  return;
1567
1567
  console.log("loading monaco for @devtable/settings-form");
1568
- const s = Or(a);
1568
+ const s = $r(a);
1569
1569
  nt.config({
1570
1570
  paths: {
1571
1571
  vs: s
@@ -1580,11 +1580,11 @@ function ze(a, t) {
1580
1580
  config: i,
1581
1581
  ...l
1582
1582
  } = n;
1583
- return cr(i), $r(i.monacoPath), /* @__PURE__ */ e.jsx(Rn, { fallback: /* @__PURE__ */ e.jsx(On, { color: "gray" }), children: /* @__PURE__ */ e.jsx(Rr, { lang: o, children: /* @__PURE__ */ e.jsx(t, { ...l }) }) });
1583
+ return lr(i), kr(i.monacoPath), /* @__PURE__ */ e.jsx(An, { fallback: /* @__PURE__ */ e.jsx(On, { color: "gray" }), children: /* @__PURE__ */ e.jsx(Or, { lang: o, children: /* @__PURE__ */ e.jsx(t, { ...l }) }) });
1584
1584
  };
1585
1585
  return s.displayName = `withEntry(${a})`, s;
1586
1586
  }
1587
- function kr({
1587
+ function Ir({
1588
1588
  submit: a,
1589
1589
  styles: t = K,
1590
1590
  type: s
@@ -1611,35 +1611,35 @@ function kr({
1611
1611
  return Me(() => {
1612
1612
  i("type", s);
1613
1613
  }, [i, s]), /* @__PURE__ */ e.jsx(M, { mx: "auto", children: /* @__PURE__ */ e.jsxs("form", { onSubmit: l(a), children: [
1614
- /* @__PURE__ */ e.jsx(y, { name: "key", control: o, render: ({
1614
+ /* @__PURE__ */ e.jsx(w, { name: "key", control: o, render: ({
1615
1615
  field: c
1616
1616
  }) => /* @__PURE__ */ e.jsx(I, { mb: t.spacing, size: t.size, required: !0, label: n("common.name"), placeholder: n("common.name_placeholder"), ...c }) }),
1617
1617
  /* @__PURE__ */ e.jsx(Fe, { label: n("datasource.connection_info"), labelPosition: "center" }),
1618
1618
  /* @__PURE__ */ e.jsxs(D, { grow: !0, children: [
1619
- /* @__PURE__ */ e.jsx(y, { name: "config.host", control: o, render: ({
1619
+ /* @__PURE__ */ e.jsx(w, { name: "config.host", control: o, render: ({
1620
1620
  field: c
1621
1621
  }) => /* @__PURE__ */ e.jsx(I, { mb: t.spacing, size: t.size, required: !0, label: n("datasource.db.host"), sx: {
1622
1622
  flexGrow: 1
1623
1623
  }, ...c }) }),
1624
- /* @__PURE__ */ e.jsx(y, { name: "config.port", control: o, render: ({
1624
+ /* @__PURE__ */ e.jsx(w, { name: "config.port", control: o, render: ({
1625
1625
  field: c
1626
1626
  }) => /* @__PURE__ */ e.jsx($n, { mb: t.spacing, size: t.size, required: !0, label: n("datasource.db.port"), hideControls: !0, sx: {
1627
1627
  width: "8em"
1628
1628
  }, ...c }) })
1629
1629
  ] }),
1630
- /* @__PURE__ */ e.jsx(y, { name: "config.username", control: o, render: ({
1630
+ /* @__PURE__ */ e.jsx(w, { name: "config.username", control: o, render: ({
1631
1631
  field: c
1632
1632
  }) => /* @__PURE__ */ e.jsx(I, { mb: t.spacing, size: t.size, required: !0, label: n("datasource.db.username"), ...c }) }),
1633
- /* @__PURE__ */ e.jsx(y, { name: "config.password", control: o, render: ({
1633
+ /* @__PURE__ */ e.jsx(w, { name: "config.password", control: o, render: ({
1634
1634
  field: c
1635
1635
  }) => /* @__PURE__ */ e.jsx(Le, { mb: t.spacing, size: t.size, required: !0, label: n("datasource.db.password"), ...c }) }),
1636
- /* @__PURE__ */ e.jsx(y, { name: "config.database", control: o, render: ({
1636
+ /* @__PURE__ */ e.jsx(w, { name: "config.database", control: o, render: ({
1637
1637
  field: c
1638
1638
  }) => /* @__PURE__ */ e.jsx(I, { mb: t.spacing, size: t.size, required: !0, label: n("datasource.db.database"), ...c }) }),
1639
1639
  /* @__PURE__ */ e.jsx(D, { justify: "flex-end", mt: t.spacing, children: /* @__PURE__ */ e.jsx(Q, { size: t.button.size }) })
1640
1640
  ] }) });
1641
1641
  }
1642
- const Ir = ({
1642
+ const Mr = ({
1643
1643
  value: a,
1644
1644
  onChange: t
1645
1645
  }) => {
@@ -1666,7 +1666,7 @@ const Ir = ({
1666
1666
  } = C(), [d, {
1667
1667
  setTrue: f,
1668
1668
  setFalse: m
1669
- }] = Xn(), [x, j] = Ut(a), S = () => {
1669
+ }] = Zn(), [x, j] = Ut(a), S = () => {
1670
1670
  m(), t(x);
1671
1671
  }, L = () => {
1672
1672
  m(), j(a);
@@ -1680,7 +1680,7 @@ const Ir = ({
1680
1680
  flexGrow: 1
1681
1681
  }, children: s }),
1682
1682
  /* @__PURE__ */ e.jsx(ne, { size: 800, title: n, opened: d, onClose: m, closeOnClickOutside: !1, withCloseButton: !1, children: d && /* @__PURE__ */ e.jsxs(Ce, { children: [
1683
- /* @__PURE__ */ e.jsx(Ir, { value: x, onChange: j }),
1683
+ /* @__PURE__ */ e.jsx(Mr, { value: x, onChange: j }),
1684
1684
  /* @__PURE__ */ e.jsxs(D, { justify: "space-between", children: [
1685
1685
  /* @__PURE__ */ e.jsx(O, { size: i.button.size, onClick: V, color: "red", leftSection: /* @__PURE__ */ e.jsx(qn, { size: 20 }), children: c("common.actions.reset_to_default") }),
1686
1686
  /* @__PURE__ */ e.jsxs(D, { justify: "flex-end", children: [
@@ -1690,13 +1690,13 @@ const Ir = ({
1690
1690
  ] })
1691
1691
  ] }) })
1692
1692
  ] });
1693
- }), Re = {
1693
+ }), Ae = {
1694
1694
  pre: ["function pre_process({ method, url, params, headers, data }, utils) {", " // your code goes here", " return { method, url, params, headers, data }", "}"].join(`
1695
1695
  `),
1696
1696
  post: ["function post_process(res, utils) {", " // your code goes here", " return data", "}"].join(`
1697
1697
  `)
1698
1698
  };
1699
- function Mr({
1699
+ function Fr({
1700
1700
  submit: a,
1701
1701
  styles: t = K
1702
1702
  }) {
@@ -1713,34 +1713,34 @@ function Mr({
1713
1713
  config: {
1714
1714
  host: "",
1715
1715
  processing: {
1716
- pre: Re.pre,
1717
- post: Re.post
1716
+ pre: Ae.pre,
1717
+ post: Ae.post
1718
1718
  }
1719
1719
  }
1720
1720
  }
1721
1721
  });
1722
1722
  return /* @__PURE__ */ e.jsx(M, { mx: "auto", children: /* @__PURE__ */ e.jsxs("form", { onSubmit: i(a), children: [
1723
- /* @__PURE__ */ e.jsx(y, { name: "key", control: n, render: ({
1723
+ /* @__PURE__ */ e.jsx(w, { name: "key", control: n, render: ({
1724
1724
  field: l
1725
1725
  }) => /* @__PURE__ */ e.jsx(I, { mb: t.spacing, size: t.size, required: !0, label: s("common.name"), placeholder: s("common.name_placeholder"), ...l }) }),
1726
1726
  /* @__PURE__ */ e.jsx(Fe, { label: s("datasource.connection_info"), labelPosition: "center" }),
1727
- /* @__PURE__ */ e.jsx(y, { name: "config.host", control: n, render: ({
1727
+ /* @__PURE__ */ e.jsx(w, { name: "config.host", control: n, render: ({
1728
1728
  field: l
1729
1729
  }) => /* @__PURE__ */ e.jsx(I, { mb: t.spacing, size: t.size, label: s("datasource.http.base_url"), sx: {
1730
1730
  flexGrow: 1
1731
1731
  }, ...l }) }),
1732
1732
  /* @__PURE__ */ e.jsxs(D, { grow: !0, children: [
1733
- /* @__PURE__ */ e.jsx(y, { name: "config.processing.pre", control: n, render: ({
1733
+ /* @__PURE__ */ e.jsx(w, { name: "config.processing.pre", control: n, render: ({
1734
1734
  field: l
1735
- }) => /* @__PURE__ */ e.jsx(Ie, { label: s("datasource.http.processing.pre.label"), modalTitle: s("datasource.http.processing.pre.description"), defaultValue: Re.pre, ...l, styles: t }) }),
1736
- /* @__PURE__ */ e.jsx(y, { name: "config.processing.post", control: n, render: ({
1735
+ }) => /* @__PURE__ */ e.jsx(Ie, { label: s("datasource.http.processing.pre.label"), modalTitle: s("datasource.http.processing.pre.description"), defaultValue: Ae.pre, ...l, styles: t }) }),
1736
+ /* @__PURE__ */ e.jsx(w, { name: "config.processing.post", control: n, render: ({
1737
1737
  field: l
1738
- }) => /* @__PURE__ */ e.jsx(Ie, { label: s("datasource.http.processing.post.label"), modalTitle: s("datasource.http.processing.post.description"), defaultValue: Re.post, ...l, styles: t }) })
1738
+ }) => /* @__PURE__ */ e.jsx(Ie, { label: s("datasource.http.processing.post.label"), modalTitle: s("datasource.http.processing.post.description"), defaultValue: Ae.post, ...l, styles: t }) })
1739
1739
  ] }),
1740
1740
  /* @__PURE__ */ e.jsx(D, { justify: "flex-end", mt: t.spacing, children: /* @__PURE__ */ e.jsx(Q, { size: t.button.size }) })
1741
1741
  ] }) });
1742
1742
  }
1743
- function Fr({
1743
+ function Lr({
1744
1744
  postSubmit: a,
1745
1745
  styles: t = K
1746
1746
  }) {
@@ -1793,12 +1793,12 @@ function Fr({
1793
1793
  label: "HTTP",
1794
1794
  value: "http"
1795
1795
  }], value: n, onChange: l }),
1796
- c && /* @__PURE__ */ e.jsx(Er, { styles: t }),
1797
- c && /* @__PURE__ */ e.jsx(kr, { submit: i, styles: t, type: n }),
1798
- d && /* @__PURE__ */ e.jsx(Mr, { submit: i, styles: t })
1796
+ c && /* @__PURE__ */ e.jsx(Pr, { styles: t }),
1797
+ c && /* @__PURE__ */ e.jsx(Ir, { submit: i, styles: t, type: n }),
1798
+ d && /* @__PURE__ */ e.jsx(Fr, { submit: i, styles: t })
1799
1799
  ] });
1800
1800
  }
1801
- function Lr({
1801
+ function qr({
1802
1802
  onSuccess: a,
1803
1803
  styles: t = K
1804
1804
  }) {
@@ -1810,33 +1810,35 @@ function Lr({
1810
1810
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1811
1811
  /* @__PURE__ */ e.jsx(ne, { opened: n, onClose: () => o(!1), title: s("datasource.add"), trapFocus: !0, onDragStart: (d) => {
1812
1812
  d.stopPropagation();
1813
- }, children: /* @__PURE__ */ e.jsx(Fr, { postSubmit: c, styles: t }) }),
1813
+ }, children: /* @__PURE__ */ e.jsx(Lr, { postSubmit: c, styles: t }) }),
1814
1814
  /* @__PURE__ */ e.jsx(O, { size: t.button.size, onClick: i, leftSection: /* @__PURE__ */ e.jsx(Ne, { size: 20 }), children: s("datasource.add") })
1815
1815
  ] });
1816
1816
  }
1817
- const qr = {
1817
+ const Nr = {
1818
1818
  http: "HTTP",
1819
1819
  mysql: "MySQL",
1820
- postgresql: "PostgreSQL"
1821
- }, Nr = {
1820
+ postgresql: "PostgreSQL",
1821
+ merico_metric_system: "Merico Metric System"
1822
+ }, Ur = {
1822
1823
  http: /* @__PURE__ */ e.jsx(Nn, {}),
1823
1824
  mysql: /* @__PURE__ */ e.jsx(Un, {}),
1824
- postgresql: /* @__PURE__ */ e.jsx(Hn, {})
1825
+ postgresql: /* @__PURE__ */ e.jsx(Hn, {}),
1826
+ merico_metric_system: /* @__PURE__ */ e.jsx(Yn, {})
1825
1827
  };
1826
- function Ur({
1828
+ function Hr({
1827
1829
  type: a
1828
1830
  }) {
1829
1831
  return /* @__PURE__ */ e.jsxs(D, { children: [
1830
1832
  /* @__PURE__ */ e.jsx(Yt, { variant: "subtle", size: "xs", sx: {
1831
1833
  transform: "none !important"
1832
- }, children: Nr[a] }),
1834
+ }, children: Ur[a] }),
1833
1835
  /* @__PURE__ */ e.jsx(ie, { sx: {
1834
1836
  cusor: "default",
1835
1837
  userSelect: "none"
1836
- }, children: qr[a] })
1838
+ }, children: Nr[a] })
1837
1839
  ] });
1838
1840
  }
1839
- function Hr({
1841
+ function Yr({
1840
1842
  id: a,
1841
1843
  name: t,
1842
1844
  isProtected: s,
@@ -1892,7 +1894,7 @@ const Nt = {
1892
1894
  post: ["function post_process(resp, utils) {", " return resp.data", "}"].join(`
1893
1895
  `)
1894
1896
  };
1895
- function Yr({
1897
+ function Vr({
1896
1898
  name: a,
1897
1899
  config: t,
1898
1900
  submit: s,
@@ -1911,23 +1913,23 @@ function Yr({
1911
1913
  return /* @__PURE__ */ e.jsx(M, { mx: "auto", children: /* @__PURE__ */ e.jsxs("form", { onSubmit: l(s), children: [
1912
1914
  /* @__PURE__ */ e.jsx(I, { mb: n.spacing, size: n.size, required: !0, label: o("common.name"), value: a, readOnly: !0 }),
1913
1915
  /* @__PURE__ */ e.jsx(Fe, { label: o("datasource.connection_info"), labelPosition: "center" }),
1914
- /* @__PURE__ */ e.jsx(y, { name: "config.host", control: i, render: ({
1916
+ /* @__PURE__ */ e.jsx(w, { name: "config.host", control: i, render: ({
1915
1917
  field: c
1916
1918
  }) => /* @__PURE__ */ e.jsx(I, { mb: n.spacing, size: n.size, label: o("datasource.http.base_url"), sx: {
1917
1919
  flexGrow: 1
1918
1920
  }, ...c }) }),
1919
1921
  /* @__PURE__ */ e.jsxs(D, { grow: !0, children: [
1920
- /* @__PURE__ */ e.jsx(y, { name: "config.processing.pre", control: i, render: ({
1922
+ /* @__PURE__ */ e.jsx(w, { name: "config.processing.pre", control: i, render: ({
1921
1923
  field: c
1922
1924
  }) => /* @__PURE__ */ e.jsx(Ie, { label: o("datasource.http.processing.pre.label"), modalTitle: o("datasource.http.processing.pre.description"), defaultValue: Nt.pre, ...c, styles: n }) }),
1923
- /* @__PURE__ */ e.jsx(y, { name: "config.processing.post", control: i, render: ({
1925
+ /* @__PURE__ */ e.jsx(w, { name: "config.processing.post", control: i, render: ({
1924
1926
  field: c
1925
1927
  }) => /* @__PURE__ */ e.jsx(Ie, { label: o("datasource.http.processing.post.label"), modalTitle: o("datasource.http.processing.post.description"), defaultValue: Nt.post, ...c, styles: n }) })
1926
1928
  ] }),
1927
1929
  /* @__PURE__ */ e.jsx(D, { justify: "flex-end", mt: n.spacing, children: /* @__PURE__ */ e.jsx(Q, { size: n.button.size }) })
1928
1930
  ] }) });
1929
1931
  }
1930
- function Vr({
1932
+ function Wr({
1931
1933
  dataSource: a,
1932
1934
  postSubmit: t,
1933
1935
  styles: s = K
@@ -1964,9 +1966,9 @@ function Vr({
1964
1966
  });
1965
1967
  }
1966
1968
  };
1967
- return a.config ? /* @__PURE__ */ e.jsx(M, { mx: "auto", children: /* @__PURE__ */ e.jsx(Yr, { name: a.key, config: a.config, submit: o, styles: s }) }) : (console.error(new Error("unexpected empty config of a http datasource")), null);
1969
+ return a.config ? /* @__PURE__ */ e.jsx(M, { mx: "auto", children: /* @__PURE__ */ e.jsx(Vr, { name: a.key, config: a.config, submit: o, styles: s }) }) : (console.error(new Error("unexpected empty config of a http datasource")), null);
1968
1970
  }
1969
- function Wr({
1971
+ function Br({
1970
1972
  dataSource: a,
1971
1973
  onSuccess: t,
1972
1974
  styles: s = K
@@ -1991,11 +1993,11 @@ function Wr({
1991
1993
  }, children: n("common.actions.edit") }) }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1992
1994
  /* @__PURE__ */ e.jsx(ne, { opened: o, onClose: () => i(!1), title: n("datasource.edit"), trapFocus: !0, onDragStart: (f) => {
1993
1995
  f.stopPropagation();
1994
- }, children: /* @__PURE__ */ e.jsx(Vr, { dataSource: a, postSubmit: d, styles: s }) }),
1996
+ }, children: /* @__PURE__ */ e.jsx(Wr, { dataSource: a, postSubmit: d, styles: s }) }),
1995
1997
  /* @__PURE__ */ e.jsx(O, { size: s.button.size, color: "blue", onClick: l, leftSection: /* @__PURE__ */ e.jsx($e, { size: 16 }), children: n("common.actions.edit") })
1996
1998
  ] });
1997
1999
  }
1998
- const ya = ze("DataSourceList", ({
2000
+ const Ca = ze("DataSourceList", ({
1999
2001
  styles: a = K
2000
2002
  }) => {
2001
2003
  const {
@@ -2013,7 +2015,7 @@ const ya = ze("DataSourceList", ({
2013
2015
  refreshDeps: []
2014
2016
  });
2015
2017
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2016
- /* @__PURE__ */ e.jsx(D, { pt: a.spacing, justify: "flex-end", children: /* @__PURE__ */ e.jsx(Lr, { onSuccess: o }) }),
2018
+ /* @__PURE__ */ e.jsx(D, { pt: a.spacing, justify: "flex-end", children: /* @__PURE__ */ e.jsx(qr, { onSuccess: o }) }),
2017
2019
  /* @__PURE__ */ e.jsxs(M, { mt: a.spacing, sx: {
2018
2020
  position: "relative"
2019
2021
  }, children: [
@@ -2030,20 +2032,20 @@ const ya = ze("DataSourceList", ({
2030
2032
  key: c,
2031
2033
  type: d,
2032
2034
  is_preset: f
2033
- } = i;
2035
+ } = i, m = d === "merico_metric_system";
2034
2036
  return /* @__PURE__ */ e.jsxs(h.Tr, { children: [
2035
- /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: /* @__PURE__ */ e.jsx(Ur, { type: d }) }),
2037
+ /* @__PURE__ */ e.jsx(h.Td, { width: 230, children: /* @__PURE__ */ e.jsx(Hr, { type: d }) }),
2036
2038
  /* @__PURE__ */ e.jsx(h.Td, { children: c }),
2037
2039
  /* @__PURE__ */ e.jsx(h.Td, { width: 400, children: /* @__PURE__ */ e.jsxs(D, { justify: "flex-start", children: [
2038
- /* @__PURE__ */ e.jsx(Wr, { dataSource: i, onSuccess: o, styles: a }),
2039
- /* @__PURE__ */ e.jsx(Hr, { isProtected: f, id: l, name: c, onSuccess: o, styles: a })
2040
+ /* @__PURE__ */ e.jsx(Br, { dataSource: i, onSuccess: o, styles: a }),
2041
+ /* @__PURE__ */ e.jsx(Yr, { isProtected: f || m, id: l, name: c, onSuccess: o, styles: a })
2040
2042
  ] }) })
2041
2043
  ] }, c);
2042
2044
  }) })
2043
2045
  ] })
2044
2046
  ] })
2045
2047
  ] });
2046
- }), Br = ({
2048
+ }), Kr = ({
2047
2049
  option: a,
2048
2050
  ...t
2049
2051
  }) => {
@@ -2074,7 +2076,7 @@ const ya = ze("DataSourceList", ({
2074
2076
  })), {
2075
2077
  refreshDeps: []
2076
2078
  });
2077
- return /* @__PURE__ */ e.jsx(In, { ref: n, mb: a.spacing, size: a.size, required: !0, label: o("role.label"), renderOption: Br, data: i, disabled: l, styles: () => ({
2079
+ return /* @__PURE__ */ e.jsx(In, { ref: n, mb: a.spacing, size: a.size, required: !0, label: o("role.label"), renderOption: Kr, data: i, disabled: l, styles: () => ({
2078
2080
  item: {
2079
2081
  "&[data-selected]": {
2080
2082
  "&, &:hover": {
@@ -2094,7 +2096,7 @@ const ya = ze("DataSourceList", ({
2094
2096
  size: "xs"
2095
2097
  }
2096
2098
  };
2097
- function Kr({
2099
+ function Gr({
2098
2100
  postSubmit: a,
2099
2101
  styles: t = re,
2100
2102
  initialRoleID: s
@@ -2142,22 +2144,22 @@ function Kr({
2142
2144
  }
2143
2145
  };
2144
2146
  return /* @__PURE__ */ e.jsx(M, { mx: "auto", mb: 10, children: /* @__PURE__ */ e.jsxs("form", { onSubmit: i(l), children: [
2145
- /* @__PURE__ */ e.jsx(y, { name: "name", control: o, render: ({
2147
+ /* @__PURE__ */ e.jsx(w, { name: "name", control: o, render: ({
2146
2148
  field: c
2147
2149
  }) => /* @__PURE__ */ e.jsx(I, { mb: t.spacing, size: t.size, required: !0, label: n("account.username"), ...c }) }),
2148
- /* @__PURE__ */ e.jsx(y, { name: "email", control: o, render: ({
2150
+ /* @__PURE__ */ e.jsx(w, { name: "email", control: o, render: ({
2149
2151
  field: c
2150
2152
  }) => /* @__PURE__ */ e.jsx(I, { mb: t.spacing, size: t.size, required: !0, label: n("account.email"), ...c }) }),
2151
- /* @__PURE__ */ e.jsx(y, { name: "password", control: o, render: ({
2153
+ /* @__PURE__ */ e.jsx(w, { name: "password", control: o, render: ({
2152
2154
  field: c
2153
2155
  }) => /* @__PURE__ */ e.jsx(Le, { mb: t.spacing, size: t.size, required: !0, label: n("account.password"), description: n("account.password_hint"), ...c }) }),
2154
- /* @__PURE__ */ e.jsx(y, { name: "role_id", control: o, render: ({
2156
+ /* @__PURE__ */ e.jsx(w, { name: "role_id", control: o, render: ({
2155
2157
  field: c
2156
2158
  }) => /* @__PURE__ */ e.jsx(ut, { styles: t, ...c }) }),
2157
2159
  /* @__PURE__ */ e.jsx(D, { justify: "flex-end", mt: t.spacing, children: /* @__PURE__ */ e.jsx(Q, { size: t.button.size }) })
2158
2160
  ] }) });
2159
2161
  }
2160
- function Gr({
2162
+ function Jr({
2161
2163
  onSuccess: a,
2162
2164
  styles: t = re,
2163
2165
  initialRoleID: s
@@ -2170,11 +2172,11 @@ function Gr({
2170
2172
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2171
2173
  /* @__PURE__ */ e.jsx(ne, { opened: o, onClose: () => i(!1), title: n("account.add"), trapFocus: !0, onDragStart: (f) => {
2172
2174
  f.stopPropagation();
2173
- }, children: /* @__PURE__ */ e.jsx(Kr, { postSubmit: d, styles: t, initialRoleID: s }) }),
2175
+ }, children: /* @__PURE__ */ e.jsx(Gr, { postSubmit: d, styles: t, initialRoleID: s }) }),
2174
2176
  /* @__PURE__ */ e.jsx(O, { size: t.button.size, onClick: l, leftSection: /* @__PURE__ */ e.jsx(Ne, { size: 20 }), children: n("account.add") })
2175
2177
  ] });
2176
2178
  }
2177
- function Jr({
2179
+ function Qr({
2178
2180
  id: a,
2179
2181
  name: t,
2180
2182
  onSuccess: s,
@@ -2229,7 +2231,7 @@ function Jr({
2229
2231
  });
2230
2232
  return /* @__PURE__ */ e.jsx(O, { size: n.button.size, color: "red", onClick: c, leftSection: /* @__PURE__ */ e.jsx(Ue, { size: 20 }), children: o("common.actions.delete") });
2231
2233
  }
2232
- function Qr({
2234
+ function Xr({
2233
2235
  id: a,
2234
2236
  name: t,
2235
2237
  email: s,
@@ -2279,28 +2281,28 @@ function Qr({
2279
2281
  color: "green",
2280
2282
  autoClose: !0
2281
2283
  }), o();
2282
- } catch (w) {
2284
+ } catch (y) {
2283
2285
  E({
2284
2286
  id: "for-updating",
2285
2287
  title: l("common.state.failed"),
2286
- message: w.message,
2288
+ message: y.message,
2287
2289
  color: "red",
2288
2290
  autoClose: !0
2289
2291
  });
2290
2292
  }
2291
2293
  }, [x, j] = f(["reset_password", "new_password"]);
2292
2294
  return /* @__PURE__ */ e.jsx(M, { mx: "auto", mb: 10, children: /* @__PURE__ */ e.jsxs("form", { onSubmit: d(m), children: [
2293
- /* @__PURE__ */ e.jsx(y, { name: "name", control: c, render: ({
2295
+ /* @__PURE__ */ e.jsx(w, { name: "name", control: c, render: ({
2294
2296
  field: S
2295
2297
  }) => /* @__PURE__ */ e.jsx(I, { mb: i.spacing, size: i.size, required: !0, label: l("account.username"), ...S }) }),
2296
- /* @__PURE__ */ e.jsx(y, { name: "email", control: c, render: ({
2298
+ /* @__PURE__ */ e.jsx(w, { name: "email", control: c, render: ({
2297
2299
  field: S
2298
2300
  }) => /* @__PURE__ */ e.jsx(I, { mb: i.spacing, size: i.size, required: !0, label: l("account.email"), ...S }) }),
2299
- /* @__PURE__ */ e.jsx(y, { name: "role_id", control: c, render: ({
2301
+ /* @__PURE__ */ e.jsx(w, { name: "role_id", control: c, render: ({
2300
2302
  field: S
2301
2303
  }) => /* @__PURE__ */ e.jsx(ut, { styles: i, ...S }) }),
2302
2304
  /* @__PURE__ */ e.jsx(Fe, { my: 20, variant: "dashed", label: "", labelPosition: "center" }),
2303
- /* @__PURE__ */ e.jsx(y, { name: "reset_password", control: c, render: ({
2305
+ /* @__PURE__ */ e.jsx(w, { name: "reset_password", control: c, render: ({
2304
2306
  field: S
2305
2307
  }) => /* @__PURE__ */ e.jsx(Mn, { mb: i.spacing, size: i.size, label: l("account.reset_password"), checked: S.value, onChange: (L) => S.onChange(L.currentTarget.checked), styles: {
2306
2308
  label: {
@@ -2308,7 +2310,7 @@ function Qr({
2308
2310
  }
2309
2311
  } }) }),
2310
2312
  x && /* @__PURE__ */ e.jsx(
2311
- y,
2313
+ w,
2312
2314
  {
2313
2315
  name: "new_password",
2314
2316
  control: c,
@@ -2320,7 +2322,7 @@ function Qr({
2320
2322
  /* @__PURE__ */ e.jsx(D, { justify: "flex-end", mt: i.spacing, children: /* @__PURE__ */ e.jsx(Q, { size: i.button.size }) })
2321
2323
  ] }) });
2322
2324
  }
2323
- function Xr({
2325
+ function Zr({
2324
2326
  account: a,
2325
2327
  onSuccess: t,
2326
2328
  styles: s = re
@@ -2335,11 +2337,11 @@ function Xr({
2335
2337
  name: a.name
2336
2338
  }), trapFocus: !0, onDragStart: (f) => {
2337
2339
  f.stopPropagation();
2338
- }, children: /* @__PURE__ */ e.jsx(Qr, { ...a, postSubmit: d, styles: s }) }),
2340
+ }, children: /* @__PURE__ */ e.jsx(Xr, { ...a, postSubmit: d, styles: s }) }),
2339
2341
  /* @__PURE__ */ e.jsx(O, { size: s.button.size, onClick: l, leftSection: /* @__PURE__ */ e.jsx($e, { size: 20 }), children: n("common.actions.edit") })
2340
2342
  ] });
2341
2343
  }
2342
- const Ca = ze("AccountList", ({
2344
+ const Ta = ze("AccountList", ({
2343
2345
  styles: a = re
2344
2346
  }) => {
2345
2347
  var c;
@@ -2368,7 +2370,7 @@ const Ca = ze("AccountList", ({
2368
2370
  refreshDeps: []
2369
2371
  });
2370
2372
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2371
- /* @__PURE__ */ e.jsx(D, { pt: a.spacing, justify: "flex-end", children: /* @__PURE__ */ e.jsx(Gr, { onSuccess: o, initialRoleID: ((c = i == null ? void 0 : i[0]) == null ? void 0 : c.value) ?? "INACTIVE" }) }),
2373
+ /* @__PURE__ */ e.jsx(D, { pt: a.spacing, justify: "flex-end", children: /* @__PURE__ */ e.jsx(Jr, { onSuccess: o, initialRoleID: ((c = i == null ? void 0 : i[0]) == null ? void 0 : c.value) ?? "INACTIVE" }) }),
2372
2374
  /* @__PURE__ */ e.jsxs(M, { mt: a.spacing, sx: {
2373
2375
  position: "relative"
2374
2376
  }, children: [
@@ -2392,8 +2394,8 @@ const Ca = ze("AccountList", ({
2392
2394
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: x }),
2393
2395
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: j }),
2394
2396
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: /* @__PURE__ */ e.jsxs(D, { justify: "flex-start", children: [
2395
- /* @__PURE__ */ e.jsx(Xr, { account: d, onSuccess: o }),
2396
- /* @__PURE__ */ e.jsx(Jr, { id: f, name: m, onSuccess: o })
2397
+ /* @__PURE__ */ e.jsx(Zr, { account: d, onSuccess: o }),
2398
+ /* @__PURE__ */ e.jsx(Qr, { id: f, name: m, onSuccess: o })
2397
2399
  ] }) })
2398
2400
  ] }, f);
2399
2401
  }) })
@@ -2401,7 +2403,7 @@ const Ca = ze("AccountList", ({
2401
2403
  ] })
2402
2404
  ] });
2403
2405
  });
2404
- function Zr({
2406
+ function ea({
2405
2407
  postSubmit: a,
2406
2408
  styles: t = re
2407
2409
  }) {
@@ -2446,28 +2448,28 @@ function Zr({
2446
2448
  }
2447
2449
  };
2448
2450
  return /* @__PURE__ */ e.jsx(M, { mx: "auto", children: /* @__PURE__ */ e.jsxs("form", { onSubmit: o(i), children: [
2449
- /* @__PURE__ */ e.jsx(y, { name: "name", control: n, render: ({
2451
+ /* @__PURE__ */ e.jsx(w, { name: "name", control: n, render: ({
2450
2452
  field: l
2451
2453
  }) => /* @__PURE__ */ e.jsx(I, { mb: t.spacing, size: t.size, required: !0, label: s("account.username"), ...l }) }),
2452
- /* @__PURE__ */ e.jsx(y, { name: "password", control: n, render: ({
2454
+ /* @__PURE__ */ e.jsx(w, { name: "password", control: n, render: ({
2453
2455
  field: l
2454
2456
  }) => /* @__PURE__ */ e.jsx(Le, { mb: t.spacing, size: t.size, required: !0, label: s("account.password"), ...l }) }),
2455
2457
  /* @__PURE__ */ e.jsx(D, { justify: "flex-end", mt: t.spacing, children: /* @__PURE__ */ e.jsx(Q, { size: t.button.size }) })
2456
2458
  ] }) });
2457
2459
  }
2458
- const Ta = ze("Login", ({
2460
+ const za = ze("Login", ({
2459
2461
  styles: a = re,
2460
2462
  onSuccess: t
2461
2463
  }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(M, { mt: a.spacing, sx: {
2462
2464
  position: "relative"
2463
- }, children: /* @__PURE__ */ e.jsx(Zr, { styles: a, postSubmit: t }) }) })), Ye = {
2465
+ }, children: /* @__PURE__ */ e.jsx(ea, { styles: a, postSubmit: t }) }) })), Ye = {
2464
2466
  size: "sm",
2465
2467
  spacing: "md",
2466
2468
  button: {
2467
2469
  size: "xs"
2468
2470
  }
2469
2471
  };
2470
- function ea({
2472
+ function ta({
2471
2473
  postSubmit: a,
2472
2474
  styles: t = Ye,
2473
2475
  initialRoleID: s
@@ -2516,16 +2518,16 @@ function ea({
2516
2518
  }
2517
2519
  };
2518
2520
  return /* @__PURE__ */ e.jsx(M, { mx: "auto", mb: 10, children: /* @__PURE__ */ e.jsxs("form", { onSubmit: i(l), children: [
2519
- /* @__PURE__ */ e.jsx(y, { name: "name", control: o, render: ({
2521
+ /* @__PURE__ */ e.jsx(w, { name: "name", control: o, render: ({
2520
2522
  field: c
2521
2523
  }) => /* @__PURE__ */ e.jsx(I, { mb: t.spacing, size: t.size, required: !0, label: n("common.name"), ...c }) }),
2522
- /* @__PURE__ */ e.jsx(y, { name: "role_id", control: o, render: ({
2524
+ /* @__PURE__ */ e.jsx(w, { name: "role_id", control: o, render: ({
2523
2525
  field: c
2524
2526
  }) => /* @__PURE__ */ e.jsx(ut, { styles: t, ...c }) }),
2525
2527
  /* @__PURE__ */ e.jsx(D, { justify: "flex-end", mt: t.spacing, children: /* @__PURE__ */ e.jsx(Q, { size: t.button.size }) })
2526
2528
  ] }) });
2527
2529
  }
2528
- function ta({
2530
+ function na({
2529
2531
  onSuccess: a,
2530
2532
  styles: t = Ye,
2531
2533
  initialRoleID: s
@@ -2548,7 +2550,7 @@ function ta({
2548
2550
  }
2549
2551
  } }),
2550
2552
  /* @__PURE__ */ e.jsx(O, { size: "sm", onClick: () => {
2551
- Zn();
2553
+ er();
2552
2554
  }, children: n("api_key.save.saved") })
2553
2555
  ] }),
2554
2556
  onClose: () => {
@@ -2559,11 +2561,11 @@ function ta({
2559
2561
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2560
2562
  /* @__PURE__ */ e.jsx(ne, { opened: i, onClose: () => l(!1), title: n("api_key.add"), trapFocus: !0, onDragStart: (m) => {
2561
2563
  m.stopPropagation();
2562
- }, children: /* @__PURE__ */ e.jsx(ea, { postSubmit: f, styles: t, initialRoleID: s }) }),
2564
+ }, children: /* @__PURE__ */ e.jsx(ta, { postSubmit: f, styles: t, initialRoleID: s }) }),
2563
2565
  /* @__PURE__ */ e.jsx(O, { size: t.button.size, onClick: c, leftSection: /* @__PURE__ */ e.jsx(Ne, { size: 20 }), children: n("api_key.add") })
2564
2566
  ] });
2565
2567
  }
2566
- function na({
2568
+ function ra({
2567
2569
  id: a,
2568
2570
  name: t,
2569
2571
  onSuccess: s,
@@ -2618,7 +2620,7 @@ function na({
2618
2620
  });
2619
2621
  return /* @__PURE__ */ e.jsx(O, { size: n.button.size, color: "red", onClick: c, leftSection: /* @__PURE__ */ e.jsx(Ue, { size: 20 }), children: o("common.actions.delete") });
2620
2622
  }
2621
- const za = ze("APIKeyList", ({
2623
+ const Da = ze("APIKeyList", ({
2622
2624
  styles: a = Ye
2623
2625
  }) => {
2624
2626
  var c;
@@ -2647,7 +2649,7 @@ const za = ze("APIKeyList", ({
2647
2649
  refreshDeps: []
2648
2650
  });
2649
2651
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2650
- /* @__PURE__ */ e.jsx(D, { pt: a.spacing, justify: "flex-end", children: /* @__PURE__ */ e.jsx(ta, { onSuccess: o, initialRoleID: ((c = i == null ? void 0 : i[0]) == null ? void 0 : c.value) ?? "INACTIVE" }) }),
2652
+ /* @__PURE__ */ e.jsx(D, { pt: a.spacing, justify: "flex-end", children: /* @__PURE__ */ e.jsx(na, { onSuccess: o, initialRoleID: ((c = i == null ? void 0 : i[0]) == null ? void 0 : c.value) ?? "INACTIVE" }) }),
2651
2653
  /* @__PURE__ */ e.jsxs(M, { mt: a.spacing, sx: {
2652
2654
  position: "relative"
2653
2655
  }, children: [
@@ -2670,7 +2672,7 @@ const za = ze("APIKeyList", ({
2670
2672
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: m }),
2671
2673
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: x }),
2672
2674
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: j }),
2673
- /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: /* @__PURE__ */ e.jsx(D, { justify: "flex-start", children: /* @__PURE__ */ e.jsx(na, { id: f, name: m, onSuccess: o }) }) })
2675
+ /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: /* @__PURE__ */ e.jsx(D, { justify: "flex-start", children: /* @__PURE__ */ e.jsx(ra, { id: f, name: m, onSuccess: o }) }) })
2674
2676
  ] }, f);
2675
2677
  }) })
2676
2678
  ] })
@@ -2683,7 +2685,7 @@ const za = ze("APIKeyList", ({
2683
2685
  size: "xs"
2684
2686
  }
2685
2687
  };
2686
- function ra({
2688
+ function aa({
2687
2689
  postSubmit: a,
2688
2690
  styles: t = xe
2689
2691
  }) {
@@ -2723,10 +2725,10 @@ function ra({
2723
2725
  }
2724
2726
  };
2725
2727
  return /* @__PURE__ */ e.jsx(M, { mx: "auto", children: /* @__PURE__ */ e.jsxs("form", { onSubmit: o(i), children: [
2726
- /* @__PURE__ */ e.jsx(y, { name: "id", control: n, render: ({
2728
+ /* @__PURE__ */ e.jsx(w, { name: "id", control: n, render: ({
2727
2729
  field: l
2728
2730
  }) => /* @__PURE__ */ e.jsx(I, { mb: t.spacing, size: t.size, required: !0, label: s("common.name"), placeholder: s("common.name_placeholder"), ...l }) }),
2729
- /* @__PURE__ */ e.jsx(y, { name: "content", control: n, render: ({
2731
+ /* @__PURE__ */ e.jsx(w, { name: "content", control: n, render: ({
2730
2732
  field: l
2731
2733
  }) => /* @__PURE__ */ e.jsxs(Ce, { gap: 4, children: [
2732
2734
  /* @__PURE__ */ e.jsx(ie, { size: "14px", fw: 500, c: "#212529", sx: {
@@ -2737,7 +2739,7 @@ function ra({
2737
2739
  /* @__PURE__ */ e.jsx(D, { justify: "flex-end", mt: t.spacing, children: /* @__PURE__ */ e.jsx(Q, { size: t.button.size }) })
2738
2740
  ] }) });
2739
2741
  }
2740
- function aa({
2742
+ function sa({
2741
2743
  onSuccess: a,
2742
2744
  styles: t = xe
2743
2745
  }) {
@@ -2749,11 +2751,11 @@ function aa({
2749
2751
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2750
2752
  /* @__PURE__ */ e.jsx(ne, { opened: n, onClose: () => o(!1), title: s("global_sql_snippet.add"), trapFocus: !0, onDragStart: (d) => {
2751
2753
  d.stopPropagation();
2752
- }, size: "80vw", children: /* @__PURE__ */ e.jsx(ra, { postSubmit: c, styles: t }) }),
2754
+ }, size: "80vw", children: /* @__PURE__ */ e.jsx(aa, { postSubmit: c, styles: t }) }),
2753
2755
  /* @__PURE__ */ e.jsx(O, { size: t.button.size, onClick: i, leftSection: /* @__PURE__ */ e.jsx(Ne, { size: 18 }), children: s("global_sql_snippet.add") })
2754
2756
  ] });
2755
2757
  }
2756
- function sa({
2758
+ function oa({
2757
2759
  postSubmit: a,
2758
2760
  styles: t = xe,
2759
2761
  id: s,
@@ -2795,10 +2797,10 @@ function sa({
2795
2797
  }
2796
2798
  };
2797
2799
  return /* @__PURE__ */ e.jsx(M, { mx: "auto", children: /* @__PURE__ */ e.jsxs("form", { onSubmit: l(c), children: [
2798
- /* @__PURE__ */ e.jsx(y, { name: "id", control: i, render: ({
2800
+ /* @__PURE__ */ e.jsx(w, { name: "id", control: i, render: ({
2799
2801
  field: d
2800
2802
  }) => /* @__PURE__ */ e.jsx(I, { mb: t.spacing, size: t.size, required: !0, label: o("common.name"), placeholder: o("common.name_placeholder"), ...d }) }),
2801
- /* @__PURE__ */ e.jsx(y, { name: "content", control: i, render: ({
2803
+ /* @__PURE__ */ e.jsx(w, { name: "content", control: i, render: ({
2802
2804
  field: d
2803
2805
  }) => /* @__PURE__ */ e.jsxs(Ce, { gap: 4, children: [
2804
2806
  /* @__PURE__ */ e.jsx(ie, { size: "14px", fw: 500, c: "#212529", sx: {
@@ -2809,7 +2811,7 @@ function sa({
2809
2811
  /* @__PURE__ */ e.jsx(D, { justify: "flex-end", mt: t.spacing, children: /* @__PURE__ */ e.jsx(Q, { size: t.button.size }) })
2810
2812
  ] }) });
2811
2813
  }
2812
- function oa({
2814
+ function ia({
2813
2815
  onSuccess: a,
2814
2816
  styles: t = xe,
2815
2817
  ...s
@@ -2822,11 +2824,11 @@ function oa({
2822
2824
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2823
2825
  /* @__PURE__ */ e.jsx(ne, { opened: o, onClose: () => i(!1), title: n("global_sql_snippet.edit"), trapFocus: !0, onDragStart: (f) => {
2824
2826
  f.stopPropagation();
2825
- }, size: "80vw", children: /* @__PURE__ */ e.jsx(sa, { postSubmit: d, styles: t, ...s }) }),
2827
+ }, size: "80vw", children: /* @__PURE__ */ e.jsx(oa, { postSubmit: d, styles: t, ...s }) }),
2826
2828
  /* @__PURE__ */ e.jsx(O, { size: t.button.size, onClick: l, leftSection: /* @__PURE__ */ e.jsx($e, { size: 18 }), children: n("common.actions.edit") })
2827
2829
  ] });
2828
2830
  }
2829
- function ia({
2831
+ function ca({
2830
2832
  id: a,
2831
2833
  onSuccess: t,
2832
2834
  styles: s = xe
@@ -2880,15 +2882,15 @@ function ia({
2880
2882
  });
2881
2883
  return /* @__PURE__ */ e.jsx(O, { size: s.button.size, color: "red", onClick: l, leftSection: /* @__PURE__ */ e.jsx(Ue, { size: 20 }), children: n("common.actions.edit") });
2882
2884
  }
2883
- function ca({
2885
+ function la({
2884
2886
  content: a
2885
2887
  }) {
2886
2888
  return /* @__PURE__ */ e.jsxs(tt, { width: "60vw", shadow: "md", children: [
2887
- /* @__PURE__ */ e.jsx(tt.Target, { children: /* @__PURE__ */ e.jsx(Yt, { variant: "subtle", size: 16, children: /* @__PURE__ */ e.jsx(Yn, {}) }) }),
2888
- /* @__PURE__ */ e.jsx(tt.Dropdown, { children: /* @__PURE__ */ e.jsx(er, { code: a, language: "sql", withCopyButton: !1 }) })
2889
+ /* @__PURE__ */ e.jsx(tt.Target, { children: /* @__PURE__ */ e.jsx(Yt, { variant: "subtle", size: 16, children: /* @__PURE__ */ e.jsx(Vn, {}) }) }),
2890
+ /* @__PURE__ */ e.jsx(tt.Dropdown, { children: /* @__PURE__ */ e.jsx(tr, { code: a, language: "sql", withCopyButton: !1 }) })
2889
2891
  ] });
2890
2892
  }
2891
- const Da = ze("DataSourceList", ({
2893
+ const Ea = ze("DataSourceList", ({
2892
2894
  styles: a = xe
2893
2895
  }) => {
2894
2896
  const {
@@ -2913,7 +2915,7 @@ const Da = ze("DataSourceList", ({
2913
2915
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2914
2916
  /* @__PURE__ */ e.jsxs(D, { pt: a.spacing, justify: "space-between", children: [
2915
2917
  /* @__PURE__ */ e.jsx(Ht, { children: t("global_sql_snippet.description") }),
2916
- /* @__PURE__ */ e.jsx(aa, { onSuccess: o })
2918
+ /* @__PURE__ */ e.jsx(sa, { onSuccess: o })
2917
2919
  ] }),
2918
2920
  /* @__PURE__ */ e.jsxs(M, { mt: a.spacing, sx: {
2919
2921
  position: "relative"
@@ -2936,40 +2938,40 @@ const Da = ze("DataSourceList", ({
2936
2938
  } = i;
2937
2939
  return /* @__PURE__ */ e.jsxs(h.Tr, { children: [
2938
2940
  /* @__PURE__ */ e.jsx(h.Td, { children: l }),
2939
- /* @__PURE__ */ e.jsx(h.Td, { width: 50, children: /* @__PURE__ */ e.jsx(ca, { content: c }) }),
2941
+ /* @__PURE__ */ e.jsx(h.Td, { width: 50, children: /* @__PURE__ */ e.jsx(la, { content: c }) }),
2940
2942
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: d }),
2941
2943
  /* @__PURE__ */ e.jsx(h.Td, { width: 200, children: f }),
2942
2944
  /* @__PURE__ */ e.jsx(h.Td, { width: 400, children: /* @__PURE__ */ e.jsxs(D, { justify: "flex-start", children: [
2943
- /* @__PURE__ */ e.jsx(oa, { ...i, onSuccess: o }),
2944
- /* @__PURE__ */ e.jsx(ia, { id: l, onSuccess: o })
2945
+ /* @__PURE__ */ e.jsx(ia, { ...i, onSuccess: o }),
2946
+ /* @__PURE__ */ e.jsx(ca, { id: l, onSuccess: o })
2945
2947
  ] }) })
2946
2948
  ] }, l);
2947
2949
  }) })
2948
2950
  ] })
2949
2951
  ] })
2950
2952
  ] });
2951
- }), Ea = () => import("./package-d3b231ff.mjs").then(({
2953
+ }), Pa = () => import("./package-4ee5af7e.mjs").then(({
2952
2954
  version: a
2953
2955
  }) => (console.log(`[@devtable/settings-form] version: ${a}`), a));
2954
2956
  export {
2955
- A as APIClient,
2956
- za as APIKeyList,
2957
- Ca as AccountList,
2958
- ta as AddAPIKey,
2959
- Gr as AddAccount,
2960
- Lr as AddDataSource,
2961
- aa as AddSQLSnippet,
2962
- ya as DataSourceList,
2963
- sr as DefaultApiClient,
2964
- na as DeleteAPIKey,
2965
- Jr as DeleteAccount,
2966
- Hr as DeleteDataSource,
2967
- ia as DeleteSQLSnippet,
2968
- or as FacadeApiClient,
2969
- Ta as Login,
2970
- Da as SQLSnippetList,
2971
- oa as UpdateSQLSnippet,
2972
- cr as configureAPIClient,
2973
- ir as facadeApiClient,
2974
- Ea as getVersion
2957
+ R as APIClient,
2958
+ Da as APIKeyList,
2959
+ Ta as AccountList,
2960
+ na as AddAPIKey,
2961
+ Jr as AddAccount,
2962
+ qr as AddDataSource,
2963
+ sa as AddSQLSnippet,
2964
+ Ca as DataSourceList,
2965
+ or as DefaultApiClient,
2966
+ ra as DeleteAPIKey,
2967
+ Qr as DeleteAccount,
2968
+ Yr as DeleteDataSource,
2969
+ ca as DeleteSQLSnippet,
2970
+ ir as FacadeApiClient,
2971
+ za as Login,
2972
+ Ea as SQLSnippetList,
2973
+ ia as UpdateSQLSnippet,
2974
+ lr as configureAPIClient,
2975
+ cr as facadeApiClient,
2976
+ Pa as getVersion
2975
2977
  };