@teamix/pro 1.2.9 → 1.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/212.js +1 -1
- package/dist/pro.css +1 -1
- package/dist/pro.js +2103 -993
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/base.d.ts +16 -6
- package/es/actions/base.js +66 -12
- package/es/actions/confirm.d.ts +1 -1
- package/es/actions/danger-confirm.d.ts +1 -1
- package/es/actions/dialog-component.d.ts +1 -1
- package/es/actions/dialog-form.d.ts +1 -1
- package/es/actions/dialog-form.js +2 -2
- package/es/actions/dialog-info.d.ts +1 -1
- package/es/actions/dialog-table.d.ts +1 -1
- package/es/actions/dialog.d.ts +6 -2
- package/es/actions/dialog.js +9 -5
- package/es/actions/drawer-form.d.ts +1 -1
- package/es/actions/drawer-info.d.ts +1 -1
- package/es/actions/drawer-table.d.ts +1 -1
- package/es/actions/drawer.d.ts +1 -1
- package/es/actions/error.d.ts +1 -1
- package/es/actions/index.js +9 -5
- package/es/actions/index.scss +28 -7
- package/es/actions/link.d.ts +2 -2
- package/es/actions/link.js +2 -2
- package/es/actions/notice.d.ts +1 -1
- package/es/actions/request.d.ts +1 -1
- package/es/actions/request.js +2 -2
- package/es/card/index.d.ts +10 -1
- package/es/card/index.js +20 -5
- package/es/card/index.scss +19 -0
- package/es/card/tab.d.ts +6 -0
- package/es/card/tab.js +27 -0
- package/es/form/Filter/index.d.ts +2 -5
- package/es/form/Filter/index.js +3 -44
- package/es/form/Filter/index.scss +71 -0
- package/es/form/Filter/index2.d.ts +8 -0
- package/es/form/Filter/index2.js +318 -0
- package/es/form/ProForm/index.js +3 -23
- package/es/form/ProForm/index.scss +10 -19
- package/es/form/ProForm/useFormDisplayValues.d.ts +3 -5
- package/es/form/ProForm/useFormDisplayValues.js +44 -38
- package/es/form/SchemaForm/index.js +7 -6
- package/es/form/index.d.ts +11 -10
- package/es/form/index.js +3 -2
- package/es/form/typing.d.ts +3 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/info/components/ProInfoItem/index.js +3 -1
- package/es/nocode/pages/renderer.d.ts +2 -2
- package/es/page-header/index.d.ts +20 -11
- package/es/page-header/index.js +23 -47
- package/es/page-header/index.scss +0 -11
- package/es/table/components/Filter/index.js +11 -9
- package/es/table/components/Filter/index.scss +7 -3
- package/es/table/components/Layout/index.js +10 -1
- package/es/table/index.js +21 -11
- package/es/table/typing.d.ts +6 -0
- package/es/table/utils/columnRender.js +38 -1
- package/es/table/utils/index.js +15 -1
- package/es/utils/components/tags/index.d.ts +15 -0
- package/es/utils/components/tags/index.js +94 -0
- package/es/utils/components/tags/index.scss +12 -0
- package/lib/actions/base.d.ts +16 -6
- package/lib/actions/base.js +67 -12
- package/lib/actions/confirm.d.ts +1 -1
- package/lib/actions/danger-confirm.d.ts +1 -1
- package/lib/actions/dialog-component.d.ts +1 -1
- package/lib/actions/dialog-form.d.ts +1 -1
- package/lib/actions/dialog-form.js +2 -2
- package/lib/actions/dialog-info.d.ts +1 -1
- package/lib/actions/dialog-table.d.ts +1 -1
- package/lib/actions/dialog.d.ts +6 -2
- package/lib/actions/dialog.js +9 -5
- package/lib/actions/drawer-form.d.ts +1 -1
- package/lib/actions/drawer-info.d.ts +1 -1
- package/lib/actions/drawer-table.d.ts +1 -1
- package/lib/actions/drawer.d.ts +1 -1
- package/lib/actions/error.d.ts +1 -1
- package/lib/actions/index.js +9 -5
- package/lib/actions/index.scss +28 -7
- package/lib/actions/link.d.ts +2 -2
- package/lib/actions/link.js +2 -2
- package/lib/actions/notice.d.ts +1 -1
- package/lib/actions/request.d.ts +1 -1
- package/lib/actions/request.js +2 -2
- package/lib/card/index.d.ts +10 -1
- package/lib/card/index.js +22 -4
- package/lib/card/index.scss +19 -0
- package/lib/card/tab.d.ts +6 -0
- package/lib/card/tab.js +39 -0
- package/lib/form/Filter/index.d.ts +2 -5
- package/lib/form/Filter/index.js +4 -45
- package/lib/form/Filter/index.scss +71 -0
- package/lib/form/Filter/index2.d.ts +8 -0
- package/lib/form/Filter/index2.js +342 -0
- package/lib/form/ProForm/index.js +3 -23
- package/lib/form/ProForm/index.scss +10 -19
- package/lib/form/ProForm/useFormDisplayValues.d.ts +3 -5
- package/lib/form/ProForm/useFormDisplayValues.js +51 -44
- package/lib/form/SchemaForm/index.js +7 -6
- package/lib/form/index.d.ts +11 -10
- package/lib/form/index.js +5 -3
- package/lib/form/typing.d.ts +3 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/info/components/ProInfoItem/index.js +3 -1
- package/lib/nocode/pages/renderer.d.ts +2 -2
- package/lib/page-header/index.d.ts +20 -11
- package/lib/page-header/index.js +22 -45
- package/lib/page-header/index.scss +0 -11
- package/lib/table/components/Filter/index.js +10 -8
- package/lib/table/components/Filter/index.scss +7 -3
- package/lib/table/components/Layout/index.js +10 -1
- package/lib/table/index.js +20 -10
- package/lib/table/typing.d.ts +6 -0
- package/lib/table/utils/columnRender.js +38 -1
- package/lib/table/utils/index.js +15 -1
- package/lib/utils/components/tags/index.d.ts +15 -0
- package/lib/utils/components/tags/index.js +114 -0
- package/lib/utils/components/tags/index.scss +12 -0
- package/package.json +4 -4
package/lib/actions/index.js
CHANGED
@@ -235,18 +235,20 @@ var ProActionMenuButtonItem = function ProActionMenuButtonItem(props) {
|
|
235
235
|
}, buttonProps), buttonContent(children, icon, undefined, context));
|
236
236
|
};
|
237
237
|
|
238
|
-
function renderCommonActionButtonMenuItem(action, context) {
|
238
|
+
function renderCommonActionButtonMenuItem(action, key, context) {
|
239
239
|
var menuBtn = action;
|
240
240
|
|
241
241
|
if (menuBtn.actions && menuBtn.actions.length && menuBtn.disabled !== true) {
|
242
242
|
return /*#__PURE__*/_react.default.createElement(_components.Menu.SubMenu, {
|
243
|
+
key: key,
|
243
244
|
label: menuBtn.label || menuBtn.children
|
244
245
|
}, menuBtn.actions.map(function (a, j) {
|
245
|
-
return renderCommonActionButtonMenuItem(a, context);
|
246
|
+
return renderCommonActionButtonMenuItem(a, String(j), context);
|
246
247
|
}));
|
247
248
|
}
|
248
249
|
|
249
250
|
return /*#__PURE__*/_react.default.createElement(ProActionMenuButtonItem, {
|
251
|
+
key: key,
|
250
252
|
action: action,
|
251
253
|
context: context
|
252
254
|
});
|
@@ -275,8 +277,8 @@ var ProActionMenuButton = function ProActionMenuButton(props) {
|
|
275
277
|
},
|
276
278
|
type: type,
|
277
279
|
label: buttonContent(label || children, icon, iconSize, context)
|
278
|
-
}, others), actions.map(function (action) {
|
279
|
-
return renderCommonActionButtonMenuItem(action, context);
|
280
|
+
}, others), actions.map(function (action, i) {
|
281
|
+
return renderCommonActionButtonMenuItem(action, String(i), context);
|
280
282
|
}));
|
281
283
|
}; // 如果 actions 数量超过了 max,则把第 max 个和剩余超出部分折叠起来成为一个 menu
|
282
284
|
|
@@ -383,7 +385,9 @@ function ProActionGroup(props) {
|
|
383
385
|
})
|
384
386
|
}, containerProps), formatedActions.map(function (actionBtn, i) {
|
385
387
|
var isLastOne = i === formatedActions.length - 1;
|
386
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment,
|
388
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
389
|
+
key: i
|
390
|
+
}, renderCommonActionButton(actionBtn, context, isTypeText), isTypeText && divider && !isLastOne && /*#__PURE__*/_react.default.createElement(_components.Divider, {
|
387
391
|
direction: "ver"
|
388
392
|
}));
|
389
393
|
}));
|
package/lib/actions/index.scss
CHANGED
@@ -28,6 +28,19 @@
|
|
28
28
|
flex-shrink: 0;
|
29
29
|
}
|
30
30
|
}
|
31
|
+
.next-dialog.teamix-pro-action-dialog {
|
32
|
+
&.has-footer-description {
|
33
|
+
.next-message {
|
34
|
+
position: static;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
&.quick-show-confirm-or-alert {
|
39
|
+
.teamix-pro-dialog-footer-description {
|
40
|
+
bottom: var(--dialog-footer-padding-bottom, 20px);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
31
44
|
|
32
45
|
.teamix-pro-dialog-footer-description {
|
33
46
|
position: absolute;
|
@@ -48,12 +61,6 @@
|
|
48
61
|
}
|
49
62
|
}
|
50
63
|
|
51
|
-
.teamix-pro-action-dialog.has-footer-description {
|
52
|
-
.next-message {
|
53
|
-
position: static;
|
54
|
-
}
|
55
|
-
}
|
56
|
-
|
57
64
|
.teamix-pro-dialog-before-content {
|
58
65
|
margin-bottom: var(--s-2);
|
59
66
|
}
|
@@ -61,7 +68,7 @@
|
|
61
68
|
.teamix-pro-dialog-message {
|
62
69
|
margin-bottom: var(--s-2);
|
63
70
|
|
64
|
-
|
71
|
+
& + .next-loading {
|
65
72
|
.teamix-pro-form {
|
66
73
|
margin-top: 20px;
|
67
74
|
}
|
@@ -89,3 +96,17 @@
|
|
89
96
|
margin-bottom: 0px;
|
90
97
|
}
|
91
98
|
}
|
99
|
+
|
100
|
+
.next-dialog-body {
|
101
|
+
.teamix-pro-info {
|
102
|
+
.next-card-content-container {
|
103
|
+
margin-top: 10px;
|
104
|
+
padding-bottom: 10px;
|
105
|
+
.next-col.next-col-24:last-child {
|
106
|
+
.teamix-pro-field-info-form-item:last-child {
|
107
|
+
padding-bottom: 0px;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
package/lib/actions/link.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { LocationHistory } from '@teamix/utils';
|
|
2
2
|
import { BaseAction } from './base';
|
3
3
|
export interface LinkAction extends BaseAction, LocationHistory {
|
4
4
|
}
|
5
|
-
export declare function useLinkAction(action: LinkAction,
|
6
|
-
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => void
|
5
|
+
export declare function useLinkAction(action: LinkAction, actionContext?: any): {
|
6
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
7
7
|
};
|
8
8
|
export default useLinkAction;
|
package/lib/actions/link.js
CHANGED
@@ -18,9 +18,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
18
18
|
|
19
19
|
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; }
|
20
20
|
|
21
|
-
function useLinkAction(action,
|
21
|
+
function useLinkAction(action, actionContext) {
|
22
22
|
var history = (0, _reactRouterDom.useHistory)();
|
23
|
-
return _objectSpread({}, (0, _base.eventHandler)(action, function () {
|
23
|
+
return _objectSpread({}, (0, _base.eventHandler)(action, actionContext, function (context) {
|
24
24
|
var linkAction = (0, _utils.getTargetValue)(action, context);
|
25
25
|
(0, _utils.goToLink)(linkAction, history);
|
26
26
|
}));
|
package/lib/actions/notice.d.ts
CHANGED
@@ -2,6 +2,6 @@ import { DialogAction } from './dialog';
|
|
2
2
|
export interface NoticeAction extends DialogAction {
|
3
3
|
}
|
4
4
|
export declare function useNoticeAction(action: DialogAction, context?: any): {
|
5
|
-
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => void
|
5
|
+
[x: string]: (e: import("react").MouseEvent<HTMLElement, MouseEvent>) => Promise<void>;
|
6
6
|
};
|
7
7
|
export default useNoticeAction;
|
package/lib/actions/request.d.ts
CHANGED
@@ -3,7 +3,7 @@ import { BaseAction } from './base';
|
|
3
3
|
export interface RequestAction extends CommonRequestConfig, BaseAction {
|
4
4
|
}
|
5
5
|
export declare function doRequest(action: RequestAction, context?: any, history?: any, extraParams?: any): Promise<unknown>;
|
6
|
-
export declare function useRequestAction(action: RequestAction,
|
6
|
+
export declare function useRequestAction(action: RequestAction, actionContext?: any): {
|
7
7
|
loading: boolean;
|
8
8
|
};
|
9
9
|
export default useRequestAction;
|
package/lib/actions/request.js
CHANGED
@@ -51,7 +51,7 @@ function doRequest(action, context, history, extraParams) {
|
|
51
51
|
}, others), context, history, extraParams);
|
52
52
|
}
|
53
53
|
|
54
|
-
function useRequestAction(action,
|
54
|
+
function useRequestAction(action, actionContext) {
|
55
55
|
var _useState = (0, _react.useState)(false),
|
56
56
|
_useState2 = _slicedToArray(_useState, 2),
|
57
57
|
loading = _useState2[0],
|
@@ -62,7 +62,7 @@ function useRequestAction(action, context) {
|
|
62
62
|
var onFinish = action.onFinish,
|
63
63
|
others = _objectWithoutProperties(action, _excluded2);
|
64
64
|
|
65
|
-
return _objectSpread(_objectSpread({}, (0, _base.eventHandler)(action, function () {
|
65
|
+
return _objectSpread(_objectSpread({}, (0, _base.eventHandler)(action, actionContext, function (context) {
|
66
66
|
setLoading(true);
|
67
67
|
doRequest(_objectSpread({}, others), context, history).then(function () {
|
68
68
|
setLoading(false);
|
package/lib/card/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import { ProTagItem } from '../utils/components/tags';
|
2
3
|
import { ProActionGroupProps } from '../actions';
|
3
4
|
import './index.scss';
|
4
5
|
export * from './card-container';
|
@@ -13,6 +14,8 @@ export interface ProCardProps extends Omit<React.HTMLAttributes<HTMLElement>, 't
|
|
13
14
|
tooltip?: React.ReactNode;
|
14
15
|
/** 标题右侧图标 */
|
15
16
|
tooltipIcon?: React.ReactNode;
|
17
|
+
/** 标签组 */
|
18
|
+
tags?: ProTagItem[];
|
16
19
|
/** 标题右侧描述 */
|
17
20
|
description?: React.ReactNode;
|
18
21
|
/** 额外信息区域,位于卡片右上角,可以配置一些常用轻量操作 */
|
@@ -35,6 +38,8 @@ export interface ProCardProps extends Omit<React.HTMLAttributes<HTMLElement>, 't
|
|
35
38
|
centered?: boolean;
|
36
39
|
/** 加载中状态 */
|
37
40
|
loading?: boolean;
|
41
|
+
/** 空状态 */
|
42
|
+
empty?: boolean;
|
38
43
|
/** 边框颜色 */
|
39
44
|
borderColor?: 'blue' | 'green' | 'red' | 'orange' | 'yellow' | 'grey' | 'transparent' | 'none';
|
40
45
|
/** 背景色 */
|
@@ -83,9 +88,13 @@ export declare const ProCard: {
|
|
83
88
|
(props: import("./selectable").ProCardSelectableProps): JSX.Element;
|
84
89
|
defaultProps: {
|
85
90
|
hoveredShadow: boolean;
|
86
|
-
};
|
91
|
+
}; /** 标签组 */
|
87
92
|
isProCard: boolean;
|
88
93
|
};
|
94
|
+
Tab: {
|
95
|
+
(props: import("@alifd/next/types/tab").TabProps): JSX.Element;
|
96
|
+
Item: typeof import("@alifd/next/types/tab").Item;
|
97
|
+
};
|
89
98
|
isProCard: boolean;
|
90
99
|
};
|
91
100
|
export default ProCard;
|
package/lib/card/index.js
CHANGED
@@ -12,12 +12,16 @@ var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
|
13
13
|
var _classnames3 = _interopRequireDefault(require("classnames"));
|
14
14
|
|
15
|
+
var _result = _interopRequireDefault(require("@teamix/result"));
|
16
|
+
|
15
17
|
var _components = require("@alicloudfe/components");
|
16
18
|
|
17
19
|
var _icon = _interopRequireDefault(require("@teamix/icon"));
|
18
20
|
|
19
21
|
var _utils = require("@teamix/utils");
|
20
22
|
|
23
|
+
var _tags = require("../utils/components/tags");
|
24
|
+
|
21
25
|
var _skeleton = require("../skeleton");
|
22
26
|
|
23
27
|
var _actions = require("../actions");
|
@@ -28,6 +32,8 @@ var _divider = _interopRequireDefault(require("./divider"));
|
|
28
32
|
|
29
33
|
var _selectable = _interopRequireDefault(require("./selectable"));
|
30
34
|
|
35
|
+
var _tab = _interopRequireDefault(require("./tab"));
|
36
|
+
|
31
37
|
require("./index.scss");
|
32
38
|
|
33
39
|
var _cardContainer = require("./card-container");
|
@@ -44,7 +50,7 @@ Object.keys(_cardContainer).forEach(function (key) {
|
|
44
50
|
});
|
45
51
|
});
|
46
52
|
var _excluded = ["context"],
|
47
|
-
_excluded2 = ["children", "title", "subTitle", "tooltip", "tooltipIcon", "description", "extra", "actions", "style", "className", "image", "hoveredShadow", "divider", "bordered", "compacted", "centered", "loading", "borderColor", "backgroundColor", "contentClassName", "contentStyle", "direction", "wrap", "spacing", "split", "collapsible", "defaultCollapsed", "collapsed", "onCollapse", "context"];
|
53
|
+
_excluded2 = ["children", "title", "subTitle", "tooltip", "tooltipIcon", "tags", "description", "extra", "actions", "style", "className", "image", "hoveredShadow", "divider", "bordered", "compacted", "centered", "loading", "empty", "borderColor", "backgroundColor", "contentClassName", "contentStyle", "direction", "wrap", "spacing", "split", "collapsible", "defaultCollapsed", "collapsed", "onCollapse", "context"];
|
48
54
|
|
49
55
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
50
56
|
|
@@ -109,6 +115,7 @@ var ProCard = function ProCard(props) {
|
|
109
115
|
subTitle = props.subTitle,
|
110
116
|
tooltip = props.tooltip,
|
111
117
|
tooltipIcon = props.tooltipIcon,
|
118
|
+
tags = props.tags,
|
112
119
|
description = props.description,
|
113
120
|
extra = props.extra,
|
114
121
|
actions = props.actions,
|
@@ -121,6 +128,7 @@ var ProCard = function ProCard(props) {
|
|
121
128
|
compacted = props.compacted,
|
122
129
|
centered = props.centered,
|
123
130
|
loading = props.loading,
|
131
|
+
empty = props.empty,
|
124
132
|
borderColor = props.borderColor,
|
125
133
|
backgroundColor = props.backgroundColor,
|
126
134
|
contentClassName = props.contentClassName,
|
@@ -212,7 +220,7 @@ var ProCard = function ProCard(props) {
|
|
212
220
|
}, _defineProperty(_classnames, "border-".concat(borderColor), borderColor), _defineProperty(_classnames, "compacted", compacted), _defineProperty(_classnames, "hoverable", hoveredShadow), _classnames));
|
213
221
|
var cardContentClassName = (0, _classnames3.default)(cls('content'), contentClassName, getFlexDirectionClassName(direction, split), (_classnames2 = {
|
214
222
|
'contain-pro-card': containProCard
|
215
|
-
}, _defineProperty(_classnames2, "split-".concat(split), split), _defineProperty(_classnames2, 'flex-wrap', wrap), _defineProperty(_classnames2, "centered", centered), _classnames2));
|
223
|
+
}, _defineProperty(_classnames2, "split-".concat(split), split), _defineProperty(_classnames2, 'flex-wrap', wrap), _defineProperty(_classnames2, "centered", centered || empty), _classnames2));
|
216
224
|
var cardContentMargin = containProCard && !split ? {
|
217
225
|
marginRight: -horizonal,
|
218
226
|
marginLeft: -horizonal,
|
@@ -247,7 +255,7 @@ var ProCard = function ProCard(props) {
|
|
247
255
|
}, /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, {
|
248
256
|
align: "t",
|
249
257
|
trigger: tooltipTrigger
|
250
|
-
}, tooltip)), description && /*#__PURE__*/_react.default.createElement("div", {
|
258
|
+
}, tooltip)), tags && (0, _tags.renderTags)(tags, 'small'), description && /*#__PURE__*/_react.default.createElement("div", {
|
251
259
|
className: cls('title-description')
|
252
260
|
}, description));
|
253
261
|
};
|
@@ -272,7 +280,16 @@ var ProCard = function ProCard(props) {
|
|
272
280
|
}, loading && /*#__PURE__*/_react.default.createElement(_skeleton.ProSkeletonRaw.Card.Content, null), !loading && /*#__PURE__*/_react.default.createElement("div", {
|
273
281
|
className: cardContentClassName,
|
274
282
|
style: cardContentStyle
|
275
|
-
},
|
283
|
+
}, empty && /*#__PURE__*/_react.default.createElement("div", {
|
284
|
+
className: cls('empty')
|
285
|
+
}, childrenModified ? childrenModified : /*#__PURE__*/_react.default.createElement(_result.default, {
|
286
|
+
theme: "hybridcloud-container",
|
287
|
+
img: "noData",
|
288
|
+
title: (0, _utils.getMessage)('noData'),
|
289
|
+
style: {
|
290
|
+
padding: '50px 0 60px'
|
291
|
+
}
|
292
|
+
})), !empty && childrenModified)));
|
276
293
|
};
|
277
294
|
|
278
295
|
exports.ProCard = ProCard;
|
@@ -283,6 +300,7 @@ ProCard.defaultProps = {
|
|
283
300
|
};
|
284
301
|
ProCard.Divider = _divider.default;
|
285
302
|
ProCard.Selectable = _selectable.default;
|
303
|
+
ProCard.Tab = _tab.default;
|
286
304
|
ProCard.isProCard = true;
|
287
305
|
var _default = ProCard;
|
288
306
|
exports.default = _default;
|
package/lib/card/index.scss
CHANGED
@@ -153,6 +153,25 @@
|
|
153
153
|
}
|
154
154
|
}
|
155
155
|
|
156
|
+
&-tab {
|
157
|
+
margin-top: calc(0px - var(--s-2));
|
158
|
+
|
159
|
+
& > .next-tabs-bar {
|
160
|
+
border-bottom: none;
|
161
|
+
}
|
162
|
+
|
163
|
+
& > .next-tabs-content {
|
164
|
+
padding-top: var(--s-5, 20px);
|
165
|
+
}
|
166
|
+
}
|
167
|
+
|
168
|
+
&-empty {
|
169
|
+
display: flex;
|
170
|
+
flex-direction: column;
|
171
|
+
align-items: center;
|
172
|
+
color: var(--color-text1-8, #848484);
|
173
|
+
}
|
174
|
+
|
156
175
|
& > .next-card-actions {
|
157
176
|
& > .teamix-pro-actions {
|
158
177
|
& > .next-btn {
|
package/lib/card/tab.js
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
11
|
+
|
12
|
+
var _components = require("@alicloudfe/components");
|
13
|
+
|
14
|
+
var _excluded = ["className"];
|
15
|
+
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
|
+
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
19
|
+
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = 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; }
|
21
|
+
|
22
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
23
|
+
|
24
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
25
|
+
|
26
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
27
|
+
|
28
|
+
var ProCardTab = function ProCardTab(props) {
|
29
|
+
var className = props.className,
|
30
|
+
others = _objectWithoutProperties(props, _excluded);
|
31
|
+
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_components.Tab, _objectSpread({
|
33
|
+
className: (0, _classnames.default)('teamix-pro-card-tab', className)
|
34
|
+
}, others));
|
35
|
+
};
|
36
|
+
|
37
|
+
ProCardTab.Item = _components.Tab.Item;
|
38
|
+
var _default = ProCardTab;
|
39
|
+
exports.default = _default;
|
@@ -1,16 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import type { IFilterProps } from '../typing';
|
3
|
+
import './index.scss';
|
3
4
|
/**
|
4
5
|
* 简单筛选
|
5
6
|
*/
|
6
7
|
declare const SimpleFilter: React.FC<IFilterProps>;
|
7
|
-
/**
|
8
|
-
* 查询筛选
|
9
|
-
*/
|
10
|
-
declare const QueryFilter: React.FC<IFilterProps>;
|
11
8
|
/**
|
12
9
|
* 高级筛选
|
13
10
|
*/
|
14
11
|
declare const AdvancedFilter: React.FC<IFilterProps>;
|
15
|
-
export { AdvancedFilter, SimpleFilter
|
12
|
+
export { AdvancedFilter, SimpleFilter };
|
16
13
|
export default AdvancedFilter;
|
package/lib/form/Filter/index.js
CHANGED
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
6
6
|
value: true
|
7
7
|
});
|
8
|
-
exports.default = exports.SimpleFilter = exports.
|
8
|
+
exports.default = exports.SimpleFilter = exports.AdvancedFilter = void 0;
|
9
9
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
11
11
|
|
@@ -19,8 +19,9 @@ var _ProForm = _interopRequireDefault(require("../ProForm"));
|
|
19
19
|
|
20
20
|
var _utils2 = require("../utils");
|
21
21
|
|
22
|
-
|
23
|
-
|
22
|
+
require("./index.scss");
|
23
|
+
|
24
|
+
var _excluded = ["schema", "triggerType", "onFilter"];
|
24
25
|
|
25
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
26
27
|
|
@@ -110,52 +111,10 @@ exports.SimpleFilter = SimpleFilter;
|
|
110
111
|
SimpleFilter.defaultProps = {
|
111
112
|
triggerType: 'change'
|
112
113
|
};
|
113
|
-
/**
|
114
|
-
* 查询筛选
|
115
|
-
*/
|
116
|
-
|
117
|
-
var QueryFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
118
|
-
var schema = props.schema,
|
119
|
-
triggerType = props.triggerType,
|
120
|
-
onFilter = props.onFilter,
|
121
|
-
otherProps = _objectWithoutProperties(props, _excluded2);
|
122
|
-
|
123
|
-
var prefixCls = (0, _utils.usePrefixCls)('', {
|
124
|
-
prefix: 'teamix-pro-form-filter-query'
|
125
|
-
});
|
126
|
-
var querySchema = (0, _react.useMemo)(function () {
|
127
|
-
return [{
|
128
|
-
component: 'QueryFilter',
|
129
|
-
props: {
|
130
|
-
placeholder: 'placeholder'
|
131
|
-
},
|
132
|
-
children: schema
|
133
|
-
}, {
|
134
|
-
type: 'void',
|
135
|
-
decorator: null,
|
136
|
-
component: 'Submit',
|
137
|
-
props: {
|
138
|
-
style: _objectSpread({}, triggerType === 'submit' ? {} : {
|
139
|
-
display: 'none'
|
140
|
-
})
|
141
|
-
}
|
142
|
-
}];
|
143
|
-
}, []);
|
144
|
-
var eventProps = getEventProps(triggerType, onFilter);
|
145
|
-
return /*#__PURE__*/_react.default.createElement(_ProForm.default, _objectSpread(_objectSpread(_objectSpread({
|
146
|
-
feedbackLayout: "none",
|
147
|
-
breakpoints: [],
|
148
|
-
bordered: false
|
149
|
-
}, otherProps), eventProps), {}, {
|
150
|
-
className: (0, _classnames.default)(prefixCls, props.className),
|
151
|
-
schema: querySchema
|
152
|
-
}));
|
153
|
-
});
|
154
114
|
/**
|
155
115
|
* 高级筛选
|
156
116
|
*/
|
157
117
|
|
158
|
-
exports.QueryFilter = QueryFilter;
|
159
118
|
var AdvancedFilter = /*#__PURE__*/(0, _react.memo)(function (props) {
|
160
119
|
var form = (0, _react.useMemo)(function () {
|
161
120
|
return (props === null || props === void 0 ? void 0 : props.form) || (0, _core.createForm)();
|
@@ -0,0 +1,71 @@
|
|
1
|
+
@import '../global.scss';
|
2
|
+
|
3
|
+
$query-filter: #{$teamix-pro-form}-query-filter;
|
4
|
+
|
5
|
+
.#{$query-filter} {
|
6
|
+
.#{$query-filter}-inline {
|
7
|
+
display: flex;
|
8
|
+
justify-content: space-between;
|
9
|
+
}
|
10
|
+
.#{$query-filter}-left {
|
11
|
+
display: flex;
|
12
|
+
}
|
13
|
+
.#{$query-filter}-addonBefore {
|
14
|
+
flex: 0 1 auto;
|
15
|
+
margin-right: 8px;
|
16
|
+
}
|
17
|
+
.#{$query-filter}-simple {
|
18
|
+
flex: 0 0 auto;
|
19
|
+
margin-right: -8px;
|
20
|
+
margin-bottom: 8px;
|
21
|
+
}
|
22
|
+
.#{$query-filter}-toggle {
|
23
|
+
margin-bottom: 8px;
|
24
|
+
}
|
25
|
+
.#{$query-filter}-addonAfter {
|
26
|
+
flex: 0 1 auto;
|
27
|
+
margin-left: 8px;
|
28
|
+
}
|
29
|
+
.#{$query-filter}-tag-title {
|
30
|
+
margin-right: 12px;
|
31
|
+
color: var(--color-text1-8, #848484);
|
32
|
+
}
|
33
|
+
.#{$query-filter}-tag-content {
|
34
|
+
color: var(--color-text1-2, #5a5a5a);
|
35
|
+
font-weight: bold;
|
36
|
+
}
|
37
|
+
.#{$query-filter}-tag-hidden {
|
38
|
+
display: none;
|
39
|
+
}
|
40
|
+
.#{$query-filter}-advanced {
|
41
|
+
padding: 16px;
|
42
|
+
background-color: var(--color-fill1-2, #f7f7f7);
|
43
|
+
}
|
44
|
+
.#{$query-filter}-advanced-hidden {
|
45
|
+
display: none;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
// 筛选
|
50
|
+
.#{$teamix-pro-form}-filter-advanced,
|
51
|
+
.#{$teamix-pro-form}-filter-simple {
|
52
|
+
.#{$form-item-cls}-feedback-layout-popover {
|
53
|
+
margin-bottom: 0;
|
54
|
+
}
|
55
|
+
.#{$css-prefix}date-picker2-input {
|
56
|
+
.#{$css-prefix}input {
|
57
|
+
width: inherit;
|
58
|
+
input {
|
59
|
+
width: inherit;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
// 筛选和抽屉按钮
|
66
|
+
.#{$teamix-pro-form}-filter-advanced,
|
67
|
+
.#{$css-prefix}drawer-footer {
|
68
|
+
.#{$css-prefix}formily-button-group {
|
69
|
+
margin-top: 0;
|
70
|
+
}
|
71
|
+
}
|