ngx-virtual-dnd 3.2.0 → 3.2.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/package.json
CHANGED
|
@@ -49,9 +49,13 @@ interface DragState {
|
|
|
49
49
|
sourceIndex: number | null;
|
|
50
50
|
/** ID of the droppable currently being hovered over */
|
|
51
51
|
activeDroppableId: string | null;
|
|
52
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* `END_OF_LIST` while a droppable is targeted, otherwise null.
|
|
54
|
+
* @deprecated It never identifies an item. Use `placeholderIndex`. Will be removed in the next
|
|
55
|
+
* major version.
|
|
56
|
+
*/
|
|
53
57
|
placeholderId: string | null;
|
|
54
|
-
/** Index where the placeholder should be inserted
|
|
58
|
+
/** Index where the placeholder should be inserted */
|
|
55
59
|
placeholderIndex: number | null;
|
|
56
60
|
/** Current cursor position */
|
|
57
61
|
cursorPosition: CursorPosition | null;
|
|
@@ -100,7 +104,11 @@ interface DropSource {
|
|
|
100
104
|
interface DropDestination {
|
|
101
105
|
/** ID of the droppable container receiving the item */
|
|
102
106
|
droppableId: string;
|
|
103
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* The library always sets `END_OF_LIST`.
|
|
109
|
+
* @deprecated It never identifies an item. Use `index` for the insertion position. Will be
|
|
110
|
+
* removed in the next major version.
|
|
111
|
+
*/
|
|
104
112
|
placeholderId: string;
|
|
105
113
|
/** Target index in the destination list */
|
|
106
114
|
index: number;
|
|
@@ -150,7 +158,9 @@ interface DragEndEvent {
|
|
|
150
158
|
/** ID of the droppable container the item originated from */
|
|
151
159
|
droppableId: string;
|
|
152
160
|
/**
|
|
153
|
-
* Whether the drag was
|
|
161
|
+
* Whether the drag was cancelled: Escape, Tab during a keyboard drag, or, during a pointer
|
|
162
|
+
* drag, the window losing focus, the page being hidden or the system cancelling the touch
|
|
163
|
+
* (`touchcancel`). Releasing over no valid
|
|
154
164
|
* target (outside any droppable, or over a disabled droppable) is NOT a cancel —
|
|
155
165
|
* it reports `cancelled: false` with `destinationIndex: null`. Branch on
|
|
156
166
|
* `destinationIndex === null` to detect "no drop occurred".
|
|
@@ -172,7 +182,10 @@ interface DragEndEvent {
|
|
|
172
182
|
*/
|
|
173
183
|
declare const INITIAL_DRAG_STATE: DragState;
|
|
174
184
|
/**
|
|
175
|
-
*
|
|
185
|
+
* The value of every `placeholderId` the library sets. Positions are reported as indexes
|
|
186
|
+
* (`placeholderIndex`, `DropDestination.index`).
|
|
187
|
+
* @deprecated Goes with the deprecated `placeholderId` fields. Use the indexes. Will be removed in
|
|
188
|
+
* the next major version.
|
|
176
189
|
*/
|
|
177
190
|
declare const END_OF_LIST = "END_OF_LIST";
|
|
178
191
|
|
|
@@ -408,7 +421,11 @@ declare class DragStateService {
|
|
|
408
421
|
readonly sourceIndex: _angular_core.Signal<number | null>;
|
|
409
422
|
/** ID of the droppable currently being hovered over */
|
|
410
423
|
readonly activeDroppableId: _angular_core.Signal<string | null>;
|
|
411
|
-
/**
|
|
424
|
+
/**
|
|
425
|
+
* `END_OF_LIST` while a droppable is targeted, otherwise null.
|
|
426
|
+
* @deprecated It never identifies an item. Use `placeholderIndex`. Will be removed in the next
|
|
427
|
+
* major version.
|
|
428
|
+
*/
|
|
412
429
|
readonly placeholderId: _angular_core.Signal<string | null>;
|
|
413
430
|
/** Index where the placeholder should be inserted */
|
|
414
431
|
readonly placeholderIndex: _angular_core.Signal<number | null>;
|
|
@@ -427,10 +444,12 @@ declare class DragStateService {
|
|
|
427
444
|
constructor();
|
|
428
445
|
/**
|
|
429
446
|
* Start a drag operation.
|
|
447
|
+
* `placeholderId` is deprecated with the `placeholderId` signal; the library passes `END_OF_LIST`.
|
|
430
448
|
*/
|
|
431
449
|
startDrag(item: DraggedItem, cursorPosition?: CursorPosition, grabOffset?: GrabOffset, lockAxis?: 'x' | 'y' | null, activeDroppableId?: string | null, placeholderId?: string | null, placeholderIndex?: number | null, sourceIndex?: number | null, isKeyboardDrag?: boolean, axisLockPosition?: CursorPosition): void;
|
|
432
450
|
/**
|
|
433
451
|
* Update the drag position and targets.
|
|
452
|
+
* `placeholderId` is deprecated with the `placeholderId` signal; the library passes `END_OF_LIST`.
|
|
434
453
|
*/
|
|
435
454
|
updateDragPosition(update: {
|
|
436
455
|
cursorPosition: CursorPosition;
|
|
@@ -443,7 +462,9 @@ declare class DragStateService {
|
|
|
443
462
|
*/
|
|
444
463
|
setActiveDroppable(droppableId: string | null): void;
|
|
445
464
|
/**
|
|
446
|
-
* Update just the placeholder
|
|
465
|
+
* Update just the placeholder ID.
|
|
466
|
+
* @deprecated Sets only the deprecated `placeholderId`. Will be removed in the next major
|
|
467
|
+
* version.
|
|
447
468
|
*/
|
|
448
469
|
setPlaceholder(placeholderId: string | null): void;
|
|
449
470
|
/**
|
|
@@ -452,6 +473,7 @@ declare class DragStateService {
|
|
|
452
473
|
* Used by the autoscroll scroll-only fast path: when a scroll fires, the cursor has not
|
|
453
474
|
* moved, so only the placeholder index needs recalculation. Skipping the cursor and
|
|
454
475
|
* active-droppable writes avoids spurious re-evaluation of computeds that read those signals.
|
|
476
|
+
* `placeholderId` is deprecated with the `placeholderId` signal; the library passes `END_OF_LIST`.
|
|
455
477
|
*/
|
|
456
478
|
updateScrollOnlyPlaceholder(placeholderId: string | null, placeholderIndex: number | null): void;
|
|
457
479
|
/**
|
|
@@ -1503,7 +1525,11 @@ declare class DroppableDirective implements OnDestroy {
|
|
|
1503
1525
|
placeholderMove: _angular_core.OutputEmitterRef<PlaceholderMoveEvent>;
|
|
1504
1526
|
/** Whether this droppable is currently being targeted */
|
|
1505
1527
|
readonly isActive: _angular_core.Signal<boolean>;
|
|
1506
|
-
/**
|
|
1528
|
+
/**
|
|
1529
|
+
* `END_OF_LIST` while this droppable is active, otherwise null.
|
|
1530
|
+
* @deprecated It never identifies an item. For the position, use the `placeholderMove` output
|
|
1531
|
+
* (and `DropEvent.destination.index` on drop). Will be removed in the next major version.
|
|
1532
|
+
*/
|
|
1507
1533
|
readonly placeholderId: _angular_core.Signal<string | null>;
|
|
1508
1534
|
constructor();
|
|
1509
1535
|
ngOnDestroy(): void;
|