리피터 컨테이너 기능 추가: ScreenDesigner 컴포넌트에 리피터 컨테이너 내부 드롭 처리 로직을 추가하여, 드롭 시 새로운 자식 컴포넌트를 생성하고 레이아웃을 업데이트합니다. 또한, TableListComponent에서 리피터 컨테이너와 집계 위젯 연동을 위한 커스텀 이벤트를 발생시켜 데이터 변경 사항을 처리할 수 있도록 개선하였습니다.
This commit is contained in:
60
frontend/lib/registry/components/repeat-container/index.ts
Normal file
60
frontend/lib/registry/components/repeat-container/index.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
"use client";
|
||||
|
||||
import { createComponentDefinition } from "../../utils/createComponentDefinition";
|
||||
import { ComponentCategory } from "@/types/component";
|
||||
import { RepeatContainerWrapper } from "./RepeatContainerComponent";
|
||||
import { RepeatContainerConfigPanel } from "./RepeatContainerConfigPanel";
|
||||
import type { RepeatContainerConfig } from "./types";
|
||||
|
||||
/**
|
||||
* RepeatContainer 컴포넌트 정의
|
||||
* 데이터 수만큼 내부 컨텐츠를 반복 렌더링하는 컨테이너
|
||||
*/
|
||||
export const RepeatContainerDefinition = createComponentDefinition({
|
||||
id: "repeat-container",
|
||||
name: "리피터 컨테이너",
|
||||
nameEng: "Repeat Container",
|
||||
description: "데이터 수만큼 내부 컴포넌트를 반복 렌더링하는 컨테이너",
|
||||
category: ComponentCategory.LAYOUT,
|
||||
webType: "text",
|
||||
component: RepeatContainerWrapper,
|
||||
defaultConfig: {
|
||||
dataSourceType: "manual",
|
||||
layout: "vertical",
|
||||
gridColumns: 2,
|
||||
gap: "16px",
|
||||
showBorder: true,
|
||||
showShadow: false,
|
||||
borderRadius: "8px",
|
||||
backgroundColor: "#ffffff",
|
||||
padding: "16px",
|
||||
showItemTitle: false,
|
||||
itemTitleTemplate: "",
|
||||
titleFontSize: "14px",
|
||||
titleColor: "#374151",
|
||||
titleFontWeight: "600",
|
||||
emptyMessage: "데이터가 없습니다",
|
||||
usePaging: false,
|
||||
pageSize: 10,
|
||||
clickable: false,
|
||||
showSelectedState: true,
|
||||
selectionMode: "single",
|
||||
} as Partial<RepeatContainerConfig>,
|
||||
defaultSize: { width: 600, height: 300 },
|
||||
configPanel: RepeatContainerConfigPanel,
|
||||
icon: "Repeat",
|
||||
tags: ["리피터", "반복", "컨테이너", "데이터", "레이아웃", "그리드"],
|
||||
version: "1.0.0",
|
||||
author: "개발팀",
|
||||
});
|
||||
|
||||
// 타입 내보내기
|
||||
export type {
|
||||
RepeatContainerConfig,
|
||||
SlotComponentConfig,
|
||||
RepeatItemContext,
|
||||
RepeatContainerValue,
|
||||
DataSourceType,
|
||||
LayoutType,
|
||||
} from "./types";
|
||||
|
||||
Reference in New Issue
Block a user