@teamix/pro 1.2.23 → 1.2.28
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/212.js +129 -129
- package/dist/pro.css +1 -1
- package/dist/pro.js +18109 -15665
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/dist/pro.min.js.LICENSE.txt +2 -0
- package/es/actions/dialog.js +4 -3
- package/es/actions/index.d.ts +12 -9
- package/es/actions/index.js +56 -15
- package/es/actions/index.scss +12 -1
- package/es/form/Filter/AdvancedFilter.js +1 -1
- package/es/form/Filter/Layout.d.ts +5 -0
- package/es/form/Filter/Layout.js +82 -0
- package/es/form/Filter/SimpleFilter.js +30 -6
- package/es/form/Filter/index2.d.ts +2 -1
- package/es/form/Filter/index2.js +97 -116
- package/es/form/Filter/index2.scss +16 -45
- package/es/form/Filter/layout.scss +36 -0
- package/es/form/Filter/useSpecialProps.d.ts +6 -0
- package/es/form/Filter/useSpecialProps.js +37 -0
- package/es/form/ProForm/customComponent.d.ts +3 -0
- package/es/form/ProForm/customComponent.js +20 -0
- package/es/form/ProForm/index.scss +5 -6
- package/es/form/ProForm/useFormDisplayValues.js +14 -24
- package/es/form/SchemaForm/adapterType.js +1 -0
- package/es/form/SchemaForm/index.js +8 -6
- 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 +2 -2
- package/es/form/SchemaForm/initializeRules.d.ts +1 -1
- package/es/form/SchemaForm/initializeRules.js +3 -3
- package/es/form/fieldTypeMap.js +2 -1
- package/es/form/index.d.ts +4 -2
- package/es/form/index.js +4 -2
- package/es/form/typing.d.ts +25 -1
- package/es/form/utils.d.ts +2 -2
- package/es/form/utils.js +2 -2
- package/es/index.d.ts +5 -2
- package/es/index.js +6 -3
- package/es/info/index.scss +1 -1
- package/es/nocode/pages/renderer.js +1 -1
- package/es/step/ProStepItem/components/HozStepItem/index.d.ts +5 -0
- package/es/step/ProStepItem/components/HozStepItem/index.js +235 -0
- package/es/step/ProStepItem/components/HozStepItem/index.scss +279 -0
- package/es/step/ProStepItem/components/VerStepItem/index.d.ts +5 -0
- package/es/step/ProStepItem/components/VerStepItem/index.js +295 -0
- package/es/step/ProStepItem/components/VerStepItem/index.scss +287 -0
- package/es/step/ProStepItem/index.d.ts +4 -0
- package/es/step/ProStepItem/index.js +57 -0
- package/es/step/index.d.ts +9 -0
- package/es/step/index.js +101 -0
- package/es/step/typing.d.ts +96 -0
- package/es/step/typing.js +1 -0
- package/es/table/components/Filter/index.js +2 -17
- package/es/table/components/Layout/index.js +63 -167
- package/es/table/components/Layout/index.scss +4 -3
- package/es/table/components/Pagination/index.js +2 -2
- package/es/table/components/Pagination/index.scss +5 -0
- package/es/table/components/ToolBar/FullScreenIcon.js +4 -9
- package/es/table/components/ToolBar/Fullscreen.js +21 -11
- package/es/table/index.js +82 -104
- package/es/table/index.scss +5 -5
- package/es/table/typing.d.ts +16 -10
- package/es/table/utils/columnRender.js +21 -3
- package/es/table/utils/index.d.ts +7 -0
- package/es/table/utils/index.js +36 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +1 -0
- package/lib/actions/dialog.js +4 -3
- package/lib/actions/index.d.ts +12 -9
- package/lib/actions/index.js +56 -15
- package/lib/actions/index.scss +12 -1
- package/lib/form/Filter/AdvancedFilter.js +1 -1
- package/lib/form/Filter/Layout.d.ts +5 -0
- package/lib/form/Filter/Layout.js +102 -0
- package/lib/form/Filter/SimpleFilter.js +29 -4
- package/lib/form/Filter/index2.d.ts +2 -1
- package/lib/form/Filter/index2.js +101 -114
- package/lib/form/Filter/index2.scss +16 -45
- package/lib/form/Filter/layout.scss +36 -0
- package/lib/form/Filter/useSpecialProps.d.ts +6 -0
- package/lib/form/Filter/useSpecialProps.js +46 -0
- package/lib/form/ProForm/customComponent.d.ts +3 -0
- package/lib/form/ProForm/customComponent.js +28 -0
- package/lib/form/ProForm/index.scss +5 -6
- package/lib/form/ProForm/useFormDisplayValues.js +17 -24
- package/lib/form/SchemaForm/adapterType.js +1 -0
- package/lib/form/SchemaForm/index.js +8 -6
- 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 +2 -2
- package/lib/form/SchemaForm/initializeRules.d.ts +1 -1
- package/lib/form/SchemaForm/initializeRules.js +3 -3
- package/lib/form/fieldTypeMap.js +2 -1
- package/lib/form/index.d.ts +4 -2
- package/lib/form/index.js +19 -1
- package/lib/form/typing.d.ts +25 -1
- package/lib/form/utils.d.ts +2 -2
- package/lib/form/utils.js +2 -2
- package/lib/index.d.ts +5 -2
- package/lib/index.js +35 -3
- package/lib/info/index.scss +1 -1
- package/lib/nocode/pages/renderer.js +1 -1
- package/lib/step/ProStepItem/components/HozStepItem/index.d.ts +5 -0
- package/lib/step/ProStepItem/components/HozStepItem/index.js +258 -0
- package/lib/step/ProStepItem/components/HozStepItem/index.scss +279 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.d.ts +5 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.js +315 -0
- package/lib/step/ProStepItem/components/VerStepItem/index.scss +287 -0
- package/lib/step/ProStepItem/index.d.ts +4 -0
- package/lib/step/ProStepItem/index.js +69 -0
- package/lib/step/index.d.ts +9 -0
- package/lib/step/index.js +124 -0
- package/lib/step/typing.d.ts +96 -0
- package/lib/step/typing.js +5 -0
- package/lib/table/components/Filter/index.js +2 -17
- package/lib/table/components/Layout/index.js +61 -167
- package/lib/table/components/Layout/index.scss +4 -3
- package/lib/table/components/Pagination/index.js +2 -2
- package/lib/table/components/Pagination/index.scss +5 -0
- package/lib/table/components/ToolBar/FullScreenIcon.js +4 -9
- package/lib/table/components/ToolBar/Fullscreen.js +22 -11
- package/lib/table/index.js +78 -101
- package/lib/table/index.scss +5 -5
- package/lib/table/typing.d.ts +16 -10
- package/lib/table/utils/columnRender.js +21 -3
- package/lib/table/utils/index.d.ts +7 -0
- package/lib/table/utils/index.js +38 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +13 -0
- package/package.json +4 -4
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
.teamix-pro-step {
|
|
2
|
+
/** 修改了一些基础组件样式*/
|
|
3
|
+
.next-timeline-item-has-left-content > .next-timeline-item-left-content p {
|
|
4
|
+
font-family: var(--font-size-body-1, 12px);
|
|
5
|
+
text-align: right;
|
|
6
|
+
margin-left: -20px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.next-timeline-item-content {
|
|
10
|
+
margin-top: -6px;
|
|
11
|
+
margin-left: var(--s-4);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.next-timeline-item-done .next-timeline-item-content .next-timeline-item-title {
|
|
15
|
+
font-weight: normal;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.next-btn-text.next-btn-primary {
|
|
19
|
+
margin-left: -10px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.next-timeline-item-done.next-timeline-item-has-left-content > .next-timeline-item-content {
|
|
23
|
+
margin-left: var(--s-26);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&-wrapper {
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
&-dot {
|
|
29
|
+
padding: 0 0 0 var(--s-2);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-circle {
|
|
33
|
+
padding: 0 0 0 var(--s-4);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-time-left {
|
|
37
|
+
&-dot {
|
|
38
|
+
padding: 0 0 0 var(--s-1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-circle {
|
|
42
|
+
padding: 0 0 0 var(--s-2);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&-left {
|
|
47
|
+
float: left;
|
|
48
|
+
display: flex;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
align-items: center;
|
|
51
|
+
&-fold-icon {
|
|
52
|
+
width: var(--s-4);
|
|
53
|
+
height: var(--s-7);
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
align-items: center;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
|
|
59
|
+
&-close {
|
|
60
|
+
width: 0;
|
|
61
|
+
height: 0;
|
|
62
|
+
border-left: 4px solid var(--color-text1-5, #a8a8a8);
|
|
63
|
+
border-bottom: 4px solid transparent;
|
|
64
|
+
border-top: 4px solid transparent;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&-open {
|
|
68
|
+
transform: rotate(90deg);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&-fold-image {
|
|
73
|
+
height: var(--s-7);
|
|
74
|
+
width: var(--s-7);
|
|
75
|
+
border-radius: 50%;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
margin-right: var(--s-2);
|
|
78
|
+
|
|
79
|
+
img {
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 100%;
|
|
82
|
+
background-size: cover;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&-right {
|
|
88
|
+
float: left;
|
|
89
|
+
&-top {
|
|
90
|
+
display: flex;
|
|
91
|
+
justify-content: left;
|
|
92
|
+
align-items: center;
|
|
93
|
+
height: var(--s-7);
|
|
94
|
+
|
|
95
|
+
&-title-info {
|
|
96
|
+
&-normal {
|
|
97
|
+
font-size: var(--font-size-body-2, 14px);
|
|
98
|
+
color: var(--color-text1-3, #333333);
|
|
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
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&-tag-info {
|
|
116
|
+
padding-left: var(--s-3);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&-subTitle-info {
|
|
120
|
+
padding-left: var(--s-4);
|
|
121
|
+
font-family: var(--font-size-body-1, 12px);
|
|
122
|
+
color: var(--color-text1-8, #848484);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
&-discribe-info {
|
|
126
|
+
font-family: var(--font-size-body-1, 12px);
|
|
127
|
+
color: var(--color-text1-2, #5a5a5a);
|
|
128
|
+
margin-top: 1px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&-content-info {
|
|
132
|
+
margin-top: var(--s-2);
|
|
133
|
+
&-close {
|
|
134
|
+
display: none;
|
|
135
|
+
}
|
|
136
|
+
&-open {
|
|
137
|
+
display: block;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.teamix-pro-step {
|
|
145
|
+
&-ver-step-item {
|
|
146
|
+
display: flex;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
align-items: center;
|
|
149
|
+
&-render-wrapper {
|
|
150
|
+
width: var(--s-6);
|
|
151
|
+
height: var(--s-6);
|
|
152
|
+
display: flex;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
align-items: center;
|
|
155
|
+
cursor: pointer;
|
|
156
|
+
&-disabled {
|
|
157
|
+
cursor: not-allowed;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&-dot {
|
|
161
|
+
width: var(--s-2);
|
|
162
|
+
height: var(--s-2);
|
|
163
|
+
border-radius: 50%;
|
|
164
|
+
|
|
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
|
+
&-process {
|
|
173
|
+
background: var(--color-notice-5, #0064c8);
|
|
174
|
+
background-color: var(--color-notice-5, #0064c8);
|
|
175
|
+
}
|
|
176
|
+
&-success {
|
|
177
|
+
background: var(--color-notice-7, #589ad8);
|
|
178
|
+
background-color: var(--color-notice-7, #589ad8);
|
|
179
|
+
}
|
|
180
|
+
&-error {
|
|
181
|
+
background: var(--color-error-5, #e84738);
|
|
182
|
+
background-color: var(--color-error-5, #e84738);
|
|
183
|
+
}
|
|
184
|
+
&-warning {
|
|
185
|
+
background: var(--color-warning-5, #f98e1a);
|
|
186
|
+
background-color: var(--color-warning-5, #f98e1a);
|
|
187
|
+
}
|
|
188
|
+
&-wait {
|
|
189
|
+
background: var(--color-line1-3, #ccc);
|
|
190
|
+
background-color: var(--color-line1-3, #ccc);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
&-icon {
|
|
194
|
+
&-disabled {
|
|
195
|
+
color: var(--color-line1-3, #ccc);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
&-process {
|
|
199
|
+
color: var(--color-notice-5, #0064c8);
|
|
200
|
+
}
|
|
201
|
+
&-success {
|
|
202
|
+
color: var(--color-notice-7, #589ad8);
|
|
203
|
+
}
|
|
204
|
+
&-error {
|
|
205
|
+
color: var(--color-error-5, #e84738);
|
|
206
|
+
}
|
|
207
|
+
&-warning {
|
|
208
|
+
color: var(--color-warning-5, #f98e1a);
|
|
209
|
+
}
|
|
210
|
+
&-wait {
|
|
211
|
+
color: var(--color-line1-3, #ccc);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&-circle {
|
|
216
|
+
width: var(--s-5);
|
|
217
|
+
height: var(--s-5);
|
|
218
|
+
border-radius: 50%;
|
|
219
|
+
display: flex;
|
|
220
|
+
justify-content: center;
|
|
221
|
+
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
|
+
&-process {
|
|
229
|
+
color: var(--color-white, #fff);
|
|
230
|
+
background: var(--color-notice-5, #0064c8);
|
|
231
|
+
background-color: var(--color-notice-5, #0064c8);
|
|
232
|
+
}
|
|
233
|
+
&-success {
|
|
234
|
+
color: var(--color-notice-5, #0064c8);
|
|
235
|
+
background: var(--color-brand1-2, #cae3fd);
|
|
236
|
+
background-color: var(--color-brand1-2, #cae3fd);
|
|
237
|
+
}
|
|
238
|
+
&-error {
|
|
239
|
+
color: var(--color-error-5, #e84738);
|
|
240
|
+
background: var(--color-error-2, #fcceca);
|
|
241
|
+
background-color: var(--color-error-2, #fcceca);
|
|
242
|
+
}
|
|
243
|
+
&-warning {
|
|
244
|
+
color: var(--color-warning-5, #f98e1a);
|
|
245
|
+
background: var(--color-warning-2, #ffe0bf);
|
|
246
|
+
background-color: var(--color-warning-2, #ffe0bf);
|
|
247
|
+
}
|
|
248
|
+
&-wait {
|
|
249
|
+
color: var(--color-black, #000);
|
|
250
|
+
background: var(--color-fill1-3, #eaeaea);
|
|
251
|
+
background-color: var(--color-fill1-3, #eaeaea);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
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
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.teamix-pro-step {
|
|
275
|
+
&-time-left {
|
|
276
|
+
display: block;
|
|
277
|
+
margin-top: -2px;
|
|
278
|
+
&-dot {
|
|
279
|
+
width: var(--s-27);
|
|
280
|
+
padding-right: var(--s-2);
|
|
281
|
+
}
|
|
282
|
+
&-circle {
|
|
283
|
+
width: var(--s-31);
|
|
284
|
+
margin-left: -30px;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var _excluded = ["_mode", "subTitle", "tags", "discription", "timeLeft", "image", "animation", "collapsed", "collapsible", "defaultCollapsed", "onCollapse"];
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
|
|
7
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
|
|
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
|
+
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import VerStepItem from './components/VerStepItem';
|
|
15
|
+
import HozStepItem from './components/HozStepItem';
|
|
16
|
+
|
|
17
|
+
var ProStepItem = function ProStepItem(props) {
|
|
18
|
+
var _mode = props._mode,
|
|
19
|
+
subTitle = props.subTitle,
|
|
20
|
+
tags = props.tags,
|
|
21
|
+
discription = props.discription,
|
|
22
|
+
timeLeft = props.timeLeft,
|
|
23
|
+
image = props.image,
|
|
24
|
+
animation = props.animation,
|
|
25
|
+
collapsed = props.collapsed,
|
|
26
|
+
collapsible = props.collapsible,
|
|
27
|
+
defaultCollapsed = props.defaultCollapsed,
|
|
28
|
+
onCollapse = props.onCollapse,
|
|
29
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
30
|
+
|
|
31
|
+
var renderProStepItem = function renderProStepItem() {
|
|
32
|
+
if (_mode === 'ver') {
|
|
33
|
+
return /*#__PURE__*/React.createElement(VerStepItem, _objectSpread({
|
|
34
|
+
subTitle: subTitle,
|
|
35
|
+
discription: discription,
|
|
36
|
+
tags: tags,
|
|
37
|
+
image: image,
|
|
38
|
+
timeLeft: timeLeft,
|
|
39
|
+
animation: animation,
|
|
40
|
+
collapsed: collapsed,
|
|
41
|
+
collapsible: collapsible,
|
|
42
|
+
defaultCollapsed: defaultCollapsed,
|
|
43
|
+
onCollapse: onCollapse
|
|
44
|
+
}, others));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return /*#__PURE__*/React.createElement(HozStepItem, _objectSpread({}, others));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return renderProStepItem();
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
ProStepItem.displayName = 'ProStepItem';
|
|
54
|
+
ProStepItem.defaultProps = {
|
|
55
|
+
_mode: 'hoz'
|
|
56
|
+
};
|
|
57
|
+
export default ProStepItem;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProStepProps } from './typing';
|
|
3
|
+
import ProStepItem from './ProStepItem';
|
|
4
|
+
interface ProStepProperties {
|
|
5
|
+
/** ProStepItem */
|
|
6
|
+
Item: typeof ProStepItem;
|
|
7
|
+
}
|
|
8
|
+
declare const ProStep: React.FC<ProStepProps> & ProStepProperties;
|
|
9
|
+
export { ProStep, ProStepItem };
|
package/es/step/index.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
var _excluded = ["mode", "items", "shape", "children"];
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
|
|
7
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
|
|
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
|
+
|
|
13
|
+
import React, { useMemo } from 'react';
|
|
14
|
+
import { Step, Timeline } from '@alicloudfe/components';
|
|
15
|
+
import ProStepItem from './ProStepItem';
|
|
16
|
+
|
|
17
|
+
var ProStep = function ProStep(props) {
|
|
18
|
+
var mode = props.mode,
|
|
19
|
+
items = props.items,
|
|
20
|
+
shape = props.shape,
|
|
21
|
+
children = props.children,
|
|
22
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
23
|
+
|
|
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
|
+
|
|
31
|
+
var renderChildren = useMemo(function () {
|
|
32
|
+
return React.Children.map(children, function (child, index) {
|
|
33
|
+
var childElement = child;
|
|
34
|
+
var displayName = childElement.type.displayName;
|
|
35
|
+
|
|
36
|
+
if (displayName === 'ProStepItem') {
|
|
37
|
+
return /*#__PURE__*/React.cloneElement(childElement, {
|
|
38
|
+
_size: size,
|
|
39
|
+
_mode: mode,
|
|
40
|
+
_index: index,
|
|
41
|
+
_current: current,
|
|
42
|
+
_shape: shape
|
|
43
|
+
});
|
|
44
|
+
} // 如果不是 ProStepItem
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
console.error('Warning: ProStep has a child which is not a ProStepItem component');
|
|
48
|
+
});
|
|
49
|
+
}, [children]); // 设置circle, 覆盖 dot 阻止重新渲染节点样式
|
|
50
|
+
|
|
51
|
+
var shapeMap = function shapeMap() {
|
|
52
|
+
if (shape === 'arrow') return 'arrow';
|
|
53
|
+
return 'circle';
|
|
54
|
+
}; // 渲染 ProStepItem
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
var renderItem = function renderItem() {
|
|
58
|
+
// 传递了 item 采用 item 渲染数组的方式
|
|
59
|
+
if (items) {
|
|
60
|
+
return items.map(function (item, index) {
|
|
61
|
+
return /*#__PURE__*/React.createElement(ProStepItem, _objectSpread({
|
|
62
|
+
key: index,
|
|
63
|
+
_mode: mode,
|
|
64
|
+
_shape: shape,
|
|
65
|
+
_index: index,
|
|
66
|
+
_current: current,
|
|
67
|
+
_size: size
|
|
68
|
+
}, item));
|
|
69
|
+
});
|
|
70
|
+
} else {
|
|
71
|
+
return renderChildren;
|
|
72
|
+
}
|
|
73
|
+
}; // 渲染 ProStep
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
var renderProStep = function renderProStep() {
|
|
77
|
+
if (mode === 'ver') {
|
|
78
|
+
return /*#__PURE__*/React.createElement(Timeline, _objectSpread({
|
|
79
|
+
fold: fold
|
|
80
|
+
}, others), renderItem());
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return /*#__PURE__*/React.createElement(Step, _objectSpread({
|
|
84
|
+
current: current,
|
|
85
|
+
shape: shapeMap(),
|
|
86
|
+
labelPlacement: labelPlacement,
|
|
87
|
+
readOnly: readOnly,
|
|
88
|
+
animation: animation
|
|
89
|
+
}, others), renderItem());
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
className: "teamix-pro-step"
|
|
94
|
+
}, renderProStep());
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
ProStep.Item = ProStepItem;
|
|
98
|
+
ProStep.defaultProps = {
|
|
99
|
+
mode: 'hoz'
|
|
100
|
+
};
|
|
101
|
+
export { ProStep, ProStepItem };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ItemProps as StepItemProps } from '@alicloudfe/components/types/step';
|
|
2
|
+
import { ItemProps as TimeLineItemProps } from '@alicloudfe/components/types/timeline';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { ProTagItem } from '@teamix/utils';
|
|
5
|
+
export declare type ProStepItemStatus = 'success' | 'fail' | 'process' | 'warning' | 'wait';
|
|
6
|
+
export declare type ModeStatusFromProStep = {
|
|
7
|
+
_mode?: string | 'hoz' | 'ver';
|
|
8
|
+
};
|
|
9
|
+
export declare type FoldProps = {
|
|
10
|
+
foldArea: [number, number];
|
|
11
|
+
foldShow: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare type ProStepProps = HozStepProps | VerTimeLineProps;
|
|
14
|
+
export declare type ProStepBaseProps = {
|
|
15
|
+
/** 步骤条:节点展示类型*/
|
|
16
|
+
shape?: 'icon' | 'arrow' | 'dot' | 'number';
|
|
17
|
+
/** style */
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
/** className */
|
|
20
|
+
className?: string;
|
|
21
|
+
} & React.HTMLAttributes<HTMLElement>;
|
|
22
|
+
export interface HozStepProps extends ProStepBaseProps {
|
|
23
|
+
/** 当前组件的展示形式 */
|
|
24
|
+
mode?: 'hoz';
|
|
25
|
+
/** 内部渲染自组件 */
|
|
26
|
+
items?: HozStepItemProps[];
|
|
27
|
+
/** 步骤条:当前步骤 */
|
|
28
|
+
current?: number;
|
|
29
|
+
/** 步骤条: 横向布局时( direction 为 hoz )的内容排列*/
|
|
30
|
+
labelPlacement?: 'hoz' | 'ver';
|
|
31
|
+
/** 步骤条: 是否可读模式 */
|
|
32
|
+
readOnly?: boolean;
|
|
33
|
+
/** 步骤条: 是否开启动效 */
|
|
34
|
+
animation?: boolean;
|
|
35
|
+
/**dot 形态下切换size */
|
|
36
|
+
size?: 'normal' | 'small';
|
|
37
|
+
}
|
|
38
|
+
export interface VerTimeLineProps extends ProStepBaseProps {
|
|
39
|
+
/** 当前组件的展示形式 */
|
|
40
|
+
mode?: 'ver';
|
|
41
|
+
/** 内部渲染自组件 */
|
|
42
|
+
items?: VerStepItemProps[];
|
|
43
|
+
/** 时间线: 自定义折叠选项 */
|
|
44
|
+
fold?: FoldProps[];
|
|
45
|
+
}
|
|
46
|
+
export interface ProStepItemBaseProps {
|
|
47
|
+
/**步骤条:节点展示类型 */
|
|
48
|
+
_shape?: 'icon' | 'arrow' | 'dot' | 'number';
|
|
49
|
+
/**节点索引 */
|
|
50
|
+
_index?: number;
|
|
51
|
+
/**活跃节点 */
|
|
52
|
+
_current?: number;
|
|
53
|
+
/**节点状态 */
|
|
54
|
+
status?: string | ProStepItemStatus;
|
|
55
|
+
/**节点设置为 icon 图标 */
|
|
56
|
+
icon?: string;
|
|
57
|
+
/**节点的内容 */
|
|
58
|
+
content?: ReactNode;
|
|
59
|
+
/**节点标题 */
|
|
60
|
+
title?: ReactNode;
|
|
61
|
+
/**自定义渲染 */
|
|
62
|
+
dotRender?: (index?: number, status?: string) => ReactNode;
|
|
63
|
+
/**点击事件 */
|
|
64
|
+
onClick?: (index: number) => void;
|
|
65
|
+
/**百分比展示 */
|
|
66
|
+
percent?: number;
|
|
67
|
+
/**是否禁用当前节点 */
|
|
68
|
+
disabled?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface HozStepItemProps extends ProStepItemBaseProps {
|
|
71
|
+
/**dot 形态下切换size */
|
|
72
|
+
_size?: 'normal' | 'small';
|
|
73
|
+
}
|
|
74
|
+
export interface VerStepItemProps extends ProStepItemBaseProps {
|
|
75
|
+
/**节点副标题,在 timeline 可以展示格式化后的时间 */
|
|
76
|
+
subTitle?: ReactNode;
|
|
77
|
+
/**节点对应描述 */
|
|
78
|
+
discription?: ReactNode;
|
|
79
|
+
/**节点的 tag */
|
|
80
|
+
tags?: ProTagItem[] | ReactNode;
|
|
81
|
+
/**左侧展示内容 */
|
|
82
|
+
timeLeft?: ReactNode;
|
|
83
|
+
/**头像 */
|
|
84
|
+
image?: string | ReactNode;
|
|
85
|
+
/**是否需要 animation 动画 */
|
|
86
|
+
animation?: boolean;
|
|
87
|
+
/**卡片是否可折叠 */
|
|
88
|
+
collapsible?: boolean;
|
|
89
|
+
/**默认是否折叠,用于非受控模式 */
|
|
90
|
+
defaultCollapsed?: boolean;
|
|
91
|
+
/**是否折叠,受控模式 */
|
|
92
|
+
collapsed?: boolean;
|
|
93
|
+
/**折叠状态改变的回调函数 */
|
|
94
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
95
|
+
}
|
|
96
|
+
export declare type ProStepItemProps = (HozStepItemProps | VerStepItemProps) & React.HTMLAttributes<HTMLElement> & StepItemProps & TimeLineItemProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -150,8 +150,6 @@ var Filter = function Filter(props) {
|
|
|
150
150
|
setVisible(!visible);
|
|
151
151
|
}
|
|
152
152
|
}),
|
|
153
|
-
//@ts-ignore
|
|
154
|
-
v2: true,
|
|
155
153
|
triggerType: ['click'],
|
|
156
154
|
align: "tl bl",
|
|
157
155
|
visible: visible,
|
|
@@ -189,20 +187,7 @@ var Filter = function Filter(props) {
|
|
|
189
187
|
} // 需要带上其他所有的信息
|
|
190
188
|
|
|
191
189
|
|
|
192
|
-
var rules = (_actionRef$current$ge5 = (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$g = _actionRef$current3.getState) === null || _actionRef$current3$g === void 0 ? void 0 : (_actionRef$current3$g2 = _actionRef$current3$g.call(_actionRef$current3)) === null || _actionRef$current3$g2 === void 0 ? void 0 : _actionRef$current3$g2.filterRules) !== null && _actionRef$current$ge5 !== void 0 ? _actionRef$current$ge5 : {};
|
|
193
|
-
var params = Object.fromEntries([].concat(_toConsumableArray(Object.entries(rules).map(function (_ref5) {
|
|
194
|
-
var _ref6 = _slicedToArray(_ref5, 2),
|
|
195
|
-
k = _ref6[0],
|
|
196
|
-
v = _ref6[1];
|
|
197
|
-
|
|
198
|
-
if (v) {
|
|
199
|
-
return [k, v.params];
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
return null;
|
|
203
|
-
})), [[column.dataIndex, param]]).filter(function (item) {
|
|
204
|
-
return item && (item === null || item === void 0 ? void 0 : item[1]);
|
|
205
|
-
})); // 再设置所有的列筛选状态
|
|
190
|
+
var rules = (_actionRef$current$ge5 = (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$g = _actionRef$current3.getState) === null || _actionRef$current3$g === void 0 ? void 0 : (_actionRef$current3$g2 = _actionRef$current3$g.call(_actionRef$current3)) === null || _actionRef$current3$g2 === void 0 ? void 0 : _actionRef$current3$g2.filterRules) !== null && _actionRef$current$ge5 !== void 0 ? _actionRef$current$ge5 : {}; // 再设置所有的列筛选状态
|
|
206
191
|
|
|
207
192
|
(_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$s = _actionRef$current4.setFilterRules) === null || _actionRef$current4$s === void 0 ? void 0 : _actionRef$current4$s.call(_actionRef$current4, _objectSpread(_objectSpread({}, rules), {}, _defineProperty({}, column.dataIndex, {
|
|
208
193
|
rules: selected,
|
|
@@ -220,7 +205,7 @@ var Filter = function Filter(props) {
|
|
|
220
205
|
} // 发送请求
|
|
221
206
|
|
|
222
207
|
|
|
223
|
-
(_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$r = _actionRef$current6.request) === null || _actionRef$current6$r === void 0 ? void 0 : _actionRef$current6$r.call(_actionRef$current6,
|
|
208
|
+
(_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$r = _actionRef$current6.request) === null || _actionRef$current6$r === void 0 ? void 0 : _actionRef$current6$r.call(_actionRef$current6, _defineProperty({}, targetPageKey, 1));
|
|
224
209
|
(_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$r = _actionRef$current7.resetPage) === null || _actionRef$current7$r === void 0 ? void 0 : _actionRef$current7$r.call(_actionRef$current7); // 清空表格选择
|
|
225
210
|
|
|
226
211
|
(_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : (_actionRef$current8$c = _actionRef$current8.clearRowSelection) === null || _actionRef$current8$c === void 0 ? void 0 : _actionRef$current8$c.call(_actionRef$current8);
|