@jiaozhiye/qm-design-react 1.6.1 → 1.6.3
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/_utils/resize-event.d.ts +2 -2
- package/lib/_utils/types.d.ts +15 -15
- package/lib/anchor/src/anchor-item.d.ts +3 -3
- package/lib/anchor/src/anchor-nav.d.ts +2 -2
- package/lib/anchor/src/anchor.d.ts +5 -5
- package/lib/antd/TimePicker.d.ts +1 -1
- package/lib/button/src/button.d.ts +4 -4
- package/lib/collapse/src/collapse.d.ts +2 -2
- package/lib/config-provider/context.d.ts +1 -1
- package/lib/config-provider/src/config-provider.d.ts +4 -4
- package/lib/copy-to-clipboard/src/copy-to-clipboard.d.ts +2 -2
- package/lib/countup/src/countup.d.ts +3 -3
- package/lib/cropper/src/cropper.d.ts +4 -4
- package/lib/divider/src/divider.d.ts +4 -4
- package/lib/download/src/download.d.ts +9 -9
- package/lib/drawer/src/drawer.d.ts +6 -6
- package/lib/empty/src/empty.d.ts +3 -3
- package/lib/form/src/context.d.ts +1 -1
- package/lib/form/src/fields-filter.d.ts +4 -4
- package/lib/form/src/form-cascader.d.ts +3 -3
- package/lib/form/src/form-checkbox-group.d.ts +3 -3
- package/lib/form/src/form-checkbox.d.ts +2 -2
- package/lib/form/src/form-city-select.d.ts +2 -2
- package/lib/form/src/form-date.d.ts +2 -2
- package/lib/form/src/form-divider.d.ts +2 -2
- package/lib/form/src/form-immediate.d.ts +3 -3
- package/lib/form/src/form-input-number.d.ts +2 -2
- package/lib/form/src/form-input.d.ts +2 -2
- package/lib/form/src/form-item-view.d.ts +1 -1
- package/lib/form/src/form-multiple-search-helper.d.ts +3 -3
- package/lib/form/src/form-multiple-tree-table-helper.d.ts +3 -3
- package/lib/form/src/form-radio.d.ts +3 -3
- package/lib/form/src/form-range-date.d.ts +2 -2
- package/lib/form/src/form-range-input-number.d.ts +2 -2
- package/lib/form/src/form-range-input.d.ts +2 -2
- package/lib/form/src/form-range-search-helper.d.ts +3 -3
- package/lib/form/src/form-range-time.d.ts +2 -2
- package/lib/form/src/form-rate.d.ts +2 -2
- package/lib/form/src/form-region-select.d.ts +2 -2
- package/lib/form/src/form-search-helper.d.ts +3 -3
- package/lib/form/src/form-select.d.ts +3 -3
- package/lib/form/src/form-switch.d.ts +2 -2
- package/lib/form/src/form-text-area.d.ts +2 -2
- package/lib/form/src/form-time.d.ts +2 -2
- package/lib/form/src/form-tinymce.d.ts +2 -2
- package/lib/form/src/form-tree-select.d.ts +3 -3
- package/lib/form/src/form-tree-table-helper.d.ts +3 -3
- package/lib/form/src/form-upload-file.d.ts +2 -2
- package/lib/form/src/form-upload-img.d.ts +2 -2
- package/lib/form/src/form.d.ts +14 -13
- package/lib/form/src/types.d.ts +28 -25
- package/lib/form/style/index.less +1 -1
- package/lib/hooks/useDebounce.d.ts +1 -1
- package/lib/index.esm.js +2 -2
- package/lib/index.full.js +1 -1
- package/lib/index.js +2 -2
- package/lib/locale/index.d.ts +2 -2
- package/lib/locale/index.js +5 -5
- package/lib/modal/src/modal.d.ts +6 -6
- package/lib/print/src/container.d.ts +2 -2
- package/lib/print/src/context.d.ts +1 -1
- package/lib/print/src/preview.d.ts +3 -3
- package/lib/print/src/print.d.ts +6 -6
- package/lib/print/src/setting.d.ts +3 -3
- package/lib/range-table-helper/src/range-table-helper.d.ts +3 -3
- package/lib/search-helper/src/search-helper.d.ts +3 -3
- package/lib/search-tree/src/search-tree.d.ts +3 -3
- package/lib/space/src/space.d.ts +3 -3
- package/lib/spin/src/spin.d.ts +4 -4
- package/lib/split/src/context.d.ts +1 -1
- package/lib/split/src/resize-bar.d.ts +1 -1
- package/lib/split/src/split-pane.d.ts +2 -2
- package/lib/split/src/split.d.ts +2 -2
- package/lib/style/index.css +2 -2
- package/lib/style/index.min.css +1 -1
- package/lib/table/src/alert/index.d.ts +1 -1
- package/lib/table/src/body/index.d.ts +1 -1
- package/lib/table/src/body/useMergeCell.d.ts +2 -1
- package/lib/table/src/clipboard/index.d.ts +1 -1
- package/lib/table/src/clipboard/setting.d.ts +1 -1
- package/lib/table/src/column-filter/index.d.ts +1 -1
- package/lib/table/src/context/index.d.ts +1 -1
- package/lib/table/src/edit/InputNumber.d.ts +1 -1
- package/lib/table/src/edit/index.d.ts +1 -1
- package/lib/table/src/expandable/all.d.ts +1 -1
- package/lib/table/src/expandable/index.d.ts +1 -1
- package/lib/table/src/export/define.d.ts +1 -1
- package/lib/table/src/export/index.d.ts +2 -2
- package/lib/table/src/export/setting.d.ts +1 -1
- package/lib/table/src/export/useExport.d.ts +2 -2
- package/lib/table/src/fast-search/index.d.ts +1 -1
- package/lib/table/src/fast-search/setting.d.ts +1 -1
- package/lib/table/src/filter/index.d.ts +1 -1
- package/lib/table/src/footer/index.d.ts +1 -1
- package/lib/table/src/full-screen/index.d.ts +1 -1
- package/lib/table/src/group-summary/index.d.ts +1 -1
- package/lib/table/src/group-summary/result.d.ts +1 -1
- package/lib/table/src/group-summary/setting.d.ts +1 -1
- package/lib/table/src/header/index.d.ts +1 -1
- package/lib/table/src/hooks/useImperativeMethod.d.ts +1 -1
- package/lib/table/src/hooks/useTableCore.d.ts +1 -1
- package/lib/table/src/hooks/useTableEffect.d.ts +1 -1
- package/lib/table/src/hooks/useTableLayout.d.ts +1 -1
- package/lib/table/src/hooks/useTableMemo.d.ts +1 -1
- package/lib/table/src/hooks/useTableRef.d.ts +2 -2
- package/lib/table/src/hooks/useTableState.d.ts +1 -1
- package/lib/table/src/import/SelectFile.d.ts +1 -1
- package/lib/table/src/import/index.d.ts +1 -1
- package/lib/table/src/import/setting.d.ts +1 -1
- package/lib/table/src/manager/index.d.ts +1 -1
- package/lib/table/src/pager/index.d.ts +1 -1
- package/lib/table/src/print/index.d.ts +1 -1
- package/lib/table/src/reload/index.d.ts +1 -1
- package/lib/table/src/resizable/index.d.ts +1 -1
- package/lib/table/src/select-collection/index.d.ts +1 -1
- package/lib/table/src/select-collection/result.d.ts +1 -1
- package/lib/table/src/selection/all.d.ts +1 -1
- package/lib/table/src/selection/index.d.ts +1 -1
- package/lib/table/src/store/index.d.ts +2 -2
- package/lib/table/src/super-search/index.d.ts +1 -1
- package/lib/table/src/super-search/result.d.ts +1 -1
- package/lib/table/src/table/index.d.ts +1 -1
- package/lib/table/src/table/props.d.ts +5 -5
- package/lib/table/src/table/types.d.ts +45 -45
- package/lib/table/src/toolbox/index.d.ts +1 -1
- package/lib/tabs/src/tab-pane.d.ts +4 -4
- package/lib/tabs/src/tabs.d.ts +3 -3
- package/lib/tinymce/src/Events.d.ts +2 -2
- package/lib/tinymce/src/ScriptLoader.d.ts +1 -1
- package/lib/tinymce/src/Utils.d.ts +1 -1
- package/lib/tinymce/src/components/Editor.d.ts +1 -1
- package/lib/tinymce/src/components/EditorPropTypes.d.ts +2 -2
- package/lib/tinymce/src/index.d.ts +3 -3
- package/lib/tree-helper/src/tree-helper.d.ts +2 -2
- package/lib/tree-table-helper/src/tree-table-helper.d.ts +3 -3
- package/lib/upload-file/src/upload-file.d.ts +5 -5
- package/lib/upload-img/src/cropper-preview.d.ts +4 -4
- package/lib/upload-img/src/upload-img.d.ts +5 -5
- package/package.json +19 -19
|
@@ -3,18 +3,18 @@ import type { BuildInPlacements } from 'rc-trigger';
|
|
|
3
3
|
import type { ComponentSize, CSSProperties, Nullable, IDict, IAuth, AjaxResponse } from '../../../_utils/types';
|
|
4
4
|
import type { IFormData, IFormItem } from '../../../form/src/types';
|
|
5
5
|
export type { ITableContext } from '../context';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
6
|
+
export type IFixed = 'left' | 'right';
|
|
7
|
+
export type IAlign = 'left' | 'center' | 'right';
|
|
8
|
+
export type InsertMode = 'before' | 'after';
|
|
9
|
+
export type IFilterType = 'text' | 'textarea' | 'checkbox' | 'radio' | 'number' | 'date' | 'tree';
|
|
10
|
+
export type ICheckStrategy = 'SHOW_ALL' | 'SHOW_PARENT' | 'SHOW_CHILD';
|
|
11
|
+
export type IEditerType = 'text' | 'textarea' | 'number' | 'select' | 'select-multiple' | 'checkbox' | 'switch' | 'search-helper' | 'search-helper-multiple' | 'tree-helper' | 'tree-helper-multiple' | 'date' | 'datetime' | 'time';
|
|
12
|
+
export type ISelectionType = 'checkbox' | 'radio';
|
|
13
|
+
export type IRecord<T = any> = {
|
|
14
14
|
[key: string]: T;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
17
|
-
export
|
|
16
|
+
export type getRowKeyType = (row: IRecord, index: number) => string | number;
|
|
17
|
+
export type IRowKey = ReturnType<getRowKeyType>;
|
|
18
18
|
export declare const DEFAULT_DISTANCE = 10;
|
|
19
19
|
export declare const DEFAULT_TRUE_VALUE = "1";
|
|
20
20
|
export declare const DEFAULT_FALSE_VALUE = "0";
|
|
@@ -25,12 +25,12 @@ export declare const DATE_TIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
|
|
25
25
|
export declare const TIME_FORMAT = "HH:mm:ss";
|
|
26
26
|
export declare const DEFAULT_FILENAME_FORMAT = "YYYYMMDDHHmmss";
|
|
27
27
|
export declare const BUILT_IN_PLACEMENTS: BuildInPlacements;
|
|
28
|
-
export
|
|
29
|
-
export
|
|
28
|
+
export type IClicked = [IRowKey, string] | [];
|
|
29
|
+
export type IRowColSpan = {
|
|
30
30
|
rowSpan: number;
|
|
31
31
|
colSpan: number;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type IMergeCell = {
|
|
34
34
|
row: number;
|
|
35
35
|
col: number;
|
|
36
36
|
rowSpan: number;
|
|
@@ -40,8 +40,8 @@ export declare enum EAlign {
|
|
|
40
40
|
left = "flex-start",
|
|
41
41
|
right = "flex-end"
|
|
42
42
|
}
|
|
43
|
-
export
|
|
44
|
-
export
|
|
43
|
+
export type IFormatType = 'date' | 'datetime' | 'dateShortTime' | 'percent' | 'finance' | 'secret-name' | 'secret-phone' | 'secret-IDnumber' | 'secret-bankNumber';
|
|
44
|
+
export type IPaginationConfig = {
|
|
45
45
|
current?: number;
|
|
46
46
|
pageSize?: number;
|
|
47
47
|
total?: number;
|
|
@@ -49,32 +49,32 @@ export declare type IPaginationConfig = {
|
|
|
49
49
|
showSizeChanger?: boolean;
|
|
50
50
|
showQuickJumper?: boolean;
|
|
51
51
|
};
|
|
52
|
-
export
|
|
53
|
-
export
|
|
52
|
+
export type IPagination = Required<Pick<IPaginationConfig, 'current' | 'pageSize' | 'total'>>;
|
|
53
|
+
export type IRule = {
|
|
54
54
|
required?: boolean;
|
|
55
55
|
message?: string;
|
|
56
56
|
validator?: (value: unknown) => boolean;
|
|
57
57
|
};
|
|
58
|
-
export
|
|
58
|
+
export type IFieldAuthItem = {
|
|
59
59
|
visible: number;
|
|
60
60
|
disabled?: number;
|
|
61
61
|
secretName?: string;
|
|
62
62
|
};
|
|
63
|
-
export
|
|
63
|
+
export type IValidItem = {
|
|
64
64
|
rowKey: IRowKey;
|
|
65
65
|
dataIndex: string;
|
|
66
66
|
text: string;
|
|
67
67
|
};
|
|
68
|
-
export
|
|
68
|
+
export type IFilter = {
|
|
69
69
|
[key: string]: Record<string, any>;
|
|
70
70
|
};
|
|
71
|
-
export
|
|
71
|
+
export type ISorter = {
|
|
72
72
|
[key: string]: Nullable<string>;
|
|
73
73
|
};
|
|
74
|
-
export
|
|
74
|
+
export type ISummaries = {
|
|
75
75
|
[key: string]: number;
|
|
76
76
|
};
|
|
77
|
-
export
|
|
77
|
+
export type ISuperFilter = {
|
|
78
78
|
type: string;
|
|
79
79
|
bracketLeft: string;
|
|
80
80
|
fieldName: string;
|
|
@@ -83,7 +83,7 @@ export declare type ISuperFilter = {
|
|
|
83
83
|
bracketRight: string;
|
|
84
84
|
logic: string;
|
|
85
85
|
};
|
|
86
|
-
export
|
|
86
|
+
export type IEditerReturn = {
|
|
87
87
|
type: IEditerType;
|
|
88
88
|
items?: Array<IDict>;
|
|
89
89
|
editable?: boolean;
|
|
@@ -152,9 +152,9 @@ export declare type IEditerReturn = {
|
|
|
152
152
|
onBlur?: (value: Record<string, string | number | Array<string | number>>, record: IRecord) => void;
|
|
153
153
|
onClick?: (event: React.MouseEvent<HTMLInputElement>) => void;
|
|
154
154
|
};
|
|
155
|
-
export
|
|
156
|
-
export
|
|
157
|
-
export
|
|
155
|
+
export type IFetchFn = (params?: Record<string, unknown>) => Promise<AjaxResponse>;
|
|
156
|
+
export type IFetchParams = Record<string, any>;
|
|
157
|
+
export type IFetch = {
|
|
158
158
|
api: IFetchFn;
|
|
159
159
|
params?: IFetchParams;
|
|
160
160
|
formatter?: (params: IFetchParams) => IFetchParams;
|
|
@@ -164,7 +164,7 @@ export declare type IFetch = {
|
|
|
164
164
|
dataKey?: string;
|
|
165
165
|
callback?: (resData: any) => void;
|
|
166
166
|
};
|
|
167
|
-
export
|
|
167
|
+
export type IRowSelection = {
|
|
168
168
|
type: ISelectionType;
|
|
169
169
|
defaultSelectedRowKeys?: IRowKey[];
|
|
170
170
|
selectedRowKeys?: IRowKey[];
|
|
@@ -190,19 +190,19 @@ export declare type IRowSelection = {
|
|
|
190
190
|
onSelect?: (selected: boolean, record: IRecord, rowKeys: IRowKey[]) => void;
|
|
191
191
|
onSelectAll?: (selected: boolean, rowKeys: IRowKey[]) => void;
|
|
192
192
|
};
|
|
193
|
-
export
|
|
193
|
+
export type IRowHighlight = {
|
|
194
194
|
currentRowKey?: IRowKey;
|
|
195
195
|
disabled?: (row: IRecord) => boolean;
|
|
196
196
|
onChange?: (rowKey: IRowKey, row: IRecord) => void;
|
|
197
197
|
};
|
|
198
|
-
export
|
|
198
|
+
export type ITreeConfig = {
|
|
199
199
|
virtual?: boolean;
|
|
200
200
|
};
|
|
201
|
-
export
|
|
201
|
+
export type ITreeExpand = {
|
|
202
202
|
rowKey: IRowKey;
|
|
203
203
|
level: number;
|
|
204
204
|
};
|
|
205
|
-
export
|
|
205
|
+
export type IExpandable = {
|
|
206
206
|
defaultExpandAllRows?: boolean;
|
|
207
207
|
defaultExpandedRowKeys?: IRowKey[];
|
|
208
208
|
expandedRowKeys?: IRowKey[];
|
|
@@ -213,7 +213,7 @@ export declare type IExpandable = {
|
|
|
213
213
|
onExpand?: (expand: boolean, row: IRecord) => void;
|
|
214
214
|
onChange?: (expandedKeys: IRowKey[], expandedRows: IRecord[]) => void;
|
|
215
215
|
};
|
|
216
|
-
export
|
|
216
|
+
export type ISummation = {
|
|
217
217
|
groupItems?: Array<{
|
|
218
218
|
dataIndex: string;
|
|
219
219
|
titleIndex?: string;
|
|
@@ -227,7 +227,7 @@ export declare type ISummation = {
|
|
|
227
227
|
};
|
|
228
228
|
onChange?: (summationRows: Record<string, number | string>[]) => void;
|
|
229
229
|
};
|
|
230
|
-
export
|
|
230
|
+
export type IExportExcel = {
|
|
231
231
|
fileName?: string;
|
|
232
232
|
fetch?: {
|
|
233
233
|
api: IFetchFn;
|
|
@@ -237,10 +237,10 @@ export declare type IExportExcel = {
|
|
|
237
237
|
cellStyle?: boolean;
|
|
238
238
|
hideIcon?: boolean;
|
|
239
239
|
};
|
|
240
|
-
export
|
|
240
|
+
export type ITablePrint = {
|
|
241
241
|
showLogo?: boolean;
|
|
242
242
|
};
|
|
243
|
-
export
|
|
243
|
+
export type IAuthConfig = {
|
|
244
244
|
fetch?: {
|
|
245
245
|
api: IFetchFn;
|
|
246
246
|
params?: IFetchParams;
|
|
@@ -251,12 +251,12 @@ export declare type IAuthConfig = {
|
|
|
251
251
|
isImport?: number;
|
|
252
252
|
isPrint?: number;
|
|
253
253
|
};
|
|
254
|
-
export
|
|
254
|
+
export type IAlertConfig = {
|
|
255
255
|
position?: 'top' | 'bottom';
|
|
256
256
|
hideAlert?: boolean;
|
|
257
257
|
hideClearButton?: boolean;
|
|
258
258
|
};
|
|
259
|
-
export
|
|
259
|
+
export type IColumn = {
|
|
260
260
|
dataIndex: string;
|
|
261
261
|
title: string;
|
|
262
262
|
description?: string;
|
|
@@ -303,19 +303,19 @@ export declare type IColumn = {
|
|
|
303
303
|
headRender?: (column: IColumn, tableData: IRecord[]) => React.ReactNode;
|
|
304
304
|
render?: (text: string | number, row: IRecord, column: IColumn, rowIndex: number, columnIndex: number) => React.ReactNode | string | number;
|
|
305
305
|
};
|
|
306
|
-
export
|
|
306
|
+
export type IDerivedColumn = IColumn & {
|
|
307
307
|
type?: string;
|
|
308
308
|
level?: number;
|
|
309
309
|
parentDataIndex?: string;
|
|
310
310
|
};
|
|
311
|
-
export
|
|
311
|
+
export type IDerivedRowKey = {
|
|
312
312
|
level: number;
|
|
313
313
|
rowKey: IRowKey;
|
|
314
314
|
rowKeyPath: string;
|
|
315
315
|
parentRowKey?: IRowKey;
|
|
316
316
|
children?: IDerivedRowKey[];
|
|
317
317
|
};
|
|
318
|
-
export
|
|
318
|
+
export type ITableProps = {
|
|
319
319
|
columns: IColumn[];
|
|
320
320
|
columnsChange?: (columns: IColumn[]) => void;
|
|
321
321
|
dataSource?: IRecord[];
|
|
@@ -392,7 +392,7 @@ export declare type ITableProps = {
|
|
|
392
392
|
onScrollEnd?: (event: React.SyntheticEvent<HTMLDivElement>) => void;
|
|
393
393
|
onMergeChange?: (cells: IMergeCell[]) => void;
|
|
394
394
|
};
|
|
395
|
-
export
|
|
395
|
+
export type TableRef = {
|
|
396
396
|
CALCULATE_HEIGHT: () => void;
|
|
397
397
|
DO_REFRESH: (cb: () => void) => Promise<void>;
|
|
398
398
|
GET_LOG: () => {
|
|
@@ -424,14 +424,14 @@ export declare type TableRef = {
|
|
|
424
424
|
validate: IValidItem[];
|
|
425
425
|
};
|
|
426
426
|
};
|
|
427
|
-
export
|
|
427
|
+
export type TableBodyRef = {
|
|
428
428
|
renderCellTitle: (column: IColumn, row: IRecord, rowIndex: number, columnIndex: number) => string;
|
|
429
429
|
setClickedValues: (clicked: IClicked) => void;
|
|
430
430
|
forceUpdate: () => void;
|
|
431
431
|
};
|
|
432
|
-
export
|
|
432
|
+
export type ToolBoxRef = {
|
|
433
433
|
exportHandle: () => void;
|
|
434
434
|
};
|
|
435
|
-
export
|
|
435
|
+
export type ToolMethodRef = {
|
|
436
436
|
clickHandle: () => void;
|
|
437
437
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
2
|
import type { TabPaneProps } from '../../antd';
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
type IProps = TabPaneProps;
|
|
4
|
+
export type QmTabPaneProps = IProps;
|
|
5
5
|
declare class QmTabPane extends Component<IProps> {
|
|
6
6
|
static displayName: string;
|
|
7
|
-
render(): JSX.Element;
|
|
7
|
+
render(): React.JSX.Element;
|
|
8
8
|
}
|
|
9
9
|
export default QmTabPane;
|
package/lib/tabs/src/tabs.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IAuth } from '../../_utils/types';
|
|
3
3
|
import type { TabsProps } from '../../antd';
|
|
4
|
-
|
|
4
|
+
type IProps = TabsProps & {
|
|
5
5
|
authConfig?: {
|
|
6
6
|
fieldList?: IAuth[];
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type QmTabsProps = IProps;
|
|
10
10
|
declare class QmTabs extends Component<IProps> {
|
|
11
11
|
static TabPane: React.ClassicComponentClass<import("rc-tabs/lib/TabPanelList/TabPane").TabPaneProps>;
|
|
12
12
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
13
13
|
static defaultProps: {
|
|
14
14
|
tabBarGutter: number;
|
|
15
15
|
};
|
|
16
|
-
render(): JSX.Element;
|
|
16
|
+
render(): React.JSX.Element;
|
|
17
17
|
}
|
|
18
18
|
export default QmTabs;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
9
|
-
|
|
8
|
+
export type EventHandler<A> = (a: unknown, editor: any) => unknown;
|
|
9
|
+
type EEventHandler<K> = EventHandler<K>;
|
|
10
10
|
export interface INativeEvents {
|
|
11
11
|
onBeforePaste: EEventHandler<'beforepaste'>;
|
|
12
12
|
onBlur: EEventHandler<'blur'>;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { IEventPropTypes } from './components/EditorPropTypes';
|
|
9
9
|
import { IAllProps } from './components/Editor';
|
|
10
10
|
export declare const isFunction: (x: unknown) => boolean;
|
|
11
|
-
|
|
11
|
+
type PropLookup = <K extends keyof IAllProps>(key: K) => IAllProps[K] | undefined;
|
|
12
12
|
export declare const configHandlers2: <H>(handlerLookup: PropLookup, on: (name: string, handler: H) => void, off: (name: string, handler: H) => void, adapter: <K extends keyof import("./Events").IEvents>(lookup: PropLookup, key: K) => H, prevProps: Partial<IAllProps>, props: Partial<IAllProps>, boundHandlers: Record<string, H>) => void;
|
|
13
13
|
export declare const configHandlers: (editor: any, prevProps: Partial<IAllProps>, props: Partial<IAllProps>, boundHandlers: Record<string, (event: any) => unknown>, lookup: PropLookup) => void;
|
|
14
14
|
export declare const uuid: (prefix: string) => string;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { IEvents } from '../Events';
|
|
10
10
|
import { IEditorPropTypes } from './EditorPropTypes';
|
|
11
|
-
|
|
11
|
+
type EditorOptions = Record<string, any>;
|
|
12
12
|
export interface IProps {
|
|
13
13
|
apiKey: string;
|
|
14
14
|
id: string;
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
import * as PropTypes from 'prop-types';
|
|
9
9
|
import { IEvents } from '../Events';
|
|
10
10
|
import { IProps } from './Editor';
|
|
11
|
-
export
|
|
11
|
+
export type CopyProps<T> = {
|
|
12
12
|
[P in keyof T]: PropTypes.Requireable<unknown>;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type IEventPropTypes = CopyProps<IEvents>;
|
|
15
15
|
export interface IEditorPropTypes extends IEventPropTypes, CopyProps<IProps> {
|
|
16
16
|
}
|
|
17
17
|
export declare const eventPropTypes: IEventPropTypes;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { ComponentSize, CSSProperties } from '../../_utils/types';
|
|
3
3
|
import type { IFetchHeader } from '../../form/src/types';
|
|
4
|
-
|
|
4
|
+
type IProps = {
|
|
5
5
|
value?: string;
|
|
6
6
|
size?: ComponentSize;
|
|
7
7
|
tinymce?: any;
|
|
@@ -18,7 +18,7 @@ declare type IProps = {
|
|
|
18
18
|
style?: CSSProperties;
|
|
19
19
|
onChange?: (value: string) => void;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type QmTinymceProps = IProps;
|
|
22
22
|
declare class QmTinymce extends Component<IProps> {
|
|
23
23
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
24
24
|
static propTypes: {
|
|
@@ -30,6 +30,6 @@ declare class QmTinymce extends Component<IProps> {
|
|
|
30
30
|
menubar: string;
|
|
31
31
|
toolbar: string;
|
|
32
32
|
};
|
|
33
|
-
render(): JSX.Element;
|
|
33
|
+
render(): React.JSX.Element;
|
|
34
34
|
}
|
|
35
35
|
export default QmTinymce;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { IFetch, IRecord, ICheckStrategy } from '../../table/src/table/types';
|
|
3
3
|
import type { ComponentSize } from '../../_utils/types';
|
|
4
|
-
|
|
4
|
+
type IProps = {
|
|
5
5
|
size?: ComponentSize;
|
|
6
6
|
multiple?: boolean;
|
|
7
7
|
defaultSelectedKeys?: string[];
|
|
@@ -17,6 +17,6 @@ declare type IProps = {
|
|
|
17
17
|
};
|
|
18
18
|
onClose: (data: IRecord | null) => void;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type QmTreeHelperProps = IProps;
|
|
21
21
|
declare const TreeHelper: React.FC<IProps>;
|
|
22
22
|
export default TreeHelper;
|
|
@@ -2,13 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import type { IFormItem, IFormData } from '../../form/src/types';
|
|
3
3
|
import type { IFetch, IColumn, IRowKey, IRecord } from '../../table/src/table/types';
|
|
4
4
|
import type { ComponentSize } from '../../_utils/types';
|
|
5
|
-
|
|
5
|
+
type ITableConfig = {
|
|
6
6
|
fetch?: IFetch;
|
|
7
7
|
columns?: IColumn[];
|
|
8
8
|
rowKey?: ((row: IRecord, index: number) => IRowKey) | IRowKey;
|
|
9
9
|
webPagination?: boolean;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type IProps = {
|
|
12
12
|
size?: ComponentSize;
|
|
13
13
|
uniqueKey?: string;
|
|
14
14
|
initialValue?: IFormData;
|
|
@@ -26,6 +26,6 @@ declare type IProps = {
|
|
|
26
26
|
};
|
|
27
27
|
onClose: (data: IRecord | null, keys?: IRowKey[]) => void;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type QmTreeTableHelperProps = IProps;
|
|
30
30
|
declare const TreeTableHelper: React.FC<IProps>;
|
|
31
31
|
export default TreeTableHelper;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
2
|
import type { UploadProps, ButtonProps } from '../../antd';
|
|
3
|
-
|
|
3
|
+
type IProps = UploadProps & {
|
|
4
4
|
fileTypes?: string[];
|
|
5
5
|
fileSize?: number;
|
|
6
6
|
button?: {
|
|
7
7
|
text?: string;
|
|
8
8
|
} & ButtonProps;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type QmUploadFileProps = IProps;
|
|
11
11
|
declare class QmUploadFile extends Component<IProps> {
|
|
12
12
|
static defaultProps: {
|
|
13
13
|
name: string;
|
|
14
14
|
multiple: boolean;
|
|
15
15
|
showUploadList: {
|
|
16
16
|
showDownloadIcon: boolean;
|
|
17
|
-
downloadIcon: JSX.Element;
|
|
17
|
+
downloadIcon: React.JSX.Element;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
beforeUpload: (file: any, fileList: any) => Promise<any>;
|
|
21
21
|
downloadFile(url: string, fileName?: string): Promise<void>;
|
|
22
|
-
render(): JSX.Element;
|
|
22
|
+
render(): React.JSX.Element;
|
|
23
23
|
}
|
|
24
24
|
export default QmUploadFile;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { CSSProperties } from '../../_utils/types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
fixedSize?: [number, number];
|
|
5
5
|
quality?: number;
|
|
6
6
|
fileTypes?: string[];
|
|
7
7
|
fileSize?: number;
|
|
8
8
|
beforeCrop?: (file: any, fileList: any[]) => Promise<boolean>;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
type IState = {
|
|
11
11
|
src: string;
|
|
12
12
|
};
|
|
13
13
|
declare class CropperPreview extends Component<IProps, IState> {
|
|
@@ -24,9 +24,9 @@ declare class CropperPreview extends Component<IProps, IState> {
|
|
|
24
24
|
confirmHandle: () => Promise<void>;
|
|
25
25
|
scaleHandle(percent: number): void;
|
|
26
26
|
rotateHandle(deg: number): void;
|
|
27
|
-
renderCropper(): JSX.Element;
|
|
27
|
+
renderCropper(): React.JSX.Element;
|
|
28
28
|
onOk: () => void;
|
|
29
29
|
onClose: () => void;
|
|
30
|
-
render(): JSX.Element;
|
|
30
|
+
render(): React.JSX.Element;
|
|
31
31
|
}
|
|
32
32
|
export default CropperPreview;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
2
|
import type { UploadProps } from '../../antd';
|
|
3
|
-
|
|
3
|
+
type IProps = UploadProps & {
|
|
4
4
|
fixedSize?: [number, number] | undefined;
|
|
5
5
|
quality?: number;
|
|
6
6
|
fileTypes?: string[];
|
|
@@ -8,12 +8,12 @@ declare type IProps = UploadProps & {
|
|
|
8
8
|
openCropper?: boolean;
|
|
9
9
|
beforeCrop?: (file: any, fileList: any[]) => Promise<boolean>;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type IState = {
|
|
12
12
|
previewVisible: boolean;
|
|
13
13
|
previewImage: string;
|
|
14
14
|
previewTitle: string;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type QmUploadImgProps = IProps;
|
|
17
17
|
declare class QmUploadImg extends Component<IProps, IState> {
|
|
18
18
|
static defaultProps: {
|
|
19
19
|
name: string;
|
|
@@ -27,6 +27,6 @@ declare class QmUploadImg extends Component<IProps, IState> {
|
|
|
27
27
|
get showUploadButton(): boolean;
|
|
28
28
|
beforeUpload: (file: any, fileList: any) => Promise<any>;
|
|
29
29
|
handlePreview: (file: any) => Promise<void>;
|
|
30
|
-
render(): JSX.Element;
|
|
30
|
+
render(): React.JSX.Element;
|
|
31
31
|
}
|
|
32
32
|
export default QmUploadImg;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jiaozhiye/qm-design-react",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "A Component Library for React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"React",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"lodash-es": "^4.17.21",
|
|
66
66
|
"memoize-one": "^6.0.0",
|
|
67
67
|
"omit.js": "^2.0.2",
|
|
68
|
-
"prop-types": "^15.8.
|
|
68
|
+
"prop-types": "^15.8.1",
|
|
69
69
|
"react-countup": "^6.4.0",
|
|
70
70
|
"react-draggable": "^4.4.5",
|
|
71
71
|
"react-sortablejs": "^6.1.4",
|
|
@@ -90,19 +90,19 @@
|
|
|
90
90
|
"@rollup/plugin-replace": "^4.0.0",
|
|
91
91
|
"@rollup/plugin-typescript": "^8.5.0",
|
|
92
92
|
"@types/lodash-es": "^4.17.6",
|
|
93
|
-
"@types/react": "^17.0.
|
|
94
|
-
"@types/react-dom": "^17.0.
|
|
93
|
+
"@types/react": "^17.0.58",
|
|
94
|
+
"@types/react-dom": "^17.0.20",
|
|
95
95
|
"@typescript-eslint/eslint-plugin": "^5.30.0",
|
|
96
96
|
"@typescript-eslint/parser": "^5.30.0",
|
|
97
|
-
"autoprefixer": "^10.4.
|
|
97
|
+
"autoprefixer": "^10.4.14",
|
|
98
98
|
"babel-loader": "^9.1.0",
|
|
99
|
-
"core-js": "^3.
|
|
99
|
+
"core-js": "^3.30.0",
|
|
100
100
|
"cp-cli": "^2.0.0",
|
|
101
101
|
"cross-env": "^7.0.3",
|
|
102
|
-
"css-loader": "^
|
|
103
|
-
"eslint": "^8.
|
|
102
|
+
"css-loader": "^6.7.3",
|
|
103
|
+
"eslint": "^8.30.0",
|
|
104
104
|
"eslint-plugin-prettier": "^4.2.0",
|
|
105
|
-
"eslint-plugin-react": "^7.
|
|
105
|
+
"eslint-plugin-react": "^7.32.0",
|
|
106
106
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
107
107
|
"eslint-webpack-plugin": "^3.2.0",
|
|
108
108
|
"gulp": "^4.0.2",
|
|
@@ -114,22 +114,22 @@
|
|
|
114
114
|
"gulp-typescript": "^6.0.0-alpha.1",
|
|
115
115
|
"html-webpack-plugin": "^5.5.0",
|
|
116
116
|
"husky": "^4.3.8",
|
|
117
|
-
"less": "^4.1.
|
|
118
|
-
"less-loader": "^11.
|
|
117
|
+
"less": "^4.1.3",
|
|
118
|
+
"less-loader": "^11.1.0",
|
|
119
119
|
"lint-staged": "^10.5.4",
|
|
120
120
|
"mockjs": "^1.1.0",
|
|
121
|
-
"prettier": "^2.7.
|
|
121
|
+
"prettier": "^2.7.1",
|
|
122
122
|
"react": "17.0.2",
|
|
123
123
|
"react-dom": "17.0.2",
|
|
124
124
|
"rimraf": "^3.0.2",
|
|
125
|
-
"rollup": "^2.79.
|
|
125
|
+
"rollup": "^2.79.1",
|
|
126
126
|
"rollup-plugin-terser": "^7.0.2",
|
|
127
|
-
"style-loader": "^3.3.
|
|
128
|
-
"ts-loader": "^9.
|
|
129
|
-
"typescript": "^4.
|
|
130
|
-
"webpack": "^5.
|
|
131
|
-
"webpack-cli": "^5.
|
|
132
|
-
"webpack-dev-server": "^4.
|
|
127
|
+
"style-loader": "^3.3.2",
|
|
128
|
+
"ts-loader": "^9.4.2",
|
|
129
|
+
"typescript": "^4.9.5",
|
|
130
|
+
"webpack": "^5.82.0",
|
|
131
|
+
"webpack-cli": "^5.1.0",
|
|
132
|
+
"webpack-dev-server": "^4.15.0",
|
|
133
133
|
"webpack-node-externals": "^3.0.0"
|
|
134
134
|
},
|
|
135
135
|
"engines": {
|