39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
|
|
"use client";
|
||
|
|
|
||
|
|
/**
|
||
|
|
* pop-string-list 컴포넌트 레지스트리 등록 진입점
|
||
|
|
*
|
||
|
|
* 이 파일을 import하면 side-effect로 PopComponentRegistry에 자동 등록됨
|
||
|
|
*/
|
||
|
|
|
||
|
|
import { PopComponentRegistry } from "../../PopComponentRegistry";
|
||
|
|
import { PopStringListComponent } from "./PopStringListComponent";
|
||
|
|
import { PopStringListConfigPanel } from "./PopStringListConfig";
|
||
|
|
import { PopStringListPreviewComponent } from "./PopStringListPreview";
|
||
|
|
import type { PopStringListConfig } from "./types";
|
||
|
|
|
||
|
|
// 기본 설정값
|
||
|
|
const defaultConfig: PopStringListConfig = {
|
||
|
|
displayMode: "list",
|
||
|
|
header: { enabled: true, label: "" },
|
||
|
|
overflow: { visibleRows: 5, showExpandButton: true, maxExpandRows: 20 },
|
||
|
|
dataSource: { tableName: "" },
|
||
|
|
listColumns: [],
|
||
|
|
cardGrid: undefined,
|
||
|
|
};
|
||
|
|
|
||
|
|
// 레지스트리 등록
|
||
|
|
PopComponentRegistry.registerComponent({
|
||
|
|
id: "pop-string-list",
|
||
|
|
name: "리스트 목록",
|
||
|
|
description: "테이블 데이터를 리스트 또는 카드 형태로 표시",
|
||
|
|
category: "display",
|
||
|
|
icon: "List",
|
||
|
|
component: PopStringListComponent,
|
||
|
|
configPanel: PopStringListConfigPanel,
|
||
|
|
preview: PopStringListPreviewComponent,
|
||
|
|
defaultProps: defaultConfig,
|
||
|
|
touchOptimized: true,
|
||
|
|
supportedDevices: ["mobile", "tablet"],
|
||
|
|
});
|