@cloudtower/eagle 0.34.0 → 0.34.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/cjs/UIKitProvider/index.js +13 -18
- package/dist/cjs/core/Banner/banner.style.js +11 -0
- package/dist/cjs/core/Banner/index.js +32 -0
- package/dist/cjs/core/BasicCTError/BasicCTError.style.js +5 -0
- package/dist/cjs/core/BasicCTError/index.js +40 -0
- package/dist/cjs/core/ConfigProvider/index.js +8 -2
- package/dist/cjs/core/Fields/FieldsDateTimeRange/index.js +20 -3
- package/dist/cjs/core/ImmersiveDialog/index.js +188 -0
- package/dist/cjs/core/ImmersiveDialog/styles.js +31 -0
- package/dist/cjs/core/LineChart/LineChartLegend.js +7 -5
- package/dist/cjs/core/LineChart/TooltipFormatter.js +7 -6
- package/dist/cjs/core/MediumDialog/MediumDialog.js +54 -0
- package/dist/cjs/core/SmallDialog/SmallDialog.js +144 -0
- package/dist/cjs/core/SmallDialog/SmallDialog.style.js +11 -0
- package/dist/cjs/core/TableForm/AddRowButton.js +2 -2
- package/dist/cjs/core/TableForm/index.js +21 -6
- package/dist/cjs/core/Timeline/index.js +13 -7
- package/dist/cjs/core/WizardDialog/index.js +170 -0
- package/dist/cjs/core/WizardDialog/styles.js +11 -0
- package/dist/cjs/core/index.js +9 -9
- package/dist/cjs/core/message/index.js +5 -215
- package/dist/cjs/core/message/message.js +222 -0
- package/dist/cjs/core/message/useMessage.js +12 -0
- package/dist/cjs/core/message-group/index.js +2 -2
- package/dist/cjs/coreX/DateRangePicker/AbsoluteDate.js +2 -1
- package/dist/cjs/coreX/DateRangePicker/Calendar.js +78 -58
- package/dist/cjs/coreX/DateRangePicker/index.js +13 -1
- package/dist/cjs/coreX/DateRangePicker/utils.js +5 -0
- package/dist/cjs/coreX/Dialogs/DeleteDialog/DeleteDialog.js +5 -3
- package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.js +1 -1
- package/dist/cjs/coreX/KubeConfigModal/KubeConfigModal.style.js +29 -0
- package/dist/cjs/coreX/KubeConfigModal/index.js +102 -0
- package/dist/cjs/coreX/KubeConfigModal/utils.js +25 -0
- package/dist/cjs/hooks/useCTErrorMsg.js +25 -0
- package/dist/cjs/index.js +225 -197
- package/dist/cjs/legacy-antd.js +81 -81
- package/dist/cjs/stats1.html +1 -1
- package/dist/cjs/utils/cterror.js +64 -0
- package/dist/cjs/utils/unit.js +19 -0
- package/dist/components.css +3147 -3859
- package/dist/esm/UIKitProvider/index.js +3 -6
- package/dist/esm/core/Banner/banner.style.js +6 -0
- package/dist/esm/core/Banner/index.js +25 -0
- package/dist/esm/core/BasicCTError/BasicCTError.style.js +3 -0
- package/dist/esm/core/BasicCTError/index.js +34 -0
- package/dist/esm/core/ConfigProvider/index.js +9 -4
- package/dist/esm/core/Fields/FieldsDateTimeRange/index.js +20 -3
- package/dist/esm/core/ImmersiveDialog/index.js +182 -0
- package/dist/esm/core/ImmersiveDialog/styles.js +16 -0
- package/dist/esm/core/LineChart/LineChartLegend.js +4 -2
- package/dist/esm/core/LineChart/TooltipFormatter.js +7 -6
- package/dist/esm/core/MediumDialog/MediumDialog.js +48 -0
- package/dist/esm/core/SmallDialog/SmallDialog.js +137 -0
- package/dist/esm/core/SmallDialog/SmallDialog.style.js +6 -0
- package/dist/esm/core/TableForm/AddRowButton.js +2 -2
- package/dist/esm/core/TableForm/index.js +21 -6
- package/dist/esm/core/Timeline/index.js +13 -7
- package/dist/esm/core/WizardDialog/index.js +164 -0
- package/dist/esm/core/WizardDialog/styles.js +6 -0
- package/dist/esm/core/message/index.js +4 -184
- package/dist/esm/core/message/message.js +186 -0
- package/dist/esm/core/message/useMessage.js +9 -0
- package/dist/esm/core/message-group/index.js +1 -1
- package/dist/esm/coreX/DateRangePicker/AbsoluteDate.js +2 -1
- package/dist/esm/coreX/DateRangePicker/Calendar.js +79 -59
- package/dist/esm/coreX/DateRangePicker/index.js +13 -1
- package/dist/esm/coreX/DateRangePicker/utils.js +3 -0
- package/dist/esm/coreX/Dialogs/DeleteDialog/DeleteDialog.js +5 -3
- package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.js +1 -1
- package/dist/esm/coreX/KubeConfigModal/KubeConfigModal.style.js +20 -0
- package/dist/esm/coreX/KubeConfigModal/index.js +96 -0
- package/dist/esm/coreX/KubeConfigModal/utils.js +22 -0
- package/dist/esm/hooks/useCTErrorMsg.js +23 -0
- package/dist/esm/index.js +14 -5
- package/dist/esm/legacy-antd.js +1 -1
- package/dist/esm/stats1.html +1 -1
- package/dist/esm/utils/cterror.js +58 -0
- package/dist/esm/utils/unit.js +17 -0
- package/dist/linaria.merged.scss +3157 -2720
- package/dist/src/UIKitProvider/index.d.ts +1 -3
- package/dist/src/core/Antd5Flex/index.d.ts +2 -0
- package/dist/src/core/Antd5Tree/Antd5Tree.d.ts +1 -0
- package/dist/src/core/Antd5Tree/Antd5Tree.type.d.ts +4 -0
- package/dist/src/core/Antd5Tree/index.d.ts +2 -0
- package/dist/src/core/Banner/banner.style.d.ts +4 -0
- package/dist/src/core/Banner/banner.types.d.ts +28 -0
- package/dist/src/core/Banner/index.d.ts +3 -0
- package/dist/src/core/BasicCTError/BasicCTError.style.d.ts +1 -0
- package/dist/src/core/BasicCTError/BasicCTError.type.d.ts +56 -0
- package/dist/src/core/BasicCTError/index.d.ts +3 -0
- package/dist/src/core/ConfigProvider/index.d.ts +6 -1
- package/dist/src/core/ImmersiveDialog/index.d.ts +3 -0
- package/dist/src/core/ImmersiveDialog/styles.d.ts +14 -0
- package/dist/src/core/ImmersiveDialog/type.d.ts +37 -0
- package/dist/src/core/Input/index.d.ts +2 -4
- package/dist/src/core/Input/input.type.d.ts +4 -0
- package/dist/src/core/LineChart/type.d.ts +1 -0
- package/dist/src/core/MediumDialog/MediumDialog.d.ts +3 -0
- package/dist/src/core/MediumDialog/index.d.ts +1 -0
- package/dist/src/core/SmallDialog/SmallDialog.d.ts +3 -0
- package/dist/src/core/SmallDialog/SmallDialog.style.d.ts +4 -0
- package/dist/src/{coreX/Dialogs/SmallDialog.d.ts → core/SmallDialog/SmallDialog.type.d.ts} +12 -4
- package/dist/src/core/SmallDialog/index.d.ts +3 -0
- package/dist/src/core/TableForm/types.d.ts +7 -2
- package/dist/src/core/Timeline/Timeline.type.d.ts +27 -7
- package/dist/src/core/Timeline/index.d.ts +5 -1
- package/dist/src/core/WizardDialog/index.d.ts +3 -0
- package/dist/src/core/WizardDialog/styles.d.ts +4 -0
- package/dist/src/core/WizardDialog/type.d.ts +31 -0
- package/dist/src/core/index.d.ts +10 -14
- package/dist/src/core/message/index.d.ts +4 -53
- package/dist/src/core/message/message.d.ts +53 -0
- package/dist/src/core/message/useMessage.d.ts +4 -0
- package/dist/src/coreX/DateRangePicker/__tests__/utils.test.d.ts +1 -0
- package/dist/src/coreX/DateRangePicker/dateRangePicker.type.d.ts +10 -2
- package/dist/src/coreX/DateRangePicker/utils.d.ts +7 -0
- package/dist/src/coreX/Dialogs/DeleteDialog/DeleteDialog.type.d.ts +2 -0
- package/dist/src/coreX/Dialogs/index.d.ts +0 -1
- package/dist/src/coreX/KubeConfigModal/KubeConfigModal.style.d.ts +9 -0
- package/dist/src/coreX/KubeConfigModal/KubeConfigModal.type.d.ts +21 -0
- package/dist/src/coreX/KubeConfigModal/index.d.ts +4 -0
- package/dist/src/coreX/KubeConfigModal/utils.d.ts +2 -0
- package/dist/src/coreX/index.d.ts +2 -0
- package/dist/src/hooks/__tests__/useCTErrorMsg.test.d.ts +1 -0
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/useCTErrorMsg.d.ts +7 -0
- package/dist/src/utils/__test__/cterror.test.d.ts +1 -0
- package/dist/src/utils/__test__/unit.spec.d.ts +1 -0
- package/dist/src/utils/cterror.d.ts +29 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/type.d.ts +32 -0
- package/dist/src/utils/unit.d.ts +14 -0
- package/dist/stories/docs/core/Antd5Tree.stories.d.ts +44 -0
- package/dist/stories/docs/core/Banner.stories.d.ts +53 -0
- package/dist/stories/docs/core/BasicCTError.stories.d.ts +47 -0
- package/dist/stories/docs/core/FieldsDateTimeRange.stories.d.ts +1 -0
- package/dist/stories/docs/core/ImmersiveDialog.stories.d.ts +96 -0
- package/dist/stories/docs/core/Input.simple.stories.d.ts +1 -3
- package/dist/stories/docs/core/LineChart.stories.d.ts +1 -0
- package/dist/stories/docs/core/MediumDialog.stories.d.ts +35 -0
- package/dist/stories/docs/core/Modal.stories.d.ts +0 -2
- package/dist/stories/docs/core/SmallDialog.stories.d.ts +37 -0
- package/dist/stories/docs/core/Timeline.stories.d.ts +4 -1
- package/dist/stories/docs/core/WizardDialog.stories.d.ts +109 -0
- package/dist/stories/docs/coreX/DateRangePicker.stories.d.ts +1 -0
- package/dist/stories/docs/coreX/Dialogs/DeleteDialog.stories.d.ts +5 -0
- package/dist/stories/docs/coreX/KubeConfigModal.stories.d.ts +83 -0
- package/dist/style.css +2867 -2469
- package/package.json +8 -7
- package/dist/cjs/coreX/Dialogs/SmallDialog.js +0 -86
- package/dist/esm/coreX/Dialogs/SmallDialog.js +0 -80
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { parrotI18n } from '@cloudtower/parrot';
|
|
2
|
-
import _message from '../core/message/
|
|
2
|
+
import _message from '../core/message/message.js';
|
|
3
3
|
import { antdKit } from '../legacy-antd.js';
|
|
4
4
|
import { omit } from 'lodash';
|
|
5
5
|
import React__default, { createContext, useMemo, useEffect, useContext } from 'react';
|
|
6
6
|
import { ConfigProvider } from '../core/ConfigProvider/index.js';
|
|
7
7
|
import { createBatchMessageMethods } from '../core/message-group/index.js';
|
|
8
|
+
import { MessageContext } from '../core/message/useMessage.js';
|
|
8
9
|
|
|
9
10
|
var __defProp = Object.defineProperty;
|
|
10
11
|
var __defProps = Object.defineProperties;
|
|
@@ -26,7 +27,6 @@ var __spreadValues = (a, b) => {
|
|
|
26
27
|
};
|
|
27
28
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
28
29
|
const kitContext = createContext(antdKit);
|
|
29
|
-
const MessageContext = createContext(_message);
|
|
30
30
|
const UIKitProvider = (props) => {
|
|
31
31
|
const { children, kit = antdKit, message, lng = "en-US", config } = props;
|
|
32
32
|
const batchMessage = useMemo(() => {
|
|
@@ -60,8 +60,5 @@ var UIKitProvider$1 = UIKitProvider;
|
|
|
60
60
|
const useUIKit = () => {
|
|
61
61
|
return useContext(kitContext);
|
|
62
62
|
};
|
|
63
|
-
const useMessage = () => {
|
|
64
|
-
return useContext(MessageContext);
|
|
65
|
-
};
|
|
66
63
|
|
|
67
|
-
export {
|
|
64
|
+
export { UIKitProvider$1 as default, kitContext, useUIKit };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { InfoICircleFill16OntintIcon } from '@cloudtower/icons-react';
|
|
2
|
+
import Icon from '../Icon/index.js';
|
|
3
|
+
import { Typo } from '../Typo/index.js';
|
|
4
|
+
import cs from 'classnames';
|
|
5
|
+
import React__default from 'react';
|
|
6
|
+
import { BasicBanner, ErrorBanner, InfoBanner, WarningBanner } from './banner.style.js';
|
|
7
|
+
import { Show } from '../../coreX/Show/index.js';
|
|
8
|
+
|
|
9
|
+
const Banner = ({ message, type, btnProps }) => {
|
|
10
|
+
return /* @__PURE__ */ React__default.createElement("div", { id: "global-banner" }, /* @__PURE__ */ React__default.createElement(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
className: cs(Typo.Label.l3_bold, BasicBanner, {
|
|
14
|
+
[ErrorBanner]: type === "error",
|
|
15
|
+
[InfoBanner]: type === "info",
|
|
16
|
+
[WarningBanner]: type === "warning"
|
|
17
|
+
})
|
|
18
|
+
},
|
|
19
|
+
/* @__PURE__ */ React__default.createElement(Icon, { src: InfoICircleFill16OntintIcon }),
|
|
20
|
+
/* @__PURE__ */ React__default.createElement("span", null, message),
|
|
21
|
+
/* @__PURE__ */ React__default.createElement(Show, { condition: !(btnProps == null ? void 0 : btnProps.hide) }, /* @__PURE__ */ React__default.createElement("span", { className: "dashed-btn", onClick: btnProps == null ? void 0 : btnProps.onClick }, btnProps == null ? void 0 : btnProps.text))
|
|
22
|
+
));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { Banner };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React__default, { useMemo } from 'react';
|
|
2
|
+
import { cx } from '@linaria/core';
|
|
3
|
+
import { BasicCTErrorStyle } from './BasicCTError.style.js';
|
|
4
|
+
import { Typo } from '../Typo/index.js';
|
|
5
|
+
import { useCTErrorMsg } from '../../hooks/useCTErrorMsg.js';
|
|
6
|
+
import useParrotTranslation from '../../hooks/useParrotTranslation.js';
|
|
7
|
+
|
|
8
|
+
const defaultErrorContainerRender = ({
|
|
9
|
+
children,
|
|
10
|
+
className
|
|
11
|
+
}) => {
|
|
12
|
+
return /* @__PURE__ */ React__default.createElement("span", { className: cx(Typo.Label.l3_regular, BasicCTErrorStyle, className) }, children);
|
|
13
|
+
};
|
|
14
|
+
const BasicCTError = (props) => {
|
|
15
|
+
const {
|
|
16
|
+
error,
|
|
17
|
+
className,
|
|
18
|
+
ErrorItemRender,
|
|
19
|
+
ErrorContainerRender,
|
|
20
|
+
errorMsgOptions
|
|
21
|
+
} = props;
|
|
22
|
+
const msgs = useCTErrorMsg(error, errorMsgOptions);
|
|
23
|
+
const { t } = useParrotTranslation();
|
|
24
|
+
const ContainerRender = ErrorContainerRender || defaultErrorContainerRender;
|
|
25
|
+
const child = useMemo(() => {
|
|
26
|
+
if (ErrorItemRender) {
|
|
27
|
+
return msgs.map((errorMsg, index) => /* @__PURE__ */ React__default.createElement(ErrorItemRender, { errorMsg, index, key: index }));
|
|
28
|
+
}
|
|
29
|
+
return msgs.join("");
|
|
30
|
+
}, [msgs, ErrorItemRender, t]);
|
|
31
|
+
return /* @__PURE__ */ React__default.createElement(ContainerRender, { className, errorMsgs: msgs, children: child });
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { BasicCTError };
|
|
@@ -7,7 +7,7 @@ import antd5enUS from 'antd5/lib/locale/en_US';
|
|
|
7
7
|
import antd5zhCN from 'antd5/lib/locale/zh_CN';
|
|
8
8
|
import dayjs from 'dayjs';
|
|
9
9
|
import moment from 'moment';
|
|
10
|
-
import React__default, { useEffect } from 'react';
|
|
10
|
+
import React__default, { createContext, useContext, useEffect } from 'react';
|
|
11
11
|
|
|
12
12
|
var __defProp = Object.defineProperty;
|
|
13
13
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
@@ -25,9 +25,14 @@ var __spreadValues = (a, b) => {
|
|
|
25
25
|
}
|
|
26
26
|
return a;
|
|
27
27
|
};
|
|
28
|
+
const ConfigProviderContext = createContext({});
|
|
29
|
+
const useConfig = () => {
|
|
30
|
+
return useContext(ConfigProviderContext);
|
|
31
|
+
};
|
|
28
32
|
const ConfigProvider = ({
|
|
29
33
|
antd5Configs,
|
|
30
34
|
antd4Configs,
|
|
35
|
+
config = {},
|
|
31
36
|
children
|
|
32
37
|
}) => {
|
|
33
38
|
const { i18n } = useParrotTranslation();
|
|
@@ -39,7 +44,7 @@ const ConfigProvider = ({
|
|
|
39
44
|
i18n.on("languageChanged", adjustDateLocale);
|
|
40
45
|
adjustDateLocale(i18n.language);
|
|
41
46
|
}, [i18n]);
|
|
42
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
47
|
+
return /* @__PURE__ */ React__default.createElement(ConfigProviderContext.Provider, { value: config }, /* @__PURE__ */ React__default.createElement(
|
|
43
48
|
ConfigProvider$1,
|
|
44
49
|
__spreadValues({
|
|
45
50
|
autoInsertSpaceInButton: false,
|
|
@@ -53,7 +58,7 @@ const ConfigProvider = ({
|
|
|
53
58
|
}, antd4Configs),
|
|
54
59
|
children
|
|
55
60
|
)
|
|
56
|
-
);
|
|
61
|
+
));
|
|
57
62
|
};
|
|
58
63
|
|
|
59
|
-
export { ConfigProvider };
|
|
64
|
+
export { ConfigProvider, useConfig };
|
|
@@ -2,9 +2,25 @@ import { DatePicker } from 'antd';
|
|
|
2
2
|
import moment from 'moment';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defProps = Object.defineProperties;
|
|
7
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
8
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
10
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
8
24
|
var __objRest = (source, exclude) => {
|
|
9
25
|
var target = {};
|
|
10
26
|
for (var prop in source)
|
|
@@ -26,7 +42,9 @@ const FieldsDateTimeRange = (_a) => {
|
|
|
26
42
|
var _a2, _b2;
|
|
27
43
|
return /* @__PURE__ */ React__default.createElement("div", { className: "datatime-range" }, /* @__PURE__ */ React__default.createElement(
|
|
28
44
|
DatePicker.RangePicker,
|
|
29
|
-
{
|
|
45
|
+
__spreadProps(__spreadValues({
|
|
46
|
+
showTime: true
|
|
47
|
+
}, input), {
|
|
30
48
|
onFocus: () => {
|
|
31
49
|
var _a3;
|
|
32
50
|
return (_a3 = input.onFocus) == null ? void 0 : _a3.call(input);
|
|
@@ -35,12 +53,11 @@ const FieldsDateTimeRange = (_a) => {
|
|
|
35
53
|
var _a3;
|
|
36
54
|
return (_a3 = input.onBlur) == null ? void 0 : _a3.call(input);
|
|
37
55
|
},
|
|
38
|
-
showTime: true,
|
|
39
56
|
defaultValue: (_a2 = input.value) == null ? void 0 : _a2.map((v) => v && moment(v)),
|
|
40
57
|
onChange: input.onChange,
|
|
41
58
|
value: (_b2 = input.value) == null ? void 0 : _b2.map((v) => v && moment(v)),
|
|
42
59
|
format: props.format
|
|
43
|
-
}
|
|
60
|
+
})
|
|
44
61
|
));
|
|
45
62
|
};
|
|
46
63
|
var FieldsDateTimeRange$1 = FieldsDateTimeRange;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { ExclamationErrorCircleFill16RedIcon, XmarkCloseBold24TertiaryIcon, XmarkCloseBold24SecondaryIcon } from '@cloudtower/icons-react';
|
|
2
|
+
import { cx } from '@linaria/core';
|
|
3
|
+
import Button from '../Button/index.js';
|
|
4
|
+
import { usePopModal } from '../KitStoreProvider/index.js';
|
|
5
|
+
import { Typo } from '../Typo/index.js';
|
|
6
|
+
import Icon from '../Icon/index.js';
|
|
7
|
+
import OverflowTooltip from '../../coreX/OverflowTooltip/index.js';
|
|
8
|
+
import useParrotTranslation from '../../hooks/useParrotTranslation.js';
|
|
9
|
+
import { Modal } from 'antd';
|
|
10
|
+
import React__default, { useMemo } from 'react';
|
|
11
|
+
import { FooterStyle, FooterButtonStyle, ErrorStyle, ErrorIconStyle, ErrorTextStyle, FooterButtonRightStyle, TitleStyle, ImmersiveDialogStyle, FullContentStyle, MultiAreaStyle, CloseIconStyle, BodyStyle, MultiAreaBodyStyle, CancelButtonStyle } from './styles.js';
|
|
12
|
+
|
|
13
|
+
var __defProp = Object.defineProperty;
|
|
14
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
17
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18
|
+
var __spreadValues = (a, b) => {
|
|
19
|
+
for (var prop in b || (b = {}))
|
|
20
|
+
if (__hasOwnProp.call(b, prop))
|
|
21
|
+
__defNormalProp(a, prop, b[prop]);
|
|
22
|
+
if (__getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
24
|
+
if (__propIsEnum.call(b, prop))
|
|
25
|
+
__defNormalProp(a, prop, b[prop]);
|
|
26
|
+
}
|
|
27
|
+
return a;
|
|
28
|
+
};
|
|
29
|
+
var __objRest = (source, exclude) => {
|
|
30
|
+
var target = {};
|
|
31
|
+
for (var prop in source)
|
|
32
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
if (source != null && __getOwnPropSymbols)
|
|
35
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
36
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
37
|
+
target[prop] = source[prop];
|
|
38
|
+
}
|
|
39
|
+
return target;
|
|
40
|
+
};
|
|
41
|
+
function ImmersiveDialog(props) {
|
|
42
|
+
const _a = props, {
|
|
43
|
+
className,
|
|
44
|
+
title,
|
|
45
|
+
children,
|
|
46
|
+
footerLeftAction,
|
|
47
|
+
left,
|
|
48
|
+
right,
|
|
49
|
+
leftClassName,
|
|
50
|
+
rightClassName,
|
|
51
|
+
closeIcon,
|
|
52
|
+
footer,
|
|
53
|
+
showCancel = true,
|
|
54
|
+
showOk = true,
|
|
55
|
+
okLoading,
|
|
56
|
+
okButtonProps,
|
|
57
|
+
cancelButtonProps,
|
|
58
|
+
okText,
|
|
59
|
+
cancelText,
|
|
60
|
+
error,
|
|
61
|
+
visible = true,
|
|
62
|
+
isContentFull,
|
|
63
|
+
onCancel,
|
|
64
|
+
onOk
|
|
65
|
+
} = _a, restProps = __objRest(_a, [
|
|
66
|
+
"className",
|
|
67
|
+
"title",
|
|
68
|
+
"children",
|
|
69
|
+
"footerLeftAction",
|
|
70
|
+
"left",
|
|
71
|
+
"right",
|
|
72
|
+
"leftClassName",
|
|
73
|
+
"rightClassName",
|
|
74
|
+
"closeIcon",
|
|
75
|
+
"footer",
|
|
76
|
+
"showCancel",
|
|
77
|
+
"showOk",
|
|
78
|
+
"okLoading",
|
|
79
|
+
"okButtonProps",
|
|
80
|
+
"cancelButtonProps",
|
|
81
|
+
"okText",
|
|
82
|
+
"cancelText",
|
|
83
|
+
"error",
|
|
84
|
+
"visible",
|
|
85
|
+
"isContentFull",
|
|
86
|
+
"onCancel",
|
|
87
|
+
"onOk"
|
|
88
|
+
]);
|
|
89
|
+
const { t } = useParrotTranslation();
|
|
90
|
+
const popModal = usePopModal();
|
|
91
|
+
const _confirmText = useMemo(() => {
|
|
92
|
+
let text = okText || t("common.confirm");
|
|
93
|
+
return text;
|
|
94
|
+
}, [okText, t]);
|
|
95
|
+
const finalFooter = useMemo(() => {
|
|
96
|
+
return footer || /* @__PURE__ */ React__default.createElement("div", { className: FooterStyle }, /* @__PURE__ */ React__default.createElement("div", { className: FooterButtonStyle }, footerLeftAction, error && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("span", { className: cx(ErrorStyle, Typo.Label.l2_regular) }, /* @__PURE__ */ React__default.createElement(
|
|
97
|
+
ExclamationErrorCircleFill16RedIcon,
|
|
98
|
+
{
|
|
99
|
+
className: ErrorIconStyle
|
|
100
|
+
}
|
|
101
|
+
), /* @__PURE__ */ React__default.createElement(
|
|
102
|
+
OverflowTooltip,
|
|
103
|
+
{
|
|
104
|
+
className: ErrorTextStyle,
|
|
105
|
+
multiLines: 3,
|
|
106
|
+
content: error,
|
|
107
|
+
tooltip: error
|
|
108
|
+
}
|
|
109
|
+
)))), /* @__PURE__ */ React__default.createElement("div", { className: FooterButtonRightStyle }, showCancel ? /* @__PURE__ */ React__default.createElement(
|
|
110
|
+
Button,
|
|
111
|
+
__spreadValues({
|
|
112
|
+
type: "quiet",
|
|
113
|
+
className: CancelButtonStyle,
|
|
114
|
+
onMouseDown: (e) => {
|
|
115
|
+
e.preventDefault();
|
|
116
|
+
},
|
|
117
|
+
onClick: (e) => {
|
|
118
|
+
popModal();
|
|
119
|
+
onCancel == null ? void 0 : onCancel(e);
|
|
120
|
+
}
|
|
121
|
+
}, cancelButtonProps),
|
|
122
|
+
cancelText || t("common.cancel")
|
|
123
|
+
) : null, showOk ? /* @__PURE__ */ React__default.createElement(
|
|
124
|
+
Button,
|
|
125
|
+
__spreadValues({
|
|
126
|
+
onClick: (e) => {
|
|
127
|
+
onOk == null ? void 0 : onOk(e);
|
|
128
|
+
},
|
|
129
|
+
type: "primary",
|
|
130
|
+
loading: okLoading
|
|
131
|
+
}, okButtonProps),
|
|
132
|
+
_confirmText
|
|
133
|
+
) : null));
|
|
134
|
+
}, [
|
|
135
|
+
footerLeftAction,
|
|
136
|
+
_confirmText,
|
|
137
|
+
cancelButtonProps,
|
|
138
|
+
cancelText,
|
|
139
|
+
error,
|
|
140
|
+
footer,
|
|
141
|
+
okButtonProps,
|
|
142
|
+
okLoading,
|
|
143
|
+
onCancel,
|
|
144
|
+
onOk,
|
|
145
|
+
popModal,
|
|
146
|
+
showCancel,
|
|
147
|
+
showOk,
|
|
148
|
+
t
|
|
149
|
+
]);
|
|
150
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
151
|
+
Modal,
|
|
152
|
+
__spreadValues({
|
|
153
|
+
width: "calc(100% - 20px)",
|
|
154
|
+
title: /* @__PURE__ */ React__default.createElement("span", { className: cx(Typo.Display.d1_bold_title, TitleStyle) }, title),
|
|
155
|
+
className: cx(
|
|
156
|
+
ImmersiveDialogStyle,
|
|
157
|
+
isContentFull ? FullContentStyle : MultiAreaStyle,
|
|
158
|
+
className
|
|
159
|
+
),
|
|
160
|
+
closeIcon: closeIcon != null ? closeIcon : /* @__PURE__ */ React__default.createElement(
|
|
161
|
+
Icon,
|
|
162
|
+
{
|
|
163
|
+
src: XmarkCloseBold24TertiaryIcon,
|
|
164
|
+
className: CloseIconStyle,
|
|
165
|
+
iconHeight: 24,
|
|
166
|
+
iconWidth: 24,
|
|
167
|
+
hoverSrc: XmarkCloseBold24SecondaryIcon
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
footer: finalFooter,
|
|
171
|
+
onCancel: (e) => {
|
|
172
|
+
popModal();
|
|
173
|
+
onCancel == null ? void 0 : onCancel(e);
|
|
174
|
+
},
|
|
175
|
+
visible,
|
|
176
|
+
destroyOnClose: true
|
|
177
|
+
}, restProps),
|
|
178
|
+
/* @__PURE__ */ React__default.createElement("div", { className: cx(BodyStyle, isContentFull ? "" : MultiAreaBodyStyle) }, isContentFull ? null : /* @__PURE__ */ React__default.createElement("div", { className: cx("left", leftClassName) }, left), /* @__PURE__ */ React__default.createElement("div", { className: "middle" }, children), isContentFull ? null : /* @__PURE__ */ React__default.createElement("div", { className: cx("right", rightClassName) }, right))
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export { ImmersiveDialog };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const ImmersiveDialogStyle = "E_icab5o7";
|
|
2
|
+
const MultiAreaStyle = "E_msiso3p";
|
|
3
|
+
const CloseIconStyle = "E_cxvrrew";
|
|
4
|
+
const TitleStyle = "E_tskzd0j";
|
|
5
|
+
const FullContentStyle = "E_f1fbnfp";
|
|
6
|
+
const BodyStyle = "E_b4g2nsx";
|
|
7
|
+
const MultiAreaBodyStyle = "E_myhed70";
|
|
8
|
+
const FooterStyle = "E_fo07jei";
|
|
9
|
+
const FooterButtonStyle = "E_fph3s12";
|
|
10
|
+
const FooterButtonRightStyle = "E_f1f8uj0i";
|
|
11
|
+
const ErrorStyle = "E_ejcjd85";
|
|
12
|
+
const ErrorIconStyle = "E_e1lj3r2s";
|
|
13
|
+
const ErrorTextStyle = "E_eb58k2y";
|
|
14
|
+
const CancelButtonStyle = "E_c1bad0d";
|
|
15
|
+
|
|
16
|
+
export { BodyStyle, CancelButtonStyle, CloseIconStyle, ErrorIconStyle, ErrorStyle, ErrorTextStyle, FooterButtonRightStyle, FooterButtonStyle, FooterStyle, FullContentStyle, ImmersiveDialogStyle, MultiAreaBodyStyle, MultiAreaStyle, TitleStyle };
|
|
@@ -48,7 +48,8 @@ const LineChartLegend = (props) => {
|
|
|
48
48
|
onMouseLeave: () => onHover("leave", legend.id)
|
|
49
49
|
},
|
|
50
50
|
/* @__PURE__ */ React__default.createElement(LineChartColorBlock, { background: legend.color }),
|
|
51
|
-
/* @__PURE__ */ React__default.createElement("span", { className: "legend-name" }, legend.name)
|
|
51
|
+
/* @__PURE__ */ React__default.createElement("span", { className: "legend-name" }, /* @__PURE__ */ React__default.createElement(Truncate, { text: legend.name, len: 50, backLen: 20 })),
|
|
52
|
+
/* @__PURE__ */ React__default.createElement("div", { className: "icon-suffix-wrapper" }, legend.iconSuffix)
|
|
52
53
|
);
|
|
53
54
|
}))
|
|
54
55
|
},
|
|
@@ -80,7 +81,8 @@ const LineChartLegend = (props) => {
|
|
|
80
81
|
onClick: () => onClick(legend.id)
|
|
81
82
|
},
|
|
82
83
|
/* @__PURE__ */ React__default.createElement(LineChartColorBlock, { background: legend.color }),
|
|
83
|
-
/* @__PURE__ */ React__default.createElement("span", { className: "legend-name" }, /* @__PURE__ */ React__default.createElement(Truncate, { text: legend.name, len: 50, backLen: 20 }))
|
|
84
|
+
/* @__PURE__ */ React__default.createElement("span", { className: "legend-name" }, /* @__PURE__ */ React__default.createElement(Truncate, { text: legend.name, len: 50, backLen: 20 })),
|
|
85
|
+
/* @__PURE__ */ React__default.createElement("div", { className: "icon-suffix-wrapper" }, legend.iconSuffix)
|
|
84
86
|
);
|
|
85
87
|
})
|
|
86
88
|
}
|
|
@@ -43,17 +43,18 @@ const TooltipFormatter = props => {
|
|
|
43
43
|
}
|
|
44
44
|
return /* @__PURE__ */React__default.createElement(TooltipWrapper, null, /* @__PURE__ */React__default.createElement(TooltipTitle, {
|
|
45
45
|
className: Typo.Label.l4_bold_title
|
|
46
|
-
}, dayjs(Number(payload[0].payload.t)).format("MM/DD HH:mm:ss")), payload.map(
|
|
46
|
+
}, dayjs(Number(payload[0].payload.t)).format("MM/DD HH:mm:ss")), payload.map(item => {
|
|
47
47
|
return __spreadProps(__spreadValues({}, item), {
|
|
48
|
-
legend: legends
|
|
48
|
+
legend: legends.find((_legend, index) => `v${index}` === item.name)
|
|
49
49
|
});
|
|
50
50
|
}).sort((a, b) => b.value - a.value).map(item => {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
var _a, _b, _c, _d;
|
|
52
|
+
return deselected.includes(((_a = item.legend) == null ? void 0 : _a.id) || "") ? null : /* @__PURE__ */React__default.createElement(TooltipColumn, {
|
|
53
|
+
key: (_b = item.legend) == null ? void 0 : _b.id
|
|
53
54
|
}, /* @__PURE__ */React__default.createElement("div", null, /* @__PURE__ */React__default.createElement(LineChartColorBlock, {
|
|
54
|
-
background: item.legend.color,
|
|
55
|
+
background: (_c = item.legend) == null ? void 0 : _c.color,
|
|
55
56
|
borderd: true
|
|
56
|
-
}), item.legend.name), /* @__PURE__ */React__default.createElement("div", {
|
|
57
|
+
}), (_d = item.legend) == null ? void 0 : _d.name), /* @__PURE__ */React__default.createElement("div", {
|
|
57
58
|
className: "column-value"
|
|
58
59
|
}, format(item)));
|
|
59
60
|
}));
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { cx } from '@linaria/core';
|
|
3
|
+
import { Typo } from '../Typo/index.js';
|
|
4
|
+
import { SmallDialog } from '../SmallDialog/SmallDialog.js';
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
writable: true,
|
|
14
|
+
value
|
|
15
|
+
}) : obj[key] = value;
|
|
16
|
+
var __spreadValues = (a, b) => {
|
|
17
|
+
for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
18
|
+
if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols) for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop];
|
|
28
|
+
}
|
|
29
|
+
return target;
|
|
30
|
+
};
|
|
31
|
+
const MediumDialogStyle = "E_m5foqp8";
|
|
32
|
+
const MediumDialog = _a => {
|
|
33
|
+
var _b = _a,
|
|
34
|
+
{
|
|
35
|
+
className
|
|
36
|
+
} = _b,
|
|
37
|
+
restProps = __objRest(_b, ["className"]);
|
|
38
|
+
return /* @__PURE__ */React__default.createElement(SmallDialog, __spreadValues({
|
|
39
|
+
TitleRender: ({
|
|
40
|
+
title
|
|
41
|
+
}) => /* @__PURE__ */React__default.createElement("span", {
|
|
42
|
+
className: Typo.Display.d1s_bold_title
|
|
43
|
+
}, title),
|
|
44
|
+
className: cx(MediumDialogStyle, className)
|
|
45
|
+
}, restProps));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { MediumDialog };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { ExclamationErrorCircleFill16RedIcon, XmarkCloseBold24TertiaryIcon, XmarkCloseBold24SecondaryIcon } from '@cloudtower/icons-react';
|
|
2
|
+
import { cx } from '@linaria/core';
|
|
3
|
+
import { usePopModal } from '../KitStoreProvider/index.js';
|
|
4
|
+
import { Modal } from 'antd';
|
|
5
|
+
import React__default from 'react';
|
|
6
|
+
import cs from 'classnames';
|
|
7
|
+
import OverflowTooltip from '../../coreX/OverflowTooltip/index.js';
|
|
8
|
+
import { Show } from '../../coreX/Show/index.js';
|
|
9
|
+
import { FooterStyle, ErrorTextStyle, DialogStyle, CloseIconStyle } from './SmallDialog.style.js';
|
|
10
|
+
import Icon from '../Icon/index.js';
|
|
11
|
+
import Button from '../Button/index.js';
|
|
12
|
+
import { Flex } from 'antd5';
|
|
13
|
+
import { Typo } from '../Typo/index.js';
|
|
14
|
+
|
|
15
|
+
var __defProp = Object.defineProperty;
|
|
16
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
17
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
18
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
19
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
20
|
+
var __spreadValues = (a, b) => {
|
|
21
|
+
for (var prop in b || (b = {}))
|
|
22
|
+
if (__hasOwnProp.call(b, prop))
|
|
23
|
+
__defNormalProp(a, prop, b[prop]);
|
|
24
|
+
if (__getOwnPropSymbols)
|
|
25
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
26
|
+
if (__propIsEnum.call(b, prop))
|
|
27
|
+
__defNormalProp(a, prop, b[prop]);
|
|
28
|
+
}
|
|
29
|
+
return a;
|
|
30
|
+
};
|
|
31
|
+
const DefaultTitleRender = ({
|
|
32
|
+
title
|
|
33
|
+
}) => {
|
|
34
|
+
return /* @__PURE__ */ React__default.createElement("span", { className: cs(Typo.Display.d2_bold_title) }, title);
|
|
35
|
+
};
|
|
36
|
+
const SmallDialog = ({
|
|
37
|
+
title,
|
|
38
|
+
TitleRender,
|
|
39
|
+
cancelText = "\u5173\u95ED",
|
|
40
|
+
okText = "\u786E\u5B9A",
|
|
41
|
+
showOk = true,
|
|
42
|
+
onOk,
|
|
43
|
+
onCancel,
|
|
44
|
+
maskClosable = true,
|
|
45
|
+
closable = true,
|
|
46
|
+
className,
|
|
47
|
+
footerClassName,
|
|
48
|
+
okButtonProps,
|
|
49
|
+
cancelButtonProps,
|
|
50
|
+
children,
|
|
51
|
+
showFooterErrorIcon = true,
|
|
52
|
+
error,
|
|
53
|
+
confirmLoading
|
|
54
|
+
}) => {
|
|
55
|
+
const popModal = usePopModal();
|
|
56
|
+
const handleClose = () => {
|
|
57
|
+
if (onCancel) {
|
|
58
|
+
onCancel(popModal);
|
|
59
|
+
} else {
|
|
60
|
+
popModal();
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const handleOk = () => {
|
|
64
|
+
if (onOk) {
|
|
65
|
+
onOk(popModal);
|
|
66
|
+
} else {
|
|
67
|
+
popModal();
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const CustomTitleRender = TitleRender || DefaultTitleRender;
|
|
71
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
72
|
+
Modal,
|
|
73
|
+
{
|
|
74
|
+
visible: true,
|
|
75
|
+
title: /* @__PURE__ */ React__default.createElement(CustomTitleRender, { title }),
|
|
76
|
+
footer: /* @__PURE__ */ React__default.createElement(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
className: cs(FooterStyle, footerClassName, {
|
|
80
|
+
"has-error": !!error
|
|
81
|
+
})
|
|
82
|
+
},
|
|
83
|
+
/* @__PURE__ */ React__default.createElement(Show, { condition: !!error }, /* @__PURE__ */ React__default.createElement(
|
|
84
|
+
Flex,
|
|
85
|
+
{
|
|
86
|
+
gap: 4,
|
|
87
|
+
align: "center",
|
|
88
|
+
className: cx(ErrorTextStyle, Typo.Label.l3_regular)
|
|
89
|
+
},
|
|
90
|
+
/* @__PURE__ */ React__default.createElement(Show, { condition: showFooterErrorIcon }, /* @__PURE__ */ React__default.createElement(
|
|
91
|
+
Icon,
|
|
92
|
+
{
|
|
93
|
+
src: ExclamationErrorCircleFill16RedIcon,
|
|
94
|
+
iconHeight: 16,
|
|
95
|
+
iconWidth: 16
|
|
96
|
+
}
|
|
97
|
+
)),
|
|
98
|
+
/* @__PURE__ */ React__default.createElement(OverflowTooltip, { multiLines: 3, content: error, tooltip: error })
|
|
99
|
+
)),
|
|
100
|
+
/* @__PURE__ */ React__default.createElement(Flex, null, /* @__PURE__ */ React__default.createElement(
|
|
101
|
+
Button,
|
|
102
|
+
__spreadValues({
|
|
103
|
+
type: showOk ? "quiet" : "ordinary",
|
|
104
|
+
onClick: handleClose,
|
|
105
|
+
className: Typo.Label.l2_bold_title
|
|
106
|
+
}, cancelButtonProps),
|
|
107
|
+
cancelText
|
|
108
|
+
), showOk && /* @__PURE__ */ React__default.createElement(
|
|
109
|
+
Button,
|
|
110
|
+
__spreadValues({
|
|
111
|
+
type: "primary",
|
|
112
|
+
onClick: handleOk,
|
|
113
|
+
loading: confirmLoading
|
|
114
|
+
}, okButtonProps),
|
|
115
|
+
okText
|
|
116
|
+
))
|
|
117
|
+
),
|
|
118
|
+
onCancel: handleClose,
|
|
119
|
+
closable,
|
|
120
|
+
maskClosable,
|
|
121
|
+
className: cx(DialogStyle, className),
|
|
122
|
+
closeIcon: /* @__PURE__ */ React__default.createElement(
|
|
123
|
+
Icon,
|
|
124
|
+
{
|
|
125
|
+
src: XmarkCloseBold24TertiaryIcon,
|
|
126
|
+
className: CloseIconStyle,
|
|
127
|
+
iconHeight: 24,
|
|
128
|
+
iconWidth: 24,
|
|
129
|
+
hoverSrc: XmarkCloseBold24SecondaryIcon
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
},
|
|
133
|
+
children
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export { SmallDialog };
|
|
@@ -42,7 +42,7 @@ const AddRowButton = (props) => {
|
|
|
42
42
|
const {
|
|
43
43
|
config: { maximum, className, CustomizedButton, buttonProps, text },
|
|
44
44
|
columns,
|
|
45
|
-
|
|
45
|
+
addData,
|
|
46
46
|
data
|
|
47
47
|
} = props;
|
|
48
48
|
const { t } = useParrotTranslation();
|
|
@@ -57,7 +57,7 @@ const AddRowButton = (props) => {
|
|
|
57
57
|
const newData = [...data2];
|
|
58
58
|
const newRow = genEmptyRow(columns);
|
|
59
59
|
newData.push(newRow);
|
|
60
|
-
|
|
60
|
+
addData(newData);
|
|
61
61
|
onClick == null ? void 0 : onClick(e);
|
|
62
62
|
};
|
|
63
63
|
const disabled = useMemo(
|