@teamix/pro 1.2.24 → 1.2.29
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 +18112 -15660
- 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 +1 -1
- 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 +16 -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 +1 -0
- package/es/table/components/ToolBar/FullScreenIcon.js +4 -9
- package/es/table/components/ToolBar/Fullscreen.js +21 -11
- package/es/table/index.js +89 -103
- package/es/table/typing.d.ts +14 -3
- 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 +1 -1
- 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 +16 -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 +1 -0
- package/lib/table/components/ToolBar/FullScreenIcon.js +4 -9
- package/lib/table/components/ToolBar/Fullscreen.js +22 -11
- package/lib/table/index.js +85 -100
- package/lib/table/typing.d.ts +14 -3
- 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,69 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
var _VerStepItem = _interopRequireDefault(require("./components/VerStepItem"));
|
11
|
+
|
12
|
+
var _HozStepItem = _interopRequireDefault(require("./components/HozStepItem"));
|
13
|
+
|
14
|
+
var _excluded = ["_mode", "subTitle", "tags", "discription", "timeLeft", "image", "animation", "collapsed", "collapsible", "defaultCollapsed", "onCollapse"];
|
15
|
+
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
|
+
|
18
|
+
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; }
|
19
|
+
|
20
|
+
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; }
|
21
|
+
|
22
|
+
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; }
|
23
|
+
|
24
|
+
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; }
|
25
|
+
|
26
|
+
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; }
|
27
|
+
|
28
|
+
var ProStepItem = function ProStepItem(props) {
|
29
|
+
var _mode = props._mode,
|
30
|
+
subTitle = props.subTitle,
|
31
|
+
tags = props.tags,
|
32
|
+
discription = props.discription,
|
33
|
+
timeLeft = props.timeLeft,
|
34
|
+
image = props.image,
|
35
|
+
animation = props.animation,
|
36
|
+
collapsed = props.collapsed,
|
37
|
+
collapsible = props.collapsible,
|
38
|
+
defaultCollapsed = props.defaultCollapsed,
|
39
|
+
onCollapse = props.onCollapse,
|
40
|
+
others = _objectWithoutProperties(props, _excluded);
|
41
|
+
|
42
|
+
var renderProStepItem = function renderProStepItem() {
|
43
|
+
if (_mode === 'ver') {
|
44
|
+
return /*#__PURE__*/_react.default.createElement(_VerStepItem.default, _objectSpread({
|
45
|
+
subTitle: subTitle,
|
46
|
+
discription: discription,
|
47
|
+
tags: tags,
|
48
|
+
image: image,
|
49
|
+
timeLeft: timeLeft,
|
50
|
+
animation: animation,
|
51
|
+
collapsed: collapsed,
|
52
|
+
collapsible: collapsible,
|
53
|
+
defaultCollapsed: defaultCollapsed,
|
54
|
+
onCollapse: onCollapse
|
55
|
+
}, others));
|
56
|
+
}
|
57
|
+
|
58
|
+
return /*#__PURE__*/_react.default.createElement(_HozStepItem.default, _objectSpread({}, others));
|
59
|
+
};
|
60
|
+
|
61
|
+
return renderProStepItem();
|
62
|
+
};
|
63
|
+
|
64
|
+
ProStepItem.displayName = 'ProStepItem';
|
65
|
+
ProStepItem.defaultProps = {
|
66
|
+
_mode: 'hoz'
|
67
|
+
};
|
68
|
+
var _default = ProStepItem;
|
69
|
+
exports.default = _default;
|
@@ -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 };
|
@@ -0,0 +1,124 @@
|
|
1
|
+
"use strict";
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports.ProStep = void 0;
|
9
|
+
Object.defineProperty(exports, "ProStepItem", {
|
10
|
+
enumerable: true,
|
11
|
+
get: function get() {
|
12
|
+
return _ProStepItem.default;
|
13
|
+
}
|
14
|
+
});
|
15
|
+
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
17
|
+
|
18
|
+
var _components = require("@alicloudfe/components");
|
19
|
+
|
20
|
+
var _ProStepItem = _interopRequireDefault(require("./ProStepItem"));
|
21
|
+
|
22
|
+
var _excluded = ["mode", "items", "shape", "children"];
|
23
|
+
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
25
|
+
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
27
|
+
|
28
|
+
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; }
|
29
|
+
|
30
|
+
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; }
|
31
|
+
|
32
|
+
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; }
|
33
|
+
|
34
|
+
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; }
|
35
|
+
|
36
|
+
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; }
|
37
|
+
|
38
|
+
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; }
|
39
|
+
|
40
|
+
var ProStep = function ProStep(props) {
|
41
|
+
var mode = props.mode,
|
42
|
+
items = props.items,
|
43
|
+
shape = props.shape,
|
44
|
+
children = props.children,
|
45
|
+
others = _objectWithoutProperties(props, _excluded);
|
46
|
+
|
47
|
+
var current = props.current,
|
48
|
+
labelPlacement = props.labelPlacement,
|
49
|
+
readOnly = props.readOnly,
|
50
|
+
animation = props.animation,
|
51
|
+
size = props.size;
|
52
|
+
var fold = props.fold; // 判断渲染组件是不是 ProStepItem, 并返回筛选后的children
|
53
|
+
|
54
|
+
var renderChildren = (0, _react.useMemo)(function () {
|
55
|
+
return _react.default.Children.map(children, function (child, index) {
|
56
|
+
var childElement = child;
|
57
|
+
var displayName = childElement.type.displayName;
|
58
|
+
|
59
|
+
if (displayName === 'ProStepItem') {
|
60
|
+
return /*#__PURE__*/_react.default.cloneElement(childElement, {
|
61
|
+
_size: size,
|
62
|
+
_mode: mode,
|
63
|
+
_index: index,
|
64
|
+
_current: current,
|
65
|
+
_shape: shape
|
66
|
+
});
|
67
|
+
} // 如果不是 ProStepItem
|
68
|
+
|
69
|
+
|
70
|
+
console.error('Warning: ProStep has a child which is not a ProStepItem component');
|
71
|
+
});
|
72
|
+
}, [children]); // 设置circle, 覆盖 dot 阻止重新渲染节点样式
|
73
|
+
|
74
|
+
var shapeMap = function shapeMap() {
|
75
|
+
if (shape === 'arrow') return 'arrow';
|
76
|
+
return 'circle';
|
77
|
+
}; // 渲染 ProStepItem
|
78
|
+
|
79
|
+
|
80
|
+
var renderItem = function renderItem() {
|
81
|
+
// 传递了 item 采用 item 渲染数组的方式
|
82
|
+
if (items) {
|
83
|
+
return items.map(function (item, index) {
|
84
|
+
return /*#__PURE__*/_react.default.createElement(_ProStepItem.default, _objectSpread({
|
85
|
+
key: index,
|
86
|
+
_mode: mode,
|
87
|
+
_shape: shape,
|
88
|
+
_index: index,
|
89
|
+
_current: current,
|
90
|
+
_size: size
|
91
|
+
}, item));
|
92
|
+
});
|
93
|
+
} else {
|
94
|
+
return renderChildren;
|
95
|
+
}
|
96
|
+
}; // 渲染 ProStep
|
97
|
+
|
98
|
+
|
99
|
+
var renderProStep = function renderProStep() {
|
100
|
+
if (mode === 'ver') {
|
101
|
+
return /*#__PURE__*/_react.default.createElement(_components.Timeline, _objectSpread({
|
102
|
+
fold: fold
|
103
|
+
}, others), renderItem());
|
104
|
+
}
|
105
|
+
|
106
|
+
return /*#__PURE__*/_react.default.createElement(_components.Step, _objectSpread({
|
107
|
+
current: current,
|
108
|
+
shape: shapeMap(),
|
109
|
+
labelPlacement: labelPlacement,
|
110
|
+
readOnly: readOnly,
|
111
|
+
animation: animation
|
112
|
+
}, others), renderItem());
|
113
|
+
};
|
114
|
+
|
115
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
116
|
+
className: "teamix-pro-step"
|
117
|
+
}, renderProStep());
|
118
|
+
};
|
119
|
+
|
120
|
+
exports.ProStep = ProStep;
|
121
|
+
ProStep.Item = _ProStepItem.default;
|
122
|
+
ProStep.defaultProps = {
|
123
|
+
mode: 'hoz'
|
124
|
+
};
|
@@ -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;
|
@@ -169,8 +169,6 @@ var Filter = function Filter(props) {
|
|
169
169
|
setVisible(!visible);
|
170
170
|
}
|
171
171
|
}),
|
172
|
-
//@ts-ignore
|
173
|
-
v2: true,
|
174
172
|
triggerType: ['click'],
|
175
173
|
align: "tl bl",
|
176
174
|
visible: visible,
|
@@ -208,20 +206,7 @@ var Filter = function Filter(props) {
|
|
208
206
|
} // 需要带上其他所有的信息
|
209
207
|
|
210
208
|
|
211
|
-
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 : {};
|
212
|
-
var params = Object.fromEntries([].concat(_toConsumableArray(Object.entries(rules).map(function (_ref5) {
|
213
|
-
var _ref6 = _slicedToArray(_ref5, 2),
|
214
|
-
k = _ref6[0],
|
215
|
-
v = _ref6[1];
|
216
|
-
|
217
|
-
if (v) {
|
218
|
-
return [k, v.params];
|
219
|
-
}
|
220
|
-
|
221
|
-
return null;
|
222
|
-
})), [[column.dataIndex, param]]).filter(function (item) {
|
223
|
-
return item && (item === null || item === void 0 ? void 0 : item[1]);
|
224
|
-
})); // 再设置所有的列筛选状态
|
209
|
+
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 : {}; // 再设置所有的列筛选状态
|
225
210
|
|
226
211
|
(_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, {
|
227
212
|
rules: selected,
|
@@ -239,7 +224,7 @@ var Filter = function Filter(props) {
|
|
239
224
|
} // 发送请求
|
240
225
|
|
241
226
|
|
242
|
-
(_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,
|
227
|
+
(_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));
|
243
228
|
(_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); // 清空表格选择
|
244
229
|
|
245
230
|
(_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);
|