hlyc-web-pack 3.6.85 → 3.6.87
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/lib/Affix/index.d.ts +1 -1
- package/lib/Dialog/index.d.ts +1 -1
- package/lib/Empty/index.d.ts +2 -2
- package/lib/GaoDeMap/index.d.ts +1 -1
- package/lib/GenerateForm/index.d.ts +4 -4
- package/lib/GenerateTable/EditableCell/index.d.ts +19 -9
- package/lib/GenerateTable/index.d.ts +22 -3
- package/lib/LayoutFormModal/index.d.ts +1 -1
- package/lib/LayoutTableModal/index.d.ts +1 -1
- package/lib/Upload/index.d.ts +1 -1
- package/lib/VirtualList/index.d.ts +1 -1
- package/lib/brother/hooks/useDeepCompareEffect/index.d.ts +4 -4
- package/lib/brother/hooks/useMemoizedFn/index.d.ts +1 -1
- package/lib/brother/hooks/useUpdateEffect/index.d.ts +1 -1
- package/lib/brother/typings/index.d.ts +7 -7
- package/lib/index.js +4 -39
- package/package.json +2 -2
package/lib/Affix/index.d.ts
CHANGED
package/lib/Dialog/index.d.ts
CHANGED
package/lib/Empty/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EmptyProps } from 'antd/lib/empty';
|
|
2
2
|
import './index.less';
|
|
3
|
-
|
|
3
|
+
type Props = EmptyProps & {
|
|
4
4
|
/** 区域高度 */
|
|
5
5
|
outerHeight?: number;
|
|
6
6
|
};
|
|
7
7
|
/** 空内容 */
|
|
8
|
-
declare const Empty: (props?: Props
|
|
8
|
+
declare const Empty: (props?: Props) => JSX.Element;
|
|
9
9
|
export default Empty;
|
package/lib/GaoDeMap/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ interface PropType {
|
|
|
8
8
|
/** 关键字选中回调 */
|
|
9
9
|
onChange?: (data: MapType) => void;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type positionType = [number, number];
|
|
12
12
|
export interface MapCallType {
|
|
13
13
|
setMapCenter: (data: positionType, zoom?: number) => void;
|
|
14
14
|
}
|
|
@@ -26,9 +26,9 @@ export interface DefaultOptionType {
|
|
|
26
26
|
children?: Array<DefaultOptionType>;
|
|
27
27
|
[key: string]: any;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
type remoteValueType = string | undefined;
|
|
30
|
+
type remotePromiseType = (value: remoteValueType, other?: any) => Promise<SelectType[]>;
|
|
31
|
+
type inputConfig = Omit<InputProps, 'inputMode'> & {
|
|
32
32
|
inputMode?: InputProps['type'];
|
|
33
33
|
};
|
|
34
34
|
interface UnionType {
|
|
@@ -44,7 +44,7 @@ interface UnionType {
|
|
|
44
44
|
timePickerConfig?: FormListType['timePickerConfig'];
|
|
45
45
|
rules?: FormListType['rules'];
|
|
46
46
|
}
|
|
47
|
-
export
|
|
47
|
+
export type FormListType = {
|
|
48
48
|
colProps?: ColProps;
|
|
49
49
|
visible?: boolean;
|
|
50
50
|
componentName: 'Input' | 'InputNumber' | 'HideInput' | 'TextArea' | 'AutoComplete' | 'InputAutoComplete' | 'Select' | 'Multiple' | 'MultipleTag' | 'RemoteSearch' | 'DatePicker' | 'RangePicker' | 'TimeRangePicker' | 'TimePicker' | 'Switch' | 'Radio' | 'Checkbox' | 'TreeSelect' | 'Union' | 'RegionSelection' | 'Rate' | 'Null';
|
|
@@ -3,10 +3,10 @@ import { InternalFieldProps } from 'rc-field-form/lib/Field';
|
|
|
3
3
|
import { SelectType, AnyObjectType } from '../../brother/typings';
|
|
4
4
|
import { TableColumns } from '../index';
|
|
5
5
|
import './index.less';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
type remoteValueType = string | undefined;
|
|
7
|
+
type remotePromiseType = (value: remoteValueType, record: AnyObjectType) => Promise<SelectType[]>;
|
|
8
|
+
type SpanType = number | undefined;
|
|
9
|
+
type CellType = {
|
|
10
10
|
rowSpan?: SpanType;
|
|
11
11
|
colSpan?: SpanType;
|
|
12
12
|
};
|
|
@@ -40,7 +40,7 @@ export interface EditableColumnsType {
|
|
|
40
40
|
controlRender: (record: AnyObjectType, childNode: React.ReactNode) => React.ReactNode;
|
|
41
41
|
}
|
|
42
42
|
/** 可编辑单元格 */
|
|
43
|
-
export
|
|
43
|
+
export type EditableCellProps = {
|
|
44
44
|
className?: string;
|
|
45
45
|
title: React.ReactNode;
|
|
46
46
|
children: React.ReactNode;
|
|
@@ -50,12 +50,22 @@ export declare type EditableCellProps = {
|
|
|
50
50
|
handleSave: (record: AnyObjectType, dataIndex: string) => void;
|
|
51
51
|
columns: TableColumns[];
|
|
52
52
|
} & EditableColumnsType;
|
|
53
|
-
|
|
53
|
+
export type EditableCellVC = EditableCellProps & CellType & {
|
|
54
|
+
vc: any;
|
|
55
|
+
};
|
|
56
|
+
export interface DraggableBodyRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
57
|
+
/** 虚拟表格 */
|
|
58
|
+
vc?: any;
|
|
59
|
+
/** 是否打开拖拽功能 */
|
|
54
60
|
open: boolean;
|
|
55
|
-
|
|
61
|
+
/** 拖拽事件 */
|
|
56
62
|
moveRow: (dragIndex: number, hoverIndex: number) => void;
|
|
63
|
+
/** 索引 */
|
|
64
|
+
index: number;
|
|
57
65
|
}
|
|
58
|
-
export declare const EditableRow: ({ open, index, moveRow, className, style, ...restProps }: DraggableBodyRowProps) => JSX.Element;
|
|
66
|
+
export declare const EditableRow: ({ vc, open, index, moveRow, className, style, ...restProps }: DraggableBodyRowProps) => JSX.Element;
|
|
59
67
|
/** 可编辑单元格 */
|
|
60
|
-
declare const EditableCell: React.FC<EditableCellProps & CellType
|
|
68
|
+
declare const EditableCell: React.FC<EditableCellProps & CellType & {
|
|
69
|
+
vc: any;
|
|
70
|
+
}>;
|
|
61
71
|
export default EditableCell;
|
|
@@ -3,7 +3,7 @@ import { TablePaginationConfig, TableProps, ColumnType } from 'antd/es/table';
|
|
|
3
3
|
import { EditableColumnsType } from './EditableCell';
|
|
4
4
|
import { AnyObjectType, PromiseAxiosResultType } from '../brother/typings';
|
|
5
5
|
import './index.less';
|
|
6
|
-
export
|
|
6
|
+
export type TableColumns<T = AnyObjectType> = ColumnType<T> & Partial<EditableColumnsType>;
|
|
7
7
|
export interface getTableListQueryType {
|
|
8
8
|
/** 分页值 */
|
|
9
9
|
current?: number;
|
|
@@ -34,10 +34,22 @@ export interface TableCallType {
|
|
|
34
34
|
/** 设置表格静态数据 */
|
|
35
35
|
setStaticDataList: (row: AnyObjectType | AnyObjectType[], callback?: () => void) => void;
|
|
36
36
|
}
|
|
37
|
-
export
|
|
37
|
+
export type ScrollXYType = {
|
|
38
38
|
x?: string | number | true | undefined;
|
|
39
39
|
y?: string | number | undefined;
|
|
40
40
|
};
|
|
41
|
+
export interface VirtualProps {
|
|
42
|
+
height?: number | string;
|
|
43
|
+
onReachEnd?: () => void;
|
|
44
|
+
onScroll?: () => void;
|
|
45
|
+
onListRender?: (listInfo: {
|
|
46
|
+
start: number;
|
|
47
|
+
renderLen: number;
|
|
48
|
+
}) => void;
|
|
49
|
+
debounceListRenderMS?: number;
|
|
50
|
+
vid?: string;
|
|
51
|
+
resetTopWhenDataChange?: boolean;
|
|
52
|
+
}
|
|
41
53
|
export interface GenerateTableProp {
|
|
42
54
|
extra: {
|
|
43
55
|
/** 支持antd Table组件官方传参所有类型 */
|
|
@@ -71,6 +83,13 @@ export interface GenerateTableProp {
|
|
|
71
83
|
/** 拖拽范围数据 */
|
|
72
84
|
range: AnyObjectType[]) => Promise<boolean> | void;
|
|
73
85
|
};
|
|
86
|
+
/** 虚拟滚动功能 */
|
|
87
|
+
virtual?: {
|
|
88
|
+
/** 打开与关闭 */
|
|
89
|
+
open: boolean;
|
|
90
|
+
/** 虚拟滚动配置 */
|
|
91
|
+
config: VirtualProps;
|
|
92
|
+
};
|
|
74
93
|
/**隐藏排序列 */
|
|
75
94
|
hidSortColumn?: boolean;
|
|
76
95
|
/** 行选中回调 */
|
|
@@ -85,7 +104,7 @@ export interface GenerateTableProp {
|
|
|
85
104
|
getTableSuccessData?: (data: AnyObjectType) => void;
|
|
86
105
|
};
|
|
87
106
|
}
|
|
88
|
-
|
|
107
|
+
type TablePaginationType = TablePaginationConfig & {
|
|
89
108
|
pages: number;
|
|
90
109
|
[key: string]: any;
|
|
91
110
|
};
|
|
@@ -68,6 +68,6 @@ export interface LayoutFormModalCallType {
|
|
|
68
68
|
/** 提交表单并验证 */
|
|
69
69
|
getFormSubmitValues: (nameList?: NamePath[]) => Promise<AnyObjectType | undefined>;
|
|
70
70
|
}
|
|
71
|
-
export
|
|
71
|
+
export type LayoutFormModalListType = FormListType;
|
|
72
72
|
declare const _default: React.ForwardRefExoticComponent<LayoutFormPropTypes & React.RefAttributes<unknown>>;
|
|
73
73
|
export default _default;
|
|
@@ -8,7 +8,7 @@ import { FormListType, FormCallType } from '../GenerateForm';
|
|
|
8
8
|
import { TableCallType, GenerateTableProp, TableColumns, getTableListQueryType } from '../GenerateTable';
|
|
9
9
|
import { AnyObjectType, PromiseAxiosResultType } from '../brother/typings';
|
|
10
10
|
import './index.less';
|
|
11
|
-
export
|
|
11
|
+
export type LayoutTableModalCallType = TableCallType & FormCallType & {
|
|
12
12
|
setSavaLoading: (data: boolean) => void;
|
|
13
13
|
};
|
|
14
14
|
export interface SizeType {
|
package/lib/Upload/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
type UseEffectParams = Parameters<typeof React.useEffect>;
|
|
3
|
+
type EffectCallback = UseEffectParams[0];
|
|
4
|
+
type DependencyList = UseEffectParams[1];
|
|
5
|
+
type UseEffectReturn = ReturnType<typeof React.useEffect>;
|
|
6
6
|
declare function useDeepCompareEffect(callback: EffectCallback, dependencies: DependencyList): UseEffectReturn;
|
|
7
7
|
export default useDeepCompareEffect;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
4
|
+
export type AnyObjectType = {
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
7
|
+
export type PromiseAxiosResultType = Promise<AjaxResultType>;
|
|
8
|
+
export type SubmitApiType = (data: AnyObjectType, method: AxiosRequestConfig['method']) => Promise<AjaxResultType<AnyObjectType>>;
|
|
9
|
+
export type RequestPageType = {
|
|
10
10
|
page: number;
|
|
11
11
|
size: number;
|
|
12
12
|
} | AnyObjectType | undefined;
|
|
13
|
-
export
|
|
13
|
+
export type ResultPageType<T = any[]> = {
|
|
14
14
|
content: T;
|
|
15
15
|
page: string;
|
|
16
16
|
pageShowFlag: boolean;
|
|
@@ -34,4 +34,4 @@ export interface SetRowStateType {
|
|
|
34
34
|
ids: string[];
|
|
35
35
|
type: 'pending' | 'recover';
|
|
36
36
|
}
|
|
37
|
-
export
|
|
37
|
+
export type SetStateType<T = AnyObjectType> = (patch: Partial<T> | ((prevState: T) => Partial<T>)) => void;
|