@teamix/pro 1.4.3 → 1.4.4
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 +452 -52
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/form/ProForm/index.js +6 -5
- package/es/form/ProForm/index.scss +42 -19
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/table/index.scss +2 -9
- package/lib/form/ProForm/index.js +5 -4
- package/lib/form/ProForm/index.scss +42 -19
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/table/index.scss +2 -9
- package/package.json +1 -1
package/es/form/ProForm/index.js
CHANGED
@@ -10,7 +10,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
10
10
|
|
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
|
-
import React, { memo, useMemo } from 'react';
|
13
|
+
import React, { memo, useEffect, useMemo } from 'react';
|
14
14
|
import { usePrefixCls, cls, getLanguage, getGlobalConfig } from '@teamix/utils';
|
15
15
|
import { createForm, onFieldValueChange, onFormValuesChange, registerValidateLocale, setValidateLanguage } from '@formily/core';
|
16
16
|
import { toJS } from '@formily/reactive';
|
@@ -127,10 +127,7 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
|
|
127
127
|
}).finally(function () {
|
128
128
|
onInitialComplete === null || onInitialComplete === void 0 ? void 0 : onInitialComplete(form);
|
129
129
|
});
|
130
|
-
}
|
131
|
-
|
132
|
-
|
133
|
-
setValidateLanguage(getLanguage() || 'zh-cn');
|
130
|
+
}
|
134
131
|
}, []); // 添加 onChange 事件
|
135
132
|
|
136
133
|
useMemo(function () {
|
@@ -154,6 +151,10 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
|
|
154
151
|
});
|
155
152
|
}
|
156
153
|
}, [onChange]);
|
154
|
+
useEffect(function () {
|
155
|
+
// 配置国际化
|
156
|
+
setValidateLanguage(getLanguage() || 'zh-cn');
|
157
|
+
}, []);
|
157
158
|
return /*#__PURE__*/React.createElement(Form, _objectSpread(_objectSpread(_objectSpread({
|
158
159
|
className: cls(prefixCls(), className)
|
159
160
|
}, otherProps), getTeamixLayout), {}, {
|
@@ -36,8 +36,7 @@
|
|
36
36
|
.#{$teamix-pro-field}-radio,
|
37
37
|
.#{$teamix-pro-field}-switch,
|
38
38
|
.#{$teamix-pro-field}-colorradio,
|
39
|
-
.#{$teamix-pro-field}-range
|
40
|
-
.#{$css-prefix}btn-text {
|
39
|
+
.#{$teamix-pro-field}-range {
|
41
40
|
line-height: var(--form-element-medium-height, 32px);
|
42
41
|
}
|
43
42
|
> .#{$css-prefix}btn-text {
|
@@ -109,6 +108,21 @@
|
|
109
108
|
}
|
110
109
|
}
|
111
110
|
|
111
|
+
// 尺寸 - small
|
112
|
+
.#{$form-item-cls}-size-small {
|
113
|
+
// 预览态行高
|
114
|
+
.#{$css-prefix}form-preview {
|
115
|
+
line-height: var(--form-element-small-height, 24px);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
// 尺寸 - large
|
119
|
+
.#{$form-item-cls}-size-large {
|
120
|
+
// 预览态行高
|
121
|
+
.#{$css-prefix}form-preview {
|
122
|
+
line-height: var(--form-element-large-height, 36px);
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
112
126
|
// Icon
|
113
127
|
.#{$css-prefix}formily-icon {
|
114
128
|
transform: translate(0, -1px);
|
@@ -190,23 +204,6 @@
|
|
190
204
|
}
|
191
205
|
}
|
192
206
|
|
193
|
-
// 数组类组件添加按钮
|
194
|
-
.#{$css-prefix}btn.#{$form-array}-base-addition {
|
195
|
-
border-style: dashed;
|
196
|
-
.#{$css-prefix}formily-icon {
|
197
|
-
margin-right: 4px;
|
198
|
-
}
|
199
|
-
}
|
200
|
-
// 数组类ArrayItem Icon text 居中
|
201
|
-
.#{$form-array}-items-item-inner {
|
202
|
-
.#{$css-prefix}space-item {
|
203
|
-
> .#{$css-prefix}formily-icon.#{$css-prefix}btn-text {
|
204
|
-
line-height: inherit !important;
|
205
|
-
margin-right: 0;
|
206
|
-
}
|
207
|
-
}
|
208
|
-
}
|
209
|
-
|
210
207
|
// Editable预览态行高
|
211
208
|
.#{$css-prefix}formily-editable-content {
|
212
209
|
line-height: var(--form-element-medium-height, 32px);
|
@@ -296,6 +293,20 @@
|
|
296
293
|
.form-array-base-icon {
|
297
294
|
cursor: pointer;
|
298
295
|
}
|
296
|
+
// 数组类组件添加按钮
|
297
|
+
.#{$css-prefix}btn.#{$form-array}-base-addition {
|
298
|
+
border-style: dashed;
|
299
|
+
.#{$css-prefix}formily-icon {
|
300
|
+
margin-right: 4px;
|
301
|
+
}
|
302
|
+
}
|
303
|
+
.#{$form-array}-items {
|
304
|
+
.#{$form-item-cls}-control-content-component {
|
305
|
+
> .#{$css-prefix}btn-text.#{$form-array}-base-addition {
|
306
|
+
line-height: var(--form-element-medium-height, 32px);
|
307
|
+
}
|
308
|
+
}
|
309
|
+
}
|
299
310
|
|
300
311
|
// ArrayCard
|
301
312
|
.#{$form-array}-cards-item {
|
@@ -324,6 +335,18 @@
|
|
324
335
|
align-items: center;
|
325
336
|
}
|
326
337
|
|
338
|
+
// todo 此处做覆盖,formily改为变量后可移除
|
339
|
+
.#{$form-array}-items-card {
|
340
|
+
border-color: var(--card-border-color, #eaeaea);
|
341
|
+
background: var(--card-background, #ffffff);
|
342
|
+
.#{$css-prefix}formily-item:not(.#{$css-prefix}formily-item-feedback-layout-popover) {
|
343
|
+
.#{$css-prefix}formily-item-help {
|
344
|
+
background: var(--card-background, #ffffff);
|
345
|
+
box-shadow: 0 0 10px var(--card-border-color, #eaeaea);
|
346
|
+
}
|
347
|
+
}
|
348
|
+
}
|
349
|
+
|
327
350
|
/* hack todo remove */
|
328
351
|
.#{$form-item-cls}-control-content-component {
|
329
352
|
.#{$teamix-pro-field}-tooltip.#{$teamix-pro-field}-checkbox {
|
package/es/index.d.ts
CHANGED
@@ -27,5 +27,5 @@ export * from './table';
|
|
27
27
|
export * from './sidebar';
|
28
28
|
export * from './utils';
|
29
29
|
export * from './timeline';
|
30
|
-
declare const version = "1.4.
|
30
|
+
declare const version = "1.4.4";
|
31
31
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, hooks, nocode, templates, utils, };
|
package/es/index.js
CHANGED
@@ -31,6 +31,6 @@ export * from './table';
|
|
31
31
|
export * from './sidebar';
|
32
32
|
export * from './utils';
|
33
33
|
export * from './timeline';
|
34
|
-
var version = '1.4.
|
34
|
+
var version = '1.4.4';
|
35
35
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
|
36
36
|
ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, hooks, nocode, templates, utils };
|
package/es/table/index.scss
CHANGED
@@ -1,16 +1,9 @@
|
|
1
1
|
$prefix: 'teamix-pro-table';
|
2
2
|
$fullscreenPadding: 24px;
|
3
3
|
|
4
|
-
.next-overlay-wrapper {
|
5
|
-
--checkbox-select-icon-content: '\ead7';
|
6
|
-
--checkbox-semi-select-icon-content: '\ead5';
|
7
|
-
}
|
8
|
-
|
9
4
|
.#{$prefix} {
|
10
5
|
background: var(--table-row-bg, #ffffff);
|
11
6
|
position: relative;
|
12
|
-
--checkbox-select-icon-content: '\ead7';
|
13
|
-
--checkbox-semi-select-icon-content: '\ead5';
|
14
7
|
&-footer {
|
15
8
|
padding: 8px 0;
|
16
9
|
width: 100%;
|
@@ -121,7 +114,7 @@ $fullscreenPadding: 24px;
|
|
121
114
|
}
|
122
115
|
|
123
116
|
.next-table {
|
124
|
-
.next-form-preview
|
117
|
+
.next-form-preview {
|
125
118
|
line-height: unset;
|
126
119
|
}
|
127
120
|
&-row {
|
@@ -141,4 +134,4 @@ $fullscreenPadding: 24px;
|
|
141
134
|
a:hover {
|
142
135
|
color: var(--color-brand1-5);
|
143
136
|
}
|
144
|
-
}
|
137
|
+
}
|
@@ -159,10 +159,7 @@ var ProForm = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
159
159
|
}).finally(function () {
|
160
160
|
onInitialComplete === null || onInitialComplete === void 0 ? void 0 : onInitialComplete(form);
|
161
161
|
});
|
162
|
-
}
|
163
|
-
|
164
|
-
|
165
|
-
(0, _core.setValidateLanguage)((0, _utils.getLanguage)() || 'zh-cn');
|
162
|
+
}
|
166
163
|
}, []); // 添加 onChange 事件
|
167
164
|
|
168
165
|
(0, _react.useMemo)(function () {
|
@@ -186,6 +183,10 @@ var ProForm = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
186
183
|
});
|
187
184
|
}
|
188
185
|
}, [onChange]);
|
186
|
+
(0, _react.useEffect)(function () {
|
187
|
+
// 配置国际化
|
188
|
+
(0, _core.setValidateLanguage)((0, _utils.getLanguage)() || 'zh-cn');
|
189
|
+
}, []);
|
189
190
|
return /*#__PURE__*/_react.default.createElement(_formily.Form, _objectSpread(_objectSpread(_objectSpread({
|
190
191
|
className: (0, _utils.cls)(prefixCls(), className)
|
191
192
|
}, otherProps), getTeamixLayout), {}, {
|
@@ -36,8 +36,7 @@
|
|
36
36
|
.#{$teamix-pro-field}-radio,
|
37
37
|
.#{$teamix-pro-field}-switch,
|
38
38
|
.#{$teamix-pro-field}-colorradio,
|
39
|
-
.#{$teamix-pro-field}-range
|
40
|
-
.#{$css-prefix}btn-text {
|
39
|
+
.#{$teamix-pro-field}-range {
|
41
40
|
line-height: var(--form-element-medium-height, 32px);
|
42
41
|
}
|
43
42
|
> .#{$css-prefix}btn-text {
|
@@ -109,6 +108,21 @@
|
|
109
108
|
}
|
110
109
|
}
|
111
110
|
|
111
|
+
// 尺寸 - small
|
112
|
+
.#{$form-item-cls}-size-small {
|
113
|
+
// 预览态行高
|
114
|
+
.#{$css-prefix}form-preview {
|
115
|
+
line-height: var(--form-element-small-height, 24px);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
// 尺寸 - large
|
119
|
+
.#{$form-item-cls}-size-large {
|
120
|
+
// 预览态行高
|
121
|
+
.#{$css-prefix}form-preview {
|
122
|
+
line-height: var(--form-element-large-height, 36px);
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
112
126
|
// Icon
|
113
127
|
.#{$css-prefix}formily-icon {
|
114
128
|
transform: translate(0, -1px);
|
@@ -190,23 +204,6 @@
|
|
190
204
|
}
|
191
205
|
}
|
192
206
|
|
193
|
-
// 数组类组件添加按钮
|
194
|
-
.#{$css-prefix}btn.#{$form-array}-base-addition {
|
195
|
-
border-style: dashed;
|
196
|
-
.#{$css-prefix}formily-icon {
|
197
|
-
margin-right: 4px;
|
198
|
-
}
|
199
|
-
}
|
200
|
-
// 数组类ArrayItem Icon text 居中
|
201
|
-
.#{$form-array}-items-item-inner {
|
202
|
-
.#{$css-prefix}space-item {
|
203
|
-
> .#{$css-prefix}formily-icon.#{$css-prefix}btn-text {
|
204
|
-
line-height: inherit !important;
|
205
|
-
margin-right: 0;
|
206
|
-
}
|
207
|
-
}
|
208
|
-
}
|
209
|
-
|
210
207
|
// Editable预览态行高
|
211
208
|
.#{$css-prefix}formily-editable-content {
|
212
209
|
line-height: var(--form-element-medium-height, 32px);
|
@@ -296,6 +293,20 @@
|
|
296
293
|
.form-array-base-icon {
|
297
294
|
cursor: pointer;
|
298
295
|
}
|
296
|
+
// 数组类组件添加按钮
|
297
|
+
.#{$css-prefix}btn.#{$form-array}-base-addition {
|
298
|
+
border-style: dashed;
|
299
|
+
.#{$css-prefix}formily-icon {
|
300
|
+
margin-right: 4px;
|
301
|
+
}
|
302
|
+
}
|
303
|
+
.#{$form-array}-items {
|
304
|
+
.#{$form-item-cls}-control-content-component {
|
305
|
+
> .#{$css-prefix}btn-text.#{$form-array}-base-addition {
|
306
|
+
line-height: var(--form-element-medium-height, 32px);
|
307
|
+
}
|
308
|
+
}
|
309
|
+
}
|
299
310
|
|
300
311
|
// ArrayCard
|
301
312
|
.#{$form-array}-cards-item {
|
@@ -324,6 +335,18 @@
|
|
324
335
|
align-items: center;
|
325
336
|
}
|
326
337
|
|
338
|
+
// todo 此处做覆盖,formily改为变量后可移除
|
339
|
+
.#{$form-array}-items-card {
|
340
|
+
border-color: var(--card-border-color, #eaeaea);
|
341
|
+
background: var(--card-background, #ffffff);
|
342
|
+
.#{$css-prefix}formily-item:not(.#{$css-prefix}formily-item-feedback-layout-popover) {
|
343
|
+
.#{$css-prefix}formily-item-help {
|
344
|
+
background: var(--card-background, #ffffff);
|
345
|
+
box-shadow: 0 0 10px var(--card-border-color, #eaeaea);
|
346
|
+
}
|
347
|
+
}
|
348
|
+
}
|
349
|
+
|
327
350
|
/* hack todo remove */
|
328
351
|
.#{$form-item-cls}-control-content-component {
|
329
352
|
.#{$teamix-pro-field}-tooltip.#{$teamix-pro-field}-checkbox {
|
package/lib/index.d.ts
CHANGED
@@ -27,5 +27,5 @@ export * from './table';
|
|
27
27
|
export * from './sidebar';
|
28
28
|
export * from './utils';
|
29
29
|
export * from './timeline';
|
30
|
-
declare const version = "1.4.
|
30
|
+
declare const version = "1.4.4";
|
31
31
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, hooks, nocode, templates, utils, };
|
package/lib/index.js
CHANGED
package/lib/table/index.scss
CHANGED
@@ -1,16 +1,9 @@
|
|
1
1
|
$prefix: 'teamix-pro-table';
|
2
2
|
$fullscreenPadding: 24px;
|
3
3
|
|
4
|
-
.next-overlay-wrapper {
|
5
|
-
--checkbox-select-icon-content: '\ead7';
|
6
|
-
--checkbox-semi-select-icon-content: '\ead5';
|
7
|
-
}
|
8
|
-
|
9
4
|
.#{$prefix} {
|
10
5
|
background: var(--table-row-bg, #ffffff);
|
11
6
|
position: relative;
|
12
|
-
--checkbox-select-icon-content: '\ead7';
|
13
|
-
--checkbox-semi-select-icon-content: '\ead5';
|
14
7
|
&-footer {
|
15
8
|
padding: 8px 0;
|
16
9
|
width: 100%;
|
@@ -121,7 +114,7 @@ $fullscreenPadding: 24px;
|
|
121
114
|
}
|
122
115
|
|
123
116
|
.next-table {
|
124
|
-
.next-form-preview
|
117
|
+
.next-form-preview {
|
125
118
|
line-height: unset;
|
126
119
|
}
|
127
120
|
&-row {
|
@@ -141,4 +134,4 @@ $fullscreenPadding: 24px;
|
|
141
134
|
a:hover {
|
142
135
|
color: var(--color-brand1-5);
|
143
136
|
}
|
144
|
-
}
|
137
|
+
}
|