Files
invyone/frontend/lib/registry/components/aggregation-widget/index.ts
T

44 lines
1.5 KiB
TypeScript

"use client";
import { createComponentDefinition } from "../../utils/createComponentDefinition";
import { ComponentCategory } from "@/types/component";
import { AggregationWidgetWrapper } from "./AggregationWidgetComponent";
import { AggregationWidgetConfigPanel } from "./AggregationWidgetConfigPanel";
import type { AggregationWidgetConfig } from "./types";
/**
* AggregationWidget 컴포넌트 정의
* 데이터 집계 (합계, 평균, 개수 등)를 표시하는 위젯
*/
export const AggregationWidgetDefinition = createComponentDefinition({
id: "aggregation-widget",
name: "집계 위젯",
name_eng: "Aggregation Widget",
description: "데이터의 합계, 평균, 개수 등 집계 결과를 표시하는 위젯",
category: ComponentCategory.DISPLAY,
web_type: "text",
component: AggregationWidgetWrapper,
default_config: {
dataSourceType: "manual",
items: [],
layout: "horizontal",
showLabels: true,
showIcons: true,
gap: "16px",
backgroundColor: "#f8fafc",
borderRadius: "6px",
padding: "12px",
} as Partial<AggregationWidgetConfig>,
default_size: { width: 400, height: 60 },
config_panel: AggregationWidgetConfigPanel,
icon: "Calculator",
tags: ["집계", "합계", "평균", "개수", "통계", "데이터"],
version: "1.0.0",
author: "개발팀",
// hidden: true, // v2-aggregation-widget 사용으로 패널에서 숨김
});
// 타입 내보내기
export type { AggregationWidgetConfig, AggregationItem, AggregationType, AggregationResult } from "./types";