@4399ywkf/design 1.3.11 → 2.0.0
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/Table/components/ColumnSetting/index.js +25 -35
- package/dist/Table/components/ColumnSetting/style.d.ts +16 -0
- package/dist/Table/components/ColumnSetting/style.js +19 -0
- package/dist/Table/components/EnumFilter/index.d.ts +8 -8
- package/dist/Table/components/EnumFilter/index.js +34 -36
- package/dist/Table/components/EnumFilter/style.d.ts +54 -0
- package/dist/Table/components/EnumFilter/style.js +58 -0
- package/dist/Table/components/Export/RadioMode.d.ts +1 -5
- package/dist/Table/components/Export/RadioMode.js +10 -11
- package/dist/Table/components/Export/index.js +160 -207
- package/dist/Table/components/Export/style.d.ts +15 -0
- package/dist/Table/components/Export/style.js +19 -0
- package/dist/Table/components/FilterDropdown/index.d.ts +7 -7
- package/dist/Table/components/FilterDropdown/index.js +6 -7
- package/dist/Table/components/FilterDropdown/style.d.ts +13 -0
- package/dist/Table/components/FilterDropdown/style.js +17 -0
- package/dist/Table/components/FilterKeys/index.d.ts +2 -2
- package/dist/Table/components/FilterKeys/index.js +51 -69
- package/dist/Table/components/FilterKeys/style.d.ts +29 -0
- package/dist/Table/components/FilterKeys/style.js +33 -0
- package/dist/Table/components/Reload/index.js +8 -21
- package/dist/Table/components/SearchInput/index.d.ts +3 -4
- package/dist/Table/components/SearchInput/index.js +50 -38
- package/dist/Table/components/SearchInput/style.d.ts +11 -0
- package/dist/Table/components/SearchInput/style.js +15 -0
- package/dist/Table/components/TableSize/index.js +7 -10
- package/dist/Table/components/TableTitle/index.d.ts +1 -1
- package/dist/Table/components/TableTitle/index.js +36 -38
- package/dist/Table/components/TableTitle/style.d.ts +25 -0
- package/dist/Table/components/TableTitle/style.js +29 -0
- package/dist/Table/context.d.ts +32 -0
- package/dist/Table/context.js +31 -0
- package/dist/Table/hooks/index.d.ts +8 -0
- package/dist/Table/hooks/index.js +8 -0
- package/dist/Table/hooks/useColumnsInit.d.ts +6 -0
- package/dist/Table/hooks/useColumnsInit.js +44 -0
- package/dist/Table/hooks/useEmptyText.d.ts +11 -0
- package/dist/Table/hooks/useEmptyText.js +34 -0
- package/dist/Table/hooks/usePagination.d.ts +9 -0
- package/dist/Table/hooks/usePagination.js +50 -0
- package/dist/Table/hooks/useQuerySnapshot.d.ts +6 -0
- package/dist/Table/hooks/useQuerySnapshot.js +63 -0
- package/dist/Table/hooks/useRowSelection.d.ts +11 -0
- package/dist/Table/hooks/useRowSelection.js +34 -0
- package/dist/Table/hooks/useSearchEffect.d.ts +9 -0
- package/dist/Table/hooks/useSearchEffect.js +48 -0
- package/dist/Table/hooks/useTableChange.d.ts +10 -0
- package/dist/Table/hooks/useTableChange.js +56 -0
- package/dist/Table/hooks/useTriggerSearch.d.ts +22 -0
- package/dist/Table/hooks/useTriggerSearch.js +130 -0
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +25 -1
- package/dist/Table/store/createStore.d.ts +2 -0
- package/dist/Table/store/createStore.js +30 -0
- package/dist/Table/store/hooks.d.ts +33 -0
- package/dist/Table/store/hooks.js +98 -0
- package/dist/Table/store/slices/column/actions.d.ts +9 -0
- package/dist/Table/store/slices/column/actions.js +10 -0
- package/dist/Table/store/slices/column/initialState.d.ts +2 -0
- package/dist/Table/store/slices/column/initialState.js +3 -0
- package/dist/Table/store/slices/persist/actions.d.ts +10 -0
- package/dist/Table/store/slices/persist/actions.js +28 -0
- package/dist/Table/store/slices/persist/api.d.ts +8 -0
- package/dist/Table/store/slices/persist/api.js +40 -0
- package/dist/Table/store/slices/query/actions.d.ts +32 -0
- package/dist/Table/store/slices/query/actions.js +129 -0
- package/dist/Table/store/slices/query/initialState.d.ts +2 -0
- package/dist/Table/store/slices/query/initialState.js +5 -0
- package/dist/Table/store/slices/request/actions.d.ts +8 -0
- package/dist/Table/store/slices/request/actions.js +14 -0
- package/dist/Table/store/slices/request/initialState.d.ts +2 -0
- package/dist/Table/store/slices/request/initialState.js +7 -0
- package/dist/Table/store/slices/ui/actions.d.ts +11 -0
- package/dist/Table/store/slices/ui/actions.js +15 -0
- package/dist/Table/store/slices/ui/initialState.d.ts +2 -0
- package/dist/Table/store/slices/ui/initialState.js +4 -0
- package/dist/Table/store/types.d.ts +79 -0
- package/dist/Table/store/types.js +1 -0
- package/dist/Table/style.d.ts +3 -0
- package/dist/Table/style.js +10 -0
- package/dist/Table/table.d.ts +2 -8
- package/dist/Table/table.js +160 -185
- package/dist/Table/type.d.ts +50 -64
- package/dist/Table/type.js +1 -3
- package/dist/Table/utils/Provide.d.ts +6 -9
- package/dist/Table/utils/Provide.js +4 -258
- package/dist/Table/utils/columnKey.d.ts +2 -0
- package/dist/Table/utils/columnKey.js +6 -0
- package/dist/Table/utils/getColumn.d.ts +7 -7
- package/dist/Table/utils/getColumnEnumProps.d.ts +4 -2
- package/dist/Table/utils/getColumnEnumProps.js +8 -6
- package/dist/Table/utils/getColumnMerge.d.ts +7 -2
- package/dist/Table/utils/getColumnMerge.js +3 -2
- package/dist/Table/utils/getDateColumn.d.ts +8 -7
- package/dist/Table/utils/getDateColumn.js +22 -68
- package/dist/Table/utils/getInputColumn.d.ts +2 -1
- package/dist/Table/utils/getInputColumn.js +2 -6
- package/dist/Table/utils/getSort.d.ts +4 -2
- package/dist/Table/utils/getSort.js +15 -12
- package/dist/Table/utils/index.d.ts +5 -20
- package/dist/Table/utils/index.js +16 -136
- package/package.json +34 -25
- package/dist/Table/components/ColumnSetting/index.css +0 -4
- package/dist/Table/components/EnumFilter/index.css +0 -57
- package/dist/Table/components/FilterDropdown/index.css +0 -11
- package/dist/Table/components/FilterKeys/index.css +0 -19
- package/dist/Table/components/SearchInput/style.css +0 -10
- package/dist/Table/style.css +0 -42
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
var translateOrder = function translateOrder(v) {
|
|
2
3
|
if (v === 'asc') {
|
|
3
4
|
return 'ascend';
|
|
@@ -9,22 +10,24 @@ var translateOrder = function translateOrder(v) {
|
|
|
9
10
|
};
|
|
10
11
|
var getColumnSort = function getColumnSort(column, columnKey, queryData) {
|
|
11
12
|
var sortOrder = function sortOrder() {
|
|
13
|
+
var _queryData$multipleSo;
|
|
12
14
|
if (column.sortOrder) {
|
|
13
15
|
return column.sortOrder;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
}
|
|
17
|
+
var isMultipleSorter = _typeof(column.sorter) === 'object' && column.sorter && 'multiple' in column.sorter;
|
|
18
|
+
if (queryData.sort === columnKey && !isMultipleSorter) {
|
|
19
|
+
var _queryData$order;
|
|
20
|
+
return translateOrder((_queryData$order = queryData.order) !== null && _queryData$order !== void 0 ? _queryData$order : '');
|
|
21
|
+
}
|
|
22
|
+
if ((_queryData$multipleSo = queryData.multipleSort) !== null && _queryData$multipleSo !== void 0 && _queryData$multipleSo.find(function (o) {
|
|
23
|
+
return o.key === columnKey;
|
|
24
|
+
})) {
|
|
25
|
+
var _queryData$multipleSo2, _queryData$multipleSo3;
|
|
26
|
+
return (_queryData$multipleSo2 = (_queryData$multipleSo3 = queryData.multipleSort.find(function (o) {
|
|
19
27
|
return o.key === columnKey;
|
|
20
|
-
}))
|
|
21
|
-
return queryData.multipleSort.find(function (o) {
|
|
22
|
-
return o.key === columnKey;
|
|
23
|
-
}).value;
|
|
24
|
-
} else {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
28
|
+
})) === null || _queryData$multipleSo3 === void 0 ? void 0 : _queryData$multipleSo3.value) !== null && _queryData$multipleSo2 !== void 0 ? _queryData$multipleSo2 : null;
|
|
27
29
|
}
|
|
30
|
+
return null;
|
|
28
31
|
};
|
|
29
32
|
return {
|
|
30
33
|
sortOrder: sortOrder()
|
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export declare function genRichColumnToColumn(columns: RichColumn<
|
|
6
|
-
/**
|
|
7
|
-
* 合并用户传递的 分页参数 和 Table 内置的参数
|
|
8
|
-
* @param defaultPagination
|
|
9
|
-
* @param total
|
|
10
|
-
*/
|
|
11
|
-
export declare function mergePagination(defaultPagination: TablePaginationConfig, total: number): TablePaginationConfig | false | undefined;
|
|
12
|
-
export declare function mergeTablePagination(propsPagination?: TablePaginationConfig | false, cacheName?: string): TablePaginationConfig;
|
|
13
|
-
/**
|
|
14
|
-
* 根据 key 和 dataIndex 生成唯一 id
|
|
15
|
-
*
|
|
16
|
-
* @param key 用户设置的 key
|
|
17
|
-
* @param dataIndex 在对象中的数据
|
|
18
|
-
* @param index 序列号,理论上唯一
|
|
19
|
-
*/
|
|
20
|
-
export declare const genColumnKey: (key?: string | number | Key, index?: number | string) => string;
|
|
1
|
+
import type { ColumnsType } from 'antd/es/table';
|
|
2
|
+
import type { ColumnSettingItem, QuerySnapshot, TableStore } from '../store/types';
|
|
3
|
+
import type { RichColumn } from '../type';
|
|
4
|
+
export { genColumnKey } from './columnKey';
|
|
5
|
+
export declare function genRichColumnToColumn(columns: RichColumn<unknown>[], queryData: QuerySnapshot, setFilter: TableStore['setFilter'], columnSetting: ColumnSettingItem[], dataSource?: unknown[]): ColumnsType<unknown>;
|
|
@@ -4,17 +4,16 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { columnsMap } from "../utils/getColumn";
|
|
11
|
-
import { getColumnHidden } from "../utils/getColumnHidden";
|
|
12
|
-
import { getColumnMerge } from "../utils/getColumnMerge";
|
|
7
|
+
import { columnsMap } from "./getColumn";
|
|
8
|
+
import { getColumnHidden } from "./getColumnHidden";
|
|
9
|
+
import { getColumnMerge } from "./getColumnMerge";
|
|
13
10
|
import { getColumnSort } from "./getSort";
|
|
11
|
+
import { genColumnKey } from "./columnKey";
|
|
12
|
+
export { genColumnKey } from "./columnKey";
|
|
14
13
|
export function genRichColumnToColumn(columns, queryData, setFilter, columnSetting, dataSource) {
|
|
15
14
|
var _columns$map$filter;
|
|
16
15
|
return (_columns$map$filter = columns === null || columns === void 0 ? void 0 : columns.map(function (column, index) {
|
|
17
|
-
var _column$dataIndex, _column$fullFilter$ty, _column$fullFilter;
|
|
16
|
+
var _column$dataIndex, _column$fullFilter$ty, _column$fullFilter, _queryData$filter, _queryData$filter2;
|
|
18
17
|
var columnKey = genColumnKey(column.key || (Array.isArray(column.dataIndex) ? column.dataIndex.join('.') : (_column$dataIndex = column.dataIndex) === null || _column$dataIndex === void 0 ? void 0 : _column$dataIndex.toString()), index);
|
|
19
18
|
var fullFilterData = {};
|
|
20
19
|
if (columnsMap[(_column$fullFilter$ty = (_column$fullFilter = column.fullFilter) === null || _column$fullFilter === void 0 ? void 0 : _column$fullFilter.type) !== null && _column$fullFilter$ty !== void 0 ? _column$fullFilter$ty : '']) {
|
|
@@ -25,133 +24,14 @@ export function genRichColumnToColumn(columns, queryData, setFilter, columnSetti
|
|
|
25
24
|
}, column.fullFilter)
|
|
26
25
|
})));
|
|
27
26
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* @param total
|
|
36
|
-
*/
|
|
37
|
-
export function mergePagination(defaultPagination, total) {
|
|
38
|
-
var _defaultPagination$sh;
|
|
39
|
-
var store = useContext(StoreContext);
|
|
40
|
-
var _useStore = useStore(store),
|
|
41
|
-
setPagination = _useStore.setPagination;
|
|
42
|
-
var current = defaultPagination.current,
|
|
43
|
-
pageSize = defaultPagination.pageSize;
|
|
44
|
-
useEffect(function () {
|
|
45
|
-
setPagination(current !== null && current !== void 0 ? current : 1, pageSize !== null && pageSize !== void 0 ? pageSize : 20);
|
|
46
|
-
}, []);
|
|
47
|
-
return _objectSpread(_objectSpread({
|
|
48
|
-
showTotal: function showTotal(total) {
|
|
49
|
-
return "\u5171\u6709 ".concat(total, " \u6761\u8BB0\u5F55");
|
|
50
|
-
},
|
|
51
|
-
total: total,
|
|
52
|
-
showSizeChanger: (_defaultPagination$sh = defaultPagination === null || defaultPagination === void 0 ? void 0 : defaultPagination.showSizeChanger) !== null && _defaultPagination$sh !== void 0 ? _defaultPagination$sh : true
|
|
53
|
-
}, defaultPagination), {}, {
|
|
54
|
-
onChange: function onChange(page, newPageSize) {
|
|
55
|
-
var _ref = defaultPagination,
|
|
56
|
-
onChange = _ref.onChange;
|
|
57
|
-
onChange === null || onChange === void 0 || onChange(page, newPageSize || 20);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
export function mergeTablePagination(propsPagination, cacheName) {
|
|
62
|
-
var store = useContext(StoreContext);
|
|
63
|
-
var _useStore2 = useStore(store),
|
|
64
|
-
queryData = _useStore2.queryData;
|
|
65
|
-
var storeDefaultCurrent = queryData.defaultCurrent,
|
|
66
|
-
storeDefaultPageSize = queryData.defaultPageSize,
|
|
67
|
-
limit = queryData.limit,
|
|
68
|
-
offset = queryData.offset;
|
|
69
|
-
var defaultCurrent,
|
|
70
|
-
current = 1;
|
|
71
|
-
var defaultPageSize,
|
|
72
|
-
pageSize = 20;
|
|
73
|
-
if (cacheName) {
|
|
74
|
-
// 走缓存 得到结果是 {limit: 20, offset: 20}
|
|
75
|
-
var localData = localStorage.getItem(cacheName);
|
|
76
|
-
if (localData) {
|
|
77
|
-
var localJsonData = JSON.parse(localData);
|
|
78
|
-
if (localJsonData.limit) {
|
|
79
|
-
defaultPageSize = localJsonData.limit;
|
|
80
|
-
pageSize = defaultPageSize;
|
|
81
|
-
}
|
|
82
|
-
if (localJsonData.offset && localJsonData.limit) {
|
|
83
|
-
defaultCurrent = localJsonData.offset / localJsonData.limit + 1;
|
|
84
|
-
current = defaultCurrent;
|
|
85
|
-
}
|
|
86
|
-
} else {
|
|
87
|
-
defaultPageSize = storeDefaultPageSize;
|
|
88
|
-
pageSize = limit !== null && limit !== void 0 ? limit : 20;
|
|
89
|
-
defaultCurrent = storeDefaultCurrent;
|
|
90
|
-
if (limit === 0) {
|
|
91
|
-
current = 1;
|
|
92
|
-
} else {
|
|
93
|
-
if (limit && limit !== 0 && offset) {
|
|
94
|
-
current = offset / limit + 1;
|
|
95
|
-
} else {
|
|
96
|
-
current = 1;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
defaultCurrent = storeDefaultCurrent;
|
|
102
|
-
// pageSize = limit ?? storeDefaultPageSize;
|
|
103
|
-
|
|
104
|
-
if (!limit) {
|
|
105
|
-
if (_typeof(propsPagination) === 'object' && propsPagination.defaultPageSize) {
|
|
106
|
-
pageSize = propsPagination.defaultPageSize;
|
|
107
|
-
}
|
|
108
|
-
} else {
|
|
109
|
-
pageSize = limit;
|
|
110
|
-
}
|
|
111
|
-
defaultPageSize = storeDefaultPageSize;
|
|
112
|
-
if (limit === 0) {
|
|
113
|
-
current = 1;
|
|
114
|
-
} else {
|
|
115
|
-
if (limit && limit !== 0 && offset) {
|
|
116
|
-
current = offset / limit + 1;
|
|
117
|
-
} else {
|
|
118
|
-
current = 1;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
if (_typeof(propsPagination) === 'object') {
|
|
122
|
-
if (propsPagination.defaultPageSize) {
|
|
123
|
-
defaultPageSize = propsPagination.defaultPageSize;
|
|
27
|
+
var storeFilterValue = (_queryData$filter = queryData.filter) === null || _queryData$filter === void 0 || (_queryData$filter = _queryData$filter[columnKey]) === null || _queryData$filter === void 0 ? void 0 : _queryData$filter.value;
|
|
28
|
+
var hasStoreFilter = Object.prototype.hasOwnProperty.call((_queryData$filter2 = queryData.filter) !== null && _queryData$filter2 !== void 0 ? _queryData$filter2 : {}, columnKey);
|
|
29
|
+
var controlledFilter = {};
|
|
30
|
+
if (column.filters || column.fullFilter) {
|
|
31
|
+
var _column$filteredValue;
|
|
32
|
+
controlledFilter.filteredValue = hasStoreFilter ? storeFilterValue !== null && storeFilterValue !== void 0 ? storeFilterValue : [] : (_column$filteredValue = column.filteredValue) !== null && _column$filteredValue !== void 0 ? _column$filteredValue : null;
|
|
33
|
+
controlledFilter.filtered = hasStoreFilter;
|
|
124
34
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (propsPagination !== null && propsPagination !== void 0 && propsPagination.pageSize) {
|
|
129
|
-
var _propsPagination$page;
|
|
130
|
-
pageSize = (_propsPagination$page = propsPagination === null || propsPagination === void 0 ? void 0 : propsPagination.pageSize) !== null && _propsPagination$page !== void 0 ? _propsPagination$page : 20;
|
|
131
|
-
}
|
|
132
|
-
if (propsPagination !== null && propsPagination !== void 0 && propsPagination.current) {
|
|
133
|
-
var _propsPagination$curr;
|
|
134
|
-
current = (_propsPagination$curr = propsPagination === null || propsPagination === void 0 ? void 0 : propsPagination.current) !== null && _propsPagination$curr !== void 0 ? _propsPagination$curr : 1;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return _objectSpread(_objectSpread({}, propsPagination), {}, {
|
|
138
|
-
defaultCurrent: defaultCurrent,
|
|
139
|
-
defaultPageSize: defaultPageSize,
|
|
140
|
-
current: current,
|
|
141
|
-
pageSize: pageSize
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* 根据 key 和 dataIndex 生成唯一 id
|
|
147
|
-
*
|
|
148
|
-
* @param key 用户设置的 key
|
|
149
|
-
* @param dataIndex 在对象中的数据
|
|
150
|
-
* @param index 序列号,理论上唯一
|
|
151
|
-
*/
|
|
152
|
-
export var genColumnKey = function genColumnKey(key, index) {
|
|
153
|
-
if (key) {
|
|
154
|
-
return Array.isArray(key) ? key.join('-') : key.toString();
|
|
155
|
-
}
|
|
156
|
-
return "".concat(index);
|
|
157
|
-
};
|
|
35
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, column), controlledFilter), fullFilterData), getColumnSort(column, columnKey, queryData)), getColumnHidden(columnKey, columnSetting)), getColumnMerge(columnKey, column, queryData, dataSource));
|
|
36
|
+
}).filter(Boolean)) !== null && _columns$map$filter !== void 0 ? _columns$map$filter : [];
|
|
37
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4399ywkf/design",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "4399ywkf Design React UI Library.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -9,6 +9,32 @@
|
|
|
9
9
|
"dist",
|
|
10
10
|
"public"
|
|
11
11
|
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "father build && gulp less",
|
|
14
|
+
"build:ci": "pnpm lint && pnpm build && pnpm docs:build",
|
|
15
|
+
"build:watch": "father dev",
|
|
16
|
+
"changeset": "changeset",
|
|
17
|
+
"changeset:publish": "changeset publish",
|
|
18
|
+
"changeset:version": "changeset version",
|
|
19
|
+
"dev": "dumi dev",
|
|
20
|
+
"docs:build": "dumi build",
|
|
21
|
+
"docs:preview": "dumi preview",
|
|
22
|
+
"doctor": "father doctor",
|
|
23
|
+
"lint": "npm run lint:es && npm run lint:css",
|
|
24
|
+
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
|
25
|
+
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
26
|
+
"prepare": "husky install && dumi setup",
|
|
27
|
+
"prepublishOnly": "father doctor && npm run build",
|
|
28
|
+
"postpublish": "git push && git push --tags",
|
|
29
|
+
"pub": "npm run pub:check && npm run build && npm publish --ignore-scripts",
|
|
30
|
+
"pub:check": "father doctor && node -e \"const p=require('./package.json');const d=require('child_process').execSync('npm view '+p.name+' version 2>/dev/null').toString().trim();if(d===p.version){console.error('\\x1b[31m✖ 版本 '+p.version+' 已存在,请先升级版本号\\x1b[0m');process.exit(1)}else{console.log('\\x1b[32m✔ 版本检查通过: '+p.version+'\\x1b[0m')}\"",
|
|
31
|
+
"pub:patch": "npm version patch --no-git-tag-version && npm run pub",
|
|
32
|
+
"pub:minor": "npm version minor --no-git-tag-version && npm run pub",
|
|
33
|
+
"pub:major": "npm version major --no-git-tag-version && npm run pub",
|
|
34
|
+
"release": "npm run build && changeset publish",
|
|
35
|
+
"start": "npm run dev",
|
|
36
|
+
"test:build": "rm -rf dist docs-dist && pnpm build:ci && echo '✅ 构建测试通过'"
|
|
37
|
+
},
|
|
12
38
|
"commitlint": {
|
|
13
39
|
"extends": [
|
|
14
40
|
"@commitlint/config-conventional"
|
|
@@ -34,12 +60,12 @@
|
|
|
34
60
|
"dependencies": {
|
|
35
61
|
"@4399ywkf/fr-generator": "^2.8.16",
|
|
36
62
|
"@ant-design/icons": "^5.6.0",
|
|
37
|
-
"@ant-design/v5-patch-for-react-19": "^1.0.3",
|
|
38
63
|
"@floating-ui/react": "^0.27.14",
|
|
39
64
|
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
40
65
|
"@radix-ui/react-popover": "^1.1.14",
|
|
41
66
|
"@rive-app/react-canvas": "^4.21.3",
|
|
42
67
|
"ahooks": "^3.8.5",
|
|
68
|
+
"antd-style": "^4.1.0",
|
|
43
69
|
"classnames": "^2.5.1",
|
|
44
70
|
"clone": "^2.1.2",
|
|
45
71
|
"clsx": "^2.1.1",
|
|
@@ -104,7 +130,7 @@
|
|
|
104
130
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
105
131
|
"@types/wavesurfer.js": "^6.0.12",
|
|
106
132
|
"@umijs/lint": "^4.4.4",
|
|
107
|
-
"antd": "^
|
|
133
|
+
"antd": "^6.0.0",
|
|
108
134
|
"dumi": "^2.4.21",
|
|
109
135
|
"eslint": "^8.57.1",
|
|
110
136
|
"father": "^4.5.2",
|
|
@@ -121,10 +147,11 @@
|
|
|
121
147
|
"react-dom": "^18.3.0",
|
|
122
148
|
"sass": "^1.89.2",
|
|
123
149
|
"sass-embedded": "^1.89.2",
|
|
124
|
-
"stylelint": "^14.16.1"
|
|
150
|
+
"stylelint": "^14.16.1",
|
|
151
|
+
"v8-compile-cache": "^2.4.0"
|
|
125
152
|
},
|
|
126
153
|
"peerDependencies": {
|
|
127
|
-
"antd": ">=
|
|
154
|
+
"antd": ">=6.0.0",
|
|
128
155
|
"react": ">=16.9.0",
|
|
129
156
|
"react-dom": ">=16.9.0"
|
|
130
157
|
},
|
|
@@ -134,23 +161,5 @@
|
|
|
134
161
|
"authors": [
|
|
135
162
|
"ywjszx@4399.com"
|
|
136
163
|
],
|
|
137
|
-
"slideEffects": false
|
|
138
|
-
|
|
139
|
-
"build": "father build && gulp less",
|
|
140
|
-
"build:ci": "pnpm lint && pnpm build && pnpm docs:build",
|
|
141
|
-
"build:watch": "father dev",
|
|
142
|
-
"changeset": "changeset",
|
|
143
|
-
"changeset:publish": "changeset publish",
|
|
144
|
-
"changeset:version": "changeset version",
|
|
145
|
-
"dev": "dumi dev",
|
|
146
|
-
"docs:build": "dumi build",
|
|
147
|
-
"docs:preview": "dumi preview",
|
|
148
|
-
"doctor": "father doctor",
|
|
149
|
-
"lint": "npm run lint:es && npm run lint:css",
|
|
150
|
-
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
|
151
|
-
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
152
|
-
"release": "npm run build && changeset publish",
|
|
153
|
-
"start": "npm run dev",
|
|
154
|
-
"test:build": "rm -rf dist docs-dist && pnpm build:ci && echo '✅ 构建测试通过'"
|
|
155
|
-
}
|
|
156
|
-
}
|
|
164
|
+
"slideEffects": false
|
|
165
|
+
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
.table-filter-dropdown {
|
|
2
|
-
min-width: 120px;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.table-filter-dropdown-search {
|
|
6
|
-
padding: 8px 4px;
|
|
7
|
-
border-bottom: 1px solid #f0f0f0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.dropdown-menu {
|
|
11
|
-
max-height: 264px;
|
|
12
|
-
border: 0;
|
|
13
|
-
overflow-x: hidden;
|
|
14
|
-
overflow-y: auto;
|
|
15
|
-
background: #fff;
|
|
16
|
-
padding-top: 4px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.dropdown-menu-ul {
|
|
20
|
-
display: flex !important;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
gap: 4px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.dropdown-menu-item {
|
|
26
|
-
clear: both;
|
|
27
|
-
margin: 0;
|
|
28
|
-
padding: 5px 12px;
|
|
29
|
-
color: rgba(0, 0, 0, 88%);
|
|
30
|
-
font-weight: normal;
|
|
31
|
-
font-size: 14px;
|
|
32
|
-
line-height: 1.5714;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
transition: all 0.2s;
|
|
35
|
-
border-radius: 4px;
|
|
36
|
-
|
|
37
|
-
&:hover {
|
|
38
|
-
background-color: rgba(0, 0, 0, 4%);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.dropdown-menu-item-selected {
|
|
43
|
-
color: #1677ff;
|
|
44
|
-
background-color: #e6f4ff;
|
|
45
|
-
|
|
46
|
-
&:hover {
|
|
47
|
-
background-color: #bae0ff;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.dropdown-menu-action {
|
|
52
|
-
padding: 4px 12px;
|
|
53
|
-
display: flex;
|
|
54
|
-
flex-direction: row;
|
|
55
|
-
justify-content: space-between;
|
|
56
|
-
align-items: center;
|
|
57
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
.custom-tag {
|
|
2
|
-
height: 32px;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.custom-overflow {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-wrap: wrap;
|
|
8
|
-
max-width: 100%;
|
|
9
|
-
position: relative;
|
|
10
|
-
flex: 1;
|
|
11
|
-
justify-content: flex-end;
|
|
12
|
-
align-items: center;
|
|
13
|
-
margin-right: 8px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
.overflow-button {
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
}
|
package/dist/Table/style.css
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
div[class*='table-title'] {
|
|
2
|
-
padding: 0 !important;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.richTableTitle {
|
|
6
|
-
padding: 8px 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: row;
|
|
9
|
-
justify-content: space-between;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.richTableTitleRight {
|
|
13
|
-
display: flex;
|
|
14
|
-
flex: 1;
|
|
15
|
-
justify-content: flex-end;
|
|
16
|
-
align-items: center;
|
|
17
|
-
gap: 8px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.listToolbarSettingItem {
|
|
21
|
-
margin-block: 0;
|
|
22
|
-
margin-inline: 4px;
|
|
23
|
-
color: rgba(42, 46, 54, 88%);
|
|
24
|
-
font-size: 16px;
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.listToolbarSettingItem:hover {
|
|
29
|
-
color: #1677ff;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.columnSettingTitle {
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
justify-content: space-between;
|
|
36
|
-
height: 32px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.columnSettingContent {
|
|
40
|
-
max-height: 200px;
|
|
41
|
-
overflow: auto;
|
|
42
|
-
}
|