@cloudtower/eagle 0.22.5 → 0.22.7
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/esm/index.js +336 -203
- package/dist/esm/stats1.html +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/spec/base.d.ts +6 -1
- package/dist/style.css +962 -979
- package/dist/umd/index.js +334 -200
- package/dist/umd/stats1.html +1 -1
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Checkbox as Checkbox$1, DatePicker, Select as Select$1, InputNumber as InputNumber$1, Input as Input$1, TimePicker as TimePicker$1,
|
|
1
|
+
import { Button as Button$1, Checkbox as Checkbox$1, DatePicker, Select as Select$1, InputNumber as InputNumber$1, Input as Input$1, TimePicker as TimePicker$1, Modal as Modal$1, Steps, Radio as Radio$1, Table as Table$1, Tooltip as Tooltip$1, Tag, Dropdown, Divider, List, Menu, AutoComplete, Space } from 'antd';
|
|
2
2
|
import cs from 'classnames';
|
|
3
|
-
import React, { Fragment, useMemo, useRef, useEffect,
|
|
3
|
+
import React, { useState, Fragment, useMemo, useRef, useEffect, useCallback, useLayoutEffect, createContext, useContext } from 'react';
|
|
4
4
|
import moment from 'moment';
|
|
5
5
|
import _, { sortBy, uniqBy } from 'lodash';
|
|
6
6
|
import { findDOMNode } from 'react-dom';
|
|
@@ -146,6 +146,92 @@ const Typo = {
|
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
|
|
149
|
+
const HoverableElement = (props) => {
|
|
150
|
+
const { className, hover = false, icon, hoverEle } = props;
|
|
151
|
+
if (hover) {
|
|
152
|
+
return hoverEle != null ? React.cloneElement(hoverEle, { className }) : null;
|
|
153
|
+
}
|
|
154
|
+
return icon != null ? React.cloneElement(icon, { className }) : null;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
var __defProp$s = Object.defineProperty;
|
|
158
|
+
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
159
|
+
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
160
|
+
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
161
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, {
|
|
162
|
+
enumerable: true,
|
|
163
|
+
configurable: true,
|
|
164
|
+
writable: true,
|
|
165
|
+
value
|
|
166
|
+
}) : obj[key] = value;
|
|
167
|
+
var __spreadValues$s = (a, b) => {
|
|
168
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$t.call(b, prop)) __defNormalProp$s(a, prop, b[prop]);
|
|
169
|
+
if (__getOwnPropSymbols$t) for (var prop of __getOwnPropSymbols$t(b)) {
|
|
170
|
+
if (__propIsEnum$t.call(b, prop)) __defNormalProp$s(a, prop, b[prop]);
|
|
171
|
+
}
|
|
172
|
+
return a;
|
|
173
|
+
};
|
|
174
|
+
var __objRest$n = (source, exclude) => {
|
|
175
|
+
var target = {};
|
|
176
|
+
for (var prop in source) if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
177
|
+
if (source != null && __getOwnPropSymbols$t) for (var prop of __getOwnPropSymbols$t(source)) {
|
|
178
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop)) target[prop] = source[prop];
|
|
179
|
+
}
|
|
180
|
+
return target;
|
|
181
|
+
};
|
|
182
|
+
const ButtonStyle$1 = "buj61ew";
|
|
183
|
+
const NoPadding = "nchllas";
|
|
184
|
+
const isAntdButtonTypes = type => {
|
|
185
|
+
return Boolean(type && ["default", "primary", "ghost", "dashed", "link", "text"].includes(type));
|
|
186
|
+
};
|
|
187
|
+
const Button = React.forwardRef((props, ref) => {
|
|
188
|
+
const _a = props,
|
|
189
|
+
{
|
|
190
|
+
type,
|
|
191
|
+
className,
|
|
192
|
+
children,
|
|
193
|
+
prefixIcon,
|
|
194
|
+
hoverPrefixIcon,
|
|
195
|
+
suffixIcon,
|
|
196
|
+
hoverSuffixIcon,
|
|
197
|
+
onMouseEnter,
|
|
198
|
+
onMouseLeave,
|
|
199
|
+
size = "middle"
|
|
200
|
+
} = _a,
|
|
201
|
+
restProps = __objRest$n(_a, ["type", "className", "children", "prefixIcon", "hoverPrefixIcon", "suffixIcon", "hoverSuffixIcon", "onMouseEnter", "onMouseLeave", "size"]);
|
|
202
|
+
const [status, setStatus] = useState("normal");
|
|
203
|
+
const hasIcon = prefixIcon || suffixIcon;
|
|
204
|
+
const hasHoverIcon = hoverPrefixIcon || hoverSuffixIcon;
|
|
205
|
+
return /* @__PURE__ */React.createElement(Button$1, __spreadValues$s({
|
|
206
|
+
ref,
|
|
207
|
+
className: cs(className, ButtonStyle$1, type === "link" && NoPadding, (prefixIcon || suffixIcon) && "has-icon", size === "large" && Typo.Label.l1_regular_title, size === "middle" && Typo.Label.l2_regular_title, size === "small" && Typo.Label.l3_regular_title, type && `ant-btn-${type}`, !children && children !== 0 && restProps.icon && "ant-btn-icon-only"),
|
|
208
|
+
type: isAntdButtonTypes(type) ? type : void 0,
|
|
209
|
+
onMouseEnter: e => {
|
|
210
|
+
onMouseEnter == null ? void 0 : onMouseEnter(e);
|
|
211
|
+
if (hasIcon && hasHoverIcon) {
|
|
212
|
+
setStatus("hover");
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
onMouseLeave: e => {
|
|
216
|
+
onMouseLeave == null ? void 0 : onMouseLeave(e);
|
|
217
|
+
if (hasIcon && hasHoverIcon) {
|
|
218
|
+
setStatus("normal");
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
size
|
|
222
|
+
}, restProps), prefixIcon && /* @__PURE__ */React.createElement(HoverableElement, {
|
|
223
|
+
icon: prefixIcon,
|
|
224
|
+
hoverEle: hoverPrefixIcon,
|
|
225
|
+
hover: status === "hover",
|
|
226
|
+
className: "button-prefix-icon"
|
|
227
|
+
}), children, suffixIcon && /* @__PURE__ */React.createElement(HoverableElement, {
|
|
228
|
+
icon: suffixIcon,
|
|
229
|
+
hoverEle: hoverSuffixIcon,
|
|
230
|
+
hover: status === "hover",
|
|
231
|
+
className: "button-suffix-icon"
|
|
232
|
+
}));
|
|
233
|
+
});
|
|
234
|
+
|
|
149
235
|
var __defProp$r = Object.defineProperty;
|
|
150
236
|
var __defProps$k = Object.defineProperties;
|
|
151
237
|
var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
|
|
@@ -1166,6 +1252,9 @@ const MINUTE = 60 * SECOND;
|
|
|
1166
1252
|
const HOUR = 60 * MINUTE;
|
|
1167
1253
|
const DAY = 24 * HOUR;
|
|
1168
1254
|
|
|
1255
|
+
const EMPTY_FUNCTION = () => {
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1169
1258
|
function getSize(el) {
|
|
1170
1259
|
if (!el) {
|
|
1171
1260
|
return {
|
|
@@ -2176,92 +2265,6 @@ function closeModal(id) {
|
|
|
2176
2265
|
});
|
|
2177
2266
|
}
|
|
2178
2267
|
|
|
2179
|
-
const HoverableElement = (props) => {
|
|
2180
|
-
const { className, hover = false, icon, hoverEle } = props;
|
|
2181
|
-
if (hover) {
|
|
2182
|
-
return hoverEle != null ? React.cloneElement(hoverEle, { className }) : null;
|
|
2183
|
-
}
|
|
2184
|
-
return icon != null ? React.cloneElement(icon, { className }) : null;
|
|
2185
|
-
};
|
|
2186
|
-
|
|
2187
|
-
var __defProp$5 = Object.defineProperty;
|
|
2188
|
-
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
2189
|
-
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
2190
|
-
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
2191
|
-
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, {
|
|
2192
|
-
enumerable: true,
|
|
2193
|
-
configurable: true,
|
|
2194
|
-
writable: true,
|
|
2195
|
-
value
|
|
2196
|
-
}) : obj[key] = value;
|
|
2197
|
-
var __spreadValues$5 = (a, b) => {
|
|
2198
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$5.call(b, prop)) __defNormalProp$5(a, prop, b[prop]);
|
|
2199
|
-
if (__getOwnPropSymbols$5) for (var prop of __getOwnPropSymbols$5(b)) {
|
|
2200
|
-
if (__propIsEnum$5.call(b, prop)) __defNormalProp$5(a, prop, b[prop]);
|
|
2201
|
-
}
|
|
2202
|
-
return a;
|
|
2203
|
-
};
|
|
2204
|
-
var __objRest$4 = (source, exclude) => {
|
|
2205
|
-
var target = {};
|
|
2206
|
-
for (var prop in source) if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
2207
|
-
if (source != null && __getOwnPropSymbols$5) for (var prop of __getOwnPropSymbols$5(source)) {
|
|
2208
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop)) target[prop] = source[prop];
|
|
2209
|
-
}
|
|
2210
|
-
return target;
|
|
2211
|
-
};
|
|
2212
|
-
const ButtonStyle$1 = "buj61ew";
|
|
2213
|
-
const NoPadding = "nchllas";
|
|
2214
|
-
const isAntdButtonTypes = type => {
|
|
2215
|
-
return Boolean(type && ["default", "primary", "ghost", "dashed", "link", "text"].includes(type));
|
|
2216
|
-
};
|
|
2217
|
-
const Button = React.forwardRef((props, ref) => {
|
|
2218
|
-
const _a = props,
|
|
2219
|
-
{
|
|
2220
|
-
type,
|
|
2221
|
-
className,
|
|
2222
|
-
children,
|
|
2223
|
-
prefixIcon,
|
|
2224
|
-
hoverPrefixIcon,
|
|
2225
|
-
suffixIcon,
|
|
2226
|
-
hoverSuffixIcon,
|
|
2227
|
-
onMouseEnter,
|
|
2228
|
-
onMouseLeave,
|
|
2229
|
-
size = "middle"
|
|
2230
|
-
} = _a,
|
|
2231
|
-
restProps = __objRest$4(_a, ["type", "className", "children", "prefixIcon", "hoverPrefixIcon", "suffixIcon", "hoverSuffixIcon", "onMouseEnter", "onMouseLeave", "size"]);
|
|
2232
|
-
const [status, setStatus] = useState("normal");
|
|
2233
|
-
const hasIcon = prefixIcon || suffixIcon;
|
|
2234
|
-
const hasHoverIcon = hoverPrefixIcon || hoverSuffixIcon;
|
|
2235
|
-
return /* @__PURE__ */React.createElement(Button$1, __spreadValues$5({
|
|
2236
|
-
ref,
|
|
2237
|
-
className: cs(className, ButtonStyle$1, type === "link" && NoPadding, (prefixIcon || suffixIcon) && "has-icon", size === "large" && Typo.Label.l1_regular_title, size === "middle" && Typo.Label.l2_regular_title, size === "small" && Typo.Label.l3_regular_title, type && `ant-btn-${type}`, !children && children !== 0 && restProps.icon && "ant-btn-icon-only"),
|
|
2238
|
-
type: isAntdButtonTypes(type) ? type : void 0,
|
|
2239
|
-
onMouseEnter: e => {
|
|
2240
|
-
onMouseEnter == null ? void 0 : onMouseEnter(e);
|
|
2241
|
-
if (hasIcon && hasHoverIcon) {
|
|
2242
|
-
setStatus("hover");
|
|
2243
|
-
}
|
|
2244
|
-
},
|
|
2245
|
-
onMouseLeave: e => {
|
|
2246
|
-
onMouseLeave == null ? void 0 : onMouseLeave(e);
|
|
2247
|
-
if (hasIcon && hasHoverIcon) {
|
|
2248
|
-
setStatus("normal");
|
|
2249
|
-
}
|
|
2250
|
-
},
|
|
2251
|
-
size
|
|
2252
|
-
}, restProps), prefixIcon && /* @__PURE__ */React.createElement(HoverableElement, {
|
|
2253
|
-
icon: prefixIcon,
|
|
2254
|
-
hoverEle: hoverPrefixIcon,
|
|
2255
|
-
hover: status === "hover",
|
|
2256
|
-
className: "button-prefix-icon"
|
|
2257
|
-
}), children, suffixIcon && /* @__PURE__ */React.createElement(HoverableElement, {
|
|
2258
|
-
icon: suffixIcon,
|
|
2259
|
-
hoverEle: hoverSuffixIcon,
|
|
2260
|
-
hover: status === "hover",
|
|
2261
|
-
className: "button-suffix-icon"
|
|
2262
|
-
}));
|
|
2263
|
-
});
|
|
2264
|
-
|
|
2265
2268
|
const ctx = createContext({
|
|
2266
2269
|
store,
|
|
2267
2270
|
storeState: store.getState()
|
|
@@ -2273,33 +2276,33 @@ const KitStoreProvider = (props) => {
|
|
|
2273
2276
|
const useKitDispatch = createDispatchHook(ctx);
|
|
2274
2277
|
const useKitSelector = createSelectorHook(ctx);
|
|
2275
2278
|
|
|
2276
|
-
var __defProp$
|
|
2279
|
+
var __defProp$5 = Object.defineProperty;
|
|
2277
2280
|
var __defProps$2 = Object.defineProperties;
|
|
2278
2281
|
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
2279
|
-
var __getOwnPropSymbols$
|
|
2280
|
-
var __hasOwnProp$
|
|
2281
|
-
var __propIsEnum$
|
|
2282
|
-
var __defNormalProp$
|
|
2283
|
-
var __spreadValues$
|
|
2282
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
2283
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
2284
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
2285
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2286
|
+
var __spreadValues$5 = (a, b) => {
|
|
2284
2287
|
for (var prop in b || (b = {}))
|
|
2285
|
-
if (__hasOwnProp$
|
|
2286
|
-
__defNormalProp$
|
|
2287
|
-
if (__getOwnPropSymbols$
|
|
2288
|
-
for (var prop of __getOwnPropSymbols$
|
|
2289
|
-
if (__propIsEnum$
|
|
2290
|
-
__defNormalProp$
|
|
2288
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
2289
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
2290
|
+
if (__getOwnPropSymbols$5)
|
|
2291
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
2292
|
+
if (__propIsEnum$5.call(b, prop))
|
|
2293
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
2291
2294
|
}
|
|
2292
2295
|
return a;
|
|
2293
2296
|
};
|
|
2294
2297
|
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
2295
|
-
var __objRest$
|
|
2298
|
+
var __objRest$4 = (source, exclude) => {
|
|
2296
2299
|
var target = {};
|
|
2297
2300
|
for (var prop in source)
|
|
2298
|
-
if (__hasOwnProp$
|
|
2301
|
+
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2299
2302
|
target[prop] = source[prop];
|
|
2300
|
-
if (source != null && __getOwnPropSymbols$
|
|
2301
|
-
for (var prop of __getOwnPropSymbols$
|
|
2302
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2303
|
+
if (source != null && __getOwnPropSymbols$5)
|
|
2304
|
+
for (var prop of __getOwnPropSymbols$5(source)) {
|
|
2305
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
|
|
2303
2306
|
target[prop] = source[prop];
|
|
2304
2307
|
}
|
|
2305
2308
|
return target;
|
|
@@ -2325,7 +2328,7 @@ const Modal = (props) => {
|
|
|
2325
2328
|
showCancel = true,
|
|
2326
2329
|
showOk = true,
|
|
2327
2330
|
afterClose
|
|
2328
|
-
} = _a, restProps = __objRest$
|
|
2331
|
+
} = _a, restProps = __objRest$4(_a, [
|
|
2329
2332
|
"error",
|
|
2330
2333
|
"okText",
|
|
2331
2334
|
"cancelText",
|
|
@@ -2380,7 +2383,7 @@ const Modal = (props) => {
|
|
|
2380
2383
|
}
|
|
2381
2384
|
return /* @__PURE__ */ React.createElement(
|
|
2382
2385
|
Modal$1,
|
|
2383
|
-
__spreadProps$2(__spreadValues$
|
|
2386
|
+
__spreadProps$2(__spreadValues$5({
|
|
2384
2387
|
maskClosable,
|
|
2385
2388
|
className: cs(
|
|
2386
2389
|
className,
|
|
@@ -2415,7 +2418,7 @@ const Modal = (props) => {
|
|
|
2415
2418
|
prevText
|
|
2416
2419
|
), error && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "modal-error" }, error))), /* @__PURE__ */ React.createElement("div", { className: "modal-footer-btn-group" }, showCancel && /* @__PURE__ */ React.createElement(
|
|
2417
2420
|
Button,
|
|
2418
|
-
__spreadValues$
|
|
2421
|
+
__spreadValues$5({
|
|
2419
2422
|
type: "quiet",
|
|
2420
2423
|
onMouseDown: (e) => {
|
|
2421
2424
|
e.preventDefault();
|
|
@@ -2429,7 +2432,7 @@ const Modal = (props) => {
|
|
|
2429
2432
|
cancelText
|
|
2430
2433
|
), showOk && /* @__PURE__ */ React.createElement(
|
|
2431
2434
|
Button,
|
|
2432
|
-
__spreadValues$
|
|
2435
|
+
__spreadValues$5({
|
|
2433
2436
|
onClick: (e) => {
|
|
2434
2437
|
var _a2, _b2;
|
|
2435
2438
|
onOk == null ? void 0 : onOk(e);
|
|
@@ -2476,6 +2479,133 @@ const Modal = (props) => {
|
|
|
2476
2479
|
);
|
|
2477
2480
|
};
|
|
2478
2481
|
|
|
2482
|
+
var __defProp$4 = Object.defineProperty;
|
|
2483
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
2484
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
2485
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
2486
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, {
|
|
2487
|
+
enumerable: true,
|
|
2488
|
+
configurable: true,
|
|
2489
|
+
writable: true,
|
|
2490
|
+
value
|
|
2491
|
+
}) : obj[key] = value;
|
|
2492
|
+
var __spreadValues$4 = (a, b) => {
|
|
2493
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$4.call(b, prop)) __defNormalProp$4(a, prop, b[prop]);
|
|
2494
|
+
if (__getOwnPropSymbols$4) for (var prop of __getOwnPropSymbols$4(b)) {
|
|
2495
|
+
if (__propIsEnum$4.call(b, prop)) __defNormalProp$4(a, prop, b[prop]);
|
|
2496
|
+
}
|
|
2497
|
+
return a;
|
|
2498
|
+
};
|
|
2499
|
+
var __objRest$3 = (source, exclude) => {
|
|
2500
|
+
var target = {};
|
|
2501
|
+
for (var prop in source) if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
2502
|
+
if (source != null && __getOwnPropSymbols$4) for (var prop of __getOwnPropSymbols$4(source)) {
|
|
2503
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop)) target[prop] = source[prop];
|
|
2504
|
+
}
|
|
2505
|
+
return target;
|
|
2506
|
+
};
|
|
2507
|
+
const RadioStyle = "rxbeqvl";
|
|
2508
|
+
const RadioGroupStyle = "r5ie79y";
|
|
2509
|
+
const RadioButtonStyle = "r1f0aqcc";
|
|
2510
|
+
const KitRadioGroupContext = React.createContext({});
|
|
2511
|
+
const Radio = _a => {
|
|
2512
|
+
var _b = _a,
|
|
2513
|
+
{
|
|
2514
|
+
children,
|
|
2515
|
+
className,
|
|
2516
|
+
checked,
|
|
2517
|
+
compact = false
|
|
2518
|
+
} = _b,
|
|
2519
|
+
props = __objRest$3(_b, ["children", "className", "checked", "compact"]);
|
|
2520
|
+
const {
|
|
2521
|
+
description
|
|
2522
|
+
} = props;
|
|
2523
|
+
const context = React.useContext(KitRadioGroupContext);
|
|
2524
|
+
if (description) {
|
|
2525
|
+
children = /* @__PURE__ */React.createElement(React.Fragment, null, children, /* @__PURE__ */React.createElement("div", {
|
|
2526
|
+
className: cx("radio-description", Typo.Label.l4_regular)
|
|
2527
|
+
}, description));
|
|
2528
|
+
}
|
|
2529
|
+
return /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(Radio$1, __spreadValues$4({
|
|
2530
|
+
className: cx(className, RadioStyle, compact && "compact"),
|
|
2531
|
+
checked: checked || false,
|
|
2532
|
+
"data-test": context.name ? `${context.name}-${String(props.value)}` : String(props.value)
|
|
2533
|
+
}, props), children ? children : null));
|
|
2534
|
+
};
|
|
2535
|
+
const RadioGroup = _c => {
|
|
2536
|
+
var _d = _c,
|
|
2537
|
+
{
|
|
2538
|
+
children,
|
|
2539
|
+
className
|
|
2540
|
+
} = _d,
|
|
2541
|
+
props = __objRest$3(_d, ["children", "className"]);
|
|
2542
|
+
return /* @__PURE__ */React.createElement(KitRadioGroupContext.Provider, {
|
|
2543
|
+
value: {
|
|
2544
|
+
disabled: props.disabled,
|
|
2545
|
+
name: props.name
|
|
2546
|
+
}
|
|
2547
|
+
}, /* @__PURE__ */React.createElement(Radio$1.Group, __spreadValues$4({
|
|
2548
|
+
className: cx(className, RadioGroupStyle)
|
|
2549
|
+
}, props), children ? children : null));
|
|
2550
|
+
};
|
|
2551
|
+
const RadioButton = _e => {
|
|
2552
|
+
var _f = _e,
|
|
2553
|
+
{
|
|
2554
|
+
children,
|
|
2555
|
+
className
|
|
2556
|
+
} = _f,
|
|
2557
|
+
props = __objRest$3(_f, ["children", "className"]);
|
|
2558
|
+
const {
|
|
2559
|
+
type,
|
|
2560
|
+
placeholder = "Label",
|
|
2561
|
+
onInputChange = EMPTY_FUNCTION,
|
|
2562
|
+
min,
|
|
2563
|
+
max,
|
|
2564
|
+
precision,
|
|
2565
|
+
initialValue
|
|
2566
|
+
} = props;
|
|
2567
|
+
const [inputValue, setInputValue] = useState(initialValue);
|
|
2568
|
+
const radioButtonValue = type === "input" || type === "input-number" ? inputValue : props.value;
|
|
2569
|
+
const radioGroupContext = React.useContext(KitRadioGroupContext);
|
|
2570
|
+
const renderInput = () => {
|
|
2571
|
+
const inputDisabled = props.disabled || (radioGroupContext == null ? void 0 : radioGroupContext.disabled);
|
|
2572
|
+
if (type === "input-number") return /* @__PURE__ */React.createElement(InputNumber$1, {
|
|
2573
|
+
className: "ant-radio-button-input",
|
|
2574
|
+
placeholder,
|
|
2575
|
+
disabled: inputDisabled,
|
|
2576
|
+
value: !_.isNil(inputValue) ? Number(inputValue) : void 0,
|
|
2577
|
+
min,
|
|
2578
|
+
max,
|
|
2579
|
+
precision,
|
|
2580
|
+
onChange: value => {
|
|
2581
|
+
const val = value || 0;
|
|
2582
|
+
setInputValue(val);
|
|
2583
|
+
onInputChange(val);
|
|
2584
|
+
}
|
|
2585
|
+
});
|
|
2586
|
+
return /* @__PURE__ */React.createElement(Input$1, {
|
|
2587
|
+
className: "ant-radio-button-input",
|
|
2588
|
+
placeholder,
|
|
2589
|
+
disabled: inputDisabled,
|
|
2590
|
+
value: inputValue,
|
|
2591
|
+
onChange: e => {
|
|
2592
|
+
setInputValue(e.target.value);
|
|
2593
|
+
onInputChange(e.target.value);
|
|
2594
|
+
}
|
|
2595
|
+
});
|
|
2596
|
+
};
|
|
2597
|
+
const renderChildren = () => {
|
|
2598
|
+
if (type !== "input" && type !== "input-number") return children ? children : null;
|
|
2599
|
+
return /* @__PURE__ */React.createElement(React.Fragment, null, renderInput(), /* @__PURE__ */React.createElement("span", {
|
|
2600
|
+
className: "ant-radio-button-input-label"
|
|
2601
|
+
}, typeof children === "string" ? children : ""));
|
|
2602
|
+
};
|
|
2603
|
+
return /* @__PURE__ */React.createElement(Radio$1.Button, __spreadValues$4({
|
|
2604
|
+
className: cx(className, RadioButtonStyle),
|
|
2605
|
+
value: radioButtonValue
|
|
2606
|
+
}, props), renderChildren());
|
|
2607
|
+
};
|
|
2608
|
+
|
|
2479
2609
|
var __defProp$3 = Object.defineProperty;
|
|
2480
2610
|
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
2481
2611
|
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
@@ -2753,6 +2883,97 @@ const Table = props => {
|
|
|
2753
2883
|
}));
|
|
2754
2884
|
};
|
|
2755
2885
|
|
|
2886
|
+
var __defProp$1 = Object.defineProperty;
|
|
2887
|
+
var __defProps = Object.defineProperties;
|
|
2888
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2889
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
2890
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
2891
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
2892
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2893
|
+
var __spreadValues$1 = (a, b) => {
|
|
2894
|
+
for (var prop in b || (b = {}))
|
|
2895
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
2896
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2897
|
+
if (__getOwnPropSymbols$1)
|
|
2898
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
2899
|
+
if (__propIsEnum$1.call(b, prop))
|
|
2900
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
2901
|
+
}
|
|
2902
|
+
return a;
|
|
2903
|
+
};
|
|
2904
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2905
|
+
var __objRest$1 = (source, exclude) => {
|
|
2906
|
+
var target = {};
|
|
2907
|
+
for (var prop in source)
|
|
2908
|
+
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2909
|
+
target[prop] = source[prop];
|
|
2910
|
+
if (source != null && __getOwnPropSymbols$1)
|
|
2911
|
+
for (var prop of __getOwnPropSymbols$1(source)) {
|
|
2912
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
|
|
2913
|
+
target[prop] = source[prop];
|
|
2914
|
+
}
|
|
2915
|
+
return target;
|
|
2916
|
+
};
|
|
2917
|
+
let componentId = 0;
|
|
2918
|
+
const Tooltip = (props) => {
|
|
2919
|
+
const _a = props, {
|
|
2920
|
+
followMouse,
|
|
2921
|
+
overlayClassName,
|
|
2922
|
+
overlayStyle,
|
|
2923
|
+
children
|
|
2924
|
+
} = _a, restProps = __objRest$1(_a, [
|
|
2925
|
+
"followMouse",
|
|
2926
|
+
"overlayClassName",
|
|
2927
|
+
"overlayStyle",
|
|
2928
|
+
"children"
|
|
2929
|
+
]);
|
|
2930
|
+
const id = useRef(++componentId);
|
|
2931
|
+
const uniquePopupClass = `kit-popup-${id.current}`;
|
|
2932
|
+
const uniqueContainerClass = `kit-tooltip-${id.current}`;
|
|
2933
|
+
const _children = useMemo(() => {
|
|
2934
|
+
if (followMouse) {
|
|
2935
|
+
const child = React.isValidElement(children) ? children : /* @__PURE__ */ React.createElement("span", null, children);
|
|
2936
|
+
return React.cloneElement(child, {
|
|
2937
|
+
className: cs(child.props.className, uniqueContainerClass)
|
|
2938
|
+
});
|
|
2939
|
+
} else {
|
|
2940
|
+
return children;
|
|
2941
|
+
}
|
|
2942
|
+
}, [children, followMouse, uniqueContainerClass]);
|
|
2943
|
+
const onmousemove = useCallback(
|
|
2944
|
+
(event) => {
|
|
2945
|
+
const popup = document.querySelector(`.${uniquePopupClass}`);
|
|
2946
|
+
if (!popup)
|
|
2947
|
+
return;
|
|
2948
|
+
popup.style.left = event.pageX + "px";
|
|
2949
|
+
popup.style.top = event.pageY + "px";
|
|
2950
|
+
},
|
|
2951
|
+
[uniquePopupClass]
|
|
2952
|
+
);
|
|
2953
|
+
useEffect(() => {
|
|
2954
|
+
if (followMouse) {
|
|
2955
|
+
const container = document.querySelector(
|
|
2956
|
+
`.${uniqueContainerClass}`
|
|
2957
|
+
);
|
|
2958
|
+
container == null ? void 0 : container.addEventListener("mousemove", onmousemove);
|
|
2959
|
+
return () => {
|
|
2960
|
+
container == null ? void 0 : container.removeEventListener("mousemove", onmousemove);
|
|
2961
|
+
};
|
|
2962
|
+
}
|
|
2963
|
+
}, [followMouse, onmousemove, uniqueContainerClass]);
|
|
2964
|
+
return /* @__PURE__ */ React.createElement(
|
|
2965
|
+
Tooltip$1,
|
|
2966
|
+
__spreadProps(__spreadValues$1({}, restProps), {
|
|
2967
|
+
overlayClassName: followMouse ? cs(overlayClassName, uniquePopupClass) : overlayClassName,
|
|
2968
|
+
children: _children,
|
|
2969
|
+
overlayStyle: followMouse ? __spreadValues$1({
|
|
2970
|
+
transform: "translate(-50%, -100%)",
|
|
2971
|
+
pointerEvents: "none"
|
|
2972
|
+
}, overlayStyle) : overlayStyle
|
|
2973
|
+
})
|
|
2974
|
+
);
|
|
2975
|
+
};
|
|
2976
|
+
|
|
2756
2977
|
const flatTimeZones = sortBy(uniqBy(TimeZones.reduce((sum, zone) => {
|
|
2757
2978
|
const utcZones = zone.utc.map(utc => {
|
|
2758
2979
|
return {
|
|
@@ -2870,14 +3091,19 @@ function getAntdKit() {
|
|
|
2870
3091
|
select: Select,
|
|
2871
3092
|
option: Select$1.Option,
|
|
2872
3093
|
table: Table,
|
|
3094
|
+
button: Button,
|
|
2873
3095
|
modal: Modal,
|
|
2874
3096
|
dropdown: Dropdown,
|
|
3097
|
+
tooltip: Tooltip,
|
|
2875
3098
|
input: Input,
|
|
2876
3099
|
textArea: TextArea,
|
|
2877
3100
|
checkbox: Checkbox,
|
|
2878
3101
|
fields,
|
|
2879
3102
|
inputGroup: InputGroup,
|
|
2880
3103
|
searchInput: SearchInput,
|
|
3104
|
+
radio: Radio,
|
|
3105
|
+
radioGroup: RadioGroup,
|
|
3106
|
+
radioButton: RadioButton,
|
|
2881
3107
|
divider: Divider,
|
|
2882
3108
|
list: List,
|
|
2883
3109
|
listItem: List.Item,
|
|
@@ -2894,97 +3120,6 @@ function getAntdKit() {
|
|
|
2894
3120
|
}
|
|
2895
3121
|
const antdKit = getAntdKit();
|
|
2896
3122
|
|
|
2897
|
-
var __defProp$1 = Object.defineProperty;
|
|
2898
|
-
var __defProps = Object.defineProperties;
|
|
2899
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2900
|
-
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
2901
|
-
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
2902
|
-
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
2903
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2904
|
-
var __spreadValues$1 = (a, b) => {
|
|
2905
|
-
for (var prop in b || (b = {}))
|
|
2906
|
-
if (__hasOwnProp$1.call(b, prop))
|
|
2907
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
2908
|
-
if (__getOwnPropSymbols$1)
|
|
2909
|
-
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
2910
|
-
if (__propIsEnum$1.call(b, prop))
|
|
2911
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
2912
|
-
}
|
|
2913
|
-
return a;
|
|
2914
|
-
};
|
|
2915
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2916
|
-
var __objRest$1 = (source, exclude) => {
|
|
2917
|
-
var target = {};
|
|
2918
|
-
for (var prop in source)
|
|
2919
|
-
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2920
|
-
target[prop] = source[prop];
|
|
2921
|
-
if (source != null && __getOwnPropSymbols$1)
|
|
2922
|
-
for (var prop of __getOwnPropSymbols$1(source)) {
|
|
2923
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
|
|
2924
|
-
target[prop] = source[prop];
|
|
2925
|
-
}
|
|
2926
|
-
return target;
|
|
2927
|
-
};
|
|
2928
|
-
let componentId = 0;
|
|
2929
|
-
const Tooltip = (props) => {
|
|
2930
|
-
const _a = props, {
|
|
2931
|
-
followMouse,
|
|
2932
|
-
overlayClassName,
|
|
2933
|
-
overlayStyle,
|
|
2934
|
-
children
|
|
2935
|
-
} = _a, restProps = __objRest$1(_a, [
|
|
2936
|
-
"followMouse",
|
|
2937
|
-
"overlayClassName",
|
|
2938
|
-
"overlayStyle",
|
|
2939
|
-
"children"
|
|
2940
|
-
]);
|
|
2941
|
-
const id = useRef(++componentId);
|
|
2942
|
-
const uniquePopupClass = `kit-popup-${id.current}`;
|
|
2943
|
-
const uniqueContainerClass = `kit-tooltip-${id.current}`;
|
|
2944
|
-
const _children = useMemo(() => {
|
|
2945
|
-
if (followMouse) {
|
|
2946
|
-
const child = React.isValidElement(children) ? children : /* @__PURE__ */ React.createElement("span", null, children);
|
|
2947
|
-
return React.cloneElement(child, {
|
|
2948
|
-
className: cs(child.props.className, uniqueContainerClass)
|
|
2949
|
-
});
|
|
2950
|
-
} else {
|
|
2951
|
-
return children;
|
|
2952
|
-
}
|
|
2953
|
-
}, [children, followMouse, uniqueContainerClass]);
|
|
2954
|
-
const onmousemove = useCallback(
|
|
2955
|
-
(event) => {
|
|
2956
|
-
const popup = document.querySelector(`.${uniquePopupClass}`);
|
|
2957
|
-
if (!popup)
|
|
2958
|
-
return;
|
|
2959
|
-
popup.style.left = event.pageX + "px";
|
|
2960
|
-
popup.style.top = event.pageY + "px";
|
|
2961
|
-
},
|
|
2962
|
-
[uniquePopupClass]
|
|
2963
|
-
);
|
|
2964
|
-
useEffect(() => {
|
|
2965
|
-
if (followMouse) {
|
|
2966
|
-
const container = document.querySelector(
|
|
2967
|
-
`.${uniqueContainerClass}`
|
|
2968
|
-
);
|
|
2969
|
-
container == null ? void 0 : container.addEventListener("mousemove", onmousemove);
|
|
2970
|
-
return () => {
|
|
2971
|
-
container == null ? void 0 : container.removeEventListener("mousemove", onmousemove);
|
|
2972
|
-
};
|
|
2973
|
-
}
|
|
2974
|
-
}, [followMouse, onmousemove, uniqueContainerClass]);
|
|
2975
|
-
return /* @__PURE__ */ React.createElement(
|
|
2976
|
-
Tooltip$1,
|
|
2977
|
-
__spreadProps(__spreadValues$1({}, restProps), {
|
|
2978
|
-
overlayClassName: followMouse ? cs(overlayClassName, uniquePopupClass) : overlayClassName,
|
|
2979
|
-
children: _children,
|
|
2980
|
-
overlayStyle: followMouse ? __spreadValues$1({
|
|
2981
|
-
transform: "translate(-50%, -100%)",
|
|
2982
|
-
pointerEvents: "none"
|
|
2983
|
-
}, overlayStyle) : overlayStyle
|
|
2984
|
-
})
|
|
2985
|
-
);
|
|
2986
|
-
};
|
|
2987
|
-
|
|
2988
3123
|
var __defProp = Object.defineProperty;
|
|
2989
3124
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
2990
3125
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
@@ -3135,8 +3270,6 @@ const tickFormatter = (tick, dateRange) => {
|
|
|
3135
3270
|
return dayjs(tick).format("MM/DD");
|
|
3136
3271
|
};
|
|
3137
3272
|
|
|
3138
|
-
React.createContext({});
|
|
3139
|
-
|
|
3140
3273
|
var Architecture = /* @__PURE__ */ ((Architecture2) => {
|
|
3141
3274
|
Architecture2["Aarch64"] = "AARCH64";
|
|
3142
3275
|
Architecture2["X86_64"] = "X86_64";
|
|
@@ -3171,4 +3304,4 @@ const useUIKit = () => {
|
|
|
3171
3304
|
return useContext(kitContext);
|
|
3172
3305
|
};
|
|
3173
3306
|
|
|
3174
|
-
export { Architecture, Button, EntityAsyncStatus, FailedLoad, KitStoreProvider, PAGINATION_SELECTOR, TABLE_WRAPPER_SELECTOR, TBODY_SELECTOR, THEAD_SELECTOR, TaskStatus, UIKitProvider, UserSource, antdKit, closeModal, kitContext, popModal, pushModal, tableStyleCover, tickFormatter, useElementsSize, useKitDispatch, useKitSelector, useUIKit };
|
|
3307
|
+
export { Architecture, Button, EntityAsyncStatus, FailedLoad, KitStoreProvider, PAGINATION_SELECTOR, TABLE_WRAPPER_SELECTOR, TBODY_SELECTOR, THEAD_SELECTOR, TaskStatus, Typo, UIKitProvider, UserSource, antdKit, closeModal, kitContext, popModal, pushModal, tableStyleCover, tickFormatter, useElementsSize, useKitDispatch, useKitSelector, useUIKit };
|