@teamias/rex-design 0.0.12 → 0.0.14
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/LICENSE +0 -0
- package/README.md +0 -0
- package/dist/components/action-buttons/index.d.ts +1 -1
- package/dist/components/action-buttons/index.js +2 -2
- package/dist/components/base-form/demo/BaseFormCustomContent.js +5 -5
- package/dist/components/base-form/index.d.ts +1 -1
- package/dist/components/base-form/index.js +2 -2
- package/dist/components/base-form/modules/dependencyUtils.d.ts +1 -1
- package/dist/components/base-form/modules/handlerData.d.ts +1 -1
- package/dist/components/base-form/modules/handlerData.js +1 -1
- package/dist/components/base-form/modules/renderComponentNode.js +18 -13
- package/dist/components/base-form/modules/valuesToFields.js +4 -4
- package/dist/components/base-list-table/demo/NoData.js +44 -45
- package/dist/components/base-list-table/demo/VirtualDemo.js +348 -349
- package/dist/components/base-table/base-table.d.ts +6 -1
- package/dist/components/base-table/base-table.js +55 -24
- package/dist/components/base-table/components/BaseTableRow.js +8 -8
- package/dist/components/base-table/demo/BaseTableAll.js +35 -28
- package/dist/components/base-table/demo/BaseTableBasic.js +22 -23
- package/dist/components/base-table/demo/BaseTableRowSelect.js +22 -23
- package/dist/components/base-table/demo/tableData.js +172 -172
- package/dist/components/data-cell/style/index.js +1 -1
- package/dist/components/icons/assets/icon-park--arrow-up.svg +0 -0
- package/dist/components/icons/assets/svg-spinners--blocks-shuffle-3.svg +0 -0
- package/dist/components/media-viewer/style/index.d.ts +1 -1
- package/dist/components/media-viewer/style/index.js +3 -3
- package/dist/components/tiptap-editor/demo/index.js +4 -1
- package/dist/components/tiptap-editor/tiptap-editor.d.ts +3 -3
- package/dist/components/tiptap-editor/tiptap-editor.js +11 -12
- package/dist/hooks/use-state-data/demo/index.js +0 -1
- package/dist/locales/en-US.json +0 -0
- package/dist/locales/zh-CN.json +0 -0
- package/dist/types/svg.d.ts +1 -1
- package/package.json +1 -1
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from "./action-buttons";
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
2
|
+
export * from "./modules/handlerFilter";
|
|
3
|
+
export * from "./types";
|
|
@@ -22,17 +22,17 @@ export default (function () {
|
|
|
22
22
|
label: '尺寸',
|
|
23
23
|
subItems: [{
|
|
24
24
|
valueType: 'input',
|
|
25
|
-
field: 'multipleComponents-input'
|
|
25
|
+
field: 'www.multipleComponents-input'
|
|
26
26
|
}, {
|
|
27
27
|
valueType: 'input',
|
|
28
|
-
field: 'multipleComponents-
|
|
28
|
+
field: 'www.multipleComponents-input123',
|
|
29
29
|
label: '*',
|
|
30
30
|
formItemProps: {
|
|
31
31
|
colon: false
|
|
32
32
|
}
|
|
33
33
|
}, {
|
|
34
|
-
valueType: '
|
|
35
|
-
field: 'multipleComponents-input'
|
|
34
|
+
valueType: 'inputNumberRange',
|
|
35
|
+
field: ['www.multipleComponents-input', 'www.multipleComponents-input2']
|
|
36
36
|
}]
|
|
37
37
|
}],
|
|
38
38
|
initialValues: {},
|
|
@@ -79,7 +79,7 @@ export default (function () {
|
|
|
79
79
|
},
|
|
80
80
|
children: /*#__PURE__*/_jsx(BaseForm, {
|
|
81
81
|
fields: state.fields,
|
|
82
|
-
itemWidth: "
|
|
82
|
+
itemWidth: "100%",
|
|
83
83
|
fieldProps: {
|
|
84
84
|
'multipleComponents-treeSelect': {
|
|
85
85
|
valueType: 'input',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
|
-
import { IBaseFormFieldItem } from
|
|
2
|
+
import { IBaseFormFieldItem } from '../types';
|
|
3
3
|
/** 获取fields 中配置的defaultValue */
|
|
4
4
|
export declare const getFieldsDefaultValues: (topFields: IBaseFormFieldItem[]) => any;
|
|
5
5
|
/** 对数据进行结构转换, 根据 fields 规则,转成 initialValues 需要的结构 */
|
|
@@ -111,6 +111,11 @@ export var renderComponentNode = function renderComponentNode(outConfig, values,
|
|
|
111
111
|
return config;
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
+
/** 根据点链接符拆分 keyStr */
|
|
115
|
+
var splitKeyStr = function splitKeyStr(key) {
|
|
116
|
+
return key && key.indexOf('.') > -1 ? key.split('.') : key;
|
|
117
|
+
};
|
|
118
|
+
|
|
114
119
|
/** 动态组件注入参数 */
|
|
115
120
|
var dynamicCom = function dynamicCom(Com, localConfig) {
|
|
116
121
|
var defaultInject = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
@@ -131,7 +136,7 @@ export var renderComponentNode = function renderComponentNode(outConfig, values,
|
|
|
131
136
|
fieldProps = _getMergeConfig.fieldProps,
|
|
132
137
|
otherConfigProps = _objectWithoutProperties(_getMergeConfig, _excluded2);
|
|
133
138
|
return /*#__PURE__*/_createElement(ProFormItemRender, _objectSpread(_objectSpread(_objectSpread({
|
|
134
|
-
name: keyStr
|
|
139
|
+
name: splitKeyStr(keyStr)
|
|
135
140
|
}, otherConfigProps), formItemProps), {}, {
|
|
136
141
|
key: keyStr
|
|
137
142
|
}), function (customItemProps) {
|
|
@@ -298,25 +303,25 @@ export var renderComponentNode = function renderComponentNode(outConfig, values,
|
|
|
298
303
|
{
|
|
299
304
|
if (valueType === 'checkbox') {
|
|
300
305
|
return dynamicCom(ProFormCheckbox, {
|
|
301
|
-
name: keyStr,
|
|
306
|
+
name: splitKeyStr(keyStr),
|
|
302
307
|
initialValue: defaultValue
|
|
303
308
|
});
|
|
304
309
|
}
|
|
305
310
|
if (valueType === 'switch') {
|
|
306
311
|
return dynamicCom(ProFormSwitch, {
|
|
307
|
-
name: keyStr,
|
|
312
|
+
name: splitKeyStr(keyStr),
|
|
308
313
|
initialValue: defaultValue
|
|
309
314
|
});
|
|
310
315
|
}
|
|
311
316
|
if (valueType === 'datePicker') {
|
|
312
317
|
return dynamicCom(ProFormDatePicker, {
|
|
313
|
-
name: keyStr,
|
|
318
|
+
name: splitKeyStr(keyStr),
|
|
314
319
|
initialValue: defaultValue
|
|
315
320
|
});
|
|
316
321
|
}
|
|
317
322
|
if (valueType === 'input') {
|
|
318
323
|
return dynamicCom(ProFormText, {
|
|
319
|
-
name: keyStr,
|
|
324
|
+
name: splitKeyStr(keyStr),
|
|
320
325
|
initialValue: defaultValue
|
|
321
326
|
});
|
|
322
327
|
}
|
|
@@ -328,7 +333,7 @@ export var renderComponentNode = function renderComponentNode(outConfig, values,
|
|
|
328
333
|
maxTagCount: 'responsive'
|
|
329
334
|
},
|
|
330
335
|
debounceTime: 300,
|
|
331
|
-
name: keyStr,
|
|
336
|
+
name: splitKeyStr(keyStr),
|
|
332
337
|
options: item.api ? undefined : item.options,
|
|
333
338
|
params: item.api ? _objectSpread(_objectSpread(_objectSpread({}, values), item.params), item.defaultParams) : undefined,
|
|
334
339
|
initialValue: defaultValue,
|
|
@@ -392,7 +397,7 @@ export var renderComponentNode = function renderComponentNode(outConfig, values,
|
|
|
392
397
|
},
|
|
393
398
|
mode: item.multiple ? 'multiple' : 'single',
|
|
394
399
|
params: paramsProp,
|
|
395
|
-
name: keyStr,
|
|
400
|
+
name: splitKeyStr(keyStr),
|
|
396
401
|
initialValue: defaultValue,
|
|
397
402
|
request: function () {
|
|
398
403
|
var _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
@@ -470,7 +475,7 @@ export var renderComponentNode = function renderComponentNode(outConfig, values,
|
|
|
470
475
|
},
|
|
471
476
|
initialValue: defaultValue,
|
|
472
477
|
params: item.api ? _objectSpread(_objectSpread(_objectSpread({}, values), item.params), item.defaultParams) : undefined,
|
|
473
|
-
name: keyStr,
|
|
478
|
+
name: splitKeyStr(keyStr),
|
|
474
479
|
request: item.api ? ( /*#__PURE__*/function () {
|
|
475
480
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
|
|
476
481
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
@@ -506,7 +511,7 @@ export var renderComponentNode = function renderComponentNode(outConfig, values,
|
|
|
506
511
|
},
|
|
507
512
|
initialValue: defaultValue,
|
|
508
513
|
params: item.api ? _objectSpread(_objectSpread(_objectSpread({}, values), item.params), item.defaultParams) : undefined,
|
|
509
|
-
name: keyStr,
|
|
514
|
+
name: splitKeyStr(keyStr),
|
|
510
515
|
request: item.api ? ( /*#__PURE__*/function () {
|
|
511
516
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
|
|
512
517
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
@@ -531,7 +536,7 @@ export var renderComponentNode = function renderComponentNode(outConfig, values,
|
|
|
531
536
|
params: item.api ? _objectSpread(_objectSpread(_objectSpread({}, values), item.params), item.defaultParams) : undefined,
|
|
532
537
|
layout: 'horizontal',
|
|
533
538
|
initialValue: defaultValue,
|
|
534
|
-
name: keyStr,
|
|
539
|
+
name: splitKeyStr(keyStr),
|
|
535
540
|
request: item.api ? ( /*#__PURE__*/function () {
|
|
536
541
|
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
|
|
537
542
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
@@ -556,7 +561,7 @@ export var renderComponentNode = function renderComponentNode(outConfig, values,
|
|
|
556
561
|
params: item.api ? _objectSpread(_objectSpread(_objectSpread({}, values), item.params), item.defaultParams) : undefined,
|
|
557
562
|
layout: 'horizontal',
|
|
558
563
|
initialValue: defaultValue,
|
|
559
|
-
name: keyStr,
|
|
564
|
+
name: splitKeyStr(keyStr),
|
|
560
565
|
request: item.api ? ( /*#__PURE__*/function () {
|
|
561
566
|
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
|
|
562
567
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
@@ -578,7 +583,7 @@ export var renderComponentNode = function renderComponentNode(outConfig, values,
|
|
|
578
583
|
if (valueType === 'inputNumber') {
|
|
579
584
|
return dynamicCom(ProFormDigit, {
|
|
580
585
|
initialValue: defaultValue,
|
|
581
|
-
name: keyStr
|
|
586
|
+
name: splitKeyStr(keyStr)
|
|
582
587
|
});
|
|
583
588
|
}
|
|
584
589
|
if (valueType === 'inputNumberRange') {
|
|
@@ -600,7 +605,7 @@ export var renderComponentNode = function renderComponentNode(outConfig, values,
|
|
|
600
605
|
if (valueType === 'textArea') {
|
|
601
606
|
return dynamicCom(ProFormTextArea, {
|
|
602
607
|
initialValue: defaultValue,
|
|
603
|
-
name: keyStr
|
|
608
|
+
name: splitKeyStr(keyStr)
|
|
604
609
|
});
|
|
605
610
|
}
|
|
606
611
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { get, keys } from 'radash';
|
|
2
|
-
/**
|
|
3
|
-
* - 为了解决使用 setFieldsValue 时候, 依赖项影响, 导致值情况的问题
|
|
4
|
-
* - 把对象转成 FieldData[], 通过 setFields 进行赋值, 来解决值清空问题
|
|
5
|
-
* - 关键点在 FieldData['touched'] 这个字段为 false
|
|
2
|
+
/**
|
|
3
|
+
* - 为了解决使用 setFieldsValue 时候, 依赖项影响, 导致值情况的问题
|
|
4
|
+
* - 把对象转成 FieldData[], 通过 setFields 进行赋值, 来解决值清空问题
|
|
5
|
+
* - 关键点在 FieldData['touched'] 这个字段为 false
|
|
6
6
|
*/
|
|
7
7
|
export var valuesToFields = function valuesToFields(data) {
|
|
8
8
|
if (!data) return [];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { BaseListTable } from "../base-list-table";
|
|
3
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
3
|
export default (function () {
|
|
@@ -6,50 +5,50 @@ export default (function () {
|
|
|
6
5
|
defaultExpandAllCollapse: true,
|
|
7
6
|
rowSelection: {},
|
|
8
7
|
fieldsConfig: [{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}, {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}, {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}, {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}, {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
8
|
+
title: '编号/状态',
|
|
9
|
+
dataIndex: 'status_name',
|
|
10
|
+
key: 'status_name'
|
|
11
|
+
}, {
|
|
12
|
+
title: 'SPU/组合SKU',
|
|
13
|
+
dataIndex: 'goods_spu_info',
|
|
14
|
+
key: 'goods_spu_info'
|
|
15
|
+
}, {
|
|
16
|
+
title: '图片',
|
|
17
|
+
dataIndex: 'goods_image',
|
|
18
|
+
key: 'goods_image',
|
|
19
|
+
align: 'center'
|
|
20
|
+
}, {
|
|
21
|
+
title: 'SKU/属性',
|
|
22
|
+
dataIndex: 'goods_sku_info',
|
|
23
|
+
key: 'goods_sku_info'
|
|
24
|
+
}, {
|
|
25
|
+
title: '计划员',
|
|
26
|
+
dataIndex: 'planuser',
|
|
27
|
+
key: 'planuser'
|
|
28
|
+
}, {
|
|
29
|
+
title: '供应商',
|
|
30
|
+
dataIndex: 'factory',
|
|
31
|
+
key: 'factory'
|
|
32
|
+
}, {
|
|
33
|
+
title: 'ASIN',
|
|
34
|
+
dataIndex: 'asin',
|
|
35
|
+
key: 'asin'
|
|
36
|
+
}, {
|
|
37
|
+
title: '销量',
|
|
38
|
+
dataIndex: 'goods_sales',
|
|
39
|
+
key: 'goods_sales'
|
|
40
|
+
}, {
|
|
41
|
+
title: 'DMS',
|
|
42
|
+
dataIndex: 'goods_dms',
|
|
43
|
+
key: 'goods_dms'
|
|
44
|
+
}, {
|
|
45
|
+
title: '毛利率',
|
|
46
|
+
dataIndex: 'gross_margin',
|
|
47
|
+
key: 'gross_margin'
|
|
48
|
+
}, {
|
|
49
|
+
title: '售后率',
|
|
50
|
+
dataIndex: 'goods_rma',
|
|
51
|
+
key: 'goods_rma'
|
|
53
52
|
}],
|
|
54
53
|
dataSource: []
|
|
55
54
|
});
|