@teamix/pro 1.1.36 → 1.1.40
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/README.md +14 -10
- package/dist/pro.css +1 -1
- package/dist/pro.js +2555 -3791
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/dialog-form.d.ts +5 -5
- package/es/actions/dialog-form.js +1 -5
- package/es/actions/dialog.d.ts +12 -0
- package/es/actions/dialog.js +104 -27
- package/es/actions/index.d.ts +54 -47
- package/es/actions/index.js +28 -22
- package/es/actions/index.scss +48 -2
- package/es/actions/link.js +4 -2
- package/es/actions/request.d.ts +1 -1
- package/es/actions/request.js +2 -2
- package/es/card/index.d.ts +17 -5
- package/es/card/index.js +16 -11
- package/es/form/Components/ProField/index.d.ts +1 -161
- package/es/form/Components/ProField/index.js +34 -40
- package/es/form/Filter/index.js +2 -2
- package/es/form/ProForm/index.d.ts +2 -2
- package/es/form/ProForm/index.js +1 -6
- package/es/form/ProForm/index.scss +19 -1
- package/es/form/ProForm/useFieldRequest.d.ts +5 -0
- package/es/form/ProForm/useFieldRequest.js +26 -0
- package/es/form/SchemaForm/adapterDecorator.js +2 -2
- package/es/form/SchemaForm/index.d.ts +2 -2
- package/es/form/SchemaForm/index.js +12 -21
- package/es/form/SchemaForm/initializeArrayCards.d.ts +2 -2
- package/es/form/SchemaForm/initializeArrayCollapse.d.ts +2 -2
- package/es/form/SchemaForm/initializeArrayItems.d.ts +2 -2
- package/es/form/SchemaForm/initializeArrayTable.d.ts +2 -2
- package/es/form/SchemaForm/initializeDataSource.d.ts +2 -2
- package/es/form/SchemaForm/initializeDataSource.js +2 -2
- package/es/form/SchemaForm/initializeFormButton.d.ts +2 -2
- package/es/form/SchemaForm/initializeFormCollapse.d.ts +2 -2
- package/es/form/SchemaForm/initializeFormGroup.d.ts +2 -2
- package/es/form/SchemaForm/initializeFormStep.d.ts +3 -3
- package/es/form/SchemaForm/initializeFormTab.d.ts +2 -2
- package/es/form/SchemaForm/initializeRequest.d.ts +2 -2
- package/es/form/SchemaForm/initializeRequest.js +2 -2
- package/es/form/SchemaForm/initializeRules.js +44 -16
- package/es/form/SchemaForm/reactions.d.ts +5 -5
- package/es/form/SchemaForm/reactions.js +20 -18
- package/es/form/fieldTypeMap.d.ts +4 -0
- package/es/form/fieldTypeMap.js +41 -0
- package/es/form/index.d.ts +92 -4
- package/es/form/index.js +18 -5
- package/es/form/schemaNameMap.js +3 -0
- package/es/form/typing.d.ts +49 -26
- package/es/form/utils.d.ts +3 -1
- package/es/form/utils.js +38 -1
- package/es/form/warning.d.ts +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/info/components/InfoGroup/index.js +73 -15
- package/es/info/components/InfoGroup/index.scss +45 -3
- package/es/info/components/InfoValueItem/index.js +9 -4
- package/es/info/components/InfoValueItem/index.scss +5 -1
- package/es/info/components/ProInfoItem/index.js +3 -3
- package/es/info/components/ProInfoItem/index.scss +1 -0
- package/es/info/components/baseInfo/index.d.ts +2 -3
- package/es/info/components/baseInfo/index.js +29 -10
- package/es/info/components/headerInfo/index.d.ts +2 -3
- package/es/info/components/tableInfo/index.d.ts +2 -3
- package/es/info/components/tableInfo/index.js +2 -2
- package/es/info/index.js +75 -51
- package/es/info/typing.d.ts +54 -36
- package/es/info/utils/index.d.ts +2 -2
- package/es/info/utils/utils.d.ts +1 -1
- package/es/nocode/pages/renderer.js +2 -2
- package/es/page-header/index.d.ts +42 -25
- package/es/page-header/index.js +56 -32
- package/es/page-header/index.scss +2 -1
- package/es/table/components/EmptyContent/index.d.ts +2 -0
- package/es/table/components/EmptyContent/index.js +11 -0
- package/es/table/components/Filter/index.d.ts +2 -2
- package/es/table/components/Filter/index.js +23 -10
- package/es/table/components/Filter/index.scss +1 -1
- package/es/table/components/Layout/index.js +2 -2
- package/es/table/components/QuickAction/index.d.ts +2 -2
- package/es/table/components/QuickAction/index.js +3 -3
- package/es/table/components/ToolBar/Fullscreen.js +1 -0
- package/es/table/index.js +76 -14
- package/es/table/index.scss +4 -0
- package/es/table/typing.d.ts +29 -14
- package/es/table/utils/columnRender.d.ts +3 -3
- package/es/table/utils/columnRender.js +2 -2
- package/es/table/utils/genProColumnToColumn.d.ts +2 -2
- package/es/table/utils/genProColumnToColumn.js +1 -1
- package/es/table/utils/index.js +33 -11
- package/es/templates/List/index.d.ts +2 -2
- package/es/utils/message.d.ts +3 -0
- package/es/utils/message.js +19 -0
- package/lib/actions/dialog-form.d.ts +5 -5
- package/lib/actions/dialog-form.js +1 -5
- package/lib/actions/dialog.d.ts +12 -0
- package/lib/actions/dialog.js +108 -26
- package/lib/actions/index.d.ts +54 -47
- package/lib/actions/index.js +37 -30
- package/lib/actions/index.scss +48 -2
- package/lib/actions/link.js +5 -2
- package/lib/actions/request.d.ts +1 -1
- package/lib/actions/request.js +2 -2
- package/lib/card/index.d.ts +17 -5
- package/lib/card/index.js +18 -12
- package/lib/form/Components/ProField/index.d.ts +1 -161
- package/lib/form/Components/ProField/index.js +32 -38
- package/lib/form/Filter/index.js +2 -2
- package/lib/form/ProForm/index.d.ts +2 -2
- package/lib/form/ProForm/index.js +1 -7
- package/lib/form/ProForm/index.scss +19 -1
- package/lib/form/ProForm/useFieldRequest.d.ts +5 -0
- package/lib/form/ProForm/useFieldRequest.js +37 -0
- package/lib/form/SchemaForm/adapterDecorator.js +4 -2
- package/lib/form/SchemaForm/index.d.ts +2 -2
- package/lib/form/SchemaForm/index.js +11 -22
- package/lib/form/SchemaForm/initializeArrayCards.d.ts +2 -2
- package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +2 -2
- package/lib/form/SchemaForm/initializeArrayItems.d.ts +2 -2
- package/lib/form/SchemaForm/initializeArrayTable.d.ts +2 -2
- package/lib/form/SchemaForm/initializeDataSource.d.ts +2 -2
- package/lib/form/SchemaForm/initializeDataSource.js +2 -2
- package/lib/form/SchemaForm/initializeFormButton.d.ts +2 -2
- package/lib/form/SchemaForm/initializeFormCollapse.d.ts +2 -2
- package/lib/form/SchemaForm/initializeFormGroup.d.ts +2 -2
- package/lib/form/SchemaForm/initializeFormStep.d.ts +3 -3
- package/lib/form/SchemaForm/initializeFormTab.d.ts +2 -2
- package/lib/form/SchemaForm/initializeRequest.d.ts +2 -2
- package/lib/form/SchemaForm/initializeRequest.js +1 -1
- package/lib/form/SchemaForm/initializeRules.js +41 -13
- package/lib/form/SchemaForm/reactions.d.ts +5 -5
- package/lib/form/SchemaForm/reactions.js +22 -20
- package/lib/form/fieldTypeMap.d.ts +4 -0
- package/lib/form/fieldTypeMap.js +48 -0
- package/lib/form/index.d.ts +92 -4
- package/lib/form/index.js +17 -31
- package/lib/form/schemaNameMap.js +3 -0
- package/lib/form/typing.d.ts +49 -26
- package/lib/form/utils.d.ts +3 -1
- package/lib/form/utils.js +43 -1
- package/lib/form/warning.d.ts +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/info/components/InfoGroup/index.js +76 -14
- package/lib/info/components/InfoGroup/index.scss +45 -3
- package/lib/info/components/InfoValueItem/index.js +8 -3
- package/lib/info/components/InfoValueItem/index.scss +5 -1
- package/lib/info/components/ProInfoItem/index.js +2 -2
- package/lib/info/components/ProInfoItem/index.scss +1 -0
- package/lib/info/components/baseInfo/index.d.ts +2 -3
- package/lib/info/components/baseInfo/index.js +29 -10
- package/lib/info/components/headerInfo/index.d.ts +2 -3
- package/lib/info/components/tableInfo/index.d.ts +2 -3
- package/lib/info/components/tableInfo/index.js +1 -1
- package/lib/info/index.js +73 -49
- package/lib/info/typing.d.ts +54 -36
- package/lib/info/utils/index.d.ts +2 -2
- package/lib/info/utils/utils.d.ts +1 -1
- package/lib/nocode/pages/renderer.js +1 -1
- package/lib/page-header/index.d.ts +42 -25
- package/lib/page-header/index.js +54 -30
- package/lib/page-header/index.scss +2 -1
- package/lib/table/components/EmptyContent/index.d.ts +2 -0
- package/lib/table/components/EmptyContent/index.js +25 -0
- package/lib/table/components/Filter/index.d.ts +2 -2
- package/lib/table/components/Filter/index.js +23 -10
- package/lib/table/components/Filter/index.scss +1 -1
- package/lib/table/components/Layout/index.js +1 -1
- package/lib/table/components/QuickAction/index.d.ts +2 -2
- package/lib/table/components/QuickAction/index.js +1 -1
- package/lib/table/components/ToolBar/Fullscreen.js +1 -0
- package/lib/table/index.js +77 -14
- package/lib/table/index.scss +4 -0
- package/lib/table/typing.d.ts +29 -14
- package/lib/table/utils/columnRender.d.ts +3 -3
- package/lib/table/utils/columnRender.js +1 -1
- package/lib/table/utils/genProColumnToColumn.d.ts +2 -2
- package/lib/table/utils/genProColumnToColumn.js +2 -2
- package/lib/table/utils/index.js +33 -11
- package/lib/templates/List/index.d.ts +2 -2
- package/lib/utils/message.d.ts +3 -0
- package/lib/utils/message.js +32 -0
- package/package.json +4 -4
- package/es/form/Components/Search/index.d.ts +0 -11
- package/es/form/Components/Search/index.js +0 -89
- package/es/form/SchemaForm/initializeArrayIcon.d.ts +0 -3
- package/es/form/SchemaForm/initializeArrayIcon.js +0 -62
- package/es/form/SchemaForm/initializeProField.d.ts +0 -5
- package/es/form/SchemaForm/initializeProField.js +0 -70
- package/es/info/utils/useInfoRequest.d.ts +0 -14
- package/es/info/utils/useInfoRequest.js +0 -76
- package/lib/form/Components/Search/index.d.ts +0 -11
- package/lib/form/Components/Search/index.js +0 -103
- package/lib/form/SchemaForm/initializeArrayIcon.d.ts +0 -3
- package/lib/form/SchemaForm/initializeArrayIcon.js +0 -73
- package/lib/form/SchemaForm/initializeProField.d.ts +0 -5
- package/lib/form/SchemaForm/initializeProField.js +0 -77
- package/lib/info/utils/useInfoRequest.d.ts +0 -14
- package/lib/info/utils/useInfoRequest.js +0 -85
package/lib/form/utils.js
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.mergeArrayValue = exports.mapStatus = exports.mapSize = exports.mapSchemaName = exports.getRandomName = void 0;
|
|
6
|
+
exports.mergeArrayValue = exports.mapStatus = exports.mapSize = exports.mapSchemaName = exports.mapMode = exports.mapDataSource = exports.getRandomName = void 0;
|
|
7
|
+
|
|
8
|
+
var _core = require("@formily/core");
|
|
7
9
|
|
|
8
10
|
var _formily = require("@teamix/formily");
|
|
9
11
|
|
|
@@ -91,6 +93,46 @@ var mapStatus = function mapStatus(props, field) {
|
|
|
91
93
|
|
|
92
94
|
exports.mapStatus = mapStatus;
|
|
93
95
|
|
|
96
|
+
var patchDataSource = function patchDataSource() {
|
|
97
|
+
var dataSource = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
98
|
+
|
|
99
|
+
var removeEmptyChildren = function removeEmptyChildren(data) {
|
|
100
|
+
var result = _objectSpread({}, data);
|
|
101
|
+
|
|
102
|
+
if (!result.children || result.children.length === 0) {
|
|
103
|
+
delete result.children;
|
|
104
|
+
} else {
|
|
105
|
+
result.children = result.children.map(removeEmptyChildren);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return result;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
return dataSource.map(removeEmptyChildren);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var mapDataSource = function mapDataSource(props, field) {
|
|
115
|
+
var _props$dataSource;
|
|
116
|
+
|
|
117
|
+
if ((0, _core.isVoidField)(field)) {
|
|
118
|
+
return props;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return _objectSpread(_objectSpread({}, props), {}, {
|
|
122
|
+
dataSource: patchDataSource((_props$dataSource = props.dataSource) !== null && _props$dataSource !== void 0 ? _props$dataSource : field === null || field === void 0 ? void 0 : field.dataSource)
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
exports.mapDataSource = mapDataSource;
|
|
127
|
+
|
|
128
|
+
var mapMode = function mapMode(props, field) {
|
|
129
|
+
return _objectSpread(_objectSpread({}, props), {}, {
|
|
130
|
+
mode: (field === null || field === void 0 ? void 0 : field.readPretty) ? 'read' : 'edit'
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
exports.mapMode = mapMode;
|
|
135
|
+
|
|
94
136
|
var getRandomName = function getRandomName() {
|
|
95
137
|
var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'name';
|
|
96
138
|
return "".concat(prefix, "_").concat(Math.floor(Math.random() * Math.pow(10, 18)));
|
package/lib/form/warning.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const warning:
|
|
1
|
+
import type { ProFormInitializeItem } from './typing';
|
|
2
|
+
declare const warning: ProFormInitializeItem;
|
|
3
3
|
export default warning;
|
package/lib/index.d.ts
CHANGED
|
@@ -21,5 +21,5 @@ export * from './page-container';
|
|
|
21
21
|
export * from './page-header';
|
|
22
22
|
export * from './skeleton';
|
|
23
23
|
export * from './table';
|
|
24
|
-
declare const version = "1.1.
|
|
24
|
+
declare const version = "1.1.39";
|
|
25
25
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, hooks, nocode, templates, utils, };
|
package/lib/index.js
CHANGED
|
@@ -15,37 +15,99 @@ var _hooks = require("@teamix/hooks");
|
|
|
15
15
|
|
|
16
16
|
require("./index.scss");
|
|
17
17
|
|
|
18
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
+
|
|
20
|
+
var _ = _interopRequireDefault(require("../.."));
|
|
21
|
+
|
|
22
|
+
var _excluded = ["children", "url", "method", "params", "formatResult", "onSuccess", "onError", "formatParams", "beforeRequest", "extendParams", "className", "compacted", "divider", "style", "backgroundColor"];
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
18
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); }
|
|
19
27
|
|
|
20
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; }
|
|
21
29
|
|
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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
|
+
|
|
22
40
|
var ProInfoGroup = function ProInfoGroup(props) {
|
|
23
41
|
var children = props.children,
|
|
24
42
|
url = props.url,
|
|
25
43
|
method = props.method,
|
|
26
44
|
params = props.params,
|
|
27
|
-
formatResult = props.formatResult
|
|
45
|
+
formatResult = props.formatResult,
|
|
46
|
+
onSuccess = props.onSuccess,
|
|
47
|
+
onError = props.onError,
|
|
48
|
+
formatParams = props.formatParams,
|
|
49
|
+
beforeRequest = props.beforeRequest,
|
|
50
|
+
extendParams = props.extendParams,
|
|
51
|
+
_props$className = props.className,
|
|
52
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
53
|
+
_props$compacted = props.compacted,
|
|
54
|
+
compacted = _props$compacted === void 0 ? true : _props$compacted,
|
|
55
|
+
_props$divider = props.divider,
|
|
56
|
+
divider = _props$divider === void 0 ? true : _props$divider,
|
|
57
|
+
style = props.style,
|
|
58
|
+
_props$backgroundColo = props.backgroundColor,
|
|
59
|
+
backgroundColor = _props$backgroundColo === void 0 ? '' : _props$backgroundColo,
|
|
60
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
61
|
+
|
|
28
62
|
var ref = (0, _react.useRef)();
|
|
29
63
|
var size = (0, _hooks.useSize)(ref);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
formatResult: formatResult
|
|
64
|
+
var infoType = 'infoDom';
|
|
65
|
+
|
|
66
|
+
if (Array.isArray(children)) {
|
|
67
|
+
if ( /*#__PURE__*/(0, _react.isValidElement)(children === null || children === void 0 ? void 0 : children[0])) {
|
|
68
|
+
infoType = 'infoDomGroup';
|
|
69
|
+
} else {
|
|
70
|
+
infoType = 'infoPropsGroup';
|
|
38
71
|
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
var providerValue = {
|
|
75
|
+
visible: true,
|
|
76
|
+
size: size,
|
|
77
|
+
url: url,
|
|
78
|
+
method: method,
|
|
79
|
+
params: params,
|
|
80
|
+
formatResult: formatResult,
|
|
81
|
+
onSuccess: onSuccess,
|
|
82
|
+
onError: onError,
|
|
83
|
+
formatParams: formatParams,
|
|
84
|
+
beforeRequest: beforeRequest,
|
|
85
|
+
extendParams: extendParams
|
|
86
|
+
};
|
|
87
|
+
var proInfoClassName = (0, _classnames.default)({
|
|
88
|
+
'teamix-pro-info-group-item': true,
|
|
89
|
+
'teamix-pro-info-group-item-divider': divider
|
|
90
|
+
});
|
|
91
|
+
return /*#__PURE__*/_react.default.createElement(_utils.ProInfoGroupContext.Provider, {
|
|
92
|
+
value: providerValue
|
|
39
93
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
-
className: "teamix-pro-info-group",
|
|
94
|
+
className: "teamix-pro-info-group ".concat(backgroundColor, " ").concat(className),
|
|
95
|
+
style: style,
|
|
41
96
|
ref: ref
|
|
42
|
-
},
|
|
97
|
+
}, infoType === 'infoDomGroup' && (children === null || children === void 0 ? void 0 : children.map(function (item, index) {
|
|
43
98
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
-
className:
|
|
99
|
+
className: proInfoClassName,
|
|
45
100
|
key: index
|
|
46
101
|
}, item);
|
|
47
|
-
})),
|
|
48
|
-
|
|
102
|
+
})), infoType === 'infoPropsGroup' && (children === null || children === void 0 ? void 0 : children.map(function (item, index) {
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
104
|
+
className: proInfoClassName,
|
|
105
|
+
key: index
|
|
106
|
+
}, /*#__PURE__*/_react.default.createElement(_.default, _objectSpread({
|
|
107
|
+
compacted: compacted
|
|
108
|
+
}, item)));
|
|
109
|
+
})), infoType === 'infoDom' && /*#__PURE__*/_react.default.createElement("div", {
|
|
110
|
+
className: proInfoClassName
|
|
49
111
|
}, children)));
|
|
50
112
|
};
|
|
51
113
|
|
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
.teamix-pro-info-group {
|
|
2
2
|
&-item {
|
|
3
|
+
|
|
3
4
|
margin-top: 16px;
|
|
4
|
-
|
|
5
|
-
margin-bottom: 16px;
|
|
5
|
+
margin-bottom: 0;
|
|
6
6
|
|
|
7
7
|
.teamix-pro-info {
|
|
8
|
-
padding-bottom:
|
|
8
|
+
padding-bottom: 0;
|
|
9
|
+
|
|
10
|
+
.teamix-pro-card-content {
|
|
11
|
+
padding-bottom: calc(var(--card-body-padding-bottom, 16px) - 8px)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.compacted {
|
|
15
|
+
margin-bottom: -8px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-divider {
|
|
20
|
+
border-bottom: 1px solid var(--color-line1-1, #eaeaea);
|
|
21
|
+
margin-bottom: 16px;
|
|
22
|
+
.teamix-pro-info {
|
|
23
|
+
padding-bottom: 16px;
|
|
24
|
+
}
|
|
9
25
|
}
|
|
10
26
|
|
|
11
27
|
}
|
|
28
|
+
|
|
29
|
+
|
|
12
30
|
.teamix-pro-info-group-item:last-child {
|
|
13
31
|
border-bottom: 0;
|
|
14
32
|
margin-bottom: 0;
|
|
@@ -19,4 +37,28 @@
|
|
|
19
37
|
.teamix-pro-info-group-item:first-child {
|
|
20
38
|
margin-top: 0;
|
|
21
39
|
}
|
|
40
|
+
|
|
41
|
+
&.blue {
|
|
42
|
+
background-color: var(--color-notice-1);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.orange {
|
|
46
|
+
background-color: var(--color-warning-1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.yellow {
|
|
50
|
+
background-color: var(--color-help-1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.red {
|
|
54
|
+
background-color: var(--color-error-1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.green {
|
|
58
|
+
background-color: var(--color-success-1);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.grey {
|
|
62
|
+
background-color: var(--color-fill1-2);
|
|
63
|
+
}
|
|
22
64
|
}
|
|
@@ -94,7 +94,9 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
|
94
94
|
var _processRenderFunctio;
|
|
95
95
|
|
|
96
96
|
if (typeof render === 'function') {
|
|
97
|
-
return
|
|
97
|
+
return function () {
|
|
98
|
+
render(value, record);
|
|
99
|
+
};
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
var newRender = processBuriedPoint((_processRenderFunctio = processRenderFunction(render !== null && render !== void 0 ? render : {}, value, record)) !== null && _processRenderFunctio !== void 0 ? _processRenderFunctio : {}, value, record);
|
|
@@ -150,11 +152,14 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
|
150
152
|
|
|
151
153
|
var renderAction = function renderAction() {
|
|
152
154
|
if (actions) {
|
|
153
|
-
return /*#__PURE__*/_react.default.createElement(_actions.
|
|
155
|
+
return /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup, {
|
|
154
156
|
actions: actions,
|
|
155
157
|
type: "text",
|
|
156
158
|
style: {
|
|
157
159
|
marginLeft: '8px'
|
|
160
|
+
},
|
|
161
|
+
context: {
|
|
162
|
+
record: record
|
|
158
163
|
}
|
|
159
164
|
});
|
|
160
165
|
}
|
|
@@ -328,7 +333,7 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
|
328
333
|
}
|
|
329
334
|
|
|
330
335
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
331
|
-
className: cls()
|
|
336
|
+
className: cls('item-value')
|
|
332
337
|
}, /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread({
|
|
333
338
|
type: type,
|
|
334
339
|
value: value,
|
|
@@ -49,7 +49,7 @@ var ProInfoItem = function ProInfoItem(prop) {
|
|
|
49
49
|
className: cls('value')
|
|
50
50
|
}, loading && /*#__PURE__*/_react.default.createElement("div", {
|
|
51
51
|
className: cls('base-skeleton-box')
|
|
52
|
-
}, /*#__PURE__*/_react.default.createElement(_.
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(_.ProSkeletonRaw.Info.Item, null)), !loading && /*#__PURE__*/_react.default.createElement("div", null, value))));
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
if (headerInfoLayout) {
|
|
@@ -70,7 +70,7 @@ var ProInfoItem = function ProInfoItem(prop) {
|
|
|
70
70
|
}
|
|
71
71
|
}, loading && /*#__PURE__*/_react.default.createElement("div", {
|
|
72
72
|
className: cls('base-skeleton-box')
|
|
73
|
-
}, /*#__PURE__*/_react.default.createElement(_.
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement(_.ProSkeletonRaw.Info.Item, null)), !loading && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, value))));
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ProInfoBaseProps, ProInfoTransparentBase } from '../../typing';
|
|
2
|
+
import { ProInfoBaseProps, ProInfoTransparentBase, ProInfoTransRequestResult } from '../../typing';
|
|
3
3
|
import './index.scss';
|
|
4
|
-
|
|
5
|
-
declare type ProBaseInfoProps = ProInfoBaseProps & IUseInfoRequestResult & ProInfoTransparentBase & {
|
|
4
|
+
declare type ProBaseInfoProps = ProInfoBaseProps & ProInfoTransRequestResult & ProInfoTransparentBase & {
|
|
6
5
|
size?: any;
|
|
7
6
|
};
|
|
8
7
|
declare const ProBaseInfo: React.FC<ProBaseInfoProps>;
|
|
@@ -37,29 +37,48 @@ var ProBaseInfo = function ProBaseInfo(props) {
|
|
|
37
37
|
layout = props.layout,
|
|
38
38
|
size = props.size;
|
|
39
39
|
|
|
40
|
-
var defaultLayout = _layout.default[(0, _utils.getLayout)((_size$width = size === null || size === void 0 ? void 0 : size.width) !== null && _size$width !== void 0 ? _size$width : 0)]; //
|
|
40
|
+
var defaultLayout = _layout.default[(0, _utils.getLayout)((_size$width = size === null || size === void 0 ? void 0 : size.width) !== null && _size$width !== void 0 ? _size$width : 0)]; // 获取列内的布局参数
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var getFormItemLayout = function getFormItemLayout() {
|
|
43
|
+
var getFormItemLayout = function getFormItemLayout(colspan) {
|
|
44
|
+
var formItemLayout = JSON.parse(JSON.stringify(defaultLayout.formItemLayout)); // 自定义布局
|
|
45
|
+
|
|
44
46
|
if (layout) {
|
|
45
47
|
var _layout$labelCol, _layout$wrapperCol;
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
var labelCol = (_layout$labelCol = layout === null || layout === void 0 ? void 0 : layout.labelCol) !== null && _layout$labelCol !== void 0 ? _layout$labelCol : defaultLayout.formItemLayout.labelCol;
|
|
50
|
+
var wrapperCol = (_layout$wrapperCol = layout === null || layout === void 0 ? void 0 : layout.wrapperCol) !== null && _layout$wrapperCol !== void 0 ? _layout$wrapperCol : defaultLayout.formItemLayout.wrapperCol;
|
|
51
|
+
formItemLayout.labelCol = labelCol;
|
|
52
|
+
formItemLayout.wrapperCol = wrapperCol;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
var newLabelSpan = formItemLayout.labelCol.span;
|
|
56
|
+
var newWrapperSpan = formItemLayout.wrapperCol.span; // 计算合并列情况。label与wrapper需要重新计算
|
|
57
|
+
|
|
58
|
+
if (colspan) {
|
|
59
|
+
newLabelSpan = newLabelSpan / colspan;
|
|
60
|
+
newWrapperSpan = newWrapperSpan + (formItemLayout.labelCol.span - newLabelSpan);
|
|
51
61
|
}
|
|
52
62
|
|
|
53
|
-
|
|
63
|
+
var newFormItemLayout = {
|
|
64
|
+
labelCol: {
|
|
65
|
+
span: newLabelSpan
|
|
66
|
+
},
|
|
67
|
+
wrapperCol: {
|
|
68
|
+
span: newWrapperSpan
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
return Object.assign(formItemLayout, newFormItemLayout);
|
|
54
72
|
};
|
|
55
73
|
|
|
56
74
|
var renderContent = function renderContent() {
|
|
57
75
|
return columns.map(function (item, index) {
|
|
58
|
-
var _layout$span, _item$title, _item$valueType, _ref;
|
|
76
|
+
var _layout$span, _layout$span2, _item$title, _item$valueType, _ref, _item$colSpan;
|
|
59
77
|
|
|
60
78
|
var span = item.colSpan ? defaultLayout.span * item.colSpan : defaultLayout.span;
|
|
79
|
+
var layoutSpan = item.colSpan ? ((_layout$span = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span !== void 0 ? _layout$span : span) * item.colSpan : (_layout$span2 = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span2 !== void 0 ? _layout$span2 : span;
|
|
61
80
|
return /*#__PURE__*/_react.default.createElement(Col, {
|
|
62
|
-
span:
|
|
81
|
+
span: layoutSpan,
|
|
63
82
|
key: index
|
|
64
83
|
}, /*#__PURE__*/_react.default.createElement(_ProInfoItem.default, {
|
|
65
84
|
label: (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : '',
|
|
@@ -73,7 +92,7 @@ var ProBaseInfo = function ProBaseInfo(props) {
|
|
|
73
92
|
record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
|
|
74
93
|
actionRef: actionRef
|
|
75
94
|
}),
|
|
76
|
-
baseInfoLayout: getFormItemLayout(),
|
|
95
|
+
baseInfoLayout: getFormItemLayout((_item$colSpan = item === null || item === void 0 ? void 0 : item.colSpan) !== null && _item$colSpan !== void 0 ? _item$colSpan : 0),
|
|
77
96
|
tooltip: item.tooltip,
|
|
78
97
|
tooltipIcon: item.tooltipIcon
|
|
79
98
|
}));
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IProHeaderInfo, ProInfoTransparentBase } from '../../typing';
|
|
3
|
-
import { IUseInfoRequestResult } from '../../utils/useInfoRequest';
|
|
2
|
+
import { IProHeaderInfo, ProInfoTransparentBase, ProInfoTransRequestResult } from '../../typing';
|
|
4
3
|
import './index.scss';
|
|
5
|
-
declare type ProHeaderInfoProps = IProHeaderInfo &
|
|
4
|
+
declare type ProHeaderInfoProps = IProHeaderInfo & ProInfoTransRequestResult & ProInfoTransparentBase & {
|
|
6
5
|
size?: any;
|
|
7
6
|
};
|
|
8
7
|
declare const ProHeaderInfo: React.FC<ProHeaderInfoProps>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.scss';
|
|
3
|
-
import { IProTableInfo, ProInfoTransparentBase } from '../../typing';
|
|
3
|
+
import { IProTableInfo, ProInfoTransparentBase, ProInfoTransRequestResult } from '../../typing';
|
|
4
4
|
import './index.scss';
|
|
5
|
-
|
|
6
|
-
declare type ProTableInfoProps = IProTableInfo & IUseInfoRequestResult & ProInfoTransparentBase;
|
|
5
|
+
declare type ProTableInfoProps = IProTableInfo & ProInfoTransRequestResult & ProInfoTransparentBase;
|
|
7
6
|
declare const ProTableInfo: React.FC<ProTableInfoProps>;
|
|
8
7
|
export default ProTableInfo;
|
|
@@ -128,7 +128,7 @@ var ProTableInfo = function ProTableInfo(props) {
|
|
|
128
128
|
label: (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : '',
|
|
129
129
|
tooltip: item.tooltip,
|
|
130
130
|
icon: item.tooltipIcon
|
|
131
|
-
})), _defineProperty(_data, "value_".concat(index), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, loading && /*#__PURE__*/_react.default.createElement(_2.
|
|
131
|
+
})), _defineProperty(_data, "value_".concat(index), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, loading && /*#__PURE__*/_react.default.createElement(_2.ProSkeletonRaw.Info.Item, null), !loading && getInfoValueItem(item))), _data);
|
|
132
132
|
|
|
133
133
|
if (item.colSpan) {
|
|
134
134
|
data['formatter'] = {
|