feat(pop-search): 검색 컴포넌트 MVP 구현
- pop-search 컴포넌트 신규 추가 (Component, Config, types, index)
- 입력 타입: text, number, date, date-preset, select, multi-select, combo, modal-table, modal-card, modal-icon-grid, toggle
- 디자이너 팔레트, 레지스트리, 타입, 렌더러 라벨 등록
- 기본 그리드 크기 4x2, labelText/labelVisible 설정 지원
- filter_changed 이벤트 발행 (연결 시스템 미적용, 추후 dataFlow 기반으로 전환 예정)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-23 17:16:38 +09:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
import { PopComponentRegistry } from "../../PopComponentRegistry";
|
|
|
|
|
import { PopSearchComponent } from "./PopSearchComponent";
|
|
|
|
|
import { PopSearchConfigPanel } from "./PopSearchConfig";
|
|
|
|
|
import type { PopSearchConfig } from "./types";
|
2026-02-23 18:45:21 +09:00
|
|
|
import { DEFAULT_SEARCH_CONFIG } from "./types";
|
feat(pop-search): 검색 컴포넌트 MVP 구현
- pop-search 컴포넌트 신규 추가 (Component, Config, types, index)
- 입력 타입: text, number, date, date-preset, select, multi-select, combo, modal-table, modal-card, modal-icon-grid, toggle
- 디자이너 팔레트, 레지스트리, 타입, 렌더러 라벨 등록
- 기본 그리드 크기 4x2, labelText/labelVisible 설정 지원
- filter_changed 이벤트 발행 (연결 시스템 미적용, 추후 dataFlow 기반으로 전환 예정)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-23 17:16:38 +09:00
|
|
|
|
|
|
|
|
function PopSearchPreviewComponent({ config, label }: { config?: PopSearchConfig; label?: string }) {
|
2026-02-23 18:45:21 +09:00
|
|
|
const cfg = config || DEFAULT_SEARCH_CONFIG;
|
|
|
|
|
const displayLabel = cfg.labelText || label || cfg.fieldName || "검색";
|
feat(pop-search): 검색 컴포넌트 MVP 구현
- pop-search 컴포넌트 신규 추가 (Component, Config, types, index)
- 입력 타입: text, number, date, date-preset, select, multi-select, combo, modal-table, modal-card, modal-icon-grid, toggle
- 디자이너 팔레트, 레지스트리, 타입, 렌더러 라벨 등록
- 기본 그리드 크기 4x2, labelText/labelVisible 설정 지원
- filter_changed 이벤트 발행 (연결 시스템 미적용, 추후 dataFlow 기반으로 전환 예정)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-23 17:16:38 +09:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex h-full w-full flex-col items-center justify-center gap-1 p-2">
|
|
|
|
|
<span className="text-[10px] font-medium text-muted-foreground">
|
|
|
|
|
{displayLabel}
|
|
|
|
|
</span>
|
|
|
|
|
<div className="flex h-6 w-full items-center rounded border border-dashed border-muted-foreground/30 px-2">
|
|
|
|
|
<span className="text-[9px] text-muted-foreground">
|
|
|
|
|
{cfg.placeholder || cfg.inputType}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PopComponentRegistry.registerComponent({
|
|
|
|
|
id: "pop-search",
|
|
|
|
|
name: "검색",
|
|
|
|
|
description: "조건 입력 (텍스트/날짜/선택/모달)",
|
|
|
|
|
category: "input",
|
|
|
|
|
icon: "Search",
|
|
|
|
|
component: PopSearchComponent,
|
|
|
|
|
configPanel: PopSearchConfigPanel,
|
|
|
|
|
preview: PopSearchPreviewComponent,
|
2026-02-23 18:45:21 +09:00
|
|
|
defaultProps: DEFAULT_SEARCH_CONFIG,
|
|
|
|
|
connectionMeta: {
|
|
|
|
|
sendable: [
|
2026-03-03 15:30:07 +09:00
|
|
|
{ key: "filter_value", label: "필터 값", type: "filter_value", category: "filter", description: "입력한 검색 조건을 다른 컴포넌트에 전달" },
|
2026-02-23 18:45:21 +09:00
|
|
|
],
|
|
|
|
|
receivable: [
|
2026-03-03 15:30:07 +09:00
|
|
|
{ key: "set_value", label: "값 설정", type: "filter_value", category: "filter", description: "외부에서 값을 받아 검색 필드에 세팅 (스캔, 모달 선택 등)" },
|
2026-02-23 18:45:21 +09:00
|
|
|
],
|
|
|
|
|
},
|
feat(pop-search): 검색 컴포넌트 MVP 구현
- pop-search 컴포넌트 신규 추가 (Component, Config, types, index)
- 입력 타입: text, number, date, date-preset, select, multi-select, combo, modal-table, modal-card, modal-icon-grid, toggle
- 디자이너 팔레트, 레지스트리, 타입, 렌더러 라벨 등록
- 기본 그리드 크기 4x2, labelText/labelVisible 설정 지원
- filter_changed 이벤트 발행 (연결 시스템 미적용, 추후 dataFlow 기반으로 전환 예정)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-23 17:16:38 +09:00
|
|
|
touchOptimized: true,
|
|
|
|
|
supportedDevices: ["mobile", "tablet"],
|
|
|
|
|
});
|