@cloudtower/eagle 0.22.10 → 0.22.12
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/components/BaseIcon/index.d.ts +4 -2
- package/dist/components/Icon/Icon.stories.d.ts +7 -24
- package/dist/components/Icon/index.d.ts +13 -12
- package/dist/components/Table/index.d.ts +0 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/esm/index.js +209 -181
- package/dist/esm/stats1.html +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/spec/base.d.ts +5 -0
- package/dist/store/index.d.ts +3 -8
- package/dist/style.css +673 -677
- package/dist/umd/index.js +211 -180
- package/dist/umd/stats1.html +1 -1
- package/package.json +5 -4
- package/dist/components/Table/TableSelection.d.ts +0 -27
- package/dist/stories/outline.stories.d.ts +0 -5
- /package/dist/stories/{fill.stories.d.ts → icons-react.stories.d.ts} +0 -0
package/dist/esm/index.js
CHANGED
|
@@ -19,10 +19,36 @@ import { withTranslation } from 'react-i18next';
|
|
|
19
19
|
import dayjs from 'dayjs';
|
|
20
20
|
import 'recharts';
|
|
21
21
|
|
|
22
|
+
const MAGIC_METRIC_NULL = -2;
|
|
22
23
|
const SECOND = 1;
|
|
23
24
|
const MINUTE = 60 * SECOND;
|
|
24
25
|
const HOUR = 60 * MINUTE;
|
|
25
26
|
const DAY = 24 * HOUR;
|
|
27
|
+
function formatPercent(input, decimals = 2) {
|
|
28
|
+
if (input <= 0 || input === MAGIC_METRIC_NULL) {
|
|
29
|
+
input = 0;
|
|
30
|
+
}
|
|
31
|
+
if (input > 100) {
|
|
32
|
+
input = 100;
|
|
33
|
+
}
|
|
34
|
+
const value = parseFloat(input.toFixed(decimals));
|
|
35
|
+
if (value === 0 && input > 0) {
|
|
36
|
+
if (decimals - 1 >= 0) {
|
|
37
|
+
return {
|
|
38
|
+
value: parseFloat(`0.${"0".repeat(decimals - 1)}1`),
|
|
39
|
+
unit: "%"
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
value: 1,
|
|
44
|
+
unit: "%"
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
value,
|
|
49
|
+
unit: "%"
|
|
50
|
+
};
|
|
51
|
+
}
|
|
26
52
|
|
|
27
53
|
const EMPTY_FUNCTION = () => {
|
|
28
54
|
};
|
|
@@ -116,8 +142,8 @@ const BaseIcon = React.forwardRef(
|
|
|
116
142
|
style,
|
|
117
143
|
children,
|
|
118
144
|
prefixNode,
|
|
119
|
-
suffixIconSrc,
|
|
120
|
-
src
|
|
145
|
+
suffixIconSrc: SuffixSrc,
|
|
146
|
+
src: Src
|
|
121
147
|
} = _a, HTMLSpanElementProps = __objRest$o(_a, [
|
|
122
148
|
"alt",
|
|
123
149
|
"className",
|
|
@@ -138,9 +164,9 @@ const BaseIcon = React.forwardRef(
|
|
|
138
164
|
style: _.pickBy(__spreadValues$s({ cursor }, style))
|
|
139
165
|
}, HTMLSpanElementProps),
|
|
140
166
|
prefixNode,
|
|
141
|
-
/* @__PURE__ */ React.createElement("span", { className: "icon-inner" }, /* @__PURE__ */ React.createElement("img", { alt, src, width, height })),
|
|
167
|
+
/* @__PURE__ */ React.createElement("span", { className: "icon-inner" }, typeof Src === "string" ? /* @__PURE__ */ React.createElement("img", { alt, src: Src, width, height }) : /* @__PURE__ */ React.createElement(Src, { width, height })),
|
|
142
168
|
children && /* @__PURE__ */ React.createElement("span", { className: "icon-children" }, children),
|
|
143
|
-
|
|
169
|
+
SuffixSrc && /* @__PURE__ */ React.createElement("span", { className: "icon-inner suffix" }, typeof SuffixSrc === "string" ? /* @__PURE__ */ React.createElement("img", { alt, src: SuffixSrc, width, height }) : /* @__PURE__ */ React.createElement(SuffixSrc, { width, height }))
|
|
144
170
|
);
|
|
145
171
|
}
|
|
146
172
|
);
|
|
@@ -1918,138 +1944,76 @@ const modalReducer = (state = initialModalState, action) => {
|
|
|
1918
1944
|
}
|
|
1919
1945
|
};
|
|
1920
1946
|
|
|
1921
|
-
var __defProp$6 = Object.defineProperty;
|
|
1922
|
-
var __defProps$3 = Object.defineProperties;
|
|
1923
|
-
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
1924
|
-
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
1925
|
-
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
1926
|
-
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
1927
|
-
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1928
|
-
var __spreadValues$6 = (a, b) => {
|
|
1929
|
-
for (var prop in b || (b = {}))
|
|
1930
|
-
if (__hasOwnProp$6.call(b, prop))
|
|
1931
|
-
__defNormalProp$6(a, prop, b[prop]);
|
|
1932
|
-
if (__getOwnPropSymbols$6)
|
|
1933
|
-
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
1934
|
-
if (__propIsEnum$6.call(b, prop))
|
|
1935
|
-
__defNormalProp$6(a, prop, b[prop]);
|
|
1936
|
-
}
|
|
1937
|
-
return a;
|
|
1938
|
-
};
|
|
1939
|
-
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
1940
|
-
const initialTableState = {};
|
|
1941
|
-
const tableReducer = (state = initialTableState, action) => {
|
|
1942
|
-
var _a;
|
|
1943
|
-
switch (action.type) {
|
|
1944
|
-
case "SET_ROWS_SELECTION" /* SET_ROWS_SELECTION */: {
|
|
1945
|
-
const { resource, rows } = action.payload;
|
|
1946
|
-
return __spreadProps$3(__spreadValues$6({}, state), {
|
|
1947
|
-
[resource]: __spreadProps$3(__spreadValues$6({}, state[resource]), {
|
|
1948
|
-
selectRows: rows
|
|
1949
|
-
})
|
|
1950
|
-
});
|
|
1951
|
-
}
|
|
1952
|
-
case "REMOVE_ROW_SELECTION" /* REMOVE_ROW_SELECTION */: {
|
|
1953
|
-
const { resource, id } = action.payload;
|
|
1954
|
-
return __spreadProps$3(__spreadValues$6({}, state), {
|
|
1955
|
-
[resource]: __spreadProps$3(__spreadValues$6({}, state[resource]), {
|
|
1956
|
-
selectRows: (_a = state[resource].selectRows) == null ? void 0 : _a.filter((r) => r.id !== id)
|
|
1957
|
-
})
|
|
1958
|
-
});
|
|
1959
|
-
}
|
|
1960
|
-
case "SET_RESOURCE_DATA" /* SET_RESOURCE_DATA */: {
|
|
1961
|
-
const { resource, rows } = action.payload;
|
|
1962
|
-
return __spreadProps$3(__spreadValues$6({}, state), {
|
|
1963
|
-
[resource]: __spreadProps$3(__spreadValues$6({}, state[resource]), {
|
|
1964
|
-
rows
|
|
1965
|
-
})
|
|
1966
|
-
});
|
|
1967
|
-
}
|
|
1968
|
-
case "SET_RESOURCE_QUERY" /* SET_RESOURCE_QUERY */: {
|
|
1969
|
-
const { resource, query } = action.payload;
|
|
1970
|
-
return __spreadProps$3(__spreadValues$6({}, state), {
|
|
1971
|
-
[resource]: __spreadProps$3(__spreadValues$6({}, state[resource]), {
|
|
1972
|
-
query
|
|
1973
|
-
})
|
|
1974
|
-
});
|
|
1975
|
-
}
|
|
1976
|
-
default:
|
|
1977
|
-
return state;
|
|
1978
|
-
}
|
|
1979
|
-
};
|
|
1980
|
-
|
|
1981
1947
|
const appReducer = combineReducers({
|
|
1982
1948
|
chart: chartReducer,
|
|
1983
|
-
modal: modalReducer
|
|
1984
|
-
table: tableReducer
|
|
1949
|
+
modal: modalReducer
|
|
1985
1950
|
});
|
|
1986
1951
|
const rootReducer = (state, action) => {
|
|
1987
|
-
if (action.type === "
|
|
1952
|
+
if (action.type === "RESET_UI_KIT_STORE") {
|
|
1988
1953
|
state = {
|
|
1989
1954
|
modal: initialModalState,
|
|
1990
|
-
chart: initialChartState
|
|
1991
|
-
table: initialTableState
|
|
1955
|
+
chart: initialChartState
|
|
1992
1956
|
};
|
|
1993
1957
|
}
|
|
1994
1958
|
return appReducer(state, action);
|
|
1995
1959
|
};
|
|
1996
|
-
const
|
|
1960
|
+
const UIKitStore = createStore(rootReducer);
|
|
1997
1961
|
function pushModal(modal) {
|
|
1998
|
-
|
|
1962
|
+
UIKitStore.dispatch({
|
|
1999
1963
|
type: ModalActions.PUSH_MODAL,
|
|
2000
1964
|
payload: modal
|
|
2001
1965
|
});
|
|
2002
1966
|
}
|
|
2003
1967
|
function popModal() {
|
|
2004
|
-
|
|
1968
|
+
UIKitStore.dispatch({
|
|
2005
1969
|
type: ModalActions.POP_MODAL
|
|
2006
1970
|
});
|
|
2007
1971
|
}
|
|
2008
1972
|
function closeModal(id) {
|
|
2009
|
-
|
|
1973
|
+
UIKitStore.dispatch({
|
|
2010
1974
|
type: ModalActions.CLOSE_MODAL,
|
|
2011
1975
|
id
|
|
2012
1976
|
});
|
|
2013
1977
|
}
|
|
2014
1978
|
|
|
2015
1979
|
const ctx = createContext({
|
|
2016
|
-
store,
|
|
2017
|
-
storeState:
|
|
1980
|
+
store: UIKitStore,
|
|
1981
|
+
storeState: UIKitStore.getState()
|
|
2018
1982
|
});
|
|
2019
1983
|
const KitStoreProvider = (props) => {
|
|
2020
1984
|
const { children } = props;
|
|
2021
|
-
return /* @__PURE__ */ React.createElement(Provider, { context: ctx, store }, children);
|
|
1985
|
+
return /* @__PURE__ */ React.createElement(Provider, { context: ctx, store: UIKitStore }, children);
|
|
2022
1986
|
};
|
|
2023
1987
|
const useKitDispatch = createDispatchHook(ctx);
|
|
2024
1988
|
const useKitSelector = createSelectorHook(ctx);
|
|
2025
1989
|
|
|
2026
|
-
var __defProp$
|
|
2027
|
-
var __defProps$
|
|
2028
|
-
var __getOwnPropDescs$
|
|
2029
|
-
var __getOwnPropSymbols$
|
|
2030
|
-
var __hasOwnProp$
|
|
2031
|
-
var __propIsEnum$
|
|
2032
|
-
var __defNormalProp$
|
|
2033
|
-
var __spreadValues$
|
|
1990
|
+
var __defProp$6 = Object.defineProperty;
|
|
1991
|
+
var __defProps$3 = Object.defineProperties;
|
|
1992
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
1993
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
1994
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
1995
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
1996
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1997
|
+
var __spreadValues$6 = (a, b) => {
|
|
2034
1998
|
for (var prop in b || (b = {}))
|
|
2035
|
-
if (__hasOwnProp$
|
|
2036
|
-
__defNormalProp$
|
|
2037
|
-
if (__getOwnPropSymbols$
|
|
2038
|
-
for (var prop of __getOwnPropSymbols$
|
|
2039
|
-
if (__propIsEnum$
|
|
2040
|
-
__defNormalProp$
|
|
1999
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
2000
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
2001
|
+
if (__getOwnPropSymbols$6)
|
|
2002
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
2003
|
+
if (__propIsEnum$6.call(b, prop))
|
|
2004
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
2041
2005
|
}
|
|
2042
2006
|
return a;
|
|
2043
2007
|
};
|
|
2044
|
-
var __spreadProps$
|
|
2008
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
2045
2009
|
var __objRest$4 = (source, exclude) => {
|
|
2046
2010
|
var target = {};
|
|
2047
2011
|
for (var prop in source)
|
|
2048
|
-
if (__hasOwnProp$
|
|
2012
|
+
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2049
2013
|
target[prop] = source[prop];
|
|
2050
|
-
if (source != null && __getOwnPropSymbols$
|
|
2051
|
-
for (var prop of __getOwnPropSymbols$
|
|
2052
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2014
|
+
if (source != null && __getOwnPropSymbols$6)
|
|
2015
|
+
for (var prop of __getOwnPropSymbols$6(source)) {
|
|
2016
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
|
|
2053
2017
|
target[prop] = source[prop];
|
|
2054
2018
|
}
|
|
2055
2019
|
return target;
|
|
@@ -2130,7 +2094,7 @@ const Modal = (props) => {
|
|
|
2130
2094
|
}
|
|
2131
2095
|
return /* @__PURE__ */ React.createElement(
|
|
2132
2096
|
Modal$1,
|
|
2133
|
-
__spreadProps$
|
|
2097
|
+
__spreadProps$3(__spreadValues$6({
|
|
2134
2098
|
maskClosable,
|
|
2135
2099
|
className: cs(
|
|
2136
2100
|
className,
|
|
@@ -2165,7 +2129,7 @@ const Modal = (props) => {
|
|
|
2165
2129
|
prevText
|
|
2166
2130
|
), 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(
|
|
2167
2131
|
Button,
|
|
2168
|
-
__spreadValues$
|
|
2132
|
+
__spreadValues$6({
|
|
2169
2133
|
type: "quiet",
|
|
2170
2134
|
onMouseDown: (e) => {
|
|
2171
2135
|
e.preventDefault();
|
|
@@ -2179,7 +2143,7 @@ const Modal = (props) => {
|
|
|
2179
2143
|
cancelText
|
|
2180
2144
|
), showOk && /* @__PURE__ */ React.createElement(
|
|
2181
2145
|
Button,
|
|
2182
|
-
__spreadValues$
|
|
2146
|
+
__spreadValues$6({
|
|
2183
2147
|
onClick: (e) => {
|
|
2184
2148
|
var _a2, _b2;
|
|
2185
2149
|
onOk == null ? void 0 : onOk(e);
|
|
@@ -2325,28 +2289,50 @@ const Pagination = props => {
|
|
|
2325
2289
|
}))));
|
|
2326
2290
|
};
|
|
2327
2291
|
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2292
|
+
function isEmpty(rawValue) {
|
|
2293
|
+
if (rawValue === null || rawValue === void 0 || rawValue === MAGIC_METRIC_NULL || Number.isNaN(rawValue)) {
|
|
2294
|
+
return true;
|
|
2295
|
+
}
|
|
2296
|
+
return false;
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
const Empty = /* @__PURE__ */ React.createElement(React.Fragment, null, "-");
|
|
2300
|
+
|
|
2301
|
+
const Percent = ({
|
|
2302
|
+
rawValue,
|
|
2303
|
+
decimals,
|
|
2304
|
+
valueClassName,
|
|
2305
|
+
unitClassName
|
|
2306
|
+
}) => {
|
|
2307
|
+
if (isEmpty(rawValue)) {
|
|
2308
|
+
return Empty;
|
|
2309
|
+
}
|
|
2310
|
+
const { value, unit } = formatPercent(rawValue, decimals);
|
|
2311
|
+
return /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("span", { className: cx("value", valueClassName) }, value), /* @__PURE__ */ React.createElement("span", { className: cx("unit", unitClassName) }, unit));
|
|
2312
|
+
};
|
|
2313
|
+
|
|
2314
|
+
var __defProp$5 = Object.defineProperty;
|
|
2315
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
2316
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
2317
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
2318
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, {
|
|
2333
2319
|
enumerable: true,
|
|
2334
2320
|
configurable: true,
|
|
2335
2321
|
writable: true,
|
|
2336
2322
|
value
|
|
2337
2323
|
}) : obj[key] = value;
|
|
2338
|
-
var __spreadValues$
|
|
2339
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$
|
|
2340
|
-
if (__getOwnPropSymbols$
|
|
2341
|
-
if (__propIsEnum$
|
|
2324
|
+
var __spreadValues$5 = (a, b) => {
|
|
2325
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$5.call(b, prop)) __defNormalProp$5(a, prop, b[prop]);
|
|
2326
|
+
if (__getOwnPropSymbols$5) for (var prop of __getOwnPropSymbols$5(b)) {
|
|
2327
|
+
if (__propIsEnum$5.call(b, prop)) __defNormalProp$5(a, prop, b[prop]);
|
|
2342
2328
|
}
|
|
2343
2329
|
return a;
|
|
2344
2330
|
};
|
|
2345
2331
|
var __objRest$3 = (source, exclude) => {
|
|
2346
2332
|
var target = {};
|
|
2347
|
-
for (var prop in source) if (__hasOwnProp$
|
|
2348
|
-
if (source != null && __getOwnPropSymbols$
|
|
2349
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2333
|
+
for (var prop in source) if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
2334
|
+
if (source != null && __getOwnPropSymbols$5) for (var prop of __getOwnPropSymbols$5(source)) {
|
|
2335
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop)) target[prop] = source[prop];
|
|
2350
2336
|
}
|
|
2351
2337
|
return target;
|
|
2352
2338
|
};
|
|
@@ -2372,7 +2358,7 @@ const Radio = _a => {
|
|
|
2372
2358
|
className: cx("radio-description", Typo.Label.l4_regular)
|
|
2373
2359
|
}, description));
|
|
2374
2360
|
}
|
|
2375
|
-
return /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(Radio$1, __spreadValues$
|
|
2361
|
+
return /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(Radio$1, __spreadValues$5({
|
|
2376
2362
|
className: cx(className, RadioStyle, compact && "compact"),
|
|
2377
2363
|
checked: checked || false,
|
|
2378
2364
|
"data-test": context.name ? `${context.name}-${String(props.value)}` : String(props.value)
|
|
@@ -2390,7 +2376,7 @@ const RadioGroup = _c => {
|
|
|
2390
2376
|
disabled: props.disabled,
|
|
2391
2377
|
name: props.name
|
|
2392
2378
|
}
|
|
2393
|
-
}, /* @__PURE__ */React.createElement(Radio$1.Group, __spreadValues$
|
|
2379
|
+
}, /* @__PURE__ */React.createElement(Radio$1.Group, __spreadValues$5({
|
|
2394
2380
|
className: cx(className, RadioGroupStyle)
|
|
2395
2381
|
}, props), children ? children : null));
|
|
2396
2382
|
};
|
|
@@ -2446,36 +2432,36 @@ const RadioButton = _e => {
|
|
|
2446
2432
|
className: "ant-radio-button-input-label"
|
|
2447
2433
|
}, typeof children === "string" ? children : ""));
|
|
2448
2434
|
};
|
|
2449
|
-
return /* @__PURE__ */React.createElement(Radio$1.Button, __spreadValues$
|
|
2435
|
+
return /* @__PURE__ */React.createElement(Radio$1.Button, __spreadValues$5({
|
|
2450
2436
|
className: cx(className, RadioButtonStyle),
|
|
2451
2437
|
value: radioButtonValue
|
|
2452
2438
|
}, props), renderChildren());
|
|
2453
2439
|
};
|
|
2454
2440
|
|
|
2455
|
-
var __defProp$
|
|
2456
|
-
var __getOwnPropSymbols$
|
|
2457
|
-
var __hasOwnProp$
|
|
2458
|
-
var __propIsEnum$
|
|
2459
|
-
var __defNormalProp$
|
|
2460
|
-
var __spreadValues$
|
|
2441
|
+
var __defProp$4 = Object.defineProperty;
|
|
2442
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
2443
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
2444
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
2445
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2446
|
+
var __spreadValues$4 = (a, b) => {
|
|
2461
2447
|
for (var prop in b || (b = {}))
|
|
2462
|
-
if (__hasOwnProp$
|
|
2463
|
-
__defNormalProp$
|
|
2464
|
-
if (__getOwnPropSymbols$
|
|
2465
|
-
for (var prop of __getOwnPropSymbols$
|
|
2466
|
-
if (__propIsEnum$
|
|
2467
|
-
__defNormalProp$
|
|
2448
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
2449
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
2450
|
+
if (__getOwnPropSymbols$4)
|
|
2451
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
2452
|
+
if (__propIsEnum$4.call(b, prop))
|
|
2453
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
2468
2454
|
}
|
|
2469
2455
|
return a;
|
|
2470
2456
|
};
|
|
2471
2457
|
var __objRest$2 = (source, exclude) => {
|
|
2472
2458
|
var target = {};
|
|
2473
2459
|
for (var prop in source)
|
|
2474
|
-
if (__hasOwnProp$
|
|
2460
|
+
if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2475
2461
|
target[prop] = source[prop];
|
|
2476
|
-
if (source != null && __getOwnPropSymbols$
|
|
2477
|
-
for (var prop of __getOwnPropSymbols$
|
|
2478
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2462
|
+
if (source != null && __getOwnPropSymbols$4)
|
|
2463
|
+
for (var prop of __getOwnPropSymbols$4(source)) {
|
|
2464
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
|
|
2479
2465
|
target[prop] = source[prop];
|
|
2480
2466
|
}
|
|
2481
2467
|
return target;
|
|
@@ -2485,7 +2471,7 @@ const SearchInput = (props) => {
|
|
|
2485
2471
|
const onSearch = _.debounce(onChange, debounceWait);
|
|
2486
2472
|
return /* @__PURE__ */ React.createElement(
|
|
2487
2473
|
Input,
|
|
2488
|
-
__spreadValues$
|
|
2474
|
+
__spreadValues$4({
|
|
2489
2475
|
style: { width: 276 },
|
|
2490
2476
|
prefix: /* @__PURE__ */ React.createElement(SearchOutlined, null),
|
|
2491
2477
|
onChange: (e) => onSearch(e.target.value)
|
|
@@ -2641,26 +2627,26 @@ const ColumnTitle = props => {
|
|
|
2641
2627
|
}));
|
|
2642
2628
|
};
|
|
2643
2629
|
|
|
2644
|
-
var __defProp$
|
|
2645
|
-
var __defProps$
|
|
2646
|
-
var __getOwnPropDescs$
|
|
2647
|
-
var __getOwnPropSymbols$
|
|
2648
|
-
var __hasOwnProp$
|
|
2649
|
-
var __propIsEnum$
|
|
2650
|
-
var __defNormalProp$
|
|
2630
|
+
var __defProp$3 = Object.defineProperty;
|
|
2631
|
+
var __defProps$2 = Object.defineProperties;
|
|
2632
|
+
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
2633
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
2634
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
2635
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
2636
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, {
|
|
2651
2637
|
enumerable: true,
|
|
2652
2638
|
configurable: true,
|
|
2653
2639
|
writable: true,
|
|
2654
2640
|
value
|
|
2655
2641
|
}) : obj[key] = value;
|
|
2656
|
-
var __spreadValues$
|
|
2657
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$
|
|
2658
|
-
if (__getOwnPropSymbols$
|
|
2659
|
-
if (__propIsEnum$
|
|
2642
|
+
var __spreadValues$3 = (a, b) => {
|
|
2643
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$3.call(b, prop)) __defNormalProp$3(a, prop, b[prop]);
|
|
2644
|
+
if (__getOwnPropSymbols$3) for (var prop of __getOwnPropSymbols$3(b)) {
|
|
2645
|
+
if (__propIsEnum$3.call(b, prop)) __defNormalProp$3(a, prop, b[prop]);
|
|
2660
2646
|
}
|
|
2661
2647
|
return a;
|
|
2662
2648
|
};
|
|
2663
|
-
var __spreadProps$
|
|
2649
|
+
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
2664
2650
|
const TableContainerStyle = "t1upn1sz";
|
|
2665
2651
|
const tableStyleCover = "tta5kd2";
|
|
2666
2652
|
const Table = props => {
|
|
@@ -2699,7 +2685,7 @@ const Table = props => {
|
|
|
2699
2685
|
},
|
|
2700
2686
|
dataSource: dataSource || [],
|
|
2701
2687
|
pagination: pagination || false,
|
|
2702
|
-
columns: columns.map(column => column.sorter ? __spreadProps$
|
|
2688
|
+
columns: columns.map(column => column.sorter ? __spreadProps$2(__spreadValues$3({}, column), {
|
|
2703
2689
|
title: /* @__PURE__ */React.createElement(ColumnTitle, {
|
|
2704
2690
|
title: column.title,
|
|
2705
2691
|
sortOrder: column.sortOrder
|
|
@@ -2720,7 +2706,7 @@ const Table = props => {
|
|
|
2720
2706
|
}),
|
|
2721
2707
|
rowClassName,
|
|
2722
2708
|
scroll,
|
|
2723
|
-
rowSelection: rowSelection && __spreadProps$
|
|
2709
|
+
rowSelection: rowSelection && __spreadProps$2(__spreadValues$3({}, rowSelection), {
|
|
2724
2710
|
columnWidth: 32
|
|
2725
2711
|
}),
|
|
2726
2712
|
showSorterTooltip: false
|
|
@@ -2834,33 +2820,33 @@ const TimeZoneOption = ({
|
|
|
2834
2820
|
}, /* @__PURE__ */React.createElement("span", null, timeZone.text, ", ", timeZone.abbr)));
|
|
2835
2821
|
};
|
|
2836
2822
|
|
|
2837
|
-
var __defProp$
|
|
2838
|
-
var __defProps = Object.defineProperties;
|
|
2839
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2840
|
-
var __getOwnPropSymbols$
|
|
2841
|
-
var __hasOwnProp$
|
|
2842
|
-
var __propIsEnum$
|
|
2843
|
-
var __defNormalProp$
|
|
2844
|
-
var __spreadValues$
|
|
2823
|
+
var __defProp$2 = Object.defineProperty;
|
|
2824
|
+
var __defProps$1 = Object.defineProperties;
|
|
2825
|
+
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
2826
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
2827
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
2828
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
2829
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2830
|
+
var __spreadValues$2 = (a, b) => {
|
|
2845
2831
|
for (var prop in b || (b = {}))
|
|
2846
|
-
if (__hasOwnProp$
|
|
2847
|
-
__defNormalProp$
|
|
2848
|
-
if (__getOwnPropSymbols$
|
|
2849
|
-
for (var prop of __getOwnPropSymbols$
|
|
2850
|
-
if (__propIsEnum$
|
|
2851
|
-
__defNormalProp$
|
|
2832
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
2833
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
2834
|
+
if (__getOwnPropSymbols$2)
|
|
2835
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
2836
|
+
if (__propIsEnum$2.call(b, prop))
|
|
2837
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
2852
2838
|
}
|
|
2853
2839
|
return a;
|
|
2854
2840
|
};
|
|
2855
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
2841
|
+
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
2856
2842
|
var __objRest$1 = (source, exclude) => {
|
|
2857
2843
|
var target = {};
|
|
2858
2844
|
for (var prop in source)
|
|
2859
|
-
if (__hasOwnProp$
|
|
2845
|
+
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2860
2846
|
target[prop] = source[prop];
|
|
2861
|
-
if (source != null && __getOwnPropSymbols$
|
|
2862
|
-
for (var prop of __getOwnPropSymbols$
|
|
2863
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2847
|
+
if (source != null && __getOwnPropSymbols$2)
|
|
2848
|
+
for (var prop of __getOwnPropSymbols$2(source)) {
|
|
2849
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
|
|
2864
2850
|
target[prop] = source[prop];
|
|
2865
2851
|
}
|
|
2866
2852
|
return target;
|
|
@@ -2914,10 +2900,10 @@ const Tooltip = (props) => {
|
|
|
2914
2900
|
}, [followMouse, onmousemove, uniqueContainerClass]);
|
|
2915
2901
|
return /* @__PURE__ */ React.createElement(
|
|
2916
2902
|
Tooltip$1,
|
|
2917
|
-
__spreadProps(__spreadValues$
|
|
2903
|
+
__spreadProps$1(__spreadValues$2({}, restProps), {
|
|
2918
2904
|
overlayClassName: followMouse ? cs(overlayClassName, uniquePopupClass) : overlayClassName,
|
|
2919
2905
|
children: _children,
|
|
2920
|
-
overlayStyle: followMouse ? __spreadValues$
|
|
2906
|
+
overlayStyle: followMouse ? __spreadValues$2({
|
|
2921
2907
|
transform: "translate(-50%, -100%)",
|
|
2922
2908
|
pointerEvents: "none"
|
|
2923
2909
|
}, overlayStyle) : overlayStyle
|
|
@@ -2947,6 +2933,9 @@ function getAntdKit() {
|
|
|
2947
2933
|
textArea: TextArea,
|
|
2948
2934
|
checkbox: Checkbox,
|
|
2949
2935
|
fields,
|
|
2936
|
+
units: {
|
|
2937
|
+
Percent
|
|
2938
|
+
},
|
|
2950
2939
|
inputGroup: InputGroup,
|
|
2951
2940
|
alert: Alert,
|
|
2952
2941
|
searchInput: SearchInput,
|
|
@@ -2971,28 +2960,28 @@ function getAntdKit() {
|
|
|
2971
2960
|
}
|
|
2972
2961
|
const antdKit = getAntdKit();
|
|
2973
2962
|
|
|
2974
|
-
var __defProp = Object.defineProperty;
|
|
2975
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
2976
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
2977
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
2978
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
2963
|
+
var __defProp$1 = Object.defineProperty;
|
|
2964
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
2965
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
2966
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
2967
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, {
|
|
2979
2968
|
enumerable: true,
|
|
2980
2969
|
configurable: true,
|
|
2981
2970
|
writable: true,
|
|
2982
2971
|
value
|
|
2983
2972
|
}) : obj[key] = value;
|
|
2984
|
-
var __spreadValues = (a, b) => {
|
|
2985
|
-
for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
2986
|
-
if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) {
|
|
2987
|
-
if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
2973
|
+
var __spreadValues$1 = (a, b) => {
|
|
2974
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$1.call(b, prop)) __defNormalProp$1(a, prop, b[prop]);
|
|
2975
|
+
if (__getOwnPropSymbols$1) for (var prop of __getOwnPropSymbols$1(b)) {
|
|
2976
|
+
if (__propIsEnum$1.call(b, prop)) __defNormalProp$1(a, prop, b[prop]);
|
|
2988
2977
|
}
|
|
2989
2978
|
return a;
|
|
2990
2979
|
};
|
|
2991
2980
|
var __objRest = (source, exclude) => {
|
|
2992
2981
|
var target = {};
|
|
2993
|
-
for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
2994
|
-
if (source != null && __getOwnPropSymbols) for (var prop of __getOwnPropSymbols(source)) {
|
|
2995
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop];
|
|
2982
|
+
for (var prop in source) if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
2983
|
+
if (source != null && __getOwnPropSymbols$1) for (var prop of __getOwnPropSymbols$1(source)) {
|
|
2984
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop)) target[prop] = source[prop];
|
|
2996
2985
|
}
|
|
2997
2986
|
return target;
|
|
2998
2987
|
};
|
|
@@ -3036,7 +3025,7 @@ React.forwardRef((props, ref) => {
|
|
|
3036
3025
|
style: {
|
|
3037
3026
|
cursor: "not-allowed"
|
|
3038
3027
|
}
|
|
3039
|
-
}, /* @__PURE__ */React.createElement(Button, __spreadValues({
|
|
3028
|
+
}, /* @__PURE__ */React.createElement(Button, __spreadValues$1({
|
|
3040
3029
|
style: {
|
|
3041
3030
|
pointerEvents: "none"
|
|
3042
3031
|
},
|
|
@@ -3046,7 +3035,7 @@ React.forwardRef((props, ref) => {
|
|
|
3046
3035
|
ghost,
|
|
3047
3036
|
className: cx(ButtonStyle, className2),
|
|
3048
3037
|
prefixIcon: icon
|
|
3049
|
-
}, buttonPropArgs))) : /* @__PURE__ */React.createElement(Button, __spreadValues({
|
|
3038
|
+
}, buttonPropArgs))) : /* @__PURE__ */React.createElement(Button, __spreadValues$1({
|
|
3050
3039
|
type,
|
|
3051
3040
|
size,
|
|
3052
3041
|
danger,
|
|
@@ -3055,7 +3044,7 @@ React.forwardRef((props, ref) => {
|
|
|
3055
3044
|
prefixIcon: icon
|
|
3056
3045
|
}, buttonPropArgs)));
|
|
3057
3046
|
}
|
|
3058
|
-
return /* @__PURE__ */React.createElement(Button, __spreadValues({
|
|
3047
|
+
return /* @__PURE__ */React.createElement(Button, __spreadValues$1({
|
|
3059
3048
|
key: key || index,
|
|
3060
3049
|
type,
|
|
3061
3050
|
size,
|
|
@@ -3121,6 +3110,45 @@ const tickFormatter = (tick, dateRange) => {
|
|
|
3121
3110
|
return dayjs(tick).format("MM/DD");
|
|
3122
3111
|
};
|
|
3123
3112
|
|
|
3113
|
+
var __defProp = Object.defineProperty;
|
|
3114
|
+
var __defProps = Object.defineProperties;
|
|
3115
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
3116
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3117
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3118
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
3119
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3120
|
+
var __spreadValues = (a, b) => {
|
|
3121
|
+
for (var prop in b || (b = {}))
|
|
3122
|
+
if (__hasOwnProp.call(b, prop))
|
|
3123
|
+
__defNormalProp(a, prop, b[prop]);
|
|
3124
|
+
if (__getOwnPropSymbols)
|
|
3125
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
3126
|
+
if (__propIsEnum.call(b, prop))
|
|
3127
|
+
__defNormalProp(a, prop, b[prop]);
|
|
3128
|
+
}
|
|
3129
|
+
return a;
|
|
3130
|
+
};
|
|
3131
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
3132
|
+
const ModalStack = () => {
|
|
3133
|
+
const stack = useKitSelector(
|
|
3134
|
+
(state) => state.modal.stack
|
|
3135
|
+
);
|
|
3136
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, stack.map((modal) => /* @__PURE__ */ React.createElement(
|
|
3137
|
+
modal.component,
|
|
3138
|
+
__spreadProps(__spreadValues({}, modal.props), {
|
|
3139
|
+
modalId: modal.id,
|
|
3140
|
+
onClose: () => {
|
|
3141
|
+
var _a;
|
|
3142
|
+
if ((_a = modal.props) == null ? void 0 : _a.onClose) {
|
|
3143
|
+
modal.props.onClose();
|
|
3144
|
+
}
|
|
3145
|
+
closeModal(modal.id);
|
|
3146
|
+
},
|
|
3147
|
+
key: modal.id
|
|
3148
|
+
})
|
|
3149
|
+
)));
|
|
3150
|
+
};
|
|
3151
|
+
|
|
3124
3152
|
var Architecture = /* @__PURE__ */ ((Architecture2) => {
|
|
3125
3153
|
Architecture2["Aarch64"] = "AARCH64";
|
|
3126
3154
|
Architecture2["X86_64"] = "X86_64";
|
|
@@ -3155,4 +3183,4 @@ const useUIKit = () => {
|
|
|
3155
3183
|
return useContext(kitContext);
|
|
3156
3184
|
};
|
|
3157
3185
|
|
|
3158
|
-
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 };
|
|
3186
|
+
export { Architecture, Button, EntityAsyncStatus, FailedLoad, KitStoreProvider, ModalActions, ModalStack, PAGINATION_SELECTOR, TABLE_WRAPPER_SELECTOR, TBODY_SELECTOR, THEAD_SELECTOR, TaskStatus, Typo, UIKitProvider, UIKitStore, UserSource, antdKit, closeModal, kitContext, popModal, pushModal, tableStyleCover, tickFormatter, useElementsSize, useKitDispatch, useKitSelector, useUIKit };
|