코드 정리 및 불필요한 공백 제거: 여러 파일에서 불필요한 공백을 제거하고, 코드 가독성을 향상시켰습니다. 또한, 다국어 지원 및 테이블 설정 현황 문서에 새로운 내용을 추가하여 현재 사용 가능한 컴포넌트의 기능을 반영했습니다.
This commit is contained in:
@@ -23,8 +23,11 @@ import { TableSearchWidgetHeightProvider, useTableSearchWidgetHeight } from "@/c
|
||||
import { ScreenContextProvider } from "@/contexts/ScreenContext"; // 컴포넌트 간 통신
|
||||
import { SplitPanelProvider } from "@/lib/registry/components/split-panel-layout/SplitPanelContext"; // 분할 패널 리사이즈
|
||||
import { ActiveTabProvider } from "@/contexts/ActiveTabContext"; // 활성 탭 관리
|
||||
<<<<<<< HEAD
|
||||
import { evaluateConditional } from "@/lib/utils/conditionalEvaluator"; // 조건부 표시 평가
|
||||
=======
|
||||
import { ScreenMultiLangProvider } from "@/contexts/ScreenMultiLangContext"; // 화면 다국어
|
||||
>>>>>>> 435eb90763a3f89b76d0d810d8b78c27c0bb6802
|
||||
|
||||
function ScreenViewPage() {
|
||||
const params = useParams();
|
||||
@@ -34,7 +37,7 @@ function ScreenViewPage() {
|
||||
|
||||
// URL 쿼리에서 menuObjid 가져오기 (메뉴 스코프)
|
||||
const menuObjid = searchParams.get("menuObjid") ? parseInt(searchParams.get("menuObjid")!) : undefined;
|
||||
|
||||
|
||||
// URL 쿼리에서 프리뷰용 company_code 가져오기
|
||||
const previewCompanyCode = searchParams.get("company_code");
|
||||
|
||||
@@ -115,7 +118,7 @@ function ScreenViewPage() {
|
||||
// 편집 모달 이벤트 리스너 등록
|
||||
useEffect(() => {
|
||||
const handleOpenEditModal = (event: CustomEvent) => {
|
||||
console.log("🎭 편집 모달 열기 이벤트 수신:", event.detail);
|
||||
// console.log("🎭 편집 모달 열기 이벤트 수신:", event.detail);
|
||||
|
||||
setEditModalConfig({
|
||||
screenId: event.detail.screenId,
|
||||
@@ -327,8 +330,8 @@ function ScreenViewPage() {
|
||||
newScale = Math.min(scaleX, scaleY, 1); // 최대 1배율
|
||||
} else {
|
||||
// 일반 모드: 가로 기준 스케일 (좌우 여백 16px씩 고정)
|
||||
const MARGIN_X = 32;
|
||||
const availableWidth = containerWidth - MARGIN_X;
|
||||
const MARGIN_X = 32;
|
||||
const availableWidth = containerWidth - MARGIN_X;
|
||||
newScale = availableWidth / designWidth;
|
||||
}
|
||||
|
||||
@@ -408,9 +411,10 @@ function ScreenViewPage() {
|
||||
|
||||
{/* 절대 위치 기반 렌더링 (화면관리와 동일한 방식) */}
|
||||
{layoutReady && layout && layout.components.length > 0 ? (
|
||||
<div
|
||||
className="bg-background relative"
|
||||
style={{
|
||||
<ScreenMultiLangProvider components={layout.components} companyCode={companyCode}>
|
||||
<div
|
||||
className="bg-background relative"
|
||||
style={{
|
||||
width: `${screenWidth}px`,
|
||||
height: `${screenHeight}px`,
|
||||
minWidth: `${screenWidth}px`,
|
||||
@@ -853,7 +857,8 @@ function ScreenViewPage() {
|
||||
</>
|
||||
);
|
||||
})()}
|
||||
</div>
|
||||
</div>
|
||||
</ScreenMultiLangProvider>
|
||||
) : (
|
||||
// 빈 화면일 때
|
||||
<div className="bg-background flex items-center justify-center" style={{ minHeight: screenHeight }}>
|
||||
|
||||
@@ -1923,11 +1923,19 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
|
||||
return applyStyles(
|
||||
<button
|
||||
onClick={handleButtonClick}
|
||||
<<<<<<< HEAD
|
||||
disabled={isReadonly}
|
||||
className={`focus:ring-ring w-full rounded-md px-3 py-2 text-sm font-medium transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none disabled:opacity-50 ${
|
||||
hasCustomColors
|
||||
? ""
|
||||
: "bg-background border-foreground text-foreground hover:bg-muted/50 border shadow-xs"
|
||||
=======
|
||||
disabled={readonly}
|
||||
className={`w-full rounded-md px-3 py-2 text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 ${
|
||||
hasCustomColors
|
||||
? ''
|
||||
: 'bg-background border border-foreground text-foreground shadow-xs hover:bg-muted/50'
|
||||
>>>>>>> ac0f4618321df78939e833f90768ae5404646fec
|
||||
}`}
|
||||
style={{
|
||||
height: "100%",
|
||||
|
||||
@@ -142,3 +142,4 @@ export const useActiveTabOptional = () => {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -199,3 +199,4 @@ export function applyAutoFillToFormData(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -390,6 +390,20 @@ export const ButtonPrimaryComponent: React.FC<ButtonPrimaryComponentProps> = ({
|
||||
}
|
||||
}
|
||||
|
||||
// 디버깅 로그
|
||||
console.log("🔍 [ButtonPrimary] 행 선택 체크:", component.label, {
|
||||
rowSelectionSource,
|
||||
hasSelection,
|
||||
selectionCount,
|
||||
selectionSource,
|
||||
hasSplitPanelContext: !!splitPanelContext,
|
||||
trackedSelectedLeftData: trackedSelectedLeftData,
|
||||
selectedRowsData: selectedRowsData?.length,
|
||||
selectedRows: selectedRows?.length,
|
||||
flowSelectedData: flowSelectedData?.length,
|
||||
modalStoreDataKeys: Object.keys(modalStoreData),
|
||||
});
|
||||
|
||||
// 선택된 데이터가 없으면 비활성화
|
||||
if (!hasSelection) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user