장바구니 담기 -> DB 저장 전체 플로우 구현 및 검증 완료. - useCartSync 훅 신규: DB(cart_items) <-> 로컬 상태 동기화, dirty check, 일괄 저장 - pop-button cart 프리셋: 배지 표시, 저장 트리거, 확인 모달, 3색 데이터 흐름 시각화 - pop-card-list: 담기/취소 UI, cart_save_trigger 수신 시 saveToDb 실행 - 선택적 컬럼 저장: RowDataMode(all/selected) + 연결 기반 자동 컬럼 로딩 - ComponentEditorPanel: allComponents/connections/componentId를 ConfigPanel에 전달 - connectionMeta: cart_save_trigger/cart_updated/cart_save_completed 이벤트 정의 - ConnectionEditor: 이벤트 타입 연결 구분 (데이터 vs 이벤트) - types.ts: CartItemWithId, CartSyncStatus, CartButtonConfig 등 타입 추가 - 접근성: NumberInputModal/PackageUnitModal에 DialogTitle 추가 Made-with: Cursor
31 lines
963 B
TypeScript
31 lines
963 B
TypeScript
/**
|
|
* POP 공통 훅 배럴 파일
|
|
*
|
|
* 사용법: import { usePopEvent, useDataSource } from "@/hooks/pop";
|
|
*/
|
|
|
|
// 이벤트 통신 훅
|
|
export { usePopEvent, cleanupScreen } from "./usePopEvent";
|
|
|
|
// 데이터 CRUD 훅
|
|
export { useDataSource } from "./useDataSource";
|
|
export type { MutationResult, DataSourceResult } from "./useDataSource";
|
|
|
|
// 액션 실행 순수 함수
|
|
export { executePopAction } from "./executePopAction";
|
|
export type { ActionResult } from "./executePopAction";
|
|
|
|
// 액션 실행 React 훅
|
|
export { usePopAction } from "./usePopAction";
|
|
export type { PendingConfirmState } from "./usePopAction";
|
|
|
|
// 연결 해석기
|
|
export { useConnectionResolver } from "./useConnectionResolver";
|
|
|
|
// 장바구니 동기화 훅
|
|
export { useCartSync } from "./useCartSync";
|
|
export type { UseCartSyncReturn } from "./useCartSync";
|
|
|
|
// SQL 빌더 유틸 (고급 사용 시)
|
|
export { buildAggregationSQL, validateDataSourceConfig } from "./popSqlBuilder";
|