@tft/interact 21.0.7 → 21.1.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/README.md +317 -22
- package/fesm2022/tft-interact.mjs +244 -390
- package/fesm2022/tft-interact.mjs.map +1 -1
- package/package.json +1 -1
- package/types/tft-interact.d.ts +112 -116
package/types/tft-interact.d.ts
CHANGED
|
@@ -1,50 +1,49 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { OnInit,
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnInit, ElementRef, TemplateRef, InjectionToken, OnDestroy, AfterViewInit, PipeTransform, ModuleWithProviders, EmbeddedViewRef } from '@angular/core';
|
|
3
3
|
import * as _interactjs_core_Interactable from '@interactjs/core/Interactable';
|
|
4
|
+
import * as _interactjs_types_index from '@interactjs/types/index';
|
|
4
5
|
import { DropzoneOptions, Interactable, DraggableOptions, ResizableOptions, ResizeEvent, GesturableOptions } from '@interactjs/types/index';
|
|
5
6
|
import { Observable, Subject, BehaviorSubject } from 'rxjs';
|
|
6
7
|
import { Point, DropEvent, Interactable as Interactable$1, DragEvent, ResizeEvent as ResizeEvent$1, GestureEvent } from '@interactjs/types';
|
|
7
|
-
import * as i12 from '@angular/common';
|
|
8
8
|
|
|
9
9
|
type PositionOption = 'relative' | 'absolute' | 'fixed' | 'static' | 'sticky' | 'unset' | 'inherit' | 'initial' | 'revert';
|
|
10
|
-
declare class DropzoneDirective implements OnInit
|
|
10
|
+
declare class DropzoneDirective implements OnInit {
|
|
11
11
|
el: ElementRef<any>;
|
|
12
12
|
private renderer;
|
|
13
13
|
private interactService;
|
|
14
14
|
private account_for_scale_dir;
|
|
15
|
-
dropzoneId: string
|
|
16
|
-
dropzoneConfig: DropzoneOptions
|
|
17
|
-
dropzoneData: any
|
|
18
|
-
position: PositionOption
|
|
19
|
-
dropActivate:
|
|
20
|
-
dragEnter:
|
|
21
|
-
dragLeave:
|
|
22
|
-
dragDrop:
|
|
15
|
+
dropzoneId: _angular_core.InputSignal<string>;
|
|
16
|
+
dropzoneConfig: _angular_core.InputSignal<DropzoneOptions>;
|
|
17
|
+
dropzoneData: _angular_core.InputSignal<any>;
|
|
18
|
+
position: _angular_core.InputSignal<PositionOption>;
|
|
19
|
+
dropActivate: _angular_core.OutputEmitterRef<TftDropEvent>;
|
|
20
|
+
dragEnter: _angular_core.OutputEmitterRef<TftDropEvent>;
|
|
21
|
+
dragLeave: _angular_core.OutputEmitterRef<TftDropEvent>;
|
|
22
|
+
dragDrop: _angular_core.OutputEmitterRef<TftDropEvent>;
|
|
23
23
|
dropzone: Interactable;
|
|
24
|
-
|
|
24
|
+
/** The actual registered ID — may differ from the dropzoneId input if none was provided. Drives [id] host binding. */
|
|
25
|
+
_registeredId: _angular_core.WritableSignal<string>;
|
|
26
|
+
scale: _angular_core.Signal<number>;
|
|
25
27
|
ngOnInit(): void;
|
|
26
|
-
|
|
28
|
+
constructor();
|
|
27
29
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
* @param dropzoneConfig the interact configuration to use when connecting
|
|
31
|
-
*/
|
|
30
|
+
* Connects element to interact's dropzone events and returns a reference to the interactable
|
|
31
|
+
*/
|
|
32
32
|
connectDropzoneEvents(nativeElement: any, dropzoneConfig: DropzoneOptions): _interactjs_core_Interactable.Interactable;
|
|
33
33
|
/**
|
|
34
34
|
* Maps the drop event emitted by interact to something a little easier to use
|
|
35
|
-
* @param event the drop event emitted by interact, extended with extra fields we added to
|
|
36
35
|
*/
|
|
37
36
|
mapDropzoneEvent(event: NgDropEvent): TftDropEvent;
|
|
38
|
-
static ɵfac:
|
|
39
|
-
static ɵdir:
|
|
37
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DropzoneDirective, never>;
|
|
38
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DropzoneDirective, "[tftDropzone]", never, { "dropzoneId": { "alias": "dropzoneId"; "required": false; "isSignal": true; }; "dropzoneConfig": { "alias": "dropzoneConfig"; "required": false; "isSignal": true; }; "dropzoneData": { "alias": "dropzoneData"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; }, { "dropActivate": "dropActivate"; "dragEnter": "dragEnter"; "dragLeave": "dragLeave"; "dragDrop": "dragDrop"; }, never, never, true, never>;
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
declare const TFT_DRAG_PREVIEW: InjectionToken<DragPreviewDirective<any>>;
|
|
43
42
|
declare class DragPreviewDirective<T = any> {
|
|
44
43
|
templateRef: TemplateRef<T>;
|
|
45
|
-
dragData: T
|
|
46
|
-
static ɵfac:
|
|
47
|
-
static ɵdir:
|
|
44
|
+
dragData: _angular_core.InputSignal<T>;
|
|
45
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DragPreviewDirective<any>, never>;
|
|
46
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DragPreviewDirective<any>, "ng-template[tftDragPreview]", never, { "dragData": { "alias": "dragData"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
/**
|
|
@@ -55,9 +54,9 @@ declare class DragPreviewDirective<T = any> {
|
|
|
55
54
|
*/
|
|
56
55
|
declare class AccountForScaleDirective {
|
|
57
56
|
el: ElementRef<any>;
|
|
58
|
-
scale: number
|
|
59
|
-
static ɵfac:
|
|
60
|
-
static ɵdir:
|
|
57
|
+
scale: _angular_core.InputSignal<number>;
|
|
58
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccountForScaleDirective, never>;
|
|
59
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AccountForScaleDirective, "[tftAccountForScale]", never, { "scale": { "alias": "scale"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
61
60
|
}
|
|
62
61
|
|
|
63
62
|
/**
|
|
@@ -68,43 +67,42 @@ declare class AccountForScaleDirective {
|
|
|
68
67
|
declare class DragRootDirective {
|
|
69
68
|
el: ElementRef<any>;
|
|
70
69
|
account_for_scale_dir?: AccountForScaleDirective;
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
private _suppressNextClick;
|
|
71
|
+
/**
|
|
72
|
+
* Called by DraggableDirective on dragend to suppress the spurious click that
|
|
73
|
+
* fires when the drag clone (appended as a direct child of this element) receives
|
|
74
|
+
* the pointerup and bubbles a click event up to this element.
|
|
75
|
+
*/
|
|
76
|
+
suppressNextClick(): void;
|
|
77
|
+
onRootClick(event: MouseEvent): void;
|
|
78
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DragRootDirective, never>;
|
|
79
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DragRootDirective, "[tftDragRoot]", ["tftDragRoot"], {}, {}, never, never, true, never>;
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
interface ScrollObject {
|
|
76
83
|
scrollTop: number;
|
|
77
84
|
scrollLeft: number;
|
|
78
85
|
}
|
|
79
|
-
/**
|
|
80
|
-
* Use to apply scale to the element and tell the drag and resize directives to account for the scale when
|
|
81
|
-
* @example <div tftAccountForScale [scale]="2.5"> <div tftDraggable> </div> </div>
|
|
82
|
-
* @note if `dragRoot` is used this directive should be used on the same element to ensure that the drag
|
|
83
|
-
* element accounts for scale
|
|
84
|
-
*/
|
|
85
86
|
declare class AutoScrollDirective {
|
|
86
87
|
el: ElementRef<any>;
|
|
87
|
-
|
|
88
|
-
* Limit minimum time between scroll events in milliseconds
|
|
89
|
-
*/
|
|
90
|
-
autoScrollConfig: {
|
|
88
|
+
autoScrollConfig: _angular_core.InputSignal<{
|
|
91
89
|
margin: number;
|
|
92
90
|
distance: number;
|
|
93
91
|
interval: number;
|
|
94
92
|
speed: number;
|
|
95
93
|
enabled: boolean;
|
|
96
|
-
}
|
|
94
|
+
}>;
|
|
97
95
|
private scrollSubject;
|
|
98
96
|
readonly scrollObserver: Observable<ScrollObject>;
|
|
99
97
|
readonly scrollDeltaObserver: Subject<ScrollObject>;
|
|
100
98
|
scroll(scrollEvent: Event): void;
|
|
101
99
|
constructor();
|
|
102
|
-
static ɵfac:
|
|
103
|
-
static ɵdir:
|
|
100
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AutoScrollDirective, never>;
|
|
101
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AutoScrollDirective, "[tftAutoScroll]", never, { "autoScrollConfig": { "alias": "autoScrollConfig"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
104
102
|
}
|
|
105
103
|
|
|
106
104
|
/** @dynamic */
|
|
107
|
-
declare class DraggableDirective<D = any> implements OnInit,
|
|
105
|
+
declare class DraggableDirective<D = any> implements OnInit, OnDestroy, AfterViewInit {
|
|
108
106
|
el: ElementRef<any>;
|
|
109
107
|
private interactService;
|
|
110
108
|
private renderer;
|
|
@@ -114,32 +112,33 @@ declare class DraggableDirective<D = any> implements OnInit, OnChanges, OnDestro
|
|
|
114
112
|
dropzone_dir?: DropzoneDirective;
|
|
115
113
|
drag_root_dir?: DragRootDirective;
|
|
116
114
|
auto_scroll_dir?: AutoScrollDirective;
|
|
117
|
-
x: number
|
|
118
|
-
y: number
|
|
119
|
-
|
|
115
|
+
x: _angular_core.InputSignal<number>;
|
|
116
|
+
y: _angular_core.InputSignal<number>;
|
|
117
|
+
/** zIndex while dragging */
|
|
118
|
+
dragZIndex: _angular_core.InputSignal<number>;
|
|
120
119
|
/** zIndex while at rest */
|
|
121
|
-
zIndex: number
|
|
120
|
+
zIndex: _angular_core.InputSignal<number>;
|
|
122
121
|
interactableId: string;
|
|
123
|
-
dragData: D
|
|
124
|
-
enableDragDefault: boolean
|
|
122
|
+
dragData: _angular_core.InputSignal<D>;
|
|
123
|
+
enableDragDefault: _angular_core.InputSignal<boolean>;
|
|
125
124
|
/**
|
|
126
125
|
* @deprecated replaced by 'dragDisabled' property, please migrate before v13
|
|
127
126
|
*/
|
|
128
|
-
disabled: boolean
|
|
129
|
-
dragDisabled: boolean
|
|
130
|
-
dragConfig: Partial<
|
|
131
|
-
showPlaceholder: boolean
|
|
127
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
128
|
+
dragDisabled: _angular_core.InputSignal<boolean>;
|
|
129
|
+
dragConfig: _angular_core.InputSignal<Partial<_interactjs_types_index.OrBoolean<DraggableOptions>>>;
|
|
130
|
+
showPlaceholder: _angular_core.InputSignal<boolean>;
|
|
132
131
|
/**
|
|
133
132
|
* The element we want to prepend the drag element to.
|
|
134
133
|
* Use `tftDragRoot` directive on a parent element to set custom root element
|
|
135
134
|
* @default document.body
|
|
136
135
|
*/
|
|
137
|
-
dragRoot: DragRootDirective
|
|
136
|
+
dragRoot: _angular_core.InputSignal<DragRootDirective>;
|
|
138
137
|
private dragRootEl;
|
|
139
|
-
dragStart:
|
|
140
|
-
dragMove:
|
|
141
|
-
dragInertiaStart:
|
|
142
|
-
dragEnd:
|
|
138
|
+
dragStart: _angular_core.OutputEmitterRef<TftDragEvent>;
|
|
139
|
+
dragMove: _angular_core.OutputEmitterRef<TftDragEvent>;
|
|
140
|
+
dragInertiaStart: _angular_core.OutputEmitterRef<TftDragEvent>;
|
|
141
|
+
dragEnd: _angular_core.OutputEmitterRef<TftDragEvent>;
|
|
143
142
|
_previewTemplate: DragPreviewDirective;
|
|
144
143
|
interactableState: Observable<TftCoords>;
|
|
145
144
|
interactable: Interactable;
|
|
@@ -147,10 +146,11 @@ declare class DraggableDirective<D = any> implements OnInit, OnChanges, OnDestro
|
|
|
147
146
|
private interactableSubscription;
|
|
148
147
|
private scrollEventsSubscription;
|
|
149
148
|
previewRef: TftDragElement;
|
|
150
|
-
|
|
149
|
+
scale: _angular_core.Signal<number>;
|
|
150
|
+
syncPosition: _angular_core.EffectRef;
|
|
151
|
+
syncDragConfig: _angular_core.EffectRef;
|
|
151
152
|
ngOnInit(): void;
|
|
152
|
-
|
|
153
|
-
setDragConfig(): void;
|
|
153
|
+
setDragConfig(config: Partial<Interact.OrBoolean<DraggableOptions>>, enabled: boolean): void;
|
|
154
154
|
ngAfterViewInit(): void;
|
|
155
155
|
ngOnDestroy(): void;
|
|
156
156
|
dragMoveListener(event: NgDragEvent, element: Interact.Element): void;
|
|
@@ -163,12 +163,12 @@ declare class DraggableDirective<D = any> implements OnInit, OnChanges, OnDestro
|
|
|
163
163
|
isNumeric(num: number): boolean;
|
|
164
164
|
initiateDragEvents(dragConfig: Partial<Interact.OrBoolean<DraggableOptions>>, nativeElement: HTMLElement): _interactjs_core_Interactable.Interactable;
|
|
165
165
|
subscribeToScrollEvents(): void;
|
|
166
|
-
static ɵfac:
|
|
167
|
-
static ɵdir:
|
|
166
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DraggableDirective<any>, never>;
|
|
167
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DraggableDirective<any>, "[tftDraggable]", never, { "x": { "alias": "x"; "required": false; "isSignal": true; }; "y": { "alias": "y"; "required": false; "isSignal": true; }; "dragZIndex": { "alias": "dragZIndex"; "required": false; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "dragData": { "alias": "dragData"; "required": false; "isSignal": true; }; "enableDragDefault": { "alias": "enableDragDefault"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "dragDisabled": { "alias": "dragDisabled"; "required": false; "isSignal": true; }; "dragConfig": { "alias": "dragConfig"; "required": false; "isSignal": true; }; "showPlaceholder": { "alias": "showPlaceholder"; "required": false; "isSignal": true; }; "dragRoot": { "alias": "dragRoot"; "required": false; "isSignal": true; }; }, { "dragStart": "dragStart"; "dragMove": "dragMove"; "dragInertiaStart": "dragInertiaStart"; "dragEnd": "dragEnd"; }, ["_previewTemplate"], never, true, never>;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
/** @dynamic */
|
|
171
|
-
declare class ResizableDirective implements OnInit, OnDestroy
|
|
171
|
+
declare class ResizableDirective implements OnInit, OnDestroy {
|
|
172
172
|
el: ElementRef<any>;
|
|
173
173
|
private _document;
|
|
174
174
|
private interactService;
|
|
@@ -178,73 +178,64 @@ declare class ResizableDirective implements OnInit, OnDestroy, OnChanges {
|
|
|
178
178
|
private draggable_dir;
|
|
179
179
|
private dropzone_dir;
|
|
180
180
|
auto_scroll_dir?: AutoScrollDirective;
|
|
181
|
-
enableResizeDefault: boolean
|
|
182
|
-
position: string
|
|
183
|
-
resizeConfig: Partial<
|
|
184
|
-
interactableId: string
|
|
185
|
-
width: number
|
|
186
|
-
height: number
|
|
187
|
-
resizeDisabled: boolean
|
|
188
|
-
resizeStart:
|
|
189
|
-
resizeMove:
|
|
190
|
-
resizeInertiaStart:
|
|
191
|
-
resizeEnd:
|
|
181
|
+
enableResizeDefault: _angular_core.InputSignal<boolean>;
|
|
182
|
+
position: _angular_core.InputSignal<string>;
|
|
183
|
+
resizeConfig: _angular_core.InputSignal<Partial<_interactjs_types_index.OrBoolean<ResizableOptions>>>;
|
|
184
|
+
interactableId: _angular_core.InputSignal<string>;
|
|
185
|
+
width: _angular_core.InputSignal<number>;
|
|
186
|
+
height: _angular_core.InputSignal<number>;
|
|
187
|
+
resizeDisabled: _angular_core.InputSignal<boolean>;
|
|
188
|
+
resizeStart: _angular_core.OutputEmitterRef<TftResizeEvent>;
|
|
189
|
+
resizeMove: _angular_core.OutputEmitterRef<TftResizeEvent>;
|
|
190
|
+
resizeInertiaStart: _angular_core.OutputEmitterRef<TftResizeEvent>;
|
|
191
|
+
resizeEnd: _angular_core.OutputEmitterRef<TftResizeEvent>;
|
|
192
192
|
defaultConfig: Partial<Interact.OrBoolean<ResizableOptions>>;
|
|
193
193
|
registryId: string;
|
|
194
194
|
interactable: Interactable;
|
|
195
195
|
dragRootEl: HTMLElement;
|
|
196
|
+
_interactableId: string;
|
|
196
197
|
private activeEdges;
|
|
197
198
|
private interactableSubscription;
|
|
198
199
|
private scrollEventsSubscription;
|
|
199
|
-
|
|
200
|
+
scale: _angular_core.Signal<number>;
|
|
200
201
|
constructor();
|
|
201
202
|
ngOnInit(): void;
|
|
202
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
203
203
|
ngOnDestroy(): void;
|
|
204
204
|
resizeListener(event: ResizeEvent): void;
|
|
205
|
-
/**
|
|
206
|
-
* hook elements into interacts resize event listeners
|
|
207
|
-
* we spread the configs so that the consuming component only overwrites the
|
|
208
|
-
* pieces that it explicitly indicates
|
|
209
|
-
* @param resizeConfig
|
|
210
|
-
* @param nativeElement
|
|
211
|
-
*/
|
|
212
205
|
initiateResizeEvents(resizeConfig: Partial<Interact.OrBoolean<ResizableOptions>>, nativeElement: TftDragElement): _interactjs_core_Interactable.Interactable;
|
|
213
206
|
mapResizeEvent(event: NgResizeEvent): TftResizeEvent;
|
|
214
207
|
alignDimensionsWithInputs(width: number, height: number): void;
|
|
215
208
|
addResizePropertiesToElement(nativeElement: TftDragElement): void;
|
|
216
209
|
subscribeToScrollEvents(): void;
|
|
217
|
-
static ɵfac:
|
|
218
|
-
static ɵdir:
|
|
210
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ResizableDirective, never>;
|
|
211
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ResizableDirective, "[tftResizable]", never, { "enableResizeDefault": { "alias": "enableResizeDefault"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "resizeConfig": { "alias": "resizeConfig"; "required": false; "isSignal": true; }; "interactableId": { "alias": "interactableId"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "resizeDisabled": { "alias": "resizeDisabled"; "required": false; "isSignal": true; }; }, { "resizeStart": "resizeStart"; "resizeMove": "resizeMove"; "resizeInertiaStart": "resizeInertiaStart"; "resizeEnd": "resizeEnd"; }, never, never, true, never>;
|
|
219
212
|
}
|
|
220
213
|
|
|
221
214
|
/** @dynamic */
|
|
222
|
-
declare class GesturableDirective<D = any> implements OnInit
|
|
215
|
+
declare class GesturableDirective<D = any> implements OnInit {
|
|
223
216
|
el: ElementRef<any>;
|
|
224
217
|
private draggable_dir;
|
|
225
|
-
gesturableId: string
|
|
226
|
-
gestureDisabled: boolean
|
|
227
|
-
gestureConfig: Partial<
|
|
228
|
-
gestureStart:
|
|
229
|
-
gestureMove:
|
|
230
|
-
gestureEnd:
|
|
218
|
+
gesturableId: _angular_core.InputSignal<string>;
|
|
219
|
+
gestureDisabled: _angular_core.InputSignal<boolean>;
|
|
220
|
+
gestureConfig: _angular_core.InputSignal<Partial<_interactjs_types_index.OrBoolean<DraggableOptions>>>;
|
|
221
|
+
gestureStart: _angular_core.OutputEmitterRef<TftGestureEvent>;
|
|
222
|
+
gestureMove: _angular_core.OutputEmitterRef<TftGestureEvent>;
|
|
223
|
+
gestureEnd: _angular_core.OutputEmitterRef<TftGestureEvent>;
|
|
231
224
|
interactableState: Observable<TftCoords>;
|
|
232
225
|
interactable: Interactable;
|
|
226
|
+
constructor();
|
|
233
227
|
ngOnInit(): void;
|
|
234
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
235
228
|
setGestureConfig(): void;
|
|
236
229
|
initiateGestureEvents(gestureConfig: Partial<Interact.OrBoolean<GesturableOptions>>, nativeElement: HTMLElement): _interactjs_core_Interactable.Interactable;
|
|
237
|
-
static ɵfac:
|
|
238
|
-
static ɵdir:
|
|
230
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GesturableDirective<any>, never>;
|
|
231
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GesturableDirective<any>, "[tftGesturable]", never, { "gesturableId": { "alias": "gesturableId"; "required": false; "isSignal": true; }; "gestureDisabled": { "alias": "gestureDisabled"; "required": false; "isSignal": true; }; "gestureConfig": { "alias": "gestureConfig"; "required": false; "isSignal": true; }; }, { "gestureStart": "gestureStart"; "gestureMove": "gestureMove"; "gestureEnd": "gestureEnd"; }, never, never, true, never>;
|
|
239
232
|
}
|
|
240
233
|
|
|
241
234
|
declare class ApplyScaleDirective {
|
|
242
235
|
el: ElementRef<any>;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ApplyScaleDirective, never>;
|
|
247
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ApplyScaleDirective, "[tftApplyScale]", never, { "scale": { "alias": "scale"; "required": false; }; }, {}, never, never, false, never>;
|
|
236
|
+
scale: _angular_core.InputSignal<number>;
|
|
237
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ApplyScaleDirective, never>;
|
|
238
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ApplyScaleDirective, "[tftApplyScale]", never, { "scale": { "alias": "scale"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
248
239
|
}
|
|
249
240
|
|
|
250
241
|
interface LassoRect {
|
|
@@ -273,16 +264,16 @@ interface LassoRect {
|
|
|
273
264
|
declare class LassoDirective {
|
|
274
265
|
private host;
|
|
275
266
|
/** Scale factor applied to the host element — used to convert viewport px to container-local px. */
|
|
276
|
-
scale: number
|
|
267
|
+
scale: _angular_core.InputSignal<number>;
|
|
277
268
|
/** When true, lasso interaction is disabled. */
|
|
278
|
-
lassoDisabled: boolean
|
|
279
|
-
/** Emitted on
|
|
280
|
-
lassoStart:
|
|
269
|
+
lassoDisabled: _angular_core.InputSignal<boolean>;
|
|
270
|
+
/** Emitted on pointerdown (before any drag). Use to clear previous selection state. */
|
|
271
|
+
lassoStart: _angular_core.OutputEmitterRef<void>;
|
|
281
272
|
/**
|
|
282
|
-
* Emitted on
|
|
273
|
+
* Emitted on pointerup when the drag exceeded the 5 px threshold.
|
|
283
274
|
* Rect is in viewport (clientX/Y) space — pass directly to getBoundingClientRect comparisons.
|
|
284
275
|
*/
|
|
285
|
-
lassoCommit:
|
|
276
|
+
lassoCommit: _angular_core.OutputEmitterRef<LassoRect>;
|
|
286
277
|
private _startVP;
|
|
287
278
|
private _currentVP;
|
|
288
279
|
private _startLocal;
|
|
@@ -290,13 +281,13 @@ declare class LassoDirective {
|
|
|
290
281
|
private _suppressNextClick;
|
|
291
282
|
private _activePointerId;
|
|
292
283
|
/** True while a lasso drag is in progress. */
|
|
293
|
-
isLassoing:
|
|
284
|
+
isLassoing: _angular_core.WritableSignal<boolean>;
|
|
294
285
|
/**
|
|
295
286
|
* Rectangle in container-local CSS pixels (pre-divided by scale) — bind directly to
|
|
296
287
|
* [style.left.px], [style.top.px], [style.width.px], [style.height.px].
|
|
297
288
|
* Null when no drag is in progress.
|
|
298
289
|
*/
|
|
299
|
-
lassoDisplayRect:
|
|
290
|
+
lassoDisplayRect: _angular_core.Signal<{
|
|
300
291
|
x: number;
|
|
301
292
|
y: number;
|
|
302
293
|
w: number;
|
|
@@ -308,8 +299,8 @@ declare class LassoDirective {
|
|
|
308
299
|
onPointerUp(e: PointerEvent): void;
|
|
309
300
|
/** Suppresses the click event that fires immediately after a real lasso drag ends. */
|
|
310
301
|
onClick(e: MouseEvent): void;
|
|
311
|
-
static ɵfac:
|
|
312
|
-
static ɵdir:
|
|
302
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LassoDirective, never>;
|
|
303
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<LassoDirective, "[tftLasso]", ["tftLasso"], { "scale": { "alias": "scale"; "required": false; "isSignal": true; }; "lassoDisabled": { "alias": "lassoDisabled"; "required": false; "isSignal": true; }; }, { "lassoStart": "lassoStart"; "lassoCommit": "lassoCommit"; }, never, never, true, never>;
|
|
313
304
|
}
|
|
314
305
|
|
|
315
306
|
type CssDimensionUnit = 'px' | 'em';
|
|
@@ -456,15 +447,20 @@ declare class ArrayOfNPipe implements PipeTransform {
|
|
|
456
447
|
* @param max the max length of the array (useful for limiting rendering in ngFor loop)
|
|
457
448
|
*/
|
|
458
449
|
transform(n: number, max: number): any;
|
|
459
|
-
static ɵfac:
|
|
460
|
-
static ɵpipe:
|
|
450
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ArrayOfNPipe, never>;
|
|
451
|
+
static ɵpipe: _angular_core.ɵɵPipeDeclaration<ArrayOfNPipe, "arrayOfN", true>;
|
|
461
452
|
}
|
|
462
453
|
|
|
454
|
+
/**
|
|
455
|
+
* @deprecated All directives are now standalone. Import them directly instead of using InteractModule.
|
|
456
|
+
* InteractModule will be removed in the next major version.
|
|
457
|
+
* `InteractModule.forRoot()` is still supported for providing InteractService configuration.
|
|
458
|
+
*/
|
|
463
459
|
declare class InteractModule {
|
|
464
460
|
static forRoot(config: InteractRootConfig): ModuleWithProviders<InteractModule>;
|
|
465
|
-
static ɵfac:
|
|
466
|
-
static ɵmod:
|
|
467
|
-
static ɵinj:
|
|
461
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<InteractModule, never>;
|
|
462
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<InteractModule, never, [typeof DraggableDirective, typeof ResizableDirective, typeof DropzoneDirective, typeof GesturableDirective, typeof DragRootDirective, typeof AutoScrollDirective, typeof AccountForScaleDirective, typeof ApplyScaleDirective, typeof DragPreviewDirective, typeof LassoDirective, typeof ArrayOfNPipe], [typeof DraggableDirective, typeof ResizableDirective, typeof DropzoneDirective, typeof GesturableDirective, typeof DragRootDirective, typeof AutoScrollDirective, typeof AccountForScaleDirective, typeof ApplyScaleDirective, typeof DragPreviewDirective, typeof LassoDirective, typeof ArrayOfNPipe]>;
|
|
463
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<InteractModule>;
|
|
468
464
|
}
|
|
469
465
|
|
|
470
466
|
/** Gets the closest ancestor of an element that matches a selector. */
|