@arim-aisdc/public-components 2.3.86 → 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/BaseInfo/BaseInfo.d.ts +1 -1
- 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/components/ColumnSort/customSortFns.d.ts +8 -8
- 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 +1 -1
|
@@ -17,7 +17,7 @@ export declare const foramtBaseInfoField: (data: any, dataField: BaseInfoFieldTy
|
|
|
17
17
|
value: any;
|
|
18
18
|
field: string;
|
|
19
19
|
label?: string;
|
|
20
|
-
text: string |
|
|
20
|
+
text: string | Element | JSX.Element;
|
|
21
21
|
units?: string;
|
|
22
22
|
width?: string;
|
|
23
23
|
labelWidth?: string;
|
|
@@ -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
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TableMaxColumnType } from "../../type";
|
|
2
|
-
export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
3
|
-
export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
4
|
-
export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
5
|
-
export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
2
|
+
export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
3
|
+
export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
4
|
+
export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
5
|
+
export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
6
6
|
declare const customSortFns: {
|
|
7
|
-
numberSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
8
|
-
stringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
9
|
-
timeSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
10
|
-
numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
7
|
+
numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
8
|
+
stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
9
|
+
timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
10
|
+
numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
11
11
|
};
|
|
12
12
|
export default customSortFns;
|
|
13
13
|
export type SortFnType = keyof typeof customSortFns | undefined;
|
|
@@ -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;
|