@cloudtower/eagle 490.0.8 → 490.0.10
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/core/AccordionCard/index.js +4 -1
- package/dist/cjs/core/Alert/index.js +4 -2
- package/dist/cjs/core/Arch/index.js +5 -3
- package/dist/cjs/core/Avatar/index.js +3 -1
- package/dist/cjs/core/Banner/index.js +16 -3
- package/dist/cjs/core/BasicCTError/index.js +25 -12
- package/dist/cjs/core/Bit/index.js +4 -3
- package/dist/cjs/core/BitPerSecond/index.js +4 -3
- package/dist/cjs/core/BlankState/index.js +14 -12
- package/dist/cjs/core/Bps/index.js +4 -3
- package/dist/cjs/core/Breadcrumb/index.js +4 -1
- package/dist/cjs/core/ButtonGroup/index.js +3 -1
- package/dist/cjs/core/Byte/index.js +6 -5
- package/dist/cjs/core/BytePerSecond/index.js +4 -3
- package/dist/cjs/core/Card/index.js +7 -3
- package/dist/cjs/core/Checkbox/index.js +28 -2
- package/dist/cjs/core/ConfigProvider/index.js +1 -1
- package/dist/cjs/core/DetailCard/index.js +7 -3
- package/dist/cjs/core/DonutChart/index.js +3 -1
- package/dist/cjs/core/DropdownMenu/index.js +9 -4
- package/dist/cjs/core/Duration/index.js +7 -6
- package/dist/cjs/core/Empty/index.js +6 -3
- package/dist/cjs/core/Error/index.js +4 -1
- package/dist/cjs/core/FailedLoad/index.js +4 -1
- package/dist/cjs/core/Fields/FieldsBoolean/index.js +11 -2
- package/dist/cjs/core/Fields/FieldsDateTime/index.js +5 -1
- package/dist/cjs/core/Fields/FieldsDateTimeRange/index.js +6 -3
- package/dist/cjs/core/Fields/FieldsEnum/index.js +5 -3
- package/dist/cjs/core/Fields/FieldsFloat/index.js +6 -3
- package/dist/cjs/core/Fields/FieldsInt/index.js +6 -3
- package/dist/cjs/core/Fields/FieldsInteger/index.js +6 -3
- package/dist/cjs/core/Fields/FieldsString/index.js +14 -4
- package/dist/cjs/core/Fields/FieldsTextArea/index.js +6 -3
- package/dist/cjs/core/Fields/FieldsTimePicker/index.js +7 -4
- package/dist/cjs/core/FormItem/index.js +15 -1
- package/dist/cjs/core/Frequency/index.js +4 -3
- package/dist/cjs/core/ImmersiveDialog/index.js +15 -4
- package/dist/cjs/core/Input/index.js +15 -3
- package/dist/cjs/core/InputInteger/index.js +15 -3
- package/dist/cjs/core/InputNumber/index.js +15 -3
- package/dist/cjs/core/InputPassword/index.js +15 -3
- package/dist/cjs/core/LegacySelect/index.js +18 -4
- package/dist/cjs/core/LineChart/index.js +2 -0
- package/dist/cjs/core/LocalUpload/LocalUpload.js +45 -32
- package/dist/cjs/core/Metric/index.js +3 -1
- package/dist/cjs/core/Nav/index.js +5 -2
- package/dist/cjs/core/Pagination/index.js +7 -1
- package/dist/cjs/core/Percent/index.js +4 -3
- package/dist/cjs/core/Progress/index.js +5 -3
- package/dist/cjs/core/Radio/index.js +41 -9
- package/dist/cjs/core/Second/index.js +4 -2
- package/dist/cjs/core/SimplePagination/index.js +7 -1
- package/dist/cjs/core/SmallDialog/SmallDialog.js +10 -4
- package/dist/cjs/core/SmallDialog/SmallDialog.widget.js +1 -1
- package/dist/cjs/core/Speed/index.js +4 -3
- package/dist/cjs/core/StepProgress/index.js +3 -1
- package/dist/cjs/core/Switch/index.js +5 -3
- package/dist/cjs/core/Tab/Tab.js +8 -3
- package/dist/cjs/core/Table/index.js +4 -2
- package/dist/cjs/core/TextArea/index.js +21 -3
- package/dist/cjs/core/Time/index.js +9 -8
- package/dist/cjs/core/TimePicker/index.js +1 -9
- package/dist/cjs/core/TimeZoneSelect/index.js +3 -1
- package/dist/cjs/core/Timeline/index.js +74 -59
- package/dist/cjs/core/Truncate/index.js +3 -1
- package/dist/cjs/core/WizardDialog/index.js +9 -4
- package/dist/cjs/coreX/BarChart/index.js +2 -2
- package/dist/cjs/coreX/CheckPointList/index.js +2 -2
- package/dist/cjs/coreX/Dialogs/DeleteDialog/DeleteDialog.js +1 -1
- package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.js +1 -1
- package/dist/cjs/hooks/useAntdPatchEnLocales.js +1 -1
- package/dist/cjs/hooks/useCTErrorMsg.js +3 -3
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +3438 -3438
- package/dist/esm/core/AccordionCard/index.js +4 -1
- package/dist/esm/core/Alert/index.js +4 -2
- package/dist/esm/core/Arch/index.js +5 -3
- package/dist/esm/core/Avatar/index.js +3 -1
- package/dist/esm/core/Banner/index.js +16 -3
- package/dist/esm/core/BasicCTError/index.js +25 -12
- package/dist/esm/core/Bit/index.js +4 -3
- package/dist/esm/core/BitPerSecond/index.js +4 -3
- package/dist/esm/core/BlankState/index.js +14 -12
- package/dist/esm/core/Bps/index.js +4 -3
- package/dist/esm/core/Breadcrumb/index.js +4 -1
- package/dist/esm/core/ButtonGroup/index.js +3 -1
- package/dist/esm/core/Byte/index.js +6 -5
- package/dist/esm/core/BytePerSecond/index.js +4 -3
- package/dist/esm/core/Card/index.js +7 -3
- package/dist/esm/core/Checkbox/index.js +29 -3
- package/dist/esm/core/ConfigProvider/index.js +1 -1
- package/dist/esm/core/DetailCard/index.js +7 -3
- package/dist/esm/core/DonutChart/index.js +3 -1
- package/dist/esm/core/DropdownMenu/index.js +9 -4
- package/dist/esm/core/Duration/index.js +7 -6
- package/dist/esm/core/Empty/index.js +6 -3
- package/dist/esm/core/Error/index.js +4 -1
- package/dist/esm/core/FailedLoad/index.js +4 -1
- package/dist/esm/core/Fields/FieldsBoolean/index.js +11 -2
- package/dist/esm/core/Fields/FieldsDateTime/index.js +5 -1
- package/dist/esm/core/Fields/FieldsDateTimeRange/index.js +6 -3
- package/dist/esm/core/Fields/FieldsEnum/index.js +5 -3
- package/dist/esm/core/Fields/FieldsFloat/index.js +6 -3
- package/dist/esm/core/Fields/FieldsInt/index.js +6 -3
- package/dist/esm/core/Fields/FieldsInteger/index.js +6 -3
- package/dist/esm/core/Fields/FieldsString/index.js +14 -4
- package/dist/esm/core/Fields/FieldsTextArea/index.js +6 -3
- package/dist/esm/core/Fields/FieldsTimePicker/index.js +7 -4
- package/dist/esm/core/FormItem/index.js +15 -1
- package/dist/esm/core/Frequency/index.js +4 -3
- package/dist/esm/core/ImmersiveDialog/index.js +17 -6
- package/dist/esm/core/Input/index.js +15 -3
- package/dist/esm/core/InputInteger/index.js +15 -3
- package/dist/esm/core/InputNumber/index.js +15 -3
- package/dist/esm/core/InputPassword/index.js +15 -3
- package/dist/esm/core/LegacySelect/index.js +18 -4
- package/dist/esm/core/LineChart/index.js +2 -0
- package/dist/esm/core/LocalUpload/LocalUpload.js +45 -32
- package/dist/esm/core/Metric/index.js +3 -1
- package/dist/esm/core/Nav/index.js +5 -2
- package/dist/esm/core/Pagination/index.js +7 -1
- package/dist/esm/core/Percent/index.js +4 -3
- package/dist/esm/core/Progress/index.js +5 -3
- package/dist/esm/core/Radio/index.js +42 -10
- package/dist/esm/core/Second/index.js +4 -2
- package/dist/esm/core/SimplePagination/index.js +7 -1
- package/dist/esm/core/SmallDialog/SmallDialog.js +10 -4
- package/dist/esm/core/SmallDialog/SmallDialog.widget.js +1 -1
- package/dist/esm/core/Speed/index.js +4 -3
- package/dist/esm/core/StepProgress/index.js +3 -1
- package/dist/esm/core/Switch/index.js +5 -3
- package/dist/esm/core/Tab/Tab.js +8 -3
- package/dist/esm/core/Table/index.js +4 -2
- package/dist/esm/core/TextArea/index.js +21 -3
- package/dist/esm/core/Time/index.js +9 -8
- package/dist/esm/core/TimePicker/index.js +1 -9
- package/dist/esm/core/TimeZoneSelect/index.js +3 -1
- package/dist/esm/core/Timeline/index.js +74 -59
- package/dist/esm/core/Truncate/index.js +3 -1
- package/dist/esm/core/WizardDialog/index.js +9 -4
- package/dist/esm/coreX/BarChart/index.js +1 -1
- package/dist/esm/coreX/CheckPointList/index.js +1 -1
- package/dist/esm/coreX/Dialogs/DeleteDialog/DeleteDialog.js +1 -1
- package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.js +1 -1
- package/dist/esm/hooks/useAntdPatchEnLocales.js +1 -1
- package/dist/esm/hooks/useCTErrorMsg.js +3 -3
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +4378 -4378
- package/dist/src/core/AccordionCard/accordionCard.type.d.ts +1 -0
- package/dist/src/core/Alert/alert.type.d.ts +1 -0
- package/dist/src/core/Antd5Flex/index.d.ts +1 -1
- package/dist/src/core/Arch/arch.type.d.ts +1 -0
- package/dist/src/core/AutoComplete/AutoComplete.d.ts +4 -1
- package/dist/src/core/Avatar/avatar.type.d.ts +1 -0
- package/dist/src/core/Banner/banner.types.d.ts +2 -1
- package/dist/src/core/BasicCTError/BasicCTError.type.d.ts +8 -2
- package/dist/src/core/BlankState/index.d.ts +1 -1
- package/dist/src/core/BlankState/type.d.ts +1 -0
- package/dist/src/core/Breadcrumb/breadcrumb.type.d.ts +2 -0
- package/dist/src/core/Button/button.type.d.ts +1 -0
- package/dist/src/core/Card/index.d.ts +8 -0
- package/dist/src/core/Cascader/cascader.type.d.ts +2 -0
- package/dist/src/core/Checkbox/index.d.ts +1 -1
- package/dist/src/core/DetailCard/detailCard.type.d.ts +1 -0
- package/dist/src/core/DonutChart/index.d.ts +1 -0
- package/dist/src/core/DropdownMenu/dropdownMenu.type.d.ts +2 -0
- package/dist/src/core/DropdownMenu/index.d.ts +1 -0
- package/dist/src/core/Duration/duration.type.d.ts +11 -3
- package/dist/src/core/Empty/index.d.ts +2 -1
- package/dist/src/core/Error/index.d.ts +2 -1
- package/dist/src/core/FailedLoad/index.d.ts +1 -0
- package/dist/src/core/Fields/FieldsBoolean/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsDateTime/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsEnum/fieldsEnum.type.d.ts +1 -0
- package/dist/src/core/Fields/FieldsEnum/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsFloat/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsInt/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsInteger/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsString/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsTextArea/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsTimePicker/index.d.ts +1 -1
- package/dist/src/core/Fields/__test__/data-testid.test.d.ts +1 -0
- package/dist/src/core/Fields/fields.type.d.ts +2 -1
- package/dist/src/core/Fields/index.d.ts +13 -9
- package/dist/src/core/FormItem/index.d.ts +3 -1
- package/dist/src/core/ImmersiveDialog/type.d.ts +5 -0
- package/dist/src/core/Input/input.type.d.ts +5 -0
- package/dist/src/core/InputPassword/index.d.ts +7 -2
- package/dist/src/core/LegacySelect/select.type.d.ts +1 -0
- package/dist/src/core/Legend/legend.type.d.ts +2 -0
- package/dist/src/core/LineChart/type.d.ts +4 -0
- package/dist/src/core/LocalUpload/LocalUpload.type.d.ts +4 -0
- package/dist/src/core/Metric/index.d.ts +1 -0
- package/dist/src/core/Nav/nav.type.d.ts +2 -0
- package/dist/src/core/Pagination/pagination.type.d.ts +1 -0
- package/dist/src/core/Progress/progress.type.d.ts +4 -0
- package/dist/src/core/Radio/index.d.ts +3 -1
- package/dist/src/core/Radio/radio.type.d.ts +2 -0
- package/dist/src/core/SearchInput/SearchInput.type.d.ts +4 -0
- package/dist/src/core/SegmentControl/segmentControl.type.d.ts +2 -0
- package/dist/src/core/SimplePagination/simplePagination.type.d.ts +1 -0
- package/dist/src/core/SmallDialog/SmallDialog.type.d.ts +5 -0
- package/dist/src/core/SmallDialog/index.d.ts +1 -1
- package/dist/src/core/StepProgress/stepProgress.type.d.ts +1 -0
- package/dist/src/core/Steps/steps.type.d.ts +1 -0
- package/dist/src/core/Switch/switch.type.d.ts +1 -0
- package/dist/src/core/Tab/Tab.type.d.ts +4 -0
- package/dist/src/core/Table/table.type.d.ts +6 -2
- package/dist/src/core/TextArea/textArea.type.d.ts +1 -0
- package/dist/src/core/Time/index.d.ts +1 -1
- package/dist/src/core/Time/time.type.d.ts +5 -0
- package/dist/src/core/TimePicker/index.d.ts +2 -0
- package/dist/src/core/TimeZoneSelect/timeZoneSelect.type.d.ts +1 -0
- package/dist/src/core/Timeline/Timeline.type.d.ts +2 -0
- package/dist/src/core/Timeline/index.d.ts +1 -1
- package/dist/src/core/Truncate/index.d.ts +1 -0
- package/dist/src/core/Units/units.type.d.ts +10 -0
- package/dist/src/core/WizardDialog/type.d.ts +2 -0
- package/dist/src/core/__test__/data-testid.test.d.ts +1 -0
- package/dist/src/coreX/CheckPointList/checkpointlist.type.d.ts +1 -1
- package/dist/src/coreX/index.d.ts +1 -1
- package/dist/src/utils/index.d.ts +2 -2
- package/dist/stories/docs/core/Alert.stories.d.ts +1 -0
- package/dist/stories/docs/core/Arch.stories.d.ts +3 -0
- package/dist/stories/docs/core/AutoComplete.stories.d.ts +3 -1
- package/dist/stories/docs/core/Banner.stories.d.ts +2 -2
- package/dist/stories/docs/core/BasicCTError.stories.d.ts +1 -1
- package/dist/stories/docs/core/Bit.stories.d.ts +3 -0
- package/dist/stories/docs/core/BitPerSecond.stories.d.ts +3 -0
- package/dist/stories/docs/core/BlankState.stories.d.ts +1 -1
- package/dist/stories/docs/core/Bps.stories.d.ts +3 -0
- package/dist/stories/docs/core/Byte.stories.d.ts +3 -0
- package/dist/stories/docs/core/BytePerSecond.stories.d.ts +3 -0
- package/dist/stories/docs/core/Card.stories.d.ts +1 -0
- package/dist/stories/docs/core/FieldsBoolean.stories.d.ts +2 -0
- package/dist/stories/docs/core/FieldsString.stories.d.ts +4 -0
- package/dist/stories/docs/core/FieldsTimePicker.stories.d.ts +2 -0
- package/dist/stories/docs/core/Frequency.stories.d.ts +3 -0
- package/dist/stories/docs/core/ImmersiveDialog.stories.d.ts +1 -0
- package/dist/stories/docs/core/InputPassword.stories.d.ts +1 -3
- package/dist/stories/docs/core/Percent.stories.d.ts +5 -0
- package/dist/stories/docs/core/Speed.stories.d.ts +3 -0
- package/dist/stories/docs/core/Table.stories.d.ts +1 -1
- package/dist/stories/docs/core/Timeline.stories.d.ts +1 -1
- package/dist/stories/docs/core/WizardDialog.stories.d.ts +2 -0
- package/dist/stories/docs/coreX/KubeConfigModal.stories.d.ts +1 -1
- package/dist/style.css +3438 -3438
- package/package.json +4 -4
|
@@ -3,5 +3,6 @@ import { AlertProps as AntdAlertProps } from "antd/lib/alert";
|
|
|
3
3
|
export type AlertProps = Omit<AntdAlertProps, "type"> & {
|
|
4
4
|
type?: AntdAlertProps["type"] | "normal";
|
|
5
5
|
action?: React.ReactNode;
|
|
6
|
+
"data-testid"?: string;
|
|
6
7
|
};
|
|
7
8
|
export type AlertComponentType = React.FunctionComponent<AlertProps>;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { AutoCompleteProps } from "antd5";
|
|
2
2
|
import React from "react";
|
|
3
|
-
export declare const AutoComplete: React.FC<AutoCompleteProps
|
|
3
|
+
export declare const AutoComplete: React.FC<AutoCompleteProps & {
|
|
4
|
+
/** Test ID for automated testing */
|
|
5
|
+
"data-testid"?: string;
|
|
6
|
+
}>;
|
|
@@ -18,9 +18,10 @@ import { ButtonProps } from "../Button";
|
|
|
18
18
|
* }
|
|
19
19
|
* }
|
|
20
20
|
*/
|
|
21
|
-
export type BannerProps = HTMLAttributes<
|
|
21
|
+
export type BannerProps = HTMLAttributes<HTMLDivElement> & {
|
|
22
22
|
type: "error" | "info" | "warning";
|
|
23
23
|
message: string;
|
|
24
|
+
"data-testid"?: string;
|
|
24
25
|
btnProps?: Pick<ButtonProps, "onClick"> & {
|
|
25
26
|
text: string;
|
|
26
27
|
hide?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CTError } from "../../utils/cterror";
|
|
3
1
|
import { UseCTErrorMsgOptions } from "../../hooks/useCTErrorMsg";
|
|
2
|
+
import { CTError } from "../../utils/cterror";
|
|
3
|
+
import React from "react";
|
|
4
4
|
/**
|
|
5
5
|
* 错误详情渲染器的 props
|
|
6
6
|
*/
|
|
@@ -20,6 +20,8 @@ export interface ErrorContainerRenderProps {
|
|
|
20
20
|
children?: React.ReactNode;
|
|
21
21
|
/** 错误信息 */
|
|
22
22
|
errorMsgs: (string | undefined)[];
|
|
23
|
+
/** 测试标识符 */
|
|
24
|
+
"data-testid"?: string;
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
27
|
* BasicCTError 组件的 props
|
|
@@ -53,4 +55,8 @@ export interface BasicCTErrorProps {
|
|
|
53
55
|
* 用于配置国际化命名空间和其他翻译选项
|
|
54
56
|
*/
|
|
55
57
|
errorMsgOptions?: UseCTErrorMsgOptions;
|
|
58
|
+
/**
|
|
59
|
+
* 测试标识符,用于自动化测试定位元素
|
|
60
|
+
*/
|
|
61
|
+
"data-testid"?: string;
|
|
56
62
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IBlankStateProps } from "./type";
|
|
3
|
-
declare const BlankState: (
|
|
3
|
+
declare const BlankState: ({ className, style, width, height, title, description, action, backgroundColor, size, "data-testid": dataTestId, }: IBlankStateProps) => React.JSX.Element;
|
|
4
4
|
export default BlankState;
|
|
@@ -4,8 +4,10 @@ export interface BreadcrumbLink {
|
|
|
4
4
|
id?: string;
|
|
5
5
|
resource: string;
|
|
6
6
|
tab?: string;
|
|
7
|
+
"data-testid"?: string;
|
|
7
8
|
onClick: React.MouseEventHandler<HTMLSpanElement>;
|
|
8
9
|
}
|
|
9
10
|
export interface IBreadcrumbProps {
|
|
10
11
|
items: BreadcrumbLink[];
|
|
12
|
+
"data-testid"?: string;
|
|
11
13
|
}
|
|
@@ -10,6 +10,7 @@ export type ButtonProps = {
|
|
|
10
10
|
} & Omit<AntdButtonProps, "type" | "icon">;
|
|
11
11
|
export type ButtonGroupType = {
|
|
12
12
|
className?: string;
|
|
13
|
+
"data-testid"?: string;
|
|
13
14
|
size?: SizeType;
|
|
14
15
|
options: Array<Omit<ButtonProps, "shape" | "size" | "icon"> & {
|
|
15
16
|
key: string;
|
|
@@ -7,6 +7,10 @@ export type CardProps = {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
hoverable?: boolean;
|
|
9
9
|
shadow?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 用于测试的标识符,会传递到卡片根容器元素。
|
|
12
|
+
*/
|
|
13
|
+
"data-testid"?: string;
|
|
10
14
|
} & React.DOMAttributes<HTMLDivElement>;
|
|
11
15
|
declare const Card: React.ForwardRefExoticComponent<{
|
|
12
16
|
collapsible?: boolean | undefined;
|
|
@@ -16,6 +20,10 @@ declare const Card: React.ForwardRefExoticComponent<{
|
|
|
16
20
|
className?: string | undefined;
|
|
17
21
|
hoverable?: boolean | undefined;
|
|
18
22
|
shadow?: boolean | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* 用于测试的标识符,会传递到卡片根容器元素。
|
|
25
|
+
*/
|
|
26
|
+
"data-testid"?: string | undefined;
|
|
19
27
|
} & React.DOMAttributes<HTMLDivElement> & {
|
|
20
28
|
children?: React.ReactNode;
|
|
21
29
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -16,6 +16,8 @@ export type PresetCascaderRenderProps = {
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
export type CascaderProps = Antd5CascaderProps & {
|
|
19
|
+
/** Test ID for automated testing */
|
|
20
|
+
"data-testid"?: string;
|
|
19
21
|
/**
|
|
20
22
|
* 自定义下拉菜单内容,具体可以参考[antd5](https://ant.design/components/cascader-cn/#API)
|
|
21
23
|
* 注意:如果需要自定义下拉菜单,会覆盖掉已有的 header / footer 表现。
|
|
@@ -9,6 +9,7 @@ export interface IDropDownMenuItem {
|
|
|
9
9
|
onClick?: () => void;
|
|
10
10
|
danger?: boolean;
|
|
11
11
|
tooltip?: string;
|
|
12
|
+
"data-testid"?: string;
|
|
12
13
|
}
|
|
13
14
|
export type Placement = "topLeft" | "topCenter" | "topRight" | "bottomLeft" | "bottomCenter" | "bottomRight";
|
|
14
15
|
export interface IDropdownMenuProps {
|
|
@@ -25,4 +26,5 @@ export interface IDropdownMenuProps {
|
|
|
25
26
|
slotsElements: {
|
|
26
27
|
trigger?: (args: object) => string | React.ReactNode;
|
|
27
28
|
};
|
|
29
|
+
"data-testid"?: string;
|
|
28
30
|
}
|
|
@@ -4,6 +4,11 @@ import { DurationUnitType, FormatDurationItem } from "../../utils/formatDuration
|
|
|
4
4
|
import { RawValue } from "../Units/units.type";
|
|
5
5
|
/**
|
|
6
6
|
* Duration 组件的属性类型
|
|
7
|
+
*
|
|
8
|
+
* data-testid 在空态(Empty)和 noUnitOnZero 分支生效。
|
|
9
|
+
* 默认渲染分支(多单位拼接)和 contentRender 分支返回 Fragment,不支持 data-testid。
|
|
10
|
+
* 需要 data-testid 时,请在 Duration 外层自行包一层 wrapper 并设置 data-testid。
|
|
11
|
+
* 使用 contentRender 时,也可在 contentRender 返回的根元素上自行设置 data-testid。
|
|
7
12
|
*/
|
|
8
13
|
export interface DurationProps extends Omit<RawValue, "decimals"> {
|
|
9
14
|
/**
|
|
@@ -25,13 +30,15 @@ export interface DurationProps extends Omit<RawValue, "decimals"> {
|
|
|
25
30
|
*/
|
|
26
31
|
emptyProps?: IEmptyProps;
|
|
27
32
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
33
|
+
* 自定义返回结果的渲染。
|
|
34
|
+
* 当提供此函数时,将使用自定义渲染函数来渲染持续时间,而不是使用默认的渲染方式。
|
|
35
|
+
* 注意:使用 contentRender 时,组件不会透传 data-testid,
|
|
36
|
+
* 调用方需要在返回的根元素上自行设置 data-testid。
|
|
30
37
|
* @param parts 格式化后的持续时间数组,每个元素包含 value 和 unit
|
|
31
38
|
* @returns 自定义的 React 节点
|
|
32
39
|
* @example
|
|
33
40
|
* contentRender={(parts) => (
|
|
34
|
-
* <div>
|
|
41
|
+
* <div data-testid="my-duration">
|
|
35
42
|
* {parts.map((part, i) => (
|
|
36
43
|
* <span key={i}>{part.value} {part.unit}</span>
|
|
37
44
|
* ))}
|
|
@@ -39,4 +46,5 @@ export interface DurationProps extends Omit<RawValue, "decimals"> {
|
|
|
39
46
|
* )}
|
|
40
47
|
*/
|
|
41
48
|
contentRender?: (parts: FormatDurationItem[]) => React.ReactNode;
|
|
49
|
+
"data-testid"?: string;
|
|
42
50
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { CSSProperties } from "react";
|
|
2
2
|
export interface IEmptyProps {
|
|
3
|
+
"data-testid"?: string;
|
|
3
4
|
className?: string;
|
|
4
5
|
style?: CSSProperties;
|
|
5
6
|
}
|
|
6
|
-
declare const Empty: (
|
|
7
|
+
declare const Empty: ({ className, style, "data-testid": dataTestId, }: IEmptyProps) => React.JSX.Element;
|
|
7
8
|
export default Empty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FieldBaseProps } from "../fields.type";
|
|
3
|
-
declare const FieldsBoolean: ({ input, children, ...props }: FieldBaseProps) => React.JSX.Element;
|
|
3
|
+
declare const FieldsBoolean: ({ input, children, "data-testid": dataTestId, ...props }: FieldBaseProps) => React.JSX.Element;
|
|
4
4
|
export default FieldsBoolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FieldBaseProps } from "../fields.type";
|
|
3
|
-
declare const FieldsDateTime: ({ input }: FieldBaseProps) => React.JSX.Element;
|
|
3
|
+
declare const FieldsDateTime: ({ input, "data-testid": dataTestId, }: FieldBaseProps) => React.JSX.Element;
|
|
4
4
|
export default FieldsDateTime;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { EnumProps } from "./fieldsEnum.type";
|
|
3
|
-
declare const FieldsEnum: ({ meta: __, enumValues, emptyLabel, ...restProps }: EnumProps) => React.JSX.Element;
|
|
3
|
+
declare const FieldsEnum: ({ meta: __, enumValues, emptyLabel, "data-testid": dataTestId, ...restProps }: EnumProps) => React.JSX.Element;
|
|
4
4
|
export default FieldsEnum;
|
|
5
5
|
export * from "./fieldsEnum.type";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FloatFieldProps } from "../../../spec";
|
|
3
|
-
declare const FieldsFloat: ({ input, meta, onBlur, autoComplete, ...props }: FloatFieldProps) => React.JSX.Element;
|
|
3
|
+
declare const FieldsFloat: ({ input, meta, onBlur, autoComplete, "data-testid": dataTestId, ...props }: FloatFieldProps) => React.JSX.Element;
|
|
4
4
|
export default FieldsFloat;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IntFieldProps } from "./fieldsInt.type";
|
|
3
|
-
declare const FieldsInt: ({ input, meta, onBlur, autoComplete, supportNegativeValue, ...props }: IntFieldProps) => React.JSX.Element;
|
|
3
|
+
declare const FieldsInt: ({ input, meta, onBlur, autoComplete, supportNegativeValue, "data-testid": dataTestId, ...props }: IntFieldProps) => React.JSX.Element;
|
|
4
4
|
export default FieldsInt;
|
|
5
5
|
export * from "./fieldsInt.type";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IntegerFieldProps } from "../../../spec";
|
|
3
|
-
declare const FieldsInteger: ({ meta, input, onBlur, ...props }: IntegerFieldProps) => React.JSX.Element;
|
|
3
|
+
declare const FieldsInteger: ({ meta, input, onBlur, "data-testid": dataTestId, ...props }: IntegerFieldProps) => React.JSX.Element;
|
|
4
4
|
export default FieldsInteger;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FieldBaseProps } from "../fields.type";
|
|
3
3
|
import { StringProps } from "./fieldsString.type";
|
|
4
|
-
declare const FieldsString: ({ input, meta, autoComplete, size, tags, className, allowClear, tagsOverflow, onTagsAllowClearClick, onClick, maxLength, focusIndicator, ...props }: FieldBaseProps & StringProps) => React.JSX.Element;
|
|
4
|
+
declare const FieldsString: ({ input, meta, autoComplete, size, tags, className, allowClear, tagsOverflow, onTagsAllowClearClick, onClick, maxLength, focusIndicator, "data-testid": dataTestId, ...props }: FieldBaseProps & StringProps) => React.JSX.Element;
|
|
5
5
|
export default FieldsString;
|
|
6
6
|
export * from "./fieldsString.type";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextAreaProps } from "antd/lib/input";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FieldBaseProps } from "../fields.type";
|
|
4
|
-
declare const FieldsTextArea: ({ input, meta, onFocusChangeHeight, ...props }: FieldBaseProps & TextAreaProps) => React.JSX.Element;
|
|
4
|
+
declare const FieldsTextArea: ({ input, meta, onFocusChangeHeight, "data-testid": dataTestId, ...props }: FieldBaseProps & TextAreaProps) => React.JSX.Element;
|
|
5
5
|
export default FieldsTextArea;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TimePickerProps } from "antd/lib/time-picker";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FieldBaseProps } from "../fields.type";
|
|
4
|
-
declare const FieldsTimePicker: ({ input, meta, ...props }: FieldBaseProps & TimePickerProps) => React.JSX.Element;
|
|
4
|
+
declare const FieldsTimePicker: ({ input, meta, "data-testid": dataTestId, ...props }: FieldBaseProps & TimePickerProps) => React.JSX.Element;
|
|
5
5
|
export default FieldsTimePicker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -29,7 +29,7 @@ export interface FieldState<FieldValue> {
|
|
|
29
29
|
visited?: boolean;
|
|
30
30
|
}
|
|
31
31
|
export type FieldMetaState<FieldValue> = Pick<FieldState<FieldValue>, Exclude<keyof FieldState<FieldValue>, "blur" | "change" | "focus" | "name" | "value">>;
|
|
32
|
-
interface FieldInputProps<FieldValue, T extends HTMLElement = HTMLElement> extends AnyObject {
|
|
32
|
+
export interface FieldInputProps<FieldValue, T extends HTMLElement = HTMLElement> extends AnyObject {
|
|
33
33
|
name: string;
|
|
34
34
|
onBlur: (event?: React.FocusEvent<T>) => void;
|
|
35
35
|
onChange: (event: React.ChangeEvent<T> | any) => void;
|
|
@@ -47,5 +47,6 @@ export interface FieldRenderProps<FieldValue, T extends HTMLElement = HTMLElemen
|
|
|
47
47
|
export type FieldBaseProps<V = any, T extends HTMLElement = HTMLElement> = FieldRenderProps<V, T> & {
|
|
48
48
|
disabled?: boolean;
|
|
49
49
|
className?: string;
|
|
50
|
+
"data-testid"?: string;
|
|
50
51
|
};
|
|
51
52
|
export {};
|
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const fields: {
|
|
3
|
-
Int: ({ input, meta, onBlur, autoComplete, supportNegativeValue, ...props }: import("./FieldsInt").IntFieldProps) => import("react").JSX.Element;
|
|
4
|
-
Integer: ({ meta, input, onBlur, ...props }: import("../..").IntegerFieldProps) => import("react").JSX.Element;
|
|
5
|
-
Float: ({ input, meta, onBlur, autoComplete, ...props }: import("../..").FloatFieldProps) => import("react").JSX.Element;
|
|
6
|
-
DateTime: ({ input }: import("./fields.type").FieldBaseProps) => import("react").JSX.Element;
|
|
7
|
-
TimePicker: ({ input, meta, ...props }: import("./fields.type").FieldRenderProps<any, HTMLElement> & {
|
|
3
|
+
Int: ({ input, meta, onBlur, autoComplete, supportNegativeValue, "data-testid": dataTestId, ...props }: import("./FieldsInt").IntFieldProps) => import("react").JSX.Element;
|
|
4
|
+
Integer: ({ meta, input, onBlur, "data-testid": dataTestId, ...props }: import("../..").IntegerFieldProps) => import("react").JSX.Element;
|
|
5
|
+
Float: ({ input, meta, onBlur, autoComplete, "data-testid": dataTestId, ...props }: import("../..").FloatFieldProps) => import("react").JSX.Element;
|
|
6
|
+
DateTime: ({ input, "data-testid": dataTestId, }: import("./fields.type").FieldBaseProps) => import("react").JSX.Element;
|
|
7
|
+
TimePicker: ({ input, meta, "data-testid": dataTestId, ...props }: import("./fields.type").FieldRenderProps<any, HTMLElement> & {
|
|
8
8
|
disabled?: boolean | undefined;
|
|
9
9
|
className?: string | undefined;
|
|
10
|
+
"data-testid"?: string | undefined;
|
|
10
11
|
} & import("antd/lib/time-picker").TimePickerProps) => import("react").JSX.Element;
|
|
11
|
-
Enum: ({ meta: __, enumValues, emptyLabel, ...restProps }: import("./FieldsEnum").EnumProps) => import("react").JSX.Element;
|
|
12
|
-
String: ({ input, meta, autoComplete, size, tags, className, allowClear, tagsOverflow, onTagsAllowClearClick, onClick, maxLength, focusIndicator, ...props }: import("./fields.type").FieldRenderProps<any, HTMLElement> & {
|
|
12
|
+
Enum: ({ meta: __, enumValues, emptyLabel, "data-testid": dataTestId, ...restProps }: import("./FieldsEnum").EnumProps) => import("react").JSX.Element;
|
|
13
|
+
String: ({ input, meta, autoComplete, size, tags, className, allowClear, tagsOverflow, onTagsAllowClearClick, onClick, maxLength, focusIndicator, "data-testid": dataTestId, ...props }: import("./fields.type").FieldRenderProps<any, HTMLElement> & {
|
|
13
14
|
disabled?: boolean | undefined;
|
|
14
15
|
className?: string | undefined;
|
|
16
|
+
"data-testid"?: string | undefined;
|
|
15
17
|
} & import("./FieldsString").StringProps) => import("react").JSX.Element;
|
|
16
|
-
Boolean: ({ input, children, ...props }: import("./fields.type").FieldBaseProps) => import("react").JSX.Element;
|
|
17
|
-
TextArea: ({ input, meta, onFocusChangeHeight, ...props }: import("./fields.type").FieldRenderProps<any, HTMLElement> & {
|
|
18
|
+
Boolean: ({ input, children, "data-testid": dataTestId, ...props }: import("./fields.type").FieldBaseProps) => import("react").JSX.Element;
|
|
19
|
+
TextArea: ({ input, meta, onFocusChangeHeight, "data-testid": dataTestId, ...props }: import("./fields.type").FieldRenderProps<any, HTMLElement> & {
|
|
18
20
|
disabled?: boolean | undefined;
|
|
19
21
|
className?: string | undefined;
|
|
22
|
+
"data-testid"?: string | undefined;
|
|
20
23
|
} & import("antd/lib/input").TextAreaProps) => import("react").JSX.Element;
|
|
21
24
|
DateTimeRange: import("react").FC<import("./fields.type").FieldRenderProps<any, HTMLElement> & {
|
|
22
25
|
disabled?: boolean | undefined;
|
|
23
26
|
className?: string | undefined;
|
|
27
|
+
"data-testid"?: string | undefined;
|
|
24
28
|
} & import("antd/lib/date-picker").DatePickerProps>;
|
|
25
29
|
};
|
|
26
30
|
export default fields;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { FormItemProps } from "antd/lib/form";
|
|
2
2
|
import React from "react";
|
|
3
|
-
declare const FormItem: (props: React.PropsWithChildren<FormItemProps>
|
|
3
|
+
declare const FormItem: (props: React.PropsWithChildren<FormItemProps> & {
|
|
4
|
+
"data-testid"?: string;
|
|
5
|
+
}) => React.ReactElement;
|
|
4
6
|
export default FormItem;
|
|
@@ -148,4 +148,9 @@ export type ImmersiveDialogProps = React.PropsWithChildren<AntdModalProps & {
|
|
|
148
148
|
* 失败时设 initializing=false 并设置 initializingError。
|
|
149
149
|
*/
|
|
150
150
|
initializingError?: string | React.ReactNode;
|
|
151
|
+
/**
|
|
152
|
+
* 测试标识符前缀,用于自动化测试定位元素。
|
|
153
|
+
* 派生子 testid:`${testId}-cancel`、`${testId}-ok`、`${testId}-close`
|
|
154
|
+
*/
|
|
155
|
+
"data-testid"?: string;
|
|
151
156
|
}>;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { PasswordProps } from "antd/lib/input";
|
|
2
2
|
import React from "react";
|
|
3
3
|
export declare const AntdPasswordInputStyled: import("@linaria/react").StyledMeta & React.ForwardRefExoticComponent<PasswordProps & React.RefAttributes<unknown>>;
|
|
4
|
-
|
|
4
|
+
export type InputPasswordProps = PasswordProps & {
|
|
5
5
|
/**
|
|
6
6
|
* 使用变量控制是否显示 error 效果
|
|
7
7
|
*/
|
|
8
8
|
error?: boolean;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* 数据测试 id
|
|
11
|
+
*/
|
|
12
|
+
"data-testid"?: string;
|
|
13
|
+
};
|
|
14
|
+
declare const InputPassword: React.FC<InputPasswordProps>;
|
|
10
15
|
export default InputPassword;
|
|
@@ -9,6 +9,7 @@ export type KitLegacySelectProps = {
|
|
|
9
9
|
scrollBottomBuffer?: number;
|
|
10
10
|
onScrollBottom?: () => void;
|
|
11
11
|
selectLimit?: number;
|
|
12
|
+
"data-testid"?: string;
|
|
12
13
|
} & AntdSelectProps<string>;
|
|
13
14
|
export interface LooseFieldRenderProps<V, T extends HTMLElement> {
|
|
14
15
|
input: {
|
|
@@ -22,4 +22,6 @@ export type LegendComponentType = React.FC<{
|
|
|
22
22
|
key?: string | number;
|
|
23
23
|
/** Callback function triggered when the legend item is clicked */
|
|
24
24
|
onClick?: (e: React.MouseEvent<HTMLDivElement>, key?: string | number) => void;
|
|
25
|
+
/** Test ID for automated testing */
|
|
26
|
+
"data-testid"?: string;
|
|
25
27
|
}>;
|
|
@@ -2,7 +2,9 @@ import { RadioGroupProps as AntdRadioGroupProps } from "antd/lib/radio";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { RadioButtonProps, RadioProps } from "./radio.type";
|
|
4
4
|
declare const Radio: React.FC<RadioProps>;
|
|
5
|
-
declare const RadioGroup: React.FC<AntdRadioGroupProps
|
|
5
|
+
declare const RadioGroup: React.FC<AntdRadioGroupProps & {
|
|
6
|
+
"data-testid"?: string;
|
|
7
|
+
}>;
|
|
6
8
|
declare const RadioButton: React.FC<RadioButtonProps>;
|
|
7
9
|
export { RadioButton, RadioGroup };
|
|
8
10
|
export default Radio;
|
|
@@ -4,6 +4,7 @@ import { RadioButtonProps as AntdRadioButtonProps } from "antd/lib/radio/radioBu
|
|
|
4
4
|
export type RadioProps = AntdRadioProps & {
|
|
5
5
|
description?: React.ReactNode;
|
|
6
6
|
compact?: boolean;
|
|
7
|
+
"data-testid"?: string;
|
|
7
8
|
};
|
|
8
9
|
export type RadioButtonProps = AntdRadioButtonProps & {
|
|
9
10
|
type?: "input" | "input-number";
|
|
@@ -13,4 +14,5 @@ export type RadioButtonProps = AntdRadioButtonProps & {
|
|
|
13
14
|
placeholder?: string;
|
|
14
15
|
initialValue?: string | number;
|
|
15
16
|
onInputChange?: (val: number | string | undefined) => void;
|
|
17
|
+
"data-testid"?: string;
|
|
16
18
|
};
|
|
@@ -58,6 +58,10 @@ import { SrcType } from "../BaseIcon";
|
|
|
58
58
|
* @see Cascader 级联选择器(内置了 SearchInput 作为搜索区域)
|
|
59
59
|
*/
|
|
60
60
|
export type SearchInputProps = Omit<InputProps, "value" | "onChange"> & {
|
|
61
|
+
/**
|
|
62
|
+
* 数据测试 id
|
|
63
|
+
*/
|
|
64
|
+
"data-testid"?: string;
|
|
61
65
|
/**
|
|
62
66
|
* 输入框的值,用于受控模式。
|
|
63
67
|
* 配置 value 时,需把 debounceWait 设置为 0,否则输入时会有卡顿的问题
|
|
@@ -175,4 +175,9 @@ export interface SmallDialogProps {
|
|
|
175
175
|
* @default 2
|
|
176
176
|
*/
|
|
177
177
|
initializingSkeletonRows?: number;
|
|
178
|
+
/**
|
|
179
|
+
* 测试标识符前缀,用于自动化测试定位元素。
|
|
180
|
+
* 派生子 testid:`${testId}-cancel`(取消按钮)、`${testId}-ok`(确认按钮)、`${testId}-close`(关闭按钮)
|
|
181
|
+
*/
|
|
182
|
+
"data-testid"?: string;
|
|
178
183
|
}
|