dcp-design-react 1.9.18 → 1.9.20

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 (36) hide show
  1. package/lib/_utils/dom.d.ts +1 -0
  2. package/lib/anchor/style/index.less +101 -101
  3. package/lib/antd/index.less +19 -19
  4. package/lib/collapse/src/_util/motion.less +13 -13
  5. package/lib/collapse/style/index.less +24 -24
  6. package/lib/copy-to-clipboard/style/index.less +12 -12
  7. package/lib/countup/style/index.less +22 -22
  8. package/lib/cropper/style/index.less +13 -13
  9. package/lib/index.esm.js +1 -1
  10. package/lib/index.full.js +1 -1
  11. package/lib/index.js +1 -1
  12. package/lib/print/style/index.less +175 -175
  13. package/lib/range-table-helper/style/index.less +18 -18
  14. package/lib/scrollbar/src/scrollbar.d.ts +2 -2
  15. package/lib/scrollbar/style/index.less +72 -72
  16. package/lib/search-helper/style/index.less +14 -14
  17. package/lib/search-tree/style/index.less +34 -34
  18. package/lib/spin/style/index.less +16 -16
  19. package/lib/split/style/index.less +83 -83
  20. package/lib/style/compact.less +10 -10
  21. package/lib/style/mixins/reset.less +34 -34
  22. package/lib/style/reset.less +132 -132
  23. package/lib/style/var.less +9 -9
  24. package/lib/table/src/context/index.d.ts +1 -0
  25. package/lib/table/src/hooks/useTableCore.d.ts +2 -0
  26. package/lib/table/src/hooks/useTableLayout.d.ts +0 -2
  27. package/lib/table/src/hooks/useTableRef.d.ts +3 -0
  28. package/lib/table/src/table/props.d.ts +3 -0
  29. package/lib/table/src/table/types.d.ts +6 -2
  30. package/lib/table/src/utils/index.d.ts +1 -0
  31. package/lib/table/style/expandable.less +64 -64
  32. package/lib/table/style/index.less +29 -29
  33. package/lib/tabs/style/index.less +32 -32
  34. package/lib/tree-helper/style/index.less +21 -21
  35. package/lib/tree-table-helper/style/index.less +24 -24
  36. package/package.json +1 -1
@@ -1,83 +1,83 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2021-02-09 09:27:46
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2021-11-05 13:33:02
6
- */
7
- @import '../../style/common';
8
-
9
- @prefix-split: ~'@{qm-prefix}-split';
10
- @prefix-split-pane: ~'@{qm-prefix}-split-pane';
11
-
12
- .@{prefix-split} {
13
- .reset-container();
14
- display: flex;
15
- &.vertical {
16
- flex-direction: column;
17
- }
18
- &__resize-bar {
19
- position: relative;
20
- background-color: transparent;
21
- border-radius: @--border-radius-base - 1px;
22
- transition: background-color 0.4s ease;
23
- user-select: none;
24
- box-sizing: border-box;
25
- z-index: 1;
26
- &.horizontal {
27
- width: 11px;
28
- margin: 0 -5px;
29
- cursor: col-resize;
30
- &::after {
31
- content: ' ';
32
- position: absolute;
33
- top: 0;
34
- bottom: 0;
35
- left: 50%;
36
- width: 0;
37
- pointer-events: none;
38
- border-left: 1px solid @--border-color-base;
39
- }
40
- }
41
- &.vertical {
42
- height: 11px;
43
- margin: -5px 0;
44
- cursor: row-resize;
45
- &::after {
46
- content: ' ';
47
- position: absolute;
48
- left: 0;
49
- right: 0;
50
- top: 50%;
51
- height: 0;
52
- pointer-events: none;
53
- border-top: 1px solid @--border-color-base;
54
- }
55
- }
56
- &:hover,
57
- &:active {
58
- background-color: @--background-color;
59
- }
60
- }
61
- .@{prefix-split-pane} {
62
- box-sizing: border-box;
63
- &.horizontal {
64
- &:nth-child(1) {
65
- padding-right: 5px;
66
- }
67
- &:nth-child(3) {
68
- padding-left: 5px;
69
- }
70
- }
71
- &.vertical {
72
- &:nth-of-type(1) {
73
- padding-bottom: 5px;
74
- }
75
- &:nth-of-type(3) {
76
- padding-top: 5px;
77
- }
78
- }
79
- &.isLocked {
80
- pointer-events: none;
81
- }
82
- }
83
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-02-09 09:27:46
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-11-05 13:33:02
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-split: ~'@{qm-prefix}-split';
10
+ @prefix-split-pane: ~'@{qm-prefix}-split-pane';
11
+
12
+ .@{prefix-split} {
13
+ .reset-container();
14
+ display: flex;
15
+ &.vertical {
16
+ flex-direction: column;
17
+ }
18
+ &__resize-bar {
19
+ position: relative;
20
+ background-color: transparent;
21
+ border-radius: @--border-radius-base - 1px;
22
+ transition: background-color 0.4s ease;
23
+ user-select: none;
24
+ box-sizing: border-box;
25
+ z-index: 1;
26
+ &.horizontal {
27
+ width: 11px;
28
+ margin: 0 -5px;
29
+ cursor: col-resize;
30
+ &::after {
31
+ content: ' ';
32
+ position: absolute;
33
+ top: 0;
34
+ bottom: 0;
35
+ left: 50%;
36
+ width: 0;
37
+ pointer-events: none;
38
+ border-left: 1px solid @--border-color-base;
39
+ }
40
+ }
41
+ &.vertical {
42
+ height: 11px;
43
+ margin: -5px 0;
44
+ cursor: row-resize;
45
+ &::after {
46
+ content: ' ';
47
+ position: absolute;
48
+ left: 0;
49
+ right: 0;
50
+ top: 50%;
51
+ height: 0;
52
+ pointer-events: none;
53
+ border-top: 1px solid @--border-color-base;
54
+ }
55
+ }
56
+ &:hover,
57
+ &:active {
58
+ background-color: @--background-color;
59
+ }
60
+ }
61
+ .@{prefix-split-pane} {
62
+ box-sizing: border-box;
63
+ &.horizontal {
64
+ &:nth-child(1) {
65
+ padding-right: 5px;
66
+ }
67
+ &:nth-child(3) {
68
+ padding-left: 5px;
69
+ }
70
+ }
71
+ &.vertical {
72
+ &:nth-of-type(1) {
73
+ padding-bottom: 5px;
74
+ }
75
+ &:nth-of-type(3) {
76
+ padding-top: 5px;
77
+ }
78
+ }
79
+ &.isLocked {
80
+ pointer-events: none;
81
+ }
82
+ }
83
+ }
@@ -1,10 +1,10 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2022-11-26 21:14:37
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2023-03-28 11:52:53
6
- */
7
- @import '../antd/compact.less';
8
- @import './themes/default.less';
9
- @import './themes/compact.less';
10
- @import './reset.less';
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2022-11-26 21:14:37
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2023-03-28 11:52:53
6
+ */
7
+ @import '../antd/compact.less';
8
+ @import './themes/default.less';
9
+ @import './themes/compact.less';
10
+ @import './reset.less';
@@ -1,34 +1,34 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2021-07-23 18:58:43
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2021-07-23 18:58:43
6
- */
7
- @import '../themes/index';
8
-
9
- .reset-container() {
10
- box-sizing: border-box;
11
- margin: 0;
12
- padding: 0;
13
- color: @--text-color;
14
- font-variant: @font-variant-base;
15
- line-height: @--line-height-base;
16
- list-style: none;
17
- font-feature-settings: @font-feature-settings-base;
18
- }
19
-
20
- .box-sizing-content() {
21
- box-sizing: border-box;
22
- }
23
-
24
- .text-overflow-cut() {
25
- overflow: hidden;
26
- text-overflow: ellipsis;
27
- white-space: nowrap;
28
- }
29
-
30
- .user-select-none() {
31
- -moz-user-select: none;
32
- -webkit-user-select: none;
33
- -ms-user-select: none;
34
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 18:58:43
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2021-07-23 18:58:43
6
+ */
7
+ @import '../themes/index';
8
+
9
+ .reset-container() {
10
+ box-sizing: border-box;
11
+ margin: 0;
12
+ padding: 0;
13
+ color: @--text-color;
14
+ font-variant: @font-variant-base;
15
+ line-height: @--line-height-base;
16
+ list-style: none;
17
+ font-feature-settings: @font-feature-settings-base;
18
+ }
19
+
20
+ .box-sizing-content() {
21
+ box-sizing: border-box;
22
+ }
23
+
24
+ .text-overflow-cut() {
25
+ overflow: hidden;
26
+ text-overflow: ellipsis;
27
+ white-space: nowrap;
28
+ }
29
+
30
+ .user-select-none() {
31
+ -moz-user-select: none;
32
+ -webkit-user-select: none;
33
+ -ms-user-select: none;
34
+ }
@@ -1,132 +1,132 @@
1
- /* http://meyerweb.com/eric/tools/css/reset/
2
- v2.0 | 20110126
3
- License: none (public domain)
4
- */
5
- html,
6
- body,
7
- div,
8
- span,
9
- applet,
10
- object,
11
- iframe,
12
- h1,
13
- h2,
14
- h3,
15
- h4,
16
- h5,
17
- h6,
18
- p,
19
- blockquote,
20
- pre,
21
- a,
22
- abbr,
23
- acronym,
24
- address,
25
- big,
26
- cite,
27
- code,
28
- del,
29
- dfn,
30
- em,
31
- img,
32
- ins,
33
- kbd,
34
- q,
35
- s,
36
- samp,
37
- small,
38
- strike,
39
- strong,
40
- sub,
41
- sup,
42
- tt,
43
- var,
44
- b,
45
- u,
46
- i,
47
- center,
48
- dl,
49
- dt,
50
- dd,
51
- ol,
52
- ul,
53
- li,
54
- fieldset,
55
- form,
56
- label,
57
- legend,
58
- table,
59
- caption,
60
- tbody,
61
- tfoot,
62
- thead,
63
- tr,
64
- th,
65
- td,
66
- article,
67
- aside,
68
- canvas,
69
- details,
70
- embed,
71
- figure,
72
- figcaption,
73
- footer,
74
- header,
75
- hgroup,
76
- menu,
77
- nav,
78
- output,
79
- ruby,
80
- section,
81
- summary,
82
- time,
83
- mark,
84
- audio,
85
- video {
86
- margin: 0;
87
- padding: 0;
88
- }
89
- /* HTML5 display-role reset for older browsers */
90
- article,
91
- aside,
92
- details,
93
- figcaption,
94
- figure,
95
- footer,
96
- header,
97
- hgroup,
98
- menu,
99
- nav,
100
- section {
101
- display: block;
102
- }
103
- ol,
104
- ul {
105
- list-style: none;
106
- }
107
- blockquote,
108
- q {
109
- quotes: none;
110
- }
111
- blockquote:before,
112
- blockquote:after,
113
- q:before,
114
- q:after {
115
- content: '';
116
- content: none;
117
- }
118
- table {
119
- border-collapse: collapse;
120
- border-spacing: 0;
121
- }
122
- .svgicon {
123
- display: inline-block;
124
- color: inherit;
125
- font-style: normal;
126
- line-height: 0;
127
- text-align: center;
128
- text-transform: none;
129
- text-rendering: optimizeLegibility;
130
- -webkit-font-smoothing: antialiased;
131
- -moz-osx-font-smoothing: grayscale;
132
- }
1
+ /* http://meyerweb.com/eric/tools/css/reset/
2
+ v2.0 | 20110126
3
+ License: none (public domain)
4
+ */
5
+ html,
6
+ body,
7
+ div,
8
+ span,
9
+ applet,
10
+ object,
11
+ iframe,
12
+ h1,
13
+ h2,
14
+ h3,
15
+ h4,
16
+ h5,
17
+ h6,
18
+ p,
19
+ blockquote,
20
+ pre,
21
+ a,
22
+ abbr,
23
+ acronym,
24
+ address,
25
+ big,
26
+ cite,
27
+ code,
28
+ del,
29
+ dfn,
30
+ em,
31
+ img,
32
+ ins,
33
+ kbd,
34
+ q,
35
+ s,
36
+ samp,
37
+ small,
38
+ strike,
39
+ strong,
40
+ sub,
41
+ sup,
42
+ tt,
43
+ var,
44
+ b,
45
+ u,
46
+ i,
47
+ center,
48
+ dl,
49
+ dt,
50
+ dd,
51
+ ol,
52
+ ul,
53
+ li,
54
+ fieldset,
55
+ form,
56
+ label,
57
+ legend,
58
+ table,
59
+ caption,
60
+ tbody,
61
+ tfoot,
62
+ thead,
63
+ tr,
64
+ th,
65
+ td,
66
+ article,
67
+ aside,
68
+ canvas,
69
+ details,
70
+ embed,
71
+ figure,
72
+ figcaption,
73
+ footer,
74
+ header,
75
+ hgroup,
76
+ menu,
77
+ nav,
78
+ output,
79
+ ruby,
80
+ section,
81
+ summary,
82
+ time,
83
+ mark,
84
+ audio,
85
+ video {
86
+ margin: 0;
87
+ padding: 0;
88
+ }
89
+ /* HTML5 display-role reset for older browsers */
90
+ article,
91
+ aside,
92
+ details,
93
+ figcaption,
94
+ figure,
95
+ footer,
96
+ header,
97
+ hgroup,
98
+ menu,
99
+ nav,
100
+ section {
101
+ display: block;
102
+ }
103
+ ol,
104
+ ul {
105
+ list-style: none;
106
+ }
107
+ blockquote,
108
+ q {
109
+ quotes: none;
110
+ }
111
+ blockquote:before,
112
+ blockquote:after,
113
+ q:before,
114
+ q:after {
115
+ content: '';
116
+ content: none;
117
+ }
118
+ table {
119
+ border-collapse: collapse;
120
+ border-spacing: 0;
121
+ }
122
+ .svgicon {
123
+ display: inline-block;
124
+ color: inherit;
125
+ font-style: normal;
126
+ line-height: 0;
127
+ text-align: center;
128
+ text-transform: none;
129
+ text-rendering: optimizeLegibility;
130
+ -webkit-font-smoothing: antialiased;
131
+ -moz-osx-font-smoothing: grayscale;
132
+ }
@@ -1,9 +1,9 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2022-04-12 10:32:21
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2022-04-12 10:32:21
6
- */
7
- html {
8
- --qm-primary-color: @--primary-color;
9
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2022-04-12 10:32:21
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2022-04-12 10:32:21
6
+ */
7
+ html {
8
+ --qm-primary-color: @--primary-color;
9
+ }
@@ -45,6 +45,7 @@ export type ITableContext = {
45
45
  tableChange: () => void;
46
46
  getTableData: () => Promise<void>;
47
47
  setElementStore: (key: string, value: HTMLElement) => void;
48
+ createWebPageData: () => IRecord[];
48
49
  createTableFullData: (records: IRecord[]) => void;
49
50
  updateTableData: () => void;
50
51
  setSorter: (value: ITableState['sorter']) => void;
@@ -34,6 +34,7 @@ type IExtra = {
34
34
  setTableFlatColumns: (columns: IColumn[]) => void;
35
35
  setTableFullData: (records: IRecord[]) => void;
36
36
  setTableOriginData: (records: IRecord[]) => void;
37
+ setTableFlatData: (records: IRecord[]) => void;
37
38
  setAllTableData: (records: IRecord[]) => void;
38
39
  setDeriveRowKeys: (records: IRecord[]) => void;
39
40
  setPagination: <T extends IPagination>(pagination: T | ((prev: T) => T)) => void;
@@ -71,6 +72,7 @@ declare const useTableCore: <T extends ITableProps>(props: T, extra: IExtra) =>
71
72
  createTableFullData: (list: IRecord[]) => void;
72
73
  getTableData: () => Promise<void>;
73
74
  handleTableData: (dataList: IRecord[]) => void;
75
+ createWebPageData: () => IRecord<any>[];
74
76
  createTableData: (list: IRecord[]) => void;
75
77
  createGroupData: (list: IRecord[]) => IRecord<any>[];
76
78
  createSelectionKeys: (rowKeys?: IRowKey[]) => (string | number)[];
@@ -14,10 +14,8 @@ type IExtra = {
14
14
  layout: ITableState['layout'];
15
15
  scrollX: boolean;
16
16
  scrollY: boolean;
17
- tableData: IRecord[];
18
17
  showFooter: boolean;
19
18
  showPagination: boolean;
20
- isWebPagination: boolean;
21
19
  isFullScreen: boolean;
22
20
  setLayout: <T extends ITableState['layout']>(layout: T | ((prev: T) => T)) => void;
23
21
  setScrollX: (scrollX: boolean) => void;
@@ -12,6 +12,7 @@ export type ITableRef = {
12
12
  originColumns: IColumn[];
13
13
  tableFullData: IRecord[];
14
14
  tableOriginData: IRecord[];
15
+ tableFlatData: IRecord[];
15
16
  allTableData: IRecord[];
16
17
  allRowKeys: IRowKey[];
17
18
  deriveRowKeys: IDerivedRowKey[];
@@ -62,6 +63,7 @@ declare const useTableRef: <T extends ITableProps>(props: T, { getRowKey, $size
62
63
  setElementStore: (key: string, value: HTMLElement) => void;
63
64
  setOriginColumns: (columns: IColumn[]) => void;
64
65
  setTableFullData: (records: IRecord[]) => void;
66
+ setTableFlatData: (records: IRecord[]) => void;
65
67
  setTableOriginData: (records: IRecord[]) => void;
66
68
  setAllTableData: (records: IRecord[]) => void;
67
69
  setDeriveRowKeys: (records: IRecord[]) => void;
@@ -89,6 +91,7 @@ declare const useTableRef: <T extends ITableProps>(props: T, { getRowKey, $size
89
91
  originColumns: IColumn[];
90
92
  tableFullData: IRecord[];
91
93
  tableOriginData: IRecord[];
94
+ tableFlatData: IRecord[];
92
95
  allTableData: IRecord[];
93
96
  allRowKeys: IRowKey[];
94
97
  deriveRowKeys: IDerivedRowKey[];
@@ -180,6 +180,9 @@ export declare const propTypes: {
180
180
  disabled: PropTypes.Requireable<(...args: any[]) => any>;
181
181
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
182
182
  }>>;
183
+ tableConfig: PropTypes.Requireable<PropTypes.InferProps<{
184
+ virtual: PropTypes.Requireable<boolean>;
185
+ }>>;
183
186
  treeConfig: PropTypes.Requireable<PropTypes.InferProps<{
184
187
  virtual: PropTypes.Requireable<boolean>;
185
188
  expandIconColumn: PropTypes.Requireable<string>;
@@ -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, IAuth, AjaxResponse } from '../../../_utils/types';
3
+ import type { ComponentSize, CSSProperties, AjaxResponse, Nullable, ValueOf, IDict, IAuth } from '../../../_utils/types';
4
4
  import type { IFormData, IFormItem } from '../../../form/src/types';
5
5
  export type { ITableContext } from '../context';
6
6
  export type IFixed = 'left' | 'right';
@@ -200,6 +200,9 @@ export type IRowHighlight = {
200
200
  disabled?: (row: IRecord) => boolean;
201
201
  onChange?: (rowKey: IRowKey, row: IRecord) => void;
202
202
  };
203
+ export type ITableConfig = {
204
+ virtual?: boolean;
205
+ };
203
206
  export type ITreeConfig = {
204
207
  virtual?: boolean;
205
208
  expandIconColumn?: string;
@@ -303,7 +306,7 @@ export type IColumn = {
303
306
  unit?: string;
304
307
  render?: () => React.ReactNode;
305
308
  };
306
- shouldCellUpdate?: (currentRow: IRecord, prevRow: IRecord) => boolean;
309
+ shouldCellUpdate?: (nextCellValue: ValueOf<IRecord>, prevCellValue: ValueOf<IRecord>, record: IRecord) => boolean;
307
310
  headRender?: (column: IColumn, tableData: IRecord[]) => React.ReactNode;
308
311
  render?: (text: string | number, row: IRecord, column: IColumn, rowIndex: number, columnIndex: number) => React.ReactNode | string | number;
309
312
  };
@@ -356,6 +359,7 @@ export type ITableProps = {
356
359
  initialFilter?: IFilter;
357
360
  rowSelection?: IRowSelection;
358
361
  rowHighlight?: IRowHighlight;
362
+ tableConfig?: ITableConfig;
359
363
  treeConfig?: ITreeConfig;
360
364
  expandable?: IExpandable;
361
365
  summation?: ISummation;
@@ -53,3 +53,4 @@ export declare const sortableFormatter: <T>(items: T[]) => T[];
53
53
  * @returns
54
54
  */
55
55
  export declare const equalFn: <T = any>(obj1: T, obj2: T, shallow?: boolean) => boolean;
56
+ export declare const withDefaultProps: <T extends object>(defaultProps: T, props: Partial<T>) => T;