= P & {
paginator: Paginator
}
// pagination's composed action creators
export interface PageActionCreators {
expire: ActionCreator
updatingItem: ActionCreator
updateItem: ActionCreator
updatingItems: ActionCreator
updateItems: ActionCreator
updateComplete: ActionCreator
updateFailed: ActionCreator
massUpdateComplete: ActionCreator
massUpdateFailed: ActionCreator
resetItem: ActionCreator
updatingAll: ActionCreator
updateAll: ActionCreator
resetResults: ActionCreator
removingItem: ActionCreator
removeItem: ActionCreator
// Async
updateAsync: ActionCreator<(...args: any[]) => void | Promise
: PropsWithPaginator
) => Record
: PropsWithPaginator
) => Record extends Store {
decorate(...args: any[]): any
[extraApi: string]: any
}
declare interface Decorators(listId: string, state: S): Paginator
export function getItem(
state: S,
listId: string,
itemId: I
): Immutable.Collection(
state: S,
listId: string,
itemId: I
): boolean
export function isRemoving(
state: S,
listId: string,
itemId: I
): boolean
export function currentQuery(state: S, listId: string): PageInfo
declare interface Middleware {
spill(...args: any[]): any
jelly(...args: any[]): any
}
export const middleware = Middleware
export function debug(shouldDebug: boolean): void
export function initializeStore(store: S): void
export function pageData(
currentPage: number,
totalPages: number,
maxPages?: number
): {
firstPage: {
page: number
current: boolean
}
hasLeftSeparator: boolean
middlePages: { page: number; current: boolean }[]
hasRightSeparator: boolean
lastPage: {
page: number
current: boolean
}
}
// Premade components for pagination
export type NextProps = {
pageActions: {
next: PageActionCreators['next']
}
hasNextPage: boolean
}
export const Next: ReturnType