주요 변경사항: - 격자 설정을 편집 탭에서 항상 표시 (해상도 설정 하단) - 그리드 컬럼 수 동적 조정 가능 (1-24) - 컴포넌트 생성 시 현재 그리드 컬럼 수 기반 자동 계산 - 컴포넌트 너비가 설정한 컬럼 수대로 정확히 표시되도록 수정 수정된 파일: - ScreenDesigner: 컴포넌트 드롭 시 gridColumns와 style.width 동적 계산 - UnifiedPropertiesPanel: 격자 설정 UI 통합, 차지 컬럼 수 설정 시 width 자동 계산 - RealtimePreviewDynamic: getWidth 우선순위 수정, DOM 크기 디버깅 로그 추가 - 8개 컴포넌트: componentStyle.width를 항상 100%로 고정 * ButtonPrimaryComponent * TextInputComponent * NumberInputComponent * TextareaBasicComponent * DateInputComponent * TableListComponent * CardDisplayComponent 문제 해결: - 컴포넌트 내부에서 component.style.width를 재사용하여 이중 축소 발생 - 해결: 부모 컨테이너(RealtimePreviewDynamic)가 width 제어, 컴포넌트는 항상 100% - 결과: 파란 테두리와 내부 콘텐츠가 동일한 크기로 정확히 표시
78 lines
1.8 KiB
TypeScript
78 lines
1.8 KiB
TypeScript
/**
|
|
* 채번 규칙 템플릿
|
|
* 화면관리 시스템에 등록하여 드래그앤드롭으로 사용
|
|
*/
|
|
|
|
import { Hash } from "lucide-react";
|
|
|
|
export const getDefaultNumberingRuleConfig = () => ({
|
|
template_code: "numbering-rule-designer",
|
|
template_name: "코드 채번 규칙",
|
|
template_name_eng: "Numbering Rule Designer",
|
|
description: "코드 자동 채번 규칙을 설정하는 컴포넌트",
|
|
category: "admin" as const,
|
|
icon_name: "hash",
|
|
default_size: {
|
|
width: 1200,
|
|
height: 800,
|
|
},
|
|
layout_config: {
|
|
components: [
|
|
{
|
|
type: "numbering-rule" as const,
|
|
label: "채번 규칙 설정",
|
|
position: { x: 0, y: 0 },
|
|
size: { width: 1200, height: 800 },
|
|
ruleConfig: {
|
|
ruleId: "new-rule",
|
|
ruleName: "새 채번 규칙",
|
|
parts: [],
|
|
separator: "-",
|
|
resetPeriod: "none",
|
|
currentSequence: 1,
|
|
},
|
|
maxRules: 6,
|
|
style: {
|
|
padding: "16px",
|
|
backgroundColor: "#ffffff",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
});
|
|
|
|
/**
|
|
* 템플릿 패널에서 사용할 컴포넌트 정보
|
|
*/
|
|
export const numberingRuleTemplate = {
|
|
id: "numbering-rule",
|
|
name: "채번 규칙",
|
|
description: "코드 자동 채번 규칙 설정",
|
|
category: "admin" as const,
|
|
icon: Hash,
|
|
defaultSize: { width: 1200, height: 800 },
|
|
components: [
|
|
{
|
|
type: "numbering-rule" as const,
|
|
widgetType: undefined,
|
|
label: "채번 규칙 설정",
|
|
position: { x: 0, y: 0 },
|
|
size: { width: 1200, height: 800 },
|
|
style: {
|
|
padding: "16px",
|
|
backgroundColor: "#ffffff",
|
|
},
|
|
ruleConfig: {
|
|
ruleId: "new-rule",
|
|
ruleName: "새 채번 규칙",
|
|
parts: [],
|
|
separator: "-",
|
|
resetPeriod: "none",
|
|
currentSequence: 1,
|
|
},
|
|
maxRules: 6,
|
|
},
|
|
],
|
|
};
|
|
|