@cloudtower/eagle 0.26.0 → 0.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Modal/ImmersiveModal.d.ts +3 -2
- package/dist/components/Percent/index.d.ts +2 -2
- package/dist/components/message/index.d.ts +1 -0
- package/dist/components.css +224 -224
- package/dist/esm/index.js +474 -448
- package/dist/esm/stats1.html +1 -1
- package/dist/spec/base.d.ts +6 -3
- package/dist/store/modal.d.ts +0 -2
- package/dist/style.css +590 -590
- package/dist/umd/index.js +474 -448
- package/dist/umd/stats1.html +1 -1
- package/dist/utils/tower.d.ts +1 -1
- package/package.json +5 -5
package/dist/umd/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.index = {}, global.
|
|
5
|
-
})(this, (function (exports,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('antd'), require('react'), require('classnames'), require('lodash'), require('react-svg-unique-id'), require('@cloudtower/parrot'), require('react-i18next'), require('@linaria/core'), require('@linaria/react'), require('moment'), require('react-dom'), require('react-is'), require('@ant-design/icons'), require('antd/lib/form/FormItem'), require('@ant-design/icons/CheckCircleFilled'), require('@ant-design/icons/CloseCircleFilled'), require('@ant-design/icons/ExclamationCircleFilled'), require('@ant-design/icons/InfoCircleFilled'), require('@ant-design/icons/LoadingOutlined'), require('@cloudtower/rc-notification'), require('redux'), require('react-redux'), require('@cloudtower/icons-react'), require('react-beautiful-dnd'), require('timezones.json'), require('dayjs'), require('recharts'), require('antd/lib/locale/en_US'), require('antd/lib/locale/zh_CN')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'antd', 'react', 'classnames', 'lodash', 'react-svg-unique-id', '@cloudtower/parrot', 'react-i18next', '@linaria/core', '@linaria/react', 'moment', 'react-dom', 'react-is', '@ant-design/icons', 'antd/lib/form/FormItem', '@ant-design/icons/CheckCircleFilled', '@ant-design/icons/CloseCircleFilled', '@ant-design/icons/ExclamationCircleFilled', '@ant-design/icons/InfoCircleFilled', '@ant-design/icons/LoadingOutlined', '@cloudtower/rc-notification', 'redux', 'react-redux', '@cloudtower/icons-react', 'react-beautiful-dnd', 'timezones.json', 'dayjs', 'recharts', 'antd/lib/locale/en_US', 'antd/lib/locale/zh_CN'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.index = {}, global.antd, global.React, global.cs, global._, global.reactSvgUniqueId, global.parrot, global.reactI18next, global.core, global.react, global.moment, global.reactDom, global.reactIs, global.icons, global.AntdFormItem, global.CheckCircleFilled, global.CloseCircleFilled, global.ExclamationCircleFilled, global.InfoCircleFilled, global.LoadingOutlined, global.RCNotification, global.redux, global.reactRedux, global.iconsReact, global.reactBeautifulDnd, global.TimeZones, global.dayjs, null, global.enUS, global.zhCN));
|
|
5
|
+
})(this, (function (exports, antd, React, cs, _, reactSvgUniqueId, parrot, reactI18next, core, react, moment, reactDom, reactIs, icons, AntdFormItem, CheckCircleFilled, CloseCircleFilled, ExclamationCircleFilled, InfoCircleFilled, LoadingOutlined, RCNotification, redux, reactRedux, iconsReact, reactBeautifulDnd, TimeZones, dayjs, recharts, enUS, zhCN) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
8
|
|
|
@@ -181,12 +181,17 @@
|
|
|
181
181
|
unit: units[i]
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
function formatPercent(input, decimals = 2) {
|
|
185
|
-
if (input
|
|
184
|
+
function formatPercent(input, decimals = 2, saturated = true) {
|
|
185
|
+
if (input === MAGIC_METRIC_NULL) {
|
|
186
186
|
input = 0;
|
|
187
187
|
}
|
|
188
|
-
if (
|
|
189
|
-
input
|
|
188
|
+
if (saturated) {
|
|
189
|
+
if (input <= 0) {
|
|
190
|
+
input = 0;
|
|
191
|
+
}
|
|
192
|
+
if (input > 100) {
|
|
193
|
+
input = 100;
|
|
194
|
+
}
|
|
190
195
|
}
|
|
191
196
|
const value = input.toFixed(decimals);
|
|
192
197
|
if (parseFloat(value) === 0 && input > 0) {
|
|
@@ -2445,6 +2450,19 @@
|
|
|
2445
2450
|
let getContainer;
|
|
2446
2451
|
let maxCount;
|
|
2447
2452
|
let rtl = false;
|
|
2453
|
+
let fixMessage = [];
|
|
2454
|
+
let pageVisible = true;
|
|
2455
|
+
const visibilitychangeHandler = () => {
|
|
2456
|
+
if (document.hidden) {
|
|
2457
|
+
pageVisible = false;
|
|
2458
|
+
} else {
|
|
2459
|
+
pageVisible = true;
|
|
2460
|
+
fixMessage.forEach((message) => {
|
|
2461
|
+
notice(message);
|
|
2462
|
+
});
|
|
2463
|
+
fixMessage = [];
|
|
2464
|
+
}
|
|
2465
|
+
};
|
|
2448
2466
|
function setMessageConfig(options) {
|
|
2449
2467
|
if (options.top !== void 0) {
|
|
2450
2468
|
defaultTop = options.top;
|
|
@@ -2471,6 +2489,7 @@
|
|
|
2471
2489
|
rtl = options.rtl;
|
|
2472
2490
|
}
|
|
2473
2491
|
}
|
|
2492
|
+
document.addEventListener("visibilitychange", visibilitychangeHandler);
|
|
2474
2493
|
function getRCNotificationInstance(args, callback) {
|
|
2475
2494
|
const prefixCls = args.prefixCls || localPrefixCls;
|
|
2476
2495
|
if (messageInstance) {
|
|
@@ -2536,9 +2555,19 @@
|
|
|
2536
2555
|
}
|
|
2537
2556
|
return resolve(true);
|
|
2538
2557
|
};
|
|
2558
|
+
if (!pageVisible) {
|
|
2559
|
+
fixMessage.push(args);
|
|
2560
|
+
if (fixMessage.length > 2) {
|
|
2561
|
+
fixMessage.shift();
|
|
2562
|
+
}
|
|
2563
|
+
return;
|
|
2564
|
+
}
|
|
2539
2565
|
getRCNotificationInstance(args, ({ prefixCls, instance }) => {
|
|
2540
2566
|
instance.notice(
|
|
2541
|
-
getRCNoticeProps(
|
|
2567
|
+
getRCNoticeProps(
|
|
2568
|
+
__spreadProps$f(__spreadValues$l({}, args), { key: target, onClose: callback }),
|
|
2569
|
+
prefixCls
|
|
2570
|
+
)
|
|
2542
2571
|
);
|
|
2543
2572
|
});
|
|
2544
2573
|
});
|
|
@@ -2600,19 +2629,186 @@
|
|
|
2600
2629
|
return a;
|
|
2601
2630
|
};
|
|
2602
2631
|
var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
|
|
2632
|
+
const initialChartState = {
|
|
2633
|
+
pointers: {},
|
|
2634
|
+
resourceData: {},
|
|
2635
|
+
averageData: {}
|
|
2636
|
+
};
|
|
2637
|
+
const chartReducer = (state = initialChartState, action) => {
|
|
2638
|
+
switch (action.type) {
|
|
2639
|
+
case "SET_POINTER" /* SET_POINTER */: {
|
|
2640
|
+
const { uuid, left, text, visible, value } = action.payload;
|
|
2641
|
+
return __spreadProps$e(__spreadValues$k({}, state), {
|
|
2642
|
+
pointers: __spreadProps$e(__spreadValues$k({}, state.pointers), {
|
|
2643
|
+
[uuid]: {
|
|
2644
|
+
left,
|
|
2645
|
+
text,
|
|
2646
|
+
visible,
|
|
2647
|
+
value
|
|
2648
|
+
}
|
|
2649
|
+
})
|
|
2650
|
+
});
|
|
2651
|
+
}
|
|
2652
|
+
case "SET_RESOURCE_DATA" /* SET_RESOURCE_DATA */: {
|
|
2653
|
+
const { uuid, data } = action.payload;
|
|
2654
|
+
return __spreadProps$e(__spreadValues$k({}, state), {
|
|
2655
|
+
resourceData: __spreadProps$e(__spreadValues$k({}, state.resourceData), {
|
|
2656
|
+
[uuid]: data
|
|
2657
|
+
})
|
|
2658
|
+
});
|
|
2659
|
+
}
|
|
2660
|
+
case "SET_AVERAGE_DATA" /* SET_AVERAGE_DATA */: {
|
|
2661
|
+
const { uuid, average } = action.payload;
|
|
2662
|
+
return __spreadProps$e(__spreadValues$k({}, state), {
|
|
2663
|
+
averageData: __spreadProps$e(__spreadValues$k({}, state.averageData), {
|
|
2664
|
+
[uuid]: average
|
|
2665
|
+
})
|
|
2666
|
+
});
|
|
2667
|
+
}
|
|
2668
|
+
default: {
|
|
2669
|
+
return state;
|
|
2670
|
+
}
|
|
2671
|
+
}
|
|
2672
|
+
};
|
|
2673
|
+
|
|
2674
|
+
var __defProp$j = Object.defineProperty;
|
|
2675
|
+
var __defProps$d = Object.defineProperties;
|
|
2676
|
+
var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
|
|
2677
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
2678
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
2679
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
2680
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2681
|
+
var __spreadValues$j = (a, b) => {
|
|
2682
|
+
for (var prop in b || (b = {}))
|
|
2683
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
2684
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
2685
|
+
if (__getOwnPropSymbols$j)
|
|
2686
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
2687
|
+
if (__propIsEnum$j.call(b, prop))
|
|
2688
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
2689
|
+
}
|
|
2690
|
+
return a;
|
|
2691
|
+
};
|
|
2692
|
+
var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
|
|
2693
|
+
var ModalActions = /* @__PURE__ */ ((ModalActions2) => {
|
|
2694
|
+
ModalActions2["PUSH_MODAL"] = "PUSH_MODAL";
|
|
2695
|
+
ModalActions2["POP_MODAL"] = "POP_MODAL";
|
|
2696
|
+
ModalActions2["REMOVE_MODAL"] = "REMOVE_MODAL";
|
|
2697
|
+
ModalActions2["CLOSE_MODAL"] = "CLOSE_MODAL";
|
|
2698
|
+
return ModalActions2;
|
|
2699
|
+
})(ModalActions || {});
|
|
2700
|
+
const initialModalState = {
|
|
2701
|
+
stack: [],
|
|
2702
|
+
closeId: 0
|
|
2703
|
+
};
|
|
2704
|
+
let MODAL_ID = 1;
|
|
2705
|
+
const modalReducer = (state = initialModalState, action) => {
|
|
2706
|
+
switch (action.type) {
|
|
2707
|
+
case "PUSH_MODAL" /* PUSH_MODAL */:
|
|
2708
|
+
if (state.stack.some(
|
|
2709
|
+
(modal) => modal.component === action.payload.component
|
|
2710
|
+
)) {
|
|
2711
|
+
return state;
|
|
2712
|
+
}
|
|
2713
|
+
return __spreadProps$d(__spreadValues$j({}, state), {
|
|
2714
|
+
stack: state.stack.concat(__spreadProps$d(__spreadValues$j({}, action.payload), {
|
|
2715
|
+
id: MODAL_ID++
|
|
2716
|
+
}))
|
|
2717
|
+
});
|
|
2718
|
+
case "POP_MODAL" /* POP_MODAL */:
|
|
2719
|
+
return __spreadProps$d(__spreadValues$j({}, state), {
|
|
2720
|
+
stack: state.stack.slice(0, -1)
|
|
2721
|
+
});
|
|
2722
|
+
case "REMOVE_MODAL" /* REMOVE_MODAL */:
|
|
2723
|
+
return __spreadProps$d(__spreadValues$j({}, state), {
|
|
2724
|
+
closeId: 0,
|
|
2725
|
+
stack: state.stack.filter((m) => m.id !== action.id)
|
|
2726
|
+
});
|
|
2727
|
+
case "CLOSE_MODAL" /* CLOSE_MODAL */:
|
|
2728
|
+
return __spreadProps$d(__spreadValues$j({}, state), {
|
|
2729
|
+
closeId: action.id
|
|
2730
|
+
});
|
|
2731
|
+
default:
|
|
2732
|
+
return state;
|
|
2733
|
+
}
|
|
2734
|
+
};
|
|
2735
|
+
|
|
2736
|
+
const appReducer = redux.combineReducers({
|
|
2737
|
+
chart: chartReducer,
|
|
2738
|
+
modal: modalReducer
|
|
2739
|
+
});
|
|
2740
|
+
const rootReducer = (state, action) => {
|
|
2741
|
+
if (action.type === "RESET_UI_KIT_STORE") {
|
|
2742
|
+
state = {
|
|
2743
|
+
modal: initialModalState,
|
|
2744
|
+
chart: initialChartState
|
|
2745
|
+
};
|
|
2746
|
+
}
|
|
2747
|
+
return appReducer(state, action);
|
|
2748
|
+
};
|
|
2749
|
+
const UIKitStore = redux.createStore(rootReducer);
|
|
2750
|
+
function pushModal(modal) {
|
|
2751
|
+
UIKitStore.dispatch({
|
|
2752
|
+
type: ModalActions.PUSH_MODAL,
|
|
2753
|
+
payload: modal
|
|
2754
|
+
});
|
|
2755
|
+
}
|
|
2756
|
+
function popModal() {
|
|
2757
|
+
UIKitStore.dispatch({
|
|
2758
|
+
type: ModalActions.POP_MODAL
|
|
2759
|
+
});
|
|
2760
|
+
}
|
|
2761
|
+
function closeModal(id) {
|
|
2762
|
+
UIKitStore.dispatch({
|
|
2763
|
+
type: ModalActions.CLOSE_MODAL,
|
|
2764
|
+
id
|
|
2765
|
+
});
|
|
2766
|
+
}
|
|
2767
|
+
|
|
2768
|
+
const ctx = React.createContext({
|
|
2769
|
+
store: UIKitStore,
|
|
2770
|
+
storeState: UIKitStore.getState()
|
|
2771
|
+
});
|
|
2772
|
+
const KitStoreProvider = (props) => {
|
|
2773
|
+
const { children } = props;
|
|
2774
|
+
return /* @__PURE__ */ React__namespace.default.createElement(reactRedux.Provider, { context: ctx, store: UIKitStore }, children);
|
|
2775
|
+
};
|
|
2776
|
+
const useKitDispatch = reactRedux.createDispatchHook(ctx);
|
|
2777
|
+
const useKitSelector = reactRedux.createSelectorHook(ctx);
|
|
2778
|
+
|
|
2779
|
+
var __defProp$i = Object.defineProperty;
|
|
2780
|
+
var __defProps$c = Object.defineProperties;
|
|
2781
|
+
var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
|
|
2782
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
2783
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
2784
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
2785
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2786
|
+
var __spreadValues$i = (a, b) => {
|
|
2787
|
+
for (var prop in b || (b = {}))
|
|
2788
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
2789
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
2790
|
+
if (__getOwnPropSymbols$i)
|
|
2791
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
2792
|
+
if (__propIsEnum$i.call(b, prop))
|
|
2793
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
2794
|
+
}
|
|
2795
|
+
return a;
|
|
2796
|
+
};
|
|
2797
|
+
var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
2603
2798
|
var __objRest$5 = (source, exclude) => {
|
|
2604
2799
|
var target = {};
|
|
2605
2800
|
for (var prop in source)
|
|
2606
|
-
if (__hasOwnProp$
|
|
2801
|
+
if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2607
2802
|
target[prop] = source[prop];
|
|
2608
|
-
if (source != null && __getOwnPropSymbols$
|
|
2609
|
-
for (var prop of __getOwnPropSymbols$
|
|
2610
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2803
|
+
if (source != null && __getOwnPropSymbols$i)
|
|
2804
|
+
for (var prop of __getOwnPropSymbols$i(source)) {
|
|
2805
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
|
|
2611
2806
|
target[prop] = source[prop];
|
|
2612
2807
|
}
|
|
2613
2808
|
return target;
|
|
2614
2809
|
};
|
|
2615
2810
|
const Modal = (props) => {
|
|
2811
|
+
var _b;
|
|
2616
2812
|
const { t } = useParrotTranslation();
|
|
2617
2813
|
const _a = props, {
|
|
2618
2814
|
error,
|
|
@@ -2632,9 +2828,7 @@
|
|
|
2632
2828
|
width,
|
|
2633
2829
|
showCancel = true,
|
|
2634
2830
|
showOk = true,
|
|
2635
|
-
afterClose
|
|
2636
|
-
removeModal,
|
|
2637
|
-
visible
|
|
2831
|
+
afterClose
|
|
2638
2832
|
} = _a, restProps = __objRest$5(_a, [
|
|
2639
2833
|
"error",
|
|
2640
2834
|
"okText",
|
|
@@ -2653,10 +2847,16 @@
|
|
|
2653
2847
|
"width",
|
|
2654
2848
|
"showCancel",
|
|
2655
2849
|
"showOk",
|
|
2656
|
-
"afterClose"
|
|
2657
|
-
"removeModal",
|
|
2658
|
-
"visible"
|
|
2850
|
+
"afterClose"
|
|
2659
2851
|
]);
|
|
2852
|
+
const stack = useKitSelector(
|
|
2853
|
+
(state) => state.modal.stack
|
|
2854
|
+
);
|
|
2855
|
+
const id = useKitSelector(
|
|
2856
|
+
(state) => state.modal.closeId
|
|
2857
|
+
);
|
|
2858
|
+
const dispatch = useKitDispatch();
|
|
2859
|
+
const idRef = React.useRef((_b = stack[stack.length - 1]) == null ? void 0 : _b.id);
|
|
2660
2860
|
const transitionClass = React.useRef(fullscreen ? "fullscreen-modal" : "modal-zoom");
|
|
2661
2861
|
const confirmText = React.useMemo(() => {
|
|
2662
2862
|
let text = (okButtonProps == null ? void 0 : okButtonProps.children) || okText;
|
|
@@ -2684,7 +2884,7 @@
|
|
|
2684
2884
|
}
|
|
2685
2885
|
return /* @__PURE__ */ React__namespace.default.createElement(
|
|
2686
2886
|
antd.Modal,
|
|
2687
|
-
__spreadProps$
|
|
2887
|
+
__spreadProps$c(__spreadValues$i({
|
|
2688
2888
|
maskClosable,
|
|
2689
2889
|
className: cs__default.default(
|
|
2690
2890
|
className,
|
|
@@ -2704,9 +2904,9 @@
|
|
|
2704
2904
|
}, restProps), {
|
|
2705
2905
|
afterClose: () => {
|
|
2706
2906
|
afterClose == null ? void 0 : afterClose();
|
|
2707
|
-
|
|
2907
|
+
dispatch({ type: ModalActions.REMOVE_MODAL, id: idRef.current });
|
|
2708
2908
|
},
|
|
2709
|
-
visible,
|
|
2909
|
+
visible: idRef.current !== id,
|
|
2710
2910
|
footer: /* @__PURE__ */ React__namespace.default.createElement("div", { className: "footer-content" }, footer === void 0 ? /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement("div", { className: "modal-footer-left" }, wizard && typeof wizard === "object" && !wizard.disablePrevStep && wizard.step !== 0 && /* @__PURE__ */ React__namespace.default.createElement(
|
|
2711
2911
|
"span",
|
|
2712
2912
|
{
|
|
@@ -2719,7 +2919,7 @@
|
|
|
2719
2919
|
prevText
|
|
2720
2920
|
), error && /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement("span", { className: "modal-error" }, error))), /* @__PURE__ */ React__namespace.default.createElement("div", { className: "modal-footer-btn-group" }, showCancel && /* @__PURE__ */ React__namespace.default.createElement(
|
|
2721
2921
|
Button,
|
|
2722
|
-
__spreadValues$
|
|
2922
|
+
__spreadValues$i({
|
|
2723
2923
|
type: "quiet",
|
|
2724
2924
|
onMouseDown: (e) => {
|
|
2725
2925
|
e.preventDefault();
|
|
@@ -2733,12 +2933,12 @@
|
|
|
2733
2933
|
cancelText
|
|
2734
2934
|
), showOk && /* @__PURE__ */ React__namespace.default.createElement(
|
|
2735
2935
|
Button,
|
|
2736
|
-
__spreadValues$
|
|
2936
|
+
__spreadValues$i({
|
|
2737
2937
|
onClick: (e) => {
|
|
2738
|
-
var _a2,
|
|
2938
|
+
var _a2, _b2;
|
|
2739
2939
|
onOk == null ? void 0 : onOk(e);
|
|
2740
2940
|
if (typeof wizard === "object" && wizard.steps[wizard.step]) {
|
|
2741
|
-
(
|
|
2941
|
+
(_b2 = (_a2 = wizard.steps[wizard.step]).onOk) == null ? void 0 : _b2.call(_a2, e);
|
|
2742
2942
|
}
|
|
2743
2943
|
transitionClass.current = fullscreen ? "" : "modal-send";
|
|
2744
2944
|
},
|
|
@@ -2885,76 +3085,77 @@
|
|
|
2885
3085
|
}))));
|
|
2886
3086
|
};
|
|
2887
3087
|
|
|
2888
|
-
var __defProp$
|
|
2889
|
-
var __getOwnPropSymbols$
|
|
2890
|
-
var __hasOwnProp$
|
|
2891
|
-
var __propIsEnum$
|
|
2892
|
-
var __defNormalProp$
|
|
2893
|
-
var __spreadValues$
|
|
3088
|
+
var __defProp$h = Object.defineProperty;
|
|
3089
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
3090
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
3091
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
3092
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3093
|
+
var __spreadValues$h = (a, b) => {
|
|
2894
3094
|
for (var prop in b || (b = {}))
|
|
2895
|
-
if (__hasOwnProp$
|
|
2896
|
-
__defNormalProp$
|
|
2897
|
-
if (__getOwnPropSymbols$
|
|
2898
|
-
for (var prop of __getOwnPropSymbols$
|
|
2899
|
-
if (__propIsEnum$
|
|
2900
|
-
__defNormalProp$
|
|
3095
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
3096
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
3097
|
+
if (__getOwnPropSymbols$h)
|
|
3098
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
3099
|
+
if (__propIsEnum$h.call(b, prop))
|
|
3100
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
2901
3101
|
}
|
|
2902
3102
|
return a;
|
|
2903
3103
|
};
|
|
2904
3104
|
const Percent = ({
|
|
2905
3105
|
rawValue,
|
|
2906
3106
|
decimals,
|
|
3107
|
+
saturated,
|
|
2907
3108
|
valueClassName,
|
|
2908
3109
|
unitClassName,
|
|
2909
3110
|
emptyProps
|
|
2910
3111
|
}) => {
|
|
2911
3112
|
if (isEmpty(rawValue)) {
|
|
2912
|
-
return /* @__PURE__ */ React__namespace.default.createElement(Empty, __spreadValues$
|
|
3113
|
+
return /* @__PURE__ */ React__namespace.default.createElement(Empty, __spreadValues$h({}, emptyProps));
|
|
2913
3114
|
}
|
|
2914
|
-
const { value, unit } = formatPercent(rawValue, decimals);
|
|
3115
|
+
const { value, unit } = formatPercent(rawValue, decimals, saturated);
|
|
2915
3116
|
return /* @__PURE__ */ React__namespace.default.createElement("span", null, /* @__PURE__ */ React__namespace.default.createElement("span", { className: core.cx("value", valueClassName) }, value), /* @__PURE__ */ React__namespace.default.createElement("span", { className: core.cx("unit", unitClassName) }, unit));
|
|
2916
3117
|
};
|
|
2917
3118
|
|
|
2918
|
-
var __defProp$
|
|
2919
|
-
var __getOwnPropSymbols$
|
|
2920
|
-
var __hasOwnProp$
|
|
2921
|
-
var __propIsEnum$
|
|
2922
|
-
var __defNormalProp$
|
|
2923
|
-
var __spreadValues$
|
|
3119
|
+
var __defProp$g = Object.defineProperty;
|
|
3120
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
3121
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
3122
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
3123
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3124
|
+
var __spreadValues$g = (a, b) => {
|
|
2924
3125
|
for (var prop in b || (b = {}))
|
|
2925
|
-
if (__hasOwnProp$
|
|
2926
|
-
__defNormalProp$
|
|
2927
|
-
if (__getOwnPropSymbols$
|
|
2928
|
-
for (var prop of __getOwnPropSymbols$
|
|
2929
|
-
if (__propIsEnum$
|
|
2930
|
-
__defNormalProp$
|
|
3126
|
+
if (__hasOwnProp$g.call(b, prop))
|
|
3127
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
3128
|
+
if (__getOwnPropSymbols$g)
|
|
3129
|
+
for (var prop of __getOwnPropSymbols$g(b)) {
|
|
3130
|
+
if (__propIsEnum$g.call(b, prop))
|
|
3131
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
2931
3132
|
}
|
|
2932
3133
|
return a;
|
|
2933
3134
|
};
|
|
2934
|
-
const Progress = (props) => /* @__PURE__ */ React__namespace.default.createElement(antd.Progress, __spreadValues$
|
|
3135
|
+
const Progress = (props) => /* @__PURE__ */ React__namespace.default.createElement(antd.Progress, __spreadValues$g({}, props));
|
|
2935
3136
|
|
|
2936
|
-
var __defProp$
|
|
2937
|
-
var __getOwnPropSymbols$
|
|
2938
|
-
var __hasOwnProp$
|
|
2939
|
-
var __propIsEnum$
|
|
2940
|
-
var __defNormalProp$
|
|
3137
|
+
var __defProp$f = Object.defineProperty;
|
|
3138
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
3139
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
3140
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
3141
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, {
|
|
2941
3142
|
enumerable: true,
|
|
2942
3143
|
configurable: true,
|
|
2943
3144
|
writable: true,
|
|
2944
3145
|
value
|
|
2945
3146
|
}) : obj[key] = value;
|
|
2946
|
-
var __spreadValues$
|
|
2947
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$
|
|
2948
|
-
if (__getOwnPropSymbols$
|
|
2949
|
-
if (__propIsEnum$
|
|
3147
|
+
var __spreadValues$f = (a, b) => {
|
|
3148
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$f.call(b, prop)) __defNormalProp$f(a, prop, b[prop]);
|
|
3149
|
+
if (__getOwnPropSymbols$f) for (var prop of __getOwnPropSymbols$f(b)) {
|
|
3150
|
+
if (__propIsEnum$f.call(b, prop)) __defNormalProp$f(a, prop, b[prop]);
|
|
2950
3151
|
}
|
|
2951
3152
|
return a;
|
|
2952
3153
|
};
|
|
2953
3154
|
var __objRest$4 = (source, exclude) => {
|
|
2954
3155
|
var target = {};
|
|
2955
|
-
for (var prop in source) if (__hasOwnProp$
|
|
2956
|
-
if (source != null && __getOwnPropSymbols$
|
|
2957
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3156
|
+
for (var prop in source) if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
3157
|
+
if (source != null && __getOwnPropSymbols$f) for (var prop of __getOwnPropSymbols$f(source)) {
|
|
3158
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop)) target[prop] = source[prop];
|
|
2958
3159
|
}
|
|
2959
3160
|
return target;
|
|
2960
3161
|
};
|
|
@@ -2980,7 +3181,7 @@
|
|
|
2980
3181
|
className: core.cx("radio-description", Typo.Label.l4_regular)
|
|
2981
3182
|
}, description));
|
|
2982
3183
|
}
|
|
2983
|
-
return /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */React__namespace.default.createElement(antd.Radio, __spreadValues$
|
|
3184
|
+
return /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */React__namespace.default.createElement(antd.Radio, __spreadValues$f({
|
|
2984
3185
|
className: core.cx(className, RadioStyle, compact && "compact"),
|
|
2985
3186
|
checked: checked || false,
|
|
2986
3187
|
"data-test": context.name ? `${context.name}-${String(props.value)}` : String(props.value)
|
|
@@ -2998,7 +3199,7 @@
|
|
|
2998
3199
|
disabled: props.disabled,
|
|
2999
3200
|
name: props.name
|
|
3000
3201
|
}
|
|
3001
|
-
}, /* @__PURE__ */React__namespace.default.createElement(antd.Radio.Group, __spreadValues$
|
|
3202
|
+
}, /* @__PURE__ */React__namespace.default.createElement(antd.Radio.Group, __spreadValues$f({
|
|
3002
3203
|
className: core.cx(className, RadioGroupStyle)
|
|
3003
3204
|
}, props), children ? children : null));
|
|
3004
3205
|
};
|
|
@@ -3054,36 +3255,36 @@
|
|
|
3054
3255
|
className: "ant-radio-button-input-label"
|
|
3055
3256
|
}, typeof children === "string" ? children : ""));
|
|
3056
3257
|
};
|
|
3057
|
-
return /* @__PURE__ */React__namespace.default.createElement(antd.Radio.Button, __spreadValues$
|
|
3258
|
+
return /* @__PURE__ */React__namespace.default.createElement(antd.Radio.Button, __spreadValues$f({
|
|
3058
3259
|
className: core.cx(className, RadioButtonStyle),
|
|
3059
3260
|
value: radioButtonValue
|
|
3060
3261
|
}, props), renderChildren());
|
|
3061
3262
|
};
|
|
3062
3263
|
|
|
3063
|
-
var __defProp$
|
|
3064
|
-
var __getOwnPropSymbols$
|
|
3065
|
-
var __hasOwnProp$
|
|
3066
|
-
var __propIsEnum$
|
|
3067
|
-
var __defNormalProp$
|
|
3068
|
-
var __spreadValues$
|
|
3264
|
+
var __defProp$e = Object.defineProperty;
|
|
3265
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
3266
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
3267
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
3268
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3269
|
+
var __spreadValues$e = (a, b) => {
|
|
3069
3270
|
for (var prop in b || (b = {}))
|
|
3070
|
-
if (__hasOwnProp$
|
|
3071
|
-
__defNormalProp$
|
|
3072
|
-
if (__getOwnPropSymbols$
|
|
3073
|
-
for (var prop of __getOwnPropSymbols$
|
|
3074
|
-
if (__propIsEnum$
|
|
3075
|
-
__defNormalProp$
|
|
3271
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
3272
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
3273
|
+
if (__getOwnPropSymbols$e)
|
|
3274
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
3275
|
+
if (__propIsEnum$e.call(b, prop))
|
|
3276
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
3076
3277
|
}
|
|
3077
3278
|
return a;
|
|
3078
3279
|
};
|
|
3079
3280
|
var __objRest$3 = (source, exclude) => {
|
|
3080
3281
|
var target = {};
|
|
3081
3282
|
for (var prop in source)
|
|
3082
|
-
if (__hasOwnProp$
|
|
3283
|
+
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3083
3284
|
target[prop] = source[prop];
|
|
3084
|
-
if (source != null && __getOwnPropSymbols$
|
|
3085
|
-
for (var prop of __getOwnPropSymbols$
|
|
3086
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3285
|
+
if (source != null && __getOwnPropSymbols$e)
|
|
3286
|
+
for (var prop of __getOwnPropSymbols$e(source)) {
|
|
3287
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
|
|
3087
3288
|
target[prop] = source[prop];
|
|
3088
3289
|
}
|
|
3089
3290
|
return target;
|
|
@@ -3093,7 +3294,7 @@
|
|
|
3093
3294
|
const onSearch = ___default.default.debounce(onChange, debounceWait);
|
|
3094
3295
|
return /* @__PURE__ */ React__namespace.default.createElement(
|
|
3095
3296
|
Input,
|
|
3096
|
-
__spreadValues$
|
|
3297
|
+
__spreadValues$e({
|
|
3097
3298
|
style: { width: 276 },
|
|
3098
3299
|
prefix: /* @__PURE__ */ React__namespace.default.createElement(icons.SearchOutlined, null),
|
|
3099
3300
|
onChange: (e) => onSearch(e.target.value)
|
|
@@ -3101,19 +3302,19 @@
|
|
|
3101
3302
|
);
|
|
3102
3303
|
};
|
|
3103
3304
|
|
|
3104
|
-
var __defProp$
|
|
3105
|
-
var __getOwnPropSymbols$
|
|
3106
|
-
var __hasOwnProp$
|
|
3107
|
-
var __propIsEnum$
|
|
3108
|
-
var __defNormalProp$
|
|
3109
|
-
var __spreadValues$
|
|
3305
|
+
var __defProp$d = Object.defineProperty;
|
|
3306
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
3307
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
3308
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
3309
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3310
|
+
var __spreadValues$d = (a, b) => {
|
|
3110
3311
|
for (var prop in b || (b = {}))
|
|
3111
|
-
if (__hasOwnProp$
|
|
3112
|
-
__defNormalProp$
|
|
3113
|
-
if (__getOwnPropSymbols$
|
|
3114
|
-
for (var prop of __getOwnPropSymbols$
|
|
3115
|
-
if (__propIsEnum$
|
|
3116
|
-
__defNormalProp$
|
|
3312
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
3313
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
3314
|
+
if (__getOwnPropSymbols$d)
|
|
3315
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
3316
|
+
if (__propIsEnum$d.call(b, prop))
|
|
3317
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
3117
3318
|
}
|
|
3118
3319
|
return a;
|
|
3119
3320
|
};
|
|
@@ -3127,7 +3328,7 @@
|
|
|
3127
3328
|
}) => {
|
|
3128
3329
|
const { t } = useParrotTranslation();
|
|
3129
3330
|
if (isEmpty(rawValue)) {
|
|
3130
|
-
return /* @__PURE__ */ React__namespace.default.createElement(Empty, __spreadValues$
|
|
3331
|
+
return /* @__PURE__ */ React__namespace.default.createElement(Empty, __spreadValues$d({}, emptyProps));
|
|
3131
3332
|
}
|
|
3132
3333
|
const { value, unit } = formatSeconds(rawValue, decimals);
|
|
3133
3334
|
return /* @__PURE__ */ React__namespace.default.createElement("span", null, /* @__PURE__ */ React__namespace.default.createElement("span", { className: core.cx("value", valueClassName) }, value, " "), /* @__PURE__ */ React__namespace.default.createElement("span", { className: core.cx("unit", unitClassName) }, t(`common.${abbreviate ? `${unit}_abbreviation` : unit}`)));
|
|
@@ -3209,19 +3410,19 @@
|
|
|
3209
3410
|
})));
|
|
3210
3411
|
};
|
|
3211
3412
|
|
|
3212
|
-
var __defProp$
|
|
3213
|
-
var __getOwnPropSymbols$
|
|
3214
|
-
var __hasOwnProp$
|
|
3215
|
-
var __propIsEnum$
|
|
3216
|
-
var __defNormalProp$
|
|
3217
|
-
var __spreadValues$
|
|
3413
|
+
var __defProp$c = Object.defineProperty;
|
|
3414
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
3415
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
3416
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
3417
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3418
|
+
var __spreadValues$c = (a, b) => {
|
|
3218
3419
|
for (var prop in b || (b = {}))
|
|
3219
|
-
if (__hasOwnProp$
|
|
3220
|
-
__defNormalProp$
|
|
3221
|
-
if (__getOwnPropSymbols$
|
|
3222
|
-
for (var prop of __getOwnPropSymbols$
|
|
3223
|
-
if (__propIsEnum$
|
|
3224
|
-
__defNormalProp$
|
|
3420
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
3421
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
3422
|
+
if (__getOwnPropSymbols$c)
|
|
3423
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
3424
|
+
if (__propIsEnum$c.call(b, prop))
|
|
3425
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
3225
3426
|
}
|
|
3226
3427
|
return a;
|
|
3227
3428
|
};
|
|
@@ -3233,37 +3434,37 @@
|
|
|
3233
3434
|
emptyProps
|
|
3234
3435
|
}) => {
|
|
3235
3436
|
if (isEmpty(rawValue)) {
|
|
3236
|
-
return /* @__PURE__ */ React__namespace.default.createElement(Empty, __spreadValues$
|
|
3437
|
+
return /* @__PURE__ */ React__namespace.default.createElement(Empty, __spreadValues$c({}, emptyProps));
|
|
3237
3438
|
}
|
|
3238
3439
|
const { value, unit } = formatSpeed(rawValue, decimals);
|
|
3239
3440
|
return /* @__PURE__ */ React__namespace.default.createElement("span", null, /* @__PURE__ */ React__namespace.default.createElement("span", { className: core.cx("value", valueClassName) }, value), /* @__PURE__ */ React__namespace.default.createElement("span", { className: core.cx("unit", unitClassName) }, ` ${unit}`));
|
|
3240
3441
|
};
|
|
3241
3442
|
|
|
3242
|
-
var __defProp$
|
|
3243
|
-
var __defProps$
|
|
3244
|
-
var __getOwnPropDescs$
|
|
3245
|
-
var __getOwnPropSymbols$
|
|
3246
|
-
var __hasOwnProp$
|
|
3247
|
-
var __propIsEnum$
|
|
3248
|
-
var __defNormalProp$
|
|
3443
|
+
var __defProp$b = Object.defineProperty;
|
|
3444
|
+
var __defProps$b = Object.defineProperties;
|
|
3445
|
+
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
|
|
3446
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
3447
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
3448
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
3449
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, {
|
|
3249
3450
|
enumerable: true,
|
|
3250
3451
|
configurable: true,
|
|
3251
3452
|
writable: true,
|
|
3252
3453
|
value
|
|
3253
3454
|
}) : obj[key] = value;
|
|
3254
|
-
var __spreadValues$
|
|
3255
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$
|
|
3256
|
-
if (__getOwnPropSymbols$
|
|
3257
|
-
if (__propIsEnum$
|
|
3455
|
+
var __spreadValues$b = (a, b) => {
|
|
3456
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$b.call(b, prop)) __defNormalProp$b(a, prop, b[prop]);
|
|
3457
|
+
if (__getOwnPropSymbols$b) for (var prop of __getOwnPropSymbols$b(b)) {
|
|
3458
|
+
if (__propIsEnum$b.call(b, prop)) __defNormalProp$b(a, prop, b[prop]);
|
|
3258
3459
|
}
|
|
3259
3460
|
return a;
|
|
3260
3461
|
};
|
|
3261
|
-
var __spreadProps$
|
|
3462
|
+
var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
|
|
3262
3463
|
var __objRest$2 = (source, exclude) => {
|
|
3263
3464
|
var target = {};
|
|
3264
|
-
for (var prop in source) if (__hasOwnProp$
|
|
3265
|
-
if (source != null && __getOwnPropSymbols$
|
|
3266
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3465
|
+
for (var prop in source) if (__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
3466
|
+
if (source != null && __getOwnPropSymbols$b) for (var prop of __getOwnPropSymbols$b(source)) {
|
|
3467
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop)) target[prop] = source[prop];
|
|
3267
3468
|
}
|
|
3268
3469
|
return target;
|
|
3269
3470
|
};
|
|
@@ -3285,40 +3486,40 @@
|
|
|
3285
3486
|
}, count) : null, _step.title);
|
|
3286
3487
|
return /* @__PURE__ */React__namespace.default.createElement(StepsContainer, {
|
|
3287
3488
|
className: containerClassname
|
|
3288
|
-
}, /* @__PURE__ */React__namespace.default.createElement(antd.Steps, __spreadProps$
|
|
3489
|
+
}, /* @__PURE__ */React__namespace.default.createElement(antd.Steps, __spreadProps$b(__spreadValues$b({}, stepsProps), {
|
|
3289
3490
|
type: "default"
|
|
3290
|
-
}), (stepsConfig == null ? void 0 : stepsConfig.length) ? stepsConfig.map((step, index) => /* @__PURE__ */React__namespace.default.createElement(antd.Steps.Step, __spreadProps$
|
|
3491
|
+
}), (stepsConfig == null ? void 0 : stepsConfig.length) ? stepsConfig.map((step, index) => /* @__PURE__ */React__namespace.default.createElement(antd.Steps.Step, __spreadProps$b(__spreadValues$b({
|
|
3291
3492
|
key: index
|
|
3292
3493
|
}, step), {
|
|
3293
3494
|
title: titleWithCount(step, index + 1)
|
|
3294
3495
|
}))) : props.children));
|
|
3295
3496
|
};
|
|
3296
3497
|
|
|
3297
|
-
var __defProp$
|
|
3298
|
-
var __defProps$
|
|
3299
|
-
var __getOwnPropDescs$
|
|
3300
|
-
var __getOwnPropSymbols$
|
|
3301
|
-
var __hasOwnProp$
|
|
3302
|
-
var __propIsEnum$
|
|
3303
|
-
var __defNormalProp$
|
|
3498
|
+
var __defProp$a = Object.defineProperty;
|
|
3499
|
+
var __defProps$a = Object.defineProperties;
|
|
3500
|
+
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
|
|
3501
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
3502
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
3503
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
3504
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, {
|
|
3304
3505
|
enumerable: true,
|
|
3305
3506
|
configurable: true,
|
|
3306
3507
|
writable: true,
|
|
3307
3508
|
value
|
|
3308
3509
|
}) : obj[key] = value;
|
|
3309
|
-
var __spreadValues$
|
|
3310
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$
|
|
3311
|
-
if (__getOwnPropSymbols$
|
|
3312
|
-
if (__propIsEnum$
|
|
3510
|
+
var __spreadValues$a = (a, b) => {
|
|
3511
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$a.call(b, prop)) __defNormalProp$a(a, prop, b[prop]);
|
|
3512
|
+
if (__getOwnPropSymbols$a) for (var prop of __getOwnPropSymbols$a(b)) {
|
|
3513
|
+
if (__propIsEnum$a.call(b, prop)) __defNormalProp$a(a, prop, b[prop]);
|
|
3313
3514
|
}
|
|
3314
3515
|
return a;
|
|
3315
3516
|
};
|
|
3316
|
-
var __spreadProps$
|
|
3517
|
+
var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
|
|
3317
3518
|
var __objRest$1 = (source, exclude) => {
|
|
3318
3519
|
var target = {};
|
|
3319
|
-
for (var prop in source) if (__hasOwnProp$
|
|
3320
|
-
if (source != null && __getOwnPropSymbols$
|
|
3321
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3520
|
+
for (var prop in source) if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
3521
|
+
if (source != null && __getOwnPropSymbols$a) for (var prop of __getOwnPropSymbols$a(source)) {
|
|
3522
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop)) target[prop] = source[prop];
|
|
3322
3523
|
}
|
|
3323
3524
|
return target;
|
|
3324
3525
|
};
|
|
@@ -3338,7 +3539,7 @@
|
|
|
3338
3539
|
});
|
|
3339
3540
|
const classNames = [className, SwitchStyle, "switch"];
|
|
3340
3541
|
if (props.size === "large") classNames.push("ant-switch-large");
|
|
3341
|
-
return /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */React__namespace.default.createElement(antd.Switch, __spreadProps$
|
|
3542
|
+
return /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */React__namespace.default.createElement(antd.Switch, __spreadProps$a(__spreadValues$a({
|
|
3342
3543
|
className: core.cx(...classNames),
|
|
3343
3544
|
checked: checked || false
|
|
3344
3545
|
}, props), {
|
|
@@ -3424,26 +3625,26 @@
|
|
|
3424
3625
|
}));
|
|
3425
3626
|
};
|
|
3426
3627
|
|
|
3427
|
-
var __defProp$
|
|
3428
|
-
var __defProps$
|
|
3429
|
-
var __getOwnPropDescs$
|
|
3430
|
-
var __getOwnPropSymbols$
|
|
3431
|
-
var __hasOwnProp$
|
|
3432
|
-
var __propIsEnum$
|
|
3433
|
-
var __defNormalProp$
|
|
3628
|
+
var __defProp$9 = Object.defineProperty;
|
|
3629
|
+
var __defProps$9 = Object.defineProperties;
|
|
3630
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
3631
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
3632
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
3633
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
3634
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, {
|
|
3434
3635
|
enumerable: true,
|
|
3435
3636
|
configurable: true,
|
|
3436
3637
|
writable: true,
|
|
3437
3638
|
value
|
|
3438
3639
|
}) : obj[key] = value;
|
|
3439
|
-
var __spreadValues$
|
|
3440
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$
|
|
3441
|
-
if (__getOwnPropSymbols$
|
|
3442
|
-
if (__propIsEnum$
|
|
3640
|
+
var __spreadValues$9 = (a, b) => {
|
|
3641
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$9.call(b, prop)) __defNormalProp$9(a, prop, b[prop]);
|
|
3642
|
+
if (__getOwnPropSymbols$9) for (var prop of __getOwnPropSymbols$9(b)) {
|
|
3643
|
+
if (__propIsEnum$9.call(b, prop)) __defNormalProp$9(a, prop, b[prop]);
|
|
3443
3644
|
}
|
|
3444
3645
|
return a;
|
|
3445
3646
|
};
|
|
3446
|
-
var __spreadProps$
|
|
3647
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
3447
3648
|
const TableContainerStyle = "t1upn1sz";
|
|
3448
3649
|
const tableStyleCover = "tta5kd2";
|
|
3449
3650
|
const Table = props => {
|
|
@@ -3464,13 +3665,14 @@
|
|
|
3464
3665
|
initLoading,
|
|
3465
3666
|
rowKey,
|
|
3466
3667
|
wrapper,
|
|
3467
|
-
pagination
|
|
3668
|
+
pagination,
|
|
3669
|
+
onRow
|
|
3468
3670
|
} = props;
|
|
3469
3671
|
const orderRef = React.useRef(null);
|
|
3470
3672
|
const hasScrollBard = useTableBodyHasScrollBar(wrapper, dataSource);
|
|
3471
3673
|
const _columns = React.useMemo(() => columns.map(column => {
|
|
3472
|
-
const _column = __spreadValues$
|
|
3473
|
-
if (_column.sorter) {
|
|
3674
|
+
const _column = __spreadValues$9({}, column);
|
|
3675
|
+
if (_column.sorter && typeof _column.title !== "function") {
|
|
3474
3676
|
_column.title = /* @__PURE__ */React__namespace.default.createElement(ColumnTitle, {
|
|
3475
3677
|
title: column.title,
|
|
3476
3678
|
sortOrder: column.sortOrder
|
|
@@ -3506,12 +3708,12 @@
|
|
|
3506
3708
|
onSorterChange == null ? void 0 : onSorterChange(orderRef.current, sorter.columnKey);
|
|
3507
3709
|
}
|
|
3508
3710
|
},
|
|
3509
|
-
onRow: (record, index) => ({
|
|
3711
|
+
onRow: (record, index) => __spreadValues$9({
|
|
3510
3712
|
onClick: evt => onRowClick == null ? void 0 : onRowClick(record, index, evt)
|
|
3511
|
-
}),
|
|
3713
|
+
}, onRow == null ? void 0 : onRow(record, index)),
|
|
3512
3714
|
rowClassName,
|
|
3513
3715
|
scroll,
|
|
3514
|
-
rowSelection: rowSelection && __spreadProps$
|
|
3716
|
+
rowSelection: rowSelection && __spreadProps$9(__spreadValues$9({}, rowSelection), {
|
|
3515
3717
|
columnWidth: 32
|
|
3516
3718
|
}),
|
|
3517
3719
|
showSorterTooltip: false
|
|
@@ -3573,33 +3775,33 @@
|
|
|
3573
3775
|
return sortArr;
|
|
3574
3776
|
};
|
|
3575
3777
|
|
|
3576
|
-
var __defProp$
|
|
3577
|
-
var __defProps$
|
|
3578
|
-
var __getOwnPropDescs$
|
|
3579
|
-
var __getOwnPropSymbols$
|
|
3580
|
-
var __hasOwnProp$
|
|
3581
|
-
var __propIsEnum$
|
|
3582
|
-
var __defNormalProp$
|
|
3583
|
-
var __spreadValues$
|
|
3778
|
+
var __defProp$8 = Object.defineProperty;
|
|
3779
|
+
var __defProps$8 = Object.defineProperties;
|
|
3780
|
+
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
3781
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
3782
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
3783
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
3784
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3785
|
+
var __spreadValues$8 = (a, b) => {
|
|
3584
3786
|
for (var prop in b || (b = {}))
|
|
3585
|
-
if (__hasOwnProp$
|
|
3586
|
-
__defNormalProp$
|
|
3587
|
-
if (__getOwnPropSymbols$
|
|
3588
|
-
for (var prop of __getOwnPropSymbols$
|
|
3589
|
-
if (__propIsEnum$
|
|
3590
|
-
__defNormalProp$
|
|
3787
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
3788
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
3789
|
+
if (__getOwnPropSymbols$8)
|
|
3790
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
3791
|
+
if (__propIsEnum$8.call(b, prop))
|
|
3792
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
3591
3793
|
}
|
|
3592
3794
|
return a;
|
|
3593
3795
|
};
|
|
3594
|
-
var __spreadProps$
|
|
3796
|
+
var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
|
|
3595
3797
|
var __objRest = (source, exclude) => {
|
|
3596
3798
|
var target = {};
|
|
3597
3799
|
for (var prop in source)
|
|
3598
|
-
if (__hasOwnProp$
|
|
3800
|
+
if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3599
3801
|
target[prop] = source[prop];
|
|
3600
|
-
if (source != null && __getOwnPropSymbols$
|
|
3601
|
-
for (var prop of __getOwnPropSymbols$
|
|
3602
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3802
|
+
if (source != null && __getOwnPropSymbols$8)
|
|
3803
|
+
for (var prop of __getOwnPropSymbols$8(source)) {
|
|
3804
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
|
|
3603
3805
|
target[prop] = source[prop];
|
|
3604
3806
|
}
|
|
3605
3807
|
return target;
|
|
@@ -3640,9 +3842,9 @@
|
|
|
3640
3842
|
if (!columns.length) {
|
|
3641
3843
|
return null;
|
|
3642
3844
|
}
|
|
3643
|
-
return CustomizedButton ? /* @__PURE__ */ React__namespace.default.createElement(CustomizedButton, __spreadValues$
|
|
3845
|
+
return CustomizedButton ? /* @__PURE__ */ React__namespace.default.createElement(CustomizedButton, __spreadValues$8({}, props)) : /* @__PURE__ */ React__namespace.default.createElement(AddRowButtonWrapper, { className }, /* @__PURE__ */ React__namespace.default.createElement(
|
|
3644
3846
|
Button,
|
|
3645
|
-
__spreadProps$
|
|
3847
|
+
__spreadProps$8(__spreadValues$8({}, restButtonProps), {
|
|
3646
3848
|
type: restButtonProps.type || "ordinary",
|
|
3647
3849
|
size: restButtonProps.size || "small",
|
|
3648
3850
|
icon: restButtonProps.icon || /* @__PURE__ */ React__namespace.default.createElement(icons.PlusOutlined, null),
|
|
@@ -3737,25 +3939,25 @@
|
|
|
3737
3939
|
);
|
|
3738
3940
|
};
|
|
3739
3941
|
|
|
3740
|
-
var __defProp$
|
|
3741
|
-
var __defProps$
|
|
3742
|
-
var __getOwnPropDescs$
|
|
3743
|
-
var __getOwnPropSymbols$
|
|
3744
|
-
var __hasOwnProp$
|
|
3745
|
-
var __propIsEnum$
|
|
3746
|
-
var __defNormalProp$
|
|
3747
|
-
var __spreadValues$
|
|
3942
|
+
var __defProp$7 = Object.defineProperty;
|
|
3943
|
+
var __defProps$7 = Object.defineProperties;
|
|
3944
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
3945
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
3946
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
3947
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
3948
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3949
|
+
var __spreadValues$7 = (a, b) => {
|
|
3748
3950
|
for (var prop in b || (b = {}))
|
|
3749
|
-
if (__hasOwnProp$
|
|
3750
|
-
__defNormalProp$
|
|
3751
|
-
if (__getOwnPropSymbols$
|
|
3752
|
-
for (var prop of __getOwnPropSymbols$
|
|
3753
|
-
if (__propIsEnum$
|
|
3754
|
-
__defNormalProp$
|
|
3951
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
3952
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
3953
|
+
if (__getOwnPropSymbols$7)
|
|
3954
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
3955
|
+
if (__propIsEnum$7.call(b, prop))
|
|
3956
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
3755
3957
|
}
|
|
3756
3958
|
return a;
|
|
3757
3959
|
};
|
|
3758
|
-
var __spreadProps$
|
|
3960
|
+
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
3759
3961
|
const InputPassword = (props) => {
|
|
3760
3962
|
const [showPassword, setShowPassword] = React.useState(false);
|
|
3761
3963
|
React.useEffect(() => {
|
|
@@ -3771,7 +3973,7 @@
|
|
|
3771
3973
|
const inputType = showPassword ? "text" : "password";
|
|
3772
3974
|
return /* @__PURE__ */ React__namespace.default.createElement(
|
|
3773
3975
|
antd.Input,
|
|
3774
|
-
__spreadProps$
|
|
3976
|
+
__spreadProps$7(__spreadValues$7({}, props), {
|
|
3775
3977
|
type: inputType,
|
|
3776
3978
|
suffix: showPassword ? /* @__PURE__ */ React__namespace.default.createElement(
|
|
3777
3979
|
icons.EyeOutlined,
|
|
@@ -3791,9 +3993,9 @@
|
|
|
3791
3993
|
};
|
|
3792
3994
|
const CustomInput = (props) => {
|
|
3793
3995
|
if (props.type === "password") {
|
|
3794
|
-
return /* @__PURE__ */ React__namespace.default.createElement(InputPassword, __spreadValues$
|
|
3996
|
+
return /* @__PURE__ */ React__namespace.default.createElement(InputPassword, __spreadValues$7({}, props));
|
|
3795
3997
|
}
|
|
3796
|
-
return /* @__PURE__ */ React__namespace.default.createElement(antd.Input, __spreadValues$
|
|
3998
|
+
return /* @__PURE__ */ React__namespace.default.createElement(antd.Input, __spreadValues$7({}, props));
|
|
3797
3999
|
};
|
|
3798
4000
|
const InputColumnHeaderCell = ({ disabled, column, onChange, onBlur, onVisibleChange }) => {
|
|
3799
4001
|
const _onChange = (e) => {
|
|
@@ -3915,25 +4117,25 @@
|
|
|
3915
4117
|
return ValidateTriggerType2;
|
|
3916
4118
|
})(ValidateTriggerType || {});
|
|
3917
4119
|
|
|
3918
|
-
var __defProp$
|
|
3919
|
-
var __defProps$
|
|
3920
|
-
var __getOwnPropDescs$
|
|
3921
|
-
var __getOwnPropSymbols$
|
|
3922
|
-
var __hasOwnProp$
|
|
3923
|
-
var __propIsEnum$
|
|
3924
|
-
var __defNormalProp$
|
|
3925
|
-
var __spreadValues$
|
|
4120
|
+
var __defProp$6 = Object.defineProperty;
|
|
4121
|
+
var __defProps$6 = Object.defineProperties;
|
|
4122
|
+
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
4123
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
4124
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
4125
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
4126
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4127
|
+
var __spreadValues$6 = (a, b) => {
|
|
3926
4128
|
for (var prop in b || (b = {}))
|
|
3927
|
-
if (__hasOwnProp$
|
|
3928
|
-
__defNormalProp$
|
|
3929
|
-
if (__getOwnPropSymbols$
|
|
3930
|
-
for (var prop of __getOwnPropSymbols$
|
|
3931
|
-
if (__propIsEnum$
|
|
3932
|
-
__defNormalProp$
|
|
4129
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
4130
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
4131
|
+
if (__getOwnPropSymbols$6)
|
|
4132
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
4133
|
+
if (__propIsEnum$6.call(b, prop))
|
|
4134
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
3933
4135
|
}
|
|
3934
4136
|
return a;
|
|
3935
4137
|
};
|
|
3936
|
-
var __spreadProps$
|
|
4138
|
+
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
3937
4139
|
const TableFormBodyCell = (props) => {
|
|
3938
4140
|
const {
|
|
3939
4141
|
column,
|
|
@@ -3955,7 +4157,7 @@
|
|
|
3955
4157
|
(currentValue) => {
|
|
3956
4158
|
var _a;
|
|
3957
4159
|
const value = currentValue || data[rowIndex][column.key];
|
|
3958
|
-
const rowData = __spreadProps$
|
|
4160
|
+
const rowData = __spreadProps$6(__spreadValues$6({}, data[rowIndex]), { [column.key]: value });
|
|
3959
4161
|
const rowValidateRes = getRowValidateResult(rowData);
|
|
3960
4162
|
if (rowValidateRes) {
|
|
3961
4163
|
return;
|
|
@@ -3978,7 +4180,7 @@
|
|
|
3978
4180
|
}, [validateAll, triggerValidate]);
|
|
3979
4181
|
const _onChange = (value, data2) => {
|
|
3980
4182
|
const newData = data2.map(
|
|
3981
|
-
(row, i) => i === rowIndex ? __spreadProps$
|
|
4183
|
+
(row, i) => i === rowIndex ? __spreadProps$6(__spreadValues$6({}, row), { [column.key]: value }) : row
|
|
3982
4184
|
);
|
|
3983
4185
|
onChange == null ? void 0 : onChange(newData, rowIndex, column.key);
|
|
3984
4186
|
if (validateTriggerType === ValidateTriggerType.Normal && isTouched.current || validateTriggerType === ValidateTriggerType.Aggressive) {
|
|
@@ -4055,25 +4257,25 @@
|
|
|
4055
4257
|
);
|
|
4056
4258
|
};
|
|
4057
4259
|
|
|
4058
|
-
var __defProp$
|
|
4059
|
-
var __defProps$
|
|
4060
|
-
var __getOwnPropDescs$
|
|
4061
|
-
var __getOwnPropSymbols$
|
|
4062
|
-
var __hasOwnProp$
|
|
4063
|
-
var __propIsEnum$
|
|
4064
|
-
var __defNormalProp$
|
|
4065
|
-
var __spreadValues$
|
|
4260
|
+
var __defProp$5 = Object.defineProperty;
|
|
4261
|
+
var __defProps$5 = Object.defineProperties;
|
|
4262
|
+
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
4263
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
4264
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
4265
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
4266
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4267
|
+
var __spreadValues$5 = (a, b) => {
|
|
4066
4268
|
for (var prop in b || (b = {}))
|
|
4067
|
-
if (__hasOwnProp$
|
|
4068
|
-
__defNormalProp$
|
|
4069
|
-
if (__getOwnPropSymbols$
|
|
4070
|
-
for (var prop of __getOwnPropSymbols$
|
|
4071
|
-
if (__propIsEnum$
|
|
4072
|
-
__defNormalProp$
|
|
4269
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
4270
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
4271
|
+
if (__getOwnPropSymbols$5)
|
|
4272
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
4273
|
+
if (__propIsEnum$5.call(b, prop))
|
|
4274
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
4073
4275
|
}
|
|
4074
4276
|
return a;
|
|
4075
4277
|
};
|
|
4076
|
-
var __spreadProps$
|
|
4278
|
+
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
4077
4279
|
const TableFormRow = (props) => {
|
|
4078
4280
|
const {
|
|
4079
4281
|
data,
|
|
@@ -4156,7 +4358,7 @@
|
|
|
4156
4358
|
);
|
|
4157
4359
|
});
|
|
4158
4360
|
const DraggableHandle = React.useMemo(
|
|
4159
|
-
() => draggable && provided ? /* @__PURE__ */ React__namespace.default.createElement(DraggableHandleWrapper, __spreadValues$
|
|
4361
|
+
() => draggable && provided ? /* @__PURE__ */ React__namespace.default.createElement(DraggableHandleWrapper, __spreadValues$5({}, provided.dragHandleProps), /* @__PURE__ */ React__namespace.default.createElement(
|
|
4160
4362
|
Icon,
|
|
4161
4363
|
{
|
|
4162
4364
|
src: iconsReact.HandlePoint816SecondaryIcon,
|
|
@@ -4205,7 +4407,7 @@
|
|
|
4205
4407
|
);
|
|
4206
4408
|
return draggable ? /* @__PURE__ */ React__namespace.default.createElement(reactBeautifulDnd.DragDropContext, { onDragEnd }, /* @__PURE__ */ React__namespace.default.createElement(reactBeautifulDnd.Droppable, { droppableId: "droppable" }, (provided) => /* @__PURE__ */ React__namespace.default.createElement(
|
|
4207
4409
|
"div",
|
|
4208
|
-
__spreadValues$
|
|
4410
|
+
__spreadValues$5({
|
|
4209
4411
|
className: "draggable-container",
|
|
4210
4412
|
ref: provided.innerRef
|
|
4211
4413
|
}, provided.droppableProps),
|
|
@@ -4216,9 +4418,9 @@
|
|
|
4216
4418
|
key: `draggable-id-${i}`,
|
|
4217
4419
|
index: i
|
|
4218
4420
|
},
|
|
4219
|
-
(provided2, snapshot) => /* @__PURE__ */ React__namespace.default.createElement("div", __spreadValues$
|
|
4421
|
+
(provided2, snapshot) => /* @__PURE__ */ React__namespace.default.createElement("div", __spreadValues$5({ ref: provided2.innerRef }, provided2.draggableProps), /* @__PURE__ */ React__namespace.default.createElement(
|
|
4220
4422
|
TableFormRow,
|
|
4221
|
-
__spreadProps$
|
|
4423
|
+
__spreadProps$5(__spreadValues$5({}, props), {
|
|
4222
4424
|
rowIndex: i,
|
|
4223
4425
|
provided: provided2,
|
|
4224
4426
|
snapshot
|
|
@@ -4226,28 +4428,28 @@
|
|
|
4226
4428
|
))
|
|
4227
4429
|
)),
|
|
4228
4430
|
provided.placeholder
|
|
4229
|
-
))) : /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, data.map((_d, i) => /* @__PURE__ */ React__namespace.default.createElement(TableFormRow, __spreadProps$
|
|
4431
|
+
))) : /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, data.map((_d, i) => /* @__PURE__ */ React__namespace.default.createElement(TableFormRow, __spreadProps$5(__spreadValues$5({}, props), { rowIndex: i, key: `table-row-${i}` }))));
|
|
4230
4432
|
});
|
|
4231
4433
|
|
|
4232
|
-
var __defProp$
|
|
4233
|
-
var __defProps$
|
|
4234
|
-
var __getOwnPropDescs$
|
|
4235
|
-
var __getOwnPropSymbols$
|
|
4236
|
-
var __hasOwnProp$
|
|
4237
|
-
var __propIsEnum$
|
|
4238
|
-
var __defNormalProp$
|
|
4239
|
-
var __spreadValues$
|
|
4434
|
+
var __defProp$4 = Object.defineProperty;
|
|
4435
|
+
var __defProps$4 = Object.defineProperties;
|
|
4436
|
+
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
4437
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
4438
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
4439
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
4440
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4441
|
+
var __spreadValues$4 = (a, b) => {
|
|
4240
4442
|
for (var prop in b || (b = {}))
|
|
4241
|
-
if (__hasOwnProp$
|
|
4242
|
-
__defNormalProp$
|
|
4243
|
-
if (__getOwnPropSymbols$
|
|
4244
|
-
for (var prop of __getOwnPropSymbols$
|
|
4245
|
-
if (__propIsEnum$
|
|
4246
|
-
__defNormalProp$
|
|
4443
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
4444
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
4445
|
+
if (__getOwnPropSymbols$4)
|
|
4446
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
4447
|
+
if (__propIsEnum$4.call(b, prop))
|
|
4448
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
4247
4449
|
}
|
|
4248
4450
|
return a;
|
|
4249
4451
|
};
|
|
4250
|
-
var __spreadProps$
|
|
4452
|
+
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
4251
4453
|
const BatchInputListHeaderCell = (props) => {
|
|
4252
4454
|
const { column, disabled, data, disableBatchFilling, onBlur, onChange } = props;
|
|
4253
4455
|
const [errMsg, setErrMsg] = React.useState();
|
|
@@ -4259,7 +4461,7 @@
|
|
|
4259
4461
|
setErrMsg(err || void 0);
|
|
4260
4462
|
const shouldAutoIncrease = column.type !== "password" && column.autoIncrease;
|
|
4261
4463
|
const newData = data.map((cell, rowIndex) => {
|
|
4262
|
-
return __spreadProps$
|
|
4464
|
+
return __spreadProps$4(__spreadValues$4({}, cell), {
|
|
4263
4465
|
[column.key]: shouldAutoIncrease && typeof value === "string" ? increaseLastNumber(value, rowIndex) : value
|
|
4264
4466
|
});
|
|
4265
4467
|
});
|
|
@@ -4276,7 +4478,7 @@
|
|
|
4276
4478
|
const CellComponent = ColumnHeaderImpls[column.type];
|
|
4277
4479
|
return /* @__PURE__ */ React__namespace.default.createElement(
|
|
4278
4480
|
CellComponent,
|
|
4279
|
-
__spreadProps$
|
|
4481
|
+
__spreadProps$4(__spreadValues$4({}, props), {
|
|
4280
4482
|
column,
|
|
4281
4483
|
onChange: headerOnChange,
|
|
4282
4484
|
onBlur: _onBlur
|
|
@@ -4311,25 +4513,25 @@
|
|
|
4311
4513
|
);
|
|
4312
4514
|
};
|
|
4313
4515
|
|
|
4314
|
-
var __defProp$
|
|
4315
|
-
var __defProps$
|
|
4316
|
-
var __getOwnPropDescs$
|
|
4317
|
-
var __getOwnPropSymbols$
|
|
4318
|
-
var __hasOwnProp$
|
|
4319
|
-
var __propIsEnum$
|
|
4320
|
-
var __defNormalProp$
|
|
4321
|
-
var __spreadValues$
|
|
4516
|
+
var __defProp$3 = Object.defineProperty;
|
|
4517
|
+
var __defProps$3 = Object.defineProperties;
|
|
4518
|
+
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
4519
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
4520
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
4521
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
4522
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4523
|
+
var __spreadValues$3 = (a, b) => {
|
|
4322
4524
|
for (var prop in b || (b = {}))
|
|
4323
|
-
if (__hasOwnProp$
|
|
4324
|
-
__defNormalProp$
|
|
4325
|
-
if (__getOwnPropSymbols$
|
|
4326
|
-
for (var prop of __getOwnPropSymbols$
|
|
4327
|
-
if (__propIsEnum$
|
|
4328
|
-
__defNormalProp$
|
|
4525
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
4526
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
4527
|
+
if (__getOwnPropSymbols$3)
|
|
4528
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
4529
|
+
if (__propIsEnum$3.call(b, prop))
|
|
4530
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
4329
4531
|
}
|
|
4330
4532
|
return a;
|
|
4331
4533
|
};
|
|
4332
|
-
var __spreadProps$
|
|
4534
|
+
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
4333
4535
|
const DEFAULT_ROW_COUNT = 3;
|
|
4334
4536
|
const TableForm = React__namespace.default.forwardRef(
|
|
4335
4537
|
({
|
|
@@ -4386,7 +4588,7 @@
|
|
|
4386
4588
|
(key, error) => {
|
|
4387
4589
|
if (error) {
|
|
4388
4590
|
const newData = latestData.map((cell) => {
|
|
4389
|
-
return __spreadProps$
|
|
4591
|
+
return __spreadProps$3(__spreadValues$3({}, cell), {
|
|
4390
4592
|
[key]: ""
|
|
4391
4593
|
});
|
|
4392
4594
|
});
|
|
@@ -4764,172 +4966,6 @@
|
|
|
4764
4966
|
}, refetchText || t("common.retry")));
|
|
4765
4967
|
};
|
|
4766
4968
|
|
|
4767
|
-
var __defProp$4 = Object.defineProperty;
|
|
4768
|
-
var __defProps$4 = Object.defineProperties;
|
|
4769
|
-
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
4770
|
-
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
4771
|
-
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
4772
|
-
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
4773
|
-
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4774
|
-
var __spreadValues$4 = (a, b) => {
|
|
4775
|
-
for (var prop in b || (b = {}))
|
|
4776
|
-
if (__hasOwnProp$4.call(b, prop))
|
|
4777
|
-
__defNormalProp$4(a, prop, b[prop]);
|
|
4778
|
-
if (__getOwnPropSymbols$4)
|
|
4779
|
-
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
4780
|
-
if (__propIsEnum$4.call(b, prop))
|
|
4781
|
-
__defNormalProp$4(a, prop, b[prop]);
|
|
4782
|
-
}
|
|
4783
|
-
return a;
|
|
4784
|
-
};
|
|
4785
|
-
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
4786
|
-
const initialChartState = {
|
|
4787
|
-
pointers: {},
|
|
4788
|
-
resourceData: {},
|
|
4789
|
-
averageData: {}
|
|
4790
|
-
};
|
|
4791
|
-
const chartReducer = (state = initialChartState, action) => {
|
|
4792
|
-
switch (action.type) {
|
|
4793
|
-
case "SET_POINTER" /* SET_POINTER */: {
|
|
4794
|
-
const { uuid, left, text, visible, value } = action.payload;
|
|
4795
|
-
return __spreadProps$4(__spreadValues$4({}, state), {
|
|
4796
|
-
pointers: __spreadProps$4(__spreadValues$4({}, state.pointers), {
|
|
4797
|
-
[uuid]: {
|
|
4798
|
-
left,
|
|
4799
|
-
text,
|
|
4800
|
-
visible,
|
|
4801
|
-
value
|
|
4802
|
-
}
|
|
4803
|
-
})
|
|
4804
|
-
});
|
|
4805
|
-
}
|
|
4806
|
-
case "SET_RESOURCE_DATA" /* SET_RESOURCE_DATA */: {
|
|
4807
|
-
const { uuid, data } = action.payload;
|
|
4808
|
-
return __spreadProps$4(__spreadValues$4({}, state), {
|
|
4809
|
-
resourceData: __spreadProps$4(__spreadValues$4({}, state.resourceData), {
|
|
4810
|
-
[uuid]: data
|
|
4811
|
-
})
|
|
4812
|
-
});
|
|
4813
|
-
}
|
|
4814
|
-
case "SET_AVERAGE_DATA" /* SET_AVERAGE_DATA */: {
|
|
4815
|
-
const { uuid, average } = action.payload;
|
|
4816
|
-
return __spreadProps$4(__spreadValues$4({}, state), {
|
|
4817
|
-
averageData: __spreadProps$4(__spreadValues$4({}, state.averageData), {
|
|
4818
|
-
[uuid]: average
|
|
4819
|
-
})
|
|
4820
|
-
});
|
|
4821
|
-
}
|
|
4822
|
-
default: {
|
|
4823
|
-
return state;
|
|
4824
|
-
}
|
|
4825
|
-
}
|
|
4826
|
-
};
|
|
4827
|
-
|
|
4828
|
-
var __defProp$3 = Object.defineProperty;
|
|
4829
|
-
var __defProps$3 = Object.defineProperties;
|
|
4830
|
-
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
4831
|
-
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
4832
|
-
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
4833
|
-
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
4834
|
-
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4835
|
-
var __spreadValues$3 = (a, b) => {
|
|
4836
|
-
for (var prop in b || (b = {}))
|
|
4837
|
-
if (__hasOwnProp$3.call(b, prop))
|
|
4838
|
-
__defNormalProp$3(a, prop, b[prop]);
|
|
4839
|
-
if (__getOwnPropSymbols$3)
|
|
4840
|
-
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
4841
|
-
if (__propIsEnum$3.call(b, prop))
|
|
4842
|
-
__defNormalProp$3(a, prop, b[prop]);
|
|
4843
|
-
}
|
|
4844
|
-
return a;
|
|
4845
|
-
};
|
|
4846
|
-
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
4847
|
-
var ModalActions = /* @__PURE__ */ ((ModalActions2) => {
|
|
4848
|
-
ModalActions2["PUSH_MODAL"] = "PUSH_MODAL";
|
|
4849
|
-
ModalActions2["POP_MODAL"] = "POP_MODAL";
|
|
4850
|
-
ModalActions2["REMOVE_MODAL"] = "REMOVE_MODAL";
|
|
4851
|
-
ModalActions2["CLOSE_MODAL"] = "CLOSE_MODAL";
|
|
4852
|
-
return ModalActions2;
|
|
4853
|
-
})(ModalActions || {});
|
|
4854
|
-
const initialModalState = {
|
|
4855
|
-
stack: [],
|
|
4856
|
-
closeId: 0
|
|
4857
|
-
};
|
|
4858
|
-
let MODAL_ID = 1;
|
|
4859
|
-
const modalReducer = (state = initialModalState, action) => {
|
|
4860
|
-
switch (action.type) {
|
|
4861
|
-
case "PUSH_MODAL" /* PUSH_MODAL */:
|
|
4862
|
-
if (state.stack.some(
|
|
4863
|
-
(modal) => modal.component === action.payload.component
|
|
4864
|
-
)) {
|
|
4865
|
-
return state;
|
|
4866
|
-
}
|
|
4867
|
-
return __spreadProps$3(__spreadValues$3({}, state), {
|
|
4868
|
-
stack: state.stack.concat(__spreadProps$3(__spreadValues$3({}, action.payload), {
|
|
4869
|
-
id: MODAL_ID++
|
|
4870
|
-
}))
|
|
4871
|
-
});
|
|
4872
|
-
case "POP_MODAL" /* POP_MODAL */:
|
|
4873
|
-
return __spreadProps$3(__spreadValues$3({}, state), {
|
|
4874
|
-
stack: state.stack.slice(0, -1)
|
|
4875
|
-
});
|
|
4876
|
-
case "REMOVE_MODAL" /* REMOVE_MODAL */:
|
|
4877
|
-
return __spreadProps$3(__spreadValues$3({}, state), {
|
|
4878
|
-
closeId: 0,
|
|
4879
|
-
stack: state.stack.filter((m) => m.id !== action.id)
|
|
4880
|
-
});
|
|
4881
|
-
case "CLOSE_MODAL" /* CLOSE_MODAL */:
|
|
4882
|
-
return __spreadProps$3(__spreadValues$3({}, state), {
|
|
4883
|
-
closeId: action.id
|
|
4884
|
-
});
|
|
4885
|
-
default:
|
|
4886
|
-
return state;
|
|
4887
|
-
}
|
|
4888
|
-
};
|
|
4889
|
-
|
|
4890
|
-
const appReducer = redux.combineReducers({
|
|
4891
|
-
chart: chartReducer,
|
|
4892
|
-
modal: modalReducer
|
|
4893
|
-
});
|
|
4894
|
-
const rootReducer = (state, action) => {
|
|
4895
|
-
if (action.type === "RESET_UI_KIT_STORE") {
|
|
4896
|
-
state = {
|
|
4897
|
-
modal: initialModalState,
|
|
4898
|
-
chart: initialChartState
|
|
4899
|
-
};
|
|
4900
|
-
}
|
|
4901
|
-
return appReducer(state, action);
|
|
4902
|
-
};
|
|
4903
|
-
const UIKitStore = redux.createStore(rootReducer);
|
|
4904
|
-
function pushModal(modal) {
|
|
4905
|
-
UIKitStore.dispatch({
|
|
4906
|
-
type: ModalActions.PUSH_MODAL,
|
|
4907
|
-
payload: modal
|
|
4908
|
-
});
|
|
4909
|
-
}
|
|
4910
|
-
function popModal() {
|
|
4911
|
-
UIKitStore.dispatch({
|
|
4912
|
-
type: ModalActions.POP_MODAL
|
|
4913
|
-
});
|
|
4914
|
-
}
|
|
4915
|
-
function closeModal(id) {
|
|
4916
|
-
UIKitStore.dispatch({
|
|
4917
|
-
type: ModalActions.CLOSE_MODAL,
|
|
4918
|
-
id
|
|
4919
|
-
});
|
|
4920
|
-
}
|
|
4921
|
-
|
|
4922
|
-
const ctx = React.createContext({
|
|
4923
|
-
store: UIKitStore,
|
|
4924
|
-
storeState: UIKitStore.getState()
|
|
4925
|
-
});
|
|
4926
|
-
const KitStoreProvider = (props) => {
|
|
4927
|
-
const { children } = props;
|
|
4928
|
-
return /* @__PURE__ */ React__namespace.default.createElement(reactRedux.Provider, { context: ctx, store: UIKitStore }, children);
|
|
4929
|
-
};
|
|
4930
|
-
const useKitDispatch = reactRedux.createDispatchHook(ctx);
|
|
4931
|
-
const useKitSelector = reactRedux.createSelectorHook(ctx);
|
|
4932
|
-
|
|
4933
4969
|
var __defProp$2 = Object.defineProperty;
|
|
4934
4970
|
var __defProps$2 = Object.defineProperties;
|
|
4935
4971
|
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
@@ -5102,10 +5138,6 @@
|
|
|
5102
5138
|
const stack = useKitSelector(
|
|
5103
5139
|
(state) => state.modal.stack
|
|
5104
5140
|
);
|
|
5105
|
-
const dispatch = useKitDispatch();
|
|
5106
|
-
const closeId = useKitSelector(
|
|
5107
|
-
(state) => state.modal.closeId
|
|
5108
|
-
);
|
|
5109
5141
|
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, stack.map((modal) => /* @__PURE__ */ React__namespace.default.createElement(
|
|
5110
5142
|
modal.component,
|
|
5111
5143
|
__spreadProps$1(__spreadValues$1({}, modal.props), {
|
|
@@ -5117,11 +5149,7 @@
|
|
|
5117
5149
|
}
|
|
5118
5150
|
closeModal(modal.id);
|
|
5119
5151
|
},
|
|
5120
|
-
key: modal.id
|
|
5121
|
-
removeModal: () => {
|
|
5122
|
-
dispatch({ type: ModalActions.REMOVE_MODAL, id: modal.id });
|
|
5123
|
-
},
|
|
5124
|
-
visible: closeId !== modal.id
|
|
5152
|
+
key: modal.id
|
|
5125
5153
|
})
|
|
5126
5154
|
)));
|
|
5127
5155
|
};
|
|
@@ -5192,8 +5220,6 @@
|
|
|
5192
5220
|
return React.useContext(kitContext);
|
|
5193
5221
|
};
|
|
5194
5222
|
|
|
5195
|
-
parrot.initParrotI18n();
|
|
5196
|
-
|
|
5197
5223
|
Object.defineProperty(exports, 'Col', {
|
|
5198
5224
|
enumerable: true,
|
|
5199
5225
|
get: function () { return antd.Col; }
|