@teamix/pro 1.1.39 → 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 +2214 -4073
- 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 +6 -3
- package/es/actions/dialog.js +12 -5
- package/es/actions/index.d.ts +54 -47
- package/es/actions/index.js +28 -22
- package/es/actions/index.scss +17 -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 -78
- 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 +44 -21
- 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 +6 -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/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 +52 -49
- package/es/info/typing.d.ts +52 -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 +34 -21
- package/es/page-header/index.js +39 -30
- 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 +16 -8
- 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 +27 -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 +6 -3
- package/lib/actions/dialog.js +13 -5
- package/lib/actions/index.d.ts +54 -47
- package/lib/actions/index.js +37 -30
- package/lib/actions/index.scss +17 -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 -78
- 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 +44 -21
- 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 +5 -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/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 +51 -48
- package/lib/info/typing.d.ts +52 -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 +34 -21
- package/lib/page-header/index.js +37 -28
- 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 +16 -8
- 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 +27 -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/actions/index.js
CHANGED
@@ -3,11 +3,11 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.ActionButton = void 0;
|
7
|
-
exports.
|
8
|
-
exports.default = exports.
|
6
|
+
exports.ProActionButton = exports.ActionMenuButton = exports.ActionGroup = exports.ActionButton = void 0;
|
7
|
+
exports.ProActionGroup = ProActionGroup;
|
8
|
+
exports.default = exports.ProActionMenuButton = void 0;
|
9
9
|
exports.registerActionHandler = registerActionHandler;
|
10
|
-
exports.useAction =
|
10
|
+
exports.useAction = useAction;
|
11
11
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
13
13
|
|
@@ -91,7 +91,7 @@ function registerActionHandler(id, extendActionId, defaultConfig) {
|
|
91
91
|
});
|
92
92
|
}
|
93
93
|
|
94
|
-
|
94
|
+
function useAction(config, context) {
|
95
95
|
if (!config) {
|
96
96
|
return {};
|
97
97
|
}
|
@@ -164,9 +164,7 @@ var useAction = function useAction(config, context) {
|
|
164
164
|
return useAction(_objectSpread(_objectSpread({
|
165
165
|
type: registedAction.extendActionId
|
166
166
|
}, registedAction.defaultConfig), others), context);
|
167
|
-
}
|
168
|
-
|
169
|
-
exports.useAction = useAction;
|
167
|
+
}
|
170
168
|
|
171
169
|
var buttonContent = function buttonContent(content, iconType, iconSize, context) {
|
172
170
|
var renderedContent = typeof content === 'function' ? content(context) : content;
|
@@ -182,7 +180,7 @@ var buttonContent = function buttonContent(content, iconType, iconSize, context)
|
|
182
180
|
}), renderedContent];
|
183
181
|
};
|
184
182
|
|
185
|
-
var
|
183
|
+
var ProActionButton = function ProActionButton(props) {
|
186
184
|
var config = props.config,
|
187
185
|
icon = props.icon,
|
188
186
|
_props$iconSize = props.iconSize,
|
@@ -206,7 +204,7 @@ var ActionButton = function ActionButton(props) {
|
|
206
204
|
}, buttonProps), buttonContent(children, icon, iconSize, context));
|
207
205
|
};
|
208
206
|
|
209
|
-
exports.
|
207
|
+
exports.ProActionButton = ProActionButton;
|
210
208
|
|
211
209
|
function renderMenuButtonItem(item, key, context) {
|
212
210
|
var config = item.config,
|
@@ -249,7 +247,7 @@ function renderCommonActionButtonMenuItem(action, key, context) {
|
|
249
247
|
return renderMenuButtonItem(action, key, context);
|
250
248
|
}
|
251
249
|
|
252
|
-
var
|
250
|
+
var ProActionMenuButton = function ProActionMenuButton(props) {
|
253
251
|
var icon = props.icon,
|
254
252
|
iconSize = props.iconSize,
|
255
253
|
label = props.label,
|
@@ -277,7 +275,7 @@ var ActionMenuButton = function ActionMenuButton(props) {
|
|
277
275
|
}; // 如果 actions 数量超过了 max,则把第 max 个和剩余超出部分折叠起来成为一个 menu
|
278
276
|
|
279
277
|
|
280
|
-
exports.
|
278
|
+
exports.ProActionMenuButton = ProActionMenuButton;
|
281
279
|
|
282
280
|
function formatGroupActions(actions, max, moreConfig) {
|
283
281
|
var MAX = max < 1 ? MAX_ACTTIONS : max;
|
@@ -300,19 +298,13 @@ function renderCommonActionButton(button, context, isTypeText) {
|
|
300
298
|
var buttonProps = _objectSpread({
|
301
299
|
context: Object.assign({}, context, buttonContext),
|
302
300
|
text: text || isTypeText
|
303
|
-
}, others);
|
304
|
-
|
301
|
+
}, others);
|
305
302
|
|
306
303
|
if (!button.actions) {
|
307
|
-
return (
|
308
|
-
|
309
|
-
// @ts-ignore
|
310
|
-
_react.default.createElement(ActionButton, _objectSpread({}, buttonProps))
|
311
|
-
);
|
312
|
-
} // @ts-ignore
|
313
|
-
|
304
|
+
return /*#__PURE__*/_react.default.createElement(ProActionButton, _objectSpread({}, buttonProps));
|
305
|
+
}
|
314
306
|
|
315
|
-
return /*#__PURE__*/_react.default.createElement(
|
307
|
+
return /*#__PURE__*/_react.default.createElement(ProActionMenuButton, _objectSpread({}, buttonProps));
|
316
308
|
}
|
317
309
|
|
318
310
|
function getDefaultMoreButton(type, moreText) {
|
@@ -339,9 +331,7 @@ function getDefaultMoreButton(type, moreText) {
|
|
339
331
|
var MAX_ACTTIONS = 4;
|
340
332
|
|
341
333
|
function getActionConfig(action, context) {
|
342
|
-
// @ts-ignore
|
343
334
|
if (action.actions) {
|
344
|
-
// @ts-ignore
|
345
335
|
var actions = action.actions,
|
346
336
|
_others = _objectWithoutProperties(action, _excluded6);
|
347
337
|
|
@@ -350,8 +340,7 @@ function getActionConfig(action, context) {
|
|
350
340
|
return getActionConfig(a, context);
|
351
341
|
})
|
352
342
|
}, (0, _utils.getTargetValue)(_others, context));
|
353
|
-
}
|
354
|
-
|
343
|
+
}
|
355
344
|
|
356
345
|
var config = action.config,
|
357
346
|
others = _objectWithoutProperties(action, _excluded7);
|
@@ -361,7 +350,7 @@ function getActionConfig(action, context) {
|
|
361
350
|
}, (0, _utils.getTargetValue)(others, context));
|
362
351
|
}
|
363
352
|
|
364
|
-
function
|
353
|
+
function ProActionGroup(props) {
|
365
354
|
var _props$type3 = props.type,
|
366
355
|
type = _props$type3 === void 0 ? 'button' : _props$type3,
|
367
356
|
_props$divider = props.divider,
|
@@ -383,8 +372,8 @@ function ActionGroup(props) {
|
|
383
372
|
});
|
384
373
|
var formatedActions = formatGroupActions(filteredActions, max, getDefaultMoreButton(type, moreText));
|
385
374
|
return /*#__PURE__*/_react.default.createElement("div", _objectSpread({
|
386
|
-
className: (0, _classnames.default)('teamix-pro-actions', type, className, {
|
387
|
-
divider: divider
|
375
|
+
className: (0, _classnames.default)('teamix-pro-actions', "teamix-pro-actions-type-".concat(type), className, {
|
376
|
+
'teamix-pro-actions-divider': type === 'button' ? false : divider
|
388
377
|
})
|
389
378
|
}, containerProps), formatedActions.map(function (actionBtn, i) {
|
390
379
|
var isLastOne = i === formatedActions.length - 1;
|
@@ -401,4 +390,22 @@ var ProAction = function ProAction(props) {
|
|
401
390
|
};
|
402
391
|
|
403
392
|
var _default = ProAction;
|
404
|
-
|
393
|
+
/**
|
394
|
+
* @deprecated 建议使用 ProActionGroup 代替
|
395
|
+
*/
|
396
|
+
|
397
|
+
exports.default = _default;
|
398
|
+
var ActionGroup = ProActionGroup;
|
399
|
+
/**
|
400
|
+
* @deprecated 建议使用 ProActionButton 代替
|
401
|
+
*/
|
402
|
+
|
403
|
+
exports.ActionGroup = ActionGroup;
|
404
|
+
var ActionButton = ProActionButton;
|
405
|
+
/**
|
406
|
+
* @deprecated 建议使用 ProActionMenuButton 代替
|
407
|
+
*/
|
408
|
+
|
409
|
+
exports.ActionButton = ActionButton;
|
410
|
+
var ActionMenuButton = ProActionMenuButton;
|
411
|
+
exports.ActionMenuButton = ActionMenuButton;
|
package/lib/actions/index.scss
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
display: flex;
|
3
3
|
align-items: center;
|
4
4
|
flex-wrap: wrap;
|
5
|
-
&.button {
|
5
|
+
&.teamix-pro-actions-type-button {
|
6
6
|
& > button {
|
7
7
|
&:not(:last-child) {
|
8
8
|
margin-right: var(--s-2);
|
@@ -10,7 +10,7 @@
|
|
10
10
|
}
|
11
11
|
}
|
12
12
|
|
13
|
-
&.text:not(.divider) {
|
13
|
+
&.teamix-pro-actions-type-text:not(.teamix-pro-actions-divider) {
|
14
14
|
& > button {
|
15
15
|
&:not(:last-child) {
|
16
16
|
margin-right: var(--s-4);
|
@@ -58,6 +58,16 @@
|
|
58
58
|
margin-bottom: var(--s-2);
|
59
59
|
}
|
60
60
|
|
61
|
+
.teamix-pro-dialog-message {
|
62
|
+
margin-bottom: var(--s-2);
|
63
|
+
|
64
|
+
&+.next-loading {
|
65
|
+
.teamix-pro-form {
|
66
|
+
margin-top: 20px;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
61
71
|
.teamix-pro-dialog-after-content {
|
62
72
|
margin-top: var(--s-2);
|
63
73
|
}
|
@@ -67,6 +77,11 @@
|
|
67
77
|
}
|
68
78
|
|
69
79
|
.next-dialog-body {
|
80
|
+
.teamix-pro-dialog-footer-description {
|
81
|
+
.teamix-pro-form {
|
82
|
+
margin-bottom: 0;
|
83
|
+
}
|
84
|
+
}
|
70
85
|
.teamix-pro-form {
|
71
86
|
margin-bottom: -20px;
|
72
87
|
}
|
package/lib/card/index.d.ts
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ActionGroupProps } from '../actions';
|
3
3
|
import './index.scss';
|
4
|
-
export declare type
|
4
|
+
export declare type ProCardContainerProps = {
|
5
5
|
direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
6
6
|
spacing?: [number, number] | number;
|
7
7
|
wrap?: boolean;
|
8
8
|
} & React.HTMLAttributes<HTMLElement>;
|
9
|
-
export declare const
|
10
|
-
export interface
|
9
|
+
export declare const ProCardContainer: React.FC<ProCardContainerProps>;
|
10
|
+
export interface ProCardProps {
|
11
11
|
/** 内容部分 */
|
12
12
|
children?: React.ReactNode;
|
13
13
|
/**卡片标题 */
|
@@ -43,5 +43,17 @@ export interface CardProps {
|
|
43
43
|
/**卡片内容样式 */
|
44
44
|
contentStyle?: React.CSSProperties;
|
45
45
|
}
|
46
|
-
declare const
|
47
|
-
export default
|
46
|
+
declare const ProCard: React.FC<ProCardProps>;
|
47
|
+
export default ProCard;
|
48
|
+
/**
|
49
|
+
* @deprecated 建议使用 ProCardContainer 代替
|
50
|
+
*/
|
51
|
+
export declare const CardContainer: React.FC<ProCardContainerProps>;
|
52
|
+
/**
|
53
|
+
* @deprecated 建议使用 ProCardProps 代替
|
54
|
+
*/
|
55
|
+
export declare type CardProps = ProCardProps;
|
56
|
+
/**
|
57
|
+
* @deprecated 建议使用 ProCardContainerProps 代替
|
58
|
+
*/
|
59
|
+
export declare type CardContainerProps = ProCardContainerProps;
|
package/lib/card/index.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.default = exports.CardContainer = void 0;
|
6
|
+
exports.default = exports.ProCardContainer = exports.CardContainer = void 0;
|
7
7
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
@@ -59,7 +59,7 @@ function getColClassAndStyle(col) {
|
|
59
59
|
};
|
60
60
|
}
|
61
61
|
|
62
|
-
var
|
62
|
+
var ProCardContainer = function ProCardContainer(props) {
|
63
63
|
var children = props.children,
|
64
64
|
style = props.style,
|
65
65
|
className = props.className,
|
@@ -108,8 +108,8 @@ var CardContainer = function CardContainer(props) {
|
|
108
108
|
}, childrenModified);
|
109
109
|
};
|
110
110
|
|
111
|
-
exports.
|
112
|
-
|
111
|
+
exports.ProCardContainer = ProCardContainer;
|
112
|
+
ProCardContainer.defaultProps = {
|
113
113
|
spacing: 16,
|
114
114
|
direction: 'column'
|
115
115
|
};
|
@@ -120,7 +120,7 @@ var renderExtra = function renderExtra(extra) {
|
|
120
120
|
}
|
121
121
|
|
122
122
|
if (extra.actions instanceof Array) {
|
123
|
-
return /*#__PURE__*/_react.default.createElement(_actions.
|
123
|
+
return /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup, _objectSpread(_objectSpread({}, extra), {}, {
|
124
124
|
type: "text"
|
125
125
|
}));
|
126
126
|
}
|
@@ -128,7 +128,7 @@ var renderExtra = function renderExtra(extra) {
|
|
128
128
|
return extra;
|
129
129
|
};
|
130
130
|
|
131
|
-
var
|
131
|
+
var ProCard = function ProCard(props) {
|
132
132
|
var children = props.children,
|
133
133
|
title = props.title,
|
134
134
|
subTitle = props.subTitle,
|
@@ -157,7 +157,7 @@ var Card = function Card(props) {
|
|
157
157
|
component: "img",
|
158
158
|
src: image
|
159
159
|
}), (title || extra) && /*#__PURE__*/_react.default.createElement(_components.Card.Header, {
|
160
|
-
title: loading ? /*#__PURE__*/_react.default.createElement(_skeleton.
|
160
|
+
title: loading ? /*#__PURE__*/_react.default.createElement(_skeleton.ProSkeletonRaw.Card.Title, null) : title,
|
161
161
|
subTitle: !loading && subTitle,
|
162
162
|
extra: !loading && renderExtra(extra)
|
163
163
|
}), divider && /*#__PURE__*/_react.default.createElement(_components.Card.Divider, null), /*#__PURE__*/_react.default.createElement(_components.Card.Content, {
|
@@ -165,14 +165,20 @@ var Card = function Card(props) {
|
|
165
165
|
centered: centered
|
166
166
|
}),
|
167
167
|
style: contentStyle
|
168
|
-
}, loading && /*#__PURE__*/_react.default.createElement(_skeleton.
|
168
|
+
}, loading && /*#__PURE__*/_react.default.createElement(_skeleton.ProSkeletonRaw.Card.Content, null), !loading && children));
|
169
169
|
};
|
170
170
|
|
171
|
-
|
171
|
+
ProCard.defaultProps = {
|
172
172
|
bordered: true,
|
173
173
|
hoveredShadow: false
|
174
174
|
}; // @ts-ignore
|
175
175
|
|
176
|
-
|
177
|
-
var _default =
|
178
|
-
|
176
|
+
ProCard.isProCard = true;
|
177
|
+
var _default = ProCard;
|
178
|
+
/**
|
179
|
+
* @deprecated 建议使用 ProCardContainer 代替
|
180
|
+
*/
|
181
|
+
|
182
|
+
exports.default = _default;
|
183
|
+
var CardContainer = ProCardContainer;
|
184
|
+
exports.CardContainer = CardContainer;
|
@@ -1,79 +1,2 @@
|
|
1
|
-
|
2
|
-
declare const _default: React.ForwardRefExoticComponent<(Partial<import("@teamix/pro-field/lib/components/FieldText").IProFieldText & {
|
3
|
-
type: "text";
|
4
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldTextArea").IProFieldTextArea & {
|
5
|
-
type: "textarea";
|
6
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldMoney").IProFieldMoney & {
|
7
|
-
type: "money";
|
8
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldCheckBox").IProFieldCheckBox & {
|
9
|
-
type: "checkbox";
|
10
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldRadio").IProFieldRadio & {
|
11
|
-
type: "radio";
|
12
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldSelect").IProFieldSelect & {
|
13
|
-
type: "select";
|
14
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldMultipleSelect").IProFieldMultipleSelect & {
|
15
|
-
type: "multipleSelect";
|
16
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDate & {
|
17
|
-
type: "date";
|
18
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateWeek & {
|
19
|
-
type: "dateWeek";
|
20
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateMonth & {
|
21
|
-
type: "dateMonth";
|
22
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateYear & {
|
23
|
-
type: "dateYear";
|
24
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateQuarter & {
|
25
|
-
type: "dateQuarter";
|
26
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateRange & {
|
27
|
-
type: "dateRange";
|
28
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateWeekRange & {
|
29
|
-
type: "dateWeekRange";
|
30
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateMonthRange & {
|
31
|
-
type: "dateMonthRange";
|
32
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateYearRange & {
|
33
|
-
type: "dateYearRange";
|
34
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateQuarterRange & {
|
35
|
-
type: "dateQuarterRange";
|
36
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateTime & {
|
37
|
-
type: "dateTime";
|
38
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldDateTimeRange & {
|
39
|
-
type: "dateTimeRange";
|
40
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldTime & {
|
41
|
-
type: "time";
|
42
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldDate").IProFieldTimeRange & {
|
43
|
-
type: "timeRange";
|
44
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldNumber").IProFieldNumber & {
|
45
|
-
type: "number";
|
46
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldPercent").IProFieldPercent & {
|
47
|
-
type: "percent";
|
48
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldCascader").IProFieldCascader & {
|
49
|
-
type: "cascader";
|
50
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldCascader").IProFieldMultipleCascader & {
|
51
|
-
type: "multipleCascader";
|
52
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldCascader").IProFieldArbitraryCascader & {
|
53
|
-
type: "arbitraryCascader";
|
54
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldSwitch").IProFieldSwitch & {
|
55
|
-
type: "switch";
|
56
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldColor").IProFieldColor & {
|
57
|
-
type: "color" | "colorSwatches" | "colorRadio" | "colorTwitter";
|
58
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldIcon").IProFieldIcon & {
|
59
|
-
type: "icon";
|
60
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldTreeSelect").IProFieldTreeSelect & {
|
61
|
-
type: "treeSelect";
|
62
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldJson").IProFieldJson & {
|
63
|
-
type: "json";
|
64
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldTransfer").IProFieldTransfer & {
|
65
|
-
type: "transfer";
|
66
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldRange").IProFieldRange & {
|
67
|
-
type: "range";
|
68
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldPassword").IProFieldPassword & {
|
69
|
-
type: "password";
|
70
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldSearch").IProFieldSearch & {
|
71
|
-
type: "search";
|
72
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldTagFilter").IProFieldTagFilter & {
|
73
|
-
type: "tagFilter";
|
74
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldTagFilter").IProFieldMultipleTagFilter & {
|
75
|
-
type: "multipleTagPicker";
|
76
|
-
}> | Partial<import("@teamix/pro-field/lib/components/FieldMenuSelect").IProFieldMenuSelect & {
|
77
|
-
type: "menuSelect";
|
78
|
-
}> | Pick<Partial<import("@teamix/pro-field").IProFieldCustom>, keyof import("@teamix/pro-field").IProFieldCustom>) & React.RefAttributes<unknown>>;
|
1
|
+
declare const _default: any;
|
79
2
|
export default _default;
|
@@ -7,62 +7,56 @@ exports.default = void 0;
|
|
7
7
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
9
9
|
|
10
|
-
var _core = require("@formily/core");
|
11
|
-
|
12
10
|
var _react2 = require("@formily/react");
|
13
11
|
|
12
|
+
var _utils = require("../../utils");
|
13
|
+
|
14
14
|
var _field = _interopRequireDefault(require("../../../field"));
|
15
15
|
|
16
|
-
var
|
16
|
+
var _fieldTypeMap = _interopRequireDefault(require("../../fieldTypeMap"));
|
17
17
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
19
|
|
20
|
-
function
|
20
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
21
21
|
|
22
|
-
function
|
23
|
-
|
24
|
-
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; }
|
22
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
25
23
|
|
26
|
-
var
|
27
|
-
var dataSource = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
24
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
28
25
|
|
29
|
-
|
30
|
-
var result = _objectSpread({}, data);
|
26
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
31
27
|
|
32
|
-
|
33
|
-
delete result.children;
|
34
|
-
} else {
|
35
|
-
result.children = result.children.map(removeEmptyChildren);
|
36
|
-
}
|
28
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
37
29
|
|
38
|
-
|
39
|
-
};
|
30
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
40
31
|
|
41
|
-
|
42
|
-
};
|
32
|
+
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; }
|
43
33
|
|
44
|
-
var
|
45
|
-
var _props$dataSource;
|
34
|
+
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; }
|
46
35
|
|
47
|
-
|
48
|
-
return props;
|
49
|
-
}
|
36
|
+
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; }
|
50
37
|
|
51
|
-
|
52
|
-
|
53
|
-
|
38
|
+
var componentBuilder = function componentBuilder(type) {
|
39
|
+
return (0, _react2.connect)(function (props) {
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread(_objectSpread({}, props), {}, {
|
41
|
+
type: type
|
42
|
+
}));
|
43
|
+
}, (0, _react2.mapProps)(_utils.mapSize, _utils.mapStatus, _utils.mapDataSource, _utils.mapMode), (0, _react2.mapReadPretty)(function (props) {
|
44
|
+
return /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread(_objectSpread({}, props), {}, {
|
45
|
+
mode: "read"
|
46
|
+
}));
|
47
|
+
}));
|
54
48
|
};
|
55
49
|
|
56
|
-
var
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
50
|
+
var _default = function () {
|
51
|
+
var components = {};
|
52
|
+
Object.entries(_fieldTypeMap.default).forEach(function (_ref) {
|
53
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
54
|
+
name = _ref2[0],
|
55
|
+
type = _ref2[1];
|
61
56
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
}));
|
57
|
+
components[name] = componentBuilder(type);
|
58
|
+
});
|
59
|
+
return components;
|
60
|
+
}();
|
67
61
|
|
68
62
|
exports.default = _default;
|
package/lib/form/Filter/index.js
CHANGED
@@ -100,7 +100,7 @@ var SimpleFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
100
100
|
}, []);
|
101
101
|
var eventProps = getEventProps(triggerType, onFilter);
|
102
102
|
return /*#__PURE__*/_react.default.createElement(_ProForm.default, _objectSpread(_objectSpread(_objectSpread({
|
103
|
-
feedbackLayout: "
|
103
|
+
feedbackLayout: "popover",
|
104
104
|
breakpoints: [],
|
105
105
|
inset: true
|
106
106
|
}, otherProps), eventProps), {}, {
|
@@ -229,7 +229,7 @@ var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
229
229
|
}, [layout, labelAlign, wrapperAlign, labelCol, wrapperCol]);
|
230
230
|
var eventProps = getEventProps(triggerType, onFilter);
|
231
231
|
return /*#__PURE__*/_react.default.createElement(_ProForm.default, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
232
|
-
feedbackLayout: "
|
232
|
+
feedbackLayout: "popover"
|
233
233
|
}, props), eventProps), getTeamixLayout), {}, {
|
234
234
|
form: form,
|
235
235
|
className: (0, _classnames.default)(prefixCls, props.className),
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import type {
|
2
|
+
import type { ProFormProps } from '../typing';
|
3
3
|
import './index.scss';
|
4
|
-
declare const ProForm: React.FC<
|
4
|
+
declare const ProForm: React.FC<ProFormProps>;
|
5
5
|
export default ProForm;
|
@@ -17,8 +17,6 @@ var _reactive = require("@formily/reactive");
|
|
17
17
|
|
18
18
|
var _formily = require("@teamix/formily");
|
19
19
|
|
20
|
-
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
21
|
-
|
22
20
|
var _utils = require("@teamix/utils");
|
23
21
|
|
24
22
|
var _SchemaForm = _interopRequireDefault(require("../SchemaForm"));
|
@@ -136,11 +134,7 @@ var ProForm = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
136
134
|
});
|
137
135
|
ProForm.defaultProps = {
|
138
136
|
colon: false,
|
139
|
-
labelAlign: 'left'
|
140
|
-
tooltipIcon: /*#__PURE__*/_react.default.createElement(_icon.default, {
|
141
|
-
type: "info-circle-line",
|
142
|
-
size: "small"
|
143
|
-
})
|
137
|
+
labelAlign: 'left'
|
144
138
|
};
|
145
139
|
var _default = ProForm;
|
146
140
|
exports.default = _default;
|
@@ -109,6 +109,11 @@
|
|
109
109
|
}
|
110
110
|
}
|
111
111
|
|
112
|
+
// Icon
|
113
|
+
.#{$css-prefix}formily-icon {
|
114
|
+
transform: translate(0, -1px);
|
115
|
+
}
|
116
|
+
|
112
117
|
// 撑满模式
|
113
118
|
.#{$form-item-cls}-fullness {
|
114
119
|
> .#{$form-item-cls}-control {
|
@@ -179,10 +184,20 @@
|
|
179
184
|
|
180
185
|
// 数组类组件添加按钮
|
181
186
|
.#{$css-prefix}formily-array-base-addition {
|
182
|
-
|
187
|
+
.#{$css-prefix}formily-icon {
|
183
188
|
margin-right: 4px;
|
184
189
|
}
|
185
190
|
}
|
191
|
+
// 数组类ArrayItem Icon 居中
|
192
|
+
.#{$css-prefix}formily-array-items-item-inner {
|
193
|
+
> .#{$css-prefix}box {
|
194
|
+
> .#{$css-prefix}space-item {
|
195
|
+
> .#{$css-prefix}formily-icon {
|
196
|
+
margin-top: 9px;
|
197
|
+
}
|
198
|
+
}
|
199
|
+
}
|
200
|
+
}
|
186
201
|
|
187
202
|
// Editable预览态行高
|
188
203
|
.#{$css-prefix}formily-editable-content {
|
@@ -248,6 +263,9 @@
|
|
248
263
|
// 高级筛选
|
249
264
|
.#{$teamix-pro-form}-filter-advanced,
|
250
265
|
.#{$teamix-pro-form}-filter-simple {
|
266
|
+
.#{$form-item-cls}-feedback-layout-popover {
|
267
|
+
margin-bottom: 0;
|
268
|
+
}
|
251
269
|
.#{$css-prefix}date-picker2-input {
|
252
270
|
.#{$css-prefix}input {
|
253
271
|
width: inherit;
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
|
8
|
+
var _react = require("@formily/react");
|
9
|
+
|
10
|
+
var _utils = require("@teamix/utils");
|
11
|
+
|
12
|
+
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; }
|
13
|
+
|
14
|
+
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; }
|
15
|
+
|
16
|
+
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; }
|
17
|
+
|
18
|
+
var _default = function _default() {
|
19
|
+
var field = (0, _react.useField)();
|
20
|
+
|
21
|
+
var refresh = function refresh() {
|
22
|
+
if (!(0, _utils.isPlainObj)(field.data)) {
|
23
|
+
field.data = {
|
24
|
+
refresh: {}
|
25
|
+
};
|
26
|
+
} else {
|
27
|
+
field.data.refresh = _objectSpread({}, field.data.refresh);
|
28
|
+
}
|
29
|
+
};
|
30
|
+
|
31
|
+
return {
|
32
|
+
refresh: refresh,
|
33
|
+
field: field
|
34
|
+
};
|
35
|
+
};
|
36
|
+
|
37
|
+
exports.default = _default;
|
@@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
7
|
|
8
|
-
var
|
8
|
+
var _fieldTypeMap = _interopRequireDefault(require("../fieldTypeMap"));
|
9
|
+
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9
11
|
|
10
12
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
11
13
|
|
@@ -24,7 +26,7 @@ var _default = function _default(decorator, component) {
|
|
24
26
|
return decorator;
|
25
27
|
}
|
26
28
|
|
27
|
-
if ([].concat(_toConsumableArray(Object.keys(
|
29
|
+
if ([].concat(_toConsumableArray(Object.keys(_fieldTypeMap.default)), ['Upload', 'ArrayCards', 'ArrayCollapse', 'ArrayTable', 'ArrayItems']).includes(component)) {
|
28
30
|
return 'FormItem';
|
29
31
|
}
|
30
32
|
|