@danxbot/ui 20.12.2 → 20.13.1
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/index.js +9786 -9761
- package/dist/index.js.map +1 -1
- package/dist/types/components/Board.d.ts +8 -1
- package/dist/types/components/board/context.d.ts +9 -0
- package/dist/types/components/board/recipe.d.ts +3 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/board/types.d.ts +12 -0
- package/package.json +1 -1
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import type { AutoScrollOptions, DragStrings } from "../lib/dnd";
|
|
3
3
|
import type { BoardColumnModel, BoardItemId, UseBoardOptions, UseBoardResult } from "../lib/board";
|
|
4
|
+
import { type BoardReorderLabels } from "./board/context";
|
|
4
5
|
export interface BoardProps<T> extends UseBoardOptions<T> {
|
|
5
6
|
/** Forwarded to `DragDrop` — announcement grammar, localisation. */
|
|
6
7
|
strings?: Partial<DragStrings>;
|
|
8
|
+
/**
|
|
9
|
+
* DX-4575: the words for each card menu's two within-column items. Partial,
|
|
10
|
+
* so a consumer renames one and keeps the other. Omitted, "Move to top" and
|
|
11
|
+
* "Move to bottom".
|
|
12
|
+
*/
|
|
13
|
+
reorderLabels?: Partial<BoardReorderLabels>;
|
|
7
14
|
/** Forwarded to `DragDrop` — see its own doc; cannot be turned off. */
|
|
8
15
|
autoScroll?: AutoScrollOptions;
|
|
9
16
|
className?: string;
|
|
@@ -42,7 +49,7 @@ export interface BoardProps<T> extends UseBoardOptions<T> {
|
|
|
42
49
|
* returns. */
|
|
43
50
|
children: (board: UseBoardResult<T>) => ReactNode;
|
|
44
51
|
}
|
|
45
|
-
export declare function Board<T>({ items, columns, accessors, validateMove, onMove, selection, strings, autoScroll, className, columnsClassName, renderDragging, children, }: BoardProps<T>): import("react").JSX.Element;
|
|
52
|
+
export declare function Board<T>({ items, columns, accessors, validateMove, onMove, selection, strings, reorderLabels, autoScroll, className, columnsClassName, renderDragging, children, }: BoardProps<T>): import("react").JSX.Element;
|
|
46
53
|
export interface BoardCardSurfaceProps {
|
|
47
54
|
className?: string;
|
|
48
55
|
children?: ReactNode;
|
|
@@ -21,7 +21,16 @@ export interface BoardContextValue<T> {
|
|
|
21
21
|
* convention.
|
|
22
22
|
*/
|
|
23
23
|
requestMove: (request: BoardMoveRequest) => BoardMoveVerdict;
|
|
24
|
+
/** The words for the card menu's within-column items (`Board`'s `reorderLabels`). */
|
|
25
|
+
reorderLabels: BoardReorderLabels;
|
|
24
26
|
}
|
|
27
|
+
/** The card menu's within-column items. DX-4575: a consumer that calls moving inside a list something else renames them. */
|
|
28
|
+
export interface BoardReorderLabels {
|
|
29
|
+
toTop: string;
|
|
30
|
+
toBottom: string;
|
|
31
|
+
}
|
|
32
|
+
/** What the menu says when `Board` is given no `reorderLabels`. */
|
|
33
|
+
export declare const DEFAULT_REORDER_LABELS: BoardReorderLabels;
|
|
25
34
|
export interface BoardColumnContextValue {
|
|
26
35
|
columnId: BoardColumnId;
|
|
27
36
|
label: string;
|
|
@@ -27,6 +27,7 @@ export declare const board: import("tailwind-variants").TVReturnType<{
|
|
|
27
27
|
empty: string;
|
|
28
28
|
handleCluster: string;
|
|
29
29
|
menuTrigger: string[];
|
|
30
|
+
reorderLocked: string[];
|
|
30
31
|
rejection: string[];
|
|
31
32
|
}, undefined, {
|
|
32
33
|
overWip: {
|
|
@@ -57,6 +58,7 @@ export declare const board: import("tailwind-variants").TVReturnType<{
|
|
|
57
58
|
empty: string;
|
|
58
59
|
handleCluster: string;
|
|
59
60
|
menuTrigger: string[];
|
|
61
|
+
reorderLocked: string[];
|
|
60
62
|
rejection: string[];
|
|
61
63
|
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
62
64
|
overWip: {
|
|
@@ -87,5 +89,6 @@ export declare const board: import("tailwind-variants").TVReturnType<{
|
|
|
87
89
|
empty: string;
|
|
88
90
|
handleCluster: string;
|
|
89
91
|
menuTrigger: string[];
|
|
92
|
+
reorderLocked: string[];
|
|
90
93
|
rejection: string[];
|
|
91
94
|
}>>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ export { DragDrop, DragDropContainer, DragDropItem, DragDropHandle, DragDropSurf
|
|
|
113
113
|
export { KanbanBoard, type KanbanBoardProps, type KanbanLane, type KanbanMove, type KanbanRefusal, } from "./components/kanban/KanbanBoard";
|
|
114
114
|
export { DEFAULT_DRAG_STRINGS, DRAG_INSTRUCTIONS_ID, DragInstructions, DragLiveRegion, DragSession, DragSessionProvider, applyMove, attachAutoScroll, attachKeyboardSensor, attachPointerSensor, attachSessionWindowListeners, isNoOp, resolveTarget, sameTarget, scrollVelocity, useCreateDragSession, useDragAnnouncements, useDragSession, useDragState, useDragLive, useDraggable, useDropContainer, type ContainerId, type DragAxis, type DragCancelEvent, type DragEndEvent, type DragId, type DragMode, type DragPhase, type DragSessionCallbacks, type DragStartEvent, type DragState, type AutoScrollOptions, type DragAnnouncementContext, type DragAnnouncementOptions, type DragAnnouncements, type DragInstructionsProps, type DragLiveRegionProps, type DragStrings, type DropTarget, type KeyboardSensorOptions, type PointerActivation, } from "./lib/dnd";
|
|
115
115
|
export { Board, BoardColumn, BoardCard, BoardCardSurface, type BoardProps, type BoardColumnProps, type BoardCardProps, type BoardCardSurfaceProps, } from "./components/Board";
|
|
116
|
+
export type { BoardReorderLabels } from "./components/board/context";
|
|
116
117
|
export { buildBoardModel, resolveMove, applyBoardMoves, useBoard, moveAnchor, columnLength, positionInColumn, type BoardModel, type MoveAnchor, type UseBoardResult, } from "./lib/board";
|
|
117
118
|
export type { BoardAccessors, BoardColumnDef, BoardEdge, BoardColumnId, BoardColumnModel, BoardItemId, BoardMove, BoardMoveRequest, BoardMoveSource, BoardMoveVerdict, UseBoardOptions, } from "./lib/board";
|
|
118
119
|
export { PagedWindowList, type PagedWindowItemPosition, type PagedWindowListProps, type PagedWindowStrings, } from "./components/PagedWindowList";
|
|
@@ -94,6 +94,16 @@ export interface BoardColumnDef {
|
|
|
94
94
|
* of the column. @default 0
|
|
95
95
|
*/
|
|
96
96
|
offset?: number;
|
|
97
|
+
/**
|
|
98
|
+
* DX-4575: turns OFF reordering inside this column, and is the sentence shown
|
|
99
|
+
* in it while a card from it is dragged over it. Moves to and from OTHER
|
|
100
|
+
* columns are untouched. Text, not a boolean: supplying it is what turns the
|
|
101
|
+
* rule on, and the consumer owns the words (a column sorted by something its
|
|
102
|
+
* order cannot express, say, would tell the person what to sort by first).
|
|
103
|
+
* Enforced in `resolveMove`, so the drag, the keyboard, the menu and a bulk
|
|
104
|
+
* move all obey it, and the menu stops offering the within-column items.
|
|
105
|
+
*/
|
|
106
|
+
reorderLocked?: string;
|
|
97
107
|
}
|
|
98
108
|
/**
|
|
99
109
|
* Where a move lands beyond what is loaded. In a windowed column `to.index` can
|
|
@@ -174,6 +184,8 @@ export interface BoardColumnModel<T> {
|
|
|
174
184
|
wipLimit: number | undefined;
|
|
175
185
|
/** `true` when `count` exceeds `wipLimit`. Always false with no limit set, and while `counting`. */
|
|
176
186
|
overWip: boolean;
|
|
187
|
+
/** The definition's `reorderLocked` sentence; `undefined` when the column can be reordered. */
|
|
188
|
+
reorderLocked: string | undefined;
|
|
177
189
|
}
|
|
178
190
|
export interface UseBoardOptions<T> {
|
|
179
191
|
items: readonly T[];
|