@ehfuse/mui-virtual-data-table 1.0.1 → 1.0.3
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/README.md +4 -0
- package/dist/VirtualDataTable.d.ts +1 -1
- package/dist/index.esm.js +146 -31
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +145 -30
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/package.json +2 -2
- package/dist/OverlayScrollbar.d.ts +0 -81
- package/dist/VirtuosoScrollbar.d.ts +0 -31
- package/dist/components/Loading.d.ts +0 -29
- package/dist/components/Scrollbar.d.ts +0 -39
- package/dist/original/VirtualDataTable copy.d.ts +0 -78
- package/dist/original/VirtuosoScrollbar.d.ts +0 -31
- package/dist/utils/dragScrollUtils.d.ts +0 -39
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OverlayScrollbar.tsx
|
|
3
|
-
*
|
|
4
|
-
* @copyright 2025 KIM YOUNG JIN (ehfuse@gmail.com)
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
* copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
* SOFTWARE.
|
|
23
|
-
*/
|
|
24
|
-
import React, { ReactNode } from "react";
|
|
25
|
-
export interface ThumbConfig {
|
|
26
|
-
width?: number;
|
|
27
|
-
minHeight?: number;
|
|
28
|
-
radius?: number;
|
|
29
|
-
color?: string;
|
|
30
|
-
opacity?: number;
|
|
31
|
-
hoverColor?: string;
|
|
32
|
-
hoverOpacity?: number;
|
|
33
|
-
}
|
|
34
|
-
export interface TrackConfig {
|
|
35
|
-
width?: number;
|
|
36
|
-
color?: string;
|
|
37
|
-
visible?: boolean;
|
|
38
|
-
alignment?: "center" | "right";
|
|
39
|
-
radius?: number;
|
|
40
|
-
margin?: number;
|
|
41
|
-
}
|
|
42
|
-
export interface ArrowsConfig {
|
|
43
|
-
visible?: boolean;
|
|
44
|
-
step?: number;
|
|
45
|
-
color?: string;
|
|
46
|
-
opacity?: number;
|
|
47
|
-
hoverColor?: string;
|
|
48
|
-
hoverOpacity?: number;
|
|
49
|
-
}
|
|
50
|
-
export interface DragScrollConfig {
|
|
51
|
-
enabled?: boolean;
|
|
52
|
-
excludeClasses?: string[];
|
|
53
|
-
excludeSelectors?: string[];
|
|
54
|
-
}
|
|
55
|
-
export interface AutoHideConfig {
|
|
56
|
-
enabled?: boolean;
|
|
57
|
-
delay?: number;
|
|
58
|
-
delayOnWheel?: number;
|
|
59
|
-
}
|
|
60
|
-
export interface OverlayScrollbarProps {
|
|
61
|
-
className?: string;
|
|
62
|
-
style?: React.CSSProperties;
|
|
63
|
-
children: ReactNode;
|
|
64
|
-
onScroll?: (event: Event) => void;
|
|
65
|
-
thumb?: ThumbConfig;
|
|
66
|
-
track?: TrackConfig;
|
|
67
|
-
arrows?: ArrowsConfig;
|
|
68
|
-
dragScroll?: DragScrollConfig;
|
|
69
|
-
autoHide?: AutoHideConfig;
|
|
70
|
-
showScrollbar?: boolean;
|
|
71
|
-
}
|
|
72
|
-
export interface OverlayScrollbarRef {
|
|
73
|
-
getScrollContainer: () => HTMLDivElement | null;
|
|
74
|
-
scrollTo: (options: ScrollToOptions) => void;
|
|
75
|
-
scrollTop: number;
|
|
76
|
-
scrollHeight: number;
|
|
77
|
-
clientHeight: number;
|
|
78
|
-
}
|
|
79
|
-
declare const OverlayScrollbar: React.ForwardRefExoticComponent<OverlayScrollbarProps & React.RefAttributes<OverlayScrollbarRef>>;
|
|
80
|
-
export default OverlayScrollbar;
|
|
81
|
-
export { OverlayScrollbar };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* VirtuosoScrollbar.tsx
|
|
3
|
-
*
|
|
4
|
-
* @license Proprietary License (독점 라이선스)
|
|
5
|
-
* @copyright 2025 김영진 (Kim Young Jin)
|
|
6
|
-
* @author 김영진 (ehfuse@gmail.com)
|
|
7
|
-
* @contact 010-3094-9944
|
|
8
|
-
*
|
|
9
|
-
* IMPORTANT NOTICE (중요 공지):
|
|
10
|
-
* This code is the intellectual property of 김영진 (Kim Young Jin).
|
|
11
|
-
* All rights reserved. Unauthorized copying, modification, distribution,
|
|
12
|
-
* or use of this code is strictly prohibited without prior written
|
|
13
|
-
* permission from the copyright holder.
|
|
14
|
-
*
|
|
15
|
-
* 이 코드는 김영진의 지적재산권입니다.
|
|
16
|
-
* 모든 권리가 보호됩니다. 저작권자의 사전 서면 허가 없이
|
|
17
|
-
* 무단 복사, 수정, 배포 또는 사용을 엄격히 금지합니다.
|
|
18
|
-
*
|
|
19
|
-
* For licensing inquiries, please contact (라이선스 문의):
|
|
20
|
-
* Email: ehfuse@gmail.com
|
|
21
|
-
* Phone: 010-3094-9944
|
|
22
|
-
*/
|
|
23
|
-
import React, { ReactNode } from "react";
|
|
24
|
-
interface VirtuosoScrollbarProps {
|
|
25
|
-
children: ReactNode;
|
|
26
|
-
height?: string | number;
|
|
27
|
-
width?: string | number;
|
|
28
|
-
onScroll?: (event: Event) => void;
|
|
29
|
-
}
|
|
30
|
-
export declare const VirtuosoScrollbar: React.FC<VirtuosoScrollbarProps>;
|
|
31
|
-
export default VirtuosoScrollbar;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MIT License
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2025 KIM YOUNG JIN (ehfuse@gmail.com)
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
* copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
* SOFTWARE.
|
|
23
|
-
*/
|
|
24
|
-
interface LoadingProps {
|
|
25
|
-
visible?: boolean;
|
|
26
|
-
onComplete?: () => void;
|
|
27
|
-
}
|
|
28
|
-
export declare const Loading: ({ visible, onComplete }: LoadingProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
-
export {};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MIT License
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2025 KIM YOUNG JIN (ehfuse@gmail.com)
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
* copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
* SOFTWARE.
|
|
23
|
-
*/
|
|
24
|
-
import React from "react";
|
|
25
|
-
import type { ReactNode } from "react";
|
|
26
|
-
export interface VirtuosoScrollbarProps {
|
|
27
|
-
children: ReactNode;
|
|
28
|
-
onScroll?: (event: Event) => void;
|
|
29
|
-
visible?: boolean;
|
|
30
|
-
hideDelay?: number;
|
|
31
|
-
hideDelayOnWheel?: number;
|
|
32
|
-
trackWidth?: number;
|
|
33
|
-
thumbWidth?: number;
|
|
34
|
-
trackColor?: string;
|
|
35
|
-
thumbColor?: string;
|
|
36
|
-
thumbHoverColor?: string;
|
|
37
|
-
thumbActiveColor?: string;
|
|
38
|
-
}
|
|
39
|
-
export declare const VirtuosoScrollbar: React.FC<VirtuosoScrollbarProps>;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* VirtualDataTable.tsx
|
|
3
|
-
*
|
|
4
|
-
* @license Proprietary License (독점 라이선스)
|
|
5
|
-
* @copyright 2025 김영진 (Kim Young Jin)
|
|
6
|
-
* @author 김영진 (ehfuse@gmail.com)
|
|
7
|
-
* @contact 010-3094-9944
|
|
8
|
-
*
|
|
9
|
-
* IMPORTANT NOTICE (중요 공지):
|
|
10
|
-
* This code is the intellectual property of 김영진 (Kim Young Jin).
|
|
11
|
-
* All rights reserved. Unauthorized copying, modification, distribution,
|
|
12
|
-
* or use of this code is strictly prohibited without prior written
|
|
13
|
-
* permission from the copyright holder.
|
|
14
|
-
*
|
|
15
|
-
* 이 코드는 김영진의 지적재산권입니다.
|
|
16
|
-
* 모든 권리가 보호됩니다. 저작권자의 사전 서면 허가 없이
|
|
17
|
-
* 무단 복사, 수정, 배포 또는 사용을 엄격히 금지합니다.
|
|
18
|
-
*
|
|
19
|
-
* For licensing inquiries, please contact (라이선스 문의):
|
|
20
|
-
* Email: ehfuse@gmail.com
|
|
21
|
-
* Phone: 010-3094-9944
|
|
22
|
-
*/
|
|
23
|
-
import React from "react";
|
|
24
|
-
/**
|
|
25
|
-
* 테이블 컬럼 정의 인터페이스
|
|
26
|
-
*/
|
|
27
|
-
export interface DataColumn<T> {
|
|
28
|
-
/** 컬럼 식별자 (데이터 객체의 키) */
|
|
29
|
-
id: keyof T | string;
|
|
30
|
-
/** 컬럼 헤더에 표시될 레이블 */
|
|
31
|
-
label: string | React.ReactNode;
|
|
32
|
-
/** 컬럼 너비 (px 또는 %) */
|
|
33
|
-
width?: string | number;
|
|
34
|
-
/** 정렬 가능 여부 */
|
|
35
|
-
sortable?: boolean;
|
|
36
|
-
/** 텍스트 정렬 방향 */
|
|
37
|
-
align?: "left" | "center" | "right";
|
|
38
|
-
/** 추가 스타일 */
|
|
39
|
-
style?: React.CSSProperties;
|
|
40
|
-
/** 커스텀 렌더링 함수 */
|
|
41
|
-
render?: (item: T, index: number) => React.ReactNode;
|
|
42
|
-
/** 그룹 헤더명 */
|
|
43
|
-
group?: string;
|
|
44
|
-
}
|
|
45
|
-
/** 정렬 방향 타입 */
|
|
46
|
-
export type SortDirection = "asc" | "desc";
|
|
47
|
-
export interface SortableFilter {
|
|
48
|
-
sortBy?: string;
|
|
49
|
-
sortDirection?: SortDirection;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* 데이터 기반 가상화 테이블 컴포넌트 Props
|
|
53
|
-
*/
|
|
54
|
-
export interface VirtualDataTableProps<T> {
|
|
55
|
-
/** 표시할 데이터 배열 */
|
|
56
|
-
data: T[];
|
|
57
|
-
/** 총 데이터 개수 */
|
|
58
|
-
totalCount: number;
|
|
59
|
-
/** 로딩 상태 */
|
|
60
|
-
loading?: boolean;
|
|
61
|
-
/** 더 많은 데이터가 있는지 여부 */
|
|
62
|
-
hasMore?: boolean;
|
|
63
|
-
/** 테이블 컬럼 정의 */
|
|
64
|
-
columns: DataColumn<T>[];
|
|
65
|
-
/** 행 클릭 이벤트 핸들러 */
|
|
66
|
-
onRowClick?: (item: T, index: number) => void;
|
|
67
|
-
/** 행 높이 (px) */
|
|
68
|
-
rowHeight?: number;
|
|
69
|
-
/** 정렬 이벤트 핸들러 */
|
|
70
|
-
onSort?: (columnId: string, direction: SortDirection) => void;
|
|
71
|
-
/** 더 많은 데이터 로드 요청 핸들러 */
|
|
72
|
-
onLoadMore?: (offset: number, limit: number) => void;
|
|
73
|
-
/** 현재 정렬 상태 */
|
|
74
|
-
sortBy?: string;
|
|
75
|
-
sortDirection?: SortDirection;
|
|
76
|
-
showPaper?: boolean;
|
|
77
|
-
}
|
|
78
|
-
export declare const VirtualDataTable: <T>(props: VirtualDataTableProps<T>) => React.JSX.Element;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* VirtuosoScrollbar.tsx
|
|
3
|
-
*
|
|
4
|
-
* @license Proprietary License (독점 라이선스)
|
|
5
|
-
* @copyright 2025 김영진 (Kim Young Jin)
|
|
6
|
-
* @author 김영진 (ehfuse@gmail.com)
|
|
7
|
-
* @contact 010-3094-9944
|
|
8
|
-
*
|
|
9
|
-
* IMPORTANT NOTICE (중요 공지):
|
|
10
|
-
* This code is the intellectual property of 김영진 (Kim Young Jin).
|
|
11
|
-
* All rights reserved. Unauthorized copying, modification, distribution,
|
|
12
|
-
* or use of this code is strictly prohibited without prior written
|
|
13
|
-
* permission from the copyright holder.
|
|
14
|
-
*
|
|
15
|
-
* 이 코드는 김영진의 지적재산권입니다.
|
|
16
|
-
* 모든 권리가 보호됩니다. 저작권자의 사전 서면 허가 없이
|
|
17
|
-
* 무단 복사, 수정, 배포 또는 사용을 엄격히 금지합니다.
|
|
18
|
-
*
|
|
19
|
-
* For licensing inquiries, please contact (라이선스 문의):
|
|
20
|
-
* Email: ehfuse@gmail.com
|
|
21
|
-
* Phone: 010-3094-9944
|
|
22
|
-
*/
|
|
23
|
-
import React, { ReactNode } from "react";
|
|
24
|
-
interface VirtuosoScrollbarProps {
|
|
25
|
-
children: ReactNode;
|
|
26
|
-
height?: string | number;
|
|
27
|
-
width?: string | number;
|
|
28
|
-
onScroll?: (event: Event) => void;
|
|
29
|
-
}
|
|
30
|
-
export declare const VirtuosoScrollbar: React.FC<VirtuosoScrollbarProps>;
|
|
31
|
-
export default VirtuosoScrollbar;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MIT License
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2025 KIM YOUNG JIN (ehfuse@gmail.com)
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
* copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
* SOFTWARE.
|
|
23
|
-
*/
|
|
24
|
-
import { DragScrollConfig } from "../OverlayScrollbar";
|
|
25
|
-
/**
|
|
26
|
-
* 드래그 스크롤이 허용되지 않는 요소들인지 확인
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* 드래그 스크롤이 허용되지 않는 요소들인지 확인
|
|
30
|
-
*/
|
|
31
|
-
export declare const isTextInputElement: (element: Element, config?: DragScrollConfig) => boolean;
|
|
32
|
-
/**
|
|
33
|
-
* 다른 다이얼로그나 모달이 상위에 있는지 확인
|
|
34
|
-
*/
|
|
35
|
-
export declare const hasUpperModal: (scrollContainer: Element) => boolean;
|
|
36
|
-
/**
|
|
37
|
-
* 클릭한 요소가 다른 다이얼로그 내부인지 확인
|
|
38
|
-
*/
|
|
39
|
-
export declare const isClickInOtherDialog: (clickedElement: Element, currentDialog: Element | null) => boolean;
|