@teamix/pro 1.2.7 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pro.css +1 -1
- package/dist/pro.js +756 -368
- 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 +4 -4
- 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 +19 -24
- 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 +25 -21
- package/es/actions/index.scss +14 -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 +21 -3
- package/es/card/index.js +29 -12
- package/es/card/index.scss +71 -2
- package/es/card/selectable.d.ts +13 -0
- package/es/card/selectable.js +45 -0
- package/es/card/tab.d.ts +6 -0
- package/es/card/tab.js +27 -0
- package/es/form/Filter/index.js +5 -5
- package/es/form/ProForm/index.js +3 -23
- package/es/form/ProForm/index.scss +9 -0
- package/es/form/SchemaForm/index.js +7 -6
- package/es/index.d.ts +1 -1
- package/es/index.js +7 -4
- package/es/info/components/tableInfo/index.js +10 -6
- package/es/nocode/configurators/Card.js +31 -8
- 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/sidebar/components/sidebar-container/index.d.ts +5 -0
- package/es/sidebar/components/sidebar-container/index.js +77 -0
- package/es/sidebar/components/sidebar-container/index.scss +18 -0
- package/es/sidebar/components/tree/index.d.ts +4 -0
- package/es/sidebar/components/tree/index.js +162 -0
- package/es/sidebar/index.d.ts +5 -0
- package/es/sidebar/index.js +70 -0
- package/es/sidebar/index.scss +3 -0
- package/es/sidebar/typing.d.ts +64 -0
- package/es/sidebar/typing.js +1 -0
- package/es/table/components/Filter/index.js +3 -3
- package/es/table/index.js +12 -3
- package/es/table/index.scss +1 -0
- package/es/table/typing.d.ts +2 -0
- package/es/utils/components/tags/index.d.ts +11 -0
- package/es/utils/components/tags/index.js +50 -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 +3 -3
- 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 +18 -23
- 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 +25 -21
- package/lib/actions/index.scss +14 -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 +21 -3
- package/lib/card/index.js +35 -14
- package/lib/card/index.scss +71 -2
- package/lib/card/selectable.d.ts +13 -0
- package/lib/card/selectable.js +60 -0
- package/lib/card/tab.d.ts +6 -0
- package/lib/card/tab.js +39 -0
- package/lib/form/Filter/index.js +5 -6
- package/lib/form/ProForm/index.js +3 -23
- package/lib/form/ProForm/index.scss +9 -0
- package/lib/form/SchemaForm/index.js +7 -6
- package/lib/index.d.ts +1 -1
- package/lib/index.js +3 -1
- package/lib/info/components/tableInfo/index.js +10 -6
- package/lib/nocode/configurators/Card.js +31 -8
- 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/sidebar/components/sidebar-container/index.d.ts +5 -0
- package/lib/sidebar/components/sidebar-container/index.js +93 -0
- package/lib/sidebar/components/sidebar-container/index.scss +18 -0
- package/lib/sidebar/components/tree/index.d.ts +4 -0
- package/lib/sidebar/components/tree/index.js +179 -0
- package/lib/sidebar/index.d.ts +5 -0
- package/lib/sidebar/index.js +91 -0
- package/lib/sidebar/index.scss +3 -0
- package/lib/sidebar/typing.d.ts +64 -0
- package/lib/sidebar/typing.js +5 -0
- package/lib/table/components/Filter/index.js +2 -2
- package/lib/table/index.js +12 -3
- package/lib/table/index.scss +1 -0
- package/lib/table/typing.d.ts +2 -0
- package/lib/utils/components/tags/index.d.ts +11 -0
- package/lib/utils/components/tags/index.js +66 -0
- package/lib/utils/components/tags/index.scss +12 -0
- package/package.json +1 -1
@@ -0,0 +1,64 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { MessageProps } from '@alifd/next/types/message';
|
3
|
+
import { TreeProps } from '@alifd/next/types/tree';
|
4
|
+
import { ProCardProps, ProFieldProps } from '..';
|
5
|
+
/** ProSidebar 定义 */
|
6
|
+
export declare type ProSidebarProps = {
|
7
|
+
/** 数据源 */
|
8
|
+
dataSource?: ProSidebarDataSource;
|
9
|
+
/** 节点点击回调 */
|
10
|
+
onSelect?: TreeProps['onSelect'];
|
11
|
+
/** 树配置 */
|
12
|
+
treeProps?: TreeProps;
|
13
|
+
/** 卡片配置 */
|
14
|
+
cardProps?: ProCardProps;
|
15
|
+
} & Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> & Omit<ProSidebarContainerProps, 'onSelect'>;
|
16
|
+
/** 数据源定义 */
|
17
|
+
export declare type ProSidebarDataSource = ProSidebarDataSourceItem[];
|
18
|
+
export declare type ProSidebarDataSourceItem = {
|
19
|
+
/** 展示值 */
|
20
|
+
label?: React.ReactNode;
|
21
|
+
/** 绑定值 */
|
22
|
+
value?: any;
|
23
|
+
/** icon */
|
24
|
+
icon?: React.ReactNode;
|
25
|
+
/** 标签 */
|
26
|
+
tag?: React.ReactNode;
|
27
|
+
/** 右侧操作、状态区 */
|
28
|
+
extra?: React.ReactNode;
|
29
|
+
/** 子项 */
|
30
|
+
children?: ProSidebarDataSourceItem[];
|
31
|
+
};
|
32
|
+
/** tag 定义 */
|
33
|
+
export declare type ProSidebarDataSourceTag = {
|
34
|
+
/** 显示值 */
|
35
|
+
value: string;
|
36
|
+
};
|
37
|
+
/** sidebar 容器定义 */
|
38
|
+
export declare type ProSidebarContainerProps = {
|
39
|
+
children?: React.ReactNode;
|
40
|
+
/** 搜索输入提示 */
|
41
|
+
searchPlaceholder?: string;
|
42
|
+
/** 搜索输入其他参数 ProField 参数 */
|
43
|
+
searchProps?: ProFieldProps;
|
44
|
+
/** 是否展示搜索框 */
|
45
|
+
showSearch?: boolean;
|
46
|
+
/** 自定义搜索 */
|
47
|
+
customSearch?: React.ReactNode;
|
48
|
+
/** 搜索框变化的回调函数 */
|
49
|
+
searchOnChange?: (value: any) => void;
|
50
|
+
/** 通知提示消息区域 */
|
51
|
+
message?: React.ReactNode;
|
52
|
+
/** 自定义消息通知区域 */
|
53
|
+
customMessage?: React.ReactNode;
|
54
|
+
/** 消息通知区域的其他参数 */
|
55
|
+
messageProps?: MessageProps;
|
56
|
+
} & ProCardProps;
|
57
|
+
/** ProSidebarTree 内容定义 */
|
58
|
+
export declare type ProSidebarTreeProps = {
|
59
|
+
dataSource?: ProSidebarDataSource;
|
60
|
+
/** 搜索过滤关键词 */
|
61
|
+
searchKey?: string;
|
62
|
+
/** 节点点击回调 */
|
63
|
+
onChange?: ProSidebarProps['onChange'];
|
64
|
+
} & TreeProps;
|
@@ -237,7 +237,7 @@ var Filter = function Filter(props) {
|
|
237
237
|
(_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$r = _actionRef$current7.resetPage) === null || _actionRef$current7$r === void 0 ? void 0 : _actionRef$current7$r.call(_actionRef$current7);
|
238
238
|
setVisible(false);
|
239
239
|
}
|
240
|
-
},
|
240
|
+
}, (0, _utils.getMessage)('ok')), /*#__PURE__*/_react.default.createElement(_components.Button, {
|
241
241
|
type: "normal",
|
242
242
|
size: "small",
|
243
243
|
className: cls({
|
@@ -254,7 +254,7 @@ var Filter = function Filter(props) {
|
|
254
254
|
})));
|
255
255
|
(_actionRef$current10 = actionRef.current) === null || _actionRef$current10 === void 0 ? void 0 : (_actionRef$current10$ = _actionRef$current10.filterDataSource) === null || _actionRef$current10$ === void 0 ? void 0 : _actionRef$current10$.call(_actionRef$current10, column.dataIndex); // setVisible(!visible);
|
256
256
|
}
|
257
|
-
},
|
257
|
+
}, (0, _utils.getMessage)('reset'))))));
|
258
258
|
};
|
259
259
|
|
260
260
|
var _default = Filter;
|
package/lib/table/index.js
CHANGED
@@ -55,7 +55,7 @@ Object.keys(_typing).forEach(function (key) {
|
|
55
55
|
}
|
56
56
|
});
|
57
57
|
});
|
58
|
-
var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestWhenMount", "showPagination", "pageSizeList", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "customRequest"];
|
58
|
+
var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestWhenMount", "showPagination", "pageSizeList", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "customRequest"];
|
59
59
|
|
60
60
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
61
61
|
|
@@ -141,6 +141,7 @@ var ProTable = function ProTable(props) {
|
|
141
141
|
getRowSelection = props.getRowSelection,
|
142
142
|
primaryKey = props.primaryKey,
|
143
143
|
footerAction = props.footerAction,
|
144
|
+
footer = props.footer,
|
144
145
|
url = props.url,
|
145
146
|
pageKey = props.pageKey,
|
146
147
|
pageSizeKey = props.pageSizeKey,
|
@@ -766,7 +767,7 @@ var ProTable = function ProTable(props) {
|
|
766
767
|
}
|
767
768
|
}
|
768
769
|
|
769
|
-
if (showPagination
|
770
|
+
if (showPagination) {
|
770
771
|
return /*#__PURE__*/_react.default.createElement("div", {
|
771
772
|
className: cls('footer', {
|
772
773
|
'footer-has-rowSelection': rowSelection
|
@@ -795,6 +796,14 @@ var ProTable = function ProTable(props) {
|
|
795
796
|
return onChangePaginationSize(number);
|
796
797
|
}
|
797
798
|
}, props.paginationProps))));
|
799
|
+
} else if (!showPagination) {
|
800
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
801
|
+
className: cls('footer', {
|
802
|
+
'footer-has-rowSelection': rowSelection
|
803
|
+
})
|
804
|
+
}, renderRowSelection(), /*#__PURE__*/_react.default.createElement("div", {
|
805
|
+
className: cls('footer-right-wrapper')
|
806
|
+
}, showSkeleton ? /*#__PURE__*/_react.default.createElement(_skeleton.ProSkeletonRaw.Footer.Pagination, null) : footer));
|
798
807
|
}
|
799
808
|
};
|
800
809
|
|
@@ -808,7 +817,7 @@ var ProTable = function ProTable(props) {
|
|
808
817
|
|
809
818
|
}),
|
810
819
|
ref: tableRef
|
811
|
-
}, renderTable(), footerSuctionState && footerSuction && /*#__PURE__*/_react.default.createElement(_pageContainer.default.FixedFooter, null, renderFooter()), !(footerSuctionState && footerSuction) && renderFooter()));
|
820
|
+
}, renderTable(), footerSuctionState && footerSuction && !fullscreenState && /*#__PURE__*/_react.default.createElement(_pageContainer.default.FixedFooter, null, renderFooter()), !(footerSuctionState && footerSuction) && !fullscreenState && renderFooter(), fullscreenState && renderFooter()));
|
812
821
|
};
|
813
822
|
|
814
823
|
var _default = ProTable;
|
package/lib/table/index.scss
CHANGED
package/lib/table/typing.d.ts
CHANGED
@@ -100,6 +100,8 @@ export declare type ProTableProps = {
|
|
100
100
|
getRowSelection?: (rowSelection: rowSelectionType) => void;
|
101
101
|
/** 表格底部(左侧)配置 */
|
102
102
|
footerAction?: ProActionGroupProps | React.ReactNode;
|
103
|
+
/** 表格底部(右层)配置 */
|
104
|
+
footer?: React.ReactNode;
|
103
105
|
/** 筛选区自动搜索的防抖时间(毫秒) */
|
104
106
|
filterDebounce?: number;
|
105
107
|
/** ProTable action 的引用,便于手动触发一些方法 */
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { TagProps, CloseableProps } from '@alicloudfe/components/types/tag';
|
2
|
+
import './index.scss';
|
3
|
+
export declare type ProTagItem = (TagProps | (CloseableProps & {
|
4
|
+
closable: true;
|
5
|
+
})) & {
|
6
|
+
/**
|
7
|
+
* @deprecated 建议使用 children 代替
|
8
|
+
*/
|
9
|
+
text?: string;
|
10
|
+
};
|
11
|
+
export declare const renderTags: (tags?: ProTagItem[] | undefined, size?: "small" | "large" | "medium" | undefined) => JSX.Element | null;
|
@@ -0,0 +1,66 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.renderTags = void 0;
|
7
|
+
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
9
|
+
|
10
|
+
var _components = require("@alicloudfe/components");
|
11
|
+
|
12
|
+
var _utils = require("@teamix/utils");
|
13
|
+
|
14
|
+
require("./index.scss");
|
15
|
+
|
16
|
+
var _excluded = ["text", "children", "closable"];
|
17
|
+
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
|
+
|
20
|
+
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; }
|
21
|
+
|
22
|
+
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; }
|
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; }
|
25
|
+
|
26
|
+
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; }
|
27
|
+
|
28
|
+
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; }
|
29
|
+
|
30
|
+
var cls = (0, _utils.baseClass)('teamix-pro-tags');
|
31
|
+
|
32
|
+
var renderTags = function renderTags(tags, size) {
|
33
|
+
if (!tags || !tags.length) {
|
34
|
+
return null;
|
35
|
+
}
|
36
|
+
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_components.Tag.Group, {
|
38
|
+
className: cls('')
|
39
|
+
}, tags.map(function (tag, i) {
|
40
|
+
// @ts-ignore
|
41
|
+
var text = tag.text,
|
42
|
+
children = tag.children,
|
43
|
+
closable = tag.closable,
|
44
|
+
others = _objectWithoutProperties(tag, _excluded);
|
45
|
+
|
46
|
+
if (closable) {
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_components.Tag.Closeable, _objectSpread({
|
48
|
+
key: i,
|
49
|
+
size: size,
|
50
|
+
style: {
|
51
|
+
marginBottom: 0
|
52
|
+
}
|
53
|
+
}, others), text || children);
|
54
|
+
}
|
55
|
+
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_components.Tag, _objectSpread({
|
57
|
+
key: i,
|
58
|
+
size: size,
|
59
|
+
style: {
|
60
|
+
marginBottom: 0
|
61
|
+
}
|
62
|
+
}, others), text || children);
|
63
|
+
}));
|
64
|
+
};
|
65
|
+
|
66
|
+
exports.renderTags = renderTags;
|