import { Action } from 'typescript-fsa' ; import { Dispatch } from 'redux' ; import { KanbanBoardRecord , KanbanRecord , UpdateStickyLanesPayload , ConfirmDialogProps , AppState } from '../types' ; import { AppEventsActions as AppEventsActions_ , appEventsActions } from '../actions/AppEventsActions' ; import { KanbanBoardActions as KanbanBoardActions_ , kanbanBoardActions } from '../actions/KanbanBoardActions' ; export type AppEventsActions = AppEventsActions_ ; export type KanbanBoardActions = KanbanBoardActions_ ; export function mapDispatchToProps ( dispatch ) { return { addBoard : ( boardName ) => dispatch ( kanbanBoardActions . startAddBoard ( { boardName } ) ) , changeActiveBoard : ( boardId ) => dispatch ( kanbanBoardActions . startChangeActiveBoard ( { boardId } ) ) , updateBoardName : ( v ) => dispatch ( kanbanBoardActions . startUpdateBoardName ( v ) ) , deleteBoard : ( boardId ) => dispatch ( kanbanBoardActions . startDeleteBoard ( { boardId } ) ) , addSticky : ( ) => dispatch ( kanbanBoardActions . startAddSticky ( { } ) ) , updateSticky : ( v ) => dispatch ( kanbanBoardActions . startUpdateSticky ( v ) ) , updateStickyLanes : ( v ) => dispatch ( kanbanBoardActions . startUpdateStickyLanes ( v ) ) , archiveSticky : ( kanbanId ) => dispatch ( kanbanBoardActions . startArchiveSticky ( { kanbanId } ) ) , unarchiveSticky : ( kanbanId ) => dispatch ( kanbanBoardActions . startUnarchiveSticky ( { kanbanId } ) ) , deleteSticky : ( kanbanId ) => dispatch ( kanbanBoardActions . startDeleteSticky ( { kanbanId } ) ) , editBoardAndStickys : ( v ) => dispatch ( kanbanBoardActions . startEditBoardAndStickys ( v ) ) , refreshActiveBoard : ( ) => dispatch ( kanbanBoardActions . startRefreshActiveBoard ( { } ) ) , showAlertDialog : ( v ) => dispatch ( appEventsActions . showAlertDialog ( v ) ) , closeAlertDialog : ( ) => dispatch ( appEventsActions . closeAlertDialog ( ) ) , } ; } export function mapStateToProps ( appState ) { return Object . assign ( { } , appState . kanbanBoard ) ; }