@aloudata/aloudata-design 1.9.11 → 1.9.13
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/dist/AldTable/helper.js +18 -9
- package/dist/AldTable/style/index.less +1 -0
- package/dist/Button/style/index.less +1 -0
- package/dist/Button/style/reset.less +9 -0
- package/dist/DataPreviewTable/components/DragBar/Mask.d.ts +5 -0
- package/dist/DataPreviewTable/components/DragBar/Mask.js +29 -0
- package/dist/DataPreviewTable/components/DragBar/index.js +2 -9
- package/dist/Empty/style/index.less +2 -1
- package/dist/IconButton/style/index.less +1 -1
- package/dist/MemberPicker/style/index.less +2 -1
- package/dist/Modal/style/index.less +2 -0
- package/dist/Modal/style/polyfill/animate.less +244 -0
- package/dist/Modal/style/polyfill/index.less +60 -0
- package/package.json +1 -1
package/dist/AldTable/helper.js
CHANGED
|
@@ -11,20 +11,29 @@ export function getTableColumns(_ref) {
|
|
|
11
11
|
totalWidth = _ref.totalWidth;
|
|
12
12
|
var columnWidths = getColumnWidths(columns, columnSizing, totalWidth);
|
|
13
13
|
return _.map(columns, function (col, index) {
|
|
14
|
+
var title = col.title,
|
|
15
|
+
_col$dataIndex = col.dataIndex,
|
|
16
|
+
dataIndex = _col$dataIndex === void 0 ? "column-".concat(index) : _col$dataIndex,
|
|
17
|
+
_col$align = col.align,
|
|
18
|
+
align = _col$align === void 0 ? 'left' : _col$align,
|
|
19
|
+
_col$ellipsis = col.ellipsis,
|
|
20
|
+
ellipsis = _col$ellipsis === void 0 ? true : _col$ellipsis,
|
|
21
|
+
render = col.render;
|
|
14
22
|
return {
|
|
15
|
-
id
|
|
23
|
+
// 这里还需要排除掉空字符串的情况,id 不能为 ''
|
|
24
|
+
id: dataIndex || "column-".concat(index),
|
|
16
25
|
accessor: col.dataIndex,
|
|
17
|
-
Header: typeof
|
|
18
|
-
key:
|
|
19
|
-
className: classnames(prefixCls('th-default'), prefixCls("align-".concat(
|
|
20
|
-
},
|
|
26
|
+
Header: typeof title === 'string' ? /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
key: dataIndex,
|
|
28
|
+
className: classnames(prefixCls('th-default'), prefixCls("align-".concat(align)), _defineProperty({}, prefixCls('td-ellipsis-content'), ellipsis))
|
|
29
|
+
}, title) : title,
|
|
21
30
|
Cell: function Cell(_ref2) {
|
|
22
31
|
var row = _ref2.row;
|
|
23
|
-
var colValue = _.get(row.original,
|
|
24
|
-
var node =
|
|
32
|
+
var colValue = _.get(row.original, dataIndex || '');
|
|
33
|
+
var node = render ? render(colValue, row.original, row.index) : colValue;
|
|
25
34
|
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
-
className: classnames(prefixCls('td-default'), prefixCls("align-".concat(
|
|
27
|
-
},
|
|
35
|
+
className: classnames(prefixCls('td-default'), prefixCls("align-".concat(align)))
|
|
36
|
+
}, ellipsis ? /*#__PURE__*/React.createElement("div", {
|
|
28
37
|
className: prefixCls('td-ellipsis-content')
|
|
29
38
|
}, node) : node);
|
|
30
39
|
},
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
export default function Mask(_ref) {
|
|
3
|
+
var onMouseMove = _ref.onMouseMove,
|
|
4
|
+
onMouseUp = _ref.onMouseUp;
|
|
5
|
+
useEffect(function () {
|
|
6
|
+
var onMouseMoveEvent = function onMouseMoveEvent(event) {
|
|
7
|
+
onMouseMove(event);
|
|
8
|
+
};
|
|
9
|
+
var onMouseUpEvent = function onMouseUpEvent(event) {
|
|
10
|
+
onMouseUp(event);
|
|
11
|
+
};
|
|
12
|
+
document.addEventListener('mousemove', onMouseMoveEvent);
|
|
13
|
+
document.addEventListener('mouseup', onMouseUpEvent);
|
|
14
|
+
return function () {
|
|
15
|
+
document.removeEventListener('mousemove', onMouseMoveEvent);
|
|
16
|
+
document.removeEventListener('mouseup', onMouseUpEvent);
|
|
17
|
+
};
|
|
18
|
+
}, [onMouseMove, onMouseUp]);
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
style: {
|
|
21
|
+
position: 'fixed',
|
|
22
|
+
left: 0,
|
|
23
|
+
top: 0,
|
|
24
|
+
zIndex: 1000,
|
|
25
|
+
width: '100vw',
|
|
26
|
+
height: '100vh'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -12,6 +12,7 @@ import classNames from 'classnames';
|
|
|
12
12
|
import React, { memo, useCallback, useRef, useState } from 'react';
|
|
13
13
|
import { createPortal, flushSync } from 'react-dom';
|
|
14
14
|
import { COLUMN_MIN_WIDTH } from "../../constant";
|
|
15
|
+
import Mask from "./Mask";
|
|
15
16
|
function DragBar(props) {
|
|
16
17
|
var wrapWidth = props.wrapWidth,
|
|
17
18
|
columnId = props.columnId,
|
|
@@ -54,7 +55,7 @@ function DragBar(props) {
|
|
|
54
55
|
right: dragBarLeft
|
|
55
56
|
},
|
|
56
57
|
className: classNames('ald-data-preview-header-drag-bar', _defineProperty({}, 'ald-data-preview-header-drag-bar-active', show))
|
|
57
|
-
}, show ? /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(
|
|
58
|
+
}, show ? /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(Mask, {
|
|
58
59
|
onMouseMove: function onMouseMove(event) {
|
|
59
60
|
var mouseDownState = mouseDownRef.current;
|
|
60
61
|
if (mouseDownState.down === false) return;
|
|
@@ -69,14 +70,6 @@ function DragBar(props) {
|
|
|
69
70
|
var currentClientX = event.clientX;
|
|
70
71
|
onChange(columnId, wrapWidth - getBarLeft(currentClientX));
|
|
71
72
|
setDragBarLeft(0);
|
|
72
|
-
},
|
|
73
|
-
style: {
|
|
74
|
-
position: 'fixed',
|
|
75
|
-
left: 0,
|
|
76
|
-
top: 0,
|
|
77
|
-
zIndex: 1000,
|
|
78
|
-
width: '100vw',
|
|
79
|
-
height: '100vh'
|
|
80
73
|
}
|
|
81
74
|
}), document.body) : null);
|
|
82
75
|
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
.ant-modal-root .ant-fade-enter,
|
|
2
|
+
.ant-modal-root .ant-fade-appear {
|
|
3
|
+
animation-duration: 0.2s;
|
|
4
|
+
animation-fill-mode: both;
|
|
5
|
+
animation-play-state: paused;
|
|
6
|
+
opacity: 0;
|
|
7
|
+
animation-timing-function: linear;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ant-modal-root .ant-fade-leave {
|
|
11
|
+
animation-duration: 0.2s;
|
|
12
|
+
animation-fill-mode: both;
|
|
13
|
+
animation-play-state: paused;
|
|
14
|
+
animation-timing-function: linear;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ant-modal-root .ant-fade-enter.ant-fade-enter-active,
|
|
18
|
+
.ant-modal-root .ant-fade-appear.ant-fade-appear-active {
|
|
19
|
+
animation-name: ald-fade-in;
|
|
20
|
+
animation-play-state: running;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ant-modal-root .ant-fade-leave.ant-fade-leave-active {
|
|
24
|
+
animation-name: ald-fade-out;
|
|
25
|
+
animation-play-state: running;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ant-zoom-enter,
|
|
30
|
+
.ant-zoom-appear {
|
|
31
|
+
animation-duration: 0.2s;
|
|
32
|
+
animation-fill-mode: both;
|
|
33
|
+
animation-play-state: paused;
|
|
34
|
+
transform: scale(0);
|
|
35
|
+
opacity: 0;
|
|
36
|
+
animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ant-zoom-leave {
|
|
40
|
+
animation-duration: 0.2s;
|
|
41
|
+
animation-fill-mode: both;
|
|
42
|
+
animation-play-state: paused;
|
|
43
|
+
animation-timing-function: cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ant-zoom-enter.ant-zoom-enter-active,
|
|
47
|
+
.ant-zoom-appear.ant-zoom-appear-active {
|
|
48
|
+
animation-name: ald-zoom-in;
|
|
49
|
+
animation-play-state: running;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ant-zoom-leave.ant-zoom-leave-active {
|
|
53
|
+
animation-name: ald-zoom-out;
|
|
54
|
+
animation-play-state: running;
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ant-zoom-enter-prepare,
|
|
59
|
+
.ant-zoom-appear-prepare {
|
|
60
|
+
transform: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@keyframes ald-fade-in {
|
|
64
|
+
0% {
|
|
65
|
+
opacity: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
100% {
|
|
69
|
+
opacity: 1;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* fadeOut */
|
|
74
|
+
@keyframes ald-fade-out {
|
|
75
|
+
0% {
|
|
76
|
+
opacity: 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
100% {
|
|
80
|
+
opacity: 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@keyframes ald-zoom-in {
|
|
85
|
+
0% {
|
|
86
|
+
transform: scale(0.2);
|
|
87
|
+
opacity: 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
100% {
|
|
91
|
+
transform: 'scale(1)';
|
|
92
|
+
opacity: 1;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* ald-zoom-out */
|
|
97
|
+
@keyframes ald-zoom-out {
|
|
98
|
+
0% {
|
|
99
|
+
transform: scale(1);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
100% {
|
|
103
|
+
transform: scale(0.2);
|
|
104
|
+
opacity: 0;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// 以下内容暂时用不到,先注释掉
|
|
109
|
+
// /* zoom-big-in */
|
|
110
|
+
// @keyframes ald-zoom-big-in {
|
|
111
|
+
// 0% {
|
|
112
|
+
// transform: scale(0.8);
|
|
113
|
+
// opacity: 0;
|
|
114
|
+
// }
|
|
115
|
+
|
|
116
|
+
// 100% {
|
|
117
|
+
// transform: scale(1);
|
|
118
|
+
// opacity: 1;
|
|
119
|
+
// }
|
|
120
|
+
// }
|
|
121
|
+
|
|
122
|
+
// /* zoom-big-out */
|
|
123
|
+
// @keyframes ald-zoom-big-out {
|
|
124
|
+
// 0% {
|
|
125
|
+
// transform: scale(1);
|
|
126
|
+
// }
|
|
127
|
+
|
|
128
|
+
// 100% {
|
|
129
|
+
// transform: scale(0.8);
|
|
130
|
+
// opacity: 0;
|
|
131
|
+
// }
|
|
132
|
+
// }
|
|
133
|
+
|
|
134
|
+
// /* zoom-up-in */
|
|
135
|
+
// @keyframes ald-zoom-up-in {
|
|
136
|
+
// 0% {
|
|
137
|
+
// transform: scale(0.8);
|
|
138
|
+
// transform-origin: 50% 0%;
|
|
139
|
+
// opacity: 0;
|
|
140
|
+
// }
|
|
141
|
+
|
|
142
|
+
// 100% {
|
|
143
|
+
// transform: scale(1);
|
|
144
|
+
// transform-origin: 50% 0%;
|
|
145
|
+
// }
|
|
146
|
+
// }
|
|
147
|
+
|
|
148
|
+
// /* zoom-up-out */
|
|
149
|
+
// @keyframes ald-zoom-up-out {
|
|
150
|
+
// 0% {
|
|
151
|
+
// transform: scale(1);
|
|
152
|
+
// transform-origin: 50% 0%;
|
|
153
|
+
// }
|
|
154
|
+
|
|
155
|
+
// 100% {
|
|
156
|
+
// transform: scale(0.8);
|
|
157
|
+
// transform-origin: 50% 0%;
|
|
158
|
+
// opacity: 0;
|
|
159
|
+
// }
|
|
160
|
+
// }
|
|
161
|
+
|
|
162
|
+
// /* zoom-left-in */
|
|
163
|
+
// @keyframes ald-zoom-left-in {
|
|
164
|
+
// 0% {
|
|
165
|
+
// transform: scale(0.8);
|
|
166
|
+
// transform-origin: 0% 50%;
|
|
167
|
+
// opacity: 0;
|
|
168
|
+
// }
|
|
169
|
+
|
|
170
|
+
// 100% {
|
|
171
|
+
// transform: scale(1);
|
|
172
|
+
// transform-origin: 0% 50%;
|
|
173
|
+
// }
|
|
174
|
+
// }
|
|
175
|
+
|
|
176
|
+
// /* zoom-left-out */
|
|
177
|
+
// @keyframes ald-zoom-left-out {
|
|
178
|
+
// 0% {
|
|
179
|
+
// transform: scale(1);
|
|
180
|
+
// transform-origin: 0% 50%;
|
|
181
|
+
// }
|
|
182
|
+
|
|
183
|
+
// 100% {
|
|
184
|
+
// transform: scale(0.8);
|
|
185
|
+
// transform-origin: 0% 50%;
|
|
186
|
+
// opacity: 0;
|
|
187
|
+
// }
|
|
188
|
+
// }
|
|
189
|
+
|
|
190
|
+
// /* zoom-right-in */
|
|
191
|
+
// @keyframes ald-zoom-right-in {
|
|
192
|
+
// 0% {
|
|
193
|
+
// transform: scale(0.8);
|
|
194
|
+
// transform-origin: 100% 50%;
|
|
195
|
+
// opacity: 0;
|
|
196
|
+
// }
|
|
197
|
+
|
|
198
|
+
// 100% {
|
|
199
|
+
// transform: scale(1);
|
|
200
|
+
// transform-origin: 100% 50%;
|
|
201
|
+
// }
|
|
202
|
+
// }
|
|
203
|
+
|
|
204
|
+
// /* zoom-right-out */
|
|
205
|
+
// @keyframes ald-zoom-right-out {
|
|
206
|
+
// 0% {
|
|
207
|
+
// transform: scale(1);
|
|
208
|
+
// transform-origin: 100% 50%;
|
|
209
|
+
// }
|
|
210
|
+
|
|
211
|
+
// 100% {
|
|
212
|
+
// transform: scale(0.8);
|
|
213
|
+
// transform-origin: 100% 50%;
|
|
214
|
+
// opacity: 0;
|
|
215
|
+
// }
|
|
216
|
+
// }
|
|
217
|
+
|
|
218
|
+
// /* zoom-down-in */
|
|
219
|
+
// @keyframes ald-zoom-down-in {
|
|
220
|
+
// 0% {
|
|
221
|
+
// transform: scale(0.8);
|
|
222
|
+
// transform-origin: 50% 100%;
|
|
223
|
+
// opacity: 0;
|
|
224
|
+
// }
|
|
225
|
+
|
|
226
|
+
// 100% {
|
|
227
|
+
// transform: scale(1);
|
|
228
|
+
// transform-origin: 50% 100%;
|
|
229
|
+
// }
|
|
230
|
+
// }
|
|
231
|
+
|
|
232
|
+
// /* zoom-down-out */
|
|
233
|
+
// @keyframes ald-zoom-down-out {
|
|
234
|
+
// 0% {
|
|
235
|
+
// transform: scale(1);
|
|
236
|
+
// transform-origin: 50% 100%;
|
|
237
|
+
// }
|
|
238
|
+
|
|
239
|
+
// 100% {
|
|
240
|
+
// transform: scale(0.8);
|
|
241
|
+
// transform-origin: 50% 100%;
|
|
242
|
+
// opacity: 0;
|
|
243
|
+
// }
|
|
244
|
+
// }
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@import './animate.less';
|
|
2
|
+
|
|
3
|
+
// 在Modal.confirm() 这样调用的时候,无法解决Modal样式降级的问题,这种情况下,不支持:where的浏览器会缺少样式,下面是补充
|
|
4
|
+
.ant-modal-mask {
|
|
5
|
+
position: fixed;
|
|
6
|
+
top: 0;
|
|
7
|
+
inset-inline-end: 0;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
inset-inline-start: 0;
|
|
10
|
+
z-index: 1000;
|
|
11
|
+
height: 100%;
|
|
12
|
+
background-color: rgba(0, 0, 0, 0.45);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ant-modal-wrap {
|
|
16
|
+
position: fixed;
|
|
17
|
+
inset: 0;
|
|
18
|
+
top: 0;
|
|
19
|
+
inset-inline-end: 0;
|
|
20
|
+
bottom: 0;
|
|
21
|
+
inset-inline-start: 0;
|
|
22
|
+
overflow: auto;
|
|
23
|
+
outline: 0;
|
|
24
|
+
z-index: 1000;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ant-modal.ald-modal {
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
margin: 0 auto;
|
|
30
|
+
padding: 0;
|
|
31
|
+
color: rgba(0, 0, 0, 0.88);
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
line-height: 1.5714;
|
|
34
|
+
list-style: none;
|
|
35
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
36
|
+
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
|
|
37
|
+
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
position: relative;
|
|
40
|
+
top: 100px;
|
|
41
|
+
width: auto;
|
|
42
|
+
max-width: calc(100vw - 32px);
|
|
43
|
+
padding-bottom: 24px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ant-modal-content {
|
|
47
|
+
position: relative;
|
|
48
|
+
background-color: #fff;
|
|
49
|
+
background-clip: padding-box;
|
|
50
|
+
pointer-events: auto;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ant-modal-confirm-btns {
|
|
54
|
+
text-align: end;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ant-modal-confirm .ant-modal-confirm-btns .ant-btn + .ant-btn {
|
|
58
|
+
margin-bottom: 0;
|
|
59
|
+
margin-inline-start: 8px;
|
|
60
|
+
}
|