fleeta-components
Version:
A comprehensive React component library for fleet management applications
82 lines • 2.54 kB
TypeScript
/**
* VideoPlayer 유틸리티 함수들
* VideoPlayer 컴포넌트에서 사용하는 헬퍼 함수들을 정의합니다.
*/
/**
* 시간을 MM:SS 형식으로 포맷팅
* @param seconds - 초 단위 시간
* @returns MM:SS 형식의 문자열
*/
export declare function formatTime(seconds: number): string;
/**
* 데이터 결정 로직
* 자동 파싱 데이터와 외부 제공 데이터 중 어느 것을 사용할지 결정합니다.
*/
export declare function getEffectiveData(enableMetadataParsing: boolean, autoParsedData: any, externalData: any): any;
/**
* 비디오 상태 확인 유틸리티
* 비디오의 현재 상태를 확인하는 함수들
*/
export declare const videoStateUtils: {
/**
* 로딩 상태 확인
*/
isLoading(externalLoading: boolean, videoLoading: boolean): boolean;
/**
* 비디오 존재 확인
*/
hasVideo(videoUrl: string | null, hasError: boolean): boolean;
/**
* 지도 표시 여부 확인
*/
shouldShowMap(showMap: boolean, hasVideo: boolean): boolean;
/**
* 이벤트 컴포넌트 표시 여부 확인
*/
shouldShowEventComponent(showEventComponent: boolean, hasVideo: boolean): boolean;
};
/**
* CSS 변환 스타일 생성
* 비디오 플립 상태에 따른 CSS transform 스타일을 생성합니다.
*/
export declare function generateTransformStyle(isHorizontalFlipped: boolean, isVerticalFlipped: boolean): string;
/**
* Mapbox 토큰 확인 유틸리티
* 환경 변수에서 Mapbox 토큰을 안전하게 가져옵니다.
*/
export declare function getMapboxToken(): string;
/**
* 비디오 컨테이너 높이 계산
* 지도 표시 여부에 따른 비디오 컨테이너 높이를 계산합니다.
*/
export declare function calculateVideoContainerHeight(shouldShowMap: boolean): string;
/**
* 에러 메시지 생성
* 다양한 에러 상황에 대한 표준화된 메시지를 생성합니다.
*/
export declare const errorMessages: {
playbackError: string;
playFailed: string;
loadFailed: string;
metadataParseFailed: string;
mapboxTokenMissing: string;
};
/**
* 디바이스 감지 유틸리티
* 현재 디바이스 타입을 감지합니다.
*/
export declare const deviceUtils: {
/**
* 모바일 디바이스 감지
*/
isMobile(): boolean;
/**
* 터치 디바이스 감지
*/
isTouchDevice(): boolean;
/**
* 데스크톱 디바이스 감지
*/
isDesktop(): boolean;
};
//# sourceMappingURL=utils.d.ts.map