@teamix/pro 1.5.13 → 1.5.16
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/es/actions/dialog.js +1 -1
- package/es/actions/index.scss +1 -1
- package/es/card/index.scss +2 -0
- package/es/card/xconsole.scss +3 -0
- package/es/global.scss +1 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/next-xconsole.scss +34 -0
- package/es/nocode/configurators/ProTable.js +1 -22
- package/es/nocode/pages/index.js +1 -26
- package/es/page-header/index.scss +2 -1
- package/es/page-header/xconsole.scss +5 -0
- package/es/table/components/Filter/index.d.ts +5 -3
- package/es/table/components/Filter/index.js +94 -73
- package/es/table/components/Layout/index.js +5 -2
- package/es/table/components/Layout/index.scss +1 -0
- package/es/table/index.js +51 -18
- package/es/table/typing.d.ts +14 -0
- package/es/table/utils/columnRender.d.ts +2 -2
- package/es/table/utils/columnRender.js +4 -2
- package/es/table/utils/genProColumnToColumn.d.ts +2 -2
- package/es/table/utils/genProColumnToColumn.js +3 -1
- package/es/table/utils/util.d.ts +5 -0
- package/es/table/utils/util.js +19 -0
- package/es/xconsole.scss +6 -1
- package/lib/actions/dialog.js +1 -1
- package/lib/actions/index.scss +1 -1
- package/lib/card/index.scss +2 -0
- package/lib/card/xconsole.scss +3 -0
- package/lib/global.scss +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/next-xconsole.scss +34 -0
- package/lib/nocode/configurators/ProTable.js +1 -22
- package/lib/nocode/pages/index.js +1 -26
- package/lib/page-header/index.scss +2 -1
- package/lib/page-header/xconsole.scss +5 -0
- package/lib/table/components/Filter/index.d.ts +5 -3
- package/lib/table/components/Filter/index.js +93 -72
- package/lib/table/components/Layout/index.js +5 -2
- package/lib/table/components/Layout/index.scss +1 -0
- package/lib/table/index.js +51 -18
- package/lib/table/typing.d.ts +14 -0
- package/lib/table/utils/columnRender.d.ts +2 -2
- package/lib/table/utils/columnRender.js +4 -2
- package/lib/table/utils/genProColumnToColumn.d.ts +2 -2
- package/lib/table/utils/genProColumnToColumn.js +3 -1
- package/lib/table/utils/util.d.ts +5 -0
- package/lib/table/utils/util.js +25 -0
- package/lib/xconsole.scss +6 -1
- package/package.json +1 -1
- package/dist/fonts/txddinmedium.woff +0 -0
- package/dist/pro.all.min.css +0 -1
- package/dist/pro.css +0 -1
- package/dist/pro.js +0 -114283
- package/dist/pro.min.css +0 -1
- package/dist/pro.min.js +0 -2
- package/dist/pro.min.js.LICENSE.txt +0 -47
- package/dist/pro.xconsole.min.css +0 -1
package/lib/table/index.js
CHANGED
@@ -24,6 +24,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
24
24
|
var _pageContainer = _interopRequireDefault(require("../page-container"));
|
25
25
|
var _lodash = _interopRequireDefault(require("lodash.debounce"));
|
26
26
|
var _CardView = _interopRequireDefault(require("./components/CardView"));
|
27
|
+
var _hooks = require("@teamix/hooks");
|
28
|
+
var _util = require("./utils/util");
|
27
29
|
var _typing = require("./typing");
|
28
30
|
Object.keys(_typing).forEach(function (key) {
|
29
31
|
if (key === "default" || key === "__esModule") return;
|
@@ -36,7 +38,7 @@ Object.keys(_typing).forEach(function (key) {
|
|
36
38
|
}
|
37
39
|
});
|
38
40
|
});
|
39
|
-
var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "autoRefreshProps", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "fixedTableBody", "isTree", "toolBarAutoWidth", "data-teamix-spm", "switchCardView", "cardViewProps", "defaultView", "emptyProps"],
|
41
|
+
var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "autoRefreshProps", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "fixedTableBody", "isTree", "toolBarAutoWidth", "data-teamix-spm", "switchCardView", "cardViewProps", "defaultView", "emptyProps", "bindUrlProps", "bindUrl"],
|
40
42
|
_excluded2 = ["onChange"];
|
41
43
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
42
44
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
@@ -104,7 +106,7 @@ var globalFormatSort = function globalFormatSort(sort) {
|
|
104
106
|
return {};
|
105
107
|
};
|
106
108
|
var ProTable = function ProTable(props) {
|
107
|
-
var _rowSelection$selecte;
|
109
|
+
var _urlState$currentPage, _rowSelection$selecte;
|
108
110
|
var header = props.header,
|
109
111
|
className = props.className,
|
110
112
|
tableClassName = props.tableClassName,
|
@@ -177,15 +179,21 @@ var ProTable = function ProTable(props) {
|
|
177
179
|
_props$defaultView = props.defaultView,
|
178
180
|
defaultView = _props$defaultView === void 0 ? 'table' : _props$defaultView,
|
179
181
|
emptyProps = props.emptyProps,
|
182
|
+
bindUrlProps = props.bindUrlProps,
|
183
|
+
bindUrl = props.bindUrl,
|
180
184
|
otherProps = _objectWithoutProperties(props, _excluded);
|
181
185
|
var targetPageKey = pageKey || globalPageKey;
|
182
186
|
var targetPageSizeKey = pageSizeKey || globalPageSizeKey;
|
183
187
|
var targetFormatSort = formatSort || globalFormatSort;
|
184
|
-
var
|
188
|
+
var _ref = bindUrl ? (0, _hooks.useUrlState)() : [],
|
189
|
+
_ref2 = _slicedToArray(_ref, 2),
|
190
|
+
urlState = _ref2[0],
|
191
|
+
setUrlState = _ref2[1];
|
192
|
+
var _useState = (0, _react.useState)((_urlState$currentPage = urlState === null || urlState === void 0 ? void 0 : urlState.currentPage) !== null && _urlState$currentPage !== void 0 ? _urlState$currentPage : 1),
|
185
193
|
_useState2 = _slicedToArray(_useState, 2),
|
186
194
|
currentPage = _useState2[0],
|
187
195
|
setCurrentPage = _useState2[1];
|
188
|
-
var _useState3 = (0, _react.useState)(props.pageSize || 10),
|
196
|
+
var _useState3 = (0, _react.useState)((urlState === null || urlState === void 0 ? void 0 : urlState.pageSize) || props.pageSize || 10),
|
189
197
|
_useState4 = _slicedToArray(_useState3, 2),
|
190
198
|
pageSize = _useState4[0],
|
191
199
|
setPageSize = _useState4[1];
|
@@ -227,6 +235,24 @@ var ProTable = function ProTable(props) {
|
|
227
235
|
_useState20 = _slicedToArray(_useState19, 2),
|
228
236
|
showLoading = _useState20[0],
|
229
237
|
setShowLoading = _useState20[1];
|
238
|
+
// 表格内部用作存储的 Ref,标识 Table 组件是否被第一次渲染。用作 useUrlState filter 第一次渲染时使用 state 数据请求
|
239
|
+
var dataRef = (0, _react.useRef)({
|
240
|
+
flag: true
|
241
|
+
});
|
242
|
+
(0, _react.useEffect)(function () {
|
243
|
+
if (bindUrl && (bindUrlProps === null || bindUrlProps === void 0 ? void 0 : bindUrlProps.pagination) !== false) {
|
244
|
+
if ((urlState === null || urlState === void 0 ? void 0 : urlState.currentPage) !== currentPage) {
|
245
|
+
setUrlState === null || setUrlState === void 0 ? void 0 : setUrlState({
|
246
|
+
currentPage: currentPage
|
247
|
+
});
|
248
|
+
}
|
249
|
+
if ((urlState === null || urlState === void 0 ? void 0 : urlState.pageSize) !== pageSize) {
|
250
|
+
setUrlState === null || setUrlState === void 0 ? void 0 : setUrlState({
|
251
|
+
pageSize: pageSize
|
252
|
+
});
|
253
|
+
}
|
254
|
+
}
|
255
|
+
}, [currentPage, pageSize, urlState]);
|
230
256
|
// 存储能够被 on 监听到的 ProTable 状态
|
231
257
|
// 因为只做存储用。不需要更新视图以及需要同步更改。所以不使用 setState 更新
|
232
258
|
var _useState21 = (0, _react.useState)({
|
@@ -513,13 +539,13 @@ var ProTable = function ProTable(props) {
|
|
513
539
|
actionRefCallback[state][name] = fun;
|
514
540
|
},
|
515
541
|
off: function off(name) {
|
516
|
-
actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (
|
517
|
-
var
|
518
|
-
k =
|
519
|
-
v =
|
520
|
-
var filterV = Object.fromEntries(Object.entries(v).filter(function (
|
521
|
-
var
|
522
|
-
k =
|
542
|
+
actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref3) {
|
543
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
544
|
+
k = _ref4[0],
|
545
|
+
v = _ref4[1];
|
546
|
+
var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref5) {
|
547
|
+
var _ref6 = _slicedToArray(_ref5, 1),
|
548
|
+
k = _ref6[0];
|
523
549
|
return k !== name;
|
524
550
|
}));
|
525
551
|
return [k, filterV];
|
@@ -755,6 +781,11 @@ var ProTable = function ProTable(props) {
|
|
755
781
|
// 请求函数
|
756
782
|
function _request(params, noLoading, filterParams, isReset) {
|
757
783
|
var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6, _actionRef$current6$g, _objectSpread3;
|
784
|
+
// 首次渲染表格,获取 urlState 上的 表头 filter 数据
|
785
|
+
if (bindUrl && (bindUrlProps === null || bindUrlProps === void 0 ? void 0 : bindUrlProps.headerFilters) !== false && dataRef.current.flag) {
|
786
|
+
(0, _util.getUrlStateFilter)(urlState !== null && urlState !== void 0 ? urlState : {}, actionRef);
|
787
|
+
dataRef.current.flag = false;
|
788
|
+
}
|
758
789
|
// 如果没有传 url 且没有 customRequest,直接返回
|
759
790
|
if (!url && !customRequest) {
|
760
791
|
return;
|
@@ -810,11 +841,11 @@ var ProTable = function ProTable(props) {
|
|
810
841
|
success = res.success;
|
811
842
|
if (success === true) {
|
812
843
|
// 设置 dataSource、total
|
813
|
-
if (switchViewState === 'table' || params[
|
844
|
+
if (switchViewState === 'table' || params[targetPageKey] === 1 || isReset || (cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination)) {
|
814
845
|
_setData(dataRes || []);
|
815
846
|
setTotal(totalRes || (dataRes === null || dataRes === void 0 ? void 0 : dataRes.length));
|
816
847
|
}
|
817
|
-
if (switchViewState === 'card' && params[
|
848
|
+
if (switchViewState === 'card' && params[targetPageKey] !== 1 && !isReset && !(cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination)) {
|
818
849
|
_setData([].concat(_toConsumableArray(data), _toConsumableArray(dataRes || [])));
|
819
850
|
setTotal(total + (totalRes || (dataRes === null || dataRes === void 0 ? void 0 : dataRes.length)));
|
820
851
|
}
|
@@ -927,11 +958,13 @@ var ProTable = function ProTable(props) {
|
|
927
958
|
switchCardView: switchCardView,
|
928
959
|
defaultView: defaultView,
|
929
960
|
autoRefresh: autoRefresh,
|
930
|
-
autoRefreshProps: autoRefreshProps
|
961
|
+
autoRefreshProps: autoRefreshProps,
|
962
|
+
bindUrlProps: bindUrlProps,
|
963
|
+
bindUrl: bindUrl
|
931
964
|
}), switchViewState === 'table' && /*#__PURE__*/_react.default.createElement(_components.Table.StickyLock, _objectSpread({
|
932
965
|
hasBorder: false,
|
933
966
|
dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
|
934
|
-
columns: (0, _genProColumnToColumn.default)(filteredColumns, showSkeleton, actionRef, context, dataTeamixSpm),
|
967
|
+
columns: (0, _genProColumnToColumn.default)(filteredColumns, showSkeleton, actionRef, context, dataTeamixSpm, bindUrl, bindUrlProps),
|
935
968
|
loading: getTableLoading(),
|
936
969
|
className: (0, _classnames.default)('teamix-pro-table', tableClassName, {
|
937
970
|
'with-row-select': rowSelection,
|
@@ -1043,9 +1076,9 @@ var ProTable = function ProTable(props) {
|
|
1043
1076
|
}
|
1044
1077
|
if (showPagination && switchViewState === 'table' || (cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination) && switchViewState === 'card') {
|
1045
1078
|
var _props$paginationProp3;
|
1046
|
-
var
|
1047
|
-
onPaginationPropsChange =
|
1048
|
-
othersPaginationProps = _objectWithoutProperties(
|
1079
|
+
var _ref8 = (_props$paginationProp3 = props === null || props === void 0 ? void 0 : props.paginationProps) !== null && _props$paginationProp3 !== void 0 ? _props$paginationProp3 : {},
|
1080
|
+
onPaginationPropsChange = _ref8.onChange,
|
1081
|
+
othersPaginationProps = _objectWithoutProperties(_ref8, _excluded2);
|
1049
1082
|
return /*#__PURE__*/_react.default.createElement("div", {
|
1050
1083
|
className: cls('footer', {
|
1051
1084
|
'footer-has-rowSelection': rowSelection,
|
package/lib/table/typing.d.ts
CHANGED
@@ -168,6 +168,10 @@ export declare type ProTableProps = {
|
|
168
168
|
defaultView?: 'table' | 'card';
|
169
169
|
/** 空状态配置 **/
|
170
170
|
emptyProps?: EmptyContentProps;
|
171
|
+
/** 是否绑定 url **/
|
172
|
+
bindUrl?: boolean;
|
173
|
+
/** 绑定 url 配置 **/
|
174
|
+
bindUrlProps?: ProTableBindUrlProps;
|
171
175
|
} & Omit<TableProps, 'columns'> & ProTableTopAreaProps;
|
172
176
|
export declare type rowSelectionType = {
|
173
177
|
getProps?: (record: any, index: number) => any;
|
@@ -315,6 +319,8 @@ export declare type ProTableLayoutProps = {
|
|
315
319
|
defaultView?: 'table' | 'card';
|
316
320
|
autoRefresh?: ProTableProps['autoRefresh'];
|
317
321
|
autoRefreshProps?: ProTableProps['autoRefreshProps'];
|
322
|
+
bindUrl?: ProTableProps['bindUrl'];
|
323
|
+
bindUrlProps?: ProTableProps['bindUrlProps'];
|
318
324
|
} & ProTableTopAreaProps;
|
319
325
|
/** columns 列过滤 */
|
320
326
|
export declare type ProTableColumnsFilterItemProps = {
|
@@ -401,4 +407,12 @@ export declare type ProTableCardViewProps = {
|
|
401
407
|
/** 表格分页器参数 **/
|
402
408
|
tablePaginationProps?: PaginationProps;
|
403
409
|
};
|
410
|
+
export declare type ProTableBindUrlProps = {
|
411
|
+
/** 翻页器区域 **/
|
412
|
+
pagination?: boolean;
|
413
|
+
/** 搜索区域 **/
|
414
|
+
filters?: boolean;
|
415
|
+
/** 表格标题过滤器区域 **/
|
416
|
+
headerFilters?: boolean;
|
417
|
+
};
|
404
418
|
export {};
|
@@ -2,11 +2,11 @@
|
|
2
2
|
* 渲染列的逻辑函数
|
3
3
|
*/
|
4
4
|
import React from 'react';
|
5
|
-
import { ProTableColumnProps, ProTableActionType } from '../typing';
|
5
|
+
import { ProTableColumnProps, ProTableActionType, ProTableProps } from '../typing';
|
6
6
|
/**
|
7
7
|
* 增加了 icon 的功能 render title
|
8
8
|
*/
|
9
|
-
export declare const renderColumnsTitle: (item: ProTableColumnProps, actionRef: React.MutableRefObject<ProTableActionType | undefined
|
9
|
+
export declare const renderColumnsTitle: (item: ProTableColumnProps, actionRef: React.MutableRefObject<ProTableActionType | undefined>, bindUrl?: ProTableProps['bindUrl'], bindUrlProps?: ProTableProps['bindUrlProps']) => JSX.Element;
|
10
10
|
/**
|
11
11
|
* 负责单元格的具体渲染
|
12
12
|
*/
|
@@ -29,7 +29,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
29
29
|
/**
|
30
30
|
* 增加了 icon 的功能 render title
|
31
31
|
*/
|
32
|
-
var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
32
|
+
var renderColumnsTitle = function renderColumnsTitle(item, actionRef, bindUrl, bindUrlProps) {
|
33
33
|
var filterMode = item.filterMode,
|
34
34
|
filters = item.filters,
|
35
35
|
dataSource = item.dataSource,
|
@@ -86,7 +86,9 @@ var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
|
|
86
86
|
icon: item.tooltipIcon
|
87
87
|
}), item.filters && /*#__PURE__*/_react.default.createElement(_Filter.default, {
|
88
88
|
column: item,
|
89
|
-
actionRef: actionRef
|
89
|
+
actionRef: actionRef,
|
90
|
+
bindUrl: bindUrl,
|
91
|
+
bindUrlProps: bindUrlProps
|
90
92
|
}));
|
91
93
|
};
|
92
94
|
/**
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { ProTableColumnProps, ProTableActionType } from '../typing';
|
2
|
+
import { ProTableColumnProps, ProTableActionType, ProTableProps } from '../typing';
|
3
3
|
import { ColumnProps } from '@alicloudfe/components/types/table';
|
4
4
|
declare type FixedColumnProps = ColumnProps & {
|
5
5
|
wordBreak?: string;
|
@@ -9,5 +9,5 @@ declare type FixedColumnProps = ColumnProps & {
|
|
9
9
|
*/
|
10
10
|
export default function genProColumnToColumn(columns: ProTableColumnProps[],
|
11
11
|
/** 是否渲染骨架屏 */
|
12
|
-
showSkeleton: boolean, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any, dataTeamixSpm?: string): FixedColumnProps[];
|
12
|
+
showSkeleton: boolean, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any, dataTeamixSpm?: string, bindUrl?: ProTableProps['bindUrl'], bindUrlProps?: ProTableProps['bindUrlProps']): FixedColumnProps[];
|
13
13
|
export {};
|
@@ -24,6 +24,8 @@ showSkeleton, actionRef) {
|
|
24
24
|
var
|
25
25
|
// 用于埋点
|
26
26
|
dataTeamixSpm = arguments.length > 4 ? arguments[4] : undefined;
|
27
|
+
var bindUrl = arguments.length > 5 ? arguments[5] : undefined;
|
28
|
+
var bindUrlProps = arguments.length > 6 ? arguments[6] : undefined;
|
27
29
|
return columns.map(function (columnProps) {
|
28
30
|
var filters = columnProps.filters,
|
29
31
|
dataIndex = columnProps.dataIndex,
|
@@ -47,7 +49,7 @@ showSkeleton, actionRef) {
|
|
47
49
|
}, others), {}, {
|
48
50
|
children: children ? genProColumnToColumn(children, showSkeleton, actionRef, context) : undefined,
|
49
51
|
dataIndex: dataIndex === null || dataIndex === void 0 ? void 0 : dataIndex.toString(),
|
50
|
-
title: (0, _columnRender.renderColumnsTitle)(columnProps, actionRef),
|
52
|
+
title: (0, _columnRender.renderColumnsTitle)(columnProps, actionRef, bindUrl, bindUrlProps),
|
51
53
|
cell: function cell(value, index, record) {
|
52
54
|
return (0, _columnRender.renderCell)(value, columnProps, index, record, actionRef, context, dataTeamixSpm);
|
53
55
|
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getUrlStateFilter = getUrlStateFilter;
|
7
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
9
|
+
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; }
|
10
|
+
function getUrlStateFilter(urlState, actionRef) {
|
11
|
+
var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2, _actionRef$current$ge3, _actionRef$current2, _actionRef$current2$s;
|
12
|
+
var filters = Object.keys(urlState).filter(function (item) {
|
13
|
+
return /^filter.+$/.test(item);
|
14
|
+
});
|
15
|
+
var urlStateParams = Object.fromEntries(filters.map(function (item) {
|
16
|
+
var _item$split, _urlState$item, _urlState$item$join, _urlState$item$split, _urlState$item2, _urlState$item2$split;
|
17
|
+
return [(_item$split = item.split('filter')) === null || _item$split === void 0 ? void 0 : _item$split[1], {
|
18
|
+
params: Array.isArray(urlState === null || urlState === void 0 ? void 0 : urlState[item]) ? urlState === null || urlState === void 0 ? void 0 : (_urlState$item = urlState[item]) === null || _urlState$item === void 0 ? void 0 : (_urlState$item$join = _urlState$item.join) === null || _urlState$item$join === void 0 ? void 0 : _urlState$item$join.call(_urlState$item, ',') : urlState === null || urlState === void 0 ? void 0 : urlState[item],
|
19
|
+
rules: Array.isArray(urlState === null || urlState === void 0 ? void 0 : urlState[item]) ? urlState === null || urlState === void 0 ? void 0 : urlState[item] : (_urlState$item$split = urlState === null || urlState === void 0 ? void 0 : (_urlState$item2 = urlState[item]) === null || _urlState$item2 === void 0 ? void 0 : (_urlState$item2$split = _urlState$item2.split) === null || _urlState$item2$split === void 0 ? void 0 : _urlState$item2$split.call(_urlState$item2, ',')) !== null && _urlState$item$split !== void 0 ? _urlState$item$split : []
|
20
|
+
}];
|
21
|
+
}));
|
22
|
+
var rules = (_actionRef$current$ge = (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState) === null || _actionRef$current$ge2 === void 0 ? void 0 : (_actionRef$current$ge3 = _actionRef$current$ge2.call(_actionRef$current)) === null || _actionRef$current$ge3 === void 0 ? void 0 : _actionRef$current$ge3.filterRules) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {};
|
23
|
+
// 再设置所有的列筛选状态
|
24
|
+
(_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$s = _actionRef$current2.setFilterRules) === null || _actionRef$current2$s === void 0 ? void 0 : _actionRef$current2$s.call(_actionRef$current2, _objectSpread(_objectSpread({}, rules), urlStateParams));
|
25
|
+
}
|
package/lib/xconsole.scss
CHANGED
@@ -74,8 +74,9 @@
|
|
74
74
|
--color-event-p5: rgba(209, 187, 79, 1);
|
75
75
|
--color-event-p6: rgba(0, 179, 199, 1);
|
76
76
|
--color-event-p7: rgba(0, 146, 199, 1);
|
77
|
-
--color-text1-4: #1A1A1A;
|
77
|
+
--color-text1-4: var(--color-text-1, #1A1A1A);
|
78
78
|
--color-text1-3: rgba(51, 51, 51, 1);
|
79
|
+
--color-text1-2: rgba(105,105,105,1);
|
79
80
|
--color-notice-7: rgba(88, 154, 219, 1);
|
80
81
|
--color-notice-5: rgba(0, 100, 200, 1);
|
81
82
|
--color-notice-6: rgba(0, 87, 173, 1);
|
@@ -487,6 +488,10 @@
|
|
487
488
|
|
488
489
|
--teamix-status-tag-loading-background: var(--G40, #AAAAAA);
|
489
490
|
|
491
|
+
--color-text1-3: #555555;
|
492
|
+
--color-text1-2: #888888;
|
493
|
+
|
494
|
+
|
490
495
|
.teamix-pro-lable-icon-tip-icon i {
|
491
496
|
color: var(--G40, #AAAAAA);
|
492
497
|
}
|
package/package.json
CHANGED
Binary file
|