|
| 1 | +## API Report File for "@contember/react-board" |
| 2 | + |
| 3 | +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). |
| 4 | +
|
| 5 | +```ts |
| 6 | + |
| 7 | +import { ComponentType } from 'react'; |
| 8 | +import { EntityAccessor } from '@contember/react-binding'; |
| 9 | +import { EntityListAccessor } from '@contember/react-binding'; |
| 10 | +import { NamedExoticComponent } from 'react'; |
| 11 | +import { ReactNode } from 'react'; |
| 12 | +import { SugaredQualifiedEntityList } from '@contember/react-binding'; |
| 13 | +import { SugaredRelativeEntityList } from '@contember/react-binding'; |
| 14 | +import { SugaredRelativeSingleEntity } from '@contember/react-binding'; |
| 15 | +import { SugaredRelativeSingleField } from '@contember/react-binding'; |
| 16 | + |
| 17 | +// @public (undocumented) |
| 18 | +export type BoardAddColumnMethod = (index: number | undefined, preprocess?: EntityAccessor.BatchUpdatesHandler) => void; |
| 19 | + |
| 20 | +// @public (undocumented) |
| 21 | +export type BoardAddItemMethod<ColumnValue extends BoardColumnValue> = (column: ColumnValue | null, index: number | undefined, preprocess?: EntityAccessor.BatchUpdatesHandler) => void; |
| 22 | + |
| 23 | +// @public (undocumented) |
| 24 | +export type BoardBaseProps<RendererExtraProps> = (BoardQualifiedDynamicProps | BoardRelativeDynamicProps | BoardQualifiedStaticProps | BoardRelativeStaticProps) & RendererExtraProps; |
| 25 | + |
| 26 | +// @public (undocumented) |
| 27 | +export type BoardBindingProps<ColumnValue extends BoardColumnValue> = { |
| 28 | + columns: BoardColumn<ColumnValue>[]; |
| 29 | +} & BoardMethods<ColumnValue>; |
| 30 | + |
| 31 | +// @public (undocumented) |
| 32 | +export type BoardColumn<ColumnValue extends BoardColumnValue = BoardColumnValue> = { |
| 33 | + id: string | number; |
| 34 | + index: number; |
| 35 | + value: ColumnValue | null; |
| 36 | + items: BoardItem[]; |
| 37 | +}; |
| 38 | + |
| 39 | +// @public (undocumented) |
| 40 | +export type BoardColumnValue = BoardStaticColumnValue | EntityAccessor; |
| 41 | + |
| 42 | +// @public (undocumented) |
| 43 | +export type BoardCommonProps = BoardNullBehaviourProps & { |
| 44 | + children: ReactNode; |
| 45 | + sortableBy?: string | SugaredRelativeSingleField; |
| 46 | + sortScope?: 'column' | 'board'; |
| 47 | +}; |
| 48 | + |
| 49 | +// @public (undocumented) |
| 50 | +export type BoardDynamicColumnsBindingProps = { |
| 51 | + columns: SugaredQualifiedEntityList['entities']; |
| 52 | + columnsSortableBy?: string | SugaredRelativeSingleField; |
| 53 | + discriminationField: string | SugaredRelativeSingleEntity; |
| 54 | +}; |
| 55 | + |
| 56 | +// @public (undocumented) |
| 57 | +export type BoardItem = { |
| 58 | + id: string | number; |
| 59 | + index: number; |
| 60 | + value: EntityAccessor; |
| 61 | +}; |
| 62 | + |
| 63 | +// @public (undocumented) |
| 64 | +export type BoardMethods<ColumnValue extends BoardColumnValue> = { |
| 65 | + moveColumn?: BoardMoveColumnMethod; |
| 66 | + addColumn?: BoardAddColumnMethod; |
| 67 | + removeColumn?: BoardRemoveColumnMethod; |
| 68 | + moveItem?: BoardMoveItemMethod<ColumnValue>; |
| 69 | + addItem?: BoardAddItemMethod<ColumnValue>; |
| 70 | + removeItem?: BoardRemoveItemMethod; |
| 71 | +}; |
| 72 | + |
| 73 | +// @public (undocumented) |
| 74 | +export type BoardMoveColumnMethod = (entity: EntityAccessor, index: number) => void; |
| 75 | + |
| 76 | +// @public (undocumented) |
| 77 | +export type BoardMoveItemMethod<ColumnValue extends BoardColumnValue> = (entity: EntityAccessor, column: ColumnValue | null, index: number) => void; |
| 78 | + |
| 79 | +// @public (undocumented) |
| 80 | +export type BoardNullBehaviourProps = { |
| 81 | + nullColumn?: 'never' | 'always' | 'auto'; |
| 82 | + nullColumnPlacement?: 'start' | 'end'; |
| 83 | +}; |
| 84 | + |
| 85 | +// @public (undocumented) |
| 86 | +export const BoardNullColumnPlaceholder = "__null_column"; |
| 87 | + |
| 88 | +// @public (undocumented) |
| 89 | +export type BoardQualifiedDynamicProps = BoardCommonProps & BoardDynamicColumnsBindingProps & BoardQualifiedItemsProps; |
| 90 | + |
| 91 | +// @public (undocumented) |
| 92 | +export type BoardQualifiedItemsProps = Pick<SugaredQualifiedEntityList, 'entities' | 'orderBy' | 'limit' | 'offset'>; |
| 93 | + |
| 94 | +// @public (undocumented) |
| 95 | +export type BoardQualifiedStaticProps = BoardCommonProps & BoardStaticColumnsBindingProps & BoardQualifiedItemsProps; |
| 96 | + |
| 97 | +// @public (undocumented) |
| 98 | +export type BoardRelativeDynamicProps = BoardCommonProps & BoardDynamicColumnsBindingProps & BoardRelativeItemsProps; |
| 99 | + |
| 100 | +// @public (undocumented) |
| 101 | +export type BoardRelativeItemsProps = Pick<SugaredRelativeEntityList, 'field' | 'orderBy' | 'limit' | 'offset'>; |
| 102 | + |
| 103 | +// @public (undocumented) |
| 104 | +export type BoardRelativeStaticProps = BoardCommonProps & BoardStaticColumnsBindingProps & BoardRelativeItemsProps; |
| 105 | + |
| 106 | +// @public (undocumented) |
| 107 | +export type BoardRemoveColumnMethod = (entity: EntityAccessor) => void; |
| 108 | + |
| 109 | +// @public (undocumented) |
| 110 | +export type BoardRemoveItemMethod = (entity: EntityAccessor) => void; |
| 111 | + |
| 112 | +// @public (undocumented) |
| 113 | +export type BoardStaticColumnsBindingProps = { |
| 114 | + columns: { |
| 115 | + value: string; |
| 116 | + label: ReactNode; |
| 117 | + }[]; |
| 118 | + discriminationField: string | SugaredRelativeSingleField; |
| 119 | +}; |
| 120 | + |
| 121 | +// @public (undocumented) |
| 122 | +export type BoardStaticColumnValue = { |
| 123 | + value: string; |
| 124 | + label?: ReactNode; |
| 125 | +}; |
| 126 | + |
| 127 | +// @public (undocumented) |
| 128 | +export const createBoard: <RendererExtraProps extends {}>({ Renderer, ItemStaticRender, ColumnStaticRender }: CreateBoardArgs<RendererExtraProps>) => NamedExoticComponent<BoardBaseProps<RendererExtraProps>>; |
| 129 | + |
| 130 | +// @public (undocumented) |
| 131 | +export type CreateBoardArgs<T extends {}> = { |
| 132 | + Renderer: ComponentType<BoardBindingProps<any> & T>; |
| 133 | + ItemStaticRender?: ComponentType<T>; |
| 134 | + ColumnStaticRender?: ComponentType<T>; |
| 135 | +}; |
| 136 | + |
| 137 | +// @public (undocumented) |
| 138 | +export const useDynamicBoard: ({ sortableBy, sortScope, columnsSortableBy, discriminationField, columnEntities, itemEntities, nullColumnPlacement, nullColumn, }: UseDynamicBoardBindingProps) => BoardBindingProps<EntityAccessor>; |
| 139 | + |
| 140 | +// @public (undocumented) |
| 141 | +export type UseDynamicBoardBindingProps = Omit<BoardCommonProps, 'children'> & BoardDynamicColumnsBindingProps & { |
| 142 | + columnEntities: EntityListAccessor; |
| 143 | + itemEntities: EntityListAccessor; |
| 144 | +}; |
| 145 | + |
| 146 | +// @public (undocumented) |
| 147 | +export const useStaticBoard: ({ sortableBy, sortScope, columns, discriminationField, itemEntities, nullColumnPlacement, nullColumn, }: UseStaticBoardBindingProps) => BoardBindingProps<BoardStaticColumnValue>; |
| 148 | + |
| 149 | +// @public (undocumented) |
| 150 | +export type UseStaticBoardBindingProps = Omit<BoardCommonProps, 'children'> & BoardStaticColumnsBindingProps & { |
| 151 | + itemEntities: EntityListAccessor; |
| 152 | +}; |
| 153 | + |
| 154 | +// (No @packageDocumentation comment for this package) |
| 155 | + |
| 156 | +``` |
0 commit comments