@kengic/core.react 0.0.2-beta.40 → 0.0.2-beta.41
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/kengic-core.react.js
CHANGED
|
@@ -24075,7 +24075,7 @@ function createStore$1(e, t, r) {
|
|
|
24075
24075
|
[symbol_observable_default]: ie
|
|
24076
24076
|
};
|
|
24077
24077
|
}
|
|
24078
|
-
function warning$
|
|
24078
|
+
function warning$5(e) {
|
|
24079
24079
|
typeof console < "u" && typeof console.error == "function" && console.error(e);
|
|
24080
24080
|
try {
|
|
24081
24081
|
throw new Error(e);
|
|
@@ -24111,7 +24111,7 @@ function combineReducers(e) {
|
|
|
24111
24111
|
const t = Object.keys(e), r = {};
|
|
24112
24112
|
for (let u = 0; u < t.length; u++) {
|
|
24113
24113
|
const p = t[u];
|
|
24114
|
-
process.env.NODE_ENV !== "production" && typeof e[p] > "u" && warning$
|
|
24114
|
+
process.env.NODE_ENV !== "production" && typeof e[p] > "u" && warning$5(`No reducer provided for key "${p}"`), typeof e[p] == "function" && (r[p] = e[p]);
|
|
24115
24115
|
}
|
|
24116
24116
|
const n = Object.keys(r);
|
|
24117
24117
|
let a;
|
|
@@ -24127,7 +24127,7 @@ function combineReducers(e) {
|
|
|
24127
24127
|
throw s;
|
|
24128
24128
|
if (process.env.NODE_ENV !== "production") {
|
|
24129
24129
|
const G = getUnexpectedStateShapeWarningMessage(p, r, C, a);
|
|
24130
|
-
G && warning$
|
|
24130
|
+
G && warning$5(G);
|
|
24131
24131
|
}
|
|
24132
24132
|
let w = !1;
|
|
24133
24133
|
const L = {};
|
|
@@ -25556,7 +25556,7 @@ function toArray$4(e) {
|
|
|
25556
25556
|
var warned = {}, preWarningFns = [], preMessage = function(t) {
|
|
25557
25557
|
preWarningFns.push(t);
|
|
25558
25558
|
};
|
|
25559
|
-
function warning$
|
|
25559
|
+
function warning$4(e, t) {
|
|
25560
25560
|
if (process.env.NODE_ENV !== "production" && !e && console !== void 0) {
|
|
25561
25561
|
var r = preWarningFns.reduce(function(n, a) {
|
|
25562
25562
|
return a(n ?? "", "warning");
|
|
@@ -25579,7 +25579,7 @@ function call(e, t, r) {
|
|
|
25579
25579
|
!t && !warned[r] && (e(!1, r), warned[r] = !0);
|
|
25580
25580
|
}
|
|
25581
25581
|
function warningOnce(e, t) {
|
|
25582
|
-
call(warning$
|
|
25582
|
+
call(warning$4, e, t);
|
|
25583
25583
|
}
|
|
25584
25584
|
function noteOnce(e, t) {
|
|
25585
25585
|
call(note, e, t);
|
|
@@ -26141,7 +26141,7 @@ process.env.NODE_ENV !== "production" && (RefSingleObserver.displayName = "Singl
|
|
|
26141
26141
|
var INTERNAL_PREFIX_KEY = "rc-observer-key";
|
|
26142
26142
|
function ResizeObserver$1(e, t) {
|
|
26143
26143
|
var r = e.children, n = typeof r == "function" ? [r] : toArray$4(r);
|
|
26144
|
-
return process.env.NODE_ENV !== "production" && (n.length > 1 ? warning$
|
|
26144
|
+
return process.env.NODE_ENV !== "production" && (n.length > 1 ? warning$4(!1, "Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.") : n.length === 0 && warning$4(!1, "`children` of ResizeObserver is empty. Nothing is in observe.")), n.map(function(a, s) {
|
|
26145
26145
|
var u = (a == null ? void 0 : a.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(s);
|
|
26146
26146
|
return /* @__PURE__ */ reactExports.createElement(RefSingleObserver, _extends({}, e, {
|
|
26147
26147
|
key: u,
|
|
@@ -26569,7 +26569,7 @@ _defineProperty(ThemeCache, "MAX_CACHE_SIZE", 20);
|
|
|
26569
26569
|
_defineProperty(ThemeCache, "MAX_CACHE_OFFSET", 5);
|
|
26570
26570
|
var uuid$5 = 0, Theme = /* @__PURE__ */ function() {
|
|
26571
26571
|
function e(t) {
|
|
26572
|
-
_classCallCheck(this, e), _defineProperty(this, "derivatives", void 0), _defineProperty(this, "id", void 0), this.derivatives = Array.isArray(t) ? t : [t], this.id = uuid$5, t.length === 0 && warning$
|
|
26572
|
+
_classCallCheck(this, e), _defineProperty(this, "derivatives", void 0), _defineProperty(this, "id", void 0), this.derivatives = Array.isArray(t) ? t : [t], this.id = uuid$5, t.length === 0 && warning$4(t.length > 0, "[Ant Design CSS-in-JS] Theme should have at least one derivative function."), uuid$5 += 1;
|
|
26573
26573
|
}
|
|
26574
26574
|
return _createClass(e, [{
|
|
26575
26575
|
key: "getDerivativeToken",
|
|
@@ -26666,7 +26666,7 @@ var token2CSSVar = function(t) {
|
|
|
26666
26666
|
var r = [], n = !1;
|
|
26667
26667
|
function a(s) {
|
|
26668
26668
|
if (n) {
|
|
26669
|
-
process.env.NODE_ENV !== "production" && warning$
|
|
26669
|
+
process.env.NODE_ENV !== "production" && warning$4(!1, "[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.");
|
|
26670
26670
|
return;
|
|
26671
26671
|
}
|
|
26672
26672
|
r.push(s);
|
|
@@ -27469,7 +27469,7 @@ const WarningContext = /* @__PURE__ */ reactExports.createContext({}), devUseWar
|
|
|
27469
27469
|
const e = () => {
|
|
27470
27470
|
};
|
|
27471
27471
|
return e.deprecated = noop$3, e;
|
|
27472
|
-
}, ValidateMessagesContext = /* @__PURE__ */ reactExports.createContext(void 0);
|
|
27472
|
+
}, warning$3 = warning$2, ValidateMessagesContext = /* @__PURE__ */ reactExports.createContext(void 0);
|
|
27473
27473
|
var locale$A = {
|
|
27474
27474
|
// Options
|
|
27475
27475
|
items_per_page: "/ page",
|
|
@@ -28696,7 +28696,7 @@ function getStyle$1(e, t) {
|
|
|
28696
28696
|
}
|
|
28697
28697
|
function registerTheme(e, t) {
|
|
28698
28698
|
const r = getStyle$1(e, t);
|
|
28699
|
-
canUseDom() ? updateCSS(r, `${dynamicStyleMark}-dynamic-theme`) : process.env.NODE_ENV !== "production" && warning$
|
|
28699
|
+
canUseDom() ? updateCSS(r, `${dynamicStyleMark}-dynamic-theme`) : process.env.NODE_ENV !== "production" && warning$3(!1, "ConfigProvider", "SSR do not support dynamic theme with css variables.");
|
|
28700
28700
|
}
|
|
28701
28701
|
const DisabledContext = /* @__PURE__ */ reactExports.createContext(!1), DisabledContextProvider = (e) => {
|
|
28702
28702
|
let {
|
|
@@ -30064,7 +30064,7 @@ var __rest$z = function(e, t) {
|
|
|
30064
30064
|
};
|
|
30065
30065
|
let existThemeConfig = !1;
|
|
30066
30066
|
const warnContext = process.env.NODE_ENV !== "production" ? (e) => {
|
|
30067
|
-
process.env.NODE_ENV !== "production" && warning$
|
|
30067
|
+
process.env.NODE_ENV !== "production" && warning$3(!existThemeConfig, e, "Static function can not consume context like dynamic theme. Please use 'App' component instead.");
|
|
30068
30068
|
} : (
|
|
30069
30069
|
/* istanbul ignore next */
|
|
30070
30070
|
null
|
|
@@ -30086,7 +30086,7 @@ const setGlobalConfig = (e) => {
|
|
|
30086
30086
|
theme: n,
|
|
30087
30087
|
holderRender: a
|
|
30088
30088
|
} = e;
|
|
30089
|
-
t !== void 0 && (globalPrefixCls = t), r !== void 0 && (globalIconPrefixCls = r), "holderRender" in e && (globalHolderRender = a), n && (isLegacyTheme(n) ? (process.env.NODE_ENV !== "production" && warning$
|
|
30089
|
+
t !== void 0 && (globalPrefixCls = t), r !== void 0 && (globalIconPrefixCls = r), "holderRender" in e && (globalHolderRender = a), n && (isLegacyTheme(n) ? (process.env.NODE_ENV !== "production" && warning$3(!1, "ConfigProvider", "`config` of css variable theme is not work in v5. Please use new `theme` config instead."), registerTheme(getGlobalPrefixCls(), n)) : globalTheme = n);
|
|
30090
30090
|
}, globalConfig = () => ({
|
|
30091
30091
|
getPrefixCls: (e, t) => t || (e ? `${getGlobalPrefixCls()}-${e}` : getGlobalPrefixCls()),
|
|
30092
30092
|
getIconPrefixCls: getGlobalIconPrefixCls,
|
|
@@ -30335,7 +30335,7 @@ ConfigProvider.SizeContext = SizeContext;
|
|
|
30335
30335
|
ConfigProvider.config = setGlobalConfig;
|
|
30336
30336
|
ConfigProvider.useConfig = useConfig;
|
|
30337
30337
|
Object.defineProperty(ConfigProvider, "SizeContext", {
|
|
30338
|
-
get: () => (process.env.NODE_ENV !== "production" && warning$
|
|
30338
|
+
get: () => (process.env.NODE_ENV !== "production" && warning$3(!1, "ConfigProvider", "ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."), SizeContext)
|
|
30339
30339
|
});
|
|
30340
30340
|
process.env.NODE_ENV !== "production" && (ConfigProvider.displayName = "ConfigProvider");
|
|
30341
30341
|
var CheckCircleFilled$1 = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, name: "check-circle", theme: "filled" };
|
|
@@ -34588,8 +34588,8 @@ var Mask$1 = function(t) {
|
|
|
34588
34588
|
}, Dialog = function(t) {
|
|
34589
34589
|
var r = t.prefixCls, n = r === void 0 ? "rc-dialog" : r, a = t.zIndex, s = t.visible, u = s === void 0 ? !1 : s, p = t.keyboard, C = p === void 0 ? !0 : p, w = t.focusTriggerAfterClose, L = w === void 0 ? !0 : w, G = t.wrapStyle, te = t.wrapClassName, oe = t.wrapProps, ie = t.onClose, ue = t.afterOpenChange, ae = t.afterClose, ut = t.transitionName, ea = t.animation, ct = t.closable, ra = ct === void 0 ? !0 : ct, ta = t.mask, oa = ta === void 0 ? !0 : ta, ia = t.maskTransitionName, ca = t.maskAnimation, sa = t.maskClosable, ha = sa === void 0 ? !0 : sa, Sa = t.maskStyle, ba = t.maskProps, ga = t.rootClassName, ma = t.classNames, $a = t.styles;
|
|
34590
34590
|
process.env.NODE_ENV !== "production" && (["wrapStyle", "bodyStyle", "maskStyle"].forEach(function(za) {
|
|
34591
|
-
warning$
|
|
34592
|
-
}), "wrapClassName" in t && warning$
|
|
34591
|
+
warning$4(!(za in t), "".concat(za, " is deprecated, please use styles instead."));
|
|
34592
|
+
}), "wrapClassName" in t && warning$4(!1, "wrapClassName is deprecated, please use classNames instead."));
|
|
34593
34593
|
var va = reactExports.useRef(), ua = reactExports.useRef(), fa = reactExports.useRef(), ya = reactExports.useState(u), xa = _slicedToArray(ya, 2), pa = xa[0], Ta = xa[1], Pa = useId$1();
|
|
34594
34594
|
function Ra() {
|
|
34595
34595
|
contains(ua.current, document.activeElement) || (va.current = document.activeElement);
|
|
@@ -38109,7 +38109,7 @@ const ConfirmDialogWrapper = (e) => {
|
|
|
38109
38109
|
direction: s
|
|
38110
38110
|
} = e, u = getConfirmLocale(), p = reactExports.useContext(ConfigContext), C = getRootPrefixCls() || p.getPrefixCls(), w = n || `${C}-modal`;
|
|
38111
38111
|
let L = a;
|
|
38112
|
-
return L === !1 && (L = void 0, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && warning$
|
|
38112
|
+
return L === !1 && (L = void 0, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && warning$3(!1, "Modal", "Static method not support `getContainer` to be `false` since it do not have context env.")), /* @__PURE__ */ React$1.createElement(ConfirmDialogWrapper$1, Object.assign({}, e, {
|
|
38113
38113
|
rootPrefixCls: C,
|
|
38114
38114
|
prefixCls: w,
|
|
38115
38115
|
iconPrefixCls: p.iconPrefixCls,
|
|
@@ -38199,7 +38199,7 @@ function modalGlobalConfig(e) {
|
|
|
38199
38199
|
let {
|
|
38200
38200
|
rootPrefixCls: t
|
|
38201
38201
|
} = e;
|
|
38202
|
-
process.env.NODE_ENV !== "production" && warning$
|
|
38202
|
+
process.env.NODE_ENV !== "production" && warning$3(!1, "Modal", "Modal.config is deprecated. Please use ConfigProvider.config instead."), defaultRootPrefixCls = t;
|
|
38203
38203
|
}
|
|
38204
38204
|
var __rest$t = function(e, t) {
|
|
38205
38205
|
var r = {};
|
|
@@ -38718,7 +38718,7 @@ ForwardOverflow.RESPONSIVE = RESPONSIVE;
|
|
|
38718
38718
|
ForwardOverflow.INVALIDATE = INVALIDATE;
|
|
38719
38719
|
var Input$3 = function(t, r) {
|
|
38720
38720
|
var n, a = t.prefixCls, s = t.id, u = t.inputElement, p = t.disabled, C = t.tabIndex, w = t.autoFocus, L = t.autoComplete, G = t.editable, te = t.activeDescendantId, oe = t.value, ie = t.maxLength, ue = t.onKeyDown, ae = t.onMouseDown, ut = t.onChange, ea = t.onPaste, ct = t.onCompositionStart, ra = t.onCompositionEnd, ta = t.open, oa = t.attrs, ia = u || /* @__PURE__ */ reactExports.createElement("input", null), ca = ia, sa = ca.ref, ha = ca.props, Sa = ha.onKeyDown, ba = ha.onChange, ga = ha.onMouseDown, ma = ha.onCompositionStart, $a = ha.onCompositionEnd, va = ha.style;
|
|
38721
|
-
return warning$
|
|
38721
|
+
return warning$4(!("maxLength" in ia.props), "Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."), ia = /* @__PURE__ */ reactExports.cloneElement(ia, _objectSpread2$8(_objectSpread2$8(_objectSpread2$8({
|
|
38722
38722
|
type: "search"
|
|
38723
38723
|
}, ha), {}, {
|
|
38724
38724
|
// Override over origin props
|
|
@@ -39397,7 +39397,7 @@ function useWinClick(e, t, r, n, a, s, u, p) {
|
|
|
39397
39397
|
var ie = getShadowRoot(r);
|
|
39398
39398
|
if (ie && (ie.addEventListener("mousedown", te, !0), ie.addEventListener("contextmenu", te, !0)), process.env.NODE_ENV !== "production") {
|
|
39399
39399
|
var ue, ae, ut = r == null || (ue = r.getRootNode) === null || ue === void 0 ? void 0 : ue.call(r), ea = (ae = n.getRootNode) === null || ae === void 0 ? void 0 : ae.call(n);
|
|
39400
|
-
warning$
|
|
39400
|
+
warning$4(ut === ea, "trigger element and popup element should in same shadow root.");
|
|
39401
39401
|
}
|
|
39402
39402
|
return function() {
|
|
39403
39403
|
oe.removeEventListener("pointerdown", G, !0), oe.removeEventListener("mousedown", te, !0), oe.removeEventListener("contextmenu", te, !0), ie && (ie.removeEventListener("mousedown", te, !0), ie.removeEventListener("contextmenu", te, !0));
|
|
@@ -66667,6 +66667,389 @@ function doKgSqlClient(e = "") {
|
|
|
66667
66667
|
}
|
|
66668
66668
|
}), t;
|
|
66669
66669
|
}
|
|
66670
|
+
var isFunction$3 = function(e) {
|
|
66671
|
+
return typeof e == "function";
|
|
66672
|
+
}, isString = function(e) {
|
|
66673
|
+
return typeof e == "string";
|
|
66674
|
+
}, isNumber = function(e) {
|
|
66675
|
+
return typeof e == "number";
|
|
66676
|
+
}, isDev = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
|
|
66677
|
+
function depsAreSame(e, t) {
|
|
66678
|
+
if (e === t) return !0;
|
|
66679
|
+
for (var r = 0; r < e.length; r++)
|
|
66680
|
+
if (!Object.is(e[r], t[r])) return !1;
|
|
66681
|
+
return !0;
|
|
66682
|
+
}
|
|
66683
|
+
function useLatest(e) {
|
|
66684
|
+
var t = reactExports.useRef(e);
|
|
66685
|
+
return t.current = e, t;
|
|
66686
|
+
}
|
|
66687
|
+
var useUnmount = function(e) {
|
|
66688
|
+
isDev && (isFunction$3(e) || console.error("useUnmount expected parameter is a function, got ".concat(typeof e)));
|
|
66689
|
+
var t = useLatest(e);
|
|
66690
|
+
reactExports.useEffect(function() {
|
|
66691
|
+
return function() {
|
|
66692
|
+
t.current();
|
|
66693
|
+
};
|
|
66694
|
+
}, []);
|
|
66695
|
+
}, isBrowser = !!(typeof window < "u" && window.document && window.document.createElement);
|
|
66696
|
+
function getTargetElement(e, t) {
|
|
66697
|
+
if (isBrowser) {
|
|
66698
|
+
if (!e)
|
|
66699
|
+
return t;
|
|
66700
|
+
var r;
|
|
66701
|
+
return isFunction$3(e) ? r = e() : "current" in e ? r = e.current : r = e, r;
|
|
66702
|
+
}
|
|
66703
|
+
}
|
|
66704
|
+
var createEffectWithTarget = function(e) {
|
|
66705
|
+
var t = function(r, n, a) {
|
|
66706
|
+
var s = reactExports.useRef(!1), u = reactExports.useRef([]), p = reactExports.useRef([]), C = reactExports.useRef();
|
|
66707
|
+
e(function() {
|
|
66708
|
+
var w, L = Array.isArray(a) ? a : [a], G = L.map(function(te) {
|
|
66709
|
+
return getTargetElement(te);
|
|
66710
|
+
});
|
|
66711
|
+
if (!s.current) {
|
|
66712
|
+
s.current = !0, u.current = G, p.current = n, C.current = r();
|
|
66713
|
+
return;
|
|
66714
|
+
}
|
|
66715
|
+
(G.length !== u.current.length || !depsAreSame(u.current, G) || !depsAreSame(p.current, n)) && ((w = C.current) === null || w === void 0 || w.call(C), u.current = G, p.current = n, C.current = r());
|
|
66716
|
+
}), useUnmount(function() {
|
|
66717
|
+
var w;
|
|
66718
|
+
(w = C.current) === null || w === void 0 || w.call(C), s.current = !1;
|
|
66719
|
+
});
|
|
66720
|
+
};
|
|
66721
|
+
return t;
|
|
66722
|
+
}, useEffectWithTarget$1 = createEffectWithTarget(reactExports.useEffect), hasElementType = typeof Element < "u", hasMap = typeof Map == "function", hasSet = typeof Set == "function", hasArrayBuffer = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
|
|
66723
|
+
function equal(e, t) {
|
|
66724
|
+
if (e === t) return !0;
|
|
66725
|
+
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
66726
|
+
if (e.constructor !== t.constructor) return !1;
|
|
66727
|
+
var r, n, a;
|
|
66728
|
+
if (Array.isArray(e)) {
|
|
66729
|
+
if (r = e.length, r != t.length) return !1;
|
|
66730
|
+
for (n = r; n-- !== 0; )
|
|
66731
|
+
if (!equal(e[n], t[n])) return !1;
|
|
66732
|
+
return !0;
|
|
66733
|
+
}
|
|
66734
|
+
var s;
|
|
66735
|
+
if (hasMap && e instanceof Map && t instanceof Map) {
|
|
66736
|
+
if (e.size !== t.size) return !1;
|
|
66737
|
+
for (s = e.entries(); !(n = s.next()).done; )
|
|
66738
|
+
if (!t.has(n.value[0])) return !1;
|
|
66739
|
+
for (s = e.entries(); !(n = s.next()).done; )
|
|
66740
|
+
if (!equal(n.value[1], t.get(n.value[0]))) return !1;
|
|
66741
|
+
return !0;
|
|
66742
|
+
}
|
|
66743
|
+
if (hasSet && e instanceof Set && t instanceof Set) {
|
|
66744
|
+
if (e.size !== t.size) return !1;
|
|
66745
|
+
for (s = e.entries(); !(n = s.next()).done; )
|
|
66746
|
+
if (!t.has(n.value[0])) return !1;
|
|
66747
|
+
return !0;
|
|
66748
|
+
}
|
|
66749
|
+
if (hasArrayBuffer && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
|
|
66750
|
+
if (r = e.length, r != t.length) return !1;
|
|
66751
|
+
for (n = r; n-- !== 0; )
|
|
66752
|
+
if (e[n] !== t[n]) return !1;
|
|
66753
|
+
return !0;
|
|
66754
|
+
}
|
|
66755
|
+
if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
|
|
66756
|
+
if (e.valueOf !== Object.prototype.valueOf && typeof e.valueOf == "function" && typeof t.valueOf == "function") return e.valueOf() === t.valueOf();
|
|
66757
|
+
if (e.toString !== Object.prototype.toString && typeof e.toString == "function" && typeof t.toString == "function") return e.toString() === t.toString();
|
|
66758
|
+
if (a = Object.keys(e), r = a.length, r !== Object.keys(t).length) return !1;
|
|
66759
|
+
for (n = r; n-- !== 0; )
|
|
66760
|
+
if (!Object.prototype.hasOwnProperty.call(t, a[n])) return !1;
|
|
66761
|
+
if (hasElementType && e instanceof Element) return !1;
|
|
66762
|
+
for (n = r; n-- !== 0; )
|
|
66763
|
+
if (!((a[n] === "_owner" || a[n] === "__v" || a[n] === "__o") && e.$$typeof) && !equal(e[a[n]], t[a[n]]))
|
|
66764
|
+
return !1;
|
|
66765
|
+
return !0;
|
|
66766
|
+
}
|
|
66767
|
+
return e !== e && t !== t;
|
|
66768
|
+
}
|
|
66769
|
+
var reactFastCompare = function(t, r) {
|
|
66770
|
+
try {
|
|
66771
|
+
return equal(t, r);
|
|
66772
|
+
} catch (n) {
|
|
66773
|
+
if ((n.message || "").match(/stack|recursion/i))
|
|
66774
|
+
return console.warn("react-fast-compare cannot handle circular refs"), !1;
|
|
66775
|
+
throw n;
|
|
66776
|
+
}
|
|
66777
|
+
};
|
|
66778
|
+
const isEqual = /* @__PURE__ */ getDefaultExportFromCjs(reactFastCompare);
|
|
66779
|
+
var depsEqual = function(e, t) {
|
|
66780
|
+
return e === void 0 && (e = []), t === void 0 && (t = []), isEqual(e, t);
|
|
66781
|
+
}, useDeepCompareEffectWithTarget = function(e, t, r) {
|
|
66782
|
+
var n = reactExports.useRef(), a = reactExports.useRef(0);
|
|
66783
|
+
depsEqual(t, n.current) || (a.current += 1), n.current = t, useEffectWithTarget$1(e, [a.current], r);
|
|
66784
|
+
}, isAppleDevice = /(mac|iphone|ipod|ipad)/i.test(typeof navigator < "u" ? navigator == null ? void 0 : navigator.platform : ""), aliasKeyCodeMap = {
|
|
66785
|
+
0: 48,
|
|
66786
|
+
1: 49,
|
|
66787
|
+
2: 50,
|
|
66788
|
+
3: 51,
|
|
66789
|
+
4: 52,
|
|
66790
|
+
5: 53,
|
|
66791
|
+
6: 54,
|
|
66792
|
+
7: 55,
|
|
66793
|
+
8: 56,
|
|
66794
|
+
9: 57,
|
|
66795
|
+
backspace: 8,
|
|
66796
|
+
tab: 9,
|
|
66797
|
+
enter: 13,
|
|
66798
|
+
shift: 16,
|
|
66799
|
+
ctrl: 17,
|
|
66800
|
+
alt: 18,
|
|
66801
|
+
pausebreak: 19,
|
|
66802
|
+
capslock: 20,
|
|
66803
|
+
esc: 27,
|
|
66804
|
+
space: 32,
|
|
66805
|
+
pageup: 33,
|
|
66806
|
+
pagedown: 34,
|
|
66807
|
+
end: 35,
|
|
66808
|
+
home: 36,
|
|
66809
|
+
leftarrow: 37,
|
|
66810
|
+
uparrow: 38,
|
|
66811
|
+
rightarrow: 39,
|
|
66812
|
+
downarrow: 40,
|
|
66813
|
+
insert: 45,
|
|
66814
|
+
delete: 46,
|
|
66815
|
+
a: 65,
|
|
66816
|
+
b: 66,
|
|
66817
|
+
c: 67,
|
|
66818
|
+
d: 68,
|
|
66819
|
+
e: 69,
|
|
66820
|
+
f: 70,
|
|
66821
|
+
g: 71,
|
|
66822
|
+
h: 72,
|
|
66823
|
+
i: 73,
|
|
66824
|
+
j: 74,
|
|
66825
|
+
k: 75,
|
|
66826
|
+
l: 76,
|
|
66827
|
+
m: 77,
|
|
66828
|
+
n: 78,
|
|
66829
|
+
o: 79,
|
|
66830
|
+
p: 80,
|
|
66831
|
+
q: 81,
|
|
66832
|
+
r: 82,
|
|
66833
|
+
s: 83,
|
|
66834
|
+
t: 84,
|
|
66835
|
+
u: 85,
|
|
66836
|
+
v: 86,
|
|
66837
|
+
w: 87,
|
|
66838
|
+
x: 88,
|
|
66839
|
+
y: 89,
|
|
66840
|
+
z: 90,
|
|
66841
|
+
leftwindowkey: 91,
|
|
66842
|
+
rightwindowkey: 92,
|
|
66843
|
+
meta: isAppleDevice ? [91, 93] : [91, 92],
|
|
66844
|
+
selectkey: 93,
|
|
66845
|
+
numpad0: 96,
|
|
66846
|
+
numpad1: 97,
|
|
66847
|
+
numpad2: 98,
|
|
66848
|
+
numpad3: 99,
|
|
66849
|
+
numpad4: 100,
|
|
66850
|
+
numpad5: 101,
|
|
66851
|
+
numpad6: 102,
|
|
66852
|
+
numpad7: 103,
|
|
66853
|
+
numpad8: 104,
|
|
66854
|
+
numpad9: 105,
|
|
66855
|
+
multiply: 106,
|
|
66856
|
+
add: 107,
|
|
66857
|
+
subtract: 109,
|
|
66858
|
+
decimalpoint: 110,
|
|
66859
|
+
divide: 111,
|
|
66860
|
+
f1: 112,
|
|
66861
|
+
f2: 113,
|
|
66862
|
+
f3: 114,
|
|
66863
|
+
f4: 115,
|
|
66864
|
+
f5: 116,
|
|
66865
|
+
f6: 117,
|
|
66866
|
+
f7: 118,
|
|
66867
|
+
f8: 119,
|
|
66868
|
+
f9: 120,
|
|
66869
|
+
f10: 121,
|
|
66870
|
+
f11: 122,
|
|
66871
|
+
f12: 123,
|
|
66872
|
+
numlock: 144,
|
|
66873
|
+
scrolllock: 145,
|
|
66874
|
+
semicolon: 186,
|
|
66875
|
+
equalsign: 187,
|
|
66876
|
+
comma: 188,
|
|
66877
|
+
dash: 189,
|
|
66878
|
+
period: 190,
|
|
66879
|
+
forwardslash: 191,
|
|
66880
|
+
graveaccent: 192,
|
|
66881
|
+
openbracket: 219,
|
|
66882
|
+
backslash: 220,
|
|
66883
|
+
closebracket: 221,
|
|
66884
|
+
singlequote: 222
|
|
66885
|
+
}, modifierKey = {
|
|
66886
|
+
ctrl: function(e) {
|
|
66887
|
+
return e.ctrlKey;
|
|
66888
|
+
},
|
|
66889
|
+
shift: function(e) {
|
|
66890
|
+
return e.shiftKey;
|
|
66891
|
+
},
|
|
66892
|
+
alt: function(e) {
|
|
66893
|
+
return e.altKey;
|
|
66894
|
+
},
|
|
66895
|
+
meta: function(e) {
|
|
66896
|
+
return e.type === "keyup" ? aliasKeyCodeMap.meta.includes(e.keyCode) : e.metaKey;
|
|
66897
|
+
}
|
|
66898
|
+
};
|
|
66899
|
+
function isValidKeyType(e) {
|
|
66900
|
+
return isString(e) || isNumber(e);
|
|
66901
|
+
}
|
|
66902
|
+
function countKeyByEvent(e) {
|
|
66903
|
+
var t = Object.keys(modifierKey).reduce(function(r, n) {
|
|
66904
|
+
return modifierKey[n](e) ? r + 1 : r;
|
|
66905
|
+
}, 0);
|
|
66906
|
+
return [16, 17, 18, 91, 92].includes(e.keyCode) ? t : t + 1;
|
|
66907
|
+
}
|
|
66908
|
+
function genFilterKey(e, t, r) {
|
|
66909
|
+
var n, a;
|
|
66910
|
+
if (!e.key)
|
|
66911
|
+
return !1;
|
|
66912
|
+
if (isNumber(t))
|
|
66913
|
+
return e.keyCode === t ? t : !1;
|
|
66914
|
+
var s = t.split("."), u = 0;
|
|
66915
|
+
try {
|
|
66916
|
+
for (var p = __values(s), C = p.next(); !C.done; C = p.next()) {
|
|
66917
|
+
var w = C.value, L = modifierKey[w], G = aliasKeyCodeMap[w.toLowerCase()];
|
|
66918
|
+
(L && L(e) || G && G === e.keyCode) && u++;
|
|
66919
|
+
}
|
|
66920
|
+
} catch (te) {
|
|
66921
|
+
n = {
|
|
66922
|
+
error: te
|
|
66923
|
+
};
|
|
66924
|
+
} finally {
|
|
66925
|
+
try {
|
|
66926
|
+
C && !C.done && (a = p.return) && a.call(p);
|
|
66927
|
+
} finally {
|
|
66928
|
+
if (n) throw n.error;
|
|
66929
|
+
}
|
|
66930
|
+
}
|
|
66931
|
+
return r ? u === s.length && countKeyByEvent(e) === s.length ? t : !1 : u === s.length ? t : !1;
|
|
66932
|
+
}
|
|
66933
|
+
function genKeyFormatter(e, t) {
|
|
66934
|
+
return isFunction$3(e) ? e : isValidKeyType(e) ? function(r) {
|
|
66935
|
+
return genFilterKey(r, e, t);
|
|
66936
|
+
} : Array.isArray(e) ? function(r) {
|
|
66937
|
+
return e.find(function(n) {
|
|
66938
|
+
return genFilterKey(r, n, t);
|
|
66939
|
+
});
|
|
66940
|
+
} : function() {
|
|
66941
|
+
return !!e;
|
|
66942
|
+
};
|
|
66943
|
+
}
|
|
66944
|
+
var defaultEvents = ["keydown"];
|
|
66945
|
+
function useKeyPress(e, t, r) {
|
|
66946
|
+
var n = {}, a = n.events, s = a === void 0 ? defaultEvents : a, u = n.target, p = n.exactMatch, C = p === void 0 ? !1 : p, w = n.useCapture, L = w === void 0 ? !1 : w, G = useLatest(t), te = useLatest(e);
|
|
66947
|
+
useDeepCompareEffectWithTarget(function() {
|
|
66948
|
+
var oe, ie, ue, ae = getTargetElement(u, window);
|
|
66949
|
+
if (ae) {
|
|
66950
|
+
var ut = function(ta) {
|
|
66951
|
+
var oa, ia = genKeyFormatter(te.current, C), ca = ia(ta), sa = isValidKeyType(ca) ? ca : ta.key;
|
|
66952
|
+
if (ca)
|
|
66953
|
+
return (oa = G.current) === null || oa === void 0 ? void 0 : oa.call(G, ta, sa);
|
|
66954
|
+
};
|
|
66955
|
+
try {
|
|
66956
|
+
for (var ea = __values(s), ct = ea.next(); !ct.done; ct = ea.next()) {
|
|
66957
|
+
var ra = ct.value;
|
|
66958
|
+
(ue = ae == null ? void 0 : ae.addEventListener) === null || ue === void 0 || ue.call(ae, ra, ut, L);
|
|
66959
|
+
}
|
|
66960
|
+
} catch (ta) {
|
|
66961
|
+
oe = {
|
|
66962
|
+
error: ta
|
|
66963
|
+
};
|
|
66964
|
+
} finally {
|
|
66965
|
+
try {
|
|
66966
|
+
ct && !ct.done && (ie = ea.return) && ie.call(ea);
|
|
66967
|
+
} finally {
|
|
66968
|
+
if (oe) throw oe.error;
|
|
66969
|
+
}
|
|
66970
|
+
}
|
|
66971
|
+
return function() {
|
|
66972
|
+
var ta, oa, ia;
|
|
66973
|
+
try {
|
|
66974
|
+
for (var ca = __values(s), sa = ca.next(); !sa.done; sa = ca.next()) {
|
|
66975
|
+
var ha = sa.value;
|
|
66976
|
+
(ia = ae == null ? void 0 : ae.removeEventListener) === null || ia === void 0 || ia.call(ae, ha, ut, L);
|
|
66977
|
+
}
|
|
66978
|
+
} catch (Sa) {
|
|
66979
|
+
ta = {
|
|
66980
|
+
error: Sa
|
|
66981
|
+
};
|
|
66982
|
+
} finally {
|
|
66983
|
+
try {
|
|
66984
|
+
sa && !sa.done && (oa = ca.return) && oa.call(ca);
|
|
66985
|
+
} finally {
|
|
66986
|
+
if (ta) throw ta.error;
|
|
66987
|
+
}
|
|
66988
|
+
}
|
|
66989
|
+
};
|
|
66990
|
+
}
|
|
66991
|
+
}, [s], u);
|
|
66992
|
+
}
|
|
66993
|
+
function useRafState(e) {
|
|
66994
|
+
var t = reactExports.useRef(0), r = __read(reactExports.useState(e), 2), n = r[0], a = r[1], s = reactExports.useCallback(function(u) {
|
|
66995
|
+
cancelAnimationFrame(t.current), t.current = requestAnimationFrame(function() {
|
|
66996
|
+
a(u);
|
|
66997
|
+
});
|
|
66998
|
+
}, []);
|
|
66999
|
+
return useUnmount(function() {
|
|
67000
|
+
cancelAnimationFrame(t.current);
|
|
67001
|
+
}), [n, s];
|
|
67002
|
+
}
|
|
67003
|
+
var useEffectWithTarget = createEffectWithTarget(reactExports.useLayoutEffect), useIsomorphicLayoutEffectWithTarget = isBrowser ? useEffectWithTarget : useEffectWithTarget$1;
|
|
67004
|
+
function useSize(e) {
|
|
67005
|
+
var t = __read(useRafState(function() {
|
|
67006
|
+
var a = getTargetElement(e);
|
|
67007
|
+
return a ? {
|
|
67008
|
+
width: a.clientWidth,
|
|
67009
|
+
height: a.clientHeight
|
|
67010
|
+
} : void 0;
|
|
67011
|
+
}), 2), r = t[0], n = t[1];
|
|
67012
|
+
return useIsomorphicLayoutEffectWithTarget(function() {
|
|
67013
|
+
var a = getTargetElement(e);
|
|
67014
|
+
if (a) {
|
|
67015
|
+
var s = new index(function(u) {
|
|
67016
|
+
u.forEach(function(p) {
|
|
67017
|
+
var C = p.target, w = C.clientWidth, L = C.clientHeight;
|
|
67018
|
+
n({
|
|
67019
|
+
width: w,
|
|
67020
|
+
height: L
|
|
67021
|
+
});
|
|
67022
|
+
});
|
|
67023
|
+
});
|
|
67024
|
+
return s.observe(a), function() {
|
|
67025
|
+
s.disconnect();
|
|
67026
|
+
};
|
|
67027
|
+
}
|
|
67028
|
+
}, [], e), r;
|
|
67029
|
+
}
|
|
67030
|
+
const KgSqlClientEditor = reactExports.forwardRef((e, t) => {
|
|
67031
|
+
const [r, n] = reactExports.useState(""), a = reactExports.useRef(null);
|
|
67032
|
+
useKeyPress(["ctrl.shift.f7"], (u) => {
|
|
67033
|
+
console.log("333", u);
|
|
67034
|
+
});
|
|
67035
|
+
function s() {
|
|
67036
|
+
var p, C;
|
|
67037
|
+
const u = (C = (p = a.current) == null ? void 0 : p.resizableTextArea) == null ? void 0 : C.textArea;
|
|
67038
|
+
if (u) {
|
|
67039
|
+
const w = u.selectionStart, L = u.selectionEnd, G = u.value.substring(w, L);
|
|
67040
|
+
return G && G.trim().length > 0 ? G : r ?? "";
|
|
67041
|
+
}
|
|
67042
|
+
return "";
|
|
67043
|
+
}
|
|
67044
|
+
return reactExports.useImperativeHandle(t, () => ({ getSqlTextForExecute: s })), /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "editor", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67045
|
+
Input.TextArea,
|
|
67046
|
+
{
|
|
67047
|
+
ref: a,
|
|
67048
|
+
value: r,
|
|
67049
|
+
onChange: (u) => n(u.target.value)
|
|
67050
|
+
}
|
|
67051
|
+
) });
|
|
67052
|
+
});
|
|
66670
67053
|
function KgSqlClientResultTab({ executeResult: e, index: t }) {
|
|
66671
67054
|
var L, G;
|
|
66672
67055
|
const [r, n] = reactExports.useState(!1), [a, s] = reactExports.useState(null), u = a ?? e, p = ((L = u == null ? void 0 : u.columns) == null ? void 0 : L.map((te) => ({
|
|
@@ -66767,73 +67150,58 @@ function KgSqlClientResultTab({ executeResult: e, index: t }) {
|
|
|
66767
67150
|
] });
|
|
66768
67151
|
}
|
|
66769
67152
|
function KgSqlClient() {
|
|
66770
|
-
var
|
|
67153
|
+
var p;
|
|
66771
67154
|
const e = useSelector(kgOptionSelector);
|
|
66772
|
-
if (!(((
|
|
67155
|
+
if (!(((p = e == null ? void 0 : e.KgSqlClient) == null ? void 0 : p.isOn) !== !1))
|
|
66773
67156
|
return null;
|
|
66774
67157
|
const r = useID();
|
|
66775
67158
|
useKg(), doKgSqlClient(r);
|
|
66776
|
-
const [n, a] = reactExports.useState(
|
|
66777
|
-
async function
|
|
66778
|
-
|
|
66779
|
-
|
|
67159
|
+
const [n, a] = reactExports.useState([]), s = reactExports.useRef(null);
|
|
67160
|
+
async function u() {
|
|
67161
|
+
var L;
|
|
67162
|
+
const C = (L = s.current) == null ? void 0 : L.getSqlTextForExecute();
|
|
67163
|
+
if (!C)
|
|
66780
67164
|
return;
|
|
66781
|
-
const
|
|
66782
|
-
|
|
66783
|
-
}
|
|
66784
|
-
function w() {
|
|
66785
|
-
var te, oe;
|
|
66786
|
-
const G = (oe = (te = p.current) == null ? void 0 : te.resizableTextArea) == null ? void 0 : oe.textArea;
|
|
66787
|
-
if (G) {
|
|
66788
|
-
const ie = G.selectionStart, ue = G.selectionEnd, ae = G.value.substring(ie, ue);
|
|
66789
|
-
return ae && ae.trim().length > 0 ? ae : n ?? "";
|
|
66790
|
-
}
|
|
66791
|
-
return "";
|
|
67165
|
+
const w = await Execute({ data: new ExecuteQuery({ sql: C }) });
|
|
67166
|
+
a(w);
|
|
66792
67167
|
}
|
|
66793
67168
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
66794
67169
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "toolbar", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
66795
67170
|
Button$1,
|
|
66796
67171
|
{
|
|
66797
67172
|
type: "primary",
|
|
66798
|
-
onClick:
|
|
67173
|
+
onClick: u,
|
|
66799
67174
|
children: [
|
|
66800
67175
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Icon$2, { icon: "ant-design:caret-right-outlined" }),
|
|
66801
67176
|
/* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "kg.execute" })
|
|
66802
67177
|
]
|
|
66803
67178
|
}
|
|
66804
67179
|
) }),
|
|
66805
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66806
|
-
|
|
66807
|
-
{
|
|
66808
|
-
ref: p,
|
|
66809
|
-
value: n,
|
|
66810
|
-
onChange: (G) => a(G.target.value)
|
|
66811
|
-
}
|
|
66812
|
-
) }),
|
|
66813
|
-
s.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "result", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67180
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(KgSqlClientEditor, { ref: s }),
|
|
67181
|
+
n.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "result", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66814
67182
|
Tabs,
|
|
66815
67183
|
{
|
|
66816
67184
|
type: "editable-card",
|
|
66817
67185
|
hideAdd: !0,
|
|
66818
|
-
children:
|
|
67186
|
+
children: n.map((C, w) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66819
67187
|
Tabs.TabPane,
|
|
66820
67188
|
{
|
|
66821
67189
|
tab: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
66822
|
-
|
|
66823
|
-
!
|
|
67190
|
+
C.success && /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { status: "success" }),
|
|
67191
|
+
!C.success && /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { status: "error" }),
|
|
66824
67192
|
/* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "KgSqlClient.ResultTab.tabTitlePrefix" }),
|
|
66825
|
-
|
|
67193
|
+
w + 1
|
|
66826
67194
|
] }),
|
|
66827
67195
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66828
67196
|
KgSqlClientResultTab,
|
|
66829
67197
|
{
|
|
66830
|
-
executeResult:
|
|
66831
|
-
index:
|
|
67198
|
+
executeResult: C,
|
|
67199
|
+
index: w
|
|
66832
67200
|
},
|
|
66833
|
-
|
|
67201
|
+
w
|
|
66834
67202
|
)
|
|
66835
67203
|
},
|
|
66836
|
-
|
|
67204
|
+
w
|
|
66837
67205
|
))
|
|
66838
67206
|
}
|
|
66839
67207
|
) })
|
|
@@ -66859,7 +67227,7 @@ var assign = make_assign(), create$1 = make_create(), trim$1 = make_trim(), Glob
|
|
|
66859
67227
|
map,
|
|
66860
67228
|
pluck: pluck$1,
|
|
66861
67229
|
isList: isList$1,
|
|
66862
|
-
isFunction: isFunction$
|
|
67230
|
+
isFunction: isFunction$2,
|
|
66863
67231
|
isObject: isObject$2,
|
|
66864
67232
|
Global: Global$5
|
|
66865
67233
|
};
|
|
@@ -66926,13 +67294,13 @@ function pluck$1(e, t) {
|
|
|
66926
67294
|
function isList$1(e) {
|
|
66927
67295
|
return e != null && typeof e != "function" && typeof e.length == "number";
|
|
66928
67296
|
}
|
|
66929
|
-
function isFunction$
|
|
67297
|
+
function isFunction$2(e) {
|
|
66930
67298
|
return e && {}.toString.call(e) === "[object Function]";
|
|
66931
67299
|
}
|
|
66932
67300
|
function isObject$2(e) {
|
|
66933
67301
|
return e && {}.toString.call(e) === "[object Object]";
|
|
66934
67302
|
}
|
|
66935
|
-
var util$5 = util$6, slice = util$5.slice, pluck = util$5.pluck, each$6 = util$5.each, bind = util$5.bind, create = util$5.create, isList = util$5.isList, isFunction$
|
|
67303
|
+
var util$5 = util$6, slice = util$5.slice, pluck = util$5.pluck, each$6 = util$5.each, bind = util$5.bind, create = util$5.create, isList = util$5.isList, isFunction$1 = util$5.isFunction, isObject$1 = util$5.isObject, storeEngine = {
|
|
66936
67304
|
createStore
|
|
66937
67305
|
}, storeAPI = {
|
|
66938
67306
|
version: "2.0.12",
|
|
@@ -67051,13 +67419,13 @@ function createStore(e, t, r) {
|
|
|
67051
67419
|
return C === te;
|
|
67052
67420
|
});
|
|
67053
67421
|
if (!L) {
|
|
67054
|
-
if (this.plugins.push(C), !isFunction$
|
|
67422
|
+
if (this.plugins.push(C), !isFunction$1(C))
|
|
67055
67423
|
throw new Error("Plugins must be function values that return objects");
|
|
67056
67424
|
var G = C.call(this);
|
|
67057
67425
|
if (!isObject$1(G))
|
|
67058
67426
|
throw new Error("Plugins must return an object of function properties");
|
|
67059
67427
|
each$6(G, function(te, oe) {
|
|
67060
|
-
if (!isFunction$
|
|
67428
|
+
if (!isFunction$1(te))
|
|
67061
67429
|
throw new Error("Bad plugin property: " + oe + " from plugin " + C.name + ". Plugins should only return functions.");
|
|
67062
67430
|
w._assignPluginFnProp(te, oe);
|
|
67063
67431
|
});
|
|
@@ -67073,7 +67441,7 @@ function createStore(e, t, r) {
|
|
|
67073
67441
|
plugins: []
|
|
67074
67442
|
});
|
|
67075
67443
|
return p.raw = {}, each$6(p, function(C, w) {
|
|
67076
|
-
isFunction$
|
|
67444
|
+
isFunction$1(C) && (p.raw[w] = bind(p, C));
|
|
67077
67445
|
}), each$6(e, function(C) {
|
|
67078
67446
|
p._addStorage(C);
|
|
67079
67447
|
}), each$6(t, function(C) {
|
|
@@ -67615,7 +67983,7 @@ function isObject(e) {
|
|
|
67615
67983
|
return e != null && (t == "object" || t == "function");
|
|
67616
67984
|
}
|
|
67617
67985
|
var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
67618
|
-
function isFunction
|
|
67986
|
+
function isFunction(e) {
|
|
67619
67987
|
if (!isObject(e))
|
|
67620
67988
|
return !1;
|
|
67621
67989
|
var t = baseGetTag(e);
|
|
@@ -67648,7 +68016,7 @@ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reIsHostCtor = /^\[object .+?Construct
|
|
|
67648
68016
|
function baseIsNative(e) {
|
|
67649
68017
|
if (!isObject(e) || isMasked(e))
|
|
67650
68018
|
return !1;
|
|
67651
|
-
var t = isFunction
|
|
68019
|
+
var t = isFunction(e) ? reIsNative : reIsHostCtor;
|
|
67652
68020
|
return t.test(toSource(e));
|
|
67653
68021
|
}
|
|
67654
68022
|
function getValue(e, t) {
|
|
@@ -67724,7 +68092,7 @@ function isLength(e) {
|
|
|
67724
68092
|
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= MAX_SAFE_INTEGER;
|
|
67725
68093
|
}
|
|
67726
68094
|
function isArrayLike(e) {
|
|
67727
|
-
return e != null && isLength(e.length) && !isFunction
|
|
68095
|
+
return e != null && isLength(e.length) && !isFunction(e);
|
|
67728
68096
|
}
|
|
67729
68097
|
var objectProto$8 = Object.prototype;
|
|
67730
68098
|
function isPrototype(e) {
|
|
@@ -68271,366 +68639,6 @@ class KgUtil {
|
|
|
68271
68639
|
}
|
|
68272
68640
|
}
|
|
68273
68641
|
const KG_MODAL_BORDER_WIDTH = 1;
|
|
68274
|
-
var isFunction = function(e) {
|
|
68275
|
-
return typeof e == "function";
|
|
68276
|
-
}, isString = function(e) {
|
|
68277
|
-
return typeof e == "string";
|
|
68278
|
-
}, isNumber = function(e) {
|
|
68279
|
-
return typeof e == "number";
|
|
68280
|
-
}, isDev = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
|
|
68281
|
-
function depsAreSame(e, t) {
|
|
68282
|
-
if (e === t) return !0;
|
|
68283
|
-
for (var r = 0; r < e.length; r++)
|
|
68284
|
-
if (!Object.is(e[r], t[r])) return !1;
|
|
68285
|
-
return !0;
|
|
68286
|
-
}
|
|
68287
|
-
function useLatest(e) {
|
|
68288
|
-
var t = reactExports.useRef(e);
|
|
68289
|
-
return t.current = e, t;
|
|
68290
|
-
}
|
|
68291
|
-
var useUnmount = function(e) {
|
|
68292
|
-
isDev && (isFunction(e) || console.error("useUnmount expected parameter is a function, got ".concat(typeof e)));
|
|
68293
|
-
var t = useLatest(e);
|
|
68294
|
-
reactExports.useEffect(function() {
|
|
68295
|
-
return function() {
|
|
68296
|
-
t.current();
|
|
68297
|
-
};
|
|
68298
|
-
}, []);
|
|
68299
|
-
}, isBrowser = !!(typeof window < "u" && window.document && window.document.createElement);
|
|
68300
|
-
function getTargetElement(e, t) {
|
|
68301
|
-
if (isBrowser) {
|
|
68302
|
-
if (!e)
|
|
68303
|
-
return t;
|
|
68304
|
-
var r;
|
|
68305
|
-
return isFunction(e) ? r = e() : "current" in e ? r = e.current : r = e, r;
|
|
68306
|
-
}
|
|
68307
|
-
}
|
|
68308
|
-
var createEffectWithTarget = function(e) {
|
|
68309
|
-
var t = function(r, n, a) {
|
|
68310
|
-
var s = reactExports.useRef(!1), u = reactExports.useRef([]), p = reactExports.useRef([]), C = reactExports.useRef();
|
|
68311
|
-
e(function() {
|
|
68312
|
-
var w, L = Array.isArray(a) ? a : [a], G = L.map(function(te) {
|
|
68313
|
-
return getTargetElement(te);
|
|
68314
|
-
});
|
|
68315
|
-
if (!s.current) {
|
|
68316
|
-
s.current = !0, u.current = G, p.current = n, C.current = r();
|
|
68317
|
-
return;
|
|
68318
|
-
}
|
|
68319
|
-
(G.length !== u.current.length || !depsAreSame(u.current, G) || !depsAreSame(p.current, n)) && ((w = C.current) === null || w === void 0 || w.call(C), u.current = G, p.current = n, C.current = r());
|
|
68320
|
-
}), useUnmount(function() {
|
|
68321
|
-
var w;
|
|
68322
|
-
(w = C.current) === null || w === void 0 || w.call(C), s.current = !1;
|
|
68323
|
-
});
|
|
68324
|
-
};
|
|
68325
|
-
return t;
|
|
68326
|
-
}, useEffectWithTarget$1 = createEffectWithTarget(reactExports.useEffect), hasElementType = typeof Element < "u", hasMap = typeof Map == "function", hasSet = typeof Set == "function", hasArrayBuffer = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
|
|
68327
|
-
function equal(e, t) {
|
|
68328
|
-
if (e === t) return !0;
|
|
68329
|
-
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
68330
|
-
if (e.constructor !== t.constructor) return !1;
|
|
68331
|
-
var r, n, a;
|
|
68332
|
-
if (Array.isArray(e)) {
|
|
68333
|
-
if (r = e.length, r != t.length) return !1;
|
|
68334
|
-
for (n = r; n-- !== 0; )
|
|
68335
|
-
if (!equal(e[n], t[n])) return !1;
|
|
68336
|
-
return !0;
|
|
68337
|
-
}
|
|
68338
|
-
var s;
|
|
68339
|
-
if (hasMap && e instanceof Map && t instanceof Map) {
|
|
68340
|
-
if (e.size !== t.size) return !1;
|
|
68341
|
-
for (s = e.entries(); !(n = s.next()).done; )
|
|
68342
|
-
if (!t.has(n.value[0])) return !1;
|
|
68343
|
-
for (s = e.entries(); !(n = s.next()).done; )
|
|
68344
|
-
if (!equal(n.value[1], t.get(n.value[0]))) return !1;
|
|
68345
|
-
return !0;
|
|
68346
|
-
}
|
|
68347
|
-
if (hasSet && e instanceof Set && t instanceof Set) {
|
|
68348
|
-
if (e.size !== t.size) return !1;
|
|
68349
|
-
for (s = e.entries(); !(n = s.next()).done; )
|
|
68350
|
-
if (!t.has(n.value[0])) return !1;
|
|
68351
|
-
return !0;
|
|
68352
|
-
}
|
|
68353
|
-
if (hasArrayBuffer && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
|
|
68354
|
-
if (r = e.length, r != t.length) return !1;
|
|
68355
|
-
for (n = r; n-- !== 0; )
|
|
68356
|
-
if (e[n] !== t[n]) return !1;
|
|
68357
|
-
return !0;
|
|
68358
|
-
}
|
|
68359
|
-
if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
|
|
68360
|
-
if (e.valueOf !== Object.prototype.valueOf && typeof e.valueOf == "function" && typeof t.valueOf == "function") return e.valueOf() === t.valueOf();
|
|
68361
|
-
if (e.toString !== Object.prototype.toString && typeof e.toString == "function" && typeof t.toString == "function") return e.toString() === t.toString();
|
|
68362
|
-
if (a = Object.keys(e), r = a.length, r !== Object.keys(t).length) return !1;
|
|
68363
|
-
for (n = r; n-- !== 0; )
|
|
68364
|
-
if (!Object.prototype.hasOwnProperty.call(t, a[n])) return !1;
|
|
68365
|
-
if (hasElementType && e instanceof Element) return !1;
|
|
68366
|
-
for (n = r; n-- !== 0; )
|
|
68367
|
-
if (!((a[n] === "_owner" || a[n] === "__v" || a[n] === "__o") && e.$$typeof) && !equal(e[a[n]], t[a[n]]))
|
|
68368
|
-
return !1;
|
|
68369
|
-
return !0;
|
|
68370
|
-
}
|
|
68371
|
-
return e !== e && t !== t;
|
|
68372
|
-
}
|
|
68373
|
-
var reactFastCompare = function e(t, r) {
|
|
68374
|
-
try {
|
|
68375
|
-
return equal(t, r);
|
|
68376
|
-
} catch (n) {
|
|
68377
|
-
if ((n.message || "").match(/stack|recursion/i))
|
|
68378
|
-
return console.warn("react-fast-compare cannot handle circular refs"), !1;
|
|
68379
|
-
throw n;
|
|
68380
|
-
}
|
|
68381
|
-
};
|
|
68382
|
-
const isEqual = /* @__PURE__ */ getDefaultExportFromCjs(reactFastCompare);
|
|
68383
|
-
var depsEqual = function(e, t) {
|
|
68384
|
-
return e === void 0 && (e = []), t === void 0 && (t = []), isEqual(e, t);
|
|
68385
|
-
}, useDeepCompareEffectWithTarget = function(e, t, r) {
|
|
68386
|
-
var n = reactExports.useRef(), a = reactExports.useRef(0);
|
|
68387
|
-
depsEqual(t, n.current) || (a.current += 1), n.current = t, useEffectWithTarget$1(e, [a.current], r);
|
|
68388
|
-
}, isAppleDevice = /(mac|iphone|ipod|ipad)/i.test(typeof navigator < "u" ? navigator == null ? void 0 : navigator.platform : ""), aliasKeyCodeMap = {
|
|
68389
|
-
0: 48,
|
|
68390
|
-
1: 49,
|
|
68391
|
-
2: 50,
|
|
68392
|
-
3: 51,
|
|
68393
|
-
4: 52,
|
|
68394
|
-
5: 53,
|
|
68395
|
-
6: 54,
|
|
68396
|
-
7: 55,
|
|
68397
|
-
8: 56,
|
|
68398
|
-
9: 57,
|
|
68399
|
-
backspace: 8,
|
|
68400
|
-
tab: 9,
|
|
68401
|
-
enter: 13,
|
|
68402
|
-
shift: 16,
|
|
68403
|
-
ctrl: 17,
|
|
68404
|
-
alt: 18,
|
|
68405
|
-
pausebreak: 19,
|
|
68406
|
-
capslock: 20,
|
|
68407
|
-
esc: 27,
|
|
68408
|
-
space: 32,
|
|
68409
|
-
pageup: 33,
|
|
68410
|
-
pagedown: 34,
|
|
68411
|
-
end: 35,
|
|
68412
|
-
home: 36,
|
|
68413
|
-
leftarrow: 37,
|
|
68414
|
-
uparrow: 38,
|
|
68415
|
-
rightarrow: 39,
|
|
68416
|
-
downarrow: 40,
|
|
68417
|
-
insert: 45,
|
|
68418
|
-
delete: 46,
|
|
68419
|
-
a: 65,
|
|
68420
|
-
b: 66,
|
|
68421
|
-
c: 67,
|
|
68422
|
-
d: 68,
|
|
68423
|
-
e: 69,
|
|
68424
|
-
f: 70,
|
|
68425
|
-
g: 71,
|
|
68426
|
-
h: 72,
|
|
68427
|
-
i: 73,
|
|
68428
|
-
j: 74,
|
|
68429
|
-
k: 75,
|
|
68430
|
-
l: 76,
|
|
68431
|
-
m: 77,
|
|
68432
|
-
n: 78,
|
|
68433
|
-
o: 79,
|
|
68434
|
-
p: 80,
|
|
68435
|
-
q: 81,
|
|
68436
|
-
r: 82,
|
|
68437
|
-
s: 83,
|
|
68438
|
-
t: 84,
|
|
68439
|
-
u: 85,
|
|
68440
|
-
v: 86,
|
|
68441
|
-
w: 87,
|
|
68442
|
-
x: 88,
|
|
68443
|
-
y: 89,
|
|
68444
|
-
z: 90,
|
|
68445
|
-
leftwindowkey: 91,
|
|
68446
|
-
rightwindowkey: 92,
|
|
68447
|
-
meta: isAppleDevice ? [91, 93] : [91, 92],
|
|
68448
|
-
selectkey: 93,
|
|
68449
|
-
numpad0: 96,
|
|
68450
|
-
numpad1: 97,
|
|
68451
|
-
numpad2: 98,
|
|
68452
|
-
numpad3: 99,
|
|
68453
|
-
numpad4: 100,
|
|
68454
|
-
numpad5: 101,
|
|
68455
|
-
numpad6: 102,
|
|
68456
|
-
numpad7: 103,
|
|
68457
|
-
numpad8: 104,
|
|
68458
|
-
numpad9: 105,
|
|
68459
|
-
multiply: 106,
|
|
68460
|
-
add: 107,
|
|
68461
|
-
subtract: 109,
|
|
68462
|
-
decimalpoint: 110,
|
|
68463
|
-
divide: 111,
|
|
68464
|
-
f1: 112,
|
|
68465
|
-
f2: 113,
|
|
68466
|
-
f3: 114,
|
|
68467
|
-
f4: 115,
|
|
68468
|
-
f5: 116,
|
|
68469
|
-
f6: 117,
|
|
68470
|
-
f7: 118,
|
|
68471
|
-
f8: 119,
|
|
68472
|
-
f9: 120,
|
|
68473
|
-
f10: 121,
|
|
68474
|
-
f11: 122,
|
|
68475
|
-
f12: 123,
|
|
68476
|
-
numlock: 144,
|
|
68477
|
-
scrolllock: 145,
|
|
68478
|
-
semicolon: 186,
|
|
68479
|
-
equalsign: 187,
|
|
68480
|
-
comma: 188,
|
|
68481
|
-
dash: 189,
|
|
68482
|
-
period: 190,
|
|
68483
|
-
forwardslash: 191,
|
|
68484
|
-
graveaccent: 192,
|
|
68485
|
-
openbracket: 219,
|
|
68486
|
-
backslash: 220,
|
|
68487
|
-
closebracket: 221,
|
|
68488
|
-
singlequote: 222
|
|
68489
|
-
}, modifierKey = {
|
|
68490
|
-
ctrl: function(e) {
|
|
68491
|
-
return e.ctrlKey;
|
|
68492
|
-
},
|
|
68493
|
-
shift: function(e) {
|
|
68494
|
-
return e.shiftKey;
|
|
68495
|
-
},
|
|
68496
|
-
alt: function(e) {
|
|
68497
|
-
return e.altKey;
|
|
68498
|
-
},
|
|
68499
|
-
meta: function(e) {
|
|
68500
|
-
return e.type === "keyup" ? aliasKeyCodeMap.meta.includes(e.keyCode) : e.metaKey;
|
|
68501
|
-
}
|
|
68502
|
-
};
|
|
68503
|
-
function isValidKeyType(e) {
|
|
68504
|
-
return isString(e) || isNumber(e);
|
|
68505
|
-
}
|
|
68506
|
-
function countKeyByEvent(e) {
|
|
68507
|
-
var t = Object.keys(modifierKey).reduce(function(r, n) {
|
|
68508
|
-
return modifierKey[n](e) ? r + 1 : r;
|
|
68509
|
-
}, 0);
|
|
68510
|
-
return [16, 17, 18, 91, 92].includes(e.keyCode) ? t : t + 1;
|
|
68511
|
-
}
|
|
68512
|
-
function genFilterKey(e, t, r) {
|
|
68513
|
-
var n, a;
|
|
68514
|
-
if (!e.key)
|
|
68515
|
-
return !1;
|
|
68516
|
-
if (isNumber(t))
|
|
68517
|
-
return e.keyCode === t ? t : !1;
|
|
68518
|
-
var s = t.split("."), u = 0;
|
|
68519
|
-
try {
|
|
68520
|
-
for (var p = __values(s), C = p.next(); !C.done; C = p.next()) {
|
|
68521
|
-
var w = C.value, L = modifierKey[w], G = aliasKeyCodeMap[w.toLowerCase()];
|
|
68522
|
-
(L && L(e) || G && G === e.keyCode) && u++;
|
|
68523
|
-
}
|
|
68524
|
-
} catch (te) {
|
|
68525
|
-
n = {
|
|
68526
|
-
error: te
|
|
68527
|
-
};
|
|
68528
|
-
} finally {
|
|
68529
|
-
try {
|
|
68530
|
-
C && !C.done && (a = p.return) && a.call(p);
|
|
68531
|
-
} finally {
|
|
68532
|
-
if (n) throw n.error;
|
|
68533
|
-
}
|
|
68534
|
-
}
|
|
68535
|
-
return r ? u === s.length && countKeyByEvent(e) === s.length ? t : !1 : u === s.length ? t : !1;
|
|
68536
|
-
}
|
|
68537
|
-
function genKeyFormatter(e, t) {
|
|
68538
|
-
return isFunction(e) ? e : isValidKeyType(e) ? function(r) {
|
|
68539
|
-
return genFilterKey(r, e, t);
|
|
68540
|
-
} : Array.isArray(e) ? function(r) {
|
|
68541
|
-
return e.find(function(n) {
|
|
68542
|
-
return genFilterKey(r, n, t);
|
|
68543
|
-
});
|
|
68544
|
-
} : function() {
|
|
68545
|
-
return !!e;
|
|
68546
|
-
};
|
|
68547
|
-
}
|
|
68548
|
-
var defaultEvents = ["keydown"];
|
|
68549
|
-
function useKeyPress(e, t, r) {
|
|
68550
|
-
var n = {}, a = n.events, s = a === void 0 ? defaultEvents : a, u = n.target, p = n.exactMatch, C = p === void 0 ? !1 : p, w = n.useCapture, L = w === void 0 ? !1 : w, G = useLatest(t), te = useLatest(e);
|
|
68551
|
-
useDeepCompareEffectWithTarget(function() {
|
|
68552
|
-
var oe, ie, ue, ae = getTargetElement(u, window);
|
|
68553
|
-
if (ae) {
|
|
68554
|
-
var ut = function(ta) {
|
|
68555
|
-
var oa, ia = genKeyFormatter(te.current, C), ca = ia(ta), sa = isValidKeyType(ca) ? ca : ta.key;
|
|
68556
|
-
if (ca)
|
|
68557
|
-
return (oa = G.current) === null || oa === void 0 ? void 0 : oa.call(G, ta, sa);
|
|
68558
|
-
};
|
|
68559
|
-
try {
|
|
68560
|
-
for (var ea = __values(s), ct = ea.next(); !ct.done; ct = ea.next()) {
|
|
68561
|
-
var ra = ct.value;
|
|
68562
|
-
(ue = ae == null ? void 0 : ae.addEventListener) === null || ue === void 0 || ue.call(ae, ra, ut, L);
|
|
68563
|
-
}
|
|
68564
|
-
} catch (ta) {
|
|
68565
|
-
oe = {
|
|
68566
|
-
error: ta
|
|
68567
|
-
};
|
|
68568
|
-
} finally {
|
|
68569
|
-
try {
|
|
68570
|
-
ct && !ct.done && (ie = ea.return) && ie.call(ea);
|
|
68571
|
-
} finally {
|
|
68572
|
-
if (oe) throw oe.error;
|
|
68573
|
-
}
|
|
68574
|
-
}
|
|
68575
|
-
return function() {
|
|
68576
|
-
var ta, oa, ia;
|
|
68577
|
-
try {
|
|
68578
|
-
for (var ca = __values(s), sa = ca.next(); !sa.done; sa = ca.next()) {
|
|
68579
|
-
var ha = sa.value;
|
|
68580
|
-
(ia = ae == null ? void 0 : ae.removeEventListener) === null || ia === void 0 || ia.call(ae, ha, ut, L);
|
|
68581
|
-
}
|
|
68582
|
-
} catch (Sa) {
|
|
68583
|
-
ta = {
|
|
68584
|
-
error: Sa
|
|
68585
|
-
};
|
|
68586
|
-
} finally {
|
|
68587
|
-
try {
|
|
68588
|
-
sa && !sa.done && (oa = ca.return) && oa.call(ca);
|
|
68589
|
-
} finally {
|
|
68590
|
-
if (ta) throw ta.error;
|
|
68591
|
-
}
|
|
68592
|
-
}
|
|
68593
|
-
};
|
|
68594
|
-
}
|
|
68595
|
-
}, [s], u);
|
|
68596
|
-
}
|
|
68597
|
-
function useRafState(e) {
|
|
68598
|
-
var t = reactExports.useRef(0), r = __read(reactExports.useState(e), 2), n = r[0], a = r[1], s = reactExports.useCallback(function(u) {
|
|
68599
|
-
cancelAnimationFrame(t.current), t.current = requestAnimationFrame(function() {
|
|
68600
|
-
a(u);
|
|
68601
|
-
});
|
|
68602
|
-
}, []);
|
|
68603
|
-
return useUnmount(function() {
|
|
68604
|
-
cancelAnimationFrame(t.current);
|
|
68605
|
-
}), [n, s];
|
|
68606
|
-
}
|
|
68607
|
-
var useEffectWithTarget = createEffectWithTarget(reactExports.useLayoutEffect), useIsomorphicLayoutEffectWithTarget = isBrowser ? useEffectWithTarget : useEffectWithTarget$1;
|
|
68608
|
-
function useSize(e) {
|
|
68609
|
-
var t = __read(useRafState(function() {
|
|
68610
|
-
var a = getTargetElement(e);
|
|
68611
|
-
return a ? {
|
|
68612
|
-
width: a.clientWidth,
|
|
68613
|
-
height: a.clientHeight
|
|
68614
|
-
} : void 0;
|
|
68615
|
-
}), 2), r = t[0], n = t[1];
|
|
68616
|
-
return useIsomorphicLayoutEffectWithTarget(function() {
|
|
68617
|
-
var a = getTargetElement(e);
|
|
68618
|
-
if (a) {
|
|
68619
|
-
var s = new index(function(u) {
|
|
68620
|
-
u.forEach(function(p) {
|
|
68621
|
-
var C = p.target, w = C.clientWidth, L = C.clientHeight;
|
|
68622
|
-
n({
|
|
68623
|
-
width: w,
|
|
68624
|
-
height: L
|
|
68625
|
-
});
|
|
68626
|
-
});
|
|
68627
|
-
});
|
|
68628
|
-
return s.observe(a), function() {
|
|
68629
|
-
s.disconnect();
|
|
68630
|
-
};
|
|
68631
|
-
}
|
|
68632
|
-
}, [], e), r;
|
|
68633
|
-
}
|
|
68634
68642
|
function useDragToMove(e) {
|
|
68635
68643
|
const { domRef: t, kgIsDragToMove: r, open: n } = e ?? {}, { width: a, height: s } = useSize(document.documentElement) ?? { width: 0, height: 0 };
|
|
68636
68644
|
let u = 0, p = 0, C = 0, w = 0, L = 0, G = 0, te = 0, oe = 0, ie = {
|
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './KgSqlClient.css';
|
|
3
|
+
export interface KgSqlClientEditorRef {
|
|
4
|
+
/**
|
|
5
|
+
* 获取待执行的文本.
|
|
6
|
+
*/
|
|
7
|
+
getSqlTextForExecute: () => string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* SQL 客户端:编辑器.
|
|
11
|
+
*/
|
|
12
|
+
export declare const KgSqlClientEditor: React.ForwardRefExoticComponent<React.RefAttributes<KgSqlClientEditorRef>>;
|