// Copyright (c) 2019 Shellyl_N and Authors // license: ISC // https://github.com/shellyln import actionCreatorFactory, { Action } from 'typescript-fsa'; import { KanbanRecord, ConfirmDialogProps } from '../types'; export interface CalendarActions { showToday: () => Action; showNextMonth: () => Action; showPreviousMonth: () => Action; showNextYear: () => Action; showPreviousYear: () => Action; // from KanbanBoardActions changeActiveBoard: (id: string) => Action<{boardId: string}>; updateBoardName: (v: {boardId: string, boardName: string}) => Action<{boardId: string, boardName: string}>; updateSticky: (v: KanbanRecord) => Action; archiveSticky: (kanbanId: string) => Action<{kanbanId: string}>; unarchiveSticky: (kanbanId: string) => Action<{kanbanId: string}>; deleteSticky: (kanbanId: string) => Action<{kanbanId: string}>; // from AppEventsActions showAlertDialog: (v: ConfirmDialogProps) => Action; closeAlertDialog: () => Action; } const actionCreator = actionCreatorFactory(); export const calendarActions = { showToday: actionCreator('ACTIONS_SHOW_TODAY'), showNextMonth: actionCreator('ACTIONS_SHOW_NEXT_MONTH'), showPreviousMonth: actionCreator('ACTIONS_SHOW_PREVIOUS_MONTH'), showNextYear: actionCreator('ACTIONS_SHOW_NEXT_YEAR'), showPreviousYear: actionCreator('ACTIONS_SHOW_PREVIOUS_YEAR'), };