dcp-design-react 1.11.2 → 1.11.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.
Files changed (45) hide show
  1. package/lib/form/style/index.less +3 -1
  2. package/lib/index.d.ts +2 -2
  3. package/lib/index.esm.js +1 -1
  4. package/lib/index.full.js +1 -1
  5. package/lib/index.js +1 -1
  6. package/lib/locale/lang/en.d.ts +4 -4
  7. package/lib/locale/lang/en.js +4 -4
  8. package/lib/locale/lang/zh-cn.d.ts +4 -4
  9. package/lib/locale/lang/zh-cn.js +4 -4
  10. package/lib/pivot-grid/src/main/Context.d.ts +6 -2
  11. package/lib/pivot-grid/src/utils/index.d.ts +4 -2
  12. package/lib/pivot-grid/style/grid-layout.less +239 -239
  13. package/lib/pivot-grid/style/top-bar.less +34 -3
  14. package/lib/pivot-grid/style/variable.less +7 -7
  15. package/lib/scrollbar/src/scrollbar.d.ts +1 -0
  16. package/lib/scrollbar/style/index.less +1 -0
  17. package/lib/style/index.css +49 -10
  18. package/lib/style/index.less +43 -43
  19. package/lib/style/index.min.css +1 -1
  20. package/lib/table/src/body/DraggableTr.d.ts +2 -1
  21. package/lib/table/src/body/index.d.ts +2 -6
  22. package/lib/table/src/config/index.d.ts +1 -0
  23. package/lib/table/src/context/index.d.ts +3 -8
  24. package/lib/table/src/export/useExport.d.ts +1 -1
  25. package/lib/table/src/footer/index.d.ts +1 -4
  26. package/lib/table/src/header/index.d.ts +1 -3
  27. package/lib/table/src/hooks/useImperativeMethod.d.ts +0 -1
  28. package/lib/table/src/hooks/useTableCore.d.ts +3 -17
  29. package/lib/table/src/hooks/useTableEffect.d.ts +0 -2
  30. package/lib/table/src/hooks/useTableLayout.d.ts +3 -15
  31. package/lib/table/src/hooks/useTableMemo.d.ts +1 -3
  32. package/lib/table/src/hooks/useTableRef.d.ts +4 -33
  33. package/lib/table/src/hooks/useTableState.d.ts +5 -14
  34. package/lib/table/src/hooks/useTableVirtual.d.ts +17 -0
  35. package/lib/table/src/table/props.d.ts +0 -1
  36. package/lib/table/src/table/types.d.ts +3 -2
  37. package/lib/table/style/body.less +103 -103
  38. package/lib/table/style/column-filter.less +5 -5
  39. package/lib/table/style/index.less +31 -31
  40. package/lib/table/style/pivot-grid.less +19 -19
  41. package/lib/virtual-list/index.d.ts +1 -1
  42. package/lib/virtual-list/src/list-item.d.ts +2 -1
  43. package/lib/virtual-list/src/virtual-list.d.ts +5 -4
  44. package/lib/virtual-list/style/index.less +21 -16
  45. package/package.json +1 -1
@@ -1,103 +1,103 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2020-02-28 22:13:54
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2024-12-01 18:48:00
6
- */
7
- .body--row {
8
- &-draggable {
9
- position: relative;
10
- .drop-indicator {
11
- position: absolute;
12
- right: 0;
13
- bottom: 0;
14
- z-index: 5;
15
- height: 2px;
16
- background-color: @v-primary-color;
17
- border-radius: 1px;
18
- pointer-events: none;
19
- &::after {
20
- position: absolute;
21
- top: -3px;
22
- left: 0;
23
- width: 8px;
24
- height: 8px;
25
- background-color: #fff;
26
- border: 2px solid @v-primary-color;
27
- border-radius: 50%;
28
- content: '';
29
- }
30
- }
31
- }
32
- }
33
- .body--column {
34
- .cell--edit {
35
- margin: 0 -1 * (@v-module-distance - 1px);
36
- // placeholder
37
- input::placeholder {
38
- text-align: left;
39
- }
40
- // search
41
- .ant-input-search {
42
- width: calc(100% + 1px);
43
- & > .ant-input-group > .ant-input-group-addon {
44
- line-height: 1;
45
- }
46
- }
47
- // search-helper-multiple
48
- .search-helper-multiple {
49
- .ant-input-group > .ant-select:first-child {
50
- z-index: 1;
51
- .ant-select-selector {
52
- border-top-right-radius: 0;
53
- border-bottom-right-radius: 0;
54
- }
55
- }
56
- .ant-select-multiple {
57
- .ant-select-selection-overflow-item-rest {
58
- pointer-events: none;
59
- }
60
- }
61
- }
62
- // textArea
63
- textarea[class='ant-input'] {
64
- resize: none;
65
- }
66
- &.is-error {
67
- position: relative;
68
- .ant-input,
69
- .ant-input-affix-wrapper {
70
- border-color: @v-danger-color;
71
- box-shadow: none;
72
- z-index: 1;
73
- }
74
- .ant-input-search {
75
- & + .cell-error {
76
- right: 38px;
77
- }
78
- }
79
- .cell-error {
80
- position: absolute;
81
- top: calc(50% - 9px);
82
- font-size: @v-font-size-small;
83
- color: @v-danger-color;
84
- right: 8px;
85
- pointer-events: none;
86
- z-index: 1;
87
- }
88
- }
89
- }
90
- &.col--center {
91
- .cell--edit .ant-input {
92
- text-align: center;
93
- }
94
- }
95
- &.col--right {
96
- .cell--edit .ant-input {
97
- text-align: right;
98
- }
99
- }
100
- &.selected {
101
- background-color: @v-table-row-selected-background-color !important;
102
- }
103
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2020-02-28 22:13:54
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2024-12-01 18:48:00
6
+ */
7
+ .body--row {
8
+ &-draggable {
9
+ position: relative;
10
+ .drop-indicator {
11
+ position: absolute;
12
+ right: 0;
13
+ bottom: 0;
14
+ z-index: 5;
15
+ height: 2px;
16
+ background-color: @v-primary-color;
17
+ border-radius: 1px;
18
+ pointer-events: none;
19
+ &::after {
20
+ position: absolute;
21
+ top: -3px;
22
+ left: 0;
23
+ width: 8px;
24
+ height: 8px;
25
+ background-color: #fff;
26
+ border: 2px solid @v-primary-color;
27
+ border-radius: 50%;
28
+ content: '';
29
+ }
30
+ }
31
+ }
32
+ }
33
+ .body--column {
34
+ .cell--edit {
35
+ margin: 0 -1 * (@v-module-distance - 1px);
36
+ // placeholder
37
+ input::placeholder {
38
+ text-align: left;
39
+ }
40
+ // search
41
+ .ant-input-search {
42
+ width: calc(100% + 1px);
43
+ & > .ant-input-group > .ant-input-group-addon {
44
+ line-height: 1;
45
+ }
46
+ }
47
+ // search-helper-multiple
48
+ .search-helper-multiple {
49
+ .ant-input-group > .ant-select:first-child {
50
+ z-index: 1;
51
+ .ant-select-selector {
52
+ border-top-right-radius: 0;
53
+ border-bottom-right-radius: 0;
54
+ }
55
+ }
56
+ .ant-select-multiple {
57
+ .ant-select-selection-overflow-item-rest {
58
+ pointer-events: none;
59
+ }
60
+ }
61
+ }
62
+ // textArea
63
+ textarea[class='ant-input'] {
64
+ resize: none;
65
+ }
66
+ &.is-error {
67
+ position: relative;
68
+ .ant-input,
69
+ .ant-input-affix-wrapper {
70
+ border-color: @v-danger-color;
71
+ box-shadow: none;
72
+ z-index: 1;
73
+ }
74
+ .ant-input-search {
75
+ & + .cell-error {
76
+ right: 38px;
77
+ }
78
+ }
79
+ .cell-error {
80
+ position: absolute;
81
+ top: calc(50% - 9px);
82
+ font-size: @v-font-size-small;
83
+ color: @v-danger-color;
84
+ right: 8px;
85
+ pointer-events: none;
86
+ z-index: 1;
87
+ }
88
+ }
89
+ }
90
+ &.col--center {
91
+ .cell--edit .ant-input {
92
+ text-align: center;
93
+ }
94
+ }
95
+ &.col--right {
96
+ .cell--edit .ant-input {
97
+ text-align: right;
98
+ }
99
+ }
100
+ &.selected {
101
+ background-color: @v-table-row-selected-background-color !important;
102
+ }
103
+ }
@@ -22,14 +22,14 @@
22
22
 
23
23
  .column-filter__popper {
24
24
  padding: 0 !important;
25
- min-width: 150px;
26
- max-width: 200px;
25
+ min-width: 160px;
26
+ max-width: 220px;
27
27
  }
28
28
 
29
29
  .column-item__popper {
30
30
  padding-right: @v-module-distance !important;
31
- min-width: 150px;
32
- max-width: 200px;
31
+ min-width: 160px;
32
+ max-width: 220px;
33
33
  .ant-popover-arrow {
34
34
  display: none;
35
35
  }
@@ -46,7 +46,7 @@
46
46
  .box-sizing-content();
47
47
  li.item {
48
48
  position: relative;
49
- line-height: 1.75;
49
+ line-height: 1.85;
50
50
  .text-overflow-cut();
51
51
  .handle {
52
52
  padding: 2px;
@@ -1,31 +1,31 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2021-07-23 19:05:57
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2024-12-01 14:16:57
6
- */
7
- @import './variable.less';
8
- @import './toper.less';
9
- @import './alert.less';
10
- @import './full-screen.less';
11
- @import './reload.less';
12
- @import './print.less';
13
- @import './import.less';
14
- @import './export.less';
15
- @import './clipboard.less';
16
- @import './tollbox.less';
17
- @import './select-collection.less';
18
- @import './group-summary.less';
19
- @import './super-search.less';
20
- @import './fast-search.less';
21
- @import './pivot-grid.less';
22
- @import './column-filter.less';
23
- @import './table.less';
24
- @import './header.less';
25
- @import './body.less';
26
- @import './footer.less';
27
- @import './area-select.less';
28
- @import './pager.less';
29
- @import './empty.less';
30
- @import './expandable.less';
31
- @import './size.less';
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:05:57
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2024-12-01 14:16:57
6
+ */
7
+ @import './variable.less';
8
+ @import './toper.less';
9
+ @import './alert.less';
10
+ @import './full-screen.less';
11
+ @import './reload.less';
12
+ @import './print.less';
13
+ @import './import.less';
14
+ @import './export.less';
15
+ @import './clipboard.less';
16
+ @import './tollbox.less';
17
+ @import './select-collection.less';
18
+ @import './group-summary.less';
19
+ @import './super-search.less';
20
+ @import './fast-search.less';
21
+ @import './pivot-grid.less';
22
+ @import './column-filter.less';
23
+ @import './table.less';
24
+ @import './header.less';
25
+ @import './body.less';
26
+ @import './footer.less';
27
+ @import './area-select.less';
28
+ @import './pager.less';
29
+ @import './empty.less';
30
+ @import './expandable.less';
31
+ @import './size.less';
@@ -1,19 +1,19 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2024-12-01 14:16:05
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2024-12-01 14:16:28
6
- */
7
- .@{prefix-table}-pivot-grid {
8
- display: inline-block;
9
- padding: 5px 3px;
10
- line-height: 1;
11
- cursor: pointer;
12
- transition: all 0.3s ease;
13
- .icon {
14
- font-size: 1.05em;
15
- }
16
- &:hover {
17
- color: @v-primary-color;
18
- }
19
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2024-12-01 14:16:05
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2024-12-01 14:16:28
6
+ */
7
+ .@{prefix-table}-pivot-grid {
8
+ display: inline-block;
9
+ padding: 5px 3px;
10
+ line-height: 1;
11
+ cursor: pointer;
12
+ transition: all 0.3s ease;
13
+ .icon {
14
+ font-size: 1.05em;
15
+ }
16
+ &:hover {
17
+ color: @v-primary-color;
18
+ }
19
+ }
@@ -1,3 +1,3 @@
1
1
  import VirtualList from './src/virtual-list';
2
- export type { VirtualListProps } from './src/virtual-list';
2
+ export type { VirtualListRef, VirtualListProps } from './src/virtual-list';
3
3
  export default VirtualList;
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  type IProps = {
3
+ dataIndex: number;
3
4
  className?: string;
4
5
  style?: React.CSSProperties;
5
6
  children?: React.ReactNode;
6
7
  };
7
- declare const ListItem: React.FC<IProps>;
8
+ declare const ListItem: React.ForwardRefExoticComponent<IProps & React.RefAttributes<any>>;
8
9
  export default ListItem;
@@ -1,19 +1,20 @@
1
1
  import React from 'react';
2
2
  import { type Virtualizer } from './useVirtual';
3
3
  import type { IRecord } from '../../table/src/table/types';
4
- import ListItem from './list-item';
5
4
  type IProps = {
6
5
  height?: number;
6
+ maxHeight?: number;
7
7
  itemHeight?: number;
8
8
  dataSource?: IRecord[];
9
9
  className?: string;
10
10
  style?: React.CSSProperties;
11
- children?: React.ReactNode;
12
11
  renderItem?: (item: IRecord, index: number) => React.ReactNode;
13
12
  onScroll?: (instance: Virtualizer<Element, Element>, sync: boolean) => void;
14
13
  };
15
14
  export type VirtualListProps = IProps;
16
- declare const VirtualList: React.FC<IProps> & {
17
- Item: typeof ListItem;
15
+ export type VirtualListRef = {
16
+ SCROLL_TO_INDEX: (index: number) => void;
17
+ SCROLL_TO_OFFSET: (offset: number) => void;
18
18
  };
19
+ declare const VirtualList: React.ForwardRefExoticComponent<IProps & React.RefAttributes<VirtualListRef>>;
19
20
  export default VirtualList;
@@ -1,16 +1,21 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2024-12-02 09:06:20
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2024-12-02 13:16:55
6
- */
7
- @import '../../style/common';
8
-
9
- @prefix-virtual-list: ~'@{qm-prefix}-virtual-list';
10
-
11
- .@{prefix-virtual-list} {
12
- .reset-container();
13
- .list-item {
14
- list-style: none;
15
- }
16
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2024-12-02 09:06:20
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2024-12-02 13:16:55
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-virtual-list: ~'@{qm-prefix}-virtual-list';
10
+
11
+ .@{prefix-virtual-list} {
12
+ .reset-container();
13
+ .container {
14
+ display: block;
15
+ ul {
16
+ li.list-item {
17
+ list-style: none;
18
+ }
19
+ }
20
+ }
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcp-design-react",
3
- "version": "1.11.2",
3
+ "version": "1.11.3",
4
4
  "description": "A Component Library for React",
5
5
  "keywords": [
6
6
  "React",