@teamix/pro 1.2.4 → 1.2.8
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 +1182 -512
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/actions/dialog-component.js +2 -1
- package/es/actions/dialog-form.js +2 -1
- package/es/actions/dialog.js +2 -1
- package/es/actions/index.js +3 -2
- package/es/actions/index.scss +3 -0
- package/es/actions/utils.d.ts +1 -0
- package/es/actions/utils.js +27 -0
- package/es/card/card-container.d.ts +18 -0
- package/es/card/card-container.js +24 -0
- package/es/card/divider.d.ts +6 -0
- package/es/card/divider.js +16 -0
- package/es/card/index.d.ts +68 -32
- package/es/card/index.js +194 -107
- package/es/card/index.scss +174 -9
- package/es/card/selectable.d.ts +13 -0
- package/es/card/selectable.js +45 -0
- package/es/card/utils.d.ts +9 -0
- package/es/card/utils.js +30 -0
- package/es/form/Components/ProField/index.js +2 -7
- package/es/form/Filter/index.js +5 -5
- package/es/form/ProForm/index.js +43 -17
- package/es/form/ProForm/index.scss +0 -1
- package/es/form/ProForm/useAutoSubmit.d.ts +1 -1
- package/es/form/ProForm/useAutoSubmit.js +3 -3
- package/es/form/ProForm/useInitialRequest.d.ts +1 -1
- package/es/form/ProForm/useInitialRequest.js +2 -2
- package/es/form/SchemaForm/initializeDataSource.js +1 -1
- package/es/form/SchemaForm/initializeFormButton.js +3 -2
- package/es/form/SchemaForm/initializeRequest.js +6 -3
- package/es/form/SchemaForm/initializeRules.js +1 -1
- package/es/form/SchemaForm/reactions.d.ts +5 -4
- package/es/form/SchemaForm/reactions.js +20 -11
- package/es/form/locales/validate.d.ts +159 -0
- package/es/form/locales/validate.js +158 -0
- package/es/form/typing.d.ts +4 -3
- package/es/index.d.ts +1 -1
- package/es/index.js +7 -4
- package/es/info/components/InfoGroup/index.js +5 -2
- package/es/info/components/InfoValueItem/index.js +4 -6
- package/es/info/components/baseInfo/index.js +4 -2
- package/es/info/components/tableInfo/index.js +10 -6
- package/es/info/index.js +25 -11
- package/es/info/typing.d.ts +6 -0
- package/es/nocode/configurators/Card.js +39 -12
- 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 +95 -0
- package/es/sidebar/index.d.ts +5 -0
- package/es/sidebar/index.js +66 -0
- package/es/sidebar/index.scss +3 -0
- package/es/sidebar/typing.d.ts +51 -0
- package/es/sidebar/typing.js +1 -0
- package/es/table/components/Layout/index.js +1 -1
- package/es/table/components/ToolBar/FilterColumnIcon.js +2 -24
- package/es/table/components/ToolBar/index.scss +0 -3
- package/es/table/index.js +26 -9
- package/es/table/index.scss +1 -0
- package/es/table/typing.d.ts +6 -4
- package/lib/actions/dialog-component.js +3 -1
- package/lib/actions/dialog-form.js +3 -1
- package/lib/actions/dialog.js +3 -1
- package/lib/actions/index.js +3 -2
- package/lib/actions/index.scss +3 -0
- package/lib/actions/utils.d.ts +1 -0
- package/lib/actions/utils.js +33 -0
- package/lib/card/card-container.d.ts +18 -0
- package/lib/card/card-container.js +37 -0
- package/lib/card/divider.d.ts +6 -0
- package/lib/card/divider.js +26 -0
- package/lib/card/index.d.ts +68 -32
- package/lib/card/index.js +215 -110
- package/lib/card/index.scss +174 -9
- package/lib/card/selectable.d.ts +13 -0
- package/lib/card/selectable.js +60 -0
- package/lib/card/utils.d.ts +9 -0
- package/lib/card/utils.js +41 -0
- package/lib/form/Components/ProField/index.js +1 -6
- package/lib/form/Filter/index.js +5 -6
- package/lib/form/ProForm/index.js +41 -14
- package/lib/form/ProForm/index.scss +0 -1
- package/lib/form/ProForm/useAutoSubmit.d.ts +1 -1
- package/lib/form/ProForm/useAutoSubmit.js +3 -3
- package/lib/form/ProForm/useInitialRequest.d.ts +1 -1
- package/lib/form/ProForm/useInitialRequest.js +2 -2
- package/lib/form/SchemaForm/initializeDataSource.js +1 -1
- package/lib/form/SchemaForm/initializeFormButton.js +5 -2
- package/lib/form/SchemaForm/initializeRequest.js +5 -2
- package/lib/form/SchemaForm/initializeRules.js +1 -1
- package/lib/form/SchemaForm/reactions.d.ts +5 -4
- package/lib/form/SchemaForm/reactions.js +23 -12
- package/lib/form/locales/validate.d.ts +159 -0
- package/lib/form/locales/validate.js +165 -0
- package/lib/form/typing.d.ts +4 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.js +3 -1
- package/lib/info/components/InfoGroup/index.js +5 -2
- package/lib/info/components/InfoValueItem/index.js +4 -6
- package/lib/info/components/baseInfo/index.js +4 -2
- package/lib/info/components/tableInfo/index.js +10 -6
- package/lib/info/index.js +24 -10
- package/lib/info/typing.d.ts +6 -0
- package/lib/nocode/configurators/Card.js +39 -12
- 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 +112 -0
- package/lib/sidebar/index.d.ts +5 -0
- package/lib/sidebar/index.js +87 -0
- package/lib/sidebar/index.scss +3 -0
- package/lib/sidebar/typing.d.ts +51 -0
- package/lib/sidebar/typing.js +5 -0
- package/lib/table/components/Layout/index.js +1 -1
- package/lib/table/components/ToolBar/FilterColumnIcon.js +2 -24
- package/lib/table/components/ToolBar/index.scss +0 -3
- package/lib/table/index.js +27 -9
- package/lib/table/index.scss +1 -0
- package/lib/table/typing.d.ts +6 -4
- package/package.json +4 -4
package/lib/table/index.js
CHANGED
@@ -40,6 +40,8 @@ var _lodash = _interopRequireDefault(require("lodash.debounce"));
|
|
40
40
|
|
41
41
|
var _classnames = _interopRequireDefault(require("classnames"));
|
42
42
|
|
43
|
+
var _pageContainer = _interopRequireDefault(require("../page-container"));
|
44
|
+
|
43
45
|
var _typing = require("./typing");
|
44
46
|
|
45
47
|
Object.keys(_typing).forEach(function (key) {
|
@@ -53,7 +55,7 @@ Object.keys(_typing).forEach(function (key) {
|
|
53
55
|
}
|
54
56
|
});
|
55
57
|
});
|
56
|
-
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"];
|
57
59
|
|
58
60
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
59
61
|
|
@@ -139,6 +141,7 @@ var ProTable = function ProTable(props) {
|
|
139
141
|
getRowSelection = props.getRowSelection,
|
140
142
|
primaryKey = props.primaryKey,
|
141
143
|
footerAction = props.footerAction,
|
144
|
+
footer = props.footer,
|
142
145
|
url = props.url,
|
143
146
|
pageKey = props.pageKey,
|
144
147
|
pageSizeKey = props.pageSizeKey,
|
@@ -279,10 +282,10 @@ var ProTable = function ProTable(props) {
|
|
279
282
|
|
280
283
|
var dataFilterForm = (0, _react.useMemo)(function () {
|
281
284
|
return (0, _form.createForm)();
|
282
|
-
}, []); //
|
285
|
+
}, []); // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
|
283
286
|
|
284
287
|
var getFooterSuctionState = function getFooterSuctionState() {
|
285
|
-
var containerDom = document.querySelector('.teamix-pro-page-container');
|
288
|
+
var containerDom = document.querySelector('.teamix-pro-page-container-scroll-container');
|
286
289
|
|
287
290
|
if (containerDom) {
|
288
291
|
var offsetHeight = containerDom.offsetHeight;
|
@@ -293,6 +296,11 @@ var ProTable = function ProTable(props) {
|
|
293
296
|
} else {
|
294
297
|
setFooterSuctionState(false);
|
295
298
|
}
|
299
|
+
} else {
|
300
|
+
// 非全家桶用户暂时不判断滚动条逻辑
|
301
|
+
if (footerSuction) {
|
302
|
+
setFooterSuctionState(true);
|
303
|
+
}
|
296
304
|
}
|
297
305
|
}; // rowSelection 相关
|
298
306
|
|
@@ -408,7 +416,9 @@ var ProTable = function ProTable(props) {
|
|
408
416
|
return _request(params);
|
409
417
|
},
|
410
418
|
request: function request(params) {
|
411
|
-
|
419
|
+
if (dataFilterForm.validate()) {
|
420
|
+
_request(params);
|
421
|
+
}
|
412
422
|
},
|
413
423
|
reset: function reset() {
|
414
424
|
var _actionRef$current, _actionRef$current$se;
|
@@ -695,7 +705,7 @@ var ProTable = function ProTable(props) {
|
|
695
705
|
var renderFooterAction = function renderFooterAction() {
|
696
706
|
var _footerAction$actions;
|
697
707
|
|
698
|
-
if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_footerAction$actions = footerAction.actions) === null || _footerAction$actions === void 0 ? void 0 : _footerAction$actions.length)
|
708
|
+
if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_footerAction$actions = footerAction.actions) === null || _footerAction$actions === void 0 ? void 0 : _footerAction$actions.length) >= 0) {
|
699
709
|
// 默认 context
|
700
710
|
var defaultContext = {
|
701
711
|
action: actionRef.current,
|
@@ -757,7 +767,7 @@ var ProTable = function ProTable(props) {
|
|
757
767
|
}
|
758
768
|
}
|
759
769
|
|
760
|
-
if (showPagination
|
770
|
+
if (showPagination) {
|
761
771
|
return /*#__PURE__*/_react.default.createElement("div", {
|
762
772
|
className: cls('footer', {
|
763
773
|
'footer-has-rowSelection': rowSelection
|
@@ -786,6 +796,14 @@ var ProTable = function ProTable(props) {
|
|
786
796
|
return onChangePaginationSize(number);
|
787
797
|
}
|
788
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));
|
789
807
|
}
|
790
808
|
};
|
791
809
|
|
@@ -795,11 +813,11 @@ var ProTable = function ProTable(props) {
|
|
795
813
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
796
814
|
className: cls({
|
797
815
|
'': true,
|
798
|
-
fullscreen: fullscreenState,
|
799
|
-
|
816
|
+
fullscreen: fullscreenState // 'footer-suction': footerSuctionState && footerSuction,
|
817
|
+
|
800
818
|
}),
|
801
819
|
ref: tableRef
|
802
|
-
}, renderTable(), renderFooter()));
|
820
|
+
}, renderTable(), footerSuctionState && footerSuction && /*#__PURE__*/_react.default.createElement(_pageContainer.default.FixedFooter, null, renderFooter()), !(footerSuctionState && footerSuction) && renderFooter()));
|
803
821
|
};
|
804
822
|
|
805
823
|
var _default = ProTable;
|
package/lib/table/index.scss
CHANGED
package/lib/table/typing.d.ts
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
import { ColumnProps, TableProps } from '@alicloudfe/components/types/table';
|
5
5
|
import { ProFieldType, ProFieldRenderProps, ProFieldDataSourceItem } from '../field';
|
6
6
|
import { IFilterProps } from '../form';
|
7
|
-
import {
|
7
|
+
import { ProActionGroupProps, ProActionButtonProps } from '../actions';
|
8
8
|
import { PaginationProps } from '@alicloudfe/components/types/pagination';
|
9
9
|
import { HeaderProps as ProTableHeaderProps } from '@teamix/utils';
|
10
10
|
import { Method } from 'axios';
|
@@ -50,7 +50,7 @@ export declare type ProTableColumnProps = {
|
|
50
50
|
/** 表头的过滤菜单宽度 */
|
51
51
|
filtersWidth?: string | number;
|
52
52
|
/** 操作组配置 */
|
53
|
-
actionSchema?:
|
53
|
+
actionSchema?: ProActionGroupProps;
|
54
54
|
/** 指定列对应的字段,支持`a.b`形式的快速取值 和 数组取值 */
|
55
55
|
dataIndex?: string | string[];
|
56
56
|
/** 指定 valueType 为日期时间格式时,可以格式化日期时间 */
|
@@ -99,7 +99,9 @@ export declare type ProTableProps = {
|
|
99
99
|
/** 获取内置 rowSelection */
|
100
100
|
getRowSelection?: (rowSelection: rowSelectionType) => void;
|
101
101
|
/** 表格底部(左侧)配置 */
|
102
|
-
footerAction?:
|
102
|
+
footerAction?: ProActionGroupProps | React.ReactNode;
|
103
|
+
/** 表格底部(右层)配置 */
|
104
|
+
footer?: React.ReactNode;
|
103
105
|
/** 筛选区自动搜索的防抖时间(毫秒) */
|
104
106
|
filterDebounce?: number;
|
105
107
|
/** ProTable action 的引用,便于手动触发一些方法 */
|
@@ -211,7 +213,7 @@ export declare type ProTableTopAreaProps = {
|
|
211
213
|
/** 标题区 */
|
212
214
|
header?: ProTableHeaderProps;
|
213
215
|
/** 主操作区 */
|
214
|
-
mainAction?:
|
216
|
+
mainAction?: ProActionGroupProps | React.ReactNode;
|
215
217
|
/** 工具栏区 */
|
216
218
|
toolBar?: boolean | ProTableToolBarItem[];
|
217
219
|
/** 快捷操作区 */
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teamix/pro",
|
3
|
-
"version": "1.2.
|
3
|
+
"version": "1.2.8",
|
4
4
|
"description": "TeamixPro大包",
|
5
5
|
"repository": "http://gitlab.alibaba-inc.com/teamix/pro",
|
6
6
|
"author": "Velociraptor(迅猛龙)",
|
@@ -22,9 +22,9 @@
|
|
22
22
|
],
|
23
23
|
"private": false,
|
24
24
|
"dependencies": {
|
25
|
-
"@formily/core": "2.0.
|
26
|
-
"@formily/react": "2.0.
|
27
|
-
"@teamix/formily": "2.0.
|
25
|
+
"@formily/core": "2.0.4",
|
26
|
+
"@formily/react": "2.0.4",
|
27
|
+
"@teamix/formily": "2.0.4",
|
28
28
|
"@teamix/hooks": "^0.1.0",
|
29
29
|
"@teamix/pop-confirm": "^1.2.2",
|
30
30
|
"@teamix/pro-field": "^1.0.0",
|