@devtable/settings-form 13.44.1 → 13.44.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/settings-form.es.js
CHANGED
|
@@ -2131,7 +2131,8 @@ function Gr({
|
|
|
2131
2131
|
title: n("common.state.successful"),
|
|
2132
2132
|
message: n("account.state.added"),
|
|
2133
2133
|
color: "green",
|
|
2134
|
-
autoClose: !0
|
|
2134
|
+
autoClose: !0,
|
|
2135
|
+
loading: !1
|
|
2135
2136
|
}), a();
|
|
2136
2137
|
} catch (x) {
|
|
2137
2138
|
E({
|
|
@@ -2139,7 +2140,8 @@ function Gr({
|
|
|
2139
2140
|
title: n("common.state.failed"),
|
|
2140
2141
|
message: x.message,
|
|
2141
2142
|
color: "red",
|
|
2142
|
-
autoClose: !0
|
|
2143
|
+
autoClose: !0,
|
|
2144
|
+
loading: !1
|
|
2143
2145
|
});
|
|
2144
2146
|
}
|
|
2145
2147
|
};
|
|
@@ -2201,7 +2203,8 @@ function Qr({
|
|
|
2201
2203
|
name: t
|
|
2202
2204
|
}),
|
|
2203
2205
|
color: "green",
|
|
2204
|
-
autoClose: !0
|
|
2206
|
+
autoClose: !0,
|
|
2207
|
+
loading: !1
|
|
2205
2208
|
}), s();
|
|
2206
2209
|
} catch (d) {
|
|
2207
2210
|
E({
|
|
@@ -2209,7 +2212,8 @@ function Qr({
|
|
|
2209
2212
|
title: o("common.state.failed"),
|
|
2210
2213
|
message: d.message,
|
|
2211
2214
|
color: "red",
|
|
2212
|
-
autoClose: !0
|
|
2215
|
+
autoClose: !0,
|
|
2216
|
+
loading: !1
|
|
2213
2217
|
});
|
|
2214
2218
|
}
|
|
2215
2219
|
}
|
|
@@ -2279,7 +2283,8 @@ function Xr({
|
|
|
2279
2283
|
title: l("common.state.successful"),
|
|
2280
2284
|
message: l("account.state.updated"),
|
|
2281
2285
|
color: "green",
|
|
2282
|
-
autoClose: !0
|
|
2286
|
+
autoClose: !0,
|
|
2287
|
+
loading: !1
|
|
2283
2288
|
}), o();
|
|
2284
2289
|
} catch (y) {
|
|
2285
2290
|
E({
|
|
@@ -2287,7 +2292,8 @@ function Xr({
|
|
|
2287
2292
|
title: l("common.state.failed"),
|
|
2288
2293
|
message: y.message,
|
|
2289
2294
|
color: "red",
|
|
2290
|
-
autoClose: !0
|
|
2295
|
+
autoClose: !0,
|
|
2296
|
+
loading: !1
|
|
2291
2297
|
});
|
|
2292
2298
|
}
|
|
2293
2299
|
}, [x, j] = f(["reset_password", "new_password"]);
|
|
@@ -2435,7 +2441,8 @@ function ea({
|
|
|
2435
2441
|
title: s("common.state.successful"),
|
|
2436
2442
|
message: s("account.state.logged_in"),
|
|
2437
2443
|
color: "green",
|
|
2438
|
-
autoClose: !0
|
|
2444
|
+
autoClose: !0,
|
|
2445
|
+
loading: !1
|
|
2439
2446
|
}), a(d);
|
|
2440
2447
|
} catch (d) {
|
|
2441
2448
|
E({
|
|
@@ -2443,7 +2450,8 @@ function ea({
|
|
|
2443
2450
|
title: s("common.state.failed"),
|
|
2444
2451
|
message: d.message,
|
|
2445
2452
|
color: "red",
|
|
2446
|
-
autoClose: !0
|
|
2453
|
+
autoClose: !0,
|
|
2454
|
+
loading: !1
|
|
2447
2455
|
});
|
|
2448
2456
|
}
|
|
2449
2457
|
};
|
|
@@ -2505,7 +2513,8 @@ function ta({
|
|
|
2505
2513
|
title: n("common.state.successful"),
|
|
2506
2514
|
message: n("api_key.state.added"),
|
|
2507
2515
|
color: "green",
|
|
2508
|
-
autoClose: !0
|
|
2516
|
+
autoClose: !0,
|
|
2517
|
+
loading: !1
|
|
2509
2518
|
}), a(f, m);
|
|
2510
2519
|
} catch (f) {
|
|
2511
2520
|
E({
|
|
@@ -2513,7 +2522,8 @@ function ta({
|
|
|
2513
2522
|
title: n("common.state.failed"),
|
|
2514
2523
|
message: f.message,
|
|
2515
2524
|
color: "red",
|
|
2516
|
-
autoClose: !0
|
|
2525
|
+
autoClose: !0,
|
|
2526
|
+
loading: !1
|
|
2517
2527
|
});
|
|
2518
2528
|
}
|
|
2519
2529
|
};
|
|
@@ -2590,7 +2600,8 @@ function ra({
|
|
|
2590
2600
|
name: t
|
|
2591
2601
|
}),
|
|
2592
2602
|
color: "green",
|
|
2593
|
-
autoClose: !0
|
|
2603
|
+
autoClose: !0,
|
|
2604
|
+
loading: !1
|
|
2594
2605
|
}), s();
|
|
2595
2606
|
} catch (d) {
|
|
2596
2607
|
E({
|
|
@@ -2598,7 +2609,8 @@ function ra({
|
|
|
2598
2609
|
title: o("common.state.failed"),
|
|
2599
2610
|
message: d.message,
|
|
2600
2611
|
color: "red",
|
|
2601
|
-
autoClose: !0
|
|
2612
|
+
autoClose: !0,
|
|
2613
|
+
loading: !1
|
|
2602
2614
|
});
|
|
2603
2615
|
}
|
|
2604
2616
|
}
|
|
@@ -2950,7 +2962,7 @@ const Ea = ze("DataSourceList", ({
|
|
|
2950
2962
|
] })
|
|
2951
2963
|
] })
|
|
2952
2964
|
] });
|
|
2953
|
-
}), Pa = () => import("./package-
|
|
2965
|
+
}), Pa = () => import("./package-1832d66f.mjs").then(({
|
|
2954
2966
|
version: a
|
|
2955
2967
|
}) => (console.log(`[@devtable/settings-form] version: ${a}`), a));
|
|
2956
2968
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(x,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react"),require("@mantine/core"),require("@mantine/notifications"),require("@tabler/icons-react"),require("react-i18next"),require("crypto-js"),require("lodash"),require("axios"),require("react-hook-form"),require("@monaco-editor/react"),require("i18next"),require("i18next-browser-languagedetector"),require("intl-pluralrules"),require("ahooks"),require("@mantine/modals"),require("@mantine/code-highlight")):typeof define=="function"&&define.amd?define(["exports","react","@mantine/core","@mantine/notifications","@tabler/icons-react","react-i18next","crypto-js","lodash","axios","react-hook-form","@monaco-editor/react","i18next","i18next-browser-languagedetector","intl-pluralrules","ahooks","@mantine/modals","@mantine/code-highlight"],P):(x=typeof globalThis<"u"?globalThis:x||self,P(x["settings-form"]={},x.react,x["@mantine/core"],x["@mantine/notifications"],x["@tabler/icons-react"],x["react-i18next"],x.CryptoJS,x._,x.axios,x["react-hook-form"],x["@monaco-editor/react"],x.i18next,x["i18next-browser-languagedetector"],x["intl-pluralrules"],x.ahooks,x["@mantine/modals"],x["@mantine/code-highlight"]))})(this,function(x,P,o,T,A,y,Yt,Vt,Qe,j,
|
|
1
|
+
(function(x,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("react"),require("@mantine/core"),require("@mantine/notifications"),require("@tabler/icons-react"),require("react-i18next"),require("crypto-js"),require("lodash"),require("axios"),require("react-hook-form"),require("@monaco-editor/react"),require("i18next"),require("i18next-browser-languagedetector"),require("intl-pluralrules"),require("ahooks"),require("@mantine/modals"),require("@mantine/code-highlight")):typeof define=="function"&&define.amd?define(["exports","react","@mantine/core","@mantine/notifications","@tabler/icons-react","react-i18next","crypto-js","lodash","axios","react-hook-form","@monaco-editor/react","i18next","i18next-browser-languagedetector","intl-pluralrules","ahooks","@mantine/modals","@mantine/code-highlight"],P):(x=typeof globalThis<"u"?globalThis:x||self,P(x["settings-form"]={},x.react,x["@mantine/core"],x["@mantine/notifications"],x["@tabler/icons-react"],x["react-i18next"],x.CryptoJS,x._,x.axios,x["react-hook-form"],x["@monaco-editor/react"],x.i18next,x["i18next-browser-languagedetector"],x["intl-pluralrules"],x.ahooks,x["@mantine/modals"],x["@mantine/code-highlight"]))})(this,function(x,P,o,T,A,y,Yt,Vt,Qe,j,pe,Gt,Wt,Aa,K,ae,Kt){"use strict";function Qt(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:()=>r[s]})}}return t.default=r,Object.freeze(t)}const Jt=Qt(Yt);var Oe={exports:{}},me={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Je;function Ht(){if(Je)return me;Je=1;var
|
|
9
|
+
*/var Je;function Ht(){if(Je)return me;Je=1;var r=P,t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(u,d,p){var h,b={},v=null,C=null;p!==void 0&&(v=""+p),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(C=d.ref);for(h in d)n.call(d,h)&&!l.hasOwnProperty(h)&&(b[h]=d[h]);if(u&&u.defaultProps)for(h in d=u.defaultProps,d)b[h]===void 0&&(b[h]=d[h]);return{$$typeof:t,type:u,key:v,ref:C,props:b,_owner:i.current}}return me.Fragment=s,me.jsx=c,me.jsxs=c,me}var he={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,23 +14,23 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var He;function Xt(){return He||(He=1,process.env.NODE_ENV!=="production"&&function(){var
|
|
18
|
-
`+Fe+
|
|
17
|
+
*/var He;function Xt(){return He||(He=1,process.env.NODE_ENV!=="production"&&function(){var r=P,t=Symbol.for("react.element"),s=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),q=Symbol.iterator,Y="@@iterator";function X(a){if(a===null||typeof a!="object")return null;var f=q&&a[q]||a[Y];return typeof f=="function"?f:null}var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function D(a){{for(var f=arguments.length,m=new Array(f>1?f-1:0),g=1;g<f;g++)m[g-1]=arguments[g];L("error",a,m)}}function L(a,f,m){{var g=k.ReactDebugCurrentFrame,w=g.getStackAddendum();w!==""&&(f+="%s",m=m.concat([w]));var E=m.map(function(S){return String(S)});E.unshift("Warning: "+f),Function.prototype.apply.call(console[a],console,E)}}var Z=!1,ce=!1,ke=!1,Zn=!1,ea=!1,jt;jt=Symbol.for("react.module.reference");function ta(a){return!!(typeof a=="string"||typeof a=="function"||a===n||a===l||ea||a===i||a===p||a===h||Zn||a===C||Z||ce||ke||typeof a=="object"&&a!==null&&(a.$$typeof===v||a.$$typeof===b||a.$$typeof===c||a.$$typeof===u||a.$$typeof===d||a.$$typeof===jt||a.getModuleId!==void 0))}function na(a,f,m){var g=a.displayName;if(g)return g;var w=f.displayName||f.name||"";return w!==""?m+"("+w+")":m}function _t(a){return a.displayName||"Context"}function G(a){if(a==null)return null;if(typeof a.tag=="number"&&D("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case n:return"Fragment";case s:return"Portal";case l:return"Profiler";case i:return"StrictMode";case p:return"Suspense";case h:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case u:var f=a;return _t(f)+".Consumer";case c:var m=a;return _t(m._context)+".Provider";case d:return na(a,a.render,"ForwardRef");case b:var g=a.displayName||null;return g!==null?g:G(a.type)||"Memo";case v:{var w=a,E=w._payload,S=w._init;try{return G(S(E))}catch{return null}}}return null}var te=Object.assign,ve=0,Tt,St,yt,wt,Ct,Dt,zt;function Et(){}Et.__reactDisabledLog=!0;function aa(){{if(ve===0){Tt=console.log,St=console.info,yt=console.warn,wt=console.error,Ct=console.group,Dt=console.groupCollapsed,zt=console.groupEnd;var a={configurable:!0,enumerable:!0,value:Et,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}ve++}}function ra(){{if(ve--,ve===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},a,{value:Tt}),info:te({},a,{value:St}),warn:te({},a,{value:yt}),error:te({},a,{value:wt}),group:te({},a,{value:Ct}),groupCollapsed:te({},a,{value:Dt}),groupEnd:te({},a,{value:zt})})}ve<0&&D("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ne=k.ReactCurrentDispatcher,Fe;function ze(a,f,m){{if(Fe===void 0)try{throw Error()}catch(w){var g=w.stack.trim().match(/\n( *(at )?)/);Fe=g&&g[1]||""}return`
|
|
18
|
+
`+Fe+a}}var Be=!1,Ee;{var sa=typeof WeakMap=="function"?WeakMap:Map;Ee=new sa}function At(a,f){if(!a||Be)return"";{var m=Ee.get(a);if(m!==void 0)return m}var g;Be=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var E;E=Ne.current,Ne.current=null,aa();try{if(f){var S=function(){throw Error()};if(Object.defineProperty(S.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(S,[])}catch(F){g=F}Reflect.construct(a,[],S)}else{try{S.call()}catch(F){g=F}a.call(S.prototype)}}else{try{throw Error()}catch(F){g=F}a()}}catch(F){if(F&&g&&typeof F.stack=="string"){for(var _=F.stack.split(`
|
|
19
19
|
`),N=g.stack.split(`
|
|
20
20
|
`),$=_.length-1,M=N.length-1;$>=1&&M>=0&&_[$]!==N[M];)M--;for(;$>=1&&M>=0;$--,M--)if(_[$]!==N[M]){if($!==1||M!==1)do if($--,M--,M<0||_[$]!==N[M]){var B=`
|
|
21
|
-
`+_[$].replace(" at new "," at ");return
|
|
21
|
+
`+_[$].replace(" at new "," at ");return a.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",a.displayName)),typeof a=="function"&&Ee.set(a,B),B}while($>=1&&M>=0);break}}}finally{Be=!1,Ne.current=E,ra(),Error.prepareStackTrace=w}var fe=a?a.displayName||a.name:"",ne=fe?ze(fe):"";return typeof a=="function"&&Ee.set(a,ne),ne}function ia(a,f,m){return At(a,!1)}function oa(a){var f=a.prototype;return!!(f&&f.isReactComponent)}function Ae(a,f,m){if(a==null)return"";if(typeof a=="function")return At(a,oa(a));if(typeof a=="string")return ze(a);switch(a){case p:return ze("Suspense");case h:return ze("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case d:return ia(a.render);case b:return Ae(a.type,f,m);case v:{var g=a,w=g._payload,E=g._init;try{return Ae(E(w),f,m)}catch{}}}return""}var je=Object.prototype.hasOwnProperty,Pt={},Ot=k.ReactDebugCurrentFrame;function Pe(a){if(a){var f=a._owner,m=Ae(a.type,a._source,f?f.type:null);Ot.setExtraStackFrame(m)}else Ot.setExtraStackFrame(null)}function la(a,f,m,g,w){{var E=Function.call.bind(je);for(var S in a)if(E(a,S)){var _=void 0;try{if(typeof a[S]!="function"){var N=Error((g||"React class")+": "+m+" type `"+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[S]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw N.name="Invariant Violation",N}_=a[S](f,S,g,m,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($){_=$}_&&!(_ instanceof Error)&&(Pe(w),D("%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",m,S,typeof _),Pe(null)),_ instanceof Error&&!(_.message in Pt)&&(Pt[_.message]=!0,Pe(w),D("Failed %s type: %s",m,_.message),Pe(null))}}}var ua=Array.isArray;function Ue(a){return ua(a)}function ca(a){{var f=typeof Symbol=="function"&&Symbol.toStringTag,m=f&&a[Symbol.toStringTag]||a.constructor.name||"Object";return m}}function da(a){try{return $t(a),!1}catch{return!0}}function $t(a){return""+a}function Mt(a){if(da(a))return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ca(a)),$t(a)}var _e=k.ReactCurrentOwner,fa={key:!0,ref:!0,__self:!0,__source:!0},It,Rt,Ye;Ye={};function pa(a){if(je.call(a,"ref")){var f=Object.getOwnPropertyDescriptor(a,"ref").get;if(f&&f.isReactWarning)return!1}return a.ref!==void 0}function ma(a){if(je.call(a,"key")){var f=Object.getOwnPropertyDescriptor(a,"key").get;if(f&&f.isReactWarning)return!1}return a.key!==void 0}function ha(a,f){if(typeof a.ref=="string"&&_e.current&&f&&_e.current.stateNode!==f){var m=G(_e.current.type);Ye[m]||(D('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',G(_e.current.type),a.ref),Ye[m]=!0)}}function ga(a,f){{var m=function(){It||(It=!0,D("%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)",f))};m.isReactWarning=!0,Object.defineProperty(a,"key",{get:m,configurable:!0})}}function xa(a,f){{var m=function(){Rt||(Rt=!0,D("%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)",f))};m.isReactWarning=!0,Object.defineProperty(a,"ref",{get:m,configurable:!0})}}var ba=function(a,f,m,g,w,E,S){var _={$$typeof:t,type:a,key:f,ref:m,props:S,_owner:E};return _._store={},Object.defineProperty(_._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(_,"_self",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.defineProperty(_,"_source",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.freeze&&(Object.freeze(_.props),Object.freeze(_)),_};function va(a,f,m,g,w){{var E,S={},_=null,N=null;m!==void 0&&(Mt(m),_=""+m),ma(f)&&(Mt(f.key),_=""+f.key),pa(f)&&(N=f.ref,ha(f,w));for(E in f)je.call(f,E)&&!fa.hasOwnProperty(E)&&(S[E]=f[E]);if(a&&a.defaultProps){var $=a.defaultProps;for(E in $)S[E]===void 0&&(S[E]=$[E])}if(_||N){var M=typeof a=="function"?a.displayName||a.name||"Unknown":a;_&&ga(S,M),N&&xa(S,M)}return ba(a,_,N,w,g,_e.current,S)}}var Ve=k.ReactCurrentOwner,Lt=k.ReactDebugCurrentFrame;function de(a){if(a){var f=a._owner,m=Ae(a.type,a._source,f?f.type:null);Lt.setExtraStackFrame(m)}else Lt.setExtraStackFrame(null)}var Ge;Ge=!1;function We(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function qt(){{if(Ve.current){var a=G(Ve.current.type);if(a)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+a+"`."}return""}}function ja(a){{if(a!==void 0){var f=a.fileName.replace(/^.*[\\\/]/,""),m=a.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+
|
|
25
|
+
Check your code at `+f+":"+m+"."}return""}}var kt={};function _a(a){{var f=qt();if(!f){var m=typeof a=="string"?a:a.displayName||a.name;m&&(f=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+m+">.")}return
|
|
27
|
+
Check the top-level render call using <`+m+">.")}return f}}function Nt(a,f){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var m=_a(f);if(kt[m])return;kt[m]=!0;var g="";a&&a._owner&&a._owner!==Ve.current&&(g=" It was passed a child from "+G(a._owner.type)+"."),de(a),D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',m,g),de(null)}}function Ft(a,f){{if(typeof a!="object")return;if(Ue(a))for(var m=0;m<a.length;m++){var g=a[m];We(g)&&Nt(g,f)}else if(We(a))a._store&&(a._store.validated=!0);else if(a){var w=X(a);if(typeof w=="function"&&w!==a.entries)for(var E=w.call(a),S;!(S=E.next()).done;)We(S.value)&&Nt(S.value,f)}}}function Ta(a){{var f=a.type;if(f==null||typeof f=="string")return;var m;if(typeof f=="function")m=f.propTypes;else if(typeof f=="object"&&(f.$$typeof===d||f.$$typeof===b))m=f.propTypes;else return;if(m){var g=G(f);la(m,a.props,"prop",g,a)}else if(f.PropTypes!==void 0&&!Ge){Ge=!0;var w=G(f);D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w||"Unknown")}typeof f.getDefaultProps=="function"&&!f.getDefaultProps.isReactClassApproved&&D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Sa(a){{for(var f=Object.keys(a.props),m=0;m<f.length;m++){var g=f[m];if(g!=="children"&&g!=="key"){de(a),D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",g),de(null);break}}a.ref!==null&&(de(a),D("Invalid attribute `ref` supplied to `React.Fragment`."),de(null))}}var Bt={};function Ut(a,f,m,g,w,E){{var S=ta(a);if(!S){var _="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(_+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var N=ja(w);N?_+=N:_+=qt();var $;a===null?$="null":Ue(a)?$="array":a!==void 0&&a.$$typeof===t?($="<"+(G(a.type)||"Unknown")+" />",_=" Did you accidentally export a JSX literal instead of a component?"):$=typeof a,D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$,_)}var M=va(a,f,m,w,E);if(M==null)return M;if(S){var B=f.children;if(B!==void 0)if(g)if(Ue(B)){for(var fe=0;fe<B.length;fe++)Ft(B[fe],a);Object.freeze&&Object.freeze(B)}else D("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ft(B,a)}if(je.call(f,"key")){var ne=G(a),F=Object.keys(f).filter(function(Ea){return Ea!=="key"}),Ke=F.length>0?"{key: someKey, "+F.join(": ..., ")+": ...}":"{key: someKey}";if(!Bt[ne+Ke]){var za=F.length>0?"{"+F.join(": ..., ")+": ...}":"{}";D(`A props object containing a "key" prop is being spread into JSX:
|
|
28
28
|
let props = %s;
|
|
29
29
|
<%s {...props} />
|
|
30
30
|
React keys must be passed directly to JSX without using spread:
|
|
31
31
|
let props = %s;
|
|
32
|
-
<%s key={someKey} {...props} />`,Ke,ne,zr,ne),Bt[ne+Ke]=!0}}return r===n?Sr(M):Tr(M),M}}function yr(r,p,m){return Ut(r,p,m,!0)}function wr(r,p,m){return Ut(r,p,m,!1)}var Cr=wr,Dr=yr;he.Fragment=n,he.jsx=Cr,he.jsxs=Dr}()),he}process.env.NODE_ENV==="production"?Oe.exports=Ht():Oe.exports=Xt();var e=Oe.exports;function Zt(a){a=a||{};const t=Object.keys(a).sort(),s=[];for(let n=0;n<t.length;n++){const i=t[n];if(i!="authentication"&&a[i])s.push(t[n]+"="+(typeof a[i]=="object"?JSON.stringify(a[i]):a[i]));else{const l=Object.keys(a[i]).sort();for(let c=0;c<l.length;c++){const u=l[c];u!="sign"&&a[i][u]&&s.push(l[c]+"="+(typeof a[i][u]=="object"?JSON.stringify(a[i][u]):a[i][u]))}}}return s.sort().join("&")}function en(a,t){let s=Zt(a);return s+="&key="+t,Jt.MD5(s).toString().toUpperCase()}class Xe{constructor(){this.type="default_api_client",this.baseURL="http://localhost:31200",this.app_id="",this.app_secret=""}getAuthentication(t){if(!this.app_id||!this.app_secret)return;const s=new Date().getTime().toString();return{app_id:this.app_id,nonce_str:s,sign:en({app_id:this.app_id,nonce_str:s,...t},this.app_secret)}}getRequest(t,s){return(n,i,l,c)=>{const u=this.buildHeader(l),d=this.buildAxiosConfig(t,n,i,l,u,s);return Qe(d).then(f=>c?f:f.data).catch(f=>{if(Qe.isCancel(f))return Promise.reject(f);const h=f,b=Vt.get(h,"response.data.detail.message",h.message);return Promise.reject(new Error(b))})}}get(t){return this.getRequest("GET",t)}post(t){return this.getRequest("POST",t)}put(t){return this.getRequest("PUT",t)}buildAxiosConfig(t,s,n,i,l,c){const u={baseURL:this.baseURL,method:t,url:s,params:t==="GET"?n:i.params,headers:l,signal:c};return["POST","PUT"].includes(t)&&(u.data=i.string?JSON.stringify(n):n,u.data.authentication=this.getAuthentication(u.data)),u}buildHeader(t){const s=window.localStorage.getItem("token");return{"X-Requested-With":"XMLHttpRequest","Content-Type":t.string?"application/x-www-form-urlencoded":"application/json",authorization:s?`bearer ${s}`:"",...t.headers}}}class Ze{constructor(t){this.implementation=t}getRequest(t,s){return this.implementation.getRequest(t,s)}get(t){return this.getRequest("GET",t)}post(t){return this.getRequest("POST",t)}put(t){return this.getRequest("PUT",t)}}const ge=new Xe,et=new Ze(ge),O=et;function tt(a){ge.baseURL!==a.apiBaseURL&&(ge.baseURL=a.apiBaseURL),a.app_id&&(ge.app_id=a.app_id),a.app_secret&&(ge.app_secret=a.app_secret)}const tn={login:async(a,t)=>{const s={name:a,password:t};return await O.post()("/account/login",s,{})},list:async()=>await O.post()("/account/list",{filter:{},sort:[{field:"name",order:"ASC"}],pagination:{page:1,pagesize:100}},{}),get:async()=>await O.get()("/account/get",{},{}),update:async(a,t)=>{const s={name:a.trim(),email:t.trim()};return await O.put()("/account/update",s,{})},changepassword:async(a,t)=>{const s={old_password:a.trim(),new_password:t.trim()};return await O.post()("/account/changepassword",s,{})},create:async(a,t,s,n)=>await O.post()("/account/create",{name:a.trim(),email:t.trim(),password:s.trim(),role_id:n},{}),edit:async a=>(a.reset_password||(a.new_password=void 0),await O.put()("/account/edit",a,{})),delete:async a=>{if(a)return O.post()("/account/delete",{id:a},{})}},nn={list:async()=>await O.post()("/api/key/list",{filter:{search:""},sort:[{field:"name",order:"ASC"}],pagination:{page:1,pagesize:100}},{}),create:async(a,t)=>O.post()("/api/key/create",{name:a,role_id:t},{}),delete:async a=>{if(a)return O.post()("/api/key/delete",{id:a},{})}},rn={list:async()=>await O.post()("/datasource/list",{filter:{},sort:[{field:"create_time",order:"ASC"}],pagination:{page:1,pagesize:100}},{}),create:async(a,t,s)=>await O.post()("/datasource/create",{type:a,key:t,config:s},{}),update:async(a,t)=>await O.put()("/datasource/update",{id:a,config:t},{}),delete:async a=>{await O.post()("/datasource/delete",{id:a},{})}},an={list:async()=>await O.get()("/role/list",{},{})};var nt=60,rt=nt*60,at=rt*24,sn=at*7,ae=1e3,$e=nt*ae,st=rt*ae,on=at*ae,ln=sn*ae,Me="millisecond",se="second",ie="minute",oe="hour",Q="day",Te="week",U="month",it="quarter",J="year",le="date",un="YYYY-MM-DDTHH:mm:ssZ",ot="Invalid Date",cn=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,dn=/\[([^\]]+)]|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;const pn={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var s=["th","st","nd","rd"],n=t%100;return"["+t+(s[(n-20)%10]||s[n]||s[0])+"]"}};var Ie=function(t,s,n){var i=String(t);return!i||i.length>=s?t:""+Array(s+1-i.length).join(n)+t},fn=function(t){var s=-t.utcOffset(),n=Math.abs(s),i=Math.floor(n/60),l=n%60;return(s<=0?"+":"-")+Ie(i,2,"0")+":"+Ie(l,2,"0")},mn=function a(t,s){if(t.date()<s.date())return-a(s,t);var n=(s.year()-t.year())*12+(s.month()-t.month()),i=t.clone().add(n,U),l=s-i<0,c=t.clone().add(n+(l?-1:1),U);return+(-(n+(s-i)/(l?i-c:c-i))||0)},hn=function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},gn=function(t){var s={M:U,y:J,w:Te,d:Q,D:le,h:oe,m:ie,s:se,ms:Me,Q:it};return s[t]||String(t||"").toLowerCase().replace(/s$/,"")},xn=function(t){return t===void 0};const bn={s:Ie,z:fn,m:mn,a:hn,p:gn,u:xn};var xe="en",ee={};ee[xe]=pn;var Re=function(t){return t instanceof ye},Se=function a(t,s,n){var i;if(!t)return xe;if(typeof t=="string"){var l=t.toLowerCase();ee[l]&&(i=l),s&&(ee[l]=s,i=l);var c=t.split("-");if(!i&&c.length>1)return a(c[0])}else{var u=t.name;ee[u]=t,i=u}return!n&&i&&(xe=i),i||!n&&xe},I=function(t,s){if(Re(t))return t.clone();var n=typeof s=="object"?s:{};return n.date=t,n.args=arguments,new ye(n)},vn=function(t,s){return I(t,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})},z=bn;z.l=Se,z.i=Re,z.w=vn;var jn=function(t){var s=t.date,n=t.utc;if(s===null)return new Date(NaN);if(z.u(s))return new Date;if(s instanceof Date)return new Date(s);if(typeof s=="string"&&!/Z$/i.test(s)){var i=s.match(cn);if(i){var l=i[2]-1||0,c=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],l,i[3]||1,i[4]||0,i[5]||0,i[6]||0,c)):new Date(i[1],l,i[3]||1,i[4]||0,i[5]||0,i[6]||0,c)}}return new Date(s)},ye=function(){function a(s){this.$L=Se(s.locale,null,!0),this.parse(s)}var t=a.prototype;return t.parse=function(n){this.$d=jn(n),this.$x=n.x||{},this.init()},t.init=function(){var n=this.$d;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()},t.$utils=function(){return z},t.isValid=function(){return this.$d.toString()!==ot},t.isSame=function(n,i){var l=I(n);return this.startOf(i)<=l&&l<=this.endOf(i)},t.isAfter=function(n,i){return I(n)<this.startOf(i)},t.isBefore=function(n,i){return this.endOf(i)<I(n)},t.$g=function(n,i,l){return z.u(n)?this[i]:this.set(l,n)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(n,i){var l=this,c=z.u(i)?!0:i,u=z.p(n),d=function(k,D){var L=z.w(l.$u?Date.UTC(l.$y,D,k):new Date(l.$y,D,k),l);return c?L:L.endOf(Q)},f=function(k,D){var L=[0,0,0,0],Z=[23,59,59,999];return z.w(l.toDate()[k].apply(l.toDate("s"),(c?L:Z).slice(D)),l)},h=this.$W,b=this.$M,v=this.$D,C="set"+(this.$u?"UTC":"");switch(u){case J:return c?d(1,0):d(31,11);case U:return c?d(1,b):d(0,b+1);case Te:{var q=this.$locale().weekStart||0,Y=(h<q?h+7:h)-q;return d(c?v-Y:v+(6-Y),b)}case Q:case le:return f(C+"Hours",0);case oe:return f(C+"Minutes",1);case ie:return f(C+"Seconds",2);case se:return f(C+"Milliseconds",3);default:return this.clone()}},t.endOf=function(n){return this.startOf(n,!1)},t.$set=function(n,i){var l,c=z.p(n),u="set"+(this.$u?"UTC":""),d=(l={},l[Q]=u+"Date",l[le]=u+"Date",l[U]=u+"Month",l[J]=u+"FullYear",l[oe]=u+"Hours",l[ie]=u+"Minutes",l[se]=u+"Seconds",l[Me]=u+"Milliseconds",l)[c],f=c===Q?this.$D+(i-this.$W):i;if(c===U||c===J){var h=this.clone().set(le,1);h.$d[d](f),h.init(),this.$d=h.set(le,Math.min(this.$D,h.daysInMonth())).$d}else d&&this.$d[d](f);return this.init(),this},t.set=function(n,i){return this.clone().$set(n,i)},t.get=function(n){return this[z.p(n)]()},t.add=function(n,i){var l=this,c;n=Number(n);var u=z.p(i),d=function(v){var C=I(l);return z.w(C.date(C.date()+Math.round(v*n)),l)};if(u===U)return this.set(U,this.$M+n);if(u===J)return this.set(J,this.$y+n);if(u===Q)return d(1);if(u===Te)return d(7);var f=(c={},c[ie]=$e,c[oe]=st,c[se]=ae,c)[u]||1,h=this.$d.getTime()+n*f;return z.w(h,this)},t.subtract=function(n,i){return this.add(n*-1,i)},t.format=function(n){var i=this,l=this.$locale();if(!this.isValid())return l.invalidDate||ot;var c=n||un,u=z.z(this),d=this.$H,f=this.$m,h=this.$M,b=l.weekdays,v=l.months,C=l.meridiem,q=function(L,Z,ce,ke){return L&&(L[Z]||L(i,c))||ce[Z].slice(0,ke)},Y=function(L){return z.s(d%12||12,L,"0")},X=C||function(D,L,Z){var ce=D<12?"AM":"PM";return Z?ce.toLowerCase():ce},k=function(L){switch(L){case"YY":return String(i.$y).slice(-2);case"YYYY":return z.s(i.$y,4,"0");case"M":return h+1;case"MM":return z.s(h+1,2,"0");case"MMM":return q(l.monthsShort,h,v,3);case"MMMM":return q(v,h);case"D":return i.$D;case"DD":return z.s(i.$D,2,"0");case"d":return String(i.$W);case"dd":return q(l.weekdaysMin,i.$W,b,2);case"ddd":return q(l.weekdaysShort,i.$W,b,3);case"dddd":return b[i.$W];case"H":return String(d);case"HH":return z.s(d,2,"0");case"h":return Y(1);case"hh":return Y(2);case"a":return X(d,f,!0);case"A":return X(d,f,!1);case"m":return String(f);case"mm":return z.s(f,2,"0");case"s":return String(i.$s);case"ss":return z.s(i.$s,2,"0");case"SSS":return z.s(i.$ms,3,"0");case"Z":return u}return null};return c.replace(dn,function(D,L){return L||k(D)||u.replace(":","")})},t.utcOffset=function(){return-Math.round(this.$d.getTimezoneOffset()/15)*15},t.diff=function(n,i,l){var c=this,u=z.p(i),d=I(n),f=(d.utcOffset()-this.utcOffset())*$e,h=this-d,b=function(){return z.m(c,d)},v;switch(u){case J:v=b()/12;break;case U:v=b();break;case it:v=b()/3;break;case Te:v=(h-f)/ln;break;case Q:v=(h-f)/on;break;case oe:v=h/st;break;case ie:v=h/$e;break;case se:v=h/ae;break;default:v=h;break}return l?v:z.a(v)},t.daysInMonth=function(){return this.endOf(U).$D},t.$locale=function(){return ee[this.$L]},t.locale=function(n,i){if(!n)return this.$L;var l=this.clone(),c=Se(n,i,!0);return c&&(l.$L=c),l},t.clone=function(){return z.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},a}(),lt=ye.prototype;I.prototype=lt,[["$ms",Me],["$s",se],["$m",ie],["$H",oe],["$W",Q],["$M",U],["$y",J],["$D",le]].forEach(function(a){lt[a[1]]=function(t){return this.$g(t,a[0],a[1])}}),I.extend=function(a,t){return a.$i||(a(t,ye,I),a.$i=!0),I},I.locale=Se,I.isDayjs=Re,I.unix=function(a){return I(a*1e3)},I.en=ee[xe],I.Ls=ee,I.p={};const R={datasource:rn,account:tn,role:an,api_key:nn,sql_snippet:{list:async({pagination:a},t)=>{const s=await O.post(t)("/sql_snippet/list",{sort:[{field:"update_time",order:"DESC"}],pagination:a},{});return s.data.forEach(n=>{n.create_time=I(n.create_time).format("YYYY-MM-DD HH:mm:ss"),n.update_time=I(n.update_time).format("YYYY-MM-DD HH:mm:ss")}),s},get:async(a,t)=>await O.post(t)("/sql_snippet/get",{id:a},{}),create:async(a,t)=>await O.post(t)("/sql_snippet/create",a,{}),update:async(a,t)=>await O.put(t)("/sql_snippet/update",a,{}),delete:async(a,t)=>O.post(t)("/sql_snippet/delete",{id:a},{})}},V={size:"sm",spacing:"md",button:{size:"xs"}};function _n({styles:a=V}){return e.jsx(o.Box,{mx:"auto",children:e.jsx(o.Alert,{mt:a.spacing,icon:e.jsx(A.IconAlertCircle,{size:16}),children:e.jsxs(y.Trans,{i18nKey:"datasource.db.permission_tip",children:["Only ",e.jsx("b",{children:"SELECT"})," privilege is needed."]})})})}const ut=P.forwardRef(({value:a,onChange:t,height:s="200px",defaultLanguage:n="sql"},i)=>{const l=u=>{t==null||t(u??"")},c=!t;return e.jsx(fe,{className:"minimal-monaco-editor",height:s,defaultLanguage:n,value:a,onChange:c?void 0:l,theme:"vs-dark",options:{lineNumbers:"off",folding:!1,lineDecorationsWidth:20,lineNumbersMinChars:0,wordWrap:"on",minimap:{enabled:!1},readOnly:c||!t}})});function W({size:a,disabled:t}){const{t:s}=y.useTranslation();return e.jsx(o.Button,{type:"submit",color:"green",leftSection:e.jsx(A.IconDeviceFloppy,{size:16}),size:a,disabled:t,children:s("common.actions.submit")})}const Tn={translation:{datasource:{label:"Data Source",add:"Add a data source",edit:"Edit data source",connection_info:"Connection Info",db:{host:"Host",port:"Port",username:"Username",password:"Password",database:"Database",permission_tip:"Only <1>SELECT</1> privilege is needed."},cant_edit:{db:"Only HTTP datasources can be edited",preset:"This is a preset datasource, it can not be changed"},delete:{title:"Delete this data source?",hint:"This action won't affect your database or HTTP service.",cant_delete_preset:"This is a preset datasource, it can not be deleted"},http:{base_url:"Base URL",processing:{pre:{label:"Pre processing of queries",description:"This function will run before sending the request (for scenarios like encryption)"},post:{label:"Post processing of queries",description:"This function will run after getting a response (for scenarios like decryption)"}}},state:{adding:"Adding data source...",added:"Data source is added",updating:"Updating data source...",updated:"Data source is updated",deleting:"Deleting data source...",deleted:"Data source [{{name}}] is deleted"}},account:{label:"Account",add:"Add an account",edit:"Edit account",editing_xx:"Editing account [{{name}}]",username:"Username",email:"Email",password:"Password",password_hint:"Password must be at least 8 characters long",new_password:"New password",reset_password:"Reset password",state:{adding:"Adding account...",added:"Account is added",updating:"Updating account...",updated:"Account is updated",deleting:"Deleting account...",deleted:"Account [{{name}}] is deleted",logging_in:"Logging in...",logged_in:"Logged in"},delete:"Delete this account?"},global_sql_snippet:{label:"Global SQL Snippet",add:"Add a snippet",edit:"Edit snippet",content:"Content",description:"Global SQL Snippets are shared among dashboards",state:{adding:"Adding snippet...",added:"Snippet is added",updating:"Updating snippet...",updated:"Snippet is updated",deleting:"Deleting snippet...",deleted:"Snippet [{{name}}] is deleted"},delete:"Delete this snippet?"},api_key:{label:"API Key",add:"Add an API Key",edit:"Edit API key",app_id:"APP ID",app_secret:"APP Secret",state:{adding:"Adding API key...",added:"API key is added",updating:"Updating API key...",updated:"API Key is updated",deleting:"Deleting API key...",deleted:"API key [{{name}}] is deleted"},save:{title:"API Key is generated",warn:"Make sure you save it - you won't be able to access it again.",saved:"I've saved this API Key"},delete:"Delete this key?"},role:{label:"Role"},common:{type:"Type",name:"Name",name_placeholder:"A unique name",created_at:"Created At",updated_at:"Updated At",state:{pending:"Pending",successful:"Successful",failed:"Failed"},action:"Action",actions:{edit:"Edit",delete:"Delete",submit:"Submit",reset_to_default:"Reset to default",cancel:"Cancel",save:"Save",confirm:"Confirm"}}}},Sn={translation:{datasource:{label:"数据源",add:"添加数据源",edit:"编辑数据源",connection_info:"连接信息",db:{host:"主机(host)",port:"端口(port)",username:"用户名(username)",password:"密码(password)",database:"数据库(database)",permission_tip:"只需具备 <1>SELECT</1> 权限"},cant_edit:{db:"只有HTTP数据源可以编辑",preset:"这是预设数据源,不可编辑"},delete:{title:"删除这个数据源?",hint:"此操作不会影响您的数据库或HTTP服务",cant_delete_preset:"这是预设数据源,不可删除"},http:{base_url:"访问地址",processing:{pre:{label:"查询请求预处理",description:"此函数在请求发起前执行(例如加密场景)"},post:{label:"查询请求后处理",description:"此函数在请求获得响应后执行(例如解密场景)"}}},state:{adding:"正在添加数据源...",added:"数据源已添加",updating:"正在更新数据源...",updated:"数据源已更新",deleting:"正在删除数据源...",deleted:'数据源"{{name}}"已删除'}},account:{label:"账户",add:"添加账户",edit:"编辑账户",editing_xx:'正在编辑账户 "{{name}}"',username:"用户名",email:"邮箱",password:"密码",password_hint:"密码得至少包含8个字符",new_password:"新密码",reset_password:"重置密码",state:{adding:"正在添加账户...",added:"账户已添加",updating:"正在更新账户...",updated:"账户已更新",deleting:"正在删除账户...",deleted:'账户"{{name}}"已删除',logging_in:"正在登录...",logged_in:"已登录"},delete:"删除这个账户?"},global_sql_snippet:{label:"全局SQL片段",add:"添加片段",edit:"编辑片段",content:"SQL片段内容",description:"在制作任何看板时,既可以制订该看板自己的SQL片段,也可以使用这里的全局SQL片段",state:{adding:"正在添加片段...",added:"片段已添加",updating:"正在更新片段...",updated:"片段已更新",deleting:"正在删除片段...",deleted:'片段"{{name}}"已删除'},delete:"删除这个片段?"},api_key:{label:"API令牌",add:"添加令牌",edit:"编辑令牌",app_id:"应用ID",app_secret:"应用密钥",state:{adding:"正在添加令牌...",added:"令牌已添加",updating:"正在更新令牌...",updated:"令牌已更新",deleting:"正在删除令牌...",deleted:'令牌"{{name}}"已删除'},save:{title:"API令牌已生成",warn:"此信息只出现一次,请务必保存",saved:"我已保存"},delete:"删除这个片段?"},role:{label:"角色"},common:{type:"类型",name:"名称",name_placeholder:"名称须唯一",created_at:"创建时间",updated_at:"更新时间",state:{pending:"处理中",successful:"成功",failed:"失败"},action:"动作",actions:{edit:"编辑",delete:"删除",submit:"提交",reset_to_default:"还原为默认值",cancel:"取消",save:"保存",confirm:"确认"}}}},Le=Gt.createInstance({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},resources:{en:Tn,zh:Sn}}).use(Wt).use(y.initReactI18next);Le.init();function yn({lang:a,children:t}){return P.useEffect(()=>{Le.changeLanguage(a)},[a]),e.jsx(y.I18nextProvider,{i18n:Le,children:t})}const wn=a=>a.replace(/([^:])(\/\/+)/g,"$1/");function Cn(a){P.useEffect(()=>{if(fe.loader.__getMonacoInstance())return;console.log("loading monaco for @devtable/settings-form");const s=wn(a);fe.loader.config({paths:{vs:s}}),fe.loader.init().then(n=>console.log("monaco instance:",n))},[])}function be(a,t){const s=n=>{const{lang:i,config:l,...c}=n;return tt(l),Cn(l.monacoPath),e.jsx(P.Suspense,{fallback:e.jsx(o.Loader,{color:"gray"}),children:e.jsx(yn,{lang:i,children:e.jsx(t,{...c})})})};return s.displayName=`withEntry(${a})`,s}function Dn({submit:a,styles:t=V,type:s}){const{t:n}=y.useTranslation(),{control:i,setValue:l,handleSubmit:c}=j.useForm({defaultValues:{type:s,key:"",config:{host:"",port:5432,username:"",password:"",database:""}}});return P.useEffect(()=>{l("type",s)},[l,s]),e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:c(a),children:[e.jsx(j.Controller,{name:"key",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("common.name"),placeholder:n("common.name_placeholder"),...u})}),e.jsx(o.Divider,{label:n("datasource.connection_info"),labelPosition:"center"}),e.jsxs(o.Group,{grow:!0,children:[e.jsx(j.Controller,{name:"config.host",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.host"),sx:{flexGrow:1},...u})}),e.jsx(j.Controller,{name:"config.port",control:i,render:({field:u})=>e.jsx(o.NumberInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.port"),hideControls:!0,sx:{width:"8em"},...u})})]}),e.jsx(j.Controller,{name:"config.username",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.username"),...u})}),e.jsx(j.Controller,{name:"config.password",control:i,render:({field:u})=>e.jsx(o.PasswordInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.password"),...u})}),e.jsx(j.Controller,{name:"config.database",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.database"),...u})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}const zn=({value:a,onChange:t})=>{const s=n=>{n&&t(n)};return e.jsx(o.Box,{sx:{position:"relative"},children:e.jsx(fe,{height:"500px",defaultLanguage:"javascript",value:a,onChange:s,theme:"vs-dark",options:{minimap:{enabled:!1}}})})},we=P.forwardRef(({value:a,onChange:t,label:s,modalTitle:n,defaultValue:i,styles:l},c)=>{const{t:u}=y.useTranslation(),[d,{setTrue:f,setFalse:h}]=K.useBoolean(),[b,v]=P.useState(a),C=()=>{h(),t(b)},q=()=>{h(),v(a)},Y=()=>{v(i)};return P.useEffect(()=>{v(a)},[a]),e.jsxs(e.Fragment,{children:[e.jsx(o.Button,{color:"grape",variant:"filled",leftSection:e.jsx(A.IconMathFunction,{size:16}),size:l.button.size,onClick:f,sx:{flexGrow:1},children:s}),e.jsx(o.Modal,{size:800,title:n,opened:d,onClose:h,closeOnClickOutside:!1,withCloseButton:!1,children:d&&e.jsxs(o.Stack,{children:[e.jsx(zn,{value:b,onChange:v}),e.jsxs(o.Group,{justify:"space-between",children:[e.jsx(o.Button,{size:l.button.size,onClick:Y,color:"red",leftSection:e.jsx(A.IconRecycle,{size:20}),children:u("common.actions.reset_to_default")}),e.jsxs(o.Group,{justify:"flex-end",children:[e.jsx(o.Button,{size:l.button.size,onClick:q,variant:"subtle",children:u("common.actions.cancel")}),e.jsx(o.Button,{size:l.button.size,color:"green",leftSection:e.jsx(A.IconDeviceFloppy,{size:16}),onClick:C,children:u("common.actions.save")})]})]})]})})]})}),Ce={pre:["function pre_process({ method, url, params, headers, data }, utils) {"," // your code goes here"," return { method, url, params, headers, data }","}"].join(`
|
|
32
|
+
<%s key={someKey} {...props} />`,Ke,ne,za,ne),Bt[ne+Ke]=!0}}return a===n?Sa(M):Ta(M),M}}function ya(a,f,m){return Ut(a,f,m,!0)}function wa(a,f,m){return Ut(a,f,m,!1)}var Ca=wa,Da=ya;he.Fragment=n,he.jsx=Ca,he.jsxs=Da}()),he}process.env.NODE_ENV==="production"?Oe.exports=Ht():Oe.exports=Xt();var e=Oe.exports;function Zt(r){r=r||{};const t=Object.keys(r).sort(),s=[];for(let n=0;n<t.length;n++){const i=t[n];if(i!="authentication"&&r[i])s.push(t[n]+"="+(typeof r[i]=="object"?JSON.stringify(r[i]):r[i]));else{const l=Object.keys(r[i]).sort();for(let c=0;c<l.length;c++){const u=l[c];u!="sign"&&r[i][u]&&s.push(l[c]+"="+(typeof r[i][u]=="object"?JSON.stringify(r[i][u]):r[i][u]))}}}return s.sort().join("&")}function en(r,t){let s=Zt(r);return s+="&key="+t,Jt.MD5(s).toString().toUpperCase()}class Xe{constructor(){this.type="default_api_client",this.baseURL="http://localhost:31200",this.app_id="",this.app_secret=""}getAuthentication(t){if(!this.app_id||!this.app_secret)return;const s=new Date().getTime().toString();return{app_id:this.app_id,nonce_str:s,sign:en({app_id:this.app_id,nonce_str:s,...t},this.app_secret)}}getRequest(t,s){return(n,i,l,c)=>{const u=this.buildHeader(l),d=this.buildAxiosConfig(t,n,i,l,u,s);return Qe(d).then(p=>c?p:p.data).catch(p=>{if(Qe.isCancel(p))return Promise.reject(p);const h=p,b=Vt.get(h,"response.data.detail.message",h.message);return Promise.reject(new Error(b))})}}get(t){return this.getRequest("GET",t)}post(t){return this.getRequest("POST",t)}put(t){return this.getRequest("PUT",t)}buildAxiosConfig(t,s,n,i,l,c){const u={baseURL:this.baseURL,method:t,url:s,params:t==="GET"?n:i.params,headers:l,signal:c};return["POST","PUT"].includes(t)&&(u.data=i.string?JSON.stringify(n):n,u.data.authentication=this.getAuthentication(u.data)),u}buildHeader(t){const s=window.localStorage.getItem("token");return{"X-Requested-With":"XMLHttpRequest","Content-Type":t.string?"application/x-www-form-urlencoded":"application/json",authorization:s?`bearer ${s}`:"",...t.headers}}}class Ze{constructor(t){this.implementation=t}getRequest(t,s){return this.implementation.getRequest(t,s)}get(t){return this.getRequest("GET",t)}post(t){return this.getRequest("POST",t)}put(t){return this.getRequest("PUT",t)}}const ge=new Xe,et=new Ze(ge),O=et;function tt(r){ge.baseURL!==r.apiBaseURL&&(ge.baseURL=r.apiBaseURL),r.app_id&&(ge.app_id=r.app_id),r.app_secret&&(ge.app_secret=r.app_secret)}const tn={login:async(r,t)=>{const s={name:r,password:t};return await O.post()("/account/login",s,{})},list:async()=>await O.post()("/account/list",{filter:{},sort:[{field:"name",order:"ASC"}],pagination:{page:1,pagesize:100}},{}),get:async()=>await O.get()("/account/get",{},{}),update:async(r,t)=>{const s={name:r.trim(),email:t.trim()};return await O.put()("/account/update",s,{})},changepassword:async(r,t)=>{const s={old_password:r.trim(),new_password:t.trim()};return await O.post()("/account/changepassword",s,{})},create:async(r,t,s,n)=>await O.post()("/account/create",{name:r.trim(),email:t.trim(),password:s.trim(),role_id:n},{}),edit:async r=>(r.reset_password||(r.new_password=void 0),await O.put()("/account/edit",r,{})),delete:async r=>{if(r)return O.post()("/account/delete",{id:r},{})}},nn={list:async()=>await O.post()("/api/key/list",{filter:{search:""},sort:[{field:"name",order:"ASC"}],pagination:{page:1,pagesize:100}},{}),create:async(r,t)=>O.post()("/api/key/create",{name:r,role_id:t},{}),delete:async r=>{if(r)return O.post()("/api/key/delete",{id:r},{})}},an={list:async()=>await O.post()("/datasource/list",{filter:{},sort:[{field:"create_time",order:"ASC"}],pagination:{page:1,pagesize:100}},{}),create:async(r,t,s)=>await O.post()("/datasource/create",{type:r,key:t,config:s},{}),update:async(r,t)=>await O.put()("/datasource/update",{id:r,config:t},{}),delete:async r=>{await O.post()("/datasource/delete",{id:r},{})}},rn={list:async()=>await O.get()("/role/list",{},{})};var nt=60,at=nt*60,rt=at*24,sn=rt*7,re=1e3,$e=nt*re,st=at*re,on=rt*re,ln=sn*re,Me="millisecond",se="second",ie="minute",oe="hour",Q="day",Te="week",U="month",it="quarter",J="year",le="date",un="YYYY-MM-DDTHH:mm:ssZ",ot="Invalid Date",cn=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,dn=/\[([^\]]+)]|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;const fn={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var s=["th","st","nd","rd"],n=t%100;return"["+t+(s[(n-20)%10]||s[n]||s[0])+"]"}};var Ie=function(t,s,n){var i=String(t);return!i||i.length>=s?t:""+Array(s+1-i.length).join(n)+t},pn=function(t){var s=-t.utcOffset(),n=Math.abs(s),i=Math.floor(n/60),l=n%60;return(s<=0?"+":"-")+Ie(i,2,"0")+":"+Ie(l,2,"0")},mn=function r(t,s){if(t.date()<s.date())return-r(s,t);var n=(s.year()-t.year())*12+(s.month()-t.month()),i=t.clone().add(n,U),l=s-i<0,c=t.clone().add(n+(l?-1:1),U);return+(-(n+(s-i)/(l?i-c:c-i))||0)},hn=function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},gn=function(t){var s={M:U,y:J,w:Te,d:Q,D:le,h:oe,m:ie,s:se,ms:Me,Q:it};return s[t]||String(t||"").toLowerCase().replace(/s$/,"")},xn=function(t){return t===void 0};const bn={s:Ie,z:pn,m:mn,a:hn,p:gn,u:xn};var xe="en",ee={};ee[xe]=fn;var Re=function(t){return t instanceof ye},Se=function r(t,s,n){var i;if(!t)return xe;if(typeof t=="string"){var l=t.toLowerCase();ee[l]&&(i=l),s&&(ee[l]=s,i=l);var c=t.split("-");if(!i&&c.length>1)return r(c[0])}else{var u=t.name;ee[u]=t,i=u}return!n&&i&&(xe=i),i||!n&&xe},I=function(t,s){if(Re(t))return t.clone();var n=typeof s=="object"?s:{};return n.date=t,n.args=arguments,new ye(n)},vn=function(t,s){return I(t,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})},z=bn;z.l=Se,z.i=Re,z.w=vn;var jn=function(t){var s=t.date,n=t.utc;if(s===null)return new Date(NaN);if(z.u(s))return new Date;if(s instanceof Date)return new Date(s);if(typeof s=="string"&&!/Z$/i.test(s)){var i=s.match(cn);if(i){var l=i[2]-1||0,c=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],l,i[3]||1,i[4]||0,i[5]||0,i[6]||0,c)):new Date(i[1],l,i[3]||1,i[4]||0,i[5]||0,i[6]||0,c)}}return new Date(s)},ye=function(){function r(s){this.$L=Se(s.locale,null,!0),this.parse(s)}var t=r.prototype;return t.parse=function(n){this.$d=jn(n),this.$x=n.x||{},this.init()},t.init=function(){var n=this.$d;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()},t.$utils=function(){return z},t.isValid=function(){return this.$d.toString()!==ot},t.isSame=function(n,i){var l=I(n);return this.startOf(i)<=l&&l<=this.endOf(i)},t.isAfter=function(n,i){return I(n)<this.startOf(i)},t.isBefore=function(n,i){return this.endOf(i)<I(n)},t.$g=function(n,i,l){return z.u(n)?this[i]:this.set(l,n)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(n,i){var l=this,c=z.u(i)?!0:i,u=z.p(n),d=function(k,D){var L=z.w(l.$u?Date.UTC(l.$y,D,k):new Date(l.$y,D,k),l);return c?L:L.endOf(Q)},p=function(k,D){var L=[0,0,0,0],Z=[23,59,59,999];return z.w(l.toDate()[k].apply(l.toDate("s"),(c?L:Z).slice(D)),l)},h=this.$W,b=this.$M,v=this.$D,C="set"+(this.$u?"UTC":"");switch(u){case J:return c?d(1,0):d(31,11);case U:return c?d(1,b):d(0,b+1);case Te:{var q=this.$locale().weekStart||0,Y=(h<q?h+7:h)-q;return d(c?v-Y:v+(6-Y),b)}case Q:case le:return p(C+"Hours",0);case oe:return p(C+"Minutes",1);case ie:return p(C+"Seconds",2);case se:return p(C+"Milliseconds",3);default:return this.clone()}},t.endOf=function(n){return this.startOf(n,!1)},t.$set=function(n,i){var l,c=z.p(n),u="set"+(this.$u?"UTC":""),d=(l={},l[Q]=u+"Date",l[le]=u+"Date",l[U]=u+"Month",l[J]=u+"FullYear",l[oe]=u+"Hours",l[ie]=u+"Minutes",l[se]=u+"Seconds",l[Me]=u+"Milliseconds",l)[c],p=c===Q?this.$D+(i-this.$W):i;if(c===U||c===J){var h=this.clone().set(le,1);h.$d[d](p),h.init(),this.$d=h.set(le,Math.min(this.$D,h.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},t.set=function(n,i){return this.clone().$set(n,i)},t.get=function(n){return this[z.p(n)]()},t.add=function(n,i){var l=this,c;n=Number(n);var u=z.p(i),d=function(v){var C=I(l);return z.w(C.date(C.date()+Math.round(v*n)),l)};if(u===U)return this.set(U,this.$M+n);if(u===J)return this.set(J,this.$y+n);if(u===Q)return d(1);if(u===Te)return d(7);var p=(c={},c[ie]=$e,c[oe]=st,c[se]=re,c)[u]||1,h=this.$d.getTime()+n*p;return z.w(h,this)},t.subtract=function(n,i){return this.add(n*-1,i)},t.format=function(n){var i=this,l=this.$locale();if(!this.isValid())return l.invalidDate||ot;var c=n||un,u=z.z(this),d=this.$H,p=this.$m,h=this.$M,b=l.weekdays,v=l.months,C=l.meridiem,q=function(L,Z,ce,ke){return L&&(L[Z]||L(i,c))||ce[Z].slice(0,ke)},Y=function(L){return z.s(d%12||12,L,"0")},X=C||function(D,L,Z){var ce=D<12?"AM":"PM";return Z?ce.toLowerCase():ce},k=function(L){switch(L){case"YY":return String(i.$y).slice(-2);case"YYYY":return z.s(i.$y,4,"0");case"M":return h+1;case"MM":return z.s(h+1,2,"0");case"MMM":return q(l.monthsShort,h,v,3);case"MMMM":return q(v,h);case"D":return i.$D;case"DD":return z.s(i.$D,2,"0");case"d":return String(i.$W);case"dd":return q(l.weekdaysMin,i.$W,b,2);case"ddd":return q(l.weekdaysShort,i.$W,b,3);case"dddd":return b[i.$W];case"H":return String(d);case"HH":return z.s(d,2,"0");case"h":return Y(1);case"hh":return Y(2);case"a":return X(d,p,!0);case"A":return X(d,p,!1);case"m":return String(p);case"mm":return z.s(p,2,"0");case"s":return String(i.$s);case"ss":return z.s(i.$s,2,"0");case"SSS":return z.s(i.$ms,3,"0");case"Z":return u}return null};return c.replace(dn,function(D,L){return L||k(D)||u.replace(":","")})},t.utcOffset=function(){return-Math.round(this.$d.getTimezoneOffset()/15)*15},t.diff=function(n,i,l){var c=this,u=z.p(i),d=I(n),p=(d.utcOffset()-this.utcOffset())*$e,h=this-d,b=function(){return z.m(c,d)},v;switch(u){case J:v=b()/12;break;case U:v=b();break;case it:v=b()/3;break;case Te:v=(h-p)/ln;break;case Q:v=(h-p)/on;break;case oe:v=h/st;break;case ie:v=h/$e;break;case se:v=h/re;break;default:v=h;break}return l?v:z.a(v)},t.daysInMonth=function(){return this.endOf(U).$D},t.$locale=function(){return ee[this.$L]},t.locale=function(n,i){if(!n)return this.$L;var l=this.clone(),c=Se(n,i,!0);return c&&(l.$L=c),l},t.clone=function(){return z.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},r}(),lt=ye.prototype;I.prototype=lt,[["$ms",Me],["$s",se],["$m",ie],["$H",oe],["$W",Q],["$M",U],["$y",J],["$D",le]].forEach(function(r){lt[r[1]]=function(t){return this.$g(t,r[0],r[1])}}),I.extend=function(r,t){return r.$i||(r(t,ye,I),r.$i=!0),I},I.locale=Se,I.isDayjs=Re,I.unix=function(r){return I(r*1e3)},I.en=ee[xe],I.Ls=ee,I.p={};const R={datasource:an,account:tn,role:rn,api_key:nn,sql_snippet:{list:async({pagination:r},t)=>{const s=await O.post(t)("/sql_snippet/list",{sort:[{field:"update_time",order:"DESC"}],pagination:r},{});return s.data.forEach(n=>{n.create_time=I(n.create_time).format("YYYY-MM-DD HH:mm:ss"),n.update_time=I(n.update_time).format("YYYY-MM-DD HH:mm:ss")}),s},get:async(r,t)=>await O.post(t)("/sql_snippet/get",{id:r},{}),create:async(r,t)=>await O.post(t)("/sql_snippet/create",r,{}),update:async(r,t)=>await O.put(t)("/sql_snippet/update",r,{}),delete:async(r,t)=>O.post(t)("/sql_snippet/delete",{id:r},{})}},V={size:"sm",spacing:"md",button:{size:"xs"}};function _n({styles:r=V}){return e.jsx(o.Box,{mx:"auto",children:e.jsx(o.Alert,{mt:r.spacing,icon:e.jsx(A.IconAlertCircle,{size:16}),children:e.jsxs(y.Trans,{i18nKey:"datasource.db.permission_tip",children:["Only ",e.jsx("b",{children:"SELECT"})," privilege is needed."]})})})}const ut=P.forwardRef(({value:r,onChange:t,height:s="200px",defaultLanguage:n="sql"},i)=>{const l=u=>{t==null||t(u??"")},c=!t;return e.jsx(pe,{className:"minimal-monaco-editor",height:s,defaultLanguage:n,value:r,onChange:c?void 0:l,theme:"vs-dark",options:{lineNumbers:"off",folding:!1,lineDecorationsWidth:20,lineNumbersMinChars:0,wordWrap:"on",minimap:{enabled:!1},readOnly:c||!t}})});function W({size:r,disabled:t}){const{t:s}=y.useTranslation();return e.jsx(o.Button,{type:"submit",color:"green",leftSection:e.jsx(A.IconDeviceFloppy,{size:16}),size:r,disabled:t,children:s("common.actions.submit")})}const Tn={translation:{datasource:{label:"Data Source",add:"Add a data source",edit:"Edit data source",connection_info:"Connection Info",db:{host:"Host",port:"Port",username:"Username",password:"Password",database:"Database",permission_tip:"Only <1>SELECT</1> privilege is needed."},cant_edit:{db:"Only HTTP datasources can be edited",preset:"This is a preset datasource, it can not be changed"},delete:{title:"Delete this data source?",hint:"This action won't affect your database or HTTP service.",cant_delete_preset:"This is a preset datasource, it can not be deleted"},http:{base_url:"Base URL",processing:{pre:{label:"Pre processing of queries",description:"This function will run before sending the request (for scenarios like encryption)"},post:{label:"Post processing of queries",description:"This function will run after getting a response (for scenarios like decryption)"}}},state:{adding:"Adding data source...",added:"Data source is added",updating:"Updating data source...",updated:"Data source is updated",deleting:"Deleting data source...",deleted:"Data source [{{name}}] is deleted"}},account:{label:"Account",add:"Add an account",edit:"Edit account",editing_xx:"Editing account [{{name}}]",username:"Username",email:"Email",password:"Password",password_hint:"Password must be at least 8 characters long",new_password:"New password",reset_password:"Reset password",state:{adding:"Adding account...",added:"Account is added",updating:"Updating account...",updated:"Account is updated",deleting:"Deleting account...",deleted:"Account [{{name}}] is deleted",logging_in:"Logging in...",logged_in:"Logged in"},delete:"Delete this account?"},global_sql_snippet:{label:"Global SQL Snippet",add:"Add a snippet",edit:"Edit snippet",content:"Content",description:"Global SQL Snippets are shared among dashboards",state:{adding:"Adding snippet...",added:"Snippet is added",updating:"Updating snippet...",updated:"Snippet is updated",deleting:"Deleting snippet...",deleted:"Snippet [{{name}}] is deleted"},delete:"Delete this snippet?"},api_key:{label:"API Key",add:"Add an API Key",edit:"Edit API key",app_id:"APP ID",app_secret:"APP Secret",state:{adding:"Adding API key...",added:"API key is added",updating:"Updating API key...",updated:"API Key is updated",deleting:"Deleting API key...",deleted:"API key [{{name}}] is deleted"},save:{title:"API Key is generated",warn:"Make sure you save it - you won't be able to access it again.",saved:"I've saved this API Key"},delete:"Delete this key?"},role:{label:"Role"},common:{type:"Type",name:"Name",name_placeholder:"A unique name",created_at:"Created At",updated_at:"Updated At",state:{pending:"Pending",successful:"Successful",failed:"Failed"},action:"Action",actions:{edit:"Edit",delete:"Delete",submit:"Submit",reset_to_default:"Reset to default",cancel:"Cancel",save:"Save",confirm:"Confirm"}}}},Sn={translation:{datasource:{label:"数据源",add:"添加数据源",edit:"编辑数据源",connection_info:"连接信息",db:{host:"主机(host)",port:"端口(port)",username:"用户名(username)",password:"密码(password)",database:"数据库(database)",permission_tip:"只需具备 <1>SELECT</1> 权限"},cant_edit:{db:"只有HTTP数据源可以编辑",preset:"这是预设数据源,不可编辑"},delete:{title:"删除这个数据源?",hint:"此操作不会影响您的数据库或HTTP服务",cant_delete_preset:"这是预设数据源,不可删除"},http:{base_url:"访问地址",processing:{pre:{label:"查询请求预处理",description:"此函数在请求发起前执行(例如加密场景)"},post:{label:"查询请求后处理",description:"此函数在请求获得响应后执行(例如解密场景)"}}},state:{adding:"正在添加数据源...",added:"数据源已添加",updating:"正在更新数据源...",updated:"数据源已更新",deleting:"正在删除数据源...",deleted:'数据源"{{name}}"已删除'}},account:{label:"账户",add:"添加账户",edit:"编辑账户",editing_xx:'正在编辑账户 "{{name}}"',username:"用户名",email:"邮箱",password:"密码",password_hint:"密码得至少包含8个字符",new_password:"新密码",reset_password:"重置密码",state:{adding:"正在添加账户...",added:"账户已添加",updating:"正在更新账户...",updated:"账户已更新",deleting:"正在删除账户...",deleted:'账户"{{name}}"已删除',logging_in:"正在登录...",logged_in:"已登录"},delete:"删除这个账户?"},global_sql_snippet:{label:"全局SQL片段",add:"添加片段",edit:"编辑片段",content:"SQL片段内容",description:"在制作任何看板时,既可以制订该看板自己的SQL片段,也可以使用这里的全局SQL片段",state:{adding:"正在添加片段...",added:"片段已添加",updating:"正在更新片段...",updated:"片段已更新",deleting:"正在删除片段...",deleted:'片段"{{name}}"已删除'},delete:"删除这个片段?"},api_key:{label:"API令牌",add:"添加令牌",edit:"编辑令牌",app_id:"应用ID",app_secret:"应用密钥",state:{adding:"正在添加令牌...",added:"令牌已添加",updating:"正在更新令牌...",updated:"令牌已更新",deleting:"正在删除令牌...",deleted:'令牌"{{name}}"已删除'},save:{title:"API令牌已生成",warn:"此信息只出现一次,请务必保存",saved:"我已保存"},delete:"删除这个片段?"},role:{label:"角色"},common:{type:"类型",name:"名称",name_placeholder:"名称须唯一",created_at:"创建时间",updated_at:"更新时间",state:{pending:"处理中",successful:"成功",failed:"失败"},action:"动作",actions:{edit:"编辑",delete:"删除",submit:"提交",reset_to_default:"还原为默认值",cancel:"取消",save:"保存",confirm:"确认"}}}},Le=Gt.createInstance({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1},resources:{en:Tn,zh:Sn}}).use(Wt).use(y.initReactI18next);Le.init();function yn({lang:r,children:t}){return P.useEffect(()=>{Le.changeLanguage(r)},[r]),e.jsx(y.I18nextProvider,{i18n:Le,children:t})}const wn=r=>r.replace(/([^:])(\/\/+)/g,"$1/");function Cn(r){P.useEffect(()=>{if(pe.loader.__getMonacoInstance())return;console.log("loading monaco for @devtable/settings-form");const s=wn(r);pe.loader.config({paths:{vs:s}}),pe.loader.init().then(n=>console.log("monaco instance:",n))},[])}function be(r,t){const s=n=>{const{lang:i,config:l,...c}=n;return tt(l),Cn(l.monacoPath),e.jsx(P.Suspense,{fallback:e.jsx(o.Loader,{color:"gray"}),children:e.jsx(yn,{lang:i,children:e.jsx(t,{...c})})})};return s.displayName=`withEntry(${r})`,s}function Dn({submit:r,styles:t=V,type:s}){const{t:n}=y.useTranslation(),{control:i,setValue:l,handleSubmit:c}=j.useForm({defaultValues:{type:s,key:"",config:{host:"",port:5432,username:"",password:"",database:""}}});return P.useEffect(()=>{l("type",s)},[l,s]),e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:c(r),children:[e.jsx(j.Controller,{name:"key",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("common.name"),placeholder:n("common.name_placeholder"),...u})}),e.jsx(o.Divider,{label:n("datasource.connection_info"),labelPosition:"center"}),e.jsxs(o.Group,{grow:!0,children:[e.jsx(j.Controller,{name:"config.host",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.host"),sx:{flexGrow:1},...u})}),e.jsx(j.Controller,{name:"config.port",control:i,render:({field:u})=>e.jsx(o.NumberInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.port"),hideControls:!0,sx:{width:"8em"},...u})})]}),e.jsx(j.Controller,{name:"config.username",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.username"),...u})}),e.jsx(j.Controller,{name:"config.password",control:i,render:({field:u})=>e.jsx(o.PasswordInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.password"),...u})}),e.jsx(j.Controller,{name:"config.database",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("datasource.db.database"),...u})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}const zn=({value:r,onChange:t})=>{const s=n=>{n&&t(n)};return e.jsx(o.Box,{sx:{position:"relative"},children:e.jsx(pe,{height:"500px",defaultLanguage:"javascript",value:r,onChange:s,theme:"vs-dark",options:{minimap:{enabled:!1}}})})},we=P.forwardRef(({value:r,onChange:t,label:s,modalTitle:n,defaultValue:i,styles:l},c)=>{const{t:u}=y.useTranslation(),[d,{setTrue:p,setFalse:h}]=K.useBoolean(),[b,v]=P.useState(r),C=()=>{h(),t(b)},q=()=>{h(),v(r)},Y=()=>{v(i)};return P.useEffect(()=>{v(r)},[r]),e.jsxs(e.Fragment,{children:[e.jsx(o.Button,{color:"grape",variant:"filled",leftSection:e.jsx(A.IconMathFunction,{size:16}),size:l.button.size,onClick:p,sx:{flexGrow:1},children:s}),e.jsx(o.Modal,{size:800,title:n,opened:d,onClose:h,closeOnClickOutside:!1,withCloseButton:!1,children:d&&e.jsxs(o.Stack,{children:[e.jsx(zn,{value:b,onChange:v}),e.jsxs(o.Group,{justify:"space-between",children:[e.jsx(o.Button,{size:l.button.size,onClick:Y,color:"red",leftSection:e.jsx(A.IconRecycle,{size:20}),children:u("common.actions.reset_to_default")}),e.jsxs(o.Group,{justify:"flex-end",children:[e.jsx(o.Button,{size:l.button.size,onClick:q,variant:"subtle",children:u("common.actions.cancel")}),e.jsx(o.Button,{size:l.button.size,color:"green",leftSection:e.jsx(A.IconDeviceFloppy,{size:16}),onClick:C,children:u("common.actions.save")})]})]})]})})]})}),Ce={pre:["function pre_process({ method, url, params, headers, data }, utils) {"," // your code goes here"," return { method, url, params, headers, data }","}"].join(`
|
|
33
33
|
`),post:["function post_process(res, utils) {"," // your code goes here"," return data","}"].join(`
|
|
34
|
-
`)};function En({submit:
|
|
34
|
+
`)};function En({submit:r,styles:t=V}){const{t:s}=y.useTranslation(),{control:n,setValue:i,handleSubmit:l}=j.useForm({defaultValues:{type:"http",key:"",config:{host:"",processing:{pre:Ce.pre,post:Ce.post}}}});return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:l(r),children:[e.jsx(j.Controller,{name:"key",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:s("common.name"),placeholder:s("common.name_placeholder"),...c})}),e.jsx(o.Divider,{label:s("datasource.connection_info"),labelPosition:"center"}),e.jsx(j.Controller,{name:"config.host",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,label:s("datasource.http.base_url"),sx:{flexGrow:1},...c})}),e.jsxs(o.Group,{grow:!0,children:[e.jsx(j.Controller,{name:"config.processing.pre",control:n,render:({field:c})=>e.jsx(we,{label:s("datasource.http.processing.pre.label"),modalTitle:s("datasource.http.processing.pre.description"),defaultValue:Ce.pre,...c,styles:t})}),e.jsx(j.Controller,{name:"config.processing.post",control:n,render:({field:c})=>e.jsx(we,{label:s("datasource.http.processing.post.label"),modalTitle:s("datasource.http.processing.post.description"),defaultValue:Ce.post,...c,styles:t})})]}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function An({postSubmit:r,styles:t=V}){const{t:s}=y.useTranslation(),[n,i]=P.useState("postgresql"),l=async({type:p,key:h,config:b})=>{T.showNotification({id:"for-creating",title:s("common.state.pending"),message:s("datasource.state.adding"),loading:!0,autoClose:!1});try{console.log({type:p,key:h,config:b}),await R.datasource.create(p,h,b),T.updateNotification({id:"for-creating",title:s("common.state.successful"),message:s("datasource.state.added"),color:"green",autoClose:!0}),r()}catch(v){console.error(v),T.updateNotification({id:"for-creating",title:s("common.state.failed"),message:v.message,color:"red",autoClose:!0})}},c=p=>{i(p)},u=n==="postgresql"||n==="mysql",d=n==="http";return e.jsxs(o.Box,{mx:"auto",children:[e.jsx(o.SegmentedControl,{fullWidth:!0,mb:t.spacing,size:t.size,data:[{label:"PostgreSQL",value:"postgresql"},{label:"MySQL",value:"mysql"},{label:"HTTP",value:"http"}],value:n,onChange:c}),u&&e.jsx(_n,{styles:t}),u&&e.jsx(Dn,{submit:l,styles:t,type:n}),d&&e.jsx(En,{submit:l,styles:t})]})}function ct({onSuccess:r,styles:t=V}){const{t:s}=y.useTranslation(),[n,i]=P.useState(!1),l=()=>i(!0),c=()=>i(!1),u=()=>{r(),c()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:n,onClose:()=>i(!1),title:s("datasource.add"),trapFocus:!0,onDragStart:d=>{d.stopPropagation()},children:e.jsx(An,{postSubmit:u,styles:t})}),e.jsx(o.Button,{size:t.button.size,onClick:l,leftSection:e.jsx(A.IconPlaylistAdd,{size:20}),children:s("datasource.add")})]})}const Pn={http:"HTTP",mysql:"MySQL",postgresql:"PostgreSQL",merico_metric_system:"Merico Metric System"},On={http:e.jsx(A.IconNetwork,{}),mysql:e.jsx(A.IconBrandMysql,{}),postgresql:e.jsx(A.IconDatabase,{}),merico_metric_system:e.jsx(A.IconTopologyRing3,{})};function $n({type:r}){return e.jsxs(o.Group,{children:[e.jsx(o.ActionIcon,{variant:"subtle",size:"xs",sx:{transform:"none !important"},children:On[r]}),e.jsx(o.Text,{sx:{cusor:"default",userSelect:"none"},children:Pn[r]})]})}function dt({id:r,name:t,isProtected:s,onSuccess:n,styles:i=V}){const{t:l}=y.useTranslation(),c=ae.useModals(),u=async()=>{r&&(T.showNotification({id:"for-deleting",title:l("common.state.pending"),message:l("datasource.state.deleting"),loading:!0,autoClose:!1}),await R.datasource.delete(r),T.updateNotification({id:"for-deleting",title:l("common.state.successful"),message:l("datasource.state.deleted",{name:t}),color:"green",autoClose:!0}),n())},d=()=>c.openConfirmModal({title:l("datasource.delete.title"),children:e.jsx(o.Text,{size:i.size,children:l("datasource.delete.hint")}),labels:{confirm:l("common.actions.confirm"),cancel:l("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:u,cancelProps:{size:i.button.size},confirmProps:{color:"red",size:i.button.size}});return s?e.jsx(o.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:l("datasource.delete.cant_delete_preset"),children:e.jsx(o.Button,{size:i.button.size,color:"gray",variant:"light",leftSection:e.jsx(A.IconLock,{size:16}),sx:{transform:"none !important"},children:l("common.actions.delete")})}):e.jsx(o.Button,{size:i.button.size,color:"red",onClick:d,leftSection:e.jsx(A.IconTrash,{size:16}),children:l("common.actions.delete")})}const ft={pre:["function pre_process({ method, url, params, headers, data }, utils) {"," // your code goes here"," return { method, url, params, headers, data }","}"].join(`
|
|
35
35
|
`),post:["function post_process(resp, utils) {"," return resp.data","}"].join(`
|
|
36
|
-
`)};function Mn({name:a,config:t,submit:s,styles:n=V}){const{t:i}=y.useTranslation(),{control:l,handleSubmit:c}=j.useForm({defaultValues:{config:t}});return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:c(s),children:[e.jsx(o.TextInput,{mb:n.spacing,size:n.size,required:!0,label:i("common.name"),value:a,readOnly:!0}),e.jsx(o.Divider,{label:i("datasource.connection_info"),labelPosition:"center"}),e.jsx(j.Controller,{name:"config.host",control:l,render:({field:u})=>e.jsx(o.TextInput,{mb:n.spacing,size:n.size,label:i("datasource.http.base_url"),sx:{flexGrow:1},...u})}),e.jsxs(o.Group,{grow:!0,children:[e.jsx(j.Controller,{name:"config.processing.pre",control:l,render:({field:u})=>e.jsx(we,{label:i("datasource.http.processing.pre.label"),modalTitle:i("datasource.http.processing.pre.description"),defaultValue:pt.pre,...u,styles:n})}),e.jsx(j.Controller,{name:"config.processing.post",control:l,render:({field:u})=>e.jsx(we,{label:i("datasource.http.processing.post.label"),modalTitle:i("datasource.http.processing.post.description"),defaultValue:pt.post,...u,styles:n})})]}),e.jsx(o.Group,{justify:"flex-end",mt:n.spacing,children:e.jsx(W,{size:n.button.size})})]})})}function In({dataSource:a,postSubmit:t,styles:s=V}){const{t:n}=y.useTranslation(),i=async({config:l})=>{T.showNotification({id:"for-updating",title:n("common.state.pending"),message:n("datasource.state.updating"),loading:!0,autoClose:!1});try{console.log({config:l}),await R.datasource.update(a.id,l),T.updateNotification({id:"for-updating",title:n("common.state.successful"),message:n("datasource.state.updated"),color:"green",autoClose:!0}),t()}catch(c){T.updateNotification({id:"for-updating",title:n("common.state.failed"),message:c.message,color:"red",autoClose:!0})}};return a.config?e.jsx(o.Box,{mx:"auto",children:e.jsx(Mn,{name:a.key,config:a.config,submit:i,styles:s})}):(console.error(new Error("unexpected empty config of a http datasource")),null)}function Rn({dataSource:a,onSuccess:t,styles:s=V}){const{t:n}=y.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{t(),u()};return a.is_preset?e.jsx(o.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:n("datasource.cant_edit.preset"),children:e.jsx(o.Button,{size:s.button.size,color:"gray",variant:"light",leftSection:e.jsx(A.IconLock,{size:16}),sx:{transform:"none !important"},children:n("common.actions.edit")})}):a.type!=="http"?e.jsx(o.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:n("datasource.cant_edit.db"),children:e.jsx(o.Button,{size:s.button.size,color:"gray",variant:"light",leftSection:e.jsx(A.IconEdit,{size:16}),sx:{transform:"none !important"},children:n("common.actions.edit")})}):e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("datasource.edit"),trapFocus:!0,onDragStart:f=>{f.stopPropagation()},children:e.jsx(In,{dataSource:a,postSubmit:d,styles:s})}),e.jsx(o.Button,{size:s.button.size,color:"blue",onClick:c,leftSection:e.jsx(A.IconEdit,{size:16}),children:n("common.actions.edit")})]})}const Ln=be("DataSourceList",({styles:a=V})=>{const{t}=y.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:l}=await R.datasource.list();return l},{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsx(o.Group,{pt:a.spacing,justify:"flex-end",children:e.jsx(ct,{onSuccess:i})}),e.jsxs(o.Box,{mt:a.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n}),e.jsxs(o.Table,{horizontalSpacing:a.spacing,verticalSpacing:a.spacing,fz:a.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("common.type")}),e.jsx(o.Table.Th,{children:t("common.name")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(l=>{const{id:c,key:u,type:d,is_preset:f}=l,h=d==="merico_metric_system";return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{width:230,children:e.jsx($n,{type:d})}),e.jsx(o.Table.Td,{children:u}),e.jsx(o.Table.Td,{width:400,children:e.jsxs(o.Group,{justify:"flex-start",children:[e.jsx(Rn,{dataSource:l,onSuccess:i,styles:a}),e.jsx(dt,{isProtected:f||h,id:c,name:u,onSuccess:i,styles:a})]})})]},u)})})]})]})]})}),qn=({option:a,...t})=>{const{label:s,value:n,description:i}=a;return e.jsxs(o.Stack,{gap:2,...t,children:[e.jsx(o.Text,{size:"sm",children:s}),e.jsx(o.Text,{size:"xs",c:"dimmed",className:"role-description",children:i})]})},qe=P.forwardRef(({styles:a,value:t,onChange:s},n)=>{const{t:i}=y.useTranslation(),{data:l=[],loading:c}=K.useRequest(async()=>(await R.role.list()).map(d=>({label:d.id,value:d.id,description:d.description,disabled:d.id==="SUPERADMIN"})),{refreshDeps:[]});return e.jsx(o.Select,{ref:n,mb:a.spacing,size:a.size,required:!0,label:i("role.label"),renderOption:qn,data:l,disabled:c,styles:()=>({item:{"&[data-selected]":{"&, &:hover":{".role-description":{color:"rgba(255,255,255,.8)"}}}}}),value:t,onChange:u=>u!==null&&s(u),comboboxProps:{withinPortal:!0},maxDropdownHeight:500})}),H={size:"sm",spacing:"md",button:{size:"xs"}};function kn({postSubmit:a,styles:t=H,initialRoleID:s}){const{t:n}=y.useTranslation(),{control:i,handleSubmit:l}=j.useForm({defaultValues:{name:"",email:"",role_id:s,password:""}}),c=async({name:u,email:d,password:f,role_id:h})=>{try{T.showNotification({id:"for-creating",title:n("common.state.pending"),message:n("account.state.adding"),loading:!0,autoClose:!1}),await R.account.create(u,d,f,h),T.updateNotification({id:"for-creating",title:n("common.state.successful"),message:n("account.state.added"),color:"green",autoClose:!0}),a()}catch(b){T.updateNotification({id:"for-creating",title:n("common.state.failed"),message:b.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",mb:10,children:e.jsxs("form",{onSubmit:l(c),children:[e.jsx(j.Controller,{name:"name",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("account.username"),...u})}),e.jsx(j.Controller,{name:"email",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("account.email"),...u})}),e.jsx(j.Controller,{name:"password",control:i,render:({field:u})=>e.jsx(o.PasswordInput,{mb:t.spacing,size:t.size,required:!0,label:n("account.password"),description:n("account.password_hint"),...u})}),e.jsx(j.Controller,{name:"role_id",control:i,render:({field:u})=>e.jsx(qe,{styles:t,...u})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function ft({onSuccess:a,styles:t=H,initialRoleID:s}){const{t:n}=y.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{a(),u()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("account.add"),trapFocus:!0,onDragStart:f=>{f.stopPropagation()},children:e.jsx(kn,{postSubmit:d,styles:t,initialRoleID:s})}),e.jsx(o.Button,{size:t.button.size,onClick:c,leftSection:e.jsx(A.IconPlaylistAdd,{size:20}),children:n("account.add")})]})}function mt({id:a,name:t,onSuccess:s,styles:n=H}){const{t:i}=y.useTranslation(),l=re.useModals(),c=async()=>{if(a){T.showNotification({id:"for-deleting",title:i("common.state.pending"),message:i("account.state.deleting"),loading:!0,autoClose:!1});try{await R.account.delete(a),T.updateNotification({id:"for-deleting",title:i("common.state.successful"),message:i("account.state.deleted",{name:t}),color:"green",autoClose:!0}),s()}catch(d){T.updateNotification({id:"for-deleting",title:i("common.state.failed"),message:d.message,color:"red",autoClose:!0})}}},u=()=>l.openConfirmModal({title:i("account.delete"),labels:{confirm:i("common.actions.confirm"),cancel:i("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:c,cancelProps:{size:n.button.size},confirmProps:{color:"red",size:n.button.size}});return e.jsx(o.Button,{size:n.button.size,color:"red",onClick:u,leftSection:e.jsx(A.IconTrash,{size:20}),children:i("common.actions.delete")})}function Nn({id:a,name:t,email:s,role_id:n,postSubmit:i,styles:l=H}){const{t:c}=y.useTranslation(),{control:u,handleSubmit:d,watch:f}=j.useForm({defaultValues:{name:t,email:s,role_id:n,reset_password:!1,new_password:""}}),h=async({name:C,email:q,role_id:Y,reset_password:X,new_password:k})=>{try{T.showNotification({id:"for-updating",title:c("common.state.pending"),message:c("account.state.updating"),loading:!0,autoClose:!1}),await R.account.edit({id:a,name:C.trim(),email:q.trim(),role_id:Y,reset_password:X,new_password:k.trim()}),T.updateNotification({id:"for-updating",title:c("common.state.successful"),message:c("account.state.updated"),color:"green",autoClose:!0}),i()}catch(D){T.updateNotification({id:"for-updating",title:c("common.state.failed"),message:D.message,color:"red",autoClose:!0})}},[b,v]=f(["reset_password","new_password"]);return e.jsx(o.Box,{mx:"auto",mb:10,children:e.jsxs("form",{onSubmit:d(h),children:[e.jsx(j.Controller,{name:"name",control:u,render:({field:C})=>e.jsx(o.TextInput,{mb:l.spacing,size:l.size,required:!0,label:c("account.username"),...C})}),e.jsx(j.Controller,{name:"email",control:u,render:({field:C})=>e.jsx(o.TextInput,{mb:l.spacing,size:l.size,required:!0,label:c("account.email"),...C})}),e.jsx(j.Controller,{name:"role_id",control:u,render:({field:C})=>e.jsx(qe,{styles:l,...C})}),e.jsx(o.Divider,{my:20,variant:"dashed",label:"",labelPosition:"center"}),e.jsx(j.Controller,{name:"reset_password",control:u,render:({field:C})=>e.jsx(o.Switch,{mb:l.spacing,size:l.size,label:c("account.reset_password"),checked:C.value,onChange:q=>C.onChange(q.currentTarget.checked),styles:{label:{verticalAlign:"middle"}}})}),b&&e.jsx(j.Controller,{name:"new_password",control:u,render:({field:C})=>e.jsx(o.PasswordInput,{autoComplete:"off",mb:l.spacing,size:l.size,required:!0,description:c("account.password_hint"),label:c("account.new_password"),...C})}),e.jsx(o.Group,{justify:"flex-end",mt:l.spacing,children:e.jsx(W,{size:l.button.size})})]})})}function Fn({account:a,onSuccess:t,styles:s=H}){const{t:n}=y.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{t(),u()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("account.editing_xx",{name:a.name}),trapFocus:!0,onDragStart:f=>{f.stopPropagation()},children:e.jsx(Nn,{...a,postSubmit:d,styles:s})}),e.jsx(o.Button,{size:s.button.size,onClick:c,leftSection:e.jsx(A.IconEdit,{size:20}),children:n("common.actions.edit")})]})}const Bn=be("AccountList",({styles:a=H})=>{var u;const{t}=y.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:d}=await R.account.list();return d},{refreshDeps:[]}),{data:l=[],loading:c}=K.useRequest(async()=>(await R.role.list()).map(f=>({label:f.id,value:f.id,description:f.description,disabled:f.id==="SUPERADMIN"})),{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsx(o.Group,{pt:a.spacing,justify:"flex-end",children:e.jsx(ft,{onSuccess:i,initialRoleID:((u=l==null?void 0:l[0])==null?void 0:u.value)??"INACTIVE"})}),e.jsxs(o.Box,{mt:a.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n||c}),e.jsxs(o.Table,{horizontalSpacing:a.spacing,verticalSpacing:a.spacing,fz:a.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("account.username")}),e.jsx(o.Table.Th,{children:t("account.email")}),e.jsx(o.Table.Th,{children:t("role.label")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(d=>{const{id:f,name:h,email:b,role_id:v}=d;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{width:200,children:h}),e.jsx(o.Table.Td,{width:200,children:b}),e.jsx(o.Table.Td,{width:200,children:v}),e.jsx(o.Table.Td,{width:200,children:e.jsxs(o.Group,{justify:"flex-start",children:[e.jsx(Fn,{account:d,onSuccess:i}),e.jsx(mt,{id:f,name:h,onSuccess:i})]})})]},f)})})]})]})]})});function Un({postSubmit:a,styles:t=H}){const{t:s}=y.useTranslation(),{control:n,handleSubmit:i}=j.useForm({defaultValues:{name:"",password:""}}),l=async({name:c,password:u})=>{try{T.showNotification({id:"for-login",title:s("common.state.pending"),message:s("account.state.logging_in"),loading:!0,autoClose:!1});const d=await R.account.login(c.trim(),u.trim());window.localStorage.setItem("token",d.token),T.updateNotification({id:"for-login",title:s("common.state.successful"),message:s("account.state.logged_in"),color:"green",autoClose:!0}),a(d)}catch(d){T.updateNotification({id:"for-login",title:s("common.state.failed"),message:d.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:i(l),children:[e.jsx(j.Controller,{name:"name",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:s("account.username"),...c})}),e.jsx(j.Controller,{name:"password",control:n,render:({field:c})=>e.jsx(o.PasswordInput,{mb:t.spacing,size:t.size,required:!0,label:s("account.password"),...c})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}const Yn=be("Login",({styles:a=H,onSuccess:t})=>e.jsx(e.Fragment,{children:e.jsx(o.Box,{mt:a.spacing,sx:{position:"relative"},children:e.jsx(Un,{styles:a,postSubmit:t})})})),De={size:"sm",spacing:"md",button:{size:"xs"}};function Vn({postSubmit:a,styles:t=De,initialRoleID:s}){const{t:n}=y.useTranslation(),{control:i,handleSubmit:l}=j.useForm({defaultValues:{name:"",role_id:s}}),c=async({name:u,role_id:d})=>{try{T.showNotification({id:"for-creating",title:n("common.state.pending"),message:n("api_key.state.adding"),loading:!0,autoClose:!1});const{app_id:f,app_secret:h}=await R.api_key.create(u,d);T.updateNotification({id:"for-creating",title:n("common.state.successful"),message:n("api_key.state.added"),color:"green",autoClose:!0}),a(f,h)}catch(f){T.updateNotification({id:"for-creating",title:n("common.state.failed"),message:f.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",mb:10,children:e.jsxs("form",{onSubmit:l(c),children:[e.jsx(j.Controller,{name:"name",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("common.name"),...u})}),e.jsx(j.Controller,{name:"role_id",control:i,render:({field:u})=>e.jsx(qe,{styles:t,...u})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function ht({onSuccess:a,styles:t=De,initialRoleID:s}){const{t:n}=y.useTranslation(),i=re.useModals(),[l,c]=P.useState(!1),u=()=>c(!0),d=()=>c(!1),f=(h,b)=>{d(),i.openModal({title:n("api_key.save.title"),children:e.jsxs(o.Stack,{children:[e.jsx(o.Text,{size:"sm",c:"dimmed",children:n("api_key.save.warn")}),e.jsx(o.TextInput,{defaultValue:h,disabled:!0,label:n("api_key.app_id"),styles:{input:{cursor:"text !important"}}}),e.jsx(o.TextInput,{defaultValue:b,disabled:!0,label:n("api_key.app_secret"),styles:{input:{cursor:"text !important"}}}),e.jsx(o.Button,{size:"sm",onClick:()=>{re.closeAllModals()},children:n("api_key.save.saved")})]}),onClose:()=>{a()}})};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:l,onClose:()=>c(!1),title:n("api_key.add"),trapFocus:!0,onDragStart:h=>{h.stopPropagation()},children:e.jsx(Vn,{postSubmit:f,styles:t,initialRoleID:s})}),e.jsx(o.Button,{size:t.button.size,onClick:u,leftSection:e.jsx(A.IconPlaylistAdd,{size:20}),children:n("api_key.add")})]})}function gt({id:a,name:t,onSuccess:s,styles:n=De}){const{t:i}=y.useTranslation(),l=re.useModals(),c=async()=>{if(a){T.showNotification({id:"for-deleting",title:i("common.state.pending"),message:i("global_sql_snippet.state.deleting"),loading:!0,autoClose:!1});try{await R.api_key.delete(a),T.updateNotification({id:"for-deleting",title:i("common.state.successful"),message:i("global_sql_snippet.state.deleted",{name:t}),color:"green",autoClose:!0}),s()}catch(d){T.updateNotification({id:"for-deleting",title:i("common.state.failed"),message:d.message,color:"red",autoClose:!0})}}},u=()=>l.openConfirmModal({title:i("api_key.delete"),labels:{confirm:i("common.actions.confirm"),cancel:i("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:c,cancelProps:{size:n.button.size},confirmProps:{color:"red",size:n.button.size}});return e.jsx(o.Button,{size:n.button.size,color:"red",onClick:u,leftSection:e.jsx(A.IconTrash,{size:20}),children:i("common.actions.delete")})}const Gn=be("APIKeyList",({styles:a=De})=>{var u;const{t}=y.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:d}=await R.api_key.list();return d},{refreshDeps:[]}),{data:l=[],loading:c}=K.useRequest(async()=>(await R.role.list()).map(f=>({label:f.id,value:f.id,description:f.description,disabled:f.id==="SUPERADMIN"})),{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsx(o.Group,{pt:a.spacing,justify:"flex-end",children:e.jsx(ht,{onSuccess:i,initialRoleID:((u=l==null?void 0:l[0])==null?void 0:u.value)??"INACTIVE"})}),e.jsxs(o.Box,{mt:a.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n||c}),e.jsxs(o.Table,{horizontalSpacing:a.spacing,verticalSpacing:a.spacing,fz:a.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("common.name")}),e.jsx(o.Table.Th,{children:t("api_key.app_id")}),e.jsx(o.Table.Th,{children:t("role.label")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(d=>{const{id:f,name:h,app_id:b,role_id:v}=d;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{width:200,children:h}),e.jsx(o.Table.Td,{width:200,children:b}),e.jsx(o.Table.Td,{width:200,children:v}),e.jsx(o.Table.Td,{width:200,children:e.jsx(o.Group,{justify:"flex-start",children:e.jsx(gt,{id:f,name:h,onSuccess:i})})})]},f)})})]})]})]})}),ue={size:"sm",spacing:"md",button:{size:"xs"}};function Wn({postSubmit:a,styles:t=ue}){const{t:s}=y.useTranslation(),{control:n,handleSubmit:i}=j.useForm({defaultValues:{id:"",content:""}}),l=async c=>{try{T.showNotification({id:"for-creating",title:s("common.state.pending"),message:s("global_sql_snippet.state.adding"),loading:!0,autoClose:!1}),await R.sql_snippet.create(c),T.updateNotification({id:"for-creating",title:s("common.state.successful"),message:s("global_sql_snippet.state.added"),color:"green",autoClose:!0}),a()}catch(u){T.updateNotification({id:"for-creating",title:s("common.state.failed"),message:u.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:i(l),children:[e.jsx(j.Controller,{name:"id",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:s("common.name"),placeholder:s("common.name_placeholder"),...c})}),e.jsx(j.Controller,{name:"content",control:n,render:({field:c})=>e.jsxs(o.Stack,{gap:4,children:[e.jsx(o.Text,{size:"14px",fw:500,c:"#212529",sx:{cursor:"default"},children:s("global_sql_snippet.content")}),e.jsx(ut,{height:"600px",...c})]})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function xt({onSuccess:a,styles:t=ue}){const{t:s}=y.useTranslation(),[n,i]=P.useState(!1),l=()=>i(!0),c=()=>i(!1),u=()=>{c(),a()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:n,onClose:()=>i(!1),title:s("global_sql_snippet.add"),trapFocus:!0,onDragStart:d=>{d.stopPropagation()},size:"80vw",children:e.jsx(Wn,{postSubmit:u,styles:t})}),e.jsx(o.Button,{size:t.button.size,onClick:l,leftSection:e.jsx(A.IconPlaylistAdd,{size:18}),children:s("global_sql_snippet.add")})]})}function Kn({postSubmit:a,styles:t=ue,id:s,content:n}){const{t:i}=y.useTranslation(),{control:l,handleSubmit:c}=j.useForm({defaultValues:{id:s,content:n}}),u=async d=>{try{T.showNotification({id:"for-updating",title:i("common.state.pending"),message:i("global_sql_snippet.state.updating"),loading:!0,autoClose:!1}),await R.sql_snippet.update(d),T.updateNotification({id:"for-updating",title:i("common.state.successful"),message:i("global_sql_snippet.state.updated"),color:"green",autoClose:!0}),a()}catch(f){T.updateNotification({id:"for-updating",title:i("common.state.failed"),message:f.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:c(u),children:[e.jsx(j.Controller,{name:"id",control:l,render:({field:d})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:i("common.name"),placeholder:i("common.name_placeholder"),...d})}),e.jsx(j.Controller,{name:"content",control:l,render:({field:d})=>e.jsxs(o.Stack,{gap:4,children:[e.jsx(o.Text,{size:"14px",fw:500,c:"#212529",sx:{cursor:"default"},children:i("global_sql_snippet.content")}),e.jsx(ut,{height:"600px",...d})]})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function bt({onSuccess:a,styles:t=ue,...s}){const{t:n}=y.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{u(),a()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("global_sql_snippet.edit"),trapFocus:!0,onDragStart:f=>{f.stopPropagation()},size:"80vw",children:e.jsx(Kn,{postSubmit:d,styles:t,...s})}),e.jsx(o.Button,{size:t.button.size,onClick:c,leftSection:e.jsx(A.IconEdit,{size:18}),children:n("common.actions.edit")})]})}function vt({id:a,onSuccess:t,styles:s=ue}){const{t:n}=y.useTranslation(),i=re.useModals(),l=async()=>{if(a){T.showNotification({id:"for-deleting",title:n("common.state.pending"),message:n("global_sql_snippet.state.deleting"),loading:!0,autoClose:!1});try{await R.sql_snippet.delete(a),T.updateNotification({id:"for-deleting",title:n("common.state.successful"),message:n("global_sql_snippet.state.deleted",{name:a}),color:"green",autoClose:!0}),t()}catch(u){T.updateNotification({id:"for-deleting",title:n("common.state.failed"),message:u.message,color:"red",autoClose:!0})}}},c=()=>i.openConfirmModal({title:n("global_sql_snippet.delete"),labels:{confirm:n("common.actions.confirm"),cancel:n("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:l,cancelProps:{size:s.button.size},confirmProps:{color:"red",size:s.button.size}});return e.jsx(o.Button,{size:s.button.size,color:"red",onClick:c,leftSection:e.jsx(A.IconTrash,{size:20}),children:n("common.actions.edit")})}function Qn({content:a}){return e.jsxs(o.HoverCard,{width:"60vw",shadow:"md",children:[e.jsx(o.HoverCard.Target,{children:e.jsx(o.ActionIcon,{variant:"subtle",size:16,children:e.jsx(A.IconEye,{})})}),e.jsx(o.HoverCard.Dropdown,{children:e.jsx(Kt.CodeHighlight,{code:a,language:"sql",withCopyButton:!1})})]})}const Jn=be("DataSourceList",({styles:a=ue})=>{const{t}=y.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:l}=await R.sql_snippet.list({pagination:{page:1,pagesize:10}});return l},{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsxs(o.Group,{pt:a.spacing,justify:"space-between",children:[e.jsx(o.Alert,{children:t("global_sql_snippet.description")}),e.jsx(xt,{onSuccess:i})]}),e.jsxs(o.Box,{mt:a.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n}),e.jsxs(o.Table,{horizontalSpacing:a.spacing,verticalSpacing:a.spacing,fz:a.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("common.name")}),e.jsx(o.Table.Th,{}),e.jsx(o.Table.Th,{children:t("common.created_at")}),e.jsx(o.Table.Th,{children:t("common.updated_at")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(l=>{const{id:c,content:u,create_time:d,update_time:f}=l;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{children:c}),e.jsx(o.Table.Td,{width:50,children:e.jsx(Qn,{content:u})}),e.jsx(o.Table.Td,{width:200,children:d}),e.jsx(o.Table.Td,{width:200,children:f}),e.jsx(o.Table.Td,{width:400,children:e.jsxs(o.Group,{justify:"flex-start",children:[e.jsx(bt,{...l,onSuccess:i}),e.jsx(vt,{id:c,onSuccess:i})]})})]},c)})})]})]})]})}),Hn=()=>Promise.resolve().then(()=>Xn).then(({version:a})=>(console.log(`[@devtable/settings-form] version: ${a}`),a)),Xn=Object.freeze(Object.defineProperty({__proto__:null,version:"13.44.1"},Symbol.toStringTag,{value:"Module"}));x.APIClient=O,x.APIKeyList=Gn,x.AccountList=Bn,x.AddAPIKey=ht,x.AddAccount=ft,x.AddDataSource=ct,x.AddSQLSnippet=xt,x.DataSourceList=Ln,x.DefaultApiClient=Xe,x.DeleteAPIKey=gt,x.DeleteAccount=mt,x.DeleteDataSource=dt,x.DeleteSQLSnippet=vt,x.FacadeApiClient=Ze,x.Login=Yn,x.SQLSnippetList=Jn,x.UpdateSQLSnippet=bt,x.configureAPIClient=tt,x.facadeApiClient=et,x.getVersion=Hn,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
|
|
36
|
+
`)};function Mn({name:r,config:t,submit:s,styles:n=V}){const{t:i}=y.useTranslation(),{control:l,handleSubmit:c}=j.useForm({defaultValues:{config:t}});return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:c(s),children:[e.jsx(o.TextInput,{mb:n.spacing,size:n.size,required:!0,label:i("common.name"),value:r,readOnly:!0}),e.jsx(o.Divider,{label:i("datasource.connection_info"),labelPosition:"center"}),e.jsx(j.Controller,{name:"config.host",control:l,render:({field:u})=>e.jsx(o.TextInput,{mb:n.spacing,size:n.size,label:i("datasource.http.base_url"),sx:{flexGrow:1},...u})}),e.jsxs(o.Group,{grow:!0,children:[e.jsx(j.Controller,{name:"config.processing.pre",control:l,render:({field:u})=>e.jsx(we,{label:i("datasource.http.processing.pre.label"),modalTitle:i("datasource.http.processing.pre.description"),defaultValue:ft.pre,...u,styles:n})}),e.jsx(j.Controller,{name:"config.processing.post",control:l,render:({field:u})=>e.jsx(we,{label:i("datasource.http.processing.post.label"),modalTitle:i("datasource.http.processing.post.description"),defaultValue:ft.post,...u,styles:n})})]}),e.jsx(o.Group,{justify:"flex-end",mt:n.spacing,children:e.jsx(W,{size:n.button.size})})]})})}function In({dataSource:r,postSubmit:t,styles:s=V}){const{t:n}=y.useTranslation(),i=async({config:l})=>{T.showNotification({id:"for-updating",title:n("common.state.pending"),message:n("datasource.state.updating"),loading:!0,autoClose:!1});try{console.log({config:l}),await R.datasource.update(r.id,l),T.updateNotification({id:"for-updating",title:n("common.state.successful"),message:n("datasource.state.updated"),color:"green",autoClose:!0}),t()}catch(c){T.updateNotification({id:"for-updating",title:n("common.state.failed"),message:c.message,color:"red",autoClose:!0})}};return r.config?e.jsx(o.Box,{mx:"auto",children:e.jsx(Mn,{name:r.key,config:r.config,submit:i,styles:s})}):(console.error(new Error("unexpected empty config of a http datasource")),null)}function Rn({dataSource:r,onSuccess:t,styles:s=V}){const{t:n}=y.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{t(),u()};return r.is_preset?e.jsx(o.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:n("datasource.cant_edit.preset"),children:e.jsx(o.Button,{size:s.button.size,color:"gray",variant:"light",leftSection:e.jsx(A.IconLock,{size:16}),sx:{transform:"none !important"},children:n("common.actions.edit")})}):r.type!=="http"?e.jsx(o.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:n("datasource.cant_edit.db"),children:e.jsx(o.Button,{size:s.button.size,color:"gray",variant:"light",leftSection:e.jsx(A.IconEdit,{size:16}),sx:{transform:"none !important"},children:n("common.actions.edit")})}):e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("datasource.edit"),trapFocus:!0,onDragStart:p=>{p.stopPropagation()},children:e.jsx(In,{dataSource:r,postSubmit:d,styles:s})}),e.jsx(o.Button,{size:s.button.size,color:"blue",onClick:c,leftSection:e.jsx(A.IconEdit,{size:16}),children:n("common.actions.edit")})]})}const Ln=be("DataSourceList",({styles:r=V})=>{const{t}=y.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:l}=await R.datasource.list();return l},{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsx(o.Group,{pt:r.spacing,justify:"flex-end",children:e.jsx(ct,{onSuccess:i})}),e.jsxs(o.Box,{mt:r.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n}),e.jsxs(o.Table,{horizontalSpacing:r.spacing,verticalSpacing:r.spacing,fz:r.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("common.type")}),e.jsx(o.Table.Th,{children:t("common.name")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(l=>{const{id:c,key:u,type:d,is_preset:p}=l,h=d==="merico_metric_system";return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{width:230,children:e.jsx($n,{type:d})}),e.jsx(o.Table.Td,{children:u}),e.jsx(o.Table.Td,{width:400,children:e.jsxs(o.Group,{justify:"flex-start",children:[e.jsx(Rn,{dataSource:l,onSuccess:i,styles:r}),e.jsx(dt,{isProtected:p||h,id:c,name:u,onSuccess:i,styles:r})]})})]},u)})})]})]})]})}),qn=({option:r,...t})=>{const{label:s,value:n,description:i}=r;return e.jsxs(o.Stack,{gap:2,...t,children:[e.jsx(o.Text,{size:"sm",children:s}),e.jsx(o.Text,{size:"xs",c:"dimmed",className:"role-description",children:i})]})},qe=P.forwardRef(({styles:r,value:t,onChange:s},n)=>{const{t:i}=y.useTranslation(),{data:l=[],loading:c}=K.useRequest(async()=>(await R.role.list()).map(d=>({label:d.id,value:d.id,description:d.description,disabled:d.id==="SUPERADMIN"})),{refreshDeps:[]});return e.jsx(o.Select,{ref:n,mb:r.spacing,size:r.size,required:!0,label:i("role.label"),renderOption:qn,data:l,disabled:c,styles:()=>({item:{"&[data-selected]":{"&, &:hover":{".role-description":{color:"rgba(255,255,255,.8)"}}}}}),value:t,onChange:u=>u!==null&&s(u),comboboxProps:{withinPortal:!0},maxDropdownHeight:500})}),H={size:"sm",spacing:"md",button:{size:"xs"}};function kn({postSubmit:r,styles:t=H,initialRoleID:s}){const{t:n}=y.useTranslation(),{control:i,handleSubmit:l}=j.useForm({defaultValues:{name:"",email:"",role_id:s,password:""}}),c=async({name:u,email:d,password:p,role_id:h})=>{try{T.showNotification({id:"for-creating",title:n("common.state.pending"),message:n("account.state.adding"),loading:!0,autoClose:!1}),await R.account.create(u,d,p,h),T.updateNotification({id:"for-creating",title:n("common.state.successful"),message:n("account.state.added"),color:"green",autoClose:!0,loading:!1}),r()}catch(b){T.updateNotification({id:"for-creating",title:n("common.state.failed"),message:b.message,color:"red",autoClose:!0,loading:!1})}};return e.jsx(o.Box,{mx:"auto",mb:10,children:e.jsxs("form",{onSubmit:l(c),children:[e.jsx(j.Controller,{name:"name",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("account.username"),...u})}),e.jsx(j.Controller,{name:"email",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("account.email"),...u})}),e.jsx(j.Controller,{name:"password",control:i,render:({field:u})=>e.jsx(o.PasswordInput,{mb:t.spacing,size:t.size,required:!0,label:n("account.password"),description:n("account.password_hint"),...u})}),e.jsx(j.Controller,{name:"role_id",control:i,render:({field:u})=>e.jsx(qe,{styles:t,...u})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function pt({onSuccess:r,styles:t=H,initialRoleID:s}){const{t:n}=y.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{r(),u()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("account.add"),trapFocus:!0,onDragStart:p=>{p.stopPropagation()},children:e.jsx(kn,{postSubmit:d,styles:t,initialRoleID:s})}),e.jsx(o.Button,{size:t.button.size,onClick:c,leftSection:e.jsx(A.IconPlaylistAdd,{size:20}),children:n("account.add")})]})}function mt({id:r,name:t,onSuccess:s,styles:n=H}){const{t:i}=y.useTranslation(),l=ae.useModals(),c=async()=>{if(r){T.showNotification({id:"for-deleting",title:i("common.state.pending"),message:i("account.state.deleting"),loading:!0,autoClose:!1});try{await R.account.delete(r),T.updateNotification({id:"for-deleting",title:i("common.state.successful"),message:i("account.state.deleted",{name:t}),color:"green",autoClose:!0,loading:!1}),s()}catch(d){T.updateNotification({id:"for-deleting",title:i("common.state.failed"),message:d.message,color:"red",autoClose:!0,loading:!1})}}},u=()=>l.openConfirmModal({title:i("account.delete"),labels:{confirm:i("common.actions.confirm"),cancel:i("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:c,cancelProps:{size:n.button.size},confirmProps:{color:"red",size:n.button.size}});return e.jsx(o.Button,{size:n.button.size,color:"red",onClick:u,leftSection:e.jsx(A.IconTrash,{size:20}),children:i("common.actions.delete")})}function Nn({id:r,name:t,email:s,role_id:n,postSubmit:i,styles:l=H}){const{t:c}=y.useTranslation(),{control:u,handleSubmit:d,watch:p}=j.useForm({defaultValues:{name:t,email:s,role_id:n,reset_password:!1,new_password:""}}),h=async({name:C,email:q,role_id:Y,reset_password:X,new_password:k})=>{try{T.showNotification({id:"for-updating",title:c("common.state.pending"),message:c("account.state.updating"),loading:!0,autoClose:!1}),await R.account.edit({id:r,name:C.trim(),email:q.trim(),role_id:Y,reset_password:X,new_password:k.trim()}),T.updateNotification({id:"for-updating",title:c("common.state.successful"),message:c("account.state.updated"),color:"green",autoClose:!0,loading:!1}),i()}catch(D){T.updateNotification({id:"for-updating",title:c("common.state.failed"),message:D.message,color:"red",autoClose:!0,loading:!1})}},[b,v]=p(["reset_password","new_password"]);return e.jsx(o.Box,{mx:"auto",mb:10,children:e.jsxs("form",{onSubmit:d(h),children:[e.jsx(j.Controller,{name:"name",control:u,render:({field:C})=>e.jsx(o.TextInput,{mb:l.spacing,size:l.size,required:!0,label:c("account.username"),...C})}),e.jsx(j.Controller,{name:"email",control:u,render:({field:C})=>e.jsx(o.TextInput,{mb:l.spacing,size:l.size,required:!0,label:c("account.email"),...C})}),e.jsx(j.Controller,{name:"role_id",control:u,render:({field:C})=>e.jsx(qe,{styles:l,...C})}),e.jsx(o.Divider,{my:20,variant:"dashed",label:"",labelPosition:"center"}),e.jsx(j.Controller,{name:"reset_password",control:u,render:({field:C})=>e.jsx(o.Switch,{mb:l.spacing,size:l.size,label:c("account.reset_password"),checked:C.value,onChange:q=>C.onChange(q.currentTarget.checked),styles:{label:{verticalAlign:"middle"}}})}),b&&e.jsx(j.Controller,{name:"new_password",control:u,render:({field:C})=>e.jsx(o.PasswordInput,{autoComplete:"off",mb:l.spacing,size:l.size,required:!0,description:c("account.password_hint"),label:c("account.new_password"),...C})}),e.jsx(o.Group,{justify:"flex-end",mt:l.spacing,children:e.jsx(W,{size:l.button.size})})]})})}function Fn({account:r,onSuccess:t,styles:s=H}){const{t:n}=y.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{t(),u()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("account.editing_xx",{name:r.name}),trapFocus:!0,onDragStart:p=>{p.stopPropagation()},children:e.jsx(Nn,{...r,postSubmit:d,styles:s})}),e.jsx(o.Button,{size:s.button.size,onClick:c,leftSection:e.jsx(A.IconEdit,{size:20}),children:n("common.actions.edit")})]})}const Bn=be("AccountList",({styles:r=H})=>{var u;const{t}=y.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:d}=await R.account.list();return d},{refreshDeps:[]}),{data:l=[],loading:c}=K.useRequest(async()=>(await R.role.list()).map(p=>({label:p.id,value:p.id,description:p.description,disabled:p.id==="SUPERADMIN"})),{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsx(o.Group,{pt:r.spacing,justify:"flex-end",children:e.jsx(pt,{onSuccess:i,initialRoleID:((u=l==null?void 0:l[0])==null?void 0:u.value)??"INACTIVE"})}),e.jsxs(o.Box,{mt:r.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n||c}),e.jsxs(o.Table,{horizontalSpacing:r.spacing,verticalSpacing:r.spacing,fz:r.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("account.username")}),e.jsx(o.Table.Th,{children:t("account.email")}),e.jsx(o.Table.Th,{children:t("role.label")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(d=>{const{id:p,name:h,email:b,role_id:v}=d;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{width:200,children:h}),e.jsx(o.Table.Td,{width:200,children:b}),e.jsx(o.Table.Td,{width:200,children:v}),e.jsx(o.Table.Td,{width:200,children:e.jsxs(o.Group,{justify:"flex-start",children:[e.jsx(Fn,{account:d,onSuccess:i}),e.jsx(mt,{id:p,name:h,onSuccess:i})]})})]},p)})})]})]})]})});function Un({postSubmit:r,styles:t=H}){const{t:s}=y.useTranslation(),{control:n,handleSubmit:i}=j.useForm({defaultValues:{name:"",password:""}}),l=async({name:c,password:u})=>{try{T.showNotification({id:"for-login",title:s("common.state.pending"),message:s("account.state.logging_in"),loading:!0,autoClose:!1});const d=await R.account.login(c.trim(),u.trim());window.localStorage.setItem("token",d.token),T.updateNotification({id:"for-login",title:s("common.state.successful"),message:s("account.state.logged_in"),color:"green",autoClose:!0,loading:!1}),r(d)}catch(d){T.updateNotification({id:"for-login",title:s("common.state.failed"),message:d.message,color:"red",autoClose:!0,loading:!1})}};return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:i(l),children:[e.jsx(j.Controller,{name:"name",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:s("account.username"),...c})}),e.jsx(j.Controller,{name:"password",control:n,render:({field:c})=>e.jsx(o.PasswordInput,{mb:t.spacing,size:t.size,required:!0,label:s("account.password"),...c})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}const Yn=be("Login",({styles:r=H,onSuccess:t})=>e.jsx(e.Fragment,{children:e.jsx(o.Box,{mt:r.spacing,sx:{position:"relative"},children:e.jsx(Un,{styles:r,postSubmit:t})})})),De={size:"sm",spacing:"md",button:{size:"xs"}};function Vn({postSubmit:r,styles:t=De,initialRoleID:s}){const{t:n}=y.useTranslation(),{control:i,handleSubmit:l}=j.useForm({defaultValues:{name:"",role_id:s}}),c=async({name:u,role_id:d})=>{try{T.showNotification({id:"for-creating",title:n("common.state.pending"),message:n("api_key.state.adding"),loading:!0,autoClose:!1});const{app_id:p,app_secret:h}=await R.api_key.create(u,d);T.updateNotification({id:"for-creating",title:n("common.state.successful"),message:n("api_key.state.added"),color:"green",autoClose:!0,loading:!1}),r(p,h)}catch(p){T.updateNotification({id:"for-creating",title:n("common.state.failed"),message:p.message,color:"red",autoClose:!0,loading:!1})}};return e.jsx(o.Box,{mx:"auto",mb:10,children:e.jsxs("form",{onSubmit:l(c),children:[e.jsx(j.Controller,{name:"name",control:i,render:({field:u})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:n("common.name"),...u})}),e.jsx(j.Controller,{name:"role_id",control:i,render:({field:u})=>e.jsx(qe,{styles:t,...u})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function ht({onSuccess:r,styles:t=De,initialRoleID:s}){const{t:n}=y.useTranslation(),i=ae.useModals(),[l,c]=P.useState(!1),u=()=>c(!0),d=()=>c(!1),p=(h,b)=>{d(),i.openModal({title:n("api_key.save.title"),children:e.jsxs(o.Stack,{children:[e.jsx(o.Text,{size:"sm",c:"dimmed",children:n("api_key.save.warn")}),e.jsx(o.TextInput,{defaultValue:h,disabled:!0,label:n("api_key.app_id"),styles:{input:{cursor:"text !important"}}}),e.jsx(o.TextInput,{defaultValue:b,disabled:!0,label:n("api_key.app_secret"),styles:{input:{cursor:"text !important"}}}),e.jsx(o.Button,{size:"sm",onClick:()=>{ae.closeAllModals()},children:n("api_key.save.saved")})]}),onClose:()=>{r()}})};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:l,onClose:()=>c(!1),title:n("api_key.add"),trapFocus:!0,onDragStart:h=>{h.stopPropagation()},children:e.jsx(Vn,{postSubmit:p,styles:t,initialRoleID:s})}),e.jsx(o.Button,{size:t.button.size,onClick:u,leftSection:e.jsx(A.IconPlaylistAdd,{size:20}),children:n("api_key.add")})]})}function gt({id:r,name:t,onSuccess:s,styles:n=De}){const{t:i}=y.useTranslation(),l=ae.useModals(),c=async()=>{if(r){T.showNotification({id:"for-deleting",title:i("common.state.pending"),message:i("global_sql_snippet.state.deleting"),loading:!0,autoClose:!1});try{await R.api_key.delete(r),T.updateNotification({id:"for-deleting",title:i("common.state.successful"),message:i("global_sql_snippet.state.deleted",{name:t}),color:"green",autoClose:!0,loading:!1}),s()}catch(d){T.updateNotification({id:"for-deleting",title:i("common.state.failed"),message:d.message,color:"red",autoClose:!0,loading:!1})}}},u=()=>l.openConfirmModal({title:i("api_key.delete"),labels:{confirm:i("common.actions.confirm"),cancel:i("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:c,cancelProps:{size:n.button.size},confirmProps:{color:"red",size:n.button.size}});return e.jsx(o.Button,{size:n.button.size,color:"red",onClick:u,leftSection:e.jsx(A.IconTrash,{size:20}),children:i("common.actions.delete")})}const Gn=be("APIKeyList",({styles:r=De})=>{var u;const{t}=y.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:d}=await R.api_key.list();return d},{refreshDeps:[]}),{data:l=[],loading:c}=K.useRequest(async()=>(await R.role.list()).map(p=>({label:p.id,value:p.id,description:p.description,disabled:p.id==="SUPERADMIN"})),{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsx(o.Group,{pt:r.spacing,justify:"flex-end",children:e.jsx(ht,{onSuccess:i,initialRoleID:((u=l==null?void 0:l[0])==null?void 0:u.value)??"INACTIVE"})}),e.jsxs(o.Box,{mt:r.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n||c}),e.jsxs(o.Table,{horizontalSpacing:r.spacing,verticalSpacing:r.spacing,fz:r.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("common.name")}),e.jsx(o.Table.Th,{children:t("api_key.app_id")}),e.jsx(o.Table.Th,{children:t("role.label")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(d=>{const{id:p,name:h,app_id:b,role_id:v}=d;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{width:200,children:h}),e.jsx(o.Table.Td,{width:200,children:b}),e.jsx(o.Table.Td,{width:200,children:v}),e.jsx(o.Table.Td,{width:200,children:e.jsx(o.Group,{justify:"flex-start",children:e.jsx(gt,{id:p,name:h,onSuccess:i})})})]},p)})})]})]})]})}),ue={size:"sm",spacing:"md",button:{size:"xs"}};function Wn({postSubmit:r,styles:t=ue}){const{t:s}=y.useTranslation(),{control:n,handleSubmit:i}=j.useForm({defaultValues:{id:"",content:""}}),l=async c=>{try{T.showNotification({id:"for-creating",title:s("common.state.pending"),message:s("global_sql_snippet.state.adding"),loading:!0,autoClose:!1}),await R.sql_snippet.create(c),T.updateNotification({id:"for-creating",title:s("common.state.successful"),message:s("global_sql_snippet.state.added"),color:"green",autoClose:!0}),r()}catch(u){T.updateNotification({id:"for-creating",title:s("common.state.failed"),message:u.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:i(l),children:[e.jsx(j.Controller,{name:"id",control:n,render:({field:c})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:s("common.name"),placeholder:s("common.name_placeholder"),...c})}),e.jsx(j.Controller,{name:"content",control:n,render:({field:c})=>e.jsxs(o.Stack,{gap:4,children:[e.jsx(o.Text,{size:"14px",fw:500,c:"#212529",sx:{cursor:"default"},children:s("global_sql_snippet.content")}),e.jsx(ut,{height:"600px",...c})]})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function xt({onSuccess:r,styles:t=ue}){const{t:s}=y.useTranslation(),[n,i]=P.useState(!1),l=()=>i(!0),c=()=>i(!1),u=()=>{c(),r()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:n,onClose:()=>i(!1),title:s("global_sql_snippet.add"),trapFocus:!0,onDragStart:d=>{d.stopPropagation()},size:"80vw",children:e.jsx(Wn,{postSubmit:u,styles:t})}),e.jsx(o.Button,{size:t.button.size,onClick:l,leftSection:e.jsx(A.IconPlaylistAdd,{size:18}),children:s("global_sql_snippet.add")})]})}function Kn({postSubmit:r,styles:t=ue,id:s,content:n}){const{t:i}=y.useTranslation(),{control:l,handleSubmit:c}=j.useForm({defaultValues:{id:s,content:n}}),u=async d=>{try{T.showNotification({id:"for-updating",title:i("common.state.pending"),message:i("global_sql_snippet.state.updating"),loading:!0,autoClose:!1}),await R.sql_snippet.update(d),T.updateNotification({id:"for-updating",title:i("common.state.successful"),message:i("global_sql_snippet.state.updated"),color:"green",autoClose:!0}),r()}catch(p){T.updateNotification({id:"for-updating",title:i("common.state.failed"),message:p.message,color:"red",autoClose:!0})}};return e.jsx(o.Box,{mx:"auto",children:e.jsxs("form",{onSubmit:c(u),children:[e.jsx(j.Controller,{name:"id",control:l,render:({field:d})=>e.jsx(o.TextInput,{mb:t.spacing,size:t.size,required:!0,label:i("common.name"),placeholder:i("common.name_placeholder"),...d})}),e.jsx(j.Controller,{name:"content",control:l,render:({field:d})=>e.jsxs(o.Stack,{gap:4,children:[e.jsx(o.Text,{size:"14px",fw:500,c:"#212529",sx:{cursor:"default"},children:i("global_sql_snippet.content")}),e.jsx(ut,{height:"600px",...d})]})}),e.jsx(o.Group,{justify:"flex-end",mt:t.spacing,children:e.jsx(W,{size:t.button.size})})]})})}function bt({onSuccess:r,styles:t=ue,...s}){const{t:n}=y.useTranslation(),[i,l]=P.useState(!1),c=()=>l(!0),u=()=>l(!1),d=()=>{u(),r()};return e.jsxs(e.Fragment,{children:[e.jsx(o.Modal,{opened:i,onClose:()=>l(!1),title:n("global_sql_snippet.edit"),trapFocus:!0,onDragStart:p=>{p.stopPropagation()},size:"80vw",children:e.jsx(Kn,{postSubmit:d,styles:t,...s})}),e.jsx(o.Button,{size:t.button.size,onClick:c,leftSection:e.jsx(A.IconEdit,{size:18}),children:n("common.actions.edit")})]})}function vt({id:r,onSuccess:t,styles:s=ue}){const{t:n}=y.useTranslation(),i=ae.useModals(),l=async()=>{if(r){T.showNotification({id:"for-deleting",title:n("common.state.pending"),message:n("global_sql_snippet.state.deleting"),loading:!0,autoClose:!1});try{await R.sql_snippet.delete(r),T.updateNotification({id:"for-deleting",title:n("common.state.successful"),message:n("global_sql_snippet.state.deleted",{name:r}),color:"green",autoClose:!0}),t()}catch(u){T.updateNotification({id:"for-deleting",title:n("common.state.failed"),message:u.message,color:"red",autoClose:!0})}}},c=()=>i.openConfirmModal({title:n("global_sql_snippet.delete"),labels:{confirm:n("common.actions.confirm"),cancel:n("common.actions.cancel")},onCancel:()=>console.log("Cancel"),onConfirm:l,cancelProps:{size:s.button.size},confirmProps:{color:"red",size:s.button.size}});return e.jsx(o.Button,{size:s.button.size,color:"red",onClick:c,leftSection:e.jsx(A.IconTrash,{size:20}),children:n("common.actions.edit")})}function Qn({content:r}){return e.jsxs(o.HoverCard,{width:"60vw",shadow:"md",children:[e.jsx(o.HoverCard.Target,{children:e.jsx(o.ActionIcon,{variant:"subtle",size:16,children:e.jsx(A.IconEye,{})})}),e.jsx(o.HoverCard.Dropdown,{children:e.jsx(Kt.CodeHighlight,{code:r,language:"sql",withCopyButton:!1})})]})}const Jn=be("DataSourceList",({styles:r=ue})=>{const{t}=y.useTranslation(),{data:s=[],loading:n,refresh:i}=K.useRequest(async()=>{const{data:l}=await R.sql_snippet.list({pagination:{page:1,pagesize:10}});return l},{refreshDeps:[]});return e.jsxs(e.Fragment,{children:[e.jsxs(o.Group,{pt:r.spacing,justify:"space-between",children:[e.jsx(o.Alert,{children:t("global_sql_snippet.description")}),e.jsx(xt,{onSuccess:i})]}),e.jsxs(o.Box,{mt:r.spacing,sx:{position:"relative"},children:[e.jsx(o.LoadingOverlay,{visible:n}),e.jsxs(o.Table,{horizontalSpacing:r.spacing,verticalSpacing:r.spacing,fz:r.size,highlightOnHover:!0,children:[e.jsx(o.Table.Thead,{children:e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Th,{children:t("common.name")}),e.jsx(o.Table.Th,{}),e.jsx(o.Table.Th,{children:t("common.created_at")}),e.jsx(o.Table.Th,{children:t("common.updated_at")}),e.jsx(o.Table.Th,{children:t("common.action")})]})}),e.jsx(o.Table.Tbody,{children:s.map(l=>{const{id:c,content:u,create_time:d,update_time:p}=l;return e.jsxs(o.Table.Tr,{children:[e.jsx(o.Table.Td,{children:c}),e.jsx(o.Table.Td,{width:50,children:e.jsx(Qn,{content:u})}),e.jsx(o.Table.Td,{width:200,children:d}),e.jsx(o.Table.Td,{width:200,children:p}),e.jsx(o.Table.Td,{width:400,children:e.jsxs(o.Group,{justify:"flex-start",children:[e.jsx(bt,{...l,onSuccess:i}),e.jsx(vt,{id:c,onSuccess:i})]})})]},c)})})]})]})]})}),Hn=()=>Promise.resolve().then(()=>Xn).then(({version:r})=>(console.log(`[@devtable/settings-form] version: ${r}`),r)),Xn=Object.freeze(Object.defineProperty({__proto__:null,version:"13.44.2"},Symbol.toStringTag,{value:"Module"}));x.APIClient=O,x.APIKeyList=Gn,x.AccountList=Bn,x.AddAPIKey=ht,x.AddAccount=pt,x.AddDataSource=ct,x.AddSQLSnippet=xt,x.DataSourceList=Ln,x.DefaultApiClient=Xe,x.DeleteAPIKey=gt,x.DeleteAccount=mt,x.DeleteDataSource=dt,x.DeleteSQLSnippet=vt,x.FacadeApiClient=Ze,x.Login=Yn,x.SQLSnippetList=Jn,x.UpdateSQLSnippet=bt,x.configureAPIClient=tt,x.facadeApiClient=et,x.getVersion=Hn,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
|
package/dist/stats.html
CHANGED
|
@@ -4822,7 +4822,7 @@ var drawChart = (function (exports) {
|
|
|
4822
4822
|
</script>
|
|
4823
4823
|
<script>
|
|
4824
4824
|
/*<!--*/
|
|
4825
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"settings-form.umd.js","children":[{"name":"\u0000/Users/leto/github/merico-dev/table/node_modules/react","children":[{"uid":"d7163046-1","name":"jsx-runtime.js?commonjs-module"},{"name":"cjs","children":[{"uid":"d7163046-3","name":"react-jsx-runtime.production.min.js?commonjs-exports"},{"uid":"d7163046-7","name":"react-jsx-runtime.development.js?commonjs-exports"}]}]},{"name":"Users/leto/github/merico-dev/table","children":[{"name":"node_modules","children":[{"name":"react","children":[{"name":"cjs","children":[{"uid":"d7163046-5","name":"react-jsx-runtime.production.min.js"},{"uid":"d7163046-9","name":"react-jsx-runtime.development.js"}]},{"uid":"d7163046-11","name":"jsx-runtime.js"}]},{"name":"dayjs/esm","children":[{"uid":"d7163046-29","name":"constant.js"},{"name":"locale/en.js","uid":"d7163046-31"},{"uid":"d7163046-33","name":"utils.js"},{"uid":"d7163046-35","name":"index.js"}]}]},{"name":"shared/src/api-client","children":[{"uid":"d7163046-13","name":"utils.ts"},{"uid":"d7163046-15","name":"default-api-client.ts"},{"uid":"d7163046-17","name":"facade-api-client.ts"}]}]},{"name":"src","children":[{"name":"api-caller","children":[{"uid":"d7163046-19","name":"request.ts"},{"uid":"d7163046-21","name":"account.ts"},{"uid":"d7163046-23","name":"api-key.ts"},{"uid":"d7163046-25","name":"datasource.ts"},{"uid":"d7163046-27","name":"role.ts"},{"uid":"d7163046-37","name":"sql_snippet.ts"},{"uid":"d7163046-39","name":"index.ts"}]},{"name":"datasource","children":[{"uid":"d7163046-41","name":"styles.ts"},{"name":"add-data-source","children":[{"uid":"d7163046-43","name":"db-permission-tips.tsx"},{"name":"forms","children":[{"uid":"d7163046-61","name":"database.tsx"},{"uid":"d7163046-67","name":"http.tsx"}]},{"uid":"d7163046-69","name":"index.tsx"}]},{"name":"components","children":[{"name":"function-string-field","children":[{"uid":"d7163046-63","name":"function-string-editor.tsx"},{"uid":"d7163046-65","name":"index.tsx"}]},{"uid":"d7163046-71","name":"data-source-icon.tsx"}]},{"uid":"d7163046-73","name":"delete-data-source.tsx"},{"name":"edit-data-source","children":[{"name":"forms/http.tsx","uid":"d7163046-75"},{"uid":"d7163046-77","name":"index.tsx"}]},{"uid":"d7163046-79","name":"data-source-list.tsx"}]},{"name":"components","children":[{"uid":"d7163046-45","name":"minimal-mocaco-editor.tsx"},{"uid":"d7163046-47","name":"submit-form-button.tsx"},{"uid":"d7163046-59","name":"with-entry.tsx"}]},{"name":"i18n","children":[{"uid":"d7163046-49","name":"en.ts"},{"uid":"d7163046-51","name":"zh.ts"},{"uid":"d7163046-53","name":"i18n.ts"},{"uid":"d7163046-55","name":"i18next-context.tsx"}]},{"name":"utils/load-monaco-editor.ts","uid":"d7163046-57"},{"name":"account","children":[{"uid":"d7163046-81","name":"role-selector.tsx"},{"uid":"d7163046-83","name":"styles.ts"},{"uid":"d7163046-85","name":"add-account.tsx"},{"uid":"d7163046-87","name":"delete-account.tsx"},{"uid":"d7163046-89","name":"edit-account.tsx"},{"uid":"d7163046-91","name":"account-list.tsx"},{"name":"login","children":[{"uid":"d7163046-93","name":"form.tsx"},{"uid":"d7163046-95","name":"index.tsx"}]}]},{"name":"api-key","children":[{"uid":"d7163046-97","name":"styles.ts"},{"uid":"d7163046-99","name":"add-api-key.tsx"},{"uid":"d7163046-101","name":"delete-api-key.tsx"},{"uid":"d7163046-103","name":"api-key-list.tsx"}]},{"name":"sql_snippet","children":[{"uid":"d7163046-105","name":"styles.ts"},{"uid":"d7163046-107","name":"add-sql_snippet.tsx"},{"uid":"d7163046-109","name":"update-sql_snippet.tsx"},{"uid":"d7163046-111","name":"delete-sql_snippet.tsx"},{"uid":"d7163046-113","name":"sql_snippet-list.tsx"}]},{"uid":"d7163046-115","name":"index.ts"}]},{"uid":"d7163046-117","name":"package.json"}]}],"isRoot":true},"nodeParts":{"d7163046-1":{"renderedLength":33,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-0"},"d7163046-3":{"renderedLength":42,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-2"},"d7163046-5":{"renderedLength":1217,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-4"},"d7163046-7":{"renderedLength":39,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-6"},"d7163046-9":{"renderedLength":46244,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-8"},"d7163046-11":{"renderedLength":237,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-10"},"d7163046-13":{"renderedLength":949,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-12"},"d7163046-15":{"renderedLength":2262,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-14"},"d7163046-17":{"renderedLength":422,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-16"},"d7163046-19":{"renderedLength":426,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-18"},"d7163046-21":{"renderedLength":1913,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-20"},"d7163046-23":{"renderedLength":641,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-22"},"d7163046-25":{"renderedLength":730,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-24"},"d7163046-27":{"renderedLength":132,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-26"},"d7163046-29":{"renderedLength":1011,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-28"},"d7163046-31":{"renderedLength":496,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-30"},"d7163046-33":{"renderedLength":1623,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-32"},"d7163046-35":{"renderedLength":14006,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-34"},"d7163046-37":{"renderedLength":1079,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-36"},"d7163046-39":{"renderedLength":94,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-38"},"d7163046-41":{"renderedLength":104,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-40"},"d7163046-43":{"renderedLength":570,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-42"},"d7163046-45":{"renderedLength":675,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-44"},"d7163046-47":{"renderedLength":370,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-46"},"d7163046-49":{"renderedLength":4266,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-48"},"d7163046-51":{"renderedLength":4276,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-50"},"d7163046-53":{"renderedLength":253,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-52"},"d7163046-55":{"renderedLength":246,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-54"},"d7163046-57":{"renderedLength":551,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-56"},"d7163046-59":{"renderedLength":625,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-58"},"d7163046-61":{"renderedLength":3109,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-60"},"d7163046-63":{"renderedLength":502,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-62"},"d7163046-65":{"renderedLength":2398,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-64"},"d7163046-67":{"renderedLength":2894,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-66"},"d7163046-69":{"renderedLength":3130,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-68"},"d7163046-71":{"renderedLength":958,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-70"},"d7163046-73":{"renderedLength":2217,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-72"},"d7163046-75":{"renderedLength":2514,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-74"},"d7163046-77":{"renderedLength":3551,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-76"},"d7163046-79":{"renderedLength":2739,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-78"},"d7163046-81":{"renderedLength":1553,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-80"},"d7163046-83":{"renderedLength":104,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-82"},"d7163046-85":{"renderedLength":3804,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-84"},"d7163046-87":{"renderedLength":1778,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-86"},"d7163046-89":{"renderedLength":4916,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-88"},"d7163046-91":{"renderedLength":3158,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-90"},"d7163046-93":{"renderedLength":2210,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-92"},"d7163046-95":{"renderedLength":397,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-94"},"d7163046-97":{"renderedLength":104,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-96"},"d7163046-99":{"renderedLength":4207,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-98"},"d7163046-101":{"renderedLength":1799,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-100"},"d7163046-103":{"renderedLength":3016,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-102"},"d7163046-105":{"renderedLength":102,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-104"},"d7163046-107":{"renderedLength":3370,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-106"},"d7163046-109":{"renderedLength":3409,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-108"},"d7163046-111":{"renderedLength":1808,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-110"},"d7163046-113":{"renderedLength":3839,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-112"},"d7163046-115":{"renderedLength":187,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-114"},"d7163046-117":{"renderedLength":28,"gzipLength":0,"brotliLength":0,"metaUid":"d7163046-116"}},"nodeMetas":{"d7163046-0":{"id":"\u0000/Users/leto/github/merico-dev/table/node_modules/react/jsx-runtime.js?commonjs-module","moduleParts":{"settings-form.umd.js":"d7163046-1"},"imported":[],"importedBy":[{"uid":"d7163046-10"}]},"d7163046-2":{"id":"\u0000/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.production.min.js?commonjs-exports","moduleParts":{"settings-form.umd.js":"d7163046-3"},"imported":[],"importedBy":[{"uid":"d7163046-4"}]},"d7163046-4":{"id":"/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.production.min.js","moduleParts":{"settings-form.umd.js":"d7163046-5"},"imported":[{"uid":"d7163046-139"},{"uid":"d7163046-2"},{"uid":"d7163046-142"}],"importedBy":[{"uid":"d7163046-10"}]},"d7163046-6":{"id":"\u0000/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.development.js?commonjs-exports","moduleParts":{"settings-form.umd.js":"d7163046-7"},"imported":[],"importedBy":[{"uid":"d7163046-8"}]},"d7163046-8":{"id":"/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.development.js","moduleParts":{"settings-form.umd.js":"d7163046-9"},"imported":[{"uid":"d7163046-139"},{"uid":"d7163046-6"},{"uid":"d7163046-142"}],"importedBy":[{"uid":"d7163046-10"}]},"d7163046-10":{"id":"/Users/leto/github/merico-dev/table/node_modules/react/jsx-runtime.js","moduleParts":{"settings-form.umd.js":"d7163046-11"},"imported":[{"uid":"d7163046-139"},{"uid":"d7163046-0"},{"uid":"d7163046-4"},{"uid":"d7163046-8"}],"importedBy":[{"uid":"d7163046-68"},{"uid":"d7163046-78"},{"uid":"d7163046-72"},{"uid":"d7163046-84"},{"uid":"d7163046-90"},{"uid":"d7163046-86"},{"uid":"d7163046-94"},{"uid":"d7163046-98"},{"uid":"d7163046-102"},{"uid":"d7163046-100"},{"uid":"d7163046-106"},{"uid":"d7163046-108"},{"uid":"d7163046-112"},{"uid":"d7163046-110"},{"uid":"d7163046-42"},{"uid":"d7163046-60"},{"uid":"d7163046-66"},{"uid":"d7163046-70"},{"uid":"d7163046-76"},{"uid":"d7163046-80"},{"uid":"d7163046-88"},{"uid":"d7163046-92"},{"uid":"d7163046-44"},{"uid":"d7163046-64"},{"uid":"d7163046-46"},{"uid":"d7163046-58"},{"uid":"d7163046-74"},{"uid":"d7163046-62"},{"uid":"d7163046-54"}]},"d7163046-12":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/utils.ts","moduleParts":{"settings-form.umd.js":"d7163046-13"},"imported":[{"uid":"d7163046-143"}],"importedBy":[{"uid":"d7163046-138"},{"uid":"d7163046-14"}]},"d7163046-14":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/default-api-client.ts","moduleParts":{"settings-form.umd.js":"d7163046-15"},"imported":[{"uid":"d7163046-144"},{"uid":"d7163046-12"},{"uid":"d7163046-145"}],"importedBy":[{"uid":"d7163046-138"}]},"d7163046-16":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/facade-api-client.ts","moduleParts":{"settings-form.umd.js":"d7163046-17"},"imported":[],"importedBy":[{"uid":"d7163046-138"}]},"d7163046-18":{"id":"/src/api-caller/request.ts","moduleParts":{"settings-form.umd.js":"d7163046-19"},"imported":[{"uid":"d7163046-127"}],"importedBy":[{"uid":"d7163046-114"},{"uid":"d7163046-20"},{"uid":"d7163046-22"},{"uid":"d7163046-24"},{"uid":"d7163046-26"},{"uid":"d7163046-36"},{"uid":"d7163046-58"}]},"d7163046-20":{"id":"/src/api-caller/account.ts","moduleParts":{"settings-form.umd.js":"d7163046-21"},"imported":[{"uid":"d7163046-18"}],"importedBy":[{"uid":"d7163046-38"}]},"d7163046-22":{"id":"/src/api-caller/api-key.ts","moduleParts":{"settings-form.umd.js":"d7163046-23"},"imported":[{"uid":"d7163046-18"}],"importedBy":[{"uid":"d7163046-38"}]},"d7163046-24":{"id":"/src/api-caller/datasource.ts","moduleParts":{"settings-form.umd.js":"d7163046-25"},"imported":[{"uid":"d7163046-18"}],"importedBy":[{"uid":"d7163046-38"}]},"d7163046-26":{"id":"/src/api-caller/role.ts","moduleParts":{"settings-form.umd.js":"d7163046-27"},"imported":[{"uid":"d7163046-18"}],"importedBy":[{"uid":"d7163046-38"}]},"d7163046-28":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/constant.js","moduleParts":{"settings-form.umd.js":"d7163046-29"},"imported":[],"importedBy":[{"uid":"d7163046-34"},{"uid":"d7163046-32"}]},"d7163046-30":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/locale/en.js","moduleParts":{"settings-form.umd.js":"d7163046-31"},"imported":[],"importedBy":[{"uid":"d7163046-34"}]},"d7163046-32":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/utils.js","moduleParts":{"settings-form.umd.js":"d7163046-33"},"imported":[{"uid":"d7163046-28"}],"importedBy":[{"uid":"d7163046-34"}]},"d7163046-34":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/index.js","moduleParts":{"settings-form.umd.js":"d7163046-35"},"imported":[{"uid":"d7163046-28"},{"uid":"d7163046-30"},{"uid":"d7163046-32"}],"importedBy":[{"uid":"d7163046-36"}]},"d7163046-36":{"id":"/src/api-caller/sql_snippet.ts","moduleParts":{"settings-form.umd.js":"d7163046-37"},"imported":[{"uid":"d7163046-34"},{"uid":"d7163046-18"}],"importedBy":[{"uid":"d7163046-38"}]},"d7163046-38":{"id":"/src/api-caller/index.ts","moduleParts":{"settings-form.umd.js":"d7163046-39"},"imported":[{"uid":"d7163046-20"},{"uid":"d7163046-22"},{"uid":"d7163046-24"},{"uid":"d7163046-26"},{"uid":"d7163046-36"}],"importedBy":[{"uid":"d7163046-68"},{"uid":"d7163046-78"},{"uid":"d7163046-72"},{"uid":"d7163046-84"},{"uid":"d7163046-90"},{"uid":"d7163046-86"},{"uid":"d7163046-98"},{"uid":"d7163046-102"},{"uid":"d7163046-100"},{"uid":"d7163046-106"},{"uid":"d7163046-108"},{"uid":"d7163046-112"},{"uid":"d7163046-110"},{"uid":"d7163046-76"},{"uid":"d7163046-80"},{"uid":"d7163046-88"},{"uid":"d7163046-92"}]},"d7163046-40":{"id":"/src/datasource/styles.ts","moduleParts":{"settings-form.umd.js":"d7163046-41"},"imported":[],"importedBy":[{"uid":"d7163046-68"},{"uid":"d7163046-78"},{"uid":"d7163046-72"},{"uid":"d7163046-42"},{"uid":"d7163046-60"},{"uid":"d7163046-66"},{"uid":"d7163046-76"},{"uid":"d7163046-74"}]},"d7163046-42":{"id":"/src/datasource/add-data-source/db-permission-tips.tsx","moduleParts":{"settings-form.umd.js":"d7163046-43"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-130"},{"uid":"d7163046-132"},{"uid":"d7163046-40"}],"importedBy":[{"uid":"d7163046-68"}]},"d7163046-44":{"id":"/src/components/minimal-mocaco-editor.tsx","moduleParts":{"settings-form.umd.js":"d7163046-45"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-140"},{"uid":"d7163046-131"}],"importedBy":[{"uid":"d7163046-106"},{"uid":"d7163046-108"},{"uid":"d7163046-134"}]},"d7163046-46":{"id":"/src/components/submit-form-button.tsx","moduleParts":{"settings-form.umd.js":"d7163046-47"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-130"},{"uid":"d7163046-132"}],"importedBy":[{"uid":"d7163046-134"}]},"d7163046-48":{"id":"/src/i18n/en.ts","moduleParts":{"settings-form.umd.js":"d7163046-49"},"imported":[],"importedBy":[{"uid":"d7163046-52"}]},"d7163046-50":{"id":"/src/i18n/zh.ts","moduleParts":{"settings-form.umd.js":"d7163046-51"},"imported":[],"importedBy":[{"uid":"d7163046-52"}]},"d7163046-52":{"id":"/src/i18n/i18n.ts","moduleParts":{"settings-form.umd.js":"d7163046-53"},"imported":[{"uid":"d7163046-146"},{"uid":"d7163046-132"},{"uid":"d7163046-147"},{"uid":"d7163046-148"},{"uid":"d7163046-48"},{"uid":"d7163046-50"}],"importedBy":[{"uid":"d7163046-54"}]},"d7163046-54":{"id":"/src/i18n/i18next-context.tsx","moduleParts":{"settings-form.umd.js":"d7163046-55"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-131"},{"uid":"d7163046-132"},{"uid":"d7163046-52"}],"importedBy":[{"uid":"d7163046-58"}]},"d7163046-56":{"id":"/src/utils/load-monaco-editor.ts","moduleParts":{"settings-form.umd.js":"d7163046-57"},"imported":[{"uid":"d7163046-140"},{"uid":"d7163046-131"}],"importedBy":[{"uid":"d7163046-58"}]},"d7163046-58":{"id":"/src/components/with-entry.tsx","moduleParts":{"settings-form.umd.js":"d7163046-59"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-131"},{"uid":"d7163046-18"},{"uid":"d7163046-54"},{"uid":"d7163046-56"},{"uid":"d7163046-128"}],"importedBy":[{"uid":"d7163046-134"}]},"d7163046-60":{"id":"/src/datasource/add-data-source/forms/database.tsx","moduleParts":{"settings-form.umd.js":"d7163046-61"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-131"},{"uid":"d7163046-136"},{"uid":"d7163046-134"},{"uid":"d7163046-40"},{"uid":"d7163046-132"}],"importedBy":[{"uid":"d7163046-68"}]},"d7163046-62":{"id":"/src/datasource/components/function-string-field/function-string-editor.tsx","moduleParts":{"settings-form.umd.js":"d7163046-63"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-140"}],"importedBy":[{"uid":"d7163046-64"}]},"d7163046-64":{"id":"/src/datasource/components/function-string-field/index.tsx","moduleParts":{"settings-form.umd.js":"d7163046-65"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-130"},{"uid":"d7163046-133"},{"uid":"d7163046-131"},{"uid":"d7163046-132"},{"uid":"d7163046-62"}],"importedBy":[{"uid":"d7163046-66"},{"uid":"d7163046-74"}]},"d7163046-66":{"id":"/src/datasource/add-data-source/forms/http.tsx","moduleParts":{"settings-form.umd.js":"d7163046-67"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-136"},{"uid":"d7163046-40"},{"uid":"d7163046-64"},{"uid":"d7163046-134"},{"uid":"d7163046-132"}],"importedBy":[{"uid":"d7163046-68"}]},"d7163046-68":{"id":"/src/datasource/add-data-source/index.tsx","moduleParts":{"settings-form.umd.js":"d7163046-69"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-129"},{"uid":"d7163046-130"},{"uid":"d7163046-131"},{"uid":"d7163046-132"},{"uid":"d7163046-38"},{"uid":"d7163046-40"},{"uid":"d7163046-42"},{"uid":"d7163046-60"},{"uid":"d7163046-66"}],"importedBy":[{"uid":"d7163046-118"},{"uid":"d7163046-78"}]},"d7163046-70":{"id":"/src/datasource/components/data-source-icon.tsx","moduleParts":{"settings-form.umd.js":"d7163046-71"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-130"},{"uid":"d7163046-128"}],"importedBy":[{"uid":"d7163046-78"}]},"d7163046-72":{"id":"/src/datasource/delete-data-source.tsx","moduleParts":{"settings-form.umd.js":"d7163046-73"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-135"},{"uid":"d7163046-129"},{"uid":"d7163046-130"},{"uid":"d7163046-132"},{"uid":"d7163046-38"},{"uid":"d7163046-40"}],"importedBy":[{"uid":"d7163046-118"},{"uid":"d7163046-78"}]},"d7163046-74":{"id":"/src/datasource/edit-data-source/forms/http.tsx","moduleParts":{"settings-form.umd.js":"d7163046-75"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-136"},{"uid":"d7163046-132"},{"uid":"d7163046-134"},{"uid":"d7163046-64"},{"uid":"d7163046-40"}],"importedBy":[{"uid":"d7163046-76"}]},"d7163046-76":{"id":"/src/datasource/edit-data-source/index.tsx","moduleParts":{"settings-form.umd.js":"d7163046-77"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-129"},{"uid":"d7163046-130"},{"uid":"d7163046-131"},{"uid":"d7163046-38"},{"uid":"d7163046-40"},{"uid":"d7163046-74"},{"uid":"d7163046-132"}],"importedBy":[{"uid":"d7163046-78"}]},"d7163046-78":{"id":"/src/datasource/data-source-list.tsx","moduleParts":{"settings-form.umd.js":"d7163046-79"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-133"},{"uid":"d7163046-132"},{"uid":"d7163046-38"},{"uid":"d7163046-134"},{"uid":"d7163046-68"},{"uid":"d7163046-70"},{"uid":"d7163046-72"},{"uid":"d7163046-76"},{"uid":"d7163046-40"}],"importedBy":[{"uid":"d7163046-118"}]},"d7163046-80":{"id":"/src/account/role-selector.tsx","moduleParts":{"settings-form.umd.js":"d7163046-81"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-133"},{"uid":"d7163046-131"},{"uid":"d7163046-132"},{"uid":"d7163046-38"}],"importedBy":[{"uid":"d7163046-84"},{"uid":"d7163046-98"},{"uid":"d7163046-88"}]},"d7163046-82":{"id":"/src/account/styles.ts","moduleParts":{"settings-form.umd.js":"d7163046-83"},"imported":[],"importedBy":[{"uid":"d7163046-84"},{"uid":"d7163046-90"},{"uid":"d7163046-86"},{"uid":"d7163046-94"},{"uid":"d7163046-88"},{"uid":"d7163046-92"}]},"d7163046-84":{"id":"/src/account/add-account.tsx","moduleParts":{"settings-form.umd.js":"d7163046-85"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-129"},{"uid":"d7163046-131"},{"uid":"d7163046-136"},{"uid":"d7163046-130"},{"uid":"d7163046-38"},{"uid":"d7163046-134"},{"uid":"d7163046-80"},{"uid":"d7163046-82"},{"uid":"d7163046-132"}],"importedBy":[{"uid":"d7163046-119"},{"uid":"d7163046-90"}]},"d7163046-86":{"id":"/src/account/delete-account.tsx","moduleParts":{"settings-form.umd.js":"d7163046-87"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-135"},{"uid":"d7163046-129"},{"uid":"d7163046-130"},{"uid":"d7163046-132"},{"uid":"d7163046-38"},{"uid":"d7163046-82"}],"importedBy":[{"uid":"d7163046-119"},{"uid":"d7163046-90"}]},"d7163046-88":{"id":"/src/account/edit-account.tsx","moduleParts":{"settings-form.umd.js":"d7163046-89"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-129"},{"uid":"d7163046-130"},{"uid":"d7163046-131"},{"uid":"d7163046-136"},{"uid":"d7163046-132"},{"uid":"d7163046-38"},{"uid":"d7163046-134"},{"uid":"d7163046-80"},{"uid":"d7163046-82"}],"importedBy":[{"uid":"d7163046-90"}]},"d7163046-90":{"id":"/src/account/account-list.tsx","moduleParts":{"settings-form.umd.js":"d7163046-91"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-133"},{"uid":"d7163046-132"},{"uid":"d7163046-38"},{"uid":"d7163046-134"},{"uid":"d7163046-84"},{"uid":"d7163046-86"},{"uid":"d7163046-88"},{"uid":"d7163046-82"}],"importedBy":[{"uid":"d7163046-119"}]},"d7163046-92":{"id":"/src/account/login/form.tsx","moduleParts":{"settings-form.umd.js":"d7163046-93"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-129"},{"uid":"d7163046-136"},{"uid":"d7163046-38"},{"uid":"d7163046-82"},{"uid":"d7163046-134"},{"uid":"d7163046-132"}],"importedBy":[{"uid":"d7163046-94"}]},"d7163046-94":{"id":"/src/account/login/index.tsx","moduleParts":{"settings-form.umd.js":"d7163046-95"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-134"},{"uid":"d7163046-82"},{"uid":"d7163046-92"}],"importedBy":[{"uid":"d7163046-119"}]},"d7163046-96":{"id":"/src/api-key/styles.ts","moduleParts":{"settings-form.umd.js":"d7163046-97"},"imported":[],"importedBy":[{"uid":"d7163046-98"},{"uid":"d7163046-102"},{"uid":"d7163046-100"}]},"d7163046-98":{"id":"/src/api-key/add-api-key.tsx","moduleParts":{"settings-form.umd.js":"d7163046-99"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-135"},{"uid":"d7163046-129"},{"uid":"d7163046-131"},{"uid":"d7163046-136"},{"uid":"d7163046-80"},{"uid":"d7163046-38"},{"uid":"d7163046-134"},{"uid":"d7163046-96"},{"uid":"d7163046-132"},{"uid":"d7163046-130"}],"importedBy":[{"uid":"d7163046-120"},{"uid":"d7163046-102"}]},"d7163046-100":{"id":"/src/api-key/delete-api-key.tsx","moduleParts":{"settings-form.umd.js":"d7163046-101"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-135"},{"uid":"d7163046-129"},{"uid":"d7163046-130"},{"uid":"d7163046-132"},{"uid":"d7163046-38"},{"uid":"d7163046-96"}],"importedBy":[{"uid":"d7163046-120"},{"uid":"d7163046-102"}]},"d7163046-102":{"id":"/src/api-key/api-key-list.tsx","moduleParts":{"settings-form.umd.js":"d7163046-103"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-133"},{"uid":"d7163046-132"},{"uid":"d7163046-38"},{"uid":"d7163046-134"},{"uid":"d7163046-98"},{"uid":"d7163046-100"},{"uid":"d7163046-96"}],"importedBy":[{"uid":"d7163046-120"}]},"d7163046-104":{"id":"/src/sql_snippet/styles.ts","moduleParts":{"settings-form.umd.js":"d7163046-105"},"imported":[],"importedBy":[{"uid":"d7163046-106"},{"uid":"d7163046-108"},{"uid":"d7163046-112"},{"uid":"d7163046-110"}]},"d7163046-106":{"id":"/src/sql_snippet/add-sql_snippet.tsx","moduleParts":{"settings-form.umd.js":"d7163046-107"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-129"},{"uid":"d7163046-130"},{"uid":"d7163046-131"},{"uid":"d7163046-136"},{"uid":"d7163046-132"},{"uid":"d7163046-38"},{"uid":"d7163046-134"},{"uid":"d7163046-44"},{"uid":"d7163046-104"}],"importedBy":[{"uid":"d7163046-121"},{"uid":"d7163046-112"}]},"d7163046-108":{"id":"/src/sql_snippet/update-sql_snippet.tsx","moduleParts":{"settings-form.umd.js":"d7163046-109"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-129"},{"uid":"d7163046-130"},{"uid":"d7163046-131"},{"uid":"d7163046-136"},{"uid":"d7163046-38"},{"uid":"d7163046-44"},{"uid":"d7163046-104"},{"uid":"d7163046-134"},{"uid":"d7163046-132"}],"importedBy":[{"uid":"d7163046-121"},{"uid":"d7163046-112"}]},"d7163046-110":{"id":"/src/sql_snippet/delete-sql_snippet.tsx","moduleParts":{"settings-form.umd.js":"d7163046-111"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-135"},{"uid":"d7163046-129"},{"uid":"d7163046-130"},{"uid":"d7163046-132"},{"uid":"d7163046-38"},{"uid":"d7163046-104"}],"importedBy":[{"uid":"d7163046-121"},{"uid":"d7163046-112"}]},"d7163046-112":{"id":"/src/sql_snippet/sql_snippet-list.tsx","moduleParts":{"settings-form.umd.js":"d7163046-113"},"imported":[{"uid":"d7163046-10"},{"uid":"d7163046-128"},{"uid":"d7163046-137"},{"uid":"d7163046-133"},{"uid":"d7163046-38"},{"uid":"d7163046-106"},{"uid":"d7163046-110"},{"uid":"d7163046-104"},{"uid":"d7163046-130"},{"uid":"d7163046-132"},{"uid":"d7163046-134"},{"uid":"d7163046-108"}],"importedBy":[{"uid":"d7163046-121"}]},"d7163046-114":{"id":"/src/index.ts","moduleParts":{"settings-form.umd.js":"d7163046-115"},"imported":[{"uid":"d7163046-118"},{"uid":"d7163046-119"},{"uid":"d7163046-120"},{"uid":"d7163046-121"},{"uid":"d7163046-18"},{"uid":"d7163046-122"},{"uid":"d7163046-123"},{"uid":"d7163046-124"},{"uid":"d7163046-125"},{"uid":"d7163046-126"},{"uid":"d7163046-116","dynamic":true}],"importedBy":[],"isEntry":true},"d7163046-116":{"id":"/package.json","moduleParts":{"settings-form.umd.js":"d7163046-117"},"imported":[],"importedBy":[{"uid":"d7163046-114"}]},"d7163046-118":{"id":"/src/datasource/index.tsx","moduleParts":{},"imported":[{"uid":"d7163046-68"},{"uid":"d7163046-78"},{"uid":"d7163046-72"}],"importedBy":[{"uid":"d7163046-114"}]},"d7163046-119":{"id":"/src/account/index.tsx","moduleParts":{},"imported":[{"uid":"d7163046-84"},{"uid":"d7163046-90"},{"uid":"d7163046-86"},{"uid":"d7163046-94"}],"importedBy":[{"uid":"d7163046-114"}]},"d7163046-120":{"id":"/src/api-key/index.tsx","moduleParts":{},"imported":[{"uid":"d7163046-98"},{"uid":"d7163046-102"},{"uid":"d7163046-100"}],"importedBy":[{"uid":"d7163046-114"}]},"d7163046-121":{"id":"/src/sql_snippet/index.tsx","moduleParts":{},"imported":[{"uid":"d7163046-106"},{"uid":"d7163046-108"},{"uid":"d7163046-112"},{"uid":"d7163046-110"}],"importedBy":[{"uid":"d7163046-114"}]},"d7163046-122":{"id":"/src/api-caller/account.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-114"}]},"d7163046-123":{"id":"/src/api-caller/api-key.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-114"}]},"d7163046-124":{"id":"/src/api-caller/datasource.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-114"}]},"d7163046-125":{"id":"/src/api-caller/role.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-114"}]},"d7163046-126":{"id":"/src/api-caller/sql_snippet.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-114"}]},"d7163046-127":{"id":"/Users/leto/github/merico-dev/table/shared/src/index.ts","moduleParts":{},"imported":[{"uid":"d7163046-138"}],"importedBy":[{"uid":"d7163046-18"}]},"d7163046-128":{"id":"@mantine/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-68"},{"uid":"d7163046-78"},{"uid":"d7163046-72"},{"uid":"d7163046-84"},{"uid":"d7163046-90"},{"uid":"d7163046-86"},{"uid":"d7163046-94"},{"uid":"d7163046-98"},{"uid":"d7163046-102"},{"uid":"d7163046-100"},{"uid":"d7163046-106"},{"uid":"d7163046-108"},{"uid":"d7163046-112"},{"uid":"d7163046-110"},{"uid":"d7163046-42"},{"uid":"d7163046-60"},{"uid":"d7163046-66"},{"uid":"d7163046-70"},{"uid":"d7163046-76"},{"uid":"d7163046-80"},{"uid":"d7163046-88"},{"uid":"d7163046-92"},{"uid":"d7163046-64"},{"uid":"d7163046-46"},{"uid":"d7163046-58"},{"uid":"d7163046-74"},{"uid":"d7163046-62"}],"isExternal":true},"d7163046-129":{"id":"@mantine/notifications","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-68"},{"uid":"d7163046-72"},{"uid":"d7163046-84"},{"uid":"d7163046-86"},{"uid":"d7163046-98"},{"uid":"d7163046-100"},{"uid":"d7163046-106"},{"uid":"d7163046-108"},{"uid":"d7163046-110"},{"uid":"d7163046-76"},{"uid":"d7163046-88"},{"uid":"d7163046-92"}],"isExternal":true},"d7163046-130":{"id":"@tabler/icons-react","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-68"},{"uid":"d7163046-72"},{"uid":"d7163046-84"},{"uid":"d7163046-86"},{"uid":"d7163046-98"},{"uid":"d7163046-100"},{"uid":"d7163046-106"},{"uid":"d7163046-108"},{"uid":"d7163046-112"},{"uid":"d7163046-110"},{"uid":"d7163046-42"},{"uid":"d7163046-70"},{"uid":"d7163046-76"},{"uid":"d7163046-88"},{"uid":"d7163046-64"},{"uid":"d7163046-46"}],"isExternal":true},"d7163046-131":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-68"},{"uid":"d7163046-84"},{"uid":"d7163046-98"},{"uid":"d7163046-106"},{"uid":"d7163046-108"},{"uid":"d7163046-60"},{"uid":"d7163046-76"},{"uid":"d7163046-80"},{"uid":"d7163046-88"},{"uid":"d7163046-44"},{"uid":"d7163046-64"},{"uid":"d7163046-58"},{"uid":"d7163046-142"},{"uid":"d7163046-54"},{"uid":"d7163046-56"}],"isExternal":true},"d7163046-132":{"id":"react-i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-68"},{"uid":"d7163046-78"},{"uid":"d7163046-72"},{"uid":"d7163046-84"},{"uid":"d7163046-90"},{"uid":"d7163046-86"},{"uid":"d7163046-98"},{"uid":"d7163046-102"},{"uid":"d7163046-100"},{"uid":"d7163046-106"},{"uid":"d7163046-108"},{"uid":"d7163046-112"},{"uid":"d7163046-110"},{"uid":"d7163046-42"},{"uid":"d7163046-60"},{"uid":"d7163046-66"},{"uid":"d7163046-76"},{"uid":"d7163046-80"},{"uid":"d7163046-88"},{"uid":"d7163046-92"},{"uid":"d7163046-64"},{"uid":"d7163046-46"},{"uid":"d7163046-74"},{"uid":"d7163046-54"},{"uid":"d7163046-52"}],"isExternal":true},"d7163046-133":{"id":"ahooks","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-78"},{"uid":"d7163046-90"},{"uid":"d7163046-102"},{"uid":"d7163046-112"},{"uid":"d7163046-80"},{"uid":"d7163046-64"}],"isExternal":true},"d7163046-134":{"id":"/src/components/index.ts","moduleParts":{},"imported":[{"uid":"d7163046-44"},{"uid":"d7163046-46"},{"uid":"d7163046-58"}],"importedBy":[{"uid":"d7163046-78"},{"uid":"d7163046-84"},{"uid":"d7163046-90"},{"uid":"d7163046-94"},{"uid":"d7163046-98"},{"uid":"d7163046-102"},{"uid":"d7163046-106"},{"uid":"d7163046-108"},{"uid":"d7163046-112"},{"uid":"d7163046-60"},{"uid":"d7163046-66"},{"uid":"d7163046-88"},{"uid":"d7163046-92"},{"uid":"d7163046-74"}]},"d7163046-135":{"id":"@mantine/modals","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-72"},{"uid":"d7163046-86"},{"uid":"d7163046-98"},{"uid":"d7163046-100"},{"uid":"d7163046-110"}],"isExternal":true},"d7163046-136":{"id":"react-hook-form","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-84"},{"uid":"d7163046-98"},{"uid":"d7163046-106"},{"uid":"d7163046-108"},{"uid":"d7163046-60"},{"uid":"d7163046-66"},{"uid":"d7163046-88"},{"uid":"d7163046-92"},{"uid":"d7163046-74"}],"isExternal":true},"d7163046-137":{"id":"@mantine/code-highlight","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-112"}],"isExternal":true},"d7163046-138":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/index.ts","moduleParts":{},"imported":[{"uid":"d7163046-141"},{"uid":"d7163046-12"},{"uid":"d7163046-14"},{"uid":"d7163046-16"}],"importedBy":[{"uid":"d7163046-127"}]},"d7163046-139":{"id":"\u0000commonjsHelpers.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-10"},{"uid":"d7163046-4"},{"uid":"d7163046-8"}]},"d7163046-140":{"id":"@monaco-editor/react","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-44"},{"uid":"d7163046-62"},{"uid":"d7163046-56"}],"isExternal":true},"d7163046-141":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/types.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-138"}]},"d7163046-142":{"id":"\u0000react?commonjs-external","moduleParts":{},"imported":[{"uid":"d7163046-131"}],"importedBy":[{"uid":"d7163046-4"},{"uid":"d7163046-8"}]},"d7163046-143":{"id":"crypto-js","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-12"}],"isExternal":true},"d7163046-144":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-14"}],"isExternal":true},"d7163046-145":{"id":"axios","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-14"}],"isExternal":true},"d7163046-146":{"id":"i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-52"}],"isExternal":true},"d7163046-147":{"id":"i18next-browser-languagedetector","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-52"}],"isExternal":true},"d7163046-148":{"id":"intl-pluralrules","moduleParts":{},"imported":[],"importedBy":[{"uid":"d7163046-52"}],"isExternal":true}},"env":{"rollup":"3.29.4"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
|
4825
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"settings-form.umd.js","children":[{"name":"\u0000/Users/leto/github/merico-dev/table/node_modules/react","children":[{"uid":"60ae233c-1","name":"jsx-runtime.js?commonjs-module"},{"name":"cjs","children":[{"uid":"60ae233c-3","name":"react-jsx-runtime.production.min.js?commonjs-exports"},{"uid":"60ae233c-7","name":"react-jsx-runtime.development.js?commonjs-exports"}]}]},{"name":"Users/leto/github/merico-dev/table","children":[{"name":"node_modules","children":[{"name":"react","children":[{"name":"cjs","children":[{"uid":"60ae233c-5","name":"react-jsx-runtime.production.min.js"},{"uid":"60ae233c-9","name":"react-jsx-runtime.development.js"}]},{"uid":"60ae233c-11","name":"jsx-runtime.js"}]},{"name":"dayjs/esm","children":[{"uid":"60ae233c-29","name":"constant.js"},{"name":"locale/en.js","uid":"60ae233c-31"},{"uid":"60ae233c-33","name":"utils.js"},{"uid":"60ae233c-35","name":"index.js"}]}]},{"name":"shared/src/api-client","children":[{"uid":"60ae233c-13","name":"utils.ts"},{"uid":"60ae233c-15","name":"default-api-client.ts"},{"uid":"60ae233c-17","name":"facade-api-client.ts"}]}]},{"name":"src","children":[{"name":"api-caller","children":[{"uid":"60ae233c-19","name":"request.ts"},{"uid":"60ae233c-21","name":"account.ts"},{"uid":"60ae233c-23","name":"api-key.ts"},{"uid":"60ae233c-25","name":"datasource.ts"},{"uid":"60ae233c-27","name":"role.ts"},{"uid":"60ae233c-37","name":"sql_snippet.ts"},{"uid":"60ae233c-39","name":"index.ts"}]},{"name":"datasource","children":[{"uid":"60ae233c-41","name":"styles.ts"},{"name":"add-data-source","children":[{"uid":"60ae233c-43","name":"db-permission-tips.tsx"},{"name":"forms","children":[{"uid":"60ae233c-61","name":"database.tsx"},{"uid":"60ae233c-67","name":"http.tsx"}]},{"uid":"60ae233c-69","name":"index.tsx"}]},{"name":"components","children":[{"name":"function-string-field","children":[{"uid":"60ae233c-63","name":"function-string-editor.tsx"},{"uid":"60ae233c-65","name":"index.tsx"}]},{"uid":"60ae233c-71","name":"data-source-icon.tsx"}]},{"uid":"60ae233c-73","name":"delete-data-source.tsx"},{"name":"edit-data-source","children":[{"name":"forms/http.tsx","uid":"60ae233c-75"},{"uid":"60ae233c-77","name":"index.tsx"}]},{"uid":"60ae233c-79","name":"data-source-list.tsx"}]},{"name":"components","children":[{"uid":"60ae233c-45","name":"minimal-mocaco-editor.tsx"},{"uid":"60ae233c-47","name":"submit-form-button.tsx"},{"uid":"60ae233c-59","name":"with-entry.tsx"}]},{"name":"i18n","children":[{"uid":"60ae233c-49","name":"en.ts"},{"uid":"60ae233c-51","name":"zh.ts"},{"uid":"60ae233c-53","name":"i18n.ts"},{"uid":"60ae233c-55","name":"i18next-context.tsx"}]},{"name":"utils/load-monaco-editor.ts","uid":"60ae233c-57"},{"name":"account","children":[{"uid":"60ae233c-81","name":"role-selector.tsx"},{"uid":"60ae233c-83","name":"styles.ts"},{"uid":"60ae233c-85","name":"add-account.tsx"},{"uid":"60ae233c-87","name":"delete-account.tsx"},{"uid":"60ae233c-89","name":"edit-account.tsx"},{"uid":"60ae233c-91","name":"account-list.tsx"},{"name":"login","children":[{"uid":"60ae233c-93","name":"form.tsx"},{"uid":"60ae233c-95","name":"index.tsx"}]}]},{"name":"api-key","children":[{"uid":"60ae233c-97","name":"styles.ts"},{"uid":"60ae233c-99","name":"add-api-key.tsx"},{"uid":"60ae233c-101","name":"delete-api-key.tsx"},{"uid":"60ae233c-103","name":"api-key-list.tsx"}]},{"name":"sql_snippet","children":[{"uid":"60ae233c-105","name":"styles.ts"},{"uid":"60ae233c-107","name":"add-sql_snippet.tsx"},{"uid":"60ae233c-109","name":"update-sql_snippet.tsx"},{"uid":"60ae233c-111","name":"delete-sql_snippet.tsx"},{"uid":"60ae233c-113","name":"sql_snippet-list.tsx"}]},{"uid":"60ae233c-115","name":"index.ts"}]},{"uid":"60ae233c-117","name":"package.json"}]}],"isRoot":true},"nodeParts":{"60ae233c-1":{"renderedLength":33,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-0"},"60ae233c-3":{"renderedLength":42,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-2"},"60ae233c-5":{"renderedLength":1217,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-4"},"60ae233c-7":{"renderedLength":39,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-6"},"60ae233c-9":{"renderedLength":46244,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-8"},"60ae233c-11":{"renderedLength":237,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-10"},"60ae233c-13":{"renderedLength":949,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-12"},"60ae233c-15":{"renderedLength":2262,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-14"},"60ae233c-17":{"renderedLength":422,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-16"},"60ae233c-19":{"renderedLength":426,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-18"},"60ae233c-21":{"renderedLength":1913,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-20"},"60ae233c-23":{"renderedLength":641,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-22"},"60ae233c-25":{"renderedLength":730,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-24"},"60ae233c-27":{"renderedLength":132,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-26"},"60ae233c-29":{"renderedLength":1011,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-28"},"60ae233c-31":{"renderedLength":496,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-30"},"60ae233c-33":{"renderedLength":1623,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-32"},"60ae233c-35":{"renderedLength":14006,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-34"},"60ae233c-37":{"renderedLength":1079,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-36"},"60ae233c-39":{"renderedLength":94,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-38"},"60ae233c-41":{"renderedLength":104,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-40"},"60ae233c-43":{"renderedLength":570,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-42"},"60ae233c-45":{"renderedLength":675,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-44"},"60ae233c-47":{"renderedLength":370,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-46"},"60ae233c-49":{"renderedLength":4266,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-48"},"60ae233c-51":{"renderedLength":4276,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-50"},"60ae233c-53":{"renderedLength":253,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-52"},"60ae233c-55":{"renderedLength":246,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-54"},"60ae233c-57":{"renderedLength":551,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-56"},"60ae233c-59":{"renderedLength":625,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-58"},"60ae233c-61":{"renderedLength":3109,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-60"},"60ae233c-63":{"renderedLength":502,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-62"},"60ae233c-65":{"renderedLength":2398,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-64"},"60ae233c-67":{"renderedLength":2894,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-66"},"60ae233c-69":{"renderedLength":3130,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-68"},"60ae233c-71":{"renderedLength":958,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-70"},"60ae233c-73":{"renderedLength":2217,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-72"},"60ae233c-75":{"renderedLength":2514,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-74"},"60ae233c-77":{"renderedLength":3551,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-76"},"60ae233c-79":{"renderedLength":2739,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-78"},"60ae233c-81":{"renderedLength":1553,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-80"},"60ae233c-83":{"renderedLength":104,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-82"},"60ae233c-85":{"renderedLength":3856,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-84"},"60ae233c-87":{"renderedLength":1830,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-86"},"60ae233c-89":{"renderedLength":4968,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-88"},"60ae233c-91":{"renderedLength":3158,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-90"},"60ae233c-93":{"renderedLength":2262,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-92"},"60ae233c-95":{"renderedLength":397,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-94"},"60ae233c-97":{"renderedLength":104,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-96"},"60ae233c-99":{"renderedLength":4259,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-98"},"60ae233c-101":{"renderedLength":1851,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-100"},"60ae233c-103":{"renderedLength":3016,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-102"},"60ae233c-105":{"renderedLength":102,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-104"},"60ae233c-107":{"renderedLength":3370,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-106"},"60ae233c-109":{"renderedLength":3409,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-108"},"60ae233c-111":{"renderedLength":1808,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-110"},"60ae233c-113":{"renderedLength":3839,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-112"},"60ae233c-115":{"renderedLength":187,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-114"},"60ae233c-117":{"renderedLength":28,"gzipLength":0,"brotliLength":0,"metaUid":"60ae233c-116"}},"nodeMetas":{"60ae233c-0":{"id":"\u0000/Users/leto/github/merico-dev/table/node_modules/react/jsx-runtime.js?commonjs-module","moduleParts":{"settings-form.umd.js":"60ae233c-1"},"imported":[],"importedBy":[{"uid":"60ae233c-10"}]},"60ae233c-2":{"id":"\u0000/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.production.min.js?commonjs-exports","moduleParts":{"settings-form.umd.js":"60ae233c-3"},"imported":[],"importedBy":[{"uid":"60ae233c-4"}]},"60ae233c-4":{"id":"/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.production.min.js","moduleParts":{"settings-form.umd.js":"60ae233c-5"},"imported":[{"uid":"60ae233c-139"},{"uid":"60ae233c-2"},{"uid":"60ae233c-142"}],"importedBy":[{"uid":"60ae233c-10"}]},"60ae233c-6":{"id":"\u0000/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.development.js?commonjs-exports","moduleParts":{"settings-form.umd.js":"60ae233c-7"},"imported":[],"importedBy":[{"uid":"60ae233c-8"}]},"60ae233c-8":{"id":"/Users/leto/github/merico-dev/table/node_modules/react/cjs/react-jsx-runtime.development.js","moduleParts":{"settings-form.umd.js":"60ae233c-9"},"imported":[{"uid":"60ae233c-139"},{"uid":"60ae233c-6"},{"uid":"60ae233c-142"}],"importedBy":[{"uid":"60ae233c-10"}]},"60ae233c-10":{"id":"/Users/leto/github/merico-dev/table/node_modules/react/jsx-runtime.js","moduleParts":{"settings-form.umd.js":"60ae233c-11"},"imported":[{"uid":"60ae233c-139"},{"uid":"60ae233c-0"},{"uid":"60ae233c-4"},{"uid":"60ae233c-8"}],"importedBy":[{"uid":"60ae233c-68"},{"uid":"60ae233c-78"},{"uid":"60ae233c-72"},{"uid":"60ae233c-84"},{"uid":"60ae233c-90"},{"uid":"60ae233c-86"},{"uid":"60ae233c-94"},{"uid":"60ae233c-98"},{"uid":"60ae233c-102"},{"uid":"60ae233c-100"},{"uid":"60ae233c-106"},{"uid":"60ae233c-108"},{"uid":"60ae233c-112"},{"uid":"60ae233c-110"},{"uid":"60ae233c-42"},{"uid":"60ae233c-60"},{"uid":"60ae233c-66"},{"uid":"60ae233c-70"},{"uid":"60ae233c-76"},{"uid":"60ae233c-80"},{"uid":"60ae233c-88"},{"uid":"60ae233c-92"},{"uid":"60ae233c-44"},{"uid":"60ae233c-64"},{"uid":"60ae233c-46"},{"uid":"60ae233c-58"},{"uid":"60ae233c-74"},{"uid":"60ae233c-62"},{"uid":"60ae233c-54"}]},"60ae233c-12":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/utils.ts","moduleParts":{"settings-form.umd.js":"60ae233c-13"},"imported":[{"uid":"60ae233c-143"}],"importedBy":[{"uid":"60ae233c-138"},{"uid":"60ae233c-14"}]},"60ae233c-14":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/default-api-client.ts","moduleParts":{"settings-form.umd.js":"60ae233c-15"},"imported":[{"uid":"60ae233c-144"},{"uid":"60ae233c-12"},{"uid":"60ae233c-145"}],"importedBy":[{"uid":"60ae233c-138"}]},"60ae233c-16":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/facade-api-client.ts","moduleParts":{"settings-form.umd.js":"60ae233c-17"},"imported":[],"importedBy":[{"uid":"60ae233c-138"}]},"60ae233c-18":{"id":"/src/api-caller/request.ts","moduleParts":{"settings-form.umd.js":"60ae233c-19"},"imported":[{"uid":"60ae233c-127"}],"importedBy":[{"uid":"60ae233c-114"},{"uid":"60ae233c-20"},{"uid":"60ae233c-22"},{"uid":"60ae233c-24"},{"uid":"60ae233c-26"},{"uid":"60ae233c-36"},{"uid":"60ae233c-58"}]},"60ae233c-20":{"id":"/src/api-caller/account.ts","moduleParts":{"settings-form.umd.js":"60ae233c-21"},"imported":[{"uid":"60ae233c-18"}],"importedBy":[{"uid":"60ae233c-38"}]},"60ae233c-22":{"id":"/src/api-caller/api-key.ts","moduleParts":{"settings-form.umd.js":"60ae233c-23"},"imported":[{"uid":"60ae233c-18"}],"importedBy":[{"uid":"60ae233c-38"}]},"60ae233c-24":{"id":"/src/api-caller/datasource.ts","moduleParts":{"settings-form.umd.js":"60ae233c-25"},"imported":[{"uid":"60ae233c-18"}],"importedBy":[{"uid":"60ae233c-38"}]},"60ae233c-26":{"id":"/src/api-caller/role.ts","moduleParts":{"settings-form.umd.js":"60ae233c-27"},"imported":[{"uid":"60ae233c-18"}],"importedBy":[{"uid":"60ae233c-38"}]},"60ae233c-28":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/constant.js","moduleParts":{"settings-form.umd.js":"60ae233c-29"},"imported":[],"importedBy":[{"uid":"60ae233c-34"},{"uid":"60ae233c-32"}]},"60ae233c-30":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/locale/en.js","moduleParts":{"settings-form.umd.js":"60ae233c-31"},"imported":[],"importedBy":[{"uid":"60ae233c-34"}]},"60ae233c-32":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/utils.js","moduleParts":{"settings-form.umd.js":"60ae233c-33"},"imported":[{"uid":"60ae233c-28"}],"importedBy":[{"uid":"60ae233c-34"}]},"60ae233c-34":{"id":"/Users/leto/github/merico-dev/table/node_modules/dayjs/esm/index.js","moduleParts":{"settings-form.umd.js":"60ae233c-35"},"imported":[{"uid":"60ae233c-28"},{"uid":"60ae233c-30"},{"uid":"60ae233c-32"}],"importedBy":[{"uid":"60ae233c-36"}]},"60ae233c-36":{"id":"/src/api-caller/sql_snippet.ts","moduleParts":{"settings-form.umd.js":"60ae233c-37"},"imported":[{"uid":"60ae233c-34"},{"uid":"60ae233c-18"}],"importedBy":[{"uid":"60ae233c-38"}]},"60ae233c-38":{"id":"/src/api-caller/index.ts","moduleParts":{"settings-form.umd.js":"60ae233c-39"},"imported":[{"uid":"60ae233c-20"},{"uid":"60ae233c-22"},{"uid":"60ae233c-24"},{"uid":"60ae233c-26"},{"uid":"60ae233c-36"}],"importedBy":[{"uid":"60ae233c-68"},{"uid":"60ae233c-78"},{"uid":"60ae233c-72"},{"uid":"60ae233c-84"},{"uid":"60ae233c-90"},{"uid":"60ae233c-86"},{"uid":"60ae233c-98"},{"uid":"60ae233c-102"},{"uid":"60ae233c-100"},{"uid":"60ae233c-106"},{"uid":"60ae233c-108"},{"uid":"60ae233c-112"},{"uid":"60ae233c-110"},{"uid":"60ae233c-76"},{"uid":"60ae233c-80"},{"uid":"60ae233c-88"},{"uid":"60ae233c-92"}]},"60ae233c-40":{"id":"/src/datasource/styles.ts","moduleParts":{"settings-form.umd.js":"60ae233c-41"},"imported":[],"importedBy":[{"uid":"60ae233c-68"},{"uid":"60ae233c-78"},{"uid":"60ae233c-72"},{"uid":"60ae233c-42"},{"uid":"60ae233c-60"},{"uid":"60ae233c-66"},{"uid":"60ae233c-76"},{"uid":"60ae233c-74"}]},"60ae233c-42":{"id":"/src/datasource/add-data-source/db-permission-tips.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-43"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-130"},{"uid":"60ae233c-132"},{"uid":"60ae233c-40"}],"importedBy":[{"uid":"60ae233c-68"}]},"60ae233c-44":{"id":"/src/components/minimal-mocaco-editor.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-45"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-140"},{"uid":"60ae233c-131"}],"importedBy":[{"uid":"60ae233c-106"},{"uid":"60ae233c-108"},{"uid":"60ae233c-134"}]},"60ae233c-46":{"id":"/src/components/submit-form-button.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-47"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-130"},{"uid":"60ae233c-132"}],"importedBy":[{"uid":"60ae233c-134"}]},"60ae233c-48":{"id":"/src/i18n/en.ts","moduleParts":{"settings-form.umd.js":"60ae233c-49"},"imported":[],"importedBy":[{"uid":"60ae233c-52"}]},"60ae233c-50":{"id":"/src/i18n/zh.ts","moduleParts":{"settings-form.umd.js":"60ae233c-51"},"imported":[],"importedBy":[{"uid":"60ae233c-52"}]},"60ae233c-52":{"id":"/src/i18n/i18n.ts","moduleParts":{"settings-form.umd.js":"60ae233c-53"},"imported":[{"uid":"60ae233c-146"},{"uid":"60ae233c-132"},{"uid":"60ae233c-147"},{"uid":"60ae233c-148"},{"uid":"60ae233c-48"},{"uid":"60ae233c-50"}],"importedBy":[{"uid":"60ae233c-54"}]},"60ae233c-54":{"id":"/src/i18n/i18next-context.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-55"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-131"},{"uid":"60ae233c-132"},{"uid":"60ae233c-52"}],"importedBy":[{"uid":"60ae233c-58"}]},"60ae233c-56":{"id":"/src/utils/load-monaco-editor.ts","moduleParts":{"settings-form.umd.js":"60ae233c-57"},"imported":[{"uid":"60ae233c-140"},{"uid":"60ae233c-131"}],"importedBy":[{"uid":"60ae233c-58"}]},"60ae233c-58":{"id":"/src/components/with-entry.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-59"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-131"},{"uid":"60ae233c-18"},{"uid":"60ae233c-54"},{"uid":"60ae233c-56"},{"uid":"60ae233c-128"}],"importedBy":[{"uid":"60ae233c-134"}]},"60ae233c-60":{"id":"/src/datasource/add-data-source/forms/database.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-61"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-131"},{"uid":"60ae233c-136"},{"uid":"60ae233c-134"},{"uid":"60ae233c-40"},{"uid":"60ae233c-132"}],"importedBy":[{"uid":"60ae233c-68"}]},"60ae233c-62":{"id":"/src/datasource/components/function-string-field/function-string-editor.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-63"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-140"}],"importedBy":[{"uid":"60ae233c-64"}]},"60ae233c-64":{"id":"/src/datasource/components/function-string-field/index.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-65"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-130"},{"uid":"60ae233c-133"},{"uid":"60ae233c-131"},{"uid":"60ae233c-132"},{"uid":"60ae233c-62"}],"importedBy":[{"uid":"60ae233c-66"},{"uid":"60ae233c-74"}]},"60ae233c-66":{"id":"/src/datasource/add-data-source/forms/http.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-67"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-136"},{"uid":"60ae233c-40"},{"uid":"60ae233c-64"},{"uid":"60ae233c-134"},{"uid":"60ae233c-132"}],"importedBy":[{"uid":"60ae233c-68"}]},"60ae233c-68":{"id":"/src/datasource/add-data-source/index.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-69"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-129"},{"uid":"60ae233c-130"},{"uid":"60ae233c-131"},{"uid":"60ae233c-132"},{"uid":"60ae233c-38"},{"uid":"60ae233c-40"},{"uid":"60ae233c-42"},{"uid":"60ae233c-60"},{"uid":"60ae233c-66"}],"importedBy":[{"uid":"60ae233c-118"},{"uid":"60ae233c-78"}]},"60ae233c-70":{"id":"/src/datasource/components/data-source-icon.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-71"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-130"},{"uid":"60ae233c-128"}],"importedBy":[{"uid":"60ae233c-78"}]},"60ae233c-72":{"id":"/src/datasource/delete-data-source.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-73"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-135"},{"uid":"60ae233c-129"},{"uid":"60ae233c-130"},{"uid":"60ae233c-132"},{"uid":"60ae233c-38"},{"uid":"60ae233c-40"}],"importedBy":[{"uid":"60ae233c-118"},{"uid":"60ae233c-78"}]},"60ae233c-74":{"id":"/src/datasource/edit-data-source/forms/http.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-75"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-136"},{"uid":"60ae233c-132"},{"uid":"60ae233c-134"},{"uid":"60ae233c-64"},{"uid":"60ae233c-40"}],"importedBy":[{"uid":"60ae233c-76"}]},"60ae233c-76":{"id":"/src/datasource/edit-data-source/index.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-77"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-129"},{"uid":"60ae233c-130"},{"uid":"60ae233c-131"},{"uid":"60ae233c-38"},{"uid":"60ae233c-40"},{"uid":"60ae233c-74"},{"uid":"60ae233c-132"}],"importedBy":[{"uid":"60ae233c-78"}]},"60ae233c-78":{"id":"/src/datasource/data-source-list.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-79"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-133"},{"uid":"60ae233c-132"},{"uid":"60ae233c-38"},{"uid":"60ae233c-134"},{"uid":"60ae233c-68"},{"uid":"60ae233c-70"},{"uid":"60ae233c-72"},{"uid":"60ae233c-76"},{"uid":"60ae233c-40"}],"importedBy":[{"uid":"60ae233c-118"}]},"60ae233c-80":{"id":"/src/account/role-selector.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-81"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-133"},{"uid":"60ae233c-131"},{"uid":"60ae233c-132"},{"uid":"60ae233c-38"}],"importedBy":[{"uid":"60ae233c-84"},{"uid":"60ae233c-98"},{"uid":"60ae233c-88"}]},"60ae233c-82":{"id":"/src/account/styles.ts","moduleParts":{"settings-form.umd.js":"60ae233c-83"},"imported":[],"importedBy":[{"uid":"60ae233c-84"},{"uid":"60ae233c-90"},{"uid":"60ae233c-86"},{"uid":"60ae233c-94"},{"uid":"60ae233c-88"},{"uid":"60ae233c-92"}]},"60ae233c-84":{"id":"/src/account/add-account.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-85"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-129"},{"uid":"60ae233c-131"},{"uid":"60ae233c-136"},{"uid":"60ae233c-130"},{"uid":"60ae233c-38"},{"uid":"60ae233c-134"},{"uid":"60ae233c-80"},{"uid":"60ae233c-82"},{"uid":"60ae233c-132"}],"importedBy":[{"uid":"60ae233c-119"},{"uid":"60ae233c-90"}]},"60ae233c-86":{"id":"/src/account/delete-account.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-87"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-135"},{"uid":"60ae233c-129"},{"uid":"60ae233c-130"},{"uid":"60ae233c-132"},{"uid":"60ae233c-38"},{"uid":"60ae233c-82"}],"importedBy":[{"uid":"60ae233c-119"},{"uid":"60ae233c-90"}]},"60ae233c-88":{"id":"/src/account/edit-account.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-89"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-129"},{"uid":"60ae233c-130"},{"uid":"60ae233c-131"},{"uid":"60ae233c-136"},{"uid":"60ae233c-132"},{"uid":"60ae233c-38"},{"uid":"60ae233c-134"},{"uid":"60ae233c-80"},{"uid":"60ae233c-82"}],"importedBy":[{"uid":"60ae233c-90"}]},"60ae233c-90":{"id":"/src/account/account-list.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-91"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-133"},{"uid":"60ae233c-132"},{"uid":"60ae233c-38"},{"uid":"60ae233c-134"},{"uid":"60ae233c-84"},{"uid":"60ae233c-86"},{"uid":"60ae233c-88"},{"uid":"60ae233c-82"}],"importedBy":[{"uid":"60ae233c-119"}]},"60ae233c-92":{"id":"/src/account/login/form.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-93"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-129"},{"uid":"60ae233c-136"},{"uid":"60ae233c-38"},{"uid":"60ae233c-82"},{"uid":"60ae233c-134"},{"uid":"60ae233c-132"}],"importedBy":[{"uid":"60ae233c-94"}]},"60ae233c-94":{"id":"/src/account/login/index.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-95"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-134"},{"uid":"60ae233c-82"},{"uid":"60ae233c-92"}],"importedBy":[{"uid":"60ae233c-119"}]},"60ae233c-96":{"id":"/src/api-key/styles.ts","moduleParts":{"settings-form.umd.js":"60ae233c-97"},"imported":[],"importedBy":[{"uid":"60ae233c-98"},{"uid":"60ae233c-102"},{"uid":"60ae233c-100"}]},"60ae233c-98":{"id":"/src/api-key/add-api-key.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-99"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-135"},{"uid":"60ae233c-129"},{"uid":"60ae233c-131"},{"uid":"60ae233c-136"},{"uid":"60ae233c-80"},{"uid":"60ae233c-38"},{"uid":"60ae233c-134"},{"uid":"60ae233c-96"},{"uid":"60ae233c-132"},{"uid":"60ae233c-130"}],"importedBy":[{"uid":"60ae233c-120"},{"uid":"60ae233c-102"}]},"60ae233c-100":{"id":"/src/api-key/delete-api-key.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-101"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-135"},{"uid":"60ae233c-129"},{"uid":"60ae233c-130"},{"uid":"60ae233c-132"},{"uid":"60ae233c-38"},{"uid":"60ae233c-96"}],"importedBy":[{"uid":"60ae233c-120"},{"uid":"60ae233c-102"}]},"60ae233c-102":{"id":"/src/api-key/api-key-list.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-103"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-133"},{"uid":"60ae233c-132"},{"uid":"60ae233c-38"},{"uid":"60ae233c-134"},{"uid":"60ae233c-98"},{"uid":"60ae233c-100"},{"uid":"60ae233c-96"}],"importedBy":[{"uid":"60ae233c-120"}]},"60ae233c-104":{"id":"/src/sql_snippet/styles.ts","moduleParts":{"settings-form.umd.js":"60ae233c-105"},"imported":[],"importedBy":[{"uid":"60ae233c-106"},{"uid":"60ae233c-108"},{"uid":"60ae233c-112"},{"uid":"60ae233c-110"}]},"60ae233c-106":{"id":"/src/sql_snippet/add-sql_snippet.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-107"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-129"},{"uid":"60ae233c-130"},{"uid":"60ae233c-131"},{"uid":"60ae233c-136"},{"uid":"60ae233c-132"},{"uid":"60ae233c-38"},{"uid":"60ae233c-134"},{"uid":"60ae233c-44"},{"uid":"60ae233c-104"}],"importedBy":[{"uid":"60ae233c-121"},{"uid":"60ae233c-112"}]},"60ae233c-108":{"id":"/src/sql_snippet/update-sql_snippet.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-109"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-129"},{"uid":"60ae233c-130"},{"uid":"60ae233c-131"},{"uid":"60ae233c-136"},{"uid":"60ae233c-38"},{"uid":"60ae233c-44"},{"uid":"60ae233c-104"},{"uid":"60ae233c-134"},{"uid":"60ae233c-132"}],"importedBy":[{"uid":"60ae233c-121"},{"uid":"60ae233c-112"}]},"60ae233c-110":{"id":"/src/sql_snippet/delete-sql_snippet.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-111"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-135"},{"uid":"60ae233c-129"},{"uid":"60ae233c-130"},{"uid":"60ae233c-132"},{"uid":"60ae233c-38"},{"uid":"60ae233c-104"}],"importedBy":[{"uid":"60ae233c-121"},{"uid":"60ae233c-112"}]},"60ae233c-112":{"id":"/src/sql_snippet/sql_snippet-list.tsx","moduleParts":{"settings-form.umd.js":"60ae233c-113"},"imported":[{"uid":"60ae233c-10"},{"uid":"60ae233c-128"},{"uid":"60ae233c-137"},{"uid":"60ae233c-133"},{"uid":"60ae233c-38"},{"uid":"60ae233c-106"},{"uid":"60ae233c-110"},{"uid":"60ae233c-104"},{"uid":"60ae233c-130"},{"uid":"60ae233c-132"},{"uid":"60ae233c-134"},{"uid":"60ae233c-108"}],"importedBy":[{"uid":"60ae233c-121"}]},"60ae233c-114":{"id":"/src/index.ts","moduleParts":{"settings-form.umd.js":"60ae233c-115"},"imported":[{"uid":"60ae233c-118"},{"uid":"60ae233c-119"},{"uid":"60ae233c-120"},{"uid":"60ae233c-121"},{"uid":"60ae233c-18"},{"uid":"60ae233c-122"},{"uid":"60ae233c-123"},{"uid":"60ae233c-124"},{"uid":"60ae233c-125"},{"uid":"60ae233c-126"},{"uid":"60ae233c-116","dynamic":true}],"importedBy":[],"isEntry":true},"60ae233c-116":{"id":"/package.json","moduleParts":{"settings-form.umd.js":"60ae233c-117"},"imported":[],"importedBy":[{"uid":"60ae233c-114"}]},"60ae233c-118":{"id":"/src/datasource/index.tsx","moduleParts":{},"imported":[{"uid":"60ae233c-68"},{"uid":"60ae233c-78"},{"uid":"60ae233c-72"}],"importedBy":[{"uid":"60ae233c-114"}]},"60ae233c-119":{"id":"/src/account/index.tsx","moduleParts":{},"imported":[{"uid":"60ae233c-84"},{"uid":"60ae233c-90"},{"uid":"60ae233c-86"},{"uid":"60ae233c-94"}],"importedBy":[{"uid":"60ae233c-114"}]},"60ae233c-120":{"id":"/src/api-key/index.tsx","moduleParts":{},"imported":[{"uid":"60ae233c-98"},{"uid":"60ae233c-102"},{"uid":"60ae233c-100"}],"importedBy":[{"uid":"60ae233c-114"}]},"60ae233c-121":{"id":"/src/sql_snippet/index.tsx","moduleParts":{},"imported":[{"uid":"60ae233c-106"},{"uid":"60ae233c-108"},{"uid":"60ae233c-112"},{"uid":"60ae233c-110"}],"importedBy":[{"uid":"60ae233c-114"}]},"60ae233c-122":{"id":"/src/api-caller/account.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-114"}]},"60ae233c-123":{"id":"/src/api-caller/api-key.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-114"}]},"60ae233c-124":{"id":"/src/api-caller/datasource.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-114"}]},"60ae233c-125":{"id":"/src/api-caller/role.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-114"}]},"60ae233c-126":{"id":"/src/api-caller/sql_snippet.typed.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-114"}]},"60ae233c-127":{"id":"/Users/leto/github/merico-dev/table/shared/src/index.ts","moduleParts":{},"imported":[{"uid":"60ae233c-138"}],"importedBy":[{"uid":"60ae233c-18"}]},"60ae233c-128":{"id":"@mantine/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-68"},{"uid":"60ae233c-78"},{"uid":"60ae233c-72"},{"uid":"60ae233c-84"},{"uid":"60ae233c-90"},{"uid":"60ae233c-86"},{"uid":"60ae233c-94"},{"uid":"60ae233c-98"},{"uid":"60ae233c-102"},{"uid":"60ae233c-100"},{"uid":"60ae233c-106"},{"uid":"60ae233c-108"},{"uid":"60ae233c-112"},{"uid":"60ae233c-110"},{"uid":"60ae233c-42"},{"uid":"60ae233c-60"},{"uid":"60ae233c-66"},{"uid":"60ae233c-70"},{"uid":"60ae233c-76"},{"uid":"60ae233c-80"},{"uid":"60ae233c-88"},{"uid":"60ae233c-92"},{"uid":"60ae233c-64"},{"uid":"60ae233c-46"},{"uid":"60ae233c-58"},{"uid":"60ae233c-74"},{"uid":"60ae233c-62"}],"isExternal":true},"60ae233c-129":{"id":"@mantine/notifications","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-68"},{"uid":"60ae233c-72"},{"uid":"60ae233c-84"},{"uid":"60ae233c-86"},{"uid":"60ae233c-98"},{"uid":"60ae233c-100"},{"uid":"60ae233c-106"},{"uid":"60ae233c-108"},{"uid":"60ae233c-110"},{"uid":"60ae233c-76"},{"uid":"60ae233c-88"},{"uid":"60ae233c-92"}],"isExternal":true},"60ae233c-130":{"id":"@tabler/icons-react","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-68"},{"uid":"60ae233c-72"},{"uid":"60ae233c-84"},{"uid":"60ae233c-86"},{"uid":"60ae233c-98"},{"uid":"60ae233c-100"},{"uid":"60ae233c-106"},{"uid":"60ae233c-108"},{"uid":"60ae233c-112"},{"uid":"60ae233c-110"},{"uid":"60ae233c-42"},{"uid":"60ae233c-70"},{"uid":"60ae233c-76"},{"uid":"60ae233c-88"},{"uid":"60ae233c-64"},{"uid":"60ae233c-46"}],"isExternal":true},"60ae233c-131":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-68"},{"uid":"60ae233c-84"},{"uid":"60ae233c-98"},{"uid":"60ae233c-106"},{"uid":"60ae233c-108"},{"uid":"60ae233c-60"},{"uid":"60ae233c-76"},{"uid":"60ae233c-80"},{"uid":"60ae233c-88"},{"uid":"60ae233c-44"},{"uid":"60ae233c-64"},{"uid":"60ae233c-58"},{"uid":"60ae233c-142"},{"uid":"60ae233c-54"},{"uid":"60ae233c-56"}],"isExternal":true},"60ae233c-132":{"id":"react-i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-68"},{"uid":"60ae233c-78"},{"uid":"60ae233c-72"},{"uid":"60ae233c-84"},{"uid":"60ae233c-90"},{"uid":"60ae233c-86"},{"uid":"60ae233c-98"},{"uid":"60ae233c-102"},{"uid":"60ae233c-100"},{"uid":"60ae233c-106"},{"uid":"60ae233c-108"},{"uid":"60ae233c-112"},{"uid":"60ae233c-110"},{"uid":"60ae233c-42"},{"uid":"60ae233c-60"},{"uid":"60ae233c-66"},{"uid":"60ae233c-76"},{"uid":"60ae233c-80"},{"uid":"60ae233c-88"},{"uid":"60ae233c-92"},{"uid":"60ae233c-64"},{"uid":"60ae233c-46"},{"uid":"60ae233c-74"},{"uid":"60ae233c-54"},{"uid":"60ae233c-52"}],"isExternal":true},"60ae233c-133":{"id":"ahooks","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-78"},{"uid":"60ae233c-90"},{"uid":"60ae233c-102"},{"uid":"60ae233c-112"},{"uid":"60ae233c-80"},{"uid":"60ae233c-64"}],"isExternal":true},"60ae233c-134":{"id":"/src/components/index.ts","moduleParts":{},"imported":[{"uid":"60ae233c-44"},{"uid":"60ae233c-46"},{"uid":"60ae233c-58"}],"importedBy":[{"uid":"60ae233c-78"},{"uid":"60ae233c-84"},{"uid":"60ae233c-90"},{"uid":"60ae233c-94"},{"uid":"60ae233c-98"},{"uid":"60ae233c-102"},{"uid":"60ae233c-106"},{"uid":"60ae233c-108"},{"uid":"60ae233c-112"},{"uid":"60ae233c-60"},{"uid":"60ae233c-66"},{"uid":"60ae233c-88"},{"uid":"60ae233c-92"},{"uid":"60ae233c-74"}]},"60ae233c-135":{"id":"@mantine/modals","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-72"},{"uid":"60ae233c-86"},{"uid":"60ae233c-98"},{"uid":"60ae233c-100"},{"uid":"60ae233c-110"}],"isExternal":true},"60ae233c-136":{"id":"react-hook-form","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-84"},{"uid":"60ae233c-98"},{"uid":"60ae233c-106"},{"uid":"60ae233c-108"},{"uid":"60ae233c-60"},{"uid":"60ae233c-66"},{"uid":"60ae233c-88"},{"uid":"60ae233c-92"},{"uid":"60ae233c-74"}],"isExternal":true},"60ae233c-137":{"id":"@mantine/code-highlight","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-112"}],"isExternal":true},"60ae233c-138":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/index.ts","moduleParts":{},"imported":[{"uid":"60ae233c-141"},{"uid":"60ae233c-12"},{"uid":"60ae233c-14"},{"uid":"60ae233c-16"}],"importedBy":[{"uid":"60ae233c-127"}]},"60ae233c-139":{"id":"\u0000commonjsHelpers.js","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-10"},{"uid":"60ae233c-4"},{"uid":"60ae233c-8"}]},"60ae233c-140":{"id":"@monaco-editor/react","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-44"},{"uid":"60ae233c-62"},{"uid":"60ae233c-56"}],"isExternal":true},"60ae233c-141":{"id":"/Users/leto/github/merico-dev/table/shared/src/api-client/types.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-138"}]},"60ae233c-142":{"id":"\u0000react?commonjs-external","moduleParts":{},"imported":[{"uid":"60ae233c-131"}],"importedBy":[{"uid":"60ae233c-4"},{"uid":"60ae233c-8"}]},"60ae233c-143":{"id":"crypto-js","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-12"}],"isExternal":true},"60ae233c-144":{"id":"lodash","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-14"}],"isExternal":true},"60ae233c-145":{"id":"axios","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-14"}],"isExternal":true},"60ae233c-146":{"id":"i18next","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-52"}],"isExternal":true},"60ae233c-147":{"id":"i18next-browser-languagedetector","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-52"}],"isExternal":true},"60ae233c-148":{"id":"intl-pluralrules","moduleParts":{},"imported":[],"importedBy":[{"uid":"60ae233c-52"}],"isExternal":true}},"env":{"rollup":"3.29.4"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
|
4826
4826
|
|
|
4827
4827
|
const run = () => {
|
|
4828
4828
|
const width = window.innerWidth;
|
package/dist/version.json
CHANGED