Merge branch 'feature/v2-renewal' of http://39.117.244.52:3000/kjs/ERP-node into feature/v2-unified-renewal

This commit is contained in:
kjs
2026-02-04 10:57:03 +09:00
10 changed files with 592 additions and 21 deletions

View File

@@ -822,8 +822,12 @@ export const V2PropertiesPanel: React.FC<V2PropertiesPanelProps> = ({
<div className="space-y-1">
<Label className="text-xs"> </Label>
<Input
value={selectedComponent.style?.labelText || selectedComponent.label || ""}
onChange={(e) => handleUpdate("style.labelText", e.target.value)}
value={selectedComponent.style?.labelText !== undefined ? selectedComponent.style.labelText : (selectedComponent.label || "")}
onChange={(e) => {
handleUpdate("style.labelText", e.target.value);
handleUpdate("label", e.target.value); // label도 함께 업데이트
}}
placeholder="라벨을 입력하세요 (비우면 라벨 없음)"
className="h-6 w-full px-2 py-0 text-xs"
/>
</div>
@@ -868,9 +872,9 @@ export const V2PropertiesPanel: React.FC<V2PropertiesPanelProps> = ({
</Collapsible>
)}
{/* 옵션 */}
{/* 옵션 - 입력 필드에서는 항상 표시, 기타 컴포넌트는 속성이 정의된 경우만 표시 */}
<div className="grid grid-cols-2 gap-2">
{widget.required !== undefined && (
{(isInputField || widget.required !== undefined) && (
<div className="flex items-center space-x-2">
<Checkbox
checked={widget.required === true || selectedComponent.componentConfig?.required === true}
@@ -883,7 +887,7 @@ export const V2PropertiesPanel: React.FC<V2PropertiesPanelProps> = ({
<Label className="text-xs"></Label>
</div>
)}
{widget.readonly !== undefined && (
{(isInputField || widget.readonly !== undefined) && (
<div className="flex items-center space-x-2">
<Checkbox
checked={widget.readonly === true || selectedComponent.componentConfig?.readonly === true}
@@ -896,7 +900,7 @@ export const V2PropertiesPanel: React.FC<V2PropertiesPanelProps> = ({
<Label className="text-xs"></Label>
</div>
)}
{/* 숨김 옵션 */}
{/* 숨김 옵션 - 모든 컴포넌트에서 표시 */}
<div className="flex items-center space-x-2">
<Checkbox
checked={selectedComponent.hidden === true || selectedComponent.componentConfig?.hidden === true}

View File

@@ -318,7 +318,7 @@ export const V2Biz = forwardRef<HTMLDivElement, V2BizProps>(
className="flex flex-col"
style={{
width: componentWidth,
height: componentHeight,
// 🔧 높이는 컨테이너가 아닌 입력 필드에만 적용 (라벨 높이는 별도)
}}
>
{showLabel && (
@@ -335,7 +335,12 @@ export const V2Biz = forwardRef<HTMLDivElement, V2BizProps>(
{label}
</Label>
)}
<div className="flex-1 min-h-0">
<div
className="min-h-0"
style={{
height: componentHeight,
}}
>
{renderBiz()}
</div>
</div>

View File

@@ -460,7 +460,7 @@ export const V2Date = forwardRef<HTMLDivElement, V2DateProps>((props, ref) => {
className="flex flex-col"
style={{
width: componentWidth,
height: componentHeight,
// 🔧 높이는 컨테이너가 아닌 입력 필드에만 적용 (라벨 높이는 별도)
}}
>
{showLabel && (
@@ -478,7 +478,14 @@ export const V2Date = forwardRef<HTMLDivElement, V2DateProps>((props, ref) => {
{required && <span className="ml-0.5 text-orange-500">*</span>}
</Label>
)}
<div className="min-h-0 flex-1">{renderDatePicker()}</div>
<div
className="min-h-0"
style={{
height: componentHeight,
}}
>
{renderDatePicker()}
</div>
</div>
);
});

View File

@@ -469,7 +469,7 @@ export const V2Hierarchy = forwardRef<HTMLDivElement, V2HierarchyProps>(
className="flex flex-col"
style={{
width: componentWidth,
height: componentHeight,
// 🔧 높이는 컨테이너가 아닌 입력 필드에만 적용 (라벨 높이는 별도)
}}
>
{showLabel && (
@@ -487,7 +487,12 @@ export const V2Hierarchy = forwardRef<HTMLDivElement, V2HierarchyProps>(
{required && <span className="text-orange-500 ml-0.5">*</span>}
</Label>
)}
<div className="flex-1 min-h-0">
<div
className="min-h-0"
style={{
height: componentHeight,
}}
>
{renderHierarchy()}
</div>
</div>

View File

@@ -814,7 +814,7 @@ export const V2Input = forwardRef<HTMLDivElement, V2InputProps>((props, ref) =>
className="flex flex-col"
style={{
width: componentWidth,
height: componentHeight,
// 🔧 높이는 컨테이너가 아닌 입력 필드에만 적용 (라벨 높이는 별도)
}}
>
{showLabel && (
@@ -832,7 +832,14 @@ export const V2Input = forwardRef<HTMLDivElement, V2InputProps>((props, ref) =>
{required && <span className="ml-0.5 text-orange-500">*</span>}
</Label>
)}
<div className="min-h-0 flex-1">{renderInput()}</div>
<div
className="min-h-0"
style={{
height: componentHeight,
}}
>
{renderInput()}
</div>
</div>
);
});

View File

@@ -748,10 +748,10 @@ export const V2Media = forwardRef<HTMLDivElement, V2MediaProps>(
<div
ref={ref}
id={id}
className="flex h-full w-full flex-col"
className="flex w-full flex-col"
style={{
width: componentWidth,
height: componentHeight,
// 🔧 높이는 컨테이너가 아닌 컨텐츠 영역에만 적용 (라벨 높이는 별도)
}}
>
{showLabel && (
@@ -769,7 +769,12 @@ export const V2Media = forwardRef<HTMLDivElement, V2MediaProps>(
{required && <span className="text-orange-500 ml-0.5">*</span>}
</Label>
)}
<div className="flex-1 min-h-0 h-full">
<div
className="min-h-0"
style={{
height: componentHeight,
}}
>
{renderMedia()}
</div>
</div>

View File

@@ -751,7 +751,7 @@ export const V2Select = forwardRef<HTMLDivElement, V2SelectProps>(
className="flex flex-col"
style={{
width: componentWidth,
height: componentHeight,
// 🔧 높이는 컨테이너가 아닌 입력 필드에만 적용 (라벨 높이는 별도)
}}
>
{showLabel && (
@@ -769,7 +769,12 @@ export const V2Select = forwardRef<HTMLDivElement, V2SelectProps>(
{required && <span className="text-orange-500 ml-0.5">*</span>}
</Label>
)}
<div className="flex-1 min-h-0">
<div
className="min-h-0"
style={{
height: componentHeight,
}}
>
{renderSelect()}
</div>
</div>