UNPKG

jedifocus.navigations

Version:
182 lines (161 loc) 4.22 kB
/* __.-._ * '-._"7' JediFocus * /'.-c * | /T Do. Or do not. * _)_/LI There is no try. * * This project is a part of the “Byte-Sized JavaScript” videocasts. * You can watch “Byte-Sized JavaScript” at: https://bytesized.tv/ * * MIT Licensed See LICENSE.md * * Send your comments, suggestions, and feedback to me@volkan.io */ declare module 'jedifocus-modals-types' { declare type Dispatcher = ({ type: string, payload: {} }) => void; declare type UpdateFunction = ( column: string, id: string, description: string, context: string ) => void; declare type UpdateDescriptionAction = ( column: string, id: string, description: string, context: string ) => { type: string, payload: {} }; declare type SwitchToMoveModeAction = () => { type: string, payload: {} }; declare type UpdateColumnAction = ( currentColumn: string, cardId: string, nextColumn: string ) => { type: string, payload: {} }; declare type UpdateContextAction = ( column: string, cardId: string, cardDescription: string, cardContext: string ) => { type: string, payload: {} }; declare type SaveFunction = ( userId: string, context: string, column: string, id: string, description: string, stateContext: string ) => void; declare type CardColumnListProps = { column: string, id: string, update: UpdateColumnAction }; declare type CardContextListProps = { column: string, context: string, description: string, id: string, update: UpdateContextAction }; declare type ModalCardMoveOptionsColumnListProps = { column: string, id: string, update: UpdateColumnAction }; declare type ModalCardMoveOptionsContextListProps = { column: string, context: string, description: string, id: string, update: UpdateContextAction }; declare type ModalContextContainerProps = { changeContext: () => void, context: string, reveal: boolean, show: boolean }; declare type ModalCardProps = { show: boolean, reveal: boolean, column: string, context: string, description: string, id: string, showMoveOptions: boolean, updateCardDescription: UpdateDescriptionAction, switchToMoveMode: SwitchToMoveModeAction, saveCard: () => void, updateCardColumn: UpdateColumnAction, updateCardContext: UpdateContextAction }; declare type ModalCardContainerProps = { column: string, context: string, description: string, id: string, reveal: boolean, saveCard: SaveFunction, stateContext: string, show: boolean, showMoveOptions: boolean, switchCardToMoveMode: () => { type: string, payload: {} }, switchToMoveMode: SwitchToMoveModeAction, updateCardColumn: UpdateColumnAction, updateCardContext: UpdateContextAction, updateCardDescription: UpdateDescriptionAction, userId: string }; declare type ModalCardDescriptionProps = { column: string, context: string, description: string, id: string, reveal: boolean, saveCard: () => void, switchToMoveMode: SwitchToMoveModeAction, updateCardDescription: UpdateDescriptionAction }; declare type ModalMoveOptionsProps = { column: string, context: string, description: string, id: string, reveal: boolean, saveCard: SaveFunction, updateCardColumn: UpdateColumnAction, updateCardContext: UpdateContextAction }; declare type ModalCardEditDescriptionTextAreaProps = { id: string, value: string, onChange: (newValue: string) => void }; declare type ModalCardMoveOptionsProps = { column: string, context: string, description: string, id: string, reveal: boolean, saveCard: () => void, updateCardColumn: UpdateColumnAction, updateCardContext: UpdateContextAction }; declare type ModalContextProps = { changeContext: () => void, context: string, reveal: boolean, show: boolean }; declare type ModalContextContextListProps = { className: string, onChange: (nextContext: string) => void, value: string }; }