@arim-aisdc/public-components 2.3.28 → 2.3.30
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/TableMax/TableBody/Row.d.ts +2 -2
- package/dist/components/TableMax/TableBody/Row.js +2 -1
- package/dist/components/TableMax/TableBody/index.d.ts +3 -3
- package/dist/components/TableMax/TableBody/index.js +2 -1
- package/dist/components/TableMax/TableMax.js +1 -1
- package/dist/components/TableMax/components/ColumnSort/customSortFns.d.ts +8 -8
- package/package.json +1 -1
|
@@ -60,5 +60,5 @@ type IRowProps = {
|
|
|
60
60
|
dropSide: DropSide;
|
|
61
61
|
onEditValueChange?: (field: string, value: any, extra?: any) => void;
|
|
62
62
|
};
|
|
63
|
-
declare const
|
|
64
|
-
export default
|
|
63
|
+
declare const Row: ({ tableBodyRef, table, tableId, row, rowSelectedId, setRowSelectedId, rowHighLightId, setRowHighLightId, selectedRowChange, onSelectChange, canSelection, selectionWithoutChecked, reorderRow, canRowDrag, rowClassName, cellClassName, rowStyle, getCellProps, editting, rowEditing, renderSubComponent, selectedRowDragging, setSelectedRowDragging, onRowMouseEnter, onRowMouseLeave, onRowMouseClick, onRowMouseDoubleClick, rowHeight, disableDragRowIds, selectRowWhenClick, handleEditRowWhenDClick, canEditRowWhenDClick, theme, dragBeforeStart, shadowColumnInfo, onCellContextMenu, getRowHoverTipConfig, tableTooltip, changeHoverRow, clearHoverRowIndex, hoverRowIndex, dropSide, onEditValueChange, }: IRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export default Row;
|
|
@@ -413,7 +413,8 @@ var Row = function Row(_ref) {
|
|
|
413
413
|
})]
|
|
414
414
|
});
|
|
415
415
|
};
|
|
416
|
-
export default
|
|
416
|
+
// export default React.memo(Row);
|
|
417
|
+
export default Row;
|
|
417
418
|
function formatDate(dateValue) {
|
|
418
419
|
var pattern = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "YYYY-MM-DD HH:mm";
|
|
419
420
|
if (!dateValue) return '';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
2
|
import { IMenuOptionsType, OnSelectChangeType } from "../type";
|
|
3
|
-
import
|
|
3
|
+
import { Dispatch, MutableRefObject, ReactNode, SetStateAction } from 'react';
|
|
4
4
|
import './index.less';
|
|
5
5
|
type TableBodyPropsType = {
|
|
6
6
|
tableBodyRef: MutableRefObject<HTMLDivElement> | null;
|
|
@@ -74,5 +74,5 @@ type TableBodyPropsType = {
|
|
|
74
74
|
hasTotalRow?: boolean;
|
|
75
75
|
totalDatas?: any[];
|
|
76
76
|
};
|
|
77
|
-
declare const
|
|
78
|
-
export default
|
|
77
|
+
declare const TableBody: ({ tableBodyRef, table, tableId, theme, reorderRow, rowSelectedId, setRowSelectedId, rowHighLightId, setRowHighLightId, selectedRowChange, onSelectChange, canSelection, selectionWithoutChecked, tableContainerWidth, selectedRowDragging, setSelectedRowDragging, canRowDrag, rowKey, loading, rowClassName, cellClassName, rowStyle, getCellProps, rowHeight, renderSubComponent, onRowMouseEnter, onRowMouseLeave, onRowMouseClick, onRowMouseDoubleClick, disableDragRowIds, selectRowWhenClick, datas, canEditRowWhenDClick, editingRowId, handleEditRowWhenDClick, dragBeforeStart, shadowColumnInfo, getContextMenu, onClickContextMenu, getRowHoverTipConfig, tableTooltip, compactMode, onEditValueChange, hasTotalRow, totalDatas }: TableBodyPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
export default TableBody;
|
|
@@ -431,7 +431,8 @@ var TableBody = function TableBody(_ref) {
|
|
|
431
431
|
})
|
|
432
432
|
);
|
|
433
433
|
};
|
|
434
|
-
export default
|
|
434
|
+
export default TableBody;
|
|
435
|
+
// export default React.memo(TableBody);
|
|
435
436
|
|
|
436
437
|
// export const MemoizedTableBody = React.memo(
|
|
437
438
|
// TableBody,
|
|
@@ -698,7 +698,7 @@ var TableMax = function TableMax(_ref) {
|
|
|
698
698
|
formatFiltersV2: getFormatFiltersV2(columns, columnFilters) // 动态化查询格式:https://arim-jyzx.coding.net/p/infra/wiki/3252
|
|
699
699
|
});
|
|
700
700
|
}
|
|
701
|
-
}, [JSON.stringify(columnFilters),
|
|
701
|
+
}, [JSON.stringify(columnFilters), manualFiltering, tableId]);
|
|
702
702
|
|
|
703
703
|
// 排序回调
|
|
704
704
|
useEffect(function () {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TableMaxColumnType } from "../../type";
|
|
2
|
-
export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 |
|
|
3
|
-
export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 |
|
|
4
|
-
export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 |
|
|
5
|
-
export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 |
|
|
2
|
+
export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
|
|
3
|
+
export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
|
|
4
|
+
export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
|
|
5
|
+
export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
|
|
6
6
|
declare const customSortFns: {
|
|
7
|
-
numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 |
|
|
8
|
-
stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 |
|
|
9
|
-
timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 |
|
|
10
|
-
numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 |
|
|
7
|
+
numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
|
|
8
|
+
stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
|
|
9
|
+
timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
|
|
10
|
+
numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
|
|
11
11
|
};
|
|
12
12
|
export default customSortFns;
|
|
13
13
|
export type SortFnType = keyof typeof customSortFns | undefined;
|