2c0a97f2ba
- components/builder/* 폐기 (12-grid 미완성 빌더 14개 파일)
- components/template-builder/TemplateBuilder.tsx 신규
(자유배치 + 3뷰 + Zustand 스토어 + 드래그/리사이즈/히스토리/격자)
- admin/builder/page.tsx 진입점 전환 (BuilderLayout → TemplateBuilder)
- 타입 정리: FreePosition / TemplateComponent / ViewConfig / Card /
Dashboard / CardConnection 추가, 레거시(GridPosition/TemplateKind/
DEFAULT_COMPONENT_LAYOUTS/CANVAS_KEYWORDS) @deprecated 표기
- v2-* 마이그레이션 1차:
· 완전: v2-table-list (ResizeObserver), v2-table-search-widget (@container)
· 경량: button/input/select/date/text-display/card-display/aggregation-widget
(withContainerQuery HOC)
- 다크 모드 대응: Tailwind dark: variant 21패턴 71곳 치환
- /test-card-responsive PoC 검증 페이지
세션 후반 버그 픽스 (phase1-log §7):
- test-card-responsive (main) 그룹 밖 이동 (AppLayout 탭 시스템 회피)
- useRegistryPalette default_size {width,height}/{w,h} 포맷 정규화
- dark: variant 중복 체인 정리
검증: (A) 반응형 메커니즘, (B) TemplateBuilder UI 통과
(C) 기존 VEX 화면은 마이그레이션 미완 상태라 Phase 2 이후 개별 진행
스펙: notes/gbpark/2026-04-10-card-engine-final-spec.md
로그: notes/gbpark/2026-04-10-card-engine-phase1-log.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
57 lines
1.9 KiB
TypeScript
57 lines
1.9 KiB
TypeScript
"use client";
|
|
|
|
import { createComponentDefinition } from "../../utils/createComponentDefinition";
|
|
import { ComponentCategory } from "@/types/component";
|
|
import { AggregationWidgetWrapper } from "./AggregationWidgetComponent";
|
|
import { V2AggregationWidgetConfigPanel } from "@/components/v2/config-panels/V2AggregationWidgetConfigPanel";
|
|
import { withContainerQuery } from "../../hoc/withContainerQuery";
|
|
import type { AggregationWidgetConfig } from "./types";
|
|
|
|
/**
|
|
* AggregationWidget 컴포넌트 정의
|
|
* 데이터 집계 (합계, 평균, 개수 등)를 표시하는 위젯
|
|
*/
|
|
export const V2AggregationWidgetDefinition = createComponentDefinition({
|
|
id: "v2-aggregation-widget",
|
|
name: "집계 위젯",
|
|
name_eng: "Aggregation Widget",
|
|
description: "데이터의 합계, 평균, 개수 등 집계 결과를 표시하는 위젯 (필터링 지원)",
|
|
category: ComponentCategory.DISPLAY,
|
|
web_type: "text",
|
|
component: withContainerQuery(AggregationWidgetWrapper, "v2-aggregation-widget"),
|
|
default_config: {
|
|
dataSourceType: "table", // 기본값: 테이블에서 직접 조회
|
|
items: [],
|
|
filters: [], // 필터 조건
|
|
filterLogic: "AND",
|
|
layout: "horizontal",
|
|
showLabels: true,
|
|
showIcons: true,
|
|
gap: "16px",
|
|
backgroundColor: "#f8fafc",
|
|
borderRadius: "6px",
|
|
padding: "12px",
|
|
autoRefresh: false,
|
|
refreshOnFormChange: true, // 폼 변경 시 자동 새로고침
|
|
} as Partial<AggregationWidgetConfig>,
|
|
default_size: { width: 400, height: 60 },
|
|
config_panel: V2AggregationWidgetConfigPanel,
|
|
icon: "Calculator",
|
|
tags: ["집계", "합계", "평균", "개수", "통계", "데이터", "필터"],
|
|
version: "1.1.0",
|
|
author: "개발팀",
|
|
});
|
|
|
|
// 타입 내보내기
|
|
export type {
|
|
AggregationWidgetConfig,
|
|
AggregationItem,
|
|
AggregationType,
|
|
AggregationResult,
|
|
DataSourceType,
|
|
FilterCondition,
|
|
FilterOperator,
|
|
FilterValueSourceType,
|
|
} from "./types";
|
|
|