@jiaozhiye/qm-design-react 1.4.0-beta.2 → 1.4.0-beta.21

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.
Files changed (73) hide show
  1. package/lib/_utils/types.d.ts +7 -1
  2. package/lib/_utils/util.d.ts +0 -1
  3. package/lib/anchor/src/anchor-nav.d.ts +1 -1
  4. package/lib/anchor/src/anchor.d.ts +3 -1
  5. package/lib/anchor/style/index.less +61 -21
  6. package/lib/antd/compact.less +11 -0
  7. package/lib/antd/index.less +11 -1
  8. package/lib/button/src/button.d.ts +6 -5
  9. package/lib/collapse/src/collapse.d.ts +1 -0
  10. package/lib/countup/style/index.less +22 -22
  11. package/lib/divider/style/index.less +54 -54
  12. package/lib/drawer/style/index.less +2 -2
  13. package/lib/form/src/context.d.ts +4 -1
  14. package/lib/form/src/form-cascader.d.ts +1 -1
  15. package/lib/form/src/form-checkbox-group.d.ts +1 -1
  16. package/lib/form/src/form-multiple-tree-table-helper.d.ts +2 -2
  17. package/lib/form/src/form-radio.d.ts +1 -1
  18. package/lib/form/src/form-select.d.ts +1 -1
  19. package/lib/form/src/form-tree-select.d.ts +1 -1
  20. package/lib/form/src/form.d.ts +14 -14
  21. package/lib/form/src/types.d.ts +25 -15
  22. package/lib/form/src/utils.d.ts +7 -3
  23. package/lib/form/style/index.less +19 -8
  24. package/lib/hooks/useDebounce.d.ts +3 -0
  25. package/lib/index.esm.js +2 -2
  26. package/lib/index.full.js +1 -1
  27. package/lib/index.js +2 -2
  28. package/lib/locale/index.js +5 -5
  29. package/lib/locale/lang/en.d.ts +4 -0
  30. package/lib/locale/lang/en.js +6 -2
  31. package/lib/locale/lang/zh-cn.d.ts +4 -0
  32. package/lib/locale/lang/zh-cn.js +6 -2
  33. package/lib/modal/style/index.less +2 -2
  34. package/lib/print/src/LodopFuncs.d.ts +1 -1
  35. package/lib/print/src/preview.d.ts +1 -1
  36. package/lib/print/src/print.d.ts +1 -1
  37. package/lib/print/style/index.less +175 -175
  38. package/lib/range-table-helper/style/index.less +5 -1
  39. package/lib/search-helper/style/index.less +1 -1
  40. package/lib/search-tree/src/search-tree.d.ts +6 -0
  41. package/lib/search-tree/style/index.less +14 -1
  42. package/lib/spin/style/index.less +3 -5
  43. package/lib/split/style/index.less +1 -1
  44. package/lib/style/compact.css +645 -685
  45. package/lib/style/compact.less +4 -3
  46. package/lib/style/compact.min.css +1 -1
  47. package/lib/style/index.css +109 -58
  48. package/lib/style/index.less +36 -36
  49. package/lib/style/index.min.css +1 -1
  50. package/lib/style/mixins/reset.less +1 -2
  51. package/lib/style/themes/compact.less +3 -280
  52. package/lib/style/themes/default.less +2 -1
  53. package/lib/table/src/context/index.d.ts +3 -3
  54. package/lib/table/src/edit/InputNumber.d.ts +2 -0
  55. package/lib/table/src/hooks/useImperativeMethod.d.ts +2 -1
  56. package/lib/table/src/hooks/useTableCore.d.ts +1 -0
  57. package/lib/table/src/hooks/useTableEffect.d.ts +3 -0
  58. package/lib/table/src/hooks/useTableLayout.d.ts +2 -2
  59. package/lib/table/src/table/props.d.ts +15 -9
  60. package/lib/table/src/table/types.d.ts +28 -10
  61. package/lib/table/src/utils/index.d.ts +3 -2
  62. package/lib/table/style/clipboard.less +1 -0
  63. package/lib/table/style/export.less +1 -1
  64. package/lib/table/style/fast-search.less +3 -2
  65. package/lib/table/style/size.less +1 -0
  66. package/lib/table/style/table.less +374 -374
  67. package/lib/tabs/src/tab-pane.d.ts +1 -0
  68. package/lib/tabs/src/tabs.d.ts +6 -1
  69. package/lib/tree-helper/style/index.less +1 -1
  70. package/lib/tree-table-helper/style/index.less +1 -1
  71. package/lib/upload-file/src/upload-file.d.ts +4 -9
  72. package/package.json +6 -7
  73. package/lib/form/src/form-item-layout.d.ts +0 -3
@@ -6,12 +6,11 @@
6
6
  */
7
7
  @import '../themes/index';
8
8
 
9
- .reset-component() {
9
+ .reset-container() {
10
10
  box-sizing: border-box;
11
11
  margin: 0;
12
12
  padding: 0;
13
13
  color: @--text-color;
14
- font-size: @--font-size-base;
15
14
  font-variant: @font-variant-base;
16
15
  line-height: @--line-height-base;
17
16
  list-style: none;
@@ -2,295 +2,18 @@
2
2
  * @Author: 焦质晔
3
3
  * @Date: 2022-11-26 18:06:56
4
4
  * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2022-11-26 21:14:57
5
+ * @Last Modified time: 2023-01-07 14:06:12
6
6
  */
7
- @line-height-base: 1.66667;
8
- @font-size-base: 12px;
9
- @font-size-lg: @font-size-base + 2px;
10
-
11
- // default paddings
12
- @default-padding-lg: 24px; // containers
13
- @default-padding-md: 16px; // small containers and buttons
14
- @default-padding-sm: 12px; // Form controls and items
15
- @default-padding-xs: 8px; // small items
16
- @default-padding-xss: 4px; // more small
17
-
18
- // vertical paddings
19
- @padding-lg: 16px; // containers
20
- @padding-md: 8px; // small containers and buttons
21
- @padding-sm: 8px; // Form controls and items
22
- @padding-xs: 4px; // small items
23
- @padding-xss: 0px; // more small
24
-
25
- // vertical padding for all form controls
26
- @control-padding-horizontal: @padding-sm;
27
- @control-padding-horizontal-sm: @default-padding-xs;
28
-
29
- // vertical margins
30
- @margin-lg: 16px; // containers
31
- @margin-md: 8px; // small containers and buttons
32
- @margin-sm: 8px; // Form controls and items
33
- @margin-xs: 4px; // small items
34
- @margin-xss: 0px; // more small
35
-
36
7
  // height rules
37
8
  @height-base: 32px;
38
9
  @height-lg: 40px;
39
10
  @height-sm: 24px;
40
11
 
41
- // Button
42
- // ---
43
- @btn-padding-horizontal-base: @default-padding-sm - 1px;
44
- @btn-padding-horizontal-lg: @btn-padding-horizontal-base;
45
- @btn-padding-horizontal-sm: @default-padding-xs - 1px;
46
- @btn-square-only-icon-size-lg: 16px;
47
- @btn-square-only-icon-size: 14px;
48
- @btn-square-only-icon-size-sm: 12px;
49
-
50
- // Breadcrumb
51
- // ---
52
- @breadcrumb-font-size: @font-size-base;
53
- @breadcrumb-icon-font-size: @font-size-base;
54
-
55
12
  // Dropdown
56
- @dropdown-line-height: 22px;
13
+ @dropdown-line-height: 18px;
57
14
 
58
15
  // Menu
59
- @menu-item-padding: 0 12px;
60
- @menu-horizontal-line-height: 38px;
61
- @menu-inline-toplevel-item-height: 32px;
62
- @menu-item-height: 32px;
63
- @menu-item-vertical-margin: 0px;
64
- @menu-item-boundary-margin: 0px;
65
- @menu-icon-margin-right: 8px;
66
-
67
- // Checkbox
68
- @checkbox-size: 14px;
69
- @checkbox-group-item-margin-right: 6px;
70
-
71
- // Picker
72
- @picker-panel-cell-height: 22px;
73
- @picker-panel-cell-width: 32px;
74
- @picker-text-height: 32px;
75
- @picker-time-panel-cell-height: 24px;
76
- @picker-panel-without-time-cell-height: 48px;
16
+ @menu-item-font-size: 13px;
77
17
 
78
18
  // Form
79
- // ---
80
- @form-item-margin-bottom: 16px;
81
- @form-vertical-label-padding: 0 0 4px;
82
19
  @form-item-label-colon-margin-right: 4px;
83
-
84
- // Rate
85
- // ---
86
- @rate-star-size: 16px;
87
-
88
- // Radio
89
- // ---
90
- @radio-size: 14px;
91
- @radio-wrapper-margin-right: 6px;
92
-
93
- // Switch
94
- // ---
95
- @switch-height: 20px;
96
- @switch-sm-height: 14px;
97
- @switch-min-width: 40px;
98
- @switch-sm-min-width: 24px;
99
- @switch-inner-margin-min: 4px;
100
- @switch-inner-margin-max: 22px;
101
-
102
- // Slider
103
- // ---
104
- @slider-handle-size: 12px;
105
- @slider-handle-margin-top: -4px;
106
-
107
- // Input
108
- // ---
109
- @input-padding-vertical-base: round(
110
- max((round(((@input-height-base - @font-size-base * @line-height-base) / 2) * 10) / 10) - @border-width-base, 2px)
111
- );
112
- @input-padding-horizontal-lg: 11px;
113
-
114
- // PageHeader
115
- // ---
116
- @page-header-padding: 16px;
117
- @page-header-padding-vertical: 8px;
118
- @page-header-heading-title: 16px;
119
- @page-header-heading-sub-title: 12px;
120
- @page-header-tabs-tab-font-size: 14px;
121
-
122
- // Pagination
123
- // ---
124
- @pagination-mini-options-size-changer-top: 1px;
125
- @pagination-item-size-sm: 22px;
126
-
127
- // Cascader
128
- // ----
129
- @cascader-dropdown-line-height: @dropdown-line-height;
130
-
131
- // Select
132
- // ---
133
- @select-dropdown-height: @height-base;
134
- @select-single-item-height-lg: 32px;
135
- @select-multiple-item-height: @input-height-base - max(@input-padding-vertical-base, 4) * 2; // Normal 24px
136
- @select-multiple-item-height-lg: 24px;
137
- @select-multiple-item-spacing-half: 3px;
138
-
139
- // Tree
140
- // ---
141
- @tree-title-height: 20px;
142
-
143
- // Transfer
144
- // ---
145
- @transfer-item-padding-vertical: 3px;
146
- @transfer-list-search-icon-top: 8px;
147
- @transfer-header-height: 36px;
148
-
149
- // Comment
150
- // ---
151
- @comment-actions-margin-bottom: 0px;
152
- @comment-actions-margin-top: @margin-xs;
153
- @comment-content-detail-p-margin-bottom: 0px;
154
-
155
- // Steps
156
- // ---
157
- @steps-icon-size: 24px;
158
- @steps-icon-custom-size: 20px;
159
- @steps-icon-custom-font-size: 20px;
160
- @steps-icon-custom-top: 2px;
161
- @steps-icon-margin: 2px 8px 2px 0;
162
- @steps-icon-font-size: @font-size-base;
163
- @steps-dot-top: 4px;
164
- @steps-icon-top: 0px;
165
- @steps-small-icon-size: 20px;
166
- @steps-vertical-icon-width: 12px;
167
- @steps-vertical-tail-width: 12px;
168
- @steps-vertical-tail-width-sm: 10px;
169
-
170
- // Collapse
171
- // ---
172
- @collapse-content-padding: @padding-md @padding-lg;
173
-
174
- // List
175
- // ---
176
- @list-item-meta-description-font-size: @font-size-sm;
177
- @list-item-padding-sm: 4px 12px;
178
- @list-item-padding-lg: 12px 16px;
179
-
180
- // Drawer
181
- // ---
182
- @drawer-header-padding: 11px @padding-lg;
183
- @drawer-footer-padding-vertical: @padding-sm;
184
- @drawer-footer-padding-horizontal: @padding-sm;
185
- @drawer-header-close-size: 44px;
186
-
187
- // Modal
188
- // --
189
- @modal-header-padding-vertical: 11px;
190
- @modal-header-padding: @modal-header-padding-vertical @modal-header-padding-horizontal;
191
- @modal-footer-padding-vertical: @padding-sm;
192
- @modal-header-close-size: @modal-header-title-line-height + 2 * @modal-header-padding-vertical;
193
- @modal-confirm-body-padding: 24px 24px 16px;
194
-
195
- // Message
196
- // ---
197
- @message-notice-content-padding: 8px 16px;
198
-
199
- // popover
200
- // --
201
- @popover-min-height: 28px;
202
- @popover-padding-horizontal: @default-padding-sm;
203
-
204
- // Card
205
- // ---
206
- @card-padding-base: 16px;
207
- @card-head-height: 36px;
208
- @card-head-font-size: @card-head-font-size-sm;
209
- @card-head-padding: 8.5px;
210
- @card-padding-base: 12px;
211
- @card-padding-base-sm: @card-padding-base;
212
- @card-head-height-sm: 30px;
213
- @card-head-padding-sm: 6px;
214
- @card-actions-li-margin: 4px 0;
215
- @card-head-tabs-margin-bottom: -9px;
216
-
217
- // Table
218
- // ---
219
- @table-padding-vertical: 12px;
220
- @table-padding-horizontal: 8px;
221
- @table-padding-vertical-md: 8px;
222
- @table-padding-horizontal-md: 8px;
223
- @table-padding-vertical-sm: 4px;
224
- @table-padding-horizontal-sm: 4px;
225
- @table-selection-column-width: 32px;
226
-
227
- // Statistic
228
- // ---
229
- @statistic-content-font-size: 20px;
230
-
231
- // Alert
232
- // ---
233
- @alert-with-description-no-icon-padding-vertical: 7px;
234
- @alert-with-description-padding-vertical: 11px;
235
- @alert-icon-top: 7px + @font-size-base * (@line-height-base / 2) - (@font-size-base / 2);
236
- @alert-with-description-icon-size: 20px;
237
-
238
- // Skeleton
239
- // ---
240
- @skeleton-paragraph-margin-top: 20px;
241
- @skeleton-paragraph-li-margin-top: 12px;
242
- @skeleton-paragraph-li-height: 14px;
243
- @skeleton-title-height: 14px;
244
- @skeleton-title-paragraph-margin-top: 20px;
245
-
246
- // Descriptions
247
- @descriptions-title-margin-bottom: 8px;
248
- @descriptions-default-padding: 12px @padding-lg;
249
- @descriptions-item-padding-bottom: @padding-xs;
250
-
251
- // Avatar
252
- // ---
253
- @avatar-size-base: 28px;
254
- @avatar-size-lg: 32px;
255
- @avatar-size-sm: 22px;
256
- @avatar-font-size-base: 16px;
257
- @avatar-font-size-lg: 20px;
258
- @avatar-font-size-sm: 12px;
259
-
260
- // Badge
261
- // ---
262
- @badge-height: 18px;
263
-
264
- // Tag
265
- // ---
266
- @tag-line-height: 18px;
267
-
268
- // Notification
269
- // ---
270
- @notification-padding-vertical: 12px;
271
- @notification-padding-horizontal: 16px;
272
-
273
- // Result
274
- // ---
275
- @result-title-font-size: 20px;
276
- @result-icon-font-size: 64px;
277
- @result-extra-margin: 24px 0 0 0;
278
-
279
- // Anchor
280
- // ---
281
- @anchor-link-top: 4px;
282
- @anchor-link-left: 16px;
283
- @anchor-link-padding: @anchor-link-top 0 @anchor-link-top @anchor-link-left;
284
-
285
- // Tabs
286
- // ---
287
- @tabs-card-horizontal-padding: 4px @padding-md;
288
-
289
- // Progress
290
- // ---
291
- @progress-circle-text-font-size: 0.833333em;
292
-
293
- // Image
294
- // ---
295
- @image-size-base: 48px;
296
- @image-font-size-base: 24px;
@@ -2,7 +2,7 @@
2
2
  * @Author: 焦质晔
3
3
  * @Date: 2021-07-23 18:25:34
4
4
  * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2022-11-26 23:33:09
5
+ * @Last Modified time: 2023-03-28 11:42:59
6
6
  */
7
7
  // The prefix to use on all css classes from qm.
8
8
  @qm-prefix: qm;
@@ -114,3 +114,4 @@
114
114
 
115
115
  // antd
116
116
  @blue-base: @--primary-color;
117
+ @input-disabled-color: @--text-color-secondary-dark;
@@ -22,7 +22,7 @@ export declare type ITableContext = {
22
22
  showFooter: boolean;
23
23
  showSummary: boolean;
24
24
  summationRows: Record<string, number | string>[];
25
- scrollX: boolean;
25
+ scrollX: ITableState['scrollX'];
26
26
  scrollY: ITableState['scrollY'];
27
27
  pagination: IPagination;
28
28
  fetchParams: IFetchParams;
@@ -54,8 +54,8 @@ export declare type ITableContext = {
54
54
  setRowExpandedKeys: (rowKeys: IRowKey[]) => void;
55
55
  setSelectionRows: (records: IRecord[]) => void;
56
56
  getSpan: (row: IRecord, column: IColumn, rowIndex: number, columnIndex: number, tableData: IRecord[]) => IRowColSpan;
57
- getStickyLeft: (rowKey: IRowKey) => number;
58
- getStickyRight: (rowKey: IRowKey) => number;
57
+ getStickyLeft: (dataIndex: string) => number;
58
+ getStickyRight: (dataIndex: string) => number;
59
59
  scrollXToColumn: (dataIndex: string, index?: number) => void;
60
60
  scrollYToRecord: (rowKey: IRowKey, index?: number) => void;
61
61
  rowInViewport: (index: number) => boolean;
@@ -11,12 +11,14 @@ declare type INumberProps = {
11
11
  placeholder?: string;
12
12
  maxLength?: number;
13
13
  precision?: number;
14
+ stringMode?: boolean;
14
15
  allowClear?: boolean;
15
16
  readOnly?: boolean;
16
17
  disabled?: boolean;
17
18
  formatter?: (value: number | string) => string;
18
19
  parser?: (value: string) => string;
19
20
  onChange?: (value: number | string) => void;
21
+ onFocus?: () => void;
20
22
  onBlur?: (value: string, beforeFormatValue: string) => void;
21
23
  onEnter?: (value: string, beforeFormatValue: string) => void;
22
24
  };
@@ -6,7 +6,6 @@ declare type IExtra = {
6
6
  tableProps: ITableProps;
7
7
  tableRef: React.MutableRefObject<ITableRef>;
8
8
  toolBoxRef: React.RefObject<ToolBoxRef>;
9
- columns: IColumn[];
10
9
  flattenColumns: IColumn[];
11
10
  editableColumns: IColumn[];
12
11
  pagination: IPagination;
@@ -17,6 +16,7 @@ declare type IExtra = {
17
16
  isFetch: boolean;
18
17
  dataChange: () => void;
19
18
  getTableData: () => Promise<void>;
19
+ handleTableData: (records: IRecord[]) => void;
20
20
  createTableData: (records: IRecord[]) => void;
21
21
  calcTableHeight: () => void;
22
22
  scrollXToColumn: (dataIndex: string, index?: number) => void;
@@ -28,6 +28,7 @@ declare type IExtra = {
28
28
  setRowExpandedKeys: (rowKeys: IRowKey[]) => void;
29
29
  setHighlightKey: (rowKey: IRowKey) => void;
30
30
  setSelectionRows: (records: IRecord[]) => void;
31
+ setOriginColumns: (columns: IColumn[]) => void;
31
32
  getTableLog: () => {
32
33
  required: IValidItem[];
33
34
  validate: IValidItem[];
@@ -58,6 +58,7 @@ declare const useTableCore: <T extends ITableProps>(props: T, extra: IExtra) =>
58
58
  initialTable: () => void;
59
59
  createTableFullData: (list: IRecord[]) => void;
60
60
  getTableData: () => Promise<void>;
61
+ handleTableData: (dataList: IRecord[]) => void;
61
62
  createTableData: (list: IRecord[]) => void;
62
63
  createGroupData: (list: IRecord[]) => IRecord<any>[];
63
64
  createSelectionKeys: (rowKeys?: IRowKey[]) => (string | number)[];
@@ -1,18 +1,21 @@
1
1
  import React from 'react';
2
2
  import type { ITableRef } from './useTableRef';
3
3
  import type { TableBodyRef, IColumn, IPagination, IRecord, IRowKey, ITableProps, IMergeCell } from '../table/types';
4
+ import type { ComponentSize } from '../../../_utils/types';
4
5
  declare type IExtra = {
5
6
  tableRef: React.MutableRefObject<ITableRef>;
6
7
  topElementRef: React.RefObject<HTMLDivElement>;
7
8
  tableElementRef: React.RefObject<HTMLDivElement>;
8
9
  tableBodyRef: React.RefObject<TableBodyRef>;
9
10
  resizableBarRef: React.RefObject<HTMLDivElement>;
11
+ $size: ComponentSize;
10
12
  scrollX: boolean;
11
13
  pagination: IPagination;
12
14
  selectionKeys: IRowKey[];
13
15
  rowExpandedKeys: IRowKey[];
14
16
  highlightKey: IRowKey;
15
17
  summationRows: Record<string, number | string>[];
18
+ summationColumns: IColumn[];
16
19
  showSummary: boolean;
17
20
  isWebPagination: boolean;
18
21
  isScrollPagination: boolean;
@@ -32,8 +32,8 @@ declare const useTableLayout: <T extends ITableProps>(props: T, extra: IExtra) =
32
32
  rowSpan: number;
33
33
  colSpan: number;
34
34
  };
35
- getStickyLeft: (rowKey: IRowKey) => number;
36
- getStickyRight: (rowKey: IRowKey) => number;
35
+ getStickyLeft: (dataIndex: string) => number;
36
+ getStickyRight: (dataIndex: string) => number;
37
37
  scrollXToColumn: (dataIndex: string, index?: number) => void;
38
38
  scrollYToRecord: (rowKey: IRowKey, index?: number) => void;
39
39
  rowInViewport: (index: number) => boolean;
@@ -16,15 +16,17 @@ import type { ITableProps } from './types';
16
16
  * readOnly: PropTypes.bool,
17
17
  * max: PropTypes.number,
18
18
  * min: PropTypes.number,
19
+ * stringMode: PropTypes.bool,
19
20
  * trueValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
20
21
  * falseValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
21
22
  * minDateTime: PropTypes.string,
22
23
  * maxDateTime: PropTypes.string,
23
- * text: PropTypes.string,
24
+ * format: PropTypes.string,
24
25
  * placeholder: PropTypes.string,
25
26
  * disabled: PropTypes.bool, // 表单禁用状态
26
27
  * filterable: PropTypes.bool,
27
28
  * allowClear: PropTypes.bool,
29
+ * listHeight: PropTypes.number,
28
30
  * collapseTags: PropTypes.bool,
29
31
  * maxTagTextLength: PropTypes.number,
30
32
  * cornerSign: PropTypes.bool,
@@ -37,7 +39,8 @@ import type { ITableProps } from './types';
37
39
  * tree: PropTypes.object,
38
40
  * initialValue: PropTypes.object,
39
41
  * width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
40
- * closeRemoteMatch: PropTypes.bool,
42
+ * onlySelect: PropTypes.bool,
43
+ * autoQueryAssign: PropTypes.bool,
41
44
  * fieldAliasMap: PropTypes.func,
42
45
  * filterAliasMap: PropTypes.func,
43
46
  * beforeOpen: PropTypes.func,
@@ -128,7 +131,6 @@ export declare const propTypes: {
128
131
  loading: PropTypes.Requireable<boolean>;
129
132
  resizable: PropTypes.Requireable<boolean>;
130
133
  uniqueKey: PropTypes.Requireable<string>;
131
- authCode: PropTypes.Requireable<string>;
132
134
  customClass: PropTypes.Requireable<string>;
133
135
  showHeader: PropTypes.Requireable<boolean>;
134
136
  ellipsis: PropTypes.Requireable<boolean>;
@@ -215,6 +217,7 @@ export declare const propTypes: {
215
217
  api: PropTypes.Validator<(...args: any[]) => any>;
216
218
  params: PropTypes.Requireable<object>;
217
219
  }>>;
220
+ beforeExport: PropTypes.Requireable<(...args: any[]) => any>;
218
221
  cellStyle: PropTypes.Requireable<boolean>;
219
222
  hideIcon: PropTypes.Requireable<boolean>;
220
223
  }>>;
@@ -225,15 +228,18 @@ export declare const propTypes: {
225
228
  fetch: PropTypes.Requireable<PropTypes.InferProps<{
226
229
  api: PropTypes.Validator<(...args: any[]) => any>;
227
230
  params: PropTypes.Requireable<object>;
228
- columnDataKey: PropTypes.Requireable<string>;
229
- exportDataKey: PropTypes.Requireable<string>;
230
- importDataKey: PropTypes.Requireable<string>;
231
- printDataKey: PropTypes.Requireable<string>;
231
+ dataKey: PropTypes.Requireable<string>;
232
232
  }>>;
233
+ fieldList: PropTypes.Requireable<(object | null | undefined)[]>;
234
+ }>>;
235
+ infoBarConfig: PropTypes.Requireable<PropTypes.InferProps<{
236
+ position: PropTypes.Requireable<string>;
237
+ hideAlert: PropTypes.Requireable<boolean>;
238
+ hideClearButton: PropTypes.Requireable<boolean>;
233
239
  }>>;
234
240
  topSpaceAlign: PropTypes.Requireable<string>;
235
- showAlert: PropTypes.Requireable<boolean>;
236
- alertPosition: PropTypes.Requireable<string>;
241
+ beforeClipboard: PropTypes.Requireable<(...args: any[]) => any>;
242
+ beforeTableImport: PropTypes.Requireable<(...args: any[]) => any>;
237
243
  showFullScreen: PropTypes.Requireable<boolean>;
238
244
  showRefresh: PropTypes.Requireable<boolean>;
239
245
  showTableImport: PropTypes.Requireable<boolean>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { BuildInPlacements } from 'rc-trigger';
3
- import type { ComponentSize, CSSProperties, Nullable, IDict, AjaxResponse } from '../../../_utils/types';
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
6
  export declare type IFixed = 'left' | 'right';
@@ -93,10 +93,12 @@ export declare type IEditerReturn = {
93
93
  showCount?: boolean;
94
94
  max?: number;
95
95
  min?: number;
96
+ stringMode?: boolean;
96
97
  trueValue?: string | number;
97
98
  falseValue?: string | number;
98
99
  minDateTime?: string;
99
100
  maxDateTime?: string;
101
+ format?: string;
100
102
  prefix?: React.ReactNode;
101
103
  suffix?: React.ReactNode;
102
104
  placeholder?: string;
@@ -104,6 +106,7 @@ export declare type IEditerReturn = {
104
106
  disabled?: boolean;
105
107
  filterable?: boolean;
106
108
  allowClear?: boolean;
109
+ listHeight?: number;
107
110
  collapseTags?: boolean;
108
111
  maxTagTextLength?: number;
109
112
  cornerSign?: boolean;
@@ -130,6 +133,8 @@ export declare type IEditerReturn = {
130
133
  };
131
134
  width?: number | string;
132
135
  initialValue?: IFormData;
136
+ onlySelect?: boolean;
137
+ autoQueryAssign?: boolean;
133
138
  closeRemoteMatch?: boolean;
134
139
  fieldAliasMap?: (() => Record<string, string>) | Record<string, string>;
135
140
  filterAliasMap?: (() => string[]) | string[];
@@ -224,6 +229,7 @@ export declare type IExportExcel = {
224
229
  api: IFetchFn;
225
230
  params?: IFetchParams;
226
231
  };
232
+ beforeExport?: (records: IRecord[]) => IRecord[];
227
233
  cellStyle?: boolean;
228
234
  hideIcon?: boolean;
229
235
  };
@@ -231,14 +237,20 @@ export declare type ITablePrint = {
231
237
  showLogo?: boolean;
232
238
  };
233
239
  export declare type IAuthConfig = {
234
- fetch: {
240
+ fetch?: {
235
241
  api: IFetchFn;
236
242
  params?: IFetchParams;
237
- columnDataKey?: string;
238
- exportDataKey?: string;
239
- importDataKey?: string;
240
- printDataKey?: string;
243
+ dataKey?: string;
241
244
  };
245
+ fieldList?: IAuth[];
246
+ isExport?: number;
247
+ isImport?: number;
248
+ isPrint?: number;
249
+ };
250
+ export declare type IAlertConfig = {
251
+ position?: 'top' | 'bottom';
252
+ hideAlert?: boolean;
253
+ hideClearButton?: boolean;
242
254
  };
243
255
  export declare type IColumn = {
244
256
  dataIndex: string;
@@ -314,7 +326,6 @@ export declare type ITableProps = {
314
326
  loading?: boolean;
315
327
  resizable?: boolean;
316
328
  uniqueKey?: string;
317
- authCode?: string;
318
329
  customClass?: string;
319
330
  showHeader?: boolean;
320
331
  ellipsis?: boolean;
@@ -341,12 +352,17 @@ export declare type ITableProps = {
341
352
  scrollPagination?: boolean;
342
353
  webPagination?: boolean;
343
354
  paginationConfig?: IPaginationConfig;
344
- showAlert?: boolean;
345
- alertPosition?: 'top' | 'bottom';
346
355
  topSpaceAlign?: IAlign;
347
356
  exportExcel?: IExportExcel;
348
357
  tablePrint?: ITablePrint;
349
358
  authConfig?: IAuthConfig;
359
+ infoBarConfig?: IAlertConfig;
360
+ /** @deprecated use `infoBarConfig` instead, and it will be deprecated in the next major version */
361
+ showAlert?: boolean;
362
+ /** @deprecated use `infoBarConfig` instead, and it will be deprecated in the next major version */
363
+ alertPosition?: 'top' | 'bottom';
364
+ beforeClipboard?: (records: string[][], columnKeys: string[]) => string[][] | Promise<string[][]>;
365
+ beforeTableImport?: (records: IRecord[]) => IRecord[] | Promise<IRecord[]>;
350
366
  showFullScreen?: boolean;
351
367
  showRefresh?: boolean;
352
368
  showTableImport?: boolean;
@@ -391,13 +407,15 @@ export declare type TableRef = {
391
407
  SCROLL_TO_COLUMN: (dataIndex: string) => void;
392
408
  SET_SELECTION: (rowKeys: IRowKey[]) => void;
393
409
  SET_SELECTION_ROWS: (records: IRecord[]) => void;
410
+ SET_TABLE_DATA: (records: IRecord[]) => void;
394
411
  SET_TABLE_COLUMN: (dataIndex: string, option: Record<string, any>, forceUpdate?: boolean) => void;
412
+ DEFINE_INITIAL_COLUMNS: (columns: IColumn[]) => void;
395
413
  INSERT_RECORDS: <T extends IRecord>(records: T | T[], option?: {
396
414
  mode?: InsertMode;
397
415
  parentRowKey?: IRowKey;
398
416
  }) => void;
399
417
  REMOVE_RECORDS: <T extends IRecord | IRowKey>(records: T | T[]) => void;
400
- VALIDATE_FIELDS: () => {
418
+ VALIDATE_FIELDS: (rowKeys?: IRowKey[], dataIndexes?: string[]) => {
401
419
  required: IValidItem[];
402
420
  validate: IValidItem[];
403
421
  };
@@ -7,7 +7,7 @@ export declare const columnsFlatMap: (columns: IColumn[]) => IColumn[];
7
7
  export declare const createFilterColumns: (columns: IColumn[]) => IColumn[];
8
8
  export declare const getAllColumns: (columns: IColumn[]) => IColumn[];
9
9
  export declare const mapTableColumns: (columns: IColumn[], callback?: ((column: IColumn) => void) | undefined) => IColumn[];
10
- export declare const deepFindColumn: (columns: IColumn[], mark: IRowKey) => Nullable<IColumn>;
10
+ export declare const deepFindColumn: (columns: IColumn[], mark: string) => Nullable<IColumn>;
11
11
  export declare const findFirstColumn: (column: IColumn) => IColumn;
12
12
  export declare const findLastColumn: (column: IColumn) => IColumn;
13
13
  export declare const filterTableColumns: (columns: IColumn[], marks: string[]) => IColumn[];
@@ -24,12 +24,13 @@ export declare const difference: <T extends AnyObject<any>>(obj: T, base: T) =>
24
24
  export declare const isArrayContain: (targetArr: unknown[], arr: unknown[]) => boolean;
25
25
  export declare const getCellValue: (record: IRecord, dataIndex: string) => any;
26
26
  export declare const setCellValue: (record: IRecord, dataIndex: string, val: unknown, precision?: number) => void;
27
+ export declare const getSplitValue: (record: IRecord, key: string) => any;
27
28
  export declare const formatNumber: (value: number | string) => string;
28
29
  export declare const validateNumber: (val: string) => boolean;
29
30
  export declare const stringToNumber: (input: string) => number | '';
30
31
  export declare const getDate: (dateString: string | undefined, format: string) => dayjs.Dayjs | null;
31
32
  export declare const formatDate: (date: Dayjs | null, format: string) => string;
32
- export declare const createUidKey: (key?: string) => string;
33
+ export declare const createUidKey: (prefix?: string) => string;
33
34
  export declare const getVNodeText: <T extends string | number>(val: JSXElement | T) => T[];
34
35
  export declare const getGroupValidData: (list: IRecord[]) => IRecord<any>[];
35
36
  export declare const createOrderBy: (sorter: ISorter) => string;
@@ -21,6 +21,7 @@
21
21
  &__setting {
22
22
  .info {
23
23
  padding-left: 20px;
24
+ margin-bottom: 6px;
24
25
  font-size: @v-font-size-small;
25
26
  color: @v-font-secondary-dark-color;
26
27
  }
@@ -19,7 +19,7 @@
19
19
  color: @v-primary-color;
20
20
  }
21
21
  &__setting {
22
- .qm-form--sm .qm-table-column-filter {
22
+ .@{qm-prefix}-form--sm .@{qm-prefix}-table-column-filter {
23
23
  font-size: @v-font-size-small;
24
24
  }
25
25
  }
@@ -34,8 +34,8 @@
34
34
  .container {
35
35
  flex: 1;
36
36
  width: 0;
37
- .qm-tabs {
38
- margin-top: -@v-module-distance;
37
+ .@{qm-prefix}-tabs {
38
+ margin-top: -5px;
39
39
  }
40
40
  }
41
41
  .saved {
@@ -103,6 +103,7 @@
103
103
  justify-content: space-between;
104
104
  align-items: center;
105
105
  padding: 10px 5px;
106
+ margin-top: 10px;
106
107
  border-top: 1px dashed @--border-color-base;
107
108
  }
108
109
  }
@@ -5,6 +5,7 @@
5
5
  * @Last Modified time: 2021-12-28 13:59:08
6
6
  */
7
7
  @prefix-table: ~'@{qm-prefix}-table';
8
+
8
9
  .@{prefix-table} {
9
10
  // 42 34 26
10
11
  &--wrapper {