@arim-aisdc/public-components 2.3.85 → 2.3.87
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/components/CacheTabs/index.less +1 -0
- package/dist/components/ConfigProvider/context.d.ts +1 -1
- package/dist/components/TableMax/TableMax.js +1 -1
- package/dist/components/TableMax/hooks/useColumnWidth.js +2 -3
- package/dist/components/TableMax/hooks/useVirtualCalculations copy.d.ts +4 -4
- package/dist/components/TableMax/hooks/useVirtualCalculations.d.ts +1 -1
- package/package.json +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ThemeType } from "../../../node_modules/@arim-aisdc/public-components";
|
|
2
|
+
import { ThemeType } from "../../../node_modules/.pnpm/@arim-aisdc+public-componen_fba7153cbee502eee4a055f062ba2119/node_modules/@arim-aisdc/public-components";
|
|
3
3
|
import type { VariablesJsonType } from './type';
|
|
4
4
|
import { Locale } from '../../locales';
|
|
5
5
|
export interface ConfigConsumerProps {
|
|
@@ -538,7 +538,7 @@ var TableMax = function TableMax(_ref) {
|
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
540
|
;
|
|
541
|
-
if (cache && cache !== null && cache !== void 0 && cache.editTime && +new Date() - cache.editTime > ((_tableMaxConfig$cache = tableMaxConfig.cacheMaxAge) !== null && _tableMaxConfig$cache !== void 0 ? _tableMaxConfig$cache : CACHE_MAX_AGE)) {
|
|
541
|
+
if (cache && tableMaxConfig.cacheMaxAge && cache !== null && cache !== void 0 && cache.editTime && +new Date() - cache.editTime > ((_tableMaxConfig$cache = tableMaxConfig.cacheMaxAge) !== null && _tableMaxConfig$cache !== void 0 ? _tableMaxConfig$cache : CACHE_MAX_AGE)) {
|
|
542
542
|
setColumnOrder(arr);
|
|
543
543
|
return;
|
|
544
544
|
}
|
|
@@ -45,8 +45,7 @@ export var useColumnWidth = function useColumnWidth(_ref) {
|
|
|
45
45
|
_ref$columnVisibleCon = _ref.columnVisibleConfig,
|
|
46
46
|
columnVisibleConfig = _ref$columnVisibleCon === void 0 ? {} : _ref$columnVisibleCon,
|
|
47
47
|
tableKey = _ref.tableKey,
|
|
48
|
-
|
|
49
|
-
cacheMaxAge = _ref$cacheMaxAge === void 0 ? 1 * 60 * 60 * 1000 : _ref$cacheMaxAge,
|
|
48
|
+
cacheMaxAge = _ref.cacheMaxAge,
|
|
50
49
|
version = _ref.version;
|
|
51
50
|
var _useState = useState({
|
|
52
51
|
columnSizing: {},
|
|
@@ -248,7 +247,7 @@ export var useColumnWidth = function useColumnWidth(_ref) {
|
|
|
248
247
|
var visibleColumnsSizeMap = {};
|
|
249
248
|
|
|
250
249
|
// 处理缓存过期或无效的情况
|
|
251
|
-
if (version && version !== (cache === null || cache === void 0 ? void 0 : cache.version) || !(cache !== null && cache !== void 0 && cache.editTime) || now - cache.editTime > cacheMaxAge) {
|
|
250
|
+
if (version && version !== (cache === null || cache === void 0 ? void 0 : cache.version) || !(cache !== null && cache !== void 0 && cache.editTime) || cacheMaxAge && now - cache.editTime > cacheMaxAge) {
|
|
252
251
|
Object.keys(initColumnsSizeMap).forEach(function (key) {
|
|
253
252
|
if (columnVisibleConfig[key] !== false) {
|
|
254
253
|
visibleColumnsSizeMap[key] = initColumnsSizeMap[key];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { VirtualScrollConfig } from '../contexts';
|
|
2
2
|
export declare const useVirtualCalculations: (table: any, config: VirtualScrollConfig, tableHeaderRef: React.RefObject<HTMLDivElement>, tableBodyRef: React.RefObject<HTMLDivElement>) => {
|
|
3
3
|
state: {
|
|
4
|
-
columnVirtualizer: import("@tanstack/virtual
|
|
5
|
-
virtualColumns: import("@tanstack/virtual
|
|
4
|
+
columnVirtualizer: import("@tanstack/react-virtual").Virtualizer<HTMLDivElement, Element>;
|
|
5
|
+
virtualColumns: import("@tanstack/react-virtual").VirtualItem[];
|
|
6
6
|
virtualPaddingLeft: any;
|
|
7
7
|
virtualPaddingRight: number;
|
|
8
|
-
rowVirtualizer: import("@tanstack/virtual
|
|
9
|
-
virtualRows: import("@tanstack/virtual
|
|
8
|
+
rowVirtualizer: import("@tanstack/react-virtual").Virtualizer<HTMLDivElement, Element>;
|
|
9
|
+
virtualRows: import("@tanstack/react-virtual").VirtualItem[];
|
|
10
10
|
leftPinnedColumns: any;
|
|
11
11
|
rightPinnedColumns: any;
|
|
12
12
|
scrollableColumns: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VirtualScrollConfig } from '../contexts';
|
|
2
2
|
export declare const useVirtualCalculations: (table: any, tableKey: string, config: VirtualScrollConfig, tableBodyRef: React.RefObject<HTMLDivElement>) => {
|
|
3
3
|
state: {
|
|
4
|
-
rowVirtualizer: import("@tanstack/virtual
|
|
4
|
+
rowVirtualizer: import("@tanstack/react-virtual").Virtualizer<HTMLDivElement, Element>;
|
|
5
5
|
virtualRows: any[];
|
|
6
6
|
};
|
|
7
7
|
isVirtualEnabled: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arim-aisdc/public-components",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.87",
|
|
4
4
|
"description": "前端组件库",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"react-rnd": "^10.5.2",
|
|
75
75
|
"react-router-dom": "^6.22.3",
|
|
76
76
|
"react-split-pane": "^0.1.92",
|
|
77
|
+
"swr": "^2.4.0",
|
|
77
78
|
"xlsx": "^0.18.5"
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|