Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kanban style board #647

Merged
merged 7 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/api/admin.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4197,6 +4197,7 @@ export const withUnderline: <E extends Editor>(editor: E) => E;
export * from "@contember/react-auto";
export * from "@contember/react-binding";
export * from "@contember/react-binding-ui";
export * from "@contember/react-board-ui";
export * from "@contember/react-choice-field-ui";
export * from "@contember/react-client";
export * from "@contember/react-datagrid-ui";
Expand Down
4 changes: 2 additions & 2 deletions build/api/interface-tester.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const createEnvironment: ({ model, role, pageConfig }: {
}) => Environment;

// @public (undocumented)
export const createNode: (value: any) => ReactNode | undefined;
export const createNode: (value: any) => ReactNode[];

// @public (undocumented)
export const getTests: (config: Config) => Promise<Test[]>;
Expand All @@ -36,7 +36,7 @@ export type PageConfig = {
roles?: string[];
parameters?: Environment.Parameters;
dimensions?: Environment.SelectedDimensions;
createNode?: (exported: unknown) => ReactNode;
createNode?: (exported: unknown) => ReactNode | ReactNode[];
testNode?: (node: ReactNode | undefined, environment: Environment, originalExport: unknown) => void;
};

Expand Down
68 changes: 68 additions & 0 deletions build/api/react-board-dnd-kit.api.md
Original file line number Diff line number Diff line change
@@ -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<any>;
dropIndicator?: 'before' | 'after';
};

// @public (undocumented)
export type BoardDndKitRendererProps = BoardBindingProps<any>;

// @public (undocumented)
export type BoardItemRendererProps = {
value?: BoardItem;
dragOverlay?: boolean;
sortableProps?: UseSortableProps;
boardMethods?: BoardMethods<any>;
dropIndicator?: 'before' | 'after';
};

// @public (undocumented)
export const createBoardDndKit: <ColumnExtraProps extends {}, ItemExtraProps extends {}>({ Column, Item, Wrapper, usePortalProvider }: {
Wrapper: React_2.ComponentType<{
children: ReactNode;
}>;
Column: React_2.ComponentType<BoardColumnRendererProps & ColumnExtraProps>;
Item: React_2.ComponentType<BoardItemRendererProps & ItemExtraProps>;
usePortalProvider?: (() => Element | null) | undefined;
}) => React_2.FunctionComponent<BoardBaseProps<ColumnExtraProps & ItemExtraProps>>;

// @public (undocumented)
export const createBoardDndKitRenderer: <ColumnExtraProps extends {}, ItemExtraProps extends {}>({ Column, Item, Wrapper, usePortalProvider }: {
Wrapper: React_2.ComponentType<{
children: ReactNode;
}>;
Column: React_2.ComponentType<BoardColumnRendererProps & ColumnExtraProps>;
Item: React_2.ComponentType<BoardItemRendererProps & ItemExtraProps>;
usePortalProvider?: (() => Element | null) | undefined;
}) => React_2.FunctionComponent<{
columns: BoardColumn<any>[];
} & BoardMethods<any> & ColumnExtraProps & ItemExtraProps>;

// @public (undocumented)
export type UseSortableProps = ReturnType<typeof useSortable>;


export * from "@contember/react-board";

// (No @packageDocumentation comment for this package)

```
35 changes: 35 additions & 0 deletions build/api/react-board-ui.api.md
Original file line number Diff line number Diff line change
@@ -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<BoardProps>;

// @public (undocumented)
export type BoardColumnExtraProps = {
columnLabel?: React_2.ReactElement | ComponentType<BoardColumnRendererProps>;
nullColumnLabel?: React_2.ReactNode;
columnFooter?: React_2.ReactElement | ComponentType<BoardColumnRendererProps>;
};

// @public (undocumented)
export type BoardItemExtraProps = {
children: React_2.ReactNode;
};

// @public (undocumented)
export type BoardProps = BoardBaseProps<BoardColumnExtraProps & BoardItemExtraProps>;


export * from "@contember/react-board-dnd-kit";

// (No @packageDocumentation comment for this package)

```
156 changes: 156 additions & 0 deletions build/api/react-board.api.md
Original file line number Diff line number Diff line change
@@ -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<ColumnValue extends BoardColumnValue> = (column: ColumnValue | null, index: number | undefined, preprocess?: EntityAccessor.BatchUpdatesHandler) => void;

// @public (undocumented)
export type BoardBaseProps<RendererExtraProps> = (BoardQualifiedDynamicProps | BoardRelativeDynamicProps | BoardQualifiedStaticProps | BoardRelativeStaticProps) & RendererExtraProps;

// @public (undocumented)
export type BoardBindingProps<ColumnValue extends BoardColumnValue> = {
columns: BoardColumn<ColumnValue>[];
} & BoardMethods<ColumnValue>;

// @public (undocumented)
export type BoardColumn<ColumnValue extends BoardColumnValue = BoardColumnValue> = {
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<ColumnValue extends BoardColumnValue> = {
moveColumn?: BoardMoveColumnMethod;
addColumn?: BoardAddColumnMethod;
removeColumn?: BoardRemoveColumnMethod;
moveItem?: BoardMoveItemMethod<ColumnValue>;
addItem?: BoardAddItemMethod<ColumnValue>;
removeItem?: BoardRemoveItemMethod;
};

// @public (undocumented)
export type BoardMoveColumnMethod = (entity: EntityAccessor, index: number) => void;

// @public (undocumented)
export type BoardMoveItemMethod<ColumnValue extends BoardColumnValue> = (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<SugaredQualifiedEntityList, 'entities' | 'orderBy' | 'limit' | 'offset'>;

// @public (undocumented)
export type BoardQualifiedStaticProps = BoardCommonProps & BoardStaticColumnsBindingProps & BoardQualifiedItemsProps;

// @public (undocumented)
export type BoardRelativeDynamicProps = BoardCommonProps & BoardDynamicColumnsBindingProps & BoardRelativeItemsProps;

// @public (undocumented)
export type BoardRelativeItemsProps = Pick<SugaredRelativeEntityList, 'field' | 'orderBy' | 'limit' | 'offset'>;

// @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: <RendererExtraProps extends {}>({ Renderer, ItemStaticRender, ColumnStaticRender }: CreateBoardArgs<RendererExtraProps>) => NamedExoticComponent<BoardBaseProps<RendererExtraProps>>;

// @public (undocumented)
export type CreateBoardArgs<T extends {}> = {
Renderer: ComponentType<BoardBindingProps<any> & T>;
ItemStaticRender?: ComponentType<T>;
ColumnStaticRender?: ComponentType<T>;
};

// @public (undocumented)
export const useDynamicBoard: ({ sortableBy, sortScope, columnsSortableBy, discriminationField, columnEntities, itemEntities, nullColumnPlacement, nullColumn, }: UseDynamicBoardBindingProps) => BoardBindingProps<EntityAccessor>;

// @public (undocumented)
export type UseDynamicBoardBindingProps = Omit<BoardCommonProps, 'children'> & BoardDynamicColumnsBindingProps & {
columnEntities: EntityListAccessor;
itemEntities: EntityListAccessor;
};

// @public (undocumented)
export const useStaticBoard: ({ sortableBy, sortScope, columns, discriminationField, itemEntities, nullColumnPlacement, nullColumn, }: UseStaticBoardBindingProps) => BoardBindingProps<BoardStaticColumnValue>;

// @public (undocumented)
export type UseStaticBoardBindingProps = Omit<BoardCommonProps, 'children'> & BoardStaticColumnsBindingProps & {
itemEntities: EntityListAccessor;
};

// (No @packageDocumentation comment for this package)

```
3 changes: 3 additions & 0 deletions ee/admin-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ COPY ./packages/layout/package.json ././packages/layout/package.json
COPY ./packages/react-auto/package.json ././packages/react-auto/package.json
COPY ./packages/react-binding/package.json ././packages/react-binding/package.json
COPY ./packages/react-binding-ui/package.json ././packages/react-binding-ui/package.json
COPY ./packages/react-board/package.json ././packages/react-board/package.json
COPY ./packages/react-board-dnd-kit/package.json ././packages/react-board-dnd-kit/package.json
COPY ./packages/react-board-ui/package.json ././packages/react-board-ui/package.json
COPY ./packages/react-choice-field/package.json ././packages/react-choice-field/package.json
COPY ./packages/react-choice-field-ui/package.json ././packages/react-choice-field-ui/package.json
COPY ./packages/react-client/package.json ././packages/react-client/package.json
Expand Down
Loading
Loading