ngx-kit 9.2.0 → 9.2.2
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
|
@@ -81,6 +81,8 @@ declare class DropListRef<T = any> {
|
|
|
81
81
|
parentList: DropListRef<any> | null;
|
|
82
82
|
readonly childLists: Set<DropListRef<any>>;
|
|
83
83
|
private session;
|
|
84
|
+
/** Main axis of this list: the measured one while sorting, else a CSS-based guess. */
|
|
85
|
+
getAxis(): 'x' | 'y' | 'grid';
|
|
84
86
|
private placeholder?;
|
|
85
87
|
customPlaceholder?: PlaceHolderRef;
|
|
86
88
|
private activeDrag;
|
|
@@ -306,6 +308,15 @@ declare class DragRef<T = unknown> {
|
|
|
306
308
|
pointerDown(pointer: IPosition): void;
|
|
307
309
|
startDrag(pointer: IPosition): void;
|
|
308
310
|
dragMove(pointer: IPosition): void;
|
|
311
|
+
/**
|
|
312
|
+
* Keyboard sorting for list items: jump by whole SLOTS instead of pixels (an 8px step can
|
|
313
|
+
* never cross the centre of a 190px card), and hop to the neighbouring connected list when the
|
|
314
|
+
* edge of the current one is reached — Left/Right between kanban columns, Up/Down between
|
|
315
|
+
* the sections of a column. Returns `false` for free drags (use `nudge`).
|
|
316
|
+
*/
|
|
317
|
+
nudgeToSlot(direction: 'up' | 'down' | 'left' | 'right'): boolean;
|
|
318
|
+
private neighbourSlot;
|
|
319
|
+
private neighbourList;
|
|
309
320
|
nudge(dx: number, dy: number): void;
|
|
310
321
|
endDrag(): void;
|
|
311
322
|
cancelDrag(): void;
|
|
@@ -674,11 +685,14 @@ declare function adjustForZoom(value: number, element?: HTMLElement): number;
|
|
|
674
685
|
*/
|
|
675
686
|
declare class AutoScroller {
|
|
676
687
|
private raf;
|
|
677
|
-
|
|
688
|
+
/** Nearest scroller per axis: a kanban column scrolls vertically while its BOARD scrolls horizontally. */
|
|
689
|
+
private containerX;
|
|
690
|
+
private containerY;
|
|
678
691
|
private win?;
|
|
679
692
|
/** Document the pointer coordinates (`update(x, y)`) are expressed in. */
|
|
680
693
|
private pointerDoc?;
|
|
681
694
|
private speed;
|
|
695
|
+
private carry;
|
|
682
696
|
private onTick?;
|
|
683
697
|
private readonly edge;
|
|
684
698
|
private readonly maxSpeed;
|
|
@@ -688,10 +702,15 @@ declare class AutoScroller {
|
|
|
688
702
|
/** فقط container را عوض میکند بدون قطع حلقهی در حال اجرا یا صفر کردن speed. */
|
|
689
703
|
retarget(fromEl: HTMLElement): void;
|
|
690
704
|
update(clientX: number, clientY: number): void;
|
|
705
|
+
private axisSpeed;
|
|
691
706
|
stop(): void;
|
|
707
|
+
/** Scrolls one container by a speed measured in viewport pixels (carrying sub-pixel remainders). */
|
|
708
|
+
private scrollContainer;
|
|
692
709
|
private tick;
|
|
693
710
|
}
|
|
694
711
|
declare function findScrollableAncestor(el: HTMLElement): HTMLElement | Window;
|
|
712
|
+
/** Nearest ancestor that can scroll along ONE axis (`<html>`/`<body>` resolve to the window). */
|
|
713
|
+
declare function findScrollableAncestorForAxis(el: HTMLElement, axis: 'x' | 'y'): HTMLElement | Window;
|
|
695
714
|
declare function getScrollPosition(container: HTMLElement | Window): {
|
|
696
715
|
left: number;
|
|
697
716
|
top: number;
|
|
@@ -731,5 +750,5 @@ declare function stripEditorArtifacts(root: Element, options?: StripOptions): vo
|
|
|
731
750
|
/** Serialised, editor-free HTML of `el`'s children (the canvas content). */
|
|
732
751
|
declare function getCleanHtml(el: Element, options?: StripOptions): string;
|
|
733
752
|
|
|
734
|
-
export { AutoScroller, DragDropService, DragRef, DropListGroupRef, DropListRef, NGX_DRAGGABLE, NGX_DRAG_PREVIEW, NGX_DROPLIST, NGX_DROPLIST_GROUP, NGX_PLACEHOLDER, NgxDragPreview, NgxDraggable, NgxDropList, NgxDropListGroup, NgxPlaceholder, NgxResizable, PlaceHolderRef, adjustForZoom, checkBoundX, checkBoundY, clampResizeWithinBoundary, copyArrayItem, findScrollableAncestor, getCleanHtml, getPageZoom, getScrollPosition, isRtl, moveItemInArray, resolveLogicalDirection, stripEditorArtifacts, transferArrayItem };
|
|
753
|
+
export { AutoScroller, DragDropService, DragRef, DropListGroupRef, DropListRef, NGX_DRAGGABLE, NGX_DRAG_PREVIEW, NGX_DROPLIST, NGX_DROPLIST_GROUP, NGX_PLACEHOLDER, NgxDragPreview, NgxDraggable, NgxDropList, NgxDropListGroup, NgxPlaceholder, NgxResizable, PlaceHolderRef, adjustForZoom, checkBoundX, checkBoundY, clampResizeWithinBoundary, copyArrayItem, findScrollableAncestor, findScrollableAncestorForAxis, getCleanHtml, getPageZoom, getScrollPosition, isRtl, moveItemInArray, resolveLogicalDirection, stripEditorArtifacts, transferArrayItem };
|
|
735
754
|
export type { DragAxis, IDropEvent, IPosition, IResizableOutput, LogicalResizeDirection, ResizeDirection, StripOptions };
|