@teamix/pro 1.2.32 → 1.3.0
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/pro.css +1 -1
- package/dist/pro.js +16443 -17407
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/dialog-form.js +58 -9
- package/es/form/Filter/AdvancedFilter.js +4 -4
- package/es/form/Filter/LightFilter.js +22 -15
- package/es/form/Filter/index.d.ts +5 -9
- package/es/form/Filter/index.js +463 -152
- package/es/form/Filter/index.scss +33 -11
- package/es/form/Filter/index2.d.ts +9 -5
- package/es/form/Filter/index2.js +154 -370
- package/es/form/Filter/index2.scss +11 -33
- package/es/form/Filter/useSpecialProps.d.ts +1 -1
- package/es/form/Filter/useSpecialProps.js +9 -9
- package/es/form/ProForm/index.js +4 -4
- package/es/form/ProForm/index.scss +13 -8
- package/es/form/SchemaForm/index.js +5 -5
- package/es/form/SchemaForm/initializeDataSource.d.ts +1 -1
- package/es/form/SchemaForm/initializeDataSource.js +2 -2
- package/es/form/SchemaForm/initializeRequest.d.ts +1 -1
- package/es/form/SchemaForm/initializeRequest.js +40 -5
- package/es/form/SchemaForm/reactions.d.ts +2 -2
- package/es/form/SchemaForm/reactions.js +39 -21
- package/es/form/index.d.ts +3 -3
- package/es/form/index.js +3 -3
- package/es/form/typing.d.ts +11 -2
- package/es/index.d.ts +4 -4
- package/es/index.js +4 -4
- package/es/info/components/ProInfoItem/index.js +2 -1
- package/es/info/components/ProInfoItem/index.scss +4 -0
- package/es/nocode/configurators/PageHeader.js +2 -2
- package/es/page-header/index.js +3 -3
- package/es/table/components/Layout/index.js +29 -23
- package/es/table/components/Layout/index.scss +7 -0
- package/es/table/components/Pagination/index.js +11 -1
- package/es/table/components/ToolBar/Fullscreen.js +32 -4
- package/es/table/components/ToolBar/index.scss +1 -0
- package/es/table/index.js +50 -31
- package/es/table/typing.d.ts +3 -0
- package/es/table/utils/columnRender.js +1 -1
- package/es/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/es/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.js +59 -72
- package/es/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.scss +34 -86
- package/es/timeline/index.d.ts +10 -0
- package/es/{step → timeline}/index.js +33 -57
- package/es/timeline/index.scss +7 -0
- package/es/timeline/typing.d.ts +101 -0
- package/es/{step → timeline}/typing.js +0 -0
- package/lib/actions/dialog-form.js +57 -10
- package/lib/form/Filter/AdvancedFilter.js +4 -4
- package/lib/form/Filter/LightFilter.js +21 -15
- package/lib/form/Filter/index.d.ts +5 -9
- package/lib/form/Filter/index.js +478 -154
- package/lib/form/Filter/index.scss +33 -11
- package/lib/form/Filter/index2.d.ts +9 -5
- package/lib/form/Filter/index2.js +154 -383
- package/lib/form/Filter/index2.scss +11 -33
- package/lib/form/Filter/useSpecialProps.d.ts +1 -1
- package/lib/form/Filter/useSpecialProps.js +8 -8
- package/lib/form/ProForm/index.js +4 -4
- package/lib/form/ProForm/index.scss +13 -8
- package/lib/form/SchemaForm/index.js +5 -5
- package/lib/form/SchemaForm/initializeDataSource.d.ts +1 -1
- package/lib/form/SchemaForm/initializeDataSource.js +2 -2
- package/lib/form/SchemaForm/initializeRequest.d.ts +1 -1
- package/lib/form/SchemaForm/initializeRequest.js +40 -5
- package/lib/form/SchemaForm/reactions.d.ts +2 -2
- package/lib/form/SchemaForm/reactions.js +38 -20
- package/lib/form/index.d.ts +3 -3
- package/lib/form/index.js +8 -8
- package/lib/form/typing.d.ts +11 -2
- package/lib/index.d.ts +4 -4
- package/lib/index.js +10 -10
- package/lib/info/components/ProInfoItem/index.js +2 -1
- package/lib/info/components/ProInfoItem/index.scss +4 -0
- package/lib/nocode/configurators/PageHeader.js +2 -2
- package/lib/page-header/index.js +2 -2
- package/lib/table/components/Layout/index.js +29 -23
- package/lib/table/components/Layout/index.scss +7 -0
- package/lib/table/components/Pagination/index.js +10 -0
- package/lib/table/components/ToolBar/Fullscreen.js +30 -3
- package/lib/table/components/ToolBar/index.scss +1 -0
- package/lib/table/index.js +50 -31
- package/lib/table/typing.d.ts +3 -0
- package/lib/table/utils/columnRender.js +1 -1
- package/lib/timeline/ProTimeLineItem/index.d.ts +5 -0
- package/lib/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.js +58 -72
- package/lib/{step/ProStepItem/components/VerStepItem → timeline/ProTimeLineItem}/index.scss +34 -86
- package/lib/timeline/index.d.ts +10 -0
- package/lib/{step → timeline}/index.js +38 -58
- package/lib/timeline/index.scss +7 -0
- package/lib/timeline/typing.d.ts +101 -0
- package/lib/{step → timeline}/typing.js +0 -0
- package/package.json +1 -1
- package/dist/212.js +0 -155705
- package/dist/fonts/codicon.ttf +0 -0
- package/es/step/ProStepItem/components/HozStepItem/index.d.ts +0 -5
- package/es/step/ProStepItem/components/HozStepItem/index.js +0 -235
- package/es/step/ProStepItem/components/HozStepItem/index.scss +0 -279
- package/es/step/ProStepItem/components/VerStepItem/index.d.ts +0 -5
- package/es/step/ProStepItem/index.d.ts +0 -4
- package/es/step/ProStepItem/index.js +0 -57
- package/es/step/index.d.ts +0 -9
- package/es/step/typing.d.ts +0 -96
- package/lib/step/ProStepItem/components/HozStepItem/index.d.ts +0 -5
- package/lib/step/ProStepItem/components/HozStepItem/index.js +0 -258
- package/lib/step/ProStepItem/components/HozStepItem/index.scss +0 -279
- package/lib/step/ProStepItem/components/VerStepItem/index.d.ts +0 -5
- package/lib/step/ProStepItem/index.d.ts +0 -4
- package/lib/step/ProStepItem/index.js +0 -69
- package/lib/step/index.d.ts +0 -9
- package/lib/step/typing.d.ts +0 -96
@@ -1,4 +1,8 @@
|
|
1
|
-
.
|
1
|
+
.theme-hybridcloud-dark {
|
2
|
+
--wait-bg-color: #4d4d4d;
|
3
|
+
}
|
4
|
+
|
5
|
+
.teamix-pro-timeline {
|
2
6
|
/** 修改了一些基础组件样式*/
|
3
7
|
.next-timeline-item-has-left-content > .next-timeline-item-left-content p {
|
4
8
|
font-family: var(--font-size-body-1, 12px);
|
@@ -23,6 +27,9 @@
|
|
23
27
|
margin-left: var(--s-26);
|
24
28
|
}
|
25
29
|
|
30
|
+
/**
|
31
|
+
* title 区域样式
|
32
|
+
*/
|
26
33
|
&-wrapper {
|
27
34
|
overflow: hidden;
|
28
35
|
&-dot {
|
@@ -91,25 +98,12 @@
|
|
91
98
|
justify-content: left;
|
92
99
|
align-items: center;
|
93
100
|
height: var(--s-7);
|
101
|
+
margin-bottom: -4px;
|
94
102
|
|
95
103
|
&-title-info {
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
}
|
100
|
-
|
101
|
-
&-small {
|
102
|
-
font-size: var(--font-size-body-1, 12px);
|
103
|
-
color: var(--color-text1-3, #333333);
|
104
|
-
}
|
105
|
-
|
106
|
-
&-active {
|
107
|
-
font-weight: 500;
|
108
|
-
color: var(--color-text1-4, #1a1a1a);
|
109
|
-
}
|
110
|
-
&-disabled {
|
111
|
-
color: var(--color-text1-1, #ccc);
|
112
|
-
}
|
104
|
+
font-weight: 500;
|
105
|
+
font-size: var(--font-size-body-2, 14px);
|
106
|
+
color: var(--color-text1-3, #333333);
|
113
107
|
}
|
114
108
|
|
115
109
|
&-tag-info {
|
@@ -125,11 +119,10 @@
|
|
125
119
|
&-discribe-info {
|
126
120
|
font-family: var(--font-size-body-1, 12px);
|
127
121
|
color: var(--color-text1-2, #5a5a5a);
|
128
|
-
margin-
|
122
|
+
margin-bottom: var(--s-1);
|
129
123
|
}
|
130
124
|
|
131
125
|
&-content-info {
|
132
|
-
margin-top: var(--s-2);
|
133
126
|
&-close {
|
134
127
|
display: none;
|
135
128
|
}
|
@@ -139,10 +132,10 @@
|
|
139
132
|
}
|
140
133
|
}
|
141
134
|
}
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
&-
|
135
|
+
/**
|
136
|
+
* 节点样式
|
137
|
+
*/
|
138
|
+
&-item {
|
146
139
|
display: flex;
|
147
140
|
justify-content: center;
|
148
141
|
align-items: center;
|
@@ -152,63 +145,43 @@
|
|
152
145
|
display: flex;
|
153
146
|
justify-content: center;
|
154
147
|
align-items: center;
|
155
|
-
cursor: pointer;
|
156
|
-
&-disabled {
|
157
|
-
cursor: not-allowed;
|
158
|
-
}
|
159
148
|
|
160
149
|
&-dot {
|
161
150
|
width: var(--s-2);
|
162
151
|
height: var(--s-2);
|
163
152
|
border-radius: 50%;
|
164
153
|
|
165
|
-
&-disabled {
|
166
|
-
background-color: transparent;
|
167
|
-
background: transparent;
|
168
|
-
color: var(--color-line1-3, #ccc);
|
169
|
-
border: 1px solid var(--color-line1-3, #ccc);
|
170
|
-
}
|
171
|
-
|
172
154
|
&-process {
|
173
|
-
background: var(--color-notice-
|
174
|
-
background-color: var(--color-notice-5, #0064c8);
|
155
|
+
background: var(--color-notice-4, #2a7dd1);
|
175
156
|
}
|
176
157
|
&-success {
|
177
|
-
background: var(--color-
|
178
|
-
background-color: var(--color-notice-7, #589ad8);
|
158
|
+
background: var(--color-success-4, #43bf7d);
|
179
159
|
}
|
180
160
|
&-error {
|
181
|
-
background: var(--color-error-
|
182
|
-
background-color: var(--color-error-5, #e84738);
|
161
|
+
background: var(--color-error-4, #ed675a);
|
183
162
|
}
|
184
163
|
&-warning {
|
185
|
-
background: var(--color-warning-
|
186
|
-
background-color: var(--color-warning-5, #f98e1a);
|
164
|
+
background: var(--color-warning-4, #ffa544);
|
187
165
|
}
|
188
166
|
&-wait {
|
189
|
-
background: var(--color-line1-
|
190
|
-
background-color: var(--color-line1-3, #ccc);
|
167
|
+
background: var(--wait-bg-color, var(--color-line1-5));
|
191
168
|
}
|
192
169
|
}
|
193
170
|
&-icon {
|
194
|
-
&-disabled {
|
195
|
-
color: var(--color-line1-3, #ccc);
|
196
|
-
}
|
197
|
-
|
198
171
|
&-process {
|
199
|
-
color: var(--color-notice-
|
172
|
+
color: var(--color-notice-4, #2a7dd1);
|
200
173
|
}
|
201
174
|
&-success {
|
202
|
-
color: var(--color-
|
175
|
+
color: var(--color-success-4, #43bf7d);
|
203
176
|
}
|
204
177
|
&-error {
|
205
|
-
color: var(--color-error-
|
178
|
+
color: var(--color-error-4, #ed675a);
|
206
179
|
}
|
207
180
|
&-warning {
|
208
|
-
color: var(--color-warning-
|
181
|
+
color: var(--color-warning-4, #ffa544);
|
209
182
|
}
|
210
183
|
&-wait {
|
211
|
-
color: var(--color-line1-
|
184
|
+
color: var(--wait-bg-color, var(--color-line1-5));
|
212
185
|
}
|
213
186
|
}
|
214
187
|
|
@@ -219,59 +192,34 @@
|
|
219
192
|
display: flex;
|
220
193
|
justify-content: center;
|
221
194
|
align-items: center;
|
222
|
-
&-disabled {
|
223
|
-
background-color: transparent;
|
224
|
-
background: transparent;
|
225
|
-
color: var(--color-line1-3, #ccc);
|
226
|
-
border: 1px solid var(--color-line1-3, #ccc);
|
227
|
-
}
|
228
195
|
&-process {
|
229
196
|
color: var(--color-white, #fff);
|
230
197
|
background: var(--color-notice-5, #0064c8);
|
231
|
-
background-color: var(--color-notice-5, #0064c8);
|
232
198
|
}
|
233
199
|
&-success {
|
234
|
-
color: var(--color-
|
235
|
-
background: var(--color-
|
236
|
-
background-color: var(--color-brand1-2, #cae3fd);
|
200
|
+
color: var(--color-success-4, #43bf7d);
|
201
|
+
background: var(--color-success-2, #cdf8e1);
|
237
202
|
}
|
238
203
|
&-error {
|
239
204
|
color: var(--color-error-5, #e84738);
|
240
205
|
background: var(--color-error-2, #fcceca);
|
241
|
-
background-color: var(--color-error-2, #fcceca);
|
242
206
|
}
|
243
207
|
&-warning {
|
244
208
|
color: var(--color-warning-5, #f98e1a);
|
245
209
|
background: var(--color-warning-2, #ffe0bf);
|
246
|
-
background-color: var(--color-warning-2, #ffe0bf);
|
247
210
|
}
|
248
211
|
&-wait {
|
249
|
-
color: var(--color
|
212
|
+
color: var(--wait-bg-color, var(--color-line1-5));
|
250
213
|
background: var(--color-fill1-3, #eaeaea);
|
251
|
-
background-color: var(--color-fill1-3, #eaeaea);
|
252
214
|
}
|
253
215
|
}
|
254
|
-
|
255
|
-
&-percent-color {
|
256
|
-
width: var(--s-5);
|
257
|
-
height: var(--s-5);
|
258
|
-
border-radius: 50%;
|
259
|
-
display: flex;
|
260
|
-
justify-content: center;
|
261
|
-
align-items: center;
|
262
|
-
background: transparent;
|
263
|
-
background-color: transparent;
|
264
|
-
color: var(--color-notice-5, #0064c8);
|
265
|
-
font-family: var(--font-size-body-1, 12px);
|
266
|
-
word-break: normal;
|
267
|
-
white-space: nowrap;
|
268
|
-
border: 1px solid var(--color-line1-2, #d9d9d9);
|
269
|
-
}
|
270
216
|
}
|
271
217
|
}
|
272
|
-
}
|
273
218
|
|
274
|
-
|
219
|
+
/**
|
220
|
+
* 左侧时间样式
|
221
|
+
*/
|
222
|
+
|
275
223
|
&-time-left {
|
276
224
|
display: block;
|
277
225
|
margin-top: -2px;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ProTimeLineProps } from './typing';
|
3
|
+
import ProTimeLineItem from './ProTimeLineItem';
|
4
|
+
import './index.scss';
|
5
|
+
interface ProTimelineProperties {
|
6
|
+
/** ProTimeLineItem */
|
7
|
+
Item: typeof ProTimeLineItem;
|
8
|
+
}
|
9
|
+
declare const ProTimeline: React.FC<ProTimeLineProps> & ProTimelineProperties;
|
10
|
+
export { ProTimeline, ProTimeLineItem };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["
|
1
|
+
var _excluded = ["items", "comment", "shape", "fold", "children"];
|
2
2
|
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
4
|
|
@@ -11,91 +11,67 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
11
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
12
12
|
|
13
13
|
import React, { useMemo } from 'react';
|
14
|
-
import {
|
15
|
-
import
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
import { Timeline } from '@alicloudfe/components';
|
15
|
+
import ProTimeLineItem from './ProTimeLineItem';
|
16
|
+
import { baseClass } from '@teamix/utils';
|
17
|
+
import classNames from 'classnames';
|
18
|
+
import './index.scss';
|
19
|
+
var cls = baseClass('teamix-pro-timeline');
|
20
|
+
|
21
|
+
var ProTimeline = function ProTimeline(props) {
|
22
|
+
var items = props.items,
|
23
|
+
comment = props.comment,
|
20
24
|
shape = props.shape,
|
25
|
+
fold = props.fold,
|
21
26
|
children = props.children,
|
22
|
-
others = _objectWithoutProperties(props, _excluded);
|
27
|
+
others = _objectWithoutProperties(props, _excluded); // 判断渲染组件是不是 ProTimelineItem, 并返回筛选后的children
|
23
28
|
|
24
|
-
var current = props.current,
|
25
|
-
labelPlacement = props.labelPlacement,
|
26
|
-
readOnly = props.readOnly,
|
27
|
-
animation = props.animation,
|
28
|
-
size = props.size;
|
29
|
-
var fold = props.fold; // 判断渲染组件是不是 ProStepItem, 并返回筛选后的children
|
30
29
|
|
31
30
|
var renderChildren = useMemo(function () {
|
32
|
-
return React.Children.map(children, function (child
|
31
|
+
return React.Children.map(children, function (child) {
|
33
32
|
var childElement = child;
|
34
33
|
var displayName = childElement.type.displayName;
|
35
34
|
|
36
|
-
if (displayName === '
|
35
|
+
if (displayName === 'ProTimeLineItem') {
|
37
36
|
return /*#__PURE__*/React.cloneElement(childElement, {
|
38
|
-
|
39
|
-
|
40
|
-
_index: index,
|
41
|
-
_current: current,
|
42
|
-
_shape: shape
|
37
|
+
_shape: shape,
|
38
|
+
_comment: comment
|
43
39
|
});
|
44
|
-
}
|
40
|
+
}
|
45
41
|
|
46
|
-
|
47
|
-
console.error('Warning: ProStep has a child which is not a ProStepItem component');
|
42
|
+
console.error('Warning: ProTimeline has a child which is not a ProTimelineItem component');
|
48
43
|
});
|
49
|
-
}, [children]);
|
50
|
-
|
51
|
-
var shapeMap = function shapeMap() {
|
52
|
-
if (shape === 'arrow') return 'arrow';
|
53
|
-
return 'circle';
|
54
|
-
}; // 渲染 ProStepItem
|
55
|
-
|
44
|
+
}, [children]);
|
56
45
|
|
57
46
|
var renderItem = function renderItem() {
|
58
47
|
// 传递了 item 采用 item 渲染数组的方式
|
59
48
|
if (items) {
|
60
49
|
return items.map(function (item, index) {
|
61
|
-
return /*#__PURE__*/React.createElement(
|
50
|
+
return /*#__PURE__*/React.createElement(ProTimeLineItem, _objectSpread({
|
62
51
|
key: index,
|
63
|
-
_mode: mode,
|
64
52
|
_shape: shape,
|
65
|
-
|
66
|
-
_current: current,
|
67
|
-
_size: size
|
53
|
+
_comment: comment
|
68
54
|
}, item));
|
69
55
|
});
|
70
56
|
} else {
|
71
57
|
return renderChildren;
|
72
58
|
}
|
73
|
-
}; // 渲染
|
74
|
-
|
59
|
+
}; // 渲染 ProTimelineItem
|
75
60
|
|
76
|
-
var renderProStep = function renderProStep() {
|
77
|
-
if (mode === 'ver') {
|
78
|
-
return /*#__PURE__*/React.createElement(Timeline, _objectSpread({
|
79
|
-
fold: fold
|
80
|
-
}, others), renderItem());
|
81
|
-
}
|
82
61
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
labelPlacement: labelPlacement,
|
87
|
-
readOnly: readOnly,
|
88
|
-
animation: animation
|
62
|
+
var renderProTimeline = function renderProTimeline() {
|
63
|
+
return /*#__PURE__*/React.createElement(Timeline, _objectSpread({
|
64
|
+
fold: fold
|
89
65
|
}, others), renderItem());
|
90
66
|
};
|
91
67
|
|
92
68
|
return /*#__PURE__*/React.createElement("div", {
|
93
|
-
className:
|
94
|
-
|
69
|
+
className: classNames(cls({
|
70
|
+
'': true,
|
71
|
+
comment: comment
|
72
|
+
}))
|
73
|
+
}, renderProTimeline());
|
95
74
|
};
|
96
75
|
|
97
|
-
|
98
|
-
|
99
|
-
mode: 'hoz'
|
100
|
-
};
|
101
|
-
export { ProStep, ProStepItem };
|
76
|
+
ProTimeline.Item = ProTimeLineItem;
|
77
|
+
export { ProTimeline, ProTimeLineItem };
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { ProTagItem } from '@teamix/utils';
|
3
|
+
export declare type ProTimeLineItemStatus = 'success' | 'fail' | 'process' | 'warning' | 'wait';
|
4
|
+
export declare type FoldProps = {
|
5
|
+
/**
|
6
|
+
* 折叠区域
|
7
|
+
*/
|
8
|
+
foldArea: [number, number];
|
9
|
+
/**
|
10
|
+
* 是否展示折叠图标
|
11
|
+
*/
|
12
|
+
foldShow: boolean;
|
13
|
+
};
|
14
|
+
export declare type ProTimeLineProps = {
|
15
|
+
/**
|
16
|
+
* 时间线:节点展示类型
|
17
|
+
*/
|
18
|
+
shape?: 'circle' | 'dot';
|
19
|
+
/**
|
20
|
+
* 内部渲染自组件
|
21
|
+
*/
|
22
|
+
items?: ProTimeLineItemProps[];
|
23
|
+
/**
|
24
|
+
* 时间线: 自定义折叠选项
|
25
|
+
*/
|
26
|
+
fold?: FoldProps[];
|
27
|
+
/**
|
28
|
+
* 是否为评论型 timeline
|
29
|
+
*/
|
30
|
+
comment?: boolean;
|
31
|
+
};
|
32
|
+
export declare type ProTimeLineItemProps = {
|
33
|
+
/**
|
34
|
+
* 是否为评论型 timeline
|
35
|
+
*/
|
36
|
+
_comment?: boolean;
|
37
|
+
/**
|
38
|
+
* 时间线:节点展示类型
|
39
|
+
*/
|
40
|
+
_shape?: 'circle' | 'dot';
|
41
|
+
/**
|
42
|
+
* 节点状态
|
43
|
+
*/
|
44
|
+
status?: string | ProTimeLineItemStatus;
|
45
|
+
/**
|
46
|
+
* 图标
|
47
|
+
*/
|
48
|
+
icon?: string;
|
49
|
+
/**
|
50
|
+
* 节点的内容
|
51
|
+
*/
|
52
|
+
content?: ReactNode;
|
53
|
+
/**
|
54
|
+
* 节点标题
|
55
|
+
*/
|
56
|
+
title?: ReactNode;
|
57
|
+
/**
|
58
|
+
* 自定义渲染
|
59
|
+
*/
|
60
|
+
dotRender?: (index?: number, status?: string) => ReactNode;
|
61
|
+
/**
|
62
|
+
* 节点副标题
|
63
|
+
*/
|
64
|
+
subTitle?: ReactNode;
|
65
|
+
/**
|
66
|
+
* 节点对应描述
|
67
|
+
*/
|
68
|
+
discription?: ReactNode;
|
69
|
+
/**
|
70
|
+
* 节点的标签
|
71
|
+
*/
|
72
|
+
tags?: ProTagItem[] | ReactNode;
|
73
|
+
/**
|
74
|
+
* 左侧展示时间
|
75
|
+
*/
|
76
|
+
timeLeft?: ReactNode;
|
77
|
+
/**
|
78
|
+
* 头像
|
79
|
+
*/
|
80
|
+
image?: string | ReactNode;
|
81
|
+
/**
|
82
|
+
* animation 动画
|
83
|
+
*/
|
84
|
+
animation?: boolean;
|
85
|
+
/**
|
86
|
+
* 卡片是否可折叠
|
87
|
+
*/
|
88
|
+
collapsible?: boolean;
|
89
|
+
/**
|
90
|
+
* 默认是否折叠,用于非受控模式
|
91
|
+
*/
|
92
|
+
defaultCollapsed?: boolean;
|
93
|
+
/**
|
94
|
+
* 是否折叠,受控模式
|
95
|
+
*/
|
96
|
+
collapsed?: boolean;
|
97
|
+
/**
|
98
|
+
* 折叠状态改变的回调函数
|
99
|
+
*/
|
100
|
+
onCollapse?: (collapsed: boolean) => void;
|
101
|
+
};
|
File without changes
|
@@ -1,7 +1,5 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
4
|
-
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
6
4
|
value: true
|
7
5
|
});
|
@@ -25,7 +23,7 @@ var _dialog = _interopRequireDefault(require("./dialog"));
|
|
25
23
|
var _utils2 = require("./utils");
|
26
24
|
|
27
25
|
var _excluded = ["schema"],
|
28
|
-
_excluded2 = ["schema", "useFieldValuesForRequest", "initialValues", "initialRequest", "formProps", "size", "onFinish"];
|
26
|
+
_excluded2 = ["schema", "useFieldValuesForRequest", "initialValues", "initialRequest", "formProps", "size", "onFinish", "beforeRequest"];
|
29
27
|
|
30
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
31
29
|
|
@@ -33,6 +31,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
33
31
|
|
34
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
35
33
|
|
34
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
35
|
+
|
36
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
37
|
+
|
38
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
39
|
+
|
36
40
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
37
41
|
|
38
42
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -157,6 +161,7 @@ function useDialogFormAction(action, context) {
|
|
157
161
|
_action$size = action.size,
|
158
162
|
size = _action$size === void 0 ? 'small' : _action$size,
|
159
163
|
_onFinish = action.onFinish,
|
164
|
+
propsBeforeRequest = action.beforeRequest,
|
160
165
|
others = _objectWithoutProperties(action, _excluded2);
|
161
166
|
|
162
167
|
var formRef = /*#__PURE__*/(0, _react.createRef)();
|
@@ -177,13 +182,55 @@ function useDialogFormAction(action, context) {
|
|
177
182
|
}, dialogFormProps));
|
178
183
|
},
|
179
184
|
extendParams: useFieldValuesForRequest ? '{{fields}}' : undefined,
|
180
|
-
beforeRequest: function beforeRequest() {
|
181
|
-
return new Promise(function (resolve) {
|
182
|
-
formRef.current.validate().then(function () {
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
185
|
+
beforeRequest: function beforeRequest(context) {
|
186
|
+
return new Promise(function (resolve, reject) {
|
187
|
+
formRef.current.validate().then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
188
|
+
var beforeRequestContext, requestContext;
|
189
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
190
|
+
while (1) {
|
191
|
+
switch (_context.prev = _context.next) {
|
192
|
+
case 0:
|
193
|
+
if (!propsBeforeRequest) {
|
194
|
+
_context.next = 13;
|
195
|
+
break;
|
196
|
+
}
|
197
|
+
|
198
|
+
_context.prev = 1;
|
199
|
+
_context.next = 4;
|
200
|
+
return (0, _utils.resolveMaybePromiseMethod)(propsBeforeRequest, context);
|
201
|
+
|
202
|
+
case 4:
|
203
|
+
beforeRequestContext = _context.sent;
|
204
|
+
_context.next = 10;
|
205
|
+
break;
|
206
|
+
|
207
|
+
case 7:
|
208
|
+
_context.prev = 7;
|
209
|
+
_context.t0 = _context["catch"](1);
|
210
|
+
beforeRequestContext = false;
|
211
|
+
|
212
|
+
case 10:
|
213
|
+
if (!(beforeRequestContext === false)) {
|
214
|
+
_context.next = 13;
|
215
|
+
break;
|
216
|
+
}
|
217
|
+
|
218
|
+
reject(false);
|
219
|
+
return _context.abrupt("return");
|
220
|
+
|
221
|
+
case 13:
|
222
|
+
requestContext = Object.assign({
|
223
|
+
fields: formRef.current.values
|
224
|
+
}, _typeof(beforeRequestContext) === 'object' ? beforeRequestContext : {});
|
225
|
+
resolve(requestContext);
|
226
|
+
|
227
|
+
case 15:
|
228
|
+
case "end":
|
229
|
+
return _context.stop();
|
230
|
+
}
|
231
|
+
}
|
232
|
+
}, _callee, null, [[1, 7]]);
|
233
|
+
}))).catch(function () {
|
187
234
|
resolve(false);
|
188
235
|
});
|
189
236
|
});
|
@@ -17,7 +17,7 @@ var _ProForm = _interopRequireDefault(require("../ProForm"));
|
|
17
17
|
|
18
18
|
var _utils2 = require("../utils");
|
19
19
|
|
20
|
-
var _excluded = ["schema", "onSubmit", "onReset", "
|
20
|
+
var _excluded = ["schema", "onSubmit", "onReset", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol", "forceClear"];
|
21
21
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
23
23
|
|
@@ -54,12 +54,12 @@ var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
54
54
|
var schema = props.schema,
|
55
55
|
onSubmit = props.onSubmit,
|
56
56
|
onReset = props.onReset,
|
57
|
-
onResetClick = props.onResetClick,
|
58
57
|
layout = props.layout,
|
59
58
|
labelAlign = props.labelAlign,
|
60
59
|
wrapperAlign = props.wrapperAlign,
|
61
60
|
labelCol = props.labelCol,
|
62
61
|
wrapperCol = props.wrapperCol,
|
62
|
+
forceClear = props.forceClear,
|
63
63
|
otherProps = _objectWithoutProperties(props, _excluded);
|
64
64
|
|
65
65
|
var prefixCls = (0, _utils.usePrefixCls)('', {
|
@@ -90,7 +90,7 @@ var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
90
90
|
component: 'Reset',
|
91
91
|
props: {
|
92
92
|
onResetValidateSuccess: onReset,
|
93
|
-
|
93
|
+
forceClear: !!forceClear,
|
94
94
|
children: (0, _utils.getMessage)('reset')
|
95
95
|
}
|
96
96
|
}, {
|
@@ -105,7 +105,7 @@ var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
105
105
|
}]
|
106
106
|
}])
|
107
107
|
}];
|
108
|
-
}, [schema, onReset
|
108
|
+
}, [schema, onReset]);
|
109
109
|
var getTeamixLayout = (0, _react.useMemo)(function () {
|
110
110
|
return {
|
111
111
|
breakpoints: [990],
|