@cloudtower/eagle 0.22.40 → 0.23.1

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.
@@ -1,3 +1,4 @@
1
+ import { ConfigProviderProps } from "antd/lib/config-provider";
1
2
  import React, { PropsWithChildren } from "react";
2
3
  import { BatchHelper } from "../components";
3
4
  import { Kit } from "../spec";
@@ -6,6 +7,7 @@ interface IProps {
6
7
  message?: {
7
8
  batch?: BatchHelper;
8
9
  };
10
+ antdConfig?: ConfigProviderProps;
9
11
  }
10
12
  export declare const kitContext: React.Context<Kit<any, HTMLElement>>;
11
13
  declare const UIKitProvider: (props: PropsWithChildren<IProps>) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { ColumnHeaderCellProps } from "../types";
3
3
  export declare const AffixColumnHeaderCell: React.FC<Omit<ColumnHeaderCellProps, "onChange" | "onBlur"> & {
4
- onChange: (value: unknown) => void;
4
+ onChange: (value: any) => void;
5
5
  onBlur: () => void;
6
6
  }>;
@@ -1,5 +1,8 @@
1
1
  import React from "react";
2
- import { ColumnBodyCellProps } from "../types";
3
- export declare const CheckboxColumnBodyCell: React.FC<Omit<ColumnBodyCellProps, "onChange"> & {
4
- onChange: (value: unknown) => void;
2
+ import { ColumnBodyCellProps, ColumnHeaderCellProps } from "../types";
3
+ export declare const CheckboxColumnHeaderCell: React.FC<Omit<ColumnHeaderCellProps, "onChange" | "onBlur"> & {
4
+ onChange: (value: any, shouldUpdateData?: boolean) => void;
5
+ }>;
6
+ export declare const CheckboxColumnBodyCell: React.FC<Pick<ColumnBodyCellProps, "data" | "column" | "index"> & {
7
+ onChange: (value: any) => void;
5
8
  }>;
@@ -1,10 +1,10 @@
1
1
  import React from "react";
2
2
  import { ColumnBodyCellProps, ColumnHeaderCellProps } from "../types";
3
3
  export declare const InputColumnHeaderCell: React.FC<Omit<ColumnHeaderCellProps, "onChange" | "onBlur"> & {
4
- onChange: (value: unknown) => void;
4
+ onChange: (value: any) => void;
5
5
  onBlur: () => void;
6
6
  }>;
7
- export declare const InputColumnBodyCell: React.FC<Omit<ColumnBodyCellProps, "onChange" | "onBlur"> & {
8
- onChange: (value: unknown) => void;
7
+ export declare const InputColumnBodyCell: React.FC<Pick<ColumnBodyCellProps, "data" | "latestData" | "column" | "index" | "disabled" | "visible"> & {
8
+ onChange: (value: any) => void;
9
9
  onBlur: () => void;
10
10
  }>;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { ColumnBodyCellProps, ColumnHeaderCellProps } from "../types";
3
3
  export declare const TextColumnHeaderCell: React.FC<ColumnHeaderCellProps>;
4
- export declare const TextColumnBodyCell: React.FC<ColumnBodyCellProps>;
4
+ export declare const TextColumnBodyCell: React.FC<Pick<ColumnBodyCellProps, "data" | "column" | "index">>;
@@ -2,34 +2,36 @@
2
2
  export declare const ColumnHeaderImpls: {
3
3
  text: import("react").FC<import("../types").ColumnHeaderCellProps>;
4
4
  input: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onChange" | "onBlur"> & {
5
- onChange: (value: unknown) => void;
5
+ onChange: (value: any) => void;
6
6
  onBlur: () => void;
7
7
  }>;
8
8
  password: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onChange" | "onBlur"> & {
9
- onChange: (value: unknown) => void;
9
+ onChange: (value: any) => void;
10
10
  onBlur: () => void;
11
11
  }>;
12
12
  affix: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onChange" | "onBlur"> & {
13
- onChange: (value: unknown) => void;
13
+ onChange: (value: any) => void;
14
14
  onBlur: () => void;
15
15
  }>;
16
- checkbox: import("react").FC<import("../types").ColumnHeaderCellProps>;
16
+ checkbox: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onChange" | "onBlur"> & {
17
+ onChange: (value: any, shouldUpdateData?: boolean | undefined) => void;
18
+ }>;
17
19
  };
18
20
  export declare const ColumnBodyImpls: {
19
- text: import("react").FC<import("../types").ColumnBodyCellProps>;
20
- input: import("react").FC<Omit<import("../types").ColumnBodyCellProps, "onChange" | "onBlur"> & {
21
- onChange: (value: unknown) => void;
21
+ text: import("react").FC<Pick<import("../types").ColumnBodyCellProps, "data" | "column" | "index">>;
22
+ input: import("react").FC<Pick<import("../types").ColumnBodyCellProps, "data" | "latestData" | "column" | "disabled" | "index" | "visible"> & {
23
+ onChange: (value: any) => void;
22
24
  onBlur: () => void;
23
25
  }>;
24
- password: import("react").FC<Omit<import("../types").ColumnBodyCellProps, "onChange" | "onBlur"> & {
25
- onChange: (value: unknown) => void;
26
+ password: import("react").FC<Pick<import("../types").ColumnBodyCellProps, "data" | "latestData" | "column" | "disabled" | "index" | "visible"> & {
27
+ onChange: (value: any) => void;
26
28
  onBlur: () => void;
27
29
  }>;
28
- affix: import("react").FC<Omit<import("../types").ColumnBodyCellProps, "onChange" | "onBlur"> & {
29
- onChange: (value: unknown) => void;
30
+ affix: import("react").FC<Pick<import("../types").ColumnBodyCellProps, "data" | "latestData" | "column" | "disabled" | "index" | "visible"> & {
31
+ onChange: (value: any) => void;
30
32
  onBlur: () => void;
31
33
  }>;
32
- checkbox: import("react").FC<Omit<import("../types").ColumnBodyCellProps, "onChange"> & {
33
- onChange: (value: unknown) => void;
34
+ checkbox: import("react").FC<Pick<import("../types").ColumnBodyCellProps, "data" | "column" | "index"> & {
35
+ onChange: (value: any) => void;
34
36
  }>;
35
37
  };
@@ -5,10 +5,15 @@ export type ErrorInfo = Record<string, {
5
5
  errorMessage: string;
6
6
  isError: boolean;
7
7
  }>;
8
+ export declare enum ValidateTriggerType {
9
+ Normal = 0,
10
+ Aggressive = 1,
11
+ Lazy = 2
12
+ }
8
13
  export type CustomizedColumnRenderProps = {
9
- value?: unknown;
14
+ value?: any;
10
15
  rowIndex?: number;
11
- onChange: (value: unknown) => void;
16
+ onChange: (value: any) => void;
12
17
  disabled?: boolean;
13
18
  onBlur?: () => void;
14
19
  placeholder?: string;
@@ -22,9 +27,9 @@ export type TableFormColumn = {
22
27
  subTitleColor?: "" | "primary" | "success" | "warning" | "danger";
23
28
  bodyIcon?: any;
24
29
  bodyErrorIcon?: any;
25
- width?: number;
30
+ width?: number | string;
26
31
  displayText?: string;
27
- defaultValue?: unknown;
32
+ defaultValue?: any;
28
33
  hidden?: boolean;
29
34
  placeholder?: string;
30
35
  autoIncrease?: boolean;
@@ -35,7 +40,7 @@ export type TableFormColumn = {
35
40
  renderDescription?: (props: RenderRowDescriptionProps) => React.ReactNode;
36
41
  render?: (props: CustomizedColumnRenderProps) => React.ReactNode;
37
42
  validator?: (params: {
38
- value: unknown;
43
+ value: any;
39
44
  rowIndex?: number;
40
45
  rowData?: DataType;
41
46
  isHeader?: boolean;
@@ -47,13 +52,12 @@ export interface ColumnHeaderCellProps {
47
52
  column: TableFormColumn;
48
53
  disabled?: boolean;
49
54
  disableBatchFilling?: boolean;
50
- onChange?: (newData: DataType[], columnKey?: string) => void;
55
+ onChange?: (newData: DataType[], columnKey: string, shouldUpdateData: boolean) => void;
51
56
  onBlur?: (key: string, error?: string) => void;
52
57
  onVisibleChange?: (visible: boolean) => void;
53
58
  }
54
59
  export type DataType = {
55
60
  [columnKey: string]: any;
56
- deletable?: boolean;
57
61
  };
58
62
  export interface ColumnBodyCellProps {
59
63
  data: DataType[];
@@ -66,7 +70,10 @@ export interface ColumnBodyCellProps {
66
70
  customData?: any;
67
71
  placeholderValue?: string;
68
72
  visible?: boolean;
69
- isRowError?: boolean;
73
+ validateTriggerType: ValidateTriggerType;
74
+ isRowError: boolean;
75
+ getRowValidateResult: (rowData: DataType) => string | undefined;
76
+ validateAll: boolean;
70
77
  }
71
78
  export type AddRowButtonProps = {
72
79
  config: RowAddConfigurations;
@@ -82,35 +89,43 @@ export type RowAddConfigurations = {
82
89
  className?: string;
83
90
  CustomizedButton?: (props: AddRowButtonProps) => React.ReactElement;
84
91
  };
85
- export interface TableFormRowsProps extends Pick<TableFormProps, "columns" | "disabled" | "deletable" | "draggable" | "disableBatchFilling" | "rowSplitType" | "renderRowDescription" | "rowValidator" | "onBodyBlur"> {
92
+ export interface TableFormRowsProps extends Pick<TableFormProps, "columns" | "disabled" | "deleteConfig" | "draggable" | "disableBatchFilling" | "rowSplitType" | "validateTriggerType" | "renderRowDescription" | "rowValidator" | "onBodyBlur"> {
86
93
  data: DataType[];
87
94
  latestData: DataType[];
88
95
  updateData: (data: DataType[]) => void;
89
96
  passwordVisible: boolean;
97
+ validateAll: boolean;
90
98
  }
91
99
  export type RenderRowDescriptionProps = {
92
100
  rowIndex: number;
93
101
  rowData: DataType;
94
102
  latestData?: DataType[];
95
103
  };
104
+ export type DeletableConfigurations = {
105
+ deletable: boolean;
106
+ specifyRowDeleteDisabled?: (rowIndex: number, allData: DataType[]) => boolean;
107
+ };
96
108
  export type TableFormProps = {
97
109
  defaultData?: DataType[];
98
110
  columns: TableFormColumn[];
99
111
  disabled?: boolean;
100
112
  rowAddConfig?: RowAddConfigurations;
101
- deletable?: boolean;
113
+ deleteConfig?: DeletableConfigurations;
102
114
  size?: "default" | "large" | "small";
103
115
  draggable?: boolean;
104
116
  disableBatchFilling?: boolean;
105
117
  className?: string;
106
118
  rowSplitType?: "border" | "zebraMarking";
119
+ validateTriggerType?: ValidateTriggerType;
120
+ maxHeight?: number | string;
107
121
  renderRowDescription?: (props: RenderRowDescriptionProps) => React.ReactNode;
108
122
  rowValidator?: (rowIndex: number, rowData: DataType) => string | undefined;
109
- onHeaderChange?: (data: unknown[], columnKey: string) => void;
110
- onHeaderBlur?: (data: unknown[]) => void;
123
+ onHeaderChange?: (data: any[], columnKey: string) => void;
124
+ onHeaderBlur?: (data: any[]) => void;
111
125
  onBodyChange?: (value: DataType[], rowIndex?: number, columnKey?: string) => void;
112
126
  onBodyBlur?: (value: DataType, rowIndex?: number, columnKey?: string) => void;
113
127
  };
114
128
  export type TableFormHandle = {
115
129
  setData: (data: DataType[]) => void;
130
+ validateWholeFields: () => void;
116
131
  };