@cloudtower/eagle 0.22.34 → 0.22.37
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/UIKitProvider/index.d.ts +4 -0
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/TableForm/AddRowButton.d.ts +4 -0
- package/dist/components/TableForm/Columns/AffixColumn.d.ts +4 -1
- package/dist/components/TableForm/Columns/CheckboxColumn.d.ts +3 -1
- package/dist/components/TableForm/Columns/InputColumn.d.ts +8 -2
- package/dist/components/TableForm/Columns/index.d.ts +27 -7
- package/dist/components/TableForm/TableFormBodyRows.d.ts +4 -0
- package/dist/components/TableForm/__test__/utils.spec.d.ts +1 -0
- package/dist/components/TableForm/index.d.ts +1 -15
- package/dist/components/TableForm/style.d.ts +13 -5
- package/dist/components/TableForm/types.d.ts +80 -13
- package/dist/components/TableForm/utils.d.ts +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/message-group/__test__/message-group.test.d.ts +1 -0
- package/dist/components/message-group/index.d.ts +23 -0
- package/dist/esm/index.js +1714 -663
- package/dist/esm/stats1.html +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/spec/base.d.ts +8 -1
- package/dist/style.css +1537 -1342
- package/dist/umd/index.js +1713 -662
- package/dist/umd/stats1.html +1 -1
- package/package.json +7 -5
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from "react";
|
|
2
|
+
import { BatchHelper } from "../components";
|
|
2
3
|
import { Kit } from "../spec";
|
|
3
4
|
interface IProps {
|
|
4
5
|
kit?: Kit;
|
|
6
|
+
message?: {
|
|
7
|
+
batch?: BatchHelper;
|
|
8
|
+
};
|
|
5
9
|
}
|
|
6
10
|
export declare const kitContext: React.Context<Kit<any, HTMLElement>>;
|
|
7
11
|
declare const UIKitProvider: (props: PropsWithChildren<IProps>) => JSX.Element;
|
|
@@ -4,7 +4,7 @@ declare const Button: React.ForwardRefExoticComponent<{
|
|
|
4
4
|
hoverPrefixIcon?: JSX.Element | undefined;
|
|
5
5
|
suffixIcon?: JSX.Element | undefined;
|
|
6
6
|
hoverSuffixIcon?: JSX.Element | undefined;
|
|
7
|
-
type?: "link" | "text" | "
|
|
7
|
+
type?: "link" | "text" | "default" | "primary" | "ghost" | "dashed" | "secondary" | "tertiary" | "ordinary" | "ordinary-onTint" | "quiet" | undefined;
|
|
8
8
|
} & Omit<Partial<{
|
|
9
9
|
href: string;
|
|
10
10
|
target?: string | undefined;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ColumnHeaderCellProps } from "../types";
|
|
3
|
-
export declare const AffixColumnHeaderCell: React.FC<ColumnHeaderCellProps
|
|
3
|
+
export declare const AffixColumnHeaderCell: React.FC<Omit<ColumnHeaderCellProps, "onChange" | "onBlur"> & {
|
|
4
|
+
onChange: (value: unknown) => void;
|
|
5
|
+
onBlur: () => void;
|
|
6
|
+
}>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ColumnBodyCellProps } from "../types";
|
|
3
|
-
export declare const CheckboxColumnBodyCell: React.FC<ColumnBodyCellProps
|
|
3
|
+
export declare const CheckboxColumnBodyCell: React.FC<Omit<ColumnBodyCellProps, "onChange"> & {
|
|
4
|
+
onChange: (value: unknown) => void;
|
|
5
|
+
}>;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ColumnBodyCellProps, ColumnHeaderCellProps } from "../types";
|
|
3
|
-
export declare const InputColumnHeaderCell: React.FC<ColumnHeaderCellProps
|
|
4
|
-
|
|
3
|
+
export declare const InputColumnHeaderCell: React.FC<Omit<ColumnHeaderCellProps, "onChange" | "onBlur"> & {
|
|
4
|
+
onChange: (value: unknown) => void;
|
|
5
|
+
onBlur: () => void;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const InputColumnBodyCell: React.FC<Omit<ColumnBodyCellProps, "onChange" | "onBlur"> & {
|
|
8
|
+
onChange: (value: unknown) => void;
|
|
9
|
+
onBlur: () => void;
|
|
10
|
+
}>;
|
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const ColumnHeaderImpls: {
|
|
3
3
|
text: import("react").FC<import("../types").ColumnHeaderCellProps>;
|
|
4
|
-
input: import("react").FC<import("../types").ColumnHeaderCellProps
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
input: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onChange" | "onBlur"> & {
|
|
5
|
+
onChange: (value: unknown) => void;
|
|
6
|
+
onBlur: () => void;
|
|
7
|
+
}>;
|
|
8
|
+
password: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onChange" | "onBlur"> & {
|
|
9
|
+
onChange: (value: unknown) => void;
|
|
10
|
+
onBlur: () => void;
|
|
11
|
+
}>;
|
|
12
|
+
affix: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onChange" | "onBlur"> & {
|
|
13
|
+
onChange: (value: unknown) => void;
|
|
14
|
+
onBlur: () => void;
|
|
15
|
+
}>;
|
|
7
16
|
checkbox: import("react").FC<import("../types").ColumnHeaderCellProps>;
|
|
8
17
|
};
|
|
9
18
|
export declare const ColumnBodyImpls: {
|
|
10
19
|
text: import("react").FC<import("../types").ColumnBodyCellProps>;
|
|
11
|
-
input: import("react").FC<import("../types").ColumnBodyCellProps
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
input: import("react").FC<Omit<import("../types").ColumnBodyCellProps, "onChange" | "onBlur"> & {
|
|
21
|
+
onChange: (value: unknown) => void;
|
|
22
|
+
onBlur: () => void;
|
|
23
|
+
}>;
|
|
24
|
+
password: import("react").FC<Omit<import("../types").ColumnBodyCellProps, "onChange" | "onBlur"> & {
|
|
25
|
+
onChange: (value: unknown) => void;
|
|
26
|
+
onBlur: () => void;
|
|
27
|
+
}>;
|
|
28
|
+
affix: import("react").FC<Omit<import("../types").ColumnBodyCellProps, "onChange" | "onBlur"> & {
|
|
29
|
+
onChange: (value: unknown) => void;
|
|
30
|
+
onBlur: () => void;
|
|
31
|
+
}>;
|
|
32
|
+
checkbox: import("react").FC<Omit<import("../types").ColumnBodyCellProps, "onChange"> & {
|
|
33
|
+
onChange: (value: unknown) => void;
|
|
34
|
+
}>;
|
|
15
35
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
type TableFormProps = {
|
|
4
|
-
defaultData: any[];
|
|
5
|
-
columns: TableFormColumn[];
|
|
6
|
-
rowCount?: number;
|
|
7
|
-
errorInfo?: ErrorInfo;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
onHeaderChange?: (data: unknown[]) => void;
|
|
10
|
-
onHeaderBlur?: (data: unknown[]) => void;
|
|
11
|
-
onBodyChange?: (value: unknown[], path: string) => void;
|
|
12
|
-
onBodyBlur?: (value: unknown, path: string) => void;
|
|
13
|
-
};
|
|
14
|
-
export type TableFormHandle = {
|
|
15
|
-
setData: (data: Record<string, any>[]) => void;
|
|
16
|
-
};
|
|
2
|
+
import { TableFormHandle, TableFormProps } from "./types";
|
|
17
3
|
declare const TableForm: React.ForwardRefExoticComponent<TableFormProps & React.RefAttributes<TableFormHandle>>;
|
|
18
4
|
export default TableForm;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const BatchInputListHeaderItemStyle: import("@linaria/core").LinariaClassName;
|
|
3
|
-
export declare const BatchInputListBodyCellStyle: import("@linaria/core").LinariaClassName;
|
|
4
|
-
export declare const BatchInputListHeaderCellStyle: import("@linaria/core").LinariaClassName;
|
|
1
|
+
/// <reference types="react" />
|
|
5
2
|
export declare const TitleStyle: import("@linaria/core").LinariaClassName;
|
|
6
3
|
export declare const SubtitleStyle: import("@linaria/core").LinariaClassName;
|
|
7
4
|
export declare const BodyCellTextStyle: import("@linaria/core").LinariaClassName;
|
|
8
5
|
export declare const BodyCellIconStyle: import("@linaria/core").LinariaClassName;
|
|
9
|
-
export declare const
|
|
6
|
+
export declare const BodyCellTextWrapper: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
7
|
+
as?: import("react").ElementType<any> | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const TableFormWrapper: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
10
|
+
as?: import("react").ElementType<any> | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const AddRowButtonWrapper: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
13
|
+
as?: import("react").ElementType<any> | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const DraggableHandleWrapper: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
16
|
+
as?: import("react").ElementType<any> | undefined;
|
|
17
|
+
}>;
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps } from "src/spec";
|
|
1
3
|
import { ColumnBodyImpls } from "./Columns";
|
|
2
4
|
export type ErrorInfo = Record<string, {
|
|
3
5
|
errorMessage: string;
|
|
4
6
|
isError: boolean;
|
|
5
7
|
}>;
|
|
8
|
+
export type CustomizedColumnRenderProps = {
|
|
9
|
+
value?: unknown;
|
|
10
|
+
rowIndex?: number;
|
|
11
|
+
onChange: (value: unknown) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
onBlur?: () => void;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
isHeader: boolean;
|
|
16
|
+
};
|
|
6
17
|
export type TableFormColumn = {
|
|
7
|
-
type
|
|
18
|
+
type?: keyof typeof ColumnBodyImpls;
|
|
8
19
|
title?: string;
|
|
9
20
|
key: string;
|
|
10
21
|
subTitle?: string;
|
|
@@ -19,31 +30,87 @@ export type TableFormColumn = {
|
|
|
19
30
|
autoIncrease?: boolean;
|
|
20
31
|
disablePrefix?: boolean;
|
|
21
32
|
disableSuffix?: boolean;
|
|
22
|
-
headerValidator?: (value: any) => string;
|
|
23
33
|
customData?: any;
|
|
34
|
+
align?: "left" | "right" | "center";
|
|
35
|
+
renderDescription?: (props: RenderRowDescriptionProps) => React.ReactNode;
|
|
36
|
+
render?: (props: CustomizedColumnRenderProps) => React.ReactNode;
|
|
37
|
+
validator?: (params: {
|
|
38
|
+
value: unknown;
|
|
39
|
+
rowIndex?: number;
|
|
40
|
+
rowData?: DataType;
|
|
41
|
+
isHeader?: boolean;
|
|
42
|
+
}) => string | undefined;
|
|
24
43
|
};
|
|
25
44
|
export interface ColumnHeaderCellProps {
|
|
26
|
-
data:
|
|
27
|
-
latestData:
|
|
45
|
+
data: DataType[];
|
|
46
|
+
latestData: DataType[];
|
|
28
47
|
column: TableFormColumn;
|
|
29
48
|
disabled?: boolean;
|
|
30
|
-
|
|
31
|
-
onChange?: (newData:
|
|
49
|
+
disableBatchFilling?: boolean;
|
|
50
|
+
onChange?: (newData: DataType[], columnKey?: string) => void;
|
|
32
51
|
onBlur?: (key: string, error?: string) => void;
|
|
33
52
|
onVisibleChange?: (visible: boolean) => void;
|
|
34
53
|
}
|
|
54
|
+
export type DataType = {
|
|
55
|
+
[columnKey: string]: any;
|
|
56
|
+
deletable?: boolean;
|
|
57
|
+
};
|
|
35
58
|
export interface ColumnBodyCellProps {
|
|
36
|
-
data:
|
|
37
|
-
latestData:
|
|
38
|
-
defaultData: Record<string, any>[];
|
|
39
|
-
errorInfo: ColumnHeaderCellProps["errorInfo"];
|
|
59
|
+
data: DataType[];
|
|
60
|
+
latestData: DataType[];
|
|
40
61
|
index: number;
|
|
41
62
|
column: TableFormColumn;
|
|
42
63
|
disabled?: boolean;
|
|
43
|
-
onChange?: (newData:
|
|
44
|
-
onBlur?: (newData:
|
|
45
|
-
onClear?: (newData: Record<string, any>[], path: string) => void;
|
|
64
|
+
onChange?: (newData: DataType[], rowIndex?: number, columnKey?: string) => void;
|
|
65
|
+
onBlur?: (newData: DataType[], rowIndex?: number, columnKey?: string) => void;
|
|
46
66
|
customData?: any;
|
|
47
67
|
placeholderValue?: string;
|
|
48
68
|
visible?: boolean;
|
|
69
|
+
isRowError?: boolean;
|
|
49
70
|
}
|
|
71
|
+
export type AddRowButtonProps = {
|
|
72
|
+
config: RowAddConfigurations;
|
|
73
|
+
columns: TableFormColumn[];
|
|
74
|
+
updateData: (data: DataType[]) => void;
|
|
75
|
+
data: DataType[];
|
|
76
|
+
};
|
|
77
|
+
export type RowAddConfigurations = {
|
|
78
|
+
addible: boolean;
|
|
79
|
+
text?: (() => React.ReactNode) | string;
|
|
80
|
+
buttonProps?: ButtonProps;
|
|
81
|
+
maximum?: number;
|
|
82
|
+
className?: string;
|
|
83
|
+
CustomizedButton?: (props: AddRowButtonProps) => React.ReactElement;
|
|
84
|
+
};
|
|
85
|
+
export interface TableFormRowsProps extends Pick<TableFormProps, "columns" | "disabled" | "deletable" | "draggable" | "disableBatchFilling" | "rowSplitType" | "renderRowDescription" | "rowValidator" | "onBodyBlur"> {
|
|
86
|
+
data: DataType[];
|
|
87
|
+
latestData: DataType[];
|
|
88
|
+
updateData: (data: DataType[]) => void;
|
|
89
|
+
passwordVisible: boolean;
|
|
90
|
+
}
|
|
91
|
+
export type RenderRowDescriptionProps = {
|
|
92
|
+
rowIndex: number;
|
|
93
|
+
rowData: DataType;
|
|
94
|
+
latestData?: DataType[];
|
|
95
|
+
};
|
|
96
|
+
export type TableFormProps = {
|
|
97
|
+
defaultData?: DataType[];
|
|
98
|
+
columns: TableFormColumn[];
|
|
99
|
+
disabled?: boolean;
|
|
100
|
+
rowAddConfig?: RowAddConfigurations;
|
|
101
|
+
deletable?: boolean;
|
|
102
|
+
size?: "default" | "large" | "small";
|
|
103
|
+
draggable?: boolean;
|
|
104
|
+
disableBatchFilling?: boolean;
|
|
105
|
+
className?: string;
|
|
106
|
+
rowSplitType?: "border" | "zebraMarking";
|
|
107
|
+
renderRowDescription?: (props: RenderRowDescriptionProps) => React.ReactNode;
|
|
108
|
+
rowValidator?: (rowIndex: number, rowData: DataType) => string | undefined;
|
|
109
|
+
onHeaderChange?: (data: unknown[], columnKey: string) => void;
|
|
110
|
+
onHeaderBlur?: (data: unknown[]) => void;
|
|
111
|
+
onBodyChange?: (value: DataType[], rowIndex?: number, columnKey?: string) => void;
|
|
112
|
+
onBodyBlur?: (value: DataType, rowIndex?: number, columnKey?: string) => void;
|
|
113
|
+
};
|
|
114
|
+
export type TableFormHandle = {
|
|
115
|
+
setData: (data: DataType[]) => void;
|
|
116
|
+
};
|
|
@@ -1 +1,4 @@
|
|
|
1
|
+
import { TableFormColumn } from "./types";
|
|
1
2
|
export declare function increaseLastNumber(str: string, num: number): string;
|
|
3
|
+
export declare const genEmptyRow: (columns: TableFormColumn[]) => Record<string, any>;
|
|
4
|
+
export declare const moveItemInArray: <T>(array: T[], fromIndex: number, toIndex: number) => T[];
|
|
@@ -12,6 +12,7 @@ export { default as InputTagItem } from "./InputTagItem";
|
|
|
12
12
|
export * from "./KitStoreProvider";
|
|
13
13
|
export { default as KitStoreProvider } from "./KitStoreProvider";
|
|
14
14
|
export { default as Loading } from "./Loading";
|
|
15
|
+
export * from "./message-group";
|
|
15
16
|
export * from "./Metric";
|
|
16
17
|
export { default as Metric } from "./Metric";
|
|
17
18
|
export * from "./Modal";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { message } from "antd";
|
|
2
|
+
import { ArgsProps } from "antd/lib/message";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
export declare function makeUUID(length?: number): string;
|
|
5
|
+
export type BatchHelper = {
|
|
6
|
+
getBatchKey: (content: ReactNode) => string | undefined;
|
|
7
|
+
getBatchContent: (batchKey: string, count: number) => ReactNode;
|
|
8
|
+
};
|
|
9
|
+
type KeyedArgsProps = ArgsProps & {
|
|
10
|
+
key: string;
|
|
11
|
+
};
|
|
12
|
+
export declare class Batcher {
|
|
13
|
+
private batchSize;
|
|
14
|
+
private batchTime;
|
|
15
|
+
private scheduler;
|
|
16
|
+
private originalMethod;
|
|
17
|
+
private batchHelper;
|
|
18
|
+
constructor(originalMethod: typeof message["success"], batchHelper: BatchHelper);
|
|
19
|
+
addMessage(originContent: KeyedArgsProps): void;
|
|
20
|
+
private applyContent;
|
|
21
|
+
}
|
|
22
|
+
export declare function createBatchMessageMethods(batchHelper?: BatchHelper): typeof message;
|
|
23
|
+
export {};
|