@cloudtower/eagle 0.27.69-alpha.6 → 0.27.70-alpha.0
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/README.md +68 -0
- package/dist/cjs/core/Arch/index.js +3 -1
- package/dist/cjs/core/SidebarMenu/SidebarMenu.js +33 -0
- package/dist/cjs/core/TableForm/index.js +2 -2
- package/dist/cjs/coreX/DateRangePicker/AbsoluteDate.js +2 -2
- package/dist/cjs/coreX/DateRangePicker/Calendar.js +5 -3
- package/dist/cjs/coreX/DateRangePicker/InputTime.js +1 -1
- package/dist/cjs/coreX/DateRangePicker/RelativeTime.js +2 -2
- package/dist/cjs/coreX/DateRangePicker/index.js +1 -1
- package/dist/cjs/coreX/I18nNameTag/index.js +1 -1
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/legacy-antd.js +1 -1
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +2188 -2188
- package/dist/esm/core/SidebarMenu/SidebarMenu.js +27 -0
- package/dist/esm/core/TableForm/index.js +2 -2
- package/dist/esm/coreX/DateRangePicker/AbsoluteDate.js +2 -2
- package/dist/esm/coreX/DateRangePicker/Calendar.js +5 -3
- package/dist/esm/coreX/DateRangePicker/InputTime.js +1 -1
- package/dist/esm/coreX/DateRangePicker/RelativeTime.js +2 -2
- package/dist/esm/coreX/DateRangePicker/index.js +1 -1
- package/dist/esm/coreX/I18nNameTag/index.js +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/stats1.html +1 -1
- package/dist/src/UIKitProvider/UIKitProvider.stories.d.ts +1 -1
- package/dist/src/core/AccordionCard/accordionCard.type.d.ts +9 -0
- package/dist/src/core/AccordionCard/index.d.ts +3 -8
- package/dist/src/core/Alert/alert.type.d.ts +6 -0
- package/dist/src/core/Alert/index.d.ts +2 -1
- package/dist/src/core/Arch/arch.type.d.ts +8 -0
- package/dist/src/core/Arch/index.d.ts +2 -1
- package/dist/src/core/Badge/badge.type.d.ts +7 -0
- package/dist/src/core/Badge/index.d.ts +2 -1
- package/dist/src/core/Bit/index.d.ts +1 -1
- package/dist/src/core/BitPerSecond/index.d.ts +1 -1
- package/dist/src/core/Bps/index.d.ts +1 -1
- package/dist/src/core/Breadcrumb/breadcrumb.type.d.ts +11 -0
- package/dist/src/core/Breadcrumb/index.d.ts +2 -1
- package/dist/src/core/Button/button.type.d.ts +20 -0
- package/dist/src/core/Button/index.d.ts +1 -0
- package/dist/src/core/ButtonGroup/index.d.ts +1 -1
- package/dist/src/core/Byte/index.d.ts +1 -1
- package/dist/src/core/Calendar/calendar.type.d.ts +4 -0
- package/dist/src/core/Calendar/index.d.ts +2 -1
- package/dist/src/core/Cascader/cascader.type.d.ts +1 -1
- package/dist/src/core/DetailCard/detailCard.type.d.ts +4 -0
- package/dist/src/core/DetailCard/index.d.ts +2 -1
- package/dist/src/core/DropdownMenu/dropdownMenu.type.d.ts +28 -0
- package/dist/src/core/DropdownMenu/index.d.ts +3 -17
- 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/FieldsDateTimeRange/index.d.ts +1 -1
- package/dist/src/core/Fields/FieldsEnum/fieldsEnum.type.d.ts +19 -0
- package/dist/src/core/Fields/FieldsEnum/index.d.ts +2 -1
- package/dist/src/core/Fields/FieldsInt/fieldsInt.type.d.ts +15 -0
- package/dist/src/core/Fields/FieldsInt/index.d.ts +2 -1
- package/dist/src/core/Fields/FieldsString/fieldsString.type.d.ts +17 -0
- package/dist/src/core/Fields/FieldsString/index.d.ts +3 -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/{spec/react-final-form.d.ts → core/Fields/fields.type.d.ts} +15 -10
- package/dist/src/core/Fields/index.d.ts +20 -9
- package/dist/src/core/Frequency/index.d.ts +1 -1
- package/dist/src/core/Input/index.d.ts +1 -0
- package/dist/src/core/Input/input.type.d.ts +14 -0
- package/dist/src/core/InputGroup/index.d.ts +1 -0
- package/dist/src/core/InputGroup/inputGroup.type.d.ts +4 -0
- package/dist/src/core/InputInteger/index.d.ts +1 -1
- package/dist/src/core/InputNumber/index.d.ts +1 -1
- package/dist/src/core/Link/index.d.ts +2 -1
- package/dist/src/core/Link/link.type.d.ts +6 -0
- package/dist/src/core/Loading/index.d.ts +2 -1
- package/dist/src/core/Loading/loading.type.d.ts +4 -0
- package/dist/src/core/Modal/index.d.ts +2 -1
- package/dist/src/core/Modal/modal.type.d.ts +28 -0
- package/dist/src/core/Pagination/index.d.ts +2 -1
- package/dist/src/core/Pagination/pagination.type.d.ts +11 -0
- package/dist/src/core/Percent/index.d.ts +1 -1
- package/dist/src/core/Progress/progress.type.d.ts +2 -1
- package/dist/src/core/Radio/index.d.ts +2 -1
- package/dist/src/core/Radio/radio.type.d.ts +16 -0
- package/dist/src/core/SearchInput/index.d.ts +2 -1
- package/dist/src/core/SearchInput/searchInput.type.d.ts +7 -0
- package/dist/src/core/Second/index.d.ts +1 -1
- package/dist/src/core/SegmentControl/index.d.ts +2 -1
- package/dist/src/core/SegmentControl/segmentControl.type.d.ts +4 -0
- package/dist/src/core/Select/index.d.ts +2 -1
- package/dist/src/core/Select/select.type.d.ts +32 -0
- package/dist/src/core/SidebarMenu/SidebarMenu.d.ts +3 -0
- package/dist/src/core/SidebarMenu/SidebarMenu.type.d.ts +4 -0
- package/dist/src/core/SidebarMenu/index.d.ts +2 -0
- package/dist/src/core/SimplePagination/index.d.ts +2 -1
- package/dist/src/core/SimplePagination/simplePagination.type.d.ts +7 -0
- package/dist/src/core/Space/index.d.ts +1 -0
- package/dist/src/core/Space/space.type.d.ts +10 -0
- package/dist/src/core/Speed/index.d.ts +1 -1
- package/dist/src/core/StatusCapsule/index.d.ts +2 -1
- package/dist/src/core/StatusCapsule/statusCapsule.type.d.ts +10 -0
- package/dist/src/core/StepProgress/index.d.ts +2 -1
- package/dist/src/core/StepProgress/stepProgress.type.d.ts +5 -0
- package/dist/src/core/Steps/index.d.ts +2 -1
- package/dist/src/core/Steps/steps.type.d.ts +19 -0
- package/dist/src/core/Switch/index.d.ts +2 -1
- package/dist/src/core/Switch/switch.type.d.ts +4 -0
- package/dist/src/core/Table/index.d.ts +2 -1
- package/dist/src/core/Table/table.type.d.ts +73 -0
- package/dist/src/core/TableForm/types.d.ts +1 -1
- package/dist/src/core/Tag/SplitTag.d.ts +1 -1
- package/dist/src/core/Tag/index.d.ts +2 -1
- package/dist/src/core/Tag/tag.type.d.ts +22 -0
- package/dist/src/core/TextArea/index.d.ts +2 -1
- package/dist/src/core/TextArea/textArea.type.d.ts +10 -0
- package/dist/src/core/Time/index.d.ts +2 -1
- package/dist/src/core/Time/time.type.d.ts +7 -0
- package/dist/src/core/TimeZoneSelect/index.d.ts +2 -1
- package/dist/src/core/TimeZoneSelect/timeZoneSelect.type.d.ts +9 -0
- package/dist/src/core/Token/index.d.ts +2 -1
- package/dist/src/core/Token/token.type.d.ts +12 -0
- package/dist/src/core/Units/index.d.ts +1 -0
- package/dist/src/core/Units/units.type.d.ts +17 -0
- package/dist/src/core/index.d.ts +10 -9
- package/dist/src/coreX/BatchOperation/batchOperation.type.d.ts +31 -0
- package/dist/src/coreX/BatchOperation/index.d.ts +2 -1
- package/dist/src/coreX/Counting/counting.type.d.ts +6 -0
- package/dist/src/coreX/Counting/index.d.ts +2 -1
- package/dist/src/coreX/CronCalendar/cronCalendar.type.d.ts +8 -0
- package/dist/src/coreX/CronCalendar/index.d.ts +2 -1
- package/dist/src/coreX/CronPlan/cronPlan.type.d.ts +13 -0
- package/dist/src/coreX/CronPlan/index.d.ts +2 -1
- package/dist/src/coreX/DateRangePicker/AbsoluteDate.d.ts +1 -1
- package/dist/src/coreX/DateRangePicker/Calendar.d.ts +1 -1
- package/dist/src/coreX/DateRangePicker/InputTime.d.ts +1 -1
- package/dist/src/coreX/DateRangePicker/RelativeTime.d.ts +1 -1
- package/dist/src/coreX/DateRangePicker/common.d.ts +2 -60
- package/dist/src/coreX/DateRangePicker/dateRangePicker.type.d.ts +64 -0
- package/dist/src/coreX/DateRangePicker/index.d.ts +3 -2
- package/dist/src/coreX/DropdownTransition/dropdownTransition.type.d.ts +4 -0
- package/dist/src/coreX/DropdownTransition/index.d.ts +1 -0
- package/dist/src/coreX/GoBackButton/goBackButton.type.d.ts +18 -0
- package/dist/src/coreX/GoBackButton/index.d.ts +2 -1
- package/dist/src/coreX/I18nNameTag/i18nNameTag.type.d.ts +14 -0
- package/dist/src/coreX/I18nNameTag/index.d.ts +2 -1
- package/dist/src/coreX/NamesTooltip/index.d.ts +2 -1
- package/dist/src/coreX/NamesTooltip/namesTooltip.type.d.ts +6 -0
- package/dist/src/coreX/OverflowTooltip/index.d.ts +1 -0
- package/dist/src/coreX/SidebarSubtitle/index.d.ts +2 -1
- package/dist/src/coreX/SidebarSubtitle/sidebarSubtitle.type.d.ts +5 -0
- package/dist/src/coreX/SortableList/index.d.ts +2 -1
- package/dist/src/coreX/SortableList/sortableList.type.d.ts +7 -0
- package/dist/src/coreX/SummaryTable/index.d.ts +2 -1
- package/dist/src/coreX/SummaryTable/summaryTable.type.d.ts +31 -0
- package/dist/src/coreX/SwitchWithText/index.d.ts +2 -1
- package/dist/src/coreX/SwitchWithText/switchWithText.type.d.ts +9 -0
- package/dist/src/coreX/TruncatedTextWithTooltip/index.d.ts +2 -1
- package/dist/src/coreX/TruncatedTextWithTooltip/truncatedTextWithTooltip.type.d.ts +5 -0
- package/dist/src/spec/base.d.ts +7 -456
- package/dist/src/spec/index.d.ts +0 -1
- package/dist/stories/docs/core/Alert.stories.d.ts +1 -1
- package/dist/stories/docs/core/Arch.stories.d.ts +1 -1
- package/dist/stories/docs/core/FieldsBoolean.stories.d.ts +2 -2
- package/dist/stories/docs/core/FieldsString.stories.d.ts +8 -8
- package/dist/stories/docs/core/FieldsTimePicker.stories.d.ts +2 -2
- package/dist/stories/docs/core/Link.stories.d.ts +1 -1
- package/dist/stories/docs/core/Modal.stories.d.ts +1 -1
- package/dist/stories/docs/core/SidebarMenu.stories.d.ts +12 -0
- package/dist/stories/docs/core/StatusCapsule.stories.d.ts +1 -1
- package/dist/stories/docs/core/Steps.stories.d.ts +1 -1
- package/dist/stories/docs/core/Table.stories.d.ts +4 -4
- package/dist/stories/docs/core/Tag.stories.d.ts +1 -1
- package/dist/stories/docs/core/Token.stories.d.ts +1 -1
- package/dist/stories/docs/coreX/CronCalendar.stories.d.ts +1 -1
- package/dist/stories/docs/coreX/CronPlan.stories.d.ts +1 -1
- package/dist/stories/docs/coreX/GoBackButton.stories.d.ts +1 -1
- package/dist/stories/docs/coreX/NamesTooltip.stories.d.ts +1 -1
- package/dist/stories/docs/coreX/SidebarSubtitle.stories.d.ts +1 -1
- package/dist/stories/docs/coreX/SortableList.stories.d.ts +1 -1
- package/dist/stories/docs/coreX/SummaryTable.stories.d.ts +1 -1
- package/dist/stories/docs/coreX/SwitchWithText.stories.d.ts +1 -1
- package/dist/stories/docs/coreX/TruncatedTextWithTooltip.stories.d.ts +1 -1
- package/dist/stories/types.d.ts +1 -1
- package/dist/style.css +2094 -2094
- package/package.json +5 -5
- package/dist/cjs/antdReexport.js +0 -149
- package/dist/cjs/core/antd.js +0 -212
- package/dist/esm/antdReexport.js +0 -13
- package/dist/esm/core/antd.js +0 -205
- package/dist/src/antdReexport.d.ts +0 -39
- package/dist/src/core/antd.d.ts +0 -3
- package/dist/src/spec/type.d.ts +0 -157
- /package/dist/cjs/{spec/type.js → core/Arch/arch.type.js} +0 -0
- /package/dist/esm/{spec/type.js → core/Arch/arch.type.js} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { SrcType } from "../../core/BaseIcon";
|
|
3
|
-
import
|
|
3
|
+
import { LinkProps } from "../Link/link.type";
|
|
4
|
+
import { TagProps } from "../Tag/tag.type";
|
|
4
5
|
export type ComponentType = "tag" | "title" | "description" | "link" | "iconField";
|
|
5
6
|
export type TitleAreaProps = {
|
|
6
7
|
title: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { RadioButtonProps, RadioProps } from "../../spec";
|
|
2
1
|
import { RadioGroupProps as AntdRadioGroupProps } from "antd/lib/radio";
|
|
3
2
|
import React from "react";
|
|
3
|
+
import { RadioButtonProps, RadioProps } from "./radio.type";
|
|
4
4
|
declare const Radio: React.FC<RadioProps>;
|
|
5
5
|
declare const RadioGroup: React.FC<AntdRadioGroupProps>;
|
|
6
6
|
declare const RadioButton: React.FC<RadioButtonProps>;
|
|
7
7
|
export { RadioButton, RadioGroup };
|
|
8
8
|
export default Radio;
|
|
9
|
+
export * from "./radio.type";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { RadioProps as AntdRadioProps } from "antd/lib/radio";
|
|
3
|
+
import { RadioButtonProps as AntdRadioButtonProps } from "antd/lib/radio/radioButton";
|
|
4
|
+
export type RadioProps = AntdRadioProps & {
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
compact?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type RadioButtonProps = AntdRadioButtonProps & {
|
|
9
|
+
type?: "input" | "input-number";
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
12
|
+
precision?: number;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
initialValue?: string | number;
|
|
15
|
+
onInputChange?: (val: number | string | undefined) => void;
|
|
16
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InputProps } from "antd/lib/input";
|
|
3
|
+
export type SearchInputProps = Omit<InputProps, "onChange"> & {
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
debounceWait?: number;
|
|
6
|
+
};
|
|
7
|
+
export type SearchInputComponentType = React.FC<SearchInputProps>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ISegmentedControlProps } from "
|
|
2
|
+
import { ISegmentedControlProps } from "./segmentControl.type";
|
|
3
3
|
declare const SegmentControl: (props: ISegmentedControlProps) => JSX.Element;
|
|
4
4
|
export default SegmentControl;
|
|
5
|
+
export * from "./segmentControl.type";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SelectProps as AntdSelectProps } from "antd/lib/select";
|
|
3
|
+
import { FieldRenderProps } from "../Fields/fields.type";
|
|
4
|
+
export type KitSelectProps = {
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
error?: unknown | React.ReactNode;
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
multiple?: boolean;
|
|
9
|
+
scrollBottomBuffer?: number;
|
|
10
|
+
onScrollBottom?: () => void;
|
|
11
|
+
selectLimit?: number;
|
|
12
|
+
} & AntdSelectProps<string>;
|
|
13
|
+
interface LooseFieldRenderProps<V, T extends HTMLElement> {
|
|
14
|
+
input: {
|
|
15
|
+
name?: FieldRenderProps<V, T>["input"]["name"];
|
|
16
|
+
value?: FieldRenderProps<V, T>["input"]["value"];
|
|
17
|
+
onBlur?: FieldRenderProps<V, T>["input"]["onBlur"];
|
|
18
|
+
onChange?: (value: string | string[], option: {
|
|
19
|
+
object: V;
|
|
20
|
+
} | Array<{
|
|
21
|
+
object: V;
|
|
22
|
+
}>) => void;
|
|
23
|
+
onFocus?: FieldRenderProps<V, T>["input"]["onFocus"];
|
|
24
|
+
type?: FieldRenderProps<V, T>["input"]["type"];
|
|
25
|
+
checked?: FieldRenderProps<V, T>["input"]["checked"];
|
|
26
|
+
multiple?: FieldRenderProps<V, T>["input"]["multiple"];
|
|
27
|
+
};
|
|
28
|
+
meta?: FieldRenderProps<V, T>["meta"];
|
|
29
|
+
focusIndicator?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export type SelectComponentType<V = any, T extends HTMLElement = HTMLElement> = React.FunctionComponent<LooseFieldRenderProps<V, T> & KitSelectProps>;
|
|
32
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ISimplePaginationProps } from "
|
|
2
|
+
import { ISimplePaginationProps } from "./simplePagination.type";
|
|
3
3
|
declare const SimplePagination: (props: ISimplePaginationProps) => JSX.Element;
|
|
4
4
|
export default SimplePagination;
|
|
5
|
+
export * from "./simplePagination.type";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type SizeType = "small" | "middle" | "large";
|
|
3
|
+
export interface ISpaceProps {
|
|
4
|
+
prefixCls?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
size?: SizeType | number;
|
|
8
|
+
direction?: "horizontal" | "vertical";
|
|
9
|
+
align?: "start" | "end" | "center" | "baseline";
|
|
10
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { StatusCapsuleColor, StatusCapsuleComponentType } from "../../spec";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import { StatusCapsuleColor, StatusCapsuleComponentType } from "./statusCapsule.type";
|
|
3
3
|
export declare const StatusPresetColors: StatusCapsuleColor[];
|
|
4
4
|
export declare const StatusIcon: React.FC<{
|
|
5
5
|
loading?: boolean;
|
|
6
6
|
}>;
|
|
7
7
|
declare const StatusCapsule: StatusCapsuleComponentType;
|
|
8
8
|
export default StatusCapsule;
|
|
9
|
+
export * from "./statusCapsule.type";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TagProps as AntdTagProps } from "antd/lib/tag";
|
|
3
|
+
export type StatusCapsuleColor = "red" | "yellow" | "green" | "blue" | "gray" | "success" | "danger" | "warning";
|
|
4
|
+
export type StatusCapsuleComponentType = React.FC<Omit<AntdTagProps, "closable" | "closeIcon" | "onClose" | "icon" | "size"> & {
|
|
5
|
+
color?: StatusCapsuleColor;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
hoverable?: boolean;
|
|
8
|
+
offWhiteMode?: boolean;
|
|
9
|
+
number?: number;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type StepProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
5
|
+
title: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type IStepsProps = {
|
|
10
|
+
className?: string;
|
|
11
|
+
current?: number;
|
|
12
|
+
direction?: "horizontal" | "vertical";
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
onChange?: (current: number) => void;
|
|
15
|
+
stepsConfig: Array<StepProps>;
|
|
16
|
+
containerClassname?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
preview?: boolean;
|
|
19
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TableProps } from "
|
|
2
|
+
import { TableProps } from "./table.type";
|
|
3
3
|
export declare const tableStyleCover: import("@linaria/core").LinariaClassName;
|
|
4
4
|
declare const Table: <T extends {
|
|
5
5
|
id: string;
|
|
6
6
|
}>(props: TableProps<T>) => JSX.Element;
|
|
7
7
|
export default Table;
|
|
8
8
|
export * from "./common";
|
|
9
|
+
export * from "./table.type";
|
|
9
10
|
export * from "./TableWidget";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ColumnsType, ColumnType, TableProps as AntdTableProps } from "antd/lib/table";
|
|
3
|
+
import { TableRowSelection } from "antd/lib/table/interface";
|
|
4
|
+
interface IdObject {
|
|
5
|
+
id: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TableComponent {
|
|
8
|
+
<TData extends IdObject>(props: React.PropsWithChildren<TableProps<TData>>, context?: unknown): React.ReactElement | null;
|
|
9
|
+
}
|
|
10
|
+
type Columns<T> = ColumnsType<T>[0];
|
|
11
|
+
export interface RequiredColumnProps<T> extends Omit<Columns<T>, "onHeaderCell" | "onCell" | "title"> {
|
|
12
|
+
key: Exclude<Columns<T>["key"], undefined | number>;
|
|
13
|
+
dataIndex: Exclude<ColumnType<T>["dataIndex"], undefined>;
|
|
14
|
+
sortable?: boolean;
|
|
15
|
+
width?: number | string;
|
|
16
|
+
onHeaderCell?: (column: ColumnType<T>) => any;
|
|
17
|
+
onCell?: (column: T) => any;
|
|
18
|
+
/**
|
|
19
|
+
* removed params for title function
|
|
20
|
+
* because we need to cast the function in customize column
|
|
21
|
+
* which cannot access the header params
|
|
22
|
+
*/
|
|
23
|
+
title: React.ReactNode | (() => React.ReactNode);
|
|
24
|
+
customizable?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export type SorterOrder = "descend" | "ascend" | undefined;
|
|
27
|
+
export interface TableProps<T extends {
|
|
28
|
+
id: string;
|
|
29
|
+
}> {
|
|
30
|
+
bordered?: boolean;
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
error?: React.ReactNode | string;
|
|
33
|
+
dataSource: T[] | undefined;
|
|
34
|
+
columns: RequiredColumnProps<T>[];
|
|
35
|
+
onSorterChange?: (order: SorterOrder | null, key?: string | number) => void;
|
|
36
|
+
onRowClick?: (record: T, index: number, evt: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
37
|
+
rowClassName?: (record: T, index: number) => string;
|
|
38
|
+
scroll?: {
|
|
39
|
+
x?: number | string | true;
|
|
40
|
+
y?: number | string;
|
|
41
|
+
};
|
|
42
|
+
onResize?: (column: RequiredColumnProps<T>[]) => void;
|
|
43
|
+
resizable?: boolean;
|
|
44
|
+
components?: {
|
|
45
|
+
table?: (props: any) => any;
|
|
46
|
+
header?: {
|
|
47
|
+
wrapper?: (props: any) => any;
|
|
48
|
+
row?: (props: any) => any;
|
|
49
|
+
cell?: (props: any) => any;
|
|
50
|
+
};
|
|
51
|
+
body?: {
|
|
52
|
+
wrapper?: (props: any) => any;
|
|
53
|
+
row?: (props: any) => any;
|
|
54
|
+
cell?: (props: any) => any;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
RowMenu?: React.FC<{
|
|
58
|
+
record: T;
|
|
59
|
+
index: number;
|
|
60
|
+
}>;
|
|
61
|
+
rowSelection?: TableRowSelection<T>;
|
|
62
|
+
empty?: string | React.ReactNode;
|
|
63
|
+
tableLayout?: "fixed" | "auto";
|
|
64
|
+
initLoading?: boolean;
|
|
65
|
+
rowKey?: AntdTableProps<T>["rowKey"];
|
|
66
|
+
wrapper?: React.MutableRefObject<HTMLDivElement | null>;
|
|
67
|
+
pagination?: {
|
|
68
|
+
current: number;
|
|
69
|
+
pageSize: number;
|
|
70
|
+
};
|
|
71
|
+
onRow?: AntdTableProps<T>["onRow"];
|
|
72
|
+
}
|
|
73
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ColumnBodyImpls } from "../../core/TableForm/Columns";
|
|
3
|
-
import { ButtonProps } from "
|
|
3
|
+
import { ButtonProps } from "../Button";
|
|
4
4
|
export type ErrorInfo = Record<string, {
|
|
5
5
|
errorMessage: string;
|
|
6
6
|
isError: boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TagProps as AntdTagProps } from "antd/lib/tag";
|
|
3
|
+
export type TagColor = "red" | "yellow" | "green" | "blue" | "purple" | "gray" | "red-ontint" | "green-ontint" | "error" | "warning" | "processing" | "default" | "success";
|
|
4
|
+
export type TagProps = Omit<AntdTagProps, "closable" | "closeIcon" | "onClose"> & {
|
|
5
|
+
color?: TagColor;
|
|
6
|
+
size?: "small" | "medium";
|
|
7
|
+
hoverable?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type SplitTagComponentType = React.FC<Omit<AntdTagProps, "closable" | "closeIcon" | "onClose" | "visible"> & {
|
|
10
|
+
color?: "red" | "yellow" | "green" | "blue" | "purple" | "gray";
|
|
11
|
+
size?: "small" | "medium";
|
|
12
|
+
primaryContent: React.ReactNode;
|
|
13
|
+
secondaryContent: React.ReactNode;
|
|
14
|
+
}>;
|
|
15
|
+
export interface NameTagType extends Omit<React.HTMLAttributes<HTMLSpanElement>, "color"> {
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
export type TagComponentType = React.FC<TagProps> & {
|
|
20
|
+
SplitTag: SplitTagComponentType;
|
|
21
|
+
NameTag: React.FC<NameTagType>;
|
|
22
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TextAreaProps as AntdTextAreaProps } from "antd/lib/input/TextArea";
|
|
2
|
+
export interface TextAreaProps extends AntdTextAreaProps {
|
|
3
|
+
error?: boolean;
|
|
4
|
+
size?: "large" | "middle" | "small";
|
|
5
|
+
autoSize?: AntdTextAreaProps["autoSize"];
|
|
6
|
+
onFocusChangeHeight?: {
|
|
7
|
+
onFocus: number;
|
|
8
|
+
onBlur: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ITimeZoneSelectProps } from "../../spec/type";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import { ITimeZoneSelectProps } from "./timeZoneSelect.type";
|
|
3
3
|
declare const TimeZoneSelect: React.FC<ITimeZoneSelectProps>;
|
|
4
4
|
export default TimeZoneSelect;
|
|
5
|
+
export * from "./timeZoneSelect.type";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TokenColor } from "../../spec";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import { TokenColor } from "./token.type";
|
|
3
3
|
export declare const TokenPresetColors: TokenColor[];
|
|
4
4
|
declare const Token: React.ForwardRefExoticComponent<Omit<import("antd/lib/tag").TagProps, "closeIcon"> & {
|
|
5
5
|
color?: TokenColor | undefined;
|
|
@@ -10,3 +10,4 @@ declare const Token: React.ForwardRefExoticComponent<Omit<import("antd/lib/tag")
|
|
|
10
10
|
} | undefined;
|
|
11
11
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
export default Token;
|
|
13
|
+
export * from "./token.type";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TagProps as AntdTagProps } from "antd/lib/tag";
|
|
3
|
+
export type TokenColor = "red" | "yellow" | "green" | "blue" | "gray" | "purple";
|
|
4
|
+
export type TokenType = Omit<AntdTagProps, "closeIcon"> & {
|
|
5
|
+
color?: TokenColor;
|
|
6
|
+
size?: "small" | "medium" | "large";
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
tooltipConfig?: {
|
|
9
|
+
title: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type TokenComponentType = React.ForwardRefExoticComponent<TokenType & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./units.type";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IEmptyProps } from "../Empty";
|
|
3
|
+
export interface RawValue {
|
|
4
|
+
rawValue?: number | null;
|
|
5
|
+
decimals?: number;
|
|
6
|
+
noUnitOnZero?: boolean;
|
|
7
|
+
abbreviate?: boolean;
|
|
8
|
+
valueClassName?: string;
|
|
9
|
+
unitClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
export type PercentFn = React.FC<RawValue & {
|
|
12
|
+
saturated?: boolean;
|
|
13
|
+
emptyProps?: IEmptyProps;
|
|
14
|
+
}>;
|
|
15
|
+
export type UnitFn = React.FC<RawValue & {
|
|
16
|
+
emptyProps?: IEmptyProps;
|
|
17
|
+
}>;
|
package/dist/src/core/index.d.ts
CHANGED
|
@@ -40,7 +40,6 @@ export * from "./Link";
|
|
|
40
40
|
export * from "./Loading";
|
|
41
41
|
export * from "./message";
|
|
42
42
|
export * from "./message-group";
|
|
43
|
-
export * from "./message-group";
|
|
44
43
|
export * from "./Metric";
|
|
45
44
|
export * from "./Metric";
|
|
46
45
|
export * from "./Modal";
|
|
@@ -59,6 +58,7 @@ export * from "./SearchInput";
|
|
|
59
58
|
export * from "./Second";
|
|
60
59
|
export * from "./SegmentControl";
|
|
61
60
|
export * from "./Select";
|
|
61
|
+
export * from "./SidebarMenu";
|
|
62
62
|
export * from "./SimplePagination";
|
|
63
63
|
export * from "./Space";
|
|
64
64
|
export * from "./Speed";
|
|
@@ -81,15 +81,16 @@ export * from "./Token";
|
|
|
81
81
|
export * from "./Tooltip";
|
|
82
82
|
export * from "./Truncate";
|
|
83
83
|
export * from "./Typo";
|
|
84
|
+
export * from "./Units";
|
|
84
85
|
export declare const units: {
|
|
85
|
-
Percent: import("
|
|
86
|
-
Byte: import("
|
|
87
|
-
Frequency: import("
|
|
88
|
-
Speed: import("
|
|
89
|
-
Bps: import("
|
|
90
|
-
BitPerSecond: import("
|
|
91
|
-
Bit: import("
|
|
92
|
-
Second: import("
|
|
86
|
+
Percent: import("./Units").PercentFn;
|
|
87
|
+
Byte: import("./Units").UnitFn;
|
|
88
|
+
Frequency: import("./Units").UnitFn;
|
|
89
|
+
Speed: import("./Units").UnitFn;
|
|
90
|
+
Bps: import("./Units").UnitFn;
|
|
91
|
+
BitPerSecond: import("./Units").UnitFn;
|
|
92
|
+
Bit: import("./Units").UnitFn;
|
|
93
|
+
Second: import("./Units").UnitFn;
|
|
93
94
|
};
|
|
94
95
|
export { units as Units };
|
|
95
96
|
export { default as AccordionCard } from "./AccordionCard";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type NormalAction = {
|
|
3
|
+
key: string;
|
|
4
|
+
icon?: React.ReactElement;
|
|
5
|
+
title: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
count?: number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
};
|
|
12
|
+
type SubAction = {
|
|
13
|
+
key: string;
|
|
14
|
+
icon?: React.ReactElement;
|
|
15
|
+
title: string;
|
|
16
|
+
children: Array<Action>;
|
|
17
|
+
danger?: boolean;
|
|
18
|
+
canMove?: {
|
|
19
|
+
id: string;
|
|
20
|
+
}[];
|
|
21
|
+
canDelete?: {
|
|
22
|
+
id: string;
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
25
|
+
export type Action = NormalAction | SubAction | "divider";
|
|
26
|
+
export interface IBatchOperation {
|
|
27
|
+
count: number;
|
|
28
|
+
onClearSelection: () => void;
|
|
29
|
+
actions: Action[];
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Action } from "../../spec/type";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import { Action } from "./batchOperation.type";
|
|
3
3
|
export declare const renderBatchOperationMenuItem: (act: Action, idx?: number) => JSX.Element;
|
|
4
4
|
declare const BatchOperation: React.FC<{
|
|
5
5
|
count: number;
|
|
@@ -7,3 +7,4 @@ declare const BatchOperation: React.FC<{
|
|
|
7
7
|
actions: Action[];
|
|
8
8
|
}>;
|
|
9
9
|
export default BatchOperation;
|
|
10
|
+
export * from "./batchOperation.type";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Dayjs } from "dayjs";
|
|
2
|
+
export type CronPlanState = {
|
|
3
|
+
expression: string;
|
|
4
|
+
retain: number;
|
|
5
|
+
startAt: Dayjs;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
empty: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type CronPlanProps = {
|
|
10
|
+
value: CronPlanState;
|
|
11
|
+
onChange: (value: CronPlanState) => unknown;
|
|
12
|
+
onRemove?: () => void;
|
|
13
|
+
};
|