@ablogcms/kanban 3.2.28-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Board.d.ts +3 -0
- package/dist/components/BoardContainer.d.ts +7 -0
- package/dist/components/Card.d.ts +19 -0
- package/dist/components/DefaultCard.d.ts +3 -0
- package/dist/components/DefaultLaneHeader.d.ts +3 -0
- package/dist/components/DragOverlay/CardOverlay.d.ts +11 -0
- package/dist/components/DragOverlay/LaneOverlay.d.ts +7 -0
- package/dist/components/Lane.d.ts +32 -0
- package/dist/components/NewCard.d.ts +4 -0
- package/dist/components/NewLane.d.ts +3 -0
- package/dist/components/SortableLane.d.ts +30 -0
- package/dist/components/Tag.d.ts +6 -0
- package/dist/components/widgets/DeleteButton.d.ts +6 -0
- package/dist/components/widgets/EditableLabel.d.ts +8 -0
- package/dist/components.d.ts +2 -0
- package/dist/context/BoardContext.d.ts +10 -0
- package/dist/context/BoardReducer.d.ts +3 -0
- package/dist/helpers/LaneHelper.d.ts +40 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.mjs +981 -0
- package/dist/index.mjs.map +1 -0
- package/dist/types/index.d.ts +187 -0
- package/dist/utils/dndIds.d.ts +9 -0
- package/package.json +53 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BoardProps, KanbanComponents } from '../types/index.js';
|
|
2
|
+
type BoardContainerProps = BoardProps & {
|
|
3
|
+
id: string;
|
|
4
|
+
components: KanbanComponents;
|
|
5
|
+
};
|
|
6
|
+
declare function BoardContainer(props: BoardContainerProps): import("react").JSX.Element;
|
|
7
|
+
export default BoardContainer;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CardData, KanbanComponents } from '../types/index.js';
|
|
3
|
+
interface CardProps {
|
|
4
|
+
card: CardData;
|
|
5
|
+
laneId: string;
|
|
6
|
+
editable?: boolean;
|
|
7
|
+
hideCardDeleteIcon?: boolean;
|
|
8
|
+
customCardLayout?: boolean;
|
|
9
|
+
components: KanbanComponents;
|
|
10
|
+
tagStyle?: React.CSSProperties;
|
|
11
|
+
cardStyle?: React.CSSProperties;
|
|
12
|
+
draggable?: boolean;
|
|
13
|
+
cardDraggable?: boolean;
|
|
14
|
+
onCardClick?: (cardId: string, metadata: unknown, laneId: string) => void;
|
|
15
|
+
onCardDelete?: (cardId: string, laneId: string) => void;
|
|
16
|
+
onRemoveCard?: (laneId: string, cardId: string) => void;
|
|
17
|
+
}
|
|
18
|
+
declare function Card({ card, laneId, editable, hideCardDeleteIcon, customCardLayout, components, tagStyle, cardStyle, draggable, cardDraggable, onCardClick, onCardDelete, onRemoveCard, }: CardProps): React.JSX.Element;
|
|
19
|
+
export default Card;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { LaneHeaderComponentProps } from '../types/index.js';
|
|
2
|
+
declare function DefaultLaneHeader({ lane, titleStyle, labelStyle, dragHandleListeners, dragHandleAttributes, onToggleCollapsed, }: LaneHeaderComponentProps): import("react").JSX.Element;
|
|
3
|
+
export default DefaultLaneHeader;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CardData, KanbanComponents } from '../../types/index.js';
|
|
3
|
+
interface CardOverlayProps {
|
|
4
|
+
card: CardData;
|
|
5
|
+
components: KanbanComponents;
|
|
6
|
+
tagStyle?: React.CSSProperties;
|
|
7
|
+
cardStyle?: React.CSSProperties;
|
|
8
|
+
customCardLayout?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function CardOverlay({ card, components, tagStyle, cardStyle, customCardLayout }: CardOverlayProps): React.JSX.Element;
|
|
11
|
+
export default CardOverlay;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CardData, KanbanComponents, LaneData } from '../types/index.js';
|
|
3
|
+
interface LaneProps {
|
|
4
|
+
lane: LaneData;
|
|
5
|
+
boardId: string;
|
|
6
|
+
index: number;
|
|
7
|
+
draggable?: boolean;
|
|
8
|
+
cardDraggable?: boolean;
|
|
9
|
+
collapsibleLanes?: boolean;
|
|
10
|
+
editable?: boolean;
|
|
11
|
+
hideCardDeleteIcon?: boolean;
|
|
12
|
+
customCardLayout?: boolean;
|
|
13
|
+
components: KanbanComponents;
|
|
14
|
+
tagStyle?: React.CSSProperties;
|
|
15
|
+
cardStyle?: React.CSSProperties;
|
|
16
|
+
titleStyle?: React.CSSProperties;
|
|
17
|
+
labelStyle?: React.CSSProperties;
|
|
18
|
+
addCardTitle?: string;
|
|
19
|
+
addCardLink?: React.ReactNode;
|
|
20
|
+
onLaneScroll?: (requestedPage: number, laneId: string) => Promise<CardData[]>;
|
|
21
|
+
onCardClick?: (cardId: string, metadata: unknown, laneId: string) => void;
|
|
22
|
+
onCardDelete?: (cardId: string, laneId: string) => void;
|
|
23
|
+
onCardAdd?: (card: CardData, laneId: string) => void;
|
|
24
|
+
onLaneClick?: (laneId: string) => void;
|
|
25
|
+
laneSortFunction?: (card1: CardData, card2: CardData) => number;
|
|
26
|
+
dragHandleListeners?: Record<string, unknown>;
|
|
27
|
+
dragHandleAttributes?: Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
declare function Lane({ lane, boardId: _boardId, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
30
|
+
index: _index, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
31
|
+
draggable, cardDraggable, collapsibleLanes, editable, hideCardDeleteIcon, customCardLayout, components, tagStyle, cardStyle, titleStyle, labelStyle, addCardTitle, addCardLink, onLaneScroll, onCardClick, onCardDelete, onCardAdd, onLaneClick, laneSortFunction, dragHandleListeners, dragHandleAttributes, }: LaneProps): React.JSX.Element;
|
|
32
|
+
export default Lane;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LaneData, CardData, KanbanComponents } from '../types/index.js';
|
|
3
|
+
interface SortableLaneProps {
|
|
4
|
+
lane: LaneData;
|
|
5
|
+
boardId: string;
|
|
6
|
+
index: number;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
draggable?: boolean;
|
|
9
|
+
laneDraggable?: boolean;
|
|
10
|
+
cardDraggable?: boolean;
|
|
11
|
+
collapsibleLanes?: boolean;
|
|
12
|
+
editable?: boolean;
|
|
13
|
+
hideCardDeleteIcon?: boolean;
|
|
14
|
+
customCardLayout?: boolean;
|
|
15
|
+
components: KanbanComponents;
|
|
16
|
+
tagStyle?: React.CSSProperties;
|
|
17
|
+
cardStyle?: React.CSSProperties;
|
|
18
|
+
addCardTitle?: string;
|
|
19
|
+
addCardLink?: React.ReactNode;
|
|
20
|
+
onLaneScroll?: (requestedPage: number, laneId: string) => Promise<CardData[]>;
|
|
21
|
+
onCardClick?: (cardId: string, metadata: unknown, laneId: string) => void;
|
|
22
|
+
onCardDelete?: (cardId: string, laneId: string) => void;
|
|
23
|
+
onCardAdd?: (card: CardData, laneId: string) => void;
|
|
24
|
+
onLaneClick?: (laneId: string) => void;
|
|
25
|
+
handleDragStart?: (cardId: string, laneId: string) => void;
|
|
26
|
+
handleDragEnd?: (cardId: string, sourceLaneId: string, targetLaneId: string, position: number, cardDetails: CardData) => void;
|
|
27
|
+
laneSortFunction?: (card1: CardData, card2: CardData) => number;
|
|
28
|
+
}
|
|
29
|
+
declare function SortableLane({ lane, disabled, ...laneProps }: SortableLaneProps): React.JSX.Element;
|
|
30
|
+
export default SortableLane;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface EditableLabelProps {
|
|
3
|
+
onChange?: (value: string) => void;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
autoFocus?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare function EditableLabel({ onChange, placeholder, autoFocus }: EditableLabelProps): React.JSX.Element;
|
|
8
|
+
export default EditableLabel;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BoardState, BoardAction, BoardData } from '../types/index.js';
|
|
3
|
+
interface BoardProviderProps {
|
|
4
|
+
initialData: BoardData;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function BoardProvider({ initialData, children }: BoardProviderProps): React.JSX.Element;
|
|
8
|
+
export declare function useBoardState(): BoardState;
|
|
9
|
+
export declare function useBoardDispatch(): React.Dispatch<BoardAction>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BoardState, BoardData, CardData, LaneData } from '../types/index.js';
|
|
2
|
+
declare const LaneHelper: {
|
|
3
|
+
initialiseLanes: (state: BoardState, { lanes }: BoardData) => BoardState;
|
|
4
|
+
paginateLane: (state: BoardState, { laneId, newCards, nextPage }: {
|
|
5
|
+
laneId: string;
|
|
6
|
+
newCards: CardData[];
|
|
7
|
+
nextPage: number;
|
|
8
|
+
}) => BoardState;
|
|
9
|
+
appendCardsToLane: (state: BoardState, { laneId, newCards, index }: {
|
|
10
|
+
laneId: string;
|
|
11
|
+
newCards: CardData[];
|
|
12
|
+
index?: number;
|
|
13
|
+
}) => LaneData[];
|
|
14
|
+
appendCardToLane: (state: BoardState, { laneId, card, index }: {
|
|
15
|
+
laneId: string;
|
|
16
|
+
card: CardData;
|
|
17
|
+
index?: number;
|
|
18
|
+
}) => BoardState;
|
|
19
|
+
addLane: (state: BoardState, lane: Partial<LaneData>) => BoardState;
|
|
20
|
+
removeCardFromLane: (state: BoardState, { laneId, cardId }: {
|
|
21
|
+
laneId: string;
|
|
22
|
+
cardId: string;
|
|
23
|
+
}) => BoardState;
|
|
24
|
+
moveCardAcrossLanes: (state: BoardState, { fromLaneId, toLaneId, cardId, index }: {
|
|
25
|
+
fromLaneId: string;
|
|
26
|
+
toLaneId: string;
|
|
27
|
+
cardId: string;
|
|
28
|
+
index: number;
|
|
29
|
+
}) => BoardState;
|
|
30
|
+
updateCardsForLane: (state: BoardState, { laneId, cards }: {
|
|
31
|
+
laneId: string;
|
|
32
|
+
cards: CardData[];
|
|
33
|
+
}) => BoardState;
|
|
34
|
+
updateLanes: (state: BoardState, lanes: LaneData[]) => BoardState;
|
|
35
|
+
moveLane: (state: BoardState, { oldIndex, newIndex }: {
|
|
36
|
+
oldIndex: number;
|
|
37
|
+
newIndex: number;
|
|
38
|
+
}) => BoardState;
|
|
39
|
+
};
|
|
40
|
+
export default LaneHelper;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Board from './components/Board.js';
|
|
2
|
+
import Tag from './components/Tag.js';
|
|
3
|
+
import Lane from './components/Lane.js';
|
|
4
|
+
import Card from './components/Card.js';
|
|
5
|
+
export { Board, Tag, Lane, Card };
|
|
6
|
+
export type { BoardProps, BoardData, LaneData, CardData, TagData, EventBus, EventBusEvent, KanbanComponents, CardComponentProps, NewCardComponentProps, LaneHeaderComponentProps, NewLaneComponentProps, } from './types/index.js';
|
|
7
|
+
export default Board;
|