diff --git a/build/api/react-board-dnd-kit.api.md b/build/api/react-board-dnd-kit.api.md new file mode 100644 index 0000000000..108198e84d --- /dev/null +++ b/build/api/react-board-dnd-kit.api.md @@ -0,0 +1,68 @@ +## API Report File for "@contember/react-board-dnd-kit" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { BoardBaseProps } from '@contember/react-board'; +import { BoardBindingProps } from '@contember/react-board'; +import { BoardColumn } from '@contember/react-board'; +import { BoardItem } from '@contember/react-board'; +import { BoardMethods } from '@contember/react-board'; +import { default as React_2 } from 'react'; +import { ReactNode } from 'react'; +import { useSortable } from '@dnd-kit/sortable'; + +// @public (undocumented) +export type BoardColumnRendererProps = { + children?: ReactNode; + value?: BoardColumn; + dragOverlay?: boolean; + sortableProps?: UseSortableProps; + boardMethods?: BoardMethods; + dropIndicator?: 'before' | 'after'; +}; + +// @public (undocumented) +export type BoardDndKitRendererProps = BoardBindingProps; + +// @public (undocumented) +export type BoardItemRendererProps = { + value?: BoardItem; + dragOverlay?: boolean; + sortableProps?: UseSortableProps; + boardMethods?: BoardMethods; + dropIndicator?: 'before' | 'after'; +}; + +// @public (undocumented) +export const createBoardDndKit: ({ Column, Item, Wrapper, usePortalProvider }: { + Wrapper: React_2.ComponentType<{ + children: ReactNode; + }>; + Column: React_2.ComponentType; + Item: React_2.ComponentType; + usePortalProvider?: (() => Element | null) | undefined; +}) => React_2.FunctionComponent>; + +// @public (undocumented) +export const createBoardDndKitRenderer: ({ Column, Item, Wrapper, usePortalProvider }: { + Wrapper: React_2.ComponentType<{ + children: ReactNode; + }>; + Column: React_2.ComponentType; + Item: React_2.ComponentType; + usePortalProvider?: (() => Element | null) | undefined; +}) => React_2.FunctionComponent<{ + columns: BoardColumn[]; +} & BoardMethods & ColumnExtraProps & ItemExtraProps>; + +// @public (undocumented) +export type UseSortableProps = ReturnType; + + +export * from "@contember/react-board"; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/build/api/react-board-ui.api.md b/build/api/react-board-ui.api.md new file mode 100644 index 0000000000..b6e0378be9 --- /dev/null +++ b/build/api/react-board-ui.api.md @@ -0,0 +1,35 @@ +## API Report File for "@contember/react-board-ui" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { BoardBaseProps } from '@contember/react-board'; +import { BoardColumnRendererProps } from '@contember/react-board-dnd-kit'; +import { ComponentType } from 'react'; +import { default as React_2 } from 'react'; + +// @public (undocumented) +export const Board: ComponentType; + +// @public (undocumented) +export type BoardColumnExtraProps = { + columnLabel?: React_2.ReactElement | ComponentType; + nullColumnLabel?: React_2.ReactNode; + columnFooter?: React_2.ReactElement | ComponentType; +}; + +// @public (undocumented) +export type BoardItemExtraProps = { + children: React_2.ReactNode; +}; + +// @public (undocumented) +export type BoardProps = BoardBaseProps; + + +export * from "@contember/react-board-dnd-kit"; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/build/api/react-board.api.md b/build/api/react-board.api.md new file mode 100644 index 0000000000..2e28b11c2b --- /dev/null +++ b/build/api/react-board.api.md @@ -0,0 +1,156 @@ +## API Report File for "@contember/react-board" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { ComponentType } from 'react'; +import { EntityAccessor } from '@contember/react-binding'; +import { EntityListAccessor } from '@contember/react-binding'; +import { NamedExoticComponent } from 'react'; +import { ReactNode } from 'react'; +import { SugaredQualifiedEntityList } from '@contember/react-binding'; +import { SugaredRelativeEntityList } from '@contember/react-binding'; +import { SugaredRelativeSingleEntity } from '@contember/react-binding'; +import { SugaredRelativeSingleField } from '@contember/react-binding'; + +// @public (undocumented) +export type BoardAddColumnMethod = (index: number | undefined, preprocess?: EntityAccessor.BatchUpdatesHandler) => void; + +// @public (undocumented) +export type BoardAddItemMethod = (column: ColumnValue | null, index: number | undefined, preprocess?: EntityAccessor.BatchUpdatesHandler) => void; + +// @public (undocumented) +export type BoardBaseProps = (BoardQualifiedDynamicProps | BoardRelativeDynamicProps | BoardQualifiedStaticProps | BoardRelativeStaticProps) & RendererExtraProps; + +// @public (undocumented) +export type BoardBindingProps = { + columns: BoardColumn[]; +} & BoardMethods; + +// @public (undocumented) +export type BoardColumn = { + id: string | number; + index: number; + value: ColumnValue | null; + items: BoardItem[]; +}; + +// @public (undocumented) +export type BoardColumnValue = BoardStaticColumnValue | EntityAccessor; + +// @public (undocumented) +export type BoardCommonProps = BoardNullBehaviourProps & { + children: ReactNode; + sortableBy?: string | SugaredRelativeSingleField; + sortScope?: 'column' | 'board'; +}; + +// @public (undocumented) +export type BoardDynamicColumnsBindingProps = { + columns: SugaredQualifiedEntityList['entities']; + columnsSortableBy?: string | SugaredRelativeSingleField; + discriminationField: string | SugaredRelativeSingleEntity; +}; + +// @public (undocumented) +export type BoardItem = { + id: string | number; + index: number; + value: EntityAccessor; +}; + +// @public (undocumented) +export type BoardMethods = { + moveColumn?: BoardMoveColumnMethod; + addColumn?: BoardAddColumnMethod; + removeColumn?: BoardRemoveColumnMethod; + moveItem?: BoardMoveItemMethod; + addItem?: BoardAddItemMethod; + removeItem?: BoardRemoveItemMethod; +}; + +// @public (undocumented) +export type BoardMoveColumnMethod = (entity: EntityAccessor, index: number) => void; + +// @public (undocumented) +export type BoardMoveItemMethod = (entity: EntityAccessor, column: ColumnValue | null, index: number) => void; + +// @public (undocumented) +export type BoardNullBehaviourProps = { + nullColumn?: 'never' | 'always' | 'auto'; + nullColumnPlacement?: 'start' | 'end'; +}; + +// @public (undocumented) +export const BoardNullColumnPlaceholder = "__null_column"; + +// @public (undocumented) +export type BoardQualifiedDynamicProps = BoardCommonProps & BoardDynamicColumnsBindingProps & BoardQualifiedItemsProps; + +// @public (undocumented) +export type BoardQualifiedItemsProps = Pick; + +// @public (undocumented) +export type BoardQualifiedStaticProps = BoardCommonProps & BoardStaticColumnsBindingProps & BoardQualifiedItemsProps; + +// @public (undocumented) +export type BoardRelativeDynamicProps = BoardCommonProps & BoardDynamicColumnsBindingProps & BoardRelativeItemsProps; + +// @public (undocumented) +export type BoardRelativeItemsProps = Pick; + +// @public (undocumented) +export type BoardRelativeStaticProps = BoardCommonProps & BoardStaticColumnsBindingProps & BoardRelativeItemsProps; + +// @public (undocumented) +export type BoardRemoveColumnMethod = (entity: EntityAccessor) => void; + +// @public (undocumented) +export type BoardRemoveItemMethod = (entity: EntityAccessor) => void; + +// @public (undocumented) +export type BoardStaticColumnsBindingProps = { + columns: { + value: string; + label: ReactNode; + }[]; + discriminationField: string | SugaredRelativeSingleField; +}; + +// @public (undocumented) +export type BoardStaticColumnValue = { + value: string; + label?: ReactNode; +}; + +// @public (undocumented) +export const createBoard: ({ Renderer, ItemStaticRender, ColumnStaticRender }: CreateBoardArgs) => NamedExoticComponent>; + +// @public (undocumented) +export type CreateBoardArgs = { + Renderer: ComponentType & T>; + ItemStaticRender?: ComponentType; + ColumnStaticRender?: ComponentType; +}; + +// @public (undocumented) +export const useDynamicBoard: ({ sortableBy, sortScope, columnsSortableBy, discriminationField, columnEntities, itemEntities, nullColumnPlacement, nullColumn, }: UseDynamicBoardBindingProps) => BoardBindingProps; + +// @public (undocumented) +export type UseDynamicBoardBindingProps = Omit & BoardDynamicColumnsBindingProps & { + columnEntities: EntityListAccessor; + itemEntities: EntityListAccessor; +}; + +// @public (undocumented) +export const useStaticBoard: ({ sortableBy, sortScope, columns, discriminationField, itemEntities, nullColumnPlacement, nullColumn, }: UseStaticBoardBindingProps) => BoardBindingProps; + +// @public (undocumented) +export type UseStaticBoardBindingProps = Omit & BoardStaticColumnsBindingProps & { + itemEntities: EntityListAccessor; +}; + +// (No @packageDocumentation comment for this package) + +```