@tft/interact 21.1.9 → 21.2.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/README.md +16 -1
- package/fesm2022/tft-interact.mjs +42 -17
- package/fesm2022/tft-interact.mjs.map +1 -1
- package/package.json +1 -1
- package/types/tft-interact.d.ts +102 -6
package/README.md
CHANGED
|
@@ -22,6 +22,20 @@ import { DraggableDirective, DropzoneDirective, ResizableDirective } from '@tft/
|
|
|
22
22
|
export class MyComponent {}
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
**Configuration (`provideInteract`):**
|
|
26
|
+
```typescript
|
|
27
|
+
import { provideInteract } from '@tft/interact';
|
|
28
|
+
|
|
29
|
+
// application-wide
|
|
30
|
+
bootstrapApplication(AppComponent, {
|
|
31
|
+
providers: [provideInteract({ cssDimensionUnit: 'em' })], // defaults to 'px'
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// or scoped to a route
|
|
35
|
+
{ path: 'demo', providers: [provideInteract({ cssDimensionUnit: 'em' })], loadChildren: ... }
|
|
36
|
+
```
|
|
37
|
+
`provideInteract()` provides `INTERACT_ROOT_CONFIG` (merged over `{ cssDimensionUnit: 'px' }`) and `InteractService`. It is optional: without it the service falls back to its defaults. It replaces `InteractModule.forRoot()`.
|
|
38
|
+
|
|
25
39
|
**NgModule (legacy):**
|
|
26
40
|
```typescript
|
|
27
41
|
import { InteractModule } from '@tft/interact';
|
|
@@ -32,7 +46,7 @@ import { InteractModule } from '@tft/interact';
|
|
|
32
46
|
export class AppModule {}
|
|
33
47
|
```
|
|
34
48
|
|
|
35
|
-
> `InteractModule` is deprecated and will be removed in the next major version. Prefer importing directives directly.
|
|
49
|
+
> `InteractModule` (and `InteractModule.forRoot()`) is deprecated and will be removed in the next major version. Prefer importing directives directly and `provideInteract()` for configuration.
|
|
36
50
|
|
|
37
51
|
---
|
|
38
52
|
|
|
@@ -311,6 +325,7 @@ Version 21.1.0 converted all directives to **standalone** and replaced `@Input()
|
|
|
311
325
|
```
|
|
312
326
|
|
|
313
327
|
`InteractModule` still works but is deprecated. `InteractService` is `providedIn: 'root'`.
|
|
328
|
+
To configure the default CSS unit without the module, use `provideInteract()` (see below).
|
|
314
329
|
|
|
315
330
|
### `dragData` and `dropzoneData` are now signals
|
|
316
331
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe, InjectionToken, inject, RendererFactory2, NgZone, Injectable, ElementRef, input, Directive, Renderer2, output, signal, computed, effect, TemplateRef, HostListener, ViewContainerRef, DOCUMENT,
|
|
2
|
+
import { Pipe, InjectionToken, inject, RendererFactory2, NgZone, Injectable, ElementRef, input, Directive, Renderer2, output, signal, computed, effect, TemplateRef, HostListener, ViewContainerRef, DOCUMENT, contentChild, makeEnvironmentProviders, NgModule } from '@angular/core';
|
|
3
3
|
import interact from 'interactjs';
|
|
4
4
|
import { BehaviorSubject, combineLatest, Subject } from 'rxjs';
|
|
5
5
|
import { shareReplay, tap, map, scan } from 'rxjs/operators';
|
|
@@ -119,6 +119,7 @@ class InteractService {
|
|
|
119
119
|
shareReplay(1),
|
|
120
120
|
// filter(resizeEvent => !!resizeEvent.targetElement),
|
|
121
121
|
tap(({ deltaX, deltaY, width, height, targetElement }) => {
|
|
122
|
+
// DOM writes only, so skip change detection when running with zone.js (no-op when zoneless)
|
|
122
123
|
this.ngZone.runOutsideAngular(() => {
|
|
123
124
|
this.setElementSize(width, height, targetElement);
|
|
124
125
|
});
|
|
@@ -525,6 +526,7 @@ class DraggableDirective {
|
|
|
525
526
|
this.dragMove = output();
|
|
526
527
|
this.dragInertiaStart = output();
|
|
527
528
|
this.dragEnd = output();
|
|
529
|
+
this._previewTemplate = contentChild(DragPreviewDirective, ...(ngDevMode ? [{ debugName: "_previewTemplate" }] : []));
|
|
528
530
|
this.scale = computed(() => this.account_for_scale_dir?.scale() || this.drag_root_dir?.account_for_scale_dir?.scale() || this.dragRoot()?.account_for_scale_dir?.scale() || 1, ...(ngDevMode ? [{ debugName: "scale" }] : []));
|
|
529
531
|
this.syncPosition = effect(() => {
|
|
530
532
|
this.alignPositionWithInputs(this.x(), this.y());
|
|
@@ -628,8 +630,12 @@ class DraggableDirective {
|
|
|
628
630
|
.on('dragstart', (event) => {
|
|
629
631
|
const interaction = event.interaction;
|
|
630
632
|
if (this.enableDragDefault() && interaction.pointerIsDown) {
|
|
631
|
-
|
|
632
|
-
|
|
633
|
+
const _previewTemplate = this._previewTemplate();
|
|
634
|
+
if (_previewTemplate) {
|
|
635
|
+
const viewRef = this._viewContainerRef.createEmbeddedView(_previewTemplate.templateRef);
|
|
636
|
+
// interact.js calls this handler outside of Angular's change detection, so render the preview's
|
|
637
|
+
// bindings now instead of waiting for a CD pass that nothing would schedule without zone.js
|
|
638
|
+
viewRef.detectChanges();
|
|
633
639
|
this.previewRef = getRootNode(viewRef, this._document);
|
|
634
640
|
}
|
|
635
641
|
else {
|
|
@@ -675,6 +681,8 @@ class DraggableDirective {
|
|
|
675
681
|
this.scrollEventsSubscription.unsubscribe();
|
|
676
682
|
}
|
|
677
683
|
if (this.el.nativeElement !== this.previewRef) {
|
|
684
|
+
// interact.js fires `dragend` before `drop`, and the drop handlers read the preview element
|
|
685
|
+
// (it is the drop event's relatedTarget), so it must outlive the current event dispatch.
|
|
678
686
|
setTimeout(() => {
|
|
679
687
|
this.dragRootEl.removeChild(this.previewRef);
|
|
680
688
|
});
|
|
@@ -689,7 +697,7 @@ class DraggableDirective {
|
|
|
689
697
|
});
|
|
690
698
|
}
|
|
691
699
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DraggableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
692
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.
|
|
700
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.1.6", type: DraggableDirective, isStandalone: true, selector: "[tftDraggable]", inputs: { x: { classPropertyName: "x", publicName: "x", isSignal: true, isRequired: false, transformFunction: null }, y: { classPropertyName: "y", publicName: "y", isSignal: true, isRequired: false, transformFunction: null }, dragZIndex: { classPropertyName: "dragZIndex", publicName: "dragZIndex", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, dragData: { classPropertyName: "dragData", publicName: "dragData", isSignal: true, isRequired: false, transformFunction: null }, enableDragDefault: { classPropertyName: "enableDragDefault", publicName: "enableDragDefault", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, dragDisabled: { classPropertyName: "dragDisabled", publicName: "dragDisabled", isSignal: true, isRequired: false, transformFunction: null }, dragConfig: { classPropertyName: "dragConfig", publicName: "dragConfig", isSignal: true, isRequired: false, transformFunction: null }, showPlaceholder: { classPropertyName: "showPlaceholder", publicName: "showPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, dragRoot: { classPropertyName: "dragRoot", publicName: "dragRoot", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dragStart: "dragStart", dragMove: "dragMove", dragInertiaStart: "dragInertiaStart", dragEnd: "dragEnd" }, host: { properties: { "style.user-select": "dragDisabled() ? \"auto\" : \"none\"", "style.touch-action": "dragDisabled() ? \"auto\" : \"none\"", "style.position": "\"absolute\"", "id": "interactableId" } }, queries: [{ propertyName: "_previewTemplate", first: true, predicate: DragPreviewDirective, descendants: true, isSignal: true }], ngImport: i0 }); }
|
|
693
701
|
}
|
|
694
702
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DraggableDirective, decorators: [{
|
|
695
703
|
type: Directive,
|
|
@@ -703,10 +711,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
703
711
|
'[id]': 'interactableId',
|
|
704
712
|
},
|
|
705
713
|
}]
|
|
706
|
-
}], propDecorators: { x: [{ type: i0.Input, args: [{ isSignal: true, alias: "x", required: false }] }], y: [{ type: i0.Input, args: [{ isSignal: true, alias: "y", required: false }] }], dragZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragZIndex", required: false }] }], zIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "zIndex", required: false }] }], dragData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragData", required: false }] }], enableDragDefault: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableDragDefault", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], dragDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragDisabled", required: false }] }], dragConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragConfig", required: false }] }], showPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPlaceholder", required: false }] }], dragRoot: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragRoot", required: false }] }], dragStart: [{ type: i0.Output, args: ["dragStart"] }], dragMove: [{ type: i0.Output, args: ["dragMove"] }], dragInertiaStart: [{ type: i0.Output, args: ["dragInertiaStart"] }], dragEnd: [{ type: i0.Output, args: ["dragEnd"] }], _previewTemplate: [{
|
|
707
|
-
type: ContentChild,
|
|
708
|
-
args: [DragPreviewDirective]
|
|
709
|
-
}] } });
|
|
714
|
+
}], propDecorators: { x: [{ type: i0.Input, args: [{ isSignal: true, alias: "x", required: false }] }], y: [{ type: i0.Input, args: [{ isSignal: true, alias: "y", required: false }] }], dragZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragZIndex", required: false }] }], zIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "zIndex", required: false }] }], dragData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragData", required: false }] }], enableDragDefault: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableDragDefault", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], dragDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragDisabled", required: false }] }], dragConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragConfig", required: false }] }], showPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPlaceholder", required: false }] }], dragRoot: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragRoot", required: false }] }], dragStart: [{ type: i0.Output, args: ["dragStart"] }], dragMove: [{ type: i0.Output, args: ["dragMove"] }], dragInertiaStart: [{ type: i0.Output, args: ["dragInertiaStart"] }], dragEnd: [{ type: i0.Output, args: ["dragEnd"] }], _previewTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DragPreviewDirective), { isSignal: true }] }] } });
|
|
710
715
|
/**
|
|
711
716
|
* Component utils
|
|
712
717
|
*/
|
|
@@ -1108,6 +1113,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1108
1113
|
args: ['click', ['$event']]
|
|
1109
1114
|
}] } });
|
|
1110
1115
|
|
|
1116
|
+
/**
|
|
1117
|
+
* Provides the interact configuration and `InteractService`.
|
|
1118
|
+
*
|
|
1119
|
+
* Add it to the application providers, or to a route's `providers` to scope it to that route.
|
|
1120
|
+
* Options that are left out fall back to the defaults (`cssDimensionUnit: 'px'`).
|
|
1121
|
+
*
|
|
1122
|
+
* @example
|
|
1123
|
+
* bootstrapApplication(AppComponent, {
|
|
1124
|
+
* providers: [provideInteract({ cssDimensionUnit: 'em' })],
|
|
1125
|
+
* });
|
|
1126
|
+
*/
|
|
1127
|
+
function provideInteract(config = {}) {
|
|
1128
|
+
const defaultConfig = { cssDimensionUnit: 'px' };
|
|
1129
|
+
return makeEnvironmentProviders([
|
|
1130
|
+
{
|
|
1131
|
+
provide: INTERACT_ROOT_CONFIG,
|
|
1132
|
+
useValue: { ...defaultConfig, ...config },
|
|
1133
|
+
},
|
|
1134
|
+
InteractService,
|
|
1135
|
+
]);
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1111
1138
|
const EXPORTS = [
|
|
1112
1139
|
DraggableDirective,
|
|
1113
1140
|
ResizableDirective,
|
|
@@ -1122,19 +1149,17 @@ const EXPORTS = [
|
|
|
1122
1149
|
ArrayOfNPipe,
|
|
1123
1150
|
];
|
|
1124
1151
|
/**
|
|
1125
|
-
* @deprecated
|
|
1126
|
-
*
|
|
1127
|
-
* `InteractModule.forRoot()` is still supported for providing InteractService configuration.
|
|
1152
|
+
* @deprecated Import the standalone directives and pipe (DraggableDirective, ResizableDirective, etc.) directly
|
|
1153
|
+
* and use `provideInteract()` to configure them. This module will be removed in the next major version.
|
|
1128
1154
|
*/
|
|
1129
1155
|
class InteractModule {
|
|
1156
|
+
/**
|
|
1157
|
+
* @deprecated Use `provideInteract(config)` in your application or route providers.
|
|
1158
|
+
*/
|
|
1130
1159
|
static forRoot(config) {
|
|
1131
|
-
const defaultConfig = { cssDimensionUnit: 'px' };
|
|
1132
1160
|
return {
|
|
1133
1161
|
ngModule: InteractModule,
|
|
1134
|
-
providers: [
|
|
1135
|
-
{ provide: INTERACT_ROOT_CONFIG, useValue: { ...defaultConfig, ...config } },
|
|
1136
|
-
InteractService,
|
|
1137
|
-
],
|
|
1162
|
+
providers: [provideInteract(config)],
|
|
1138
1163
|
};
|
|
1139
1164
|
}
|
|
1140
1165
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: InteractModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -1173,5 +1198,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1173
1198
|
* Generated bundle index. Do not edit.
|
|
1174
1199
|
*/
|
|
1175
1200
|
|
|
1176
|
-
export { AccountForScaleDirective, ApplyScaleDirective, ArrayOfNPipe, AutoScrollDirective, DEFAULT_REGISTRY_ID, DragPreviewDirective, DragRootDirective, DraggableDirective, DropzoneDirective, GesturableDirective, INTERACT_ROOT_CONFIG, InteractModule, LassoDirective, ResizableDirective, TFT_DRAG_PREVIEW, cloneElement$1 as cloneElement, defaultDelta, defaultPosition, defaultSize, getClosestMatchingAncestor, getRootNode };
|
|
1201
|
+
export { AccountForScaleDirective, ApplyScaleDirective, ArrayOfNPipe, AutoScrollDirective, DEFAULT_REGISTRY_ID, DragPreviewDirective, DragRootDirective, DraggableDirective, DropzoneDirective, GesturableDirective, INTERACT_ROOT_CONFIG, InteractModule, InteractService, LassoDirective, ResizableDirective, TFT_DRAG_PREVIEW, cloneElement$1 as cloneElement, defaultDelta, defaultPosition, defaultSize, getClosestMatchingAncestor, getRootNode, provideInteract };
|
|
1177
1202
|
//# sourceMappingURL=tft-interact.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tft-interact.mjs","sources":["../../../../libs/interact/src/lib/pipes/array-of-n.pipe.ts","../../../../libs/interact/src/lib/models/interact.ts","../../../../libs/interact/src/lib/services/interact.service.ts","../../../../libs/interact/src/lib/directives/account-for-scale.directive.ts","../../../../libs/interact/src/lib/directives/dropzone.directive.ts","../../../../libs/interact/src/lib/directives/drag-preview.directive.ts","../../../../libs/interact/src/lib/utils/helpers.ts","../../../../libs/interact/src/lib/directives/drag-root.directive.ts","../../../../libs/interact/src/lib/directives/auto-scroll.directive.ts","../../../../libs/interact/src/lib/directives/draggable.directive.ts","../../../../libs/interact/src/lib/directives/resizable.directive.ts","../../../../libs/interact/src/lib/directives/gesturable.directive.ts","../../../../libs/interact/src/lib/directives/apply-scale.directive.ts","../../../../libs/interact/src/lib/directives/lasso.directive.ts","../../../../libs/interact/src/lib/interact.module.ts","../../../../libs/interact/src/tft-interact.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'arrayOfN',\n standalone: true,\n})\nexport class ArrayOfNPipe implements PipeTransform {\n\n /**\n * \n * @param n the number to make an array of \n * @param max the max length of the array (useful for limiting rendering in ngFor loop)\n */\n transform(n: number, max: number): any {\n const length = ((max && max < n) || n === Infinity) ? max : n;\n return new Array(length).fill(length).map((x,i)=> i); \n }\n\n}\n","import { DropzoneDirective, DraggableDirective, GesturableDirective, ResizableDirective } from '../directives';\nimport { Point, DragEvent, ResizeEvent, Interactable, DropEvent, GestureEvent } from '@interactjs/types';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { InjectionToken } from '@angular/core';\n\n\n\nexport type CssDimensionUnit = 'px' | 'em';\nexport interface InteractRootConfig {\n cssDimensionUnit: CssDimensionUnit;\n}\nexport const INTERACT_ROOT_CONFIG = new InjectionToken<InteractRootConfig>('INTERACT_ROOT_CONFIG_PARAMS');\n\nexport const DEFAULT_REGISTRY_ID = 'DEFAULT';\n/**\n * Default initial value for Delta BehaviorSubject\n */\nexport const defaultDelta: Delta = {\n deltaX: 0,\n deltaY: 0,\n targetElement: null\n};\n/**\n * Default initial value for Size BehaviorSubject\n */\nexport const defaultSize: Size = {\n width: null,\n height: null,\n targetElement: null\n}\n/**\n * Default initial value for Position BehaviorSubject\n */\nexport const defaultPosition: Position = {\n x: 0,\n y: 0,\n targetElement: null\n}\n/**\n * The shape of the state/events/behavior system for each dropzone\n * and the DEFAULT_REGISTRY_ID system (for drop components initialized outside\n * of a dropzone).\n */\nexport interface InteractableSystem {\n deltas$: BehaviorSubject<Delta>;\n position$: BehaviorSubject<Position>;\n size$: BehaviorSubject<Size & Delta>;\n\n interactable$: Observable<TftCoords>;\n}\n/**\n * The key map of InteractableSystems. One for the drag components\n * that originated outside of a dropzone, plus one for each dropzone.\n */\nexport interface InteractableRegistry {\n [key: string]: InteractableSystem\n}\n\n/**\n * HTMLElement with helpful drag directives attached to facilitate moving drag data between dropzones\n */\nexport type TftDragElement = HTMLElement & {\n dragRef?: DraggableDirective\n dragOrigin?: DropzoneDirective\n dropTarget?: DropzoneDirective\n}\n\n/**\n * HTMLElement with helpful drag directives attached to facilitate moving drag data between dropzones\n */\n export type TftResizeElement = HTMLElement & {\n resizeRef?: ResizableDirective\n}\n\n/**\n * Extends the interact drop events by adding reference to the dropped components drag\n * directive to the html element. This gives the dropzone access to things like data\n * and parent dropzone of the dropped component.\n */\nexport type NgDropEvent = DropEvent & {\n draggable: Interactable & {\n target: TftDragElement;\n };\n relatedTarget: TftDragElement;\n};\n/**\n * Extends the interact resize events by adding a reference to the dragRef\n * directive to the html element.\n */\nexport type NgResizeEvent = ResizeEvent & {\n draggable: Interactable & {\n target: TftDragElement;\n };\n};\n/**\n * We extend the interact DragEvent a little here, adding to the target element references for:\n * - the component we are dragging (dragRef)\n * - the dropzone component where the drag component originated (dragOrigin)\n * - the dropzone component that it was dropped in (dropTarget)\n * This helps us to pass references to directive classes as events like dragenter and drag exit happens.\n * We use these references to emit a (mostly) consistent event across drag, drop, resize event.\n */\nexport type NgDragEvent = DragEvent & {\n dropzone: { target: HTMLElement},\n target: TftDragElement\n};\n/**\n * Event emitted when resizing, dragging, dropping\n */\nexport interface TftInteractableEvent {\n dragRef: DraggableDirective;\n dragOrigin?: DropzoneDirective;\n dropTarget?: DropzoneDirective;\n positionInDropTarget: Point;\n}\n/**\n * Event emitted on drop\n */\nexport interface TftDropEvent extends TftInteractableEvent {\n interactEvent: NgDropEvent\n}\n/**\n * Event emitted on drag\n */\nexport interface TftDragEvent extends TftInteractableEvent {\n interactEvent: NgDragEvent\n}\n/**\n * Event emitted on resize\n */\nexport interface TftResizeEvent extends TftInteractableEvent {\n interactEvent: ResizeEvent,\n resizeRef: ResizableDirective\n size: {\n width: number;\n height: number;\n }\n}\n\nexport type TftCoords= Delta & Position & Size;\n\nexport interface Delta {\n deltaX: number | null;\n deltaY: number | null;\n targetElement: TftDragElement | null;\n}\n\nexport interface Position {\n x: number | null;\n y: number | null;\n targetElement: TftDragElement | null;\n}\n\nexport interface Size {\n width: number | null;\n height: number | null;\n targetElement: TftResizeElement | null;\n}\n\nexport interface TftGestureEvent {\n gestureRef: GesturableDirective;\n interactEvent: GestureEvent;\n}\n","\nimport { Injectable, Renderer2, RendererFactory2, NgZone, inject } from '@angular/core';\nimport { BehaviorSubject, Observable, combineLatest } from 'rxjs';\nimport { tap, map, shareReplay } from 'rxjs/operators';\nimport {\n TftCoords, Delta, Size, Position, InteractableRegistry,\n defaultPosition, defaultSize, defaultDelta, DEFAULT_REGISTRY_ID, TftDragElement, TftResizeElement, INTERACT_ROOT_CONFIG, InteractRootConfig\n} from '../models';\n\n\n\n@Injectable({providedIn: 'root'})\nexport class InteractService {\n private rendererFactory = inject(RendererFactory2);\n private ngZone = inject(NgZone);\n rootConfig = inject(INTERACT_ROOT_CONFIG, { optional: true });\n\n\n private _interactableIndex = 0;\n private _dropzoneIndex = 0;\n private renderer: Renderer2;\n\n // TODO: consider using Map here\n readonly dragRegistrySystem: { [key: string]: InteractableRegistry } = { };\n private cssUnit = 'px'\n constructor() {\n const rootConfig = this.rootConfig;\n\n this.renderer = this.rendererFactory.createRenderer(null, null);\n this.cssUnit = rootConfig?.cssDimensionUnit || 'px';\n }\n\n addDeltaToPosition(delta: Delta, position: Position) {\n return {\n x: delta.deltaX + position.x,\n y: delta.deltaY + position.y,\n targetElement: position.targetElement || delta.targetElement\n }\n }\n\n addRegistryToSystem(customRegistryId: string | null = null) {\n const registryId = customRegistryId || this.createDropzoneId(this._dropzoneIndex++);\n this.dragRegistrySystem[registryId] = {};\n return registryId;\n }\n\n addDraggableToRegistry(customRegistryId = null, interactableId: string | null = null ) {\n const registryId = customRegistryId || DEFAULT_REGISTRY_ID;\n // if we pass an id to createInteractableId then it is used when creating the interactable\n // and returned, otherwise a new id is created for the draggable.\n const key = this.createInteractableId(interactableId );\n if (!Object.prototype.hasOwnProperty.call(this.dragRegistrySystem, registryId)) {\n this.dragRegistrySystem[registryId] = {};\n }\n this.dragRegistrySystem[registryId][key] = this.createInteractableState(defaultPosition, defaultSize, defaultDelta);\n return key\n }\n\n destroyInteractable(interactableId: string, registryId = DEFAULT_REGISTRY_ID) {\n const interactableSystem =this.dragRegistrySystem[registryId][interactableId];\n if(interactableSystem) {\n // unsubscribe from all the subscriptions if they're subscriptions\n for (const propName in interactableSystem) {\n const prop = interactableSystem[propName];\n if (prop.unsubscribe && typeof prop.unsubscribe === 'function' ) {\n prop.unsubscribe();\n };\n }\n delete this.dragRegistrySystem[registryId][interactableId];\n }\n }\n\n subscribeToInteractable(interactableId: string, registryId = DEFAULT_REGISTRY_ID) {\n return this.dragRegistrySystem[registryId][interactableId];\n }\n\n createInteractableState(initialPosition: Position, initialSize: Size, initialDelta: Delta ) {\n\n const deltas$ = new BehaviorSubject(initialDelta);\n // tracks the size of the element\n const size$ = new BehaviorSubject({...initialSize, ...initialDelta});\n // Stream of positions as they change\n const position$ = new BehaviorSubject(initialPosition);\n\n // All draggable data mapped together\n const interactable$: Observable<TftCoords> = combineLatest([\n size$.pipe(\n // startWith({...initialSize, ...initialDelta}),\n shareReplay(1),\n // filter(resizeEvent => !!resizeEvent.targetElement),\n tap(({deltaX, deltaY, width, height, targetElement}) => {\n this.ngZone.runOutsideAngular(() => {\n this.setElementSize(width, height, targetElement);\n });\n // only reposition if necessary i.e when resizing left or up\n if(deltaX || deltaY) {\n deltas$.next({deltaX, deltaY, targetElement});\n }\n })\n ),\n deltas$.pipe(\n shareReplay(1),\n tap((delta) => {\n const position = position$.value;\n const newPosition = this.addDeltaToPosition(delta, position);\n position$.next(newPosition);\n })\n ),\n position$.pipe(\n shareReplay(1),\n tap( position => {\n this.ngZone.runOutsideAngular(() => {\n this.setElementTransform(position.x, position.y, position);\n })\n })\n )\n ]).pipe(\n shareReplay(1),\n map( ([size, deltas, position]): TftCoords=> {\n return {\n x: position.x,\n y: position.y,\n deltaX: deltas.deltaX,\n deltaY: deltas.deltaY,\n width: size.width,\n height: size.height,\n targetElement: size.targetElement || position.targetElement || deltas.targetElement\n }\n }),\n )\n // TODO: update system to handle only returning interactable$\n return {\n deltas$,\n position$,\n size$,\n interactable$\n }\n }\n\n createInteractableId(customInteractableId: string | null = null) {\n return customInteractableId || `interactable${this._interactableIndex++}`\n }\n\n createDropzoneId(index: number) {\n return `dropzone${index}`\n }\n\n getInteractableState( interactableId: string, registryId = DEFAULT_REGISTRY_ID) {\n return this.dragRegistrySystem[registryId][interactableId].interactable$;\n }\n\n updateDeltas(interactId: string, registryId: string, { deltaX, deltaY }, targetElement) {\n if (!this.interactableExistOnRegistry(interactId, registryId)) return;\n this.dragRegistrySystem[registryId][interactId].deltas$.next({ deltaX, deltaY, targetElement })\n }\n\n updatePosition(interactId: string, registryId: string, { x, y }: {x: number; y: number;}, targetElement) {\n if (!this.interactableExistOnRegistry(interactId, registryId)) return;\n this.dragRegistrySystem[registryId][interactId].position$.next({ x, y, targetElement })\n }\n\n updateSize(interactId: string, registryId: string, { deltaX, deltaY, width, height }, targetElement) {\n if (!this.interactableExistOnRegistry(interactId, registryId)) return\n this.dragRegistrySystem[registryId][interactId].size$.next({deltaX, deltaY, width, height, targetElement});\n }\n\n interactableExistOnRegistry(interactId: string, registryId = DEFAULT_REGISTRY_ID) {\n // eslint-disable-next-line no-prototype-builtins\n return this.dragRegistrySystem.hasOwnProperty(registryId) && this.dragRegistrySystem[registryId].hasOwnProperty(interactId);\n }\n /**\n * Uses renderer to set width and height of angular component\n * @param width the desired width of component\n * @param height the desired height of component\n * @param target the element to transform\n */\n setElementSize(width: number, height: number, target: TftResizeElement) {\n if(!target) return;\n this.renderer.setStyle(target, 'width', `${width}${this.cssUnit}`);\n this.renderer.setStyle(target, 'height', `${height}${this.cssUnit}`);\n }\n /**\n * Uses renderer to set position of angular component\n * @param x position on x axis\n * @param y position on y axis\n * @param target the element to transform\n */\n setElementTransform(x: number, y: number, position: Position ) {\n if(!position?.targetElement) return;\n this.renderer.setStyle(position.targetElement, 'left', `${x}${this.cssUnit}`);\n this.renderer.setStyle(position.targetElement, 'top', `${y}${this.cssUnit}`);\n }\n /**\n * Generates a translate string for the x and y arguments passed to\n * be passed to css transform\n * @param x the position along the x axis\n * @param y the position along the y axis\n */\n createTransformString(x: number, y: number) {\n return `translate3d(${x}${this.cssUnit}, ${y}${this.cssUnit}, 0)`\n }\n\n calculatePositionInElement(zoneElement: Interact.Element, dragElement: TftDragElement, scale?: number) {\n // TODO: this calculation may not cover a lot of scenarios, keep an eye out for possible improvements\n const zoneRect = zoneElement.getBoundingClientRect();\n const dragRect = dragElement.getBoundingClientRect();\n const position = scale\n ? {\n x: (dragRect.left - zoneRect.left) / scale || 1,\n y: (dragRect.top - zoneRect.top) / scale || 1\n } : {\n x: dragRect.left - zoneRect.left,\n y: dragRect.top - zoneRect.top\n };\n // console.log({ y:position.y, drt:dragRect.top, zrt: zoneRect.top})\n return position;\n }\n}\n","import { Directive, ElementRef, inject, input } from '@angular/core';\n\n/**\n * Use to apply scale to the element and tell the drag and resize directives to account for the scale when\n * @example <div tftAccountForScale [scale]=\"2.5\"> <div tftDraggable> </div> </div>\n * @note if `dragRoot` is used this directive should be used on the same element to ensure that the drag\n * element accounts for scale\n */\n@Directive({\n selector: '[tftAccountForScale]',\n standalone: true,\n})\nexport class AccountForScaleDirective {\n el = inject(ElementRef);\n\n scale = input(1);\n}\n","import { Directive, ElementRef, OnInit, output, input, inject, effect, signal, computed, Renderer2 } from '@angular/core';\nimport interact from 'interactjs';\nimport { DropzoneOptions, Interactable } from '@interactjs/types/index';\nimport { InteractService } from '../services/interact.service';\nimport { NgDropEvent, TftDragElement, TftDropEvent } from '../models';\nimport { AccountForScaleDirective } from './account-for-scale.directive';\n\nexport type PositionOption = 'relative' | 'absolute' | 'fixed' | 'static' | 'sticky' | 'unset' | 'inherit' | 'initial' | 'revert';\n\n@Directive({\n selector: '[tftDropzone]',\n standalone: true,\n host: {\n '[id]': '_registeredId()',\n '[style.position]': 'position()',\n },\n})\nexport class DropzoneDirective implements OnInit {\n el = inject(ElementRef);\n private renderer = inject(Renderer2);\n private interactService = inject(InteractService);\n private account_for_scale_dir = inject(AccountForScaleDirective, { optional: true });\n\n dropzoneId = input<string>();\n dropzoneConfig = input<DropzoneOptions>({});\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n dropzoneData = input<any>();\n position = input<PositionOption>('relative');\n\n dropActivate = output<TftDropEvent>();\n dragEnter = output<TftDropEvent>();\n dragLeave = output<TftDropEvent>();\n dragDrop = output<TftDropEvent>();\n\n dropzone: Interactable;\n /** The actual registered ID — may differ from the dropzoneId input if none was provided. Drives [id] host binding. */\n _registeredId = signal<string>(null);\n\n scale = computed(() => this.account_for_scale_dir?.scale());\n\n ngOnInit() {\n this.dropzone = this.connectDropzoneEvents(this.el.nativeElement, this.dropzoneConfig());\n this._registeredId.set(this.interactService.addRegistryToSystem(this.dropzoneId()));\n }\n\n constructor() {\n effect(() => {\n const config = this.dropzoneConfig();\n if (!this.dropzone) return;\n this.dropzone.dropzone(config);\n });\n }\n\n /**\n * Connects element to interact's dropzone events and returns a reference to the interactable\n */\n connectDropzoneEvents(nativeElement, dropzoneConfig: DropzoneOptions) {\n return interact(nativeElement).dropzone(dropzoneConfig)\n .on('dropactivate', (event: NgDropEvent) => {\n this.dropActivate.emit(this.mapDropzoneEvent(event));\n })\n .on('dragenter', (event: NgDropEvent) => {\n this.renderer.setProperty(event.relatedTarget, 'dropTarget', this);\n this.dragEnter.emit(this.mapDropzoneEvent(event));\n })\n .on('dragleave', (event: NgDropEvent) => {\n if (event.relatedTarget.dropTarget === this) {\n this.renderer.setProperty(event.relatedTarget, 'dropTarget', null);\n }\n this.dragLeave.emit(this.mapDropzoneEvent(event));\n })\n .on('drop', (event: NgDropEvent) => {\n this.dragDrop.emit(this.mapDropzoneEvent(event));\n });\n }\n\n /**\n * Maps the drop event emitted by interact to something a little easier to use\n */\n mapDropzoneEvent(event: NgDropEvent): TftDropEvent {\n const zoneElement = event.target;\n const dragElement = event.relatedTarget?.dragRef?.previewRef as TftDragElement;\n const scale = this.scale();\n const positionInDropTarget = zoneElement && dragElement\n ? this.interactService.calculatePositionInElement(zoneElement, dragElement, scale)\n : null;\n return {\n interactEvent: event,\n dragRef: dragElement.dragRef,\n dragOrigin: dragElement.dragOrigin,\n dropTarget: event.relatedTarget.dropTarget,\n positionInDropTarget,\n };\n }\n}\n","import { Directive, InjectionToken, TemplateRef, inject, input } from '@angular/core';\n\nexport const TFT_DRAG_PREVIEW = new InjectionToken<DragPreviewDirective>('DragPreviewDirective');\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'ng-template[tftDragPreview]',\n standalone: true,\n})\nexport class DragPreviewDirective<T = any> {\n templateRef = inject<TemplateRef<T>>(TemplateRef);\n\n dragData = input<T>();\n}\n","import { EmbeddedViewRef } from '@angular/core';\n\ninterface IEElement extends HTMLElement {\n msMatchesSelector: (selector: string) => boolean; //\n}\n\n/** Gets the closest ancestor of an element that matches a selector. */\nexport function getClosestMatchingAncestor(element: HTMLElement, selector: string) {\n let currentElement = element.parentElement as HTMLElement | null;\n\n while (currentElement) {\n // IE doesn't support `matches` so we have to fall back to `msMatchesSelector`.\n if (currentElement.matches ? currentElement.matches(selector) :\n (currentElement as IEElement).msMatchesSelector(selector)) {\n return currentElement;\n }\n\n currentElement = currentElement.parentElement;\n }\n\n return null;\n}\n\n\n/**\n * Create a copy of the HTML Element\n */\nexport function cloneElement(element: HTMLElement) {\n\n const clone = element.cloneNode(true) as HTMLElement;\n clone.removeAttribute('id');\n return clone;\n}\n\n/**\n * Gets the root HTML element of an embedded view.\n * If the root is not an HTML element it gets wrapped in one.\n */\nexport function getRootNode(viewRef: EmbeddedViewRef<any>, _document: Document): HTMLElement {\n const rootNodes: Node[] = viewRef.rootNodes;\n\n if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {\n return rootNodes[0] as HTMLElement;\n }\n\n const wrapper = _document.createElement('div');\n rootNodes.forEach(node => wrapper.appendChild(node));\n return wrapper;\n}\n","import { AccountForScaleDirective } from './account-for-scale.directive';\nimport { Directive, ElementRef, inject, OnDestroy } from '@angular/core';\n\n/**\n * Use this directive to select which element to attach the element to while dragging\n * @example <div tftDragRoot><div tftDraggable> </div> </div>\n * @note this directive will overwrite any style transformations (e.g. transform: scale(2); )\n */\n@Directive({\n selector: '[tftDragRoot]',\n exportAs: 'tftDragRoot',\n standalone: true,\n})\nexport class DragRootDirective implements OnDestroy {\n el = inject(ElementRef);\n // This is used when passing a dragRoot as in input to a draggable element that not a child of that dragRoot\n // It allows the the interact service to check if the drag root has some scaling applied to it and account for it when the component is dragged\n account_for_scale_dir? = inject(AccountForScaleDirective, { optional: true, self: true });\n\n private _suppressNextClick = false;\n private _captureListener: (e: MouseEvent) => void;\n\n constructor() {\n // Registered in capture phase so it fires before any bubble-phase listeners,\n // including Angular template (click) bindings on this element. Suppresses the\n // spurious click that fires after a drag ends when the clone (a direct child of\n // this element) receives the pointerup and bubbles the event up.\n this._captureListener = (event: MouseEvent) => {\n if (this._suppressNextClick) {\n this._suppressNextClick = false;\n event.stopImmediatePropagation();\n }\n };\n this.el.nativeElement.addEventListener('click', this._captureListener, true);\n }\n\n /**\n * Called by DraggableDirective on dragend to suppress the spurious click that\n * fires when the drag clone (appended as a direct child of this element) receives\n * the pointerup and bubbles a click event up to this element.\n */\n suppressNextClick() {\n this._suppressNextClick = true;\n }\n\n ngOnDestroy() {\n this.el.nativeElement.removeEventListener('click', this._captureListener, true);\n }\n}\n","import { Directive, ElementRef, HostListener, inject, input } from '@angular/core';\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { scan, shareReplay } from 'rxjs/operators';\n\ninterface ScrollObject { scrollTop: number, scrollLeft: number }\n\n@Directive({\n selector: '[tftAutoScroll]',\n standalone: true,\n})\nexport class AutoScrollDirective {\n el = inject(ElementRef);\n\n autoScrollConfig = input({\n margin: 50,\n distance: 3,\n interval: 50,\n speed: 300,\n enabled: true,\n });\n\n private scrollSubject: BehaviorSubject<ScrollObject>;\n readonly scrollObserver: Observable<ScrollObject>;\n readonly scrollDeltaObserver = new Subject<ScrollObject>();\n\n @HostListener('scroll', ['$event']) scroll(scrollEvent: Event) {\n const target = (scrollEvent.target as HTMLElement);\n const { scrollTop, scrollLeft } = target;\n this.scrollSubject.next({ scrollTop, scrollLeft });\n }\n\n constructor() {\n const el = this.el;\n const { scrollTop, scrollLeft } = (el.nativeElement as HTMLElement);\n this.scrollSubject = new BehaviorSubject({ scrollTop, scrollLeft });\n this.scrollObserver = this.scrollSubject.pipe(\n scan((previous, current) => {\n const scrollTop = current.scrollTop - previous.scrollTop;\n const scrollLeft = current.scrollLeft - previous.scrollLeft;\n this.scrollDeltaObserver.next({ scrollTop, scrollLeft });\n return current;\n }),\n shareReplay(1),\n );\n this.scrollObserver.subscribe();\n }\n}\n","import { Directive, ElementRef, input, output, OnInit, OnDestroy, effect, computed, Renderer2, ContentChild, ViewContainerRef, AfterViewInit, DOCUMENT, inject } from '@angular/core';\n\nimport interact from 'interactjs';\nimport { InteractService } from '../services/interact.service';\nimport { DraggableOptions, Interactable } from '@interactjs/types/index';\nimport { Subscription, Observable } from 'rxjs';\nimport { DropzoneDirective } from './dropzone.directive';\nimport { NgDragEvent, TftDragEvent, DEFAULT_REGISTRY_ID, TftCoords, TftDragElement } from '../models';\nimport { DragPreviewDirective } from './drag-preview.directive';\nimport { getRootNode } from '../utils';\nimport { DragRootDirective } from './drag-root.directive';\nimport { AccountForScaleDirective } from './account-for-scale.directive';\nimport { AutoScrollDirective } from './auto-scroll.directive';\n\n/** @dynamic */\n@Directive({\n selector: '[tftDraggable]',\n standalone: true,\n host: {\n '[style.user-select]': 'dragDisabled() ? \"auto\" : \"none\"',\n '[style.touch-action]': 'dragDisabled() ? \"auto\" : \"none\"',\n '[style.position]': '\"absolute\"',\n '[id]': 'interactableId',\n },\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class DraggableDirective<D = any> implements OnInit, OnDestroy, AfterViewInit {\n el = inject(ElementRef);\n private interactService = inject(InteractService);\n private renderer = inject(Renderer2);\n private _viewContainerRef = inject(ViewContainerRef);\n private _document = inject<Document>(DOCUMENT);\n account_for_scale_dir? = inject(AccountForScaleDirective, { optional: true });\n dropzone_dir? = inject(DropzoneDirective, { optional: true, skipSelf: true });\n drag_root_dir? = inject(DragRootDirective, { optional: true, skipSelf: true });\n auto_scroll_dir? = inject(AutoScrollDirective, { optional: true, skipSelf: true });\n\n x = input<number>();\n y = input<number>();\n /** zIndex while dragging */\n dragZIndex = input(10000);\n /** zIndex while at rest */\n zIndex = input<number>();\n interactableId: string;\n dragData = input<D>();\n enableDragDefault = input(true);\n /**\n * @deprecated replaced by 'dragDisabled' property, please migrate before v13\n */\n disabled = input(false);\n dragDisabled = input(false);\n dragConfig = input<Partial<Interact.OrBoolean<DraggableOptions>>>();\n showPlaceholder = input(false);\n\n /**\n * The element we want to prepend the drag element to.\n * Use `tftDragRoot` directive on a parent element to set custom root element\n * @default document.body\n */\n dragRoot = input<DragRootDirective>();\n\n private dragRootEl: HTMLElement;\n\n dragStart = output<TftDragEvent>();\n dragMove = output<TftDragEvent>();\n dragInertiaStart = output<TftDragEvent>();\n dragEnd = output<TftDragEvent>();\n\n @ContentChild(DragPreviewDirective) _previewTemplate: DragPreviewDirective;\n interactableState: Observable<TftCoords>;\n interactable: Interactable;\n private registryId: string;\n private interactableSubscription: Subscription;\n private scrollEventsSubscription: Subscription;\n\n previewRef: TftDragElement;\n\n scale = computed(() =>\n this.account_for_scale_dir?.scale() || this.drag_root_dir?.account_for_scale_dir?.scale() || this.dragRoot()?.account_for_scale_dir?.scale() || 1\n );\n\n syncPosition = effect(() => {\n this.alignPositionWithInputs(this.x(), this.y());\n });\n\n syncDragConfig = effect(() => {\n const config = this.dragConfig();\n const enabled = !(this.disabled() || this.dragDisabled());\n if (!this.interactable) return;\n this.setDragConfig(config, enabled);\n });\n\n ngOnInit() {\n const disabled = this.disabled();\n if (disabled) {\n console.warn(`It looks like your using the 'disabled' input on a tftDraggable directive, it has been deprecated and is replaced with 'dragDisabled', please migrate by v13`);\n }\n this.interactable = this.initiateDragEvents(this.dragConfig(), this.el.nativeElement);\n this.dragRootEl = (this.dragRoot()?.el?.nativeElement || this.drag_root_dir?.el?.nativeElement) as HTMLElement || this._document.body;\n this.registryId = this.dropzone_dir?._registeredId() || DEFAULT_REGISTRY_ID;\n this.interactableId = this.interactService.addDraggableToRegistry(this.registryId, this.interactableId);\n this.alignPositionWithInputs(this.x(), this.y());\n this.interactableState = this.interactService\n .getInteractableState(this.interactableId, this.registryId);\n this.interactableSubscription = this.interactableState.subscribe();\n this.setDragConfig(this.dragConfig(), !(this.disabled() || this.dragDisabled()));\n }\n\n setDragConfig(config: Partial<Interact.OrBoolean<DraggableOptions>>, enabled: boolean) {\n this.interactable.draggable({ ...config, enabled });\n }\n\n ngAfterViewInit() {\n this.addDragPropertiesToElement(this.el.nativeElement);\n if (!this.dropzone_dir) {\n this.previewRef = this.el.nativeElement;\n }\n }\n\n ngOnDestroy() {\n this.interactableSubscription.unsubscribe();\n this.interactService.destroyInteractable(this.interactableId, this.registryId);\n }\n\n dragMoveListener(event: NgDragEvent, element: Interact.Element) {\n const { dx, dy } = event;\n const scale = this.scale();\n const deltaX = scale ? dx / scale : dx;\n const deltaY = scale ? dy / scale : dy;\n\n this.interactService.updateDeltas(\n this.interactableId,\n this.registryId,\n { deltaX, deltaY },\n element\n );\n }\n\n setDragStyles(dragElement: HTMLElement) {\n this.renderer.setStyle(dragElement, 'touch-action', 'none');\n this.renderer.setStyle(dragElement, 'z-index', this.dragZIndex());\n this.renderer.setStyle(dragElement, 'position', 'absolute');\n // Prevents highlighting text if dragging over, which will interrupt the next drag action\n this.renderer.setStyle(dragElement, 'user-select', 'none');\n }\n\n addDragPropertiesToElement(nativeElement: TftDragElement) {\n this.renderer.setProperty(nativeElement, 'dropTarget', this.dropzone_dir || null);\n this.renderer.setProperty(nativeElement, 'dragOrigin', this.dropzone_dir || null);\n this.renderer.setProperty(nativeElement, 'dragRef', this);\n }\n\n mapDragEvent(event: NgDragEvent): TftDragEvent {\n const { target, dropzone } = event;\n const dropzoneElement = dropzone?.target || target.dropTarget?.el.nativeElement;\n const scale = this.scale();\n const positionInDropTarget = target && dropzoneElement\n ? this.interactService.calculatePositionInElement(dropzoneElement, this.previewRef, scale)\n : null;\n return {\n interactEvent: event,\n dragRef: this,\n dragOrigin: target.dragOrigin,\n dropTarget: target.dropTarget,\n positionInDropTarget,\n };\n }\n\n setPosition(x: number, y: number) {\n this.interactService.updatePosition(\n this.interactableId,\n this.registryId,\n { x, y },\n this.el.nativeElement\n );\n }\n\n alignPositionWithInputs(x: number, y: number) {\n if (!this.isValidPosition(x, y)) return;\n this.interactService.updatePosition(\n this.interactableId,\n this.registryId,\n { x, y },\n this.el.nativeElement\n );\n }\n\n isValidPosition(x: number, y: number) {\n return this.isNumeric(x) && this.isNumeric(y);\n }\n\n isNumeric(num: number) {\n return typeof num === 'number' && !isNaN(num);\n }\n\n initiateDragEvents(dragConfig: Partial<Interact.OrBoolean<DraggableOptions>>, nativeElement: HTMLElement) {\n const defaultDragConfig = {\n ...dragConfig,\n enabled: !(this.disabled() || this.dragDisabled()),\n ...(this.auto_scroll_dir && {\n autoScroll: {\n ...this.auto_scroll_dir.autoScrollConfig(),\n container: this.auto_scroll_dir.el.nativeElement as HTMLElement,\n },\n }),\n };\n return interact(nativeElement).draggable(defaultDragConfig)\n .on('dragstart', (event: NgDragEvent) => {\n const interaction = event.interaction;\n if (this.enableDragDefault() && interaction.pointerIsDown) {\n if (this._previewTemplate) {\n const viewRef = this._viewContainerRef.createEmbeddedView(this._previewTemplate.templateRef);\n this.previewRef = getRootNode(viewRef, this._document);\n } else {\n this.previewRef = cloneElement(this.el.nativeElement);\n }\n this.addDragPropertiesToElement(this.previewRef);\n this.setDragStyles(this.previewRef);\n\n this.dragRootEl.prepend(this.previewRef);\n const scale = this.account_for_scale_dir?.scale() || this.dragRoot()?.account_for_scale_dir?.scale() || 1;\n const { x, y } = this.interactService.calculatePositionInElement(this.dragRootEl, nativeElement, scale);\n this.interactService.updatePosition(this.interactableId, this.registryId, { x, y }, this.previewRef);\n if (!this.showPlaceholder()) {\n this.renderer.setStyle(this.el.nativeElement, 'display', 'none');\n }\n }\n if (this.auto_scroll_dir) {\n this.subscribeToScrollEvents();\n }\n this.dragStart.emit(this.mapDragEvent(event));\n })\n .on('dragmove', (event: NgDragEvent) => {\n if (this.enableDragDefault()) {\n const dragElement = this.dropzone_dir && this.previewRef || nativeElement;\n this.dragMoveListener(event, dragElement);\n }\n this.dragMove.emit(this.mapDragEvent(event));\n })\n .on('draginertiastart', (event: NgDragEvent) => {\n this.dragInertiaStart.emit(this.mapDragEvent(event));\n })\n .on('dragend', (event: NgDragEvent) => {\n const mappedEvent = this.mapDragEvent(event);\n if (!!this.dropzone_dir && this.dropzone_dir === event.target.dropTarget) {\n const { x, y } = mappedEvent.positionInDropTarget;\n this.setPosition(x, y);\n }\n this.renderer.setStyle(this.el.nativeElement, 'display', '');\n // Prevents triggering a click event on the drag root when dropping\n // a drag element, which can deselect drag items \n (this.drag_root_dir ?? this.dragRoot())?.suppressNextClick();\n this.dragEnd.emit(mappedEvent);\n if (this.auto_scroll_dir) {\n this.scrollEventsSubscription.unsubscribe();\n }\n if (this.el.nativeElement !== this.previewRef) {\n setTimeout(() => {\n this.dragRootEl.removeChild(this.previewRef);\n });\n }\n });\n }\n\n subscribeToScrollEvents() {\n this.scrollEventsSubscription = this.auto_scroll_dir.scrollDeltaObserver.subscribe(({ scrollLeft, scrollTop }) => {\n const deltaX = this.scale() ? scrollLeft / this.scale() : scrollLeft;\n const deltaY = this.scale() ? scrollTop / this.scale() : scrollTop;\n\n this.interactService.updateDeltas(\n this.interactableId,\n this.registryId,\n { deltaX, deltaY },\n this.previewRef\n );\n });\n }\n}\n\n/**\n * Component utils\n */\nfunction cloneElement(element: HTMLElement) {\n const clone = element.cloneNode(true) as HTMLElement;\n clone.removeAttribute('id');\n return clone;\n}\n","import { Directive, OnInit, OnDestroy, ElementRef, output, input, effect, computed, Renderer2, DOCUMENT, inject } from '@angular/core';\n\nimport interact from 'interactjs';\nimport { InteractService } from '../services/interact.service';\nimport { ResizableOptions, ResizeEvent, Interactable } from '@interactjs/types/index';\nimport { Subscription } from 'rxjs';\nimport { DraggableDirective } from './draggable.directive';\nimport { DropzoneDirective } from './dropzone.directive';\nimport { DragRootDirective } from './drag-root.directive';\nimport { AccountForScaleDirective } from './account-for-scale.directive';\nimport { NgResizeEvent, TftResizeEvent, DEFAULT_REGISTRY_ID, TftDragElement } from '../models';\nimport { AutoScrollDirective } from './auto-scroll.directive';\n\ninterface ActiveEdges {\n top: boolean;\n bottom: boolean;\n left: boolean;\n right: boolean;\n}\n\n/** @dynamic */\n@Directive({\n selector: '[tftResizable]',\n standalone: true,\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n // prevents touch events from colliding with mouse events on touch screen\n '[style.touch-action]': 'resizeDisabled() ? \"auto\" : \"none\"',\n // default to absolute here to accommodate likely use cases\n '[style.position]': 'position()',\n // follows interactjs suggested practices\n '[style.box-sizing]': '\"border-box\"',\n },\n})\nexport class ResizableDirective implements OnInit, OnDestroy {\n el = inject(ElementRef);\n private _document = inject<Document>(DOCUMENT);\n private interactService = inject(InteractService);\n private renderer = inject(Renderer2);\n private drag_root_dir = inject(DragRootDirective, { optional: true });\n account_for_scale_dir? = inject(AccountForScaleDirective, { optional: true });\n private draggable_dir = inject(DraggableDirective, { optional: true });\n private dropzone_dir = inject(DropzoneDirective, { optional: true, skipSelf: true });\n auto_scroll_dir? = inject(AutoScrollDirective, { optional: true, skipSelf: true });\n\n enableResizeDefault = input(true);\n position = input('absolute');\n resizeConfig = input<Partial<Interact.OrBoolean<ResizableOptions>>>();\n interactableId = input<string>();\n\n width = input<number>();\n height = input<number>();\n resizeDisabled = input(false);\n\n resizeStart = output<TftResizeEvent>();\n resizeMove = output<TftResizeEvent>();\n resizeInertiaStart = output<TftResizeEvent>();\n resizeEnd = output<TftResizeEvent>();\n\n defaultConfig: Partial<Interact.OrBoolean<ResizableOptions>> = {\n edges: { left: true, right: true, bottom: true, top: true },\n };\n registryId: string;\n interactable: Interactable;\n dragRootEl: HTMLElement;\n _interactableId: string;\n\n private activeEdges: ActiveEdges = { left: false, right: false, top: false, bottom: false };\n private interactableSubscription: Subscription;\n private scrollEventsSubscription: Subscription;\n\n // Falls back to 1 when there is no tftAccountForScale, as the draggable does; sizes are divided by it\n scale = computed(() =>\n this.account_for_scale_dir?.scale() || this.drag_root_dir?.account_for_scale_dir?.scale() || 1\n );\n\n constructor() {\n this.dragRootEl = (this.drag_root_dir?.el?.nativeElement as HTMLElement) || this._document.body;\n\n effect(() => {\n this.resizeConfig(); this.resizeDisabled();\n if (!this.interactable) return;\n this.interactable.resizable({ ...this.resizeConfig(), enabled: !this.resizeDisabled() });\n });\n\n effect(() => {\n this.alignDimensionsWithInputs(this.width(), this.height());\n });\n }\n\n ngOnInit() {\n this.addResizePropertiesToElement(this.el.nativeElement);\n\n this.registryId = this.dropzone_dir?._registeredId() || DEFAULT_REGISTRY_ID;\n this._interactableId = this.draggable_dir?.interactableId || this.interactService.addDraggableToRegistry(this.registryId, this.interactableId());\n\n this.interactable = this.initiateResizeEvents(\n { ...this.defaultConfig, ...this.resizeConfig() },\n this.el.nativeElement\n );\n\n this.alignDimensionsWithInputs(this.width(), this.height());\n\n this.interactableSubscription = this.interactService\n .getInteractableState(this._interactableId, this.registryId)\n .subscribe();\n }\n\n ngOnDestroy() {\n this.interactableSubscription.unsubscribe();\n this.interactService.destroyInteractable(this._interactableId, this.registryId);\n }\n\n resizeListener(event: ResizeEvent) {\n const element: TftDragElement = this.el.nativeElement;\n const scale = this.scale();\n const { deltaRect } = event;\n const deltaX = deltaRect.left / scale;\n const deltaY = deltaRect.top / scale;\n const rect = element.getBoundingClientRect();\n const width = (rect.width + deltaRect.width) / scale;\n const height = (rect.height + deltaRect.height) / scale;\n\n this.interactService.updateSize(\n this._interactableId,\n this.registryId,\n { deltaX, deltaY, width, height },\n this.el.nativeElement\n );\n }\n\n initiateResizeEvents(resizeConfig: Partial<Interact.OrBoolean<ResizableOptions>>, nativeElement: TftDragElement) {\n const defaultResizeConfig = {\n ...resizeConfig,\n enabled: !this.resizeDisabled(),\n ...(this.auto_scroll_dir && {\n autoScroll: {\n ...this.auto_scroll_dir.autoScrollConfig(),\n container: this.auto_scroll_dir.el.nativeElement as HTMLElement,\n },\n }),\n };\n const interactable = this.draggable_dir?.interactable || interact(nativeElement);\n return interactable.resizable(defaultResizeConfig)\n .on('resizestart', (event: NgResizeEvent) => {\n this.activeEdges = event.edges as ActiveEdges;\n if (this.auto_scroll_dir) {\n this.subscribeToScrollEvents();\n }\n this.resizeStart.emit(this.mapResizeEvent(event));\n })\n .on('resizemove', (event: NgResizeEvent) => {\n if (this.enableResizeDefault()) {\n this.resizeListener(event);\n }\n this.resizeMove.emit(this.mapResizeEvent(event));\n })\n .on('resizeinertiastart', (event: NgResizeEvent) => this.resizeInertiaStart.emit(this.mapResizeEvent(event)))\n .on('resizeend', (event: NgResizeEvent) => {\n if (this.auto_scroll_dir) {\n this.scrollEventsSubscription.unsubscribe();\n }\n this.activeEdges = { left: false, right: false, top: false, bottom: false };\n this.resizeEnd.emit(this.mapResizeEvent(event));\n });\n }\n\n mapResizeEvent(event: NgResizeEvent): TftResizeEvent {\n const target = this.el.nativeElement as TftDragElement;\n const relatedTarget = this.draggable_dir?.dropzone_dir?.el.nativeElement;\n const scale = this.scale();\n const positionInDropTarget = target && relatedTarget\n ? this.interactService.calculatePositionInElement(relatedTarget, target, scale)\n : null;\n return {\n interactEvent: event,\n resizeRef: this,\n dragRef: this.draggable_dir,\n dragOrigin: this.dropzone_dir,\n dropTarget: this.el.nativeElement.dropTarget,\n positionInDropTarget,\n size: {\n width: target.clientWidth / scale,\n height: target.clientHeight / scale,\n },\n };\n }\n\n alignDimensionsWithInputs(width: number, height: number) {\n this.interactService.updateSize(\n this._interactableId,\n this.registryId,\n { deltaX: 0, deltaY: 0, width, height },\n this.el.nativeElement\n );\n }\n\n addResizePropertiesToElement(nativeElement: TftDragElement) {\n this.renderer.setProperty(nativeElement, 'resizeRef', this);\n }\n\n subscribeToScrollEvents() {\n this.scrollEventsSubscription = this.auto_scroll_dir.scrollDeltaObserver.subscribe(({ scrollLeft, scrollTop }) => {\n const scale = this.scale();\n const target = this.el.nativeElement as HTMLElement;\n const { width: prevWidth, height: prevHeight } = target.getBoundingClientRect();\n\n const deltaHeight = scrollTop * (this.activeEdges.top ? -1 : this.activeEdges.bottom ? 1 : 0);\n const deltaWidth = scrollLeft * (this.activeEdges.left ? -1 : this.activeEdges.right ? 1 : 0);\n\n const height = (prevHeight + deltaHeight) / scale;\n const width = (prevWidth + deltaWidth) / scale;\n const deltaX = this.activeEdges.left ? (scrollLeft / scale) : 0;\n const deltaY = this.activeEdges.top ? (scrollTop / scale) : 0;\n this.interactService.updateSize(\n this._interactableId,\n this.registryId,\n { deltaX, deltaY, width, height },\n this.el.nativeElement as HTMLElement\n );\n });\n }\n}\n","import { Directive, ElementRef, OnInit, output, input, inject, effect } from '@angular/core';\nimport interact from 'interactjs';\nimport { DraggableOptions, GesturableOptions, Interactable, GestureEvent } from '@interactjs/types/index';\nimport { Observable } from 'rxjs';\nimport { TftCoords, TftGestureEvent } from '../models';\nimport { DraggableDirective } from '../directives';\n\n/** @dynamic */\n@Directive({\n selector: '[tftGesturable]',\n standalone: true,\n host: {\n // '[style.touch-action]': 'gestureDisabled() ? \"auto\" : \"none\"',\n '[id]': 'gesturableId()',\n },\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class GesturableDirective<D = any> implements OnInit {\n el = inject(ElementRef);\n private draggable_dir = inject(DraggableDirective, { optional: true });\n\n gesturableId = input<string>();\n gestureDisabled = input(false);\n gestureConfig = input<Partial<Interact.OrBoolean<DraggableOptions>>>();\n\n gestureStart = output<TftGestureEvent>();\n gestureMove = output<TftGestureEvent>();\n gestureEnd = output<TftGestureEvent>();\n\n interactableState: Observable<TftCoords>;\n interactable: Interactable;\n\n constructor() {\n effect(() => {\n this.gestureConfig(); this.gestureDisabled();\n if (!this.interactable) return;\n this.setGestureConfig();\n });\n }\n\n ngOnInit() {\n this.interactable = this.initiateGestureEvents(this.gestureConfig(), this.el.nativeElement);\n this.setGestureConfig();\n }\n\n setGestureConfig() {\n const enabled = !this.gestureDisabled();\n const gestureConfig = { ...this.gestureConfig(), enabled };\n this.interactable.gesturable(gestureConfig);\n }\n\n initiateGestureEvents(gestureConfig: Partial<Interact.OrBoolean<GesturableOptions>>, nativeElement: HTMLElement) {\n const defaultConfig: GesturableOptions = {\n enabled: !this.gestureDisabled(),\n };\n const interactable = this.draggable_dir?.interactable || interact(nativeElement);\n\n return interactable.gesturable({ ...defaultConfig, ...gestureConfig })\n .on('gesturestart', (event: GestureEvent) => {\n this.gestureStart.emit({ gestureRef: this, interactEvent: event });\n })\n .on('gesturemove', (event: GestureEvent) => {\n this.gestureMove.emit({ gestureRef: this, interactEvent: event });\n })\n .on('gestureend', (event: GestureEvent) => {\n this.gestureEnd.emit({ gestureRef: this, interactEvent: event });\n });\n }\n}\n","import { Directive, ElementRef, inject, input } from '@angular/core';\n\n@Directive({\n selector: '[tftApplyScale]',\n standalone: true,\n host: {\n '[style.font-size]': 'scale() + \"px\"',\n },\n})\nexport class ApplyScaleDirective {\n el = inject(ElementRef);\n\n scale = input(1);\n}\n","import {\n computed,\n Directive,\n ElementRef,\n HostListener,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nexport interface LassoRect {\n left: number;\n right: number;\n top: number;\n bottom: number;\n}\n\n/**\n * Directive that handles lasso (drag-to-select) interaction geometry.\n * Manages mouse tracking, the visual selection rectangle, and click suppression.\n * Domain-specific hit-testing (what got selected) is the consumer's responsibility:\n * listen to `(lassoCommit)` with the viewport-space bounding rect and query your own elements.\n *\n * Usage:\n * ```html\n * <div tftLasso #lasso=\"tftLasso\" [scale]=\"scale\"\n * (lassoStart)=\"onStart()\" (lassoCommit)=\"onCommit($event)\">\n * @if (lasso.lassoDisplayRect(); as r) {\n * <div class=\"lasso-rect\" [style.left.em]=\"r.x\" [style.top.em]=\"r.y\"\n * [style.width.em]=\"r.w\" [style.height.em]=\"r.h\"></div>\n * }\n * </div>\n * ```\n */\n@Directive({\n selector: '[tftLasso]',\n exportAs: 'tftLasso',\n standalone: true,\n host: {\n '[style.touch-action]': 'lassoDisabled() ? \"auto\" : \"none\"',\n '[style.font-size]': 'scale() + \"px\"',\n },\n})\nexport class LassoDirective {\n private host = inject(ElementRef<HTMLElement>);\n\n /** Scale factor applied to the host element — used to convert viewport px to container-local px. */\n scale = input(1);\n /** When true, lasso interaction is disabled. */\n lassoDisabled = input(false);\n\n /** Emitted on pointerdown (before any drag). Use to clear previous selection state. */\n lassoStart = output<void>();\n /**\n * Emitted on pointerup when the drag exceeded the 5 px threshold.\n * Rect is in viewport (clientX/Y) space — pass directly to getBoundingClientRect comparisons.\n */\n lassoCommit = output<LassoRect>();\n\n // -------------------------------------------------------------------------\n // Internal state\n // -------------------------------------------------------------------------\n private _startVP: { x: number; y: number } | null = null;\n private _currentVP: { x: number; y: number } | null = null;\n private _startLocal = signal<{ x: number; y: number } | null>(null);\n private _currentLocal = signal<{ x: number; y: number } | null>(null);\n private _suppressNextClick = false;\n private _activePointerId: number | null = null;\n\n /** True while a lasso drag is in progress. */\n isLassoing = signal(false);\n\n /**\n * Rectangle in canvas units (viewport px ÷ scale) — bind with em units:\n * [style.left.em], [style.top.em], [style.width.em], [style.height.em].\n * The directive sets font-size: scale on its host, so 1em = scale px visually.\n * Null when no drag is in progress.\n */\n lassoDisplayRect = computed(\n (): { x: number; y: number; w: number; h: number } | null => {\n const s = this._startLocal();\n const c = this._currentLocal();\n if (!s || !c || !this.isLassoing()) return null;\n return {\n x: Math.min(s.x, c.x),\n y: Math.min(s.y, c.y),\n w: Math.abs(c.x - s.x),\n h: Math.abs(c.y - s.y),\n };\n }\n );\n\n private toLocal(vpX: number, vpY: number): { x: number; y: number } {\n const rect = this.host.nativeElement.getBoundingClientRect();\n return {\n x: (vpX - rect.left) / this.scale(),\n y: (vpY - rect.top) / this.scale(),\n };\n }\n\n // -------------------------------------------------------------------------\n // Event handling\n // -------------------------------------------------------------------------\n\n @HostListener('pointerdown', ['$event'])\n onPointerDown(e: PointerEvent) {\n if (this.lassoDisabled()) return;\n if (e.target !== e.currentTarget) return; // ignore clicks on children\n this._activePointerId = e.pointerId;\n this.host.nativeElement.setPointerCapture(e.pointerId); // track movement outside element bounds\n this._startVP = { x: e.clientX, y: e.clientY };\n this._currentVP = { x: e.clientX, y: e.clientY };\n this._startLocal.set(this.toLocal(e.clientX, e.clientY));\n this._currentLocal.set(this.toLocal(e.clientX, e.clientY));\n this.isLassoing.set(true);\n this.lassoStart.emit();\n e.preventDefault();\n }\n\n @HostListener('pointermove', ['$event'])\n onPointerMove(e: PointerEvent) {\n if (!this.isLassoing() || e.pointerId !== this._activePointerId) return;\n this._currentVP = { x: e.clientX, y: e.clientY };\n this._currentLocal.set(this.toLocal(e.clientX, e.clientY));\n }\n\n @HostListener('pointerup', ['$event'])\n @HostListener('pointercancel', ['$event'])\n onPointerUp(e: PointerEvent) {\n if (!this.isLassoing() || e.pointerId !== this._activePointerId) return;\n this.isLassoing.set(false);\n this._activePointerId = null;\n const s = this._startVP!;\n const c = this._currentVP!;\n this._startVP = null;\n this._currentVP = null;\n this._startLocal.set(null);\n this._currentLocal.set(null);\n\n // Treat tiny drags (< 5 px) as background clicks — clear, don't commit\n if (Math.abs(c.x - s.x) < 5 && Math.abs(c.y - s.y) < 5) return;\n\n this._suppressNextClick = true;\n this.lassoCommit.emit({\n left: Math.min(s.x, c.x),\n right: Math.max(s.x, c.x),\n top: Math.min(s.y, c.y),\n bottom: Math.max(s.y, c.y),\n });\n }\n\n /** Suppresses the click event that fires immediately after a real lasso drag ends. */\n @HostListener('click', ['$event'])\n onClick(e: MouseEvent) {\n if (this._suppressNextClick) {\n this._suppressNextClick = false;\n e.stopPropagation();\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { ArrayOfNPipe } from './pipes/array-of-n.pipe';\nimport { ApplyScaleDirective, DraggableDirective, DragRootDirective, AutoScrollDirective, AccountForScaleDirective, GesturableDirective, ResizableDirective, DropzoneDirective, DragPreviewDirective, LassoDirective } from './directives';\nimport { InteractService } from './services/interact.service';\nimport { InteractRootConfig, INTERACT_ROOT_CONFIG } from './models';\n\nconst EXPORTS = [\n DraggableDirective,\n ResizableDirective,\n DropzoneDirective,\n GesturableDirective,\n DragRootDirective,\n AutoScrollDirective,\n AccountForScaleDirective,\n ApplyScaleDirective,\n DragPreviewDirective,\n LassoDirective,\n ArrayOfNPipe,\n];\n\n/**\n * @deprecated All directives are now standalone. Import them directly instead of using InteractModule.\n * InteractModule will be removed in the next major version.\n * `InteractModule.forRoot()` is still supported for providing InteractService configuration.\n */\n@NgModule({\n imports: [...EXPORTS],\n exports: [...EXPORTS],\n})\nexport class InteractModule {\n static forRoot(config: InteractRootConfig): ModuleWithProviders<InteractModule> {\n const defaultConfig: InteractRootConfig = { cssDimensionUnit: 'px' };\n return {\n ngModule: InteractModule,\n providers: [\n { provide: INTERACT_ROOT_CONFIG, useValue: { ...defaultConfig, ...config } },\n InteractService,\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["cloneElement"],"mappings":";;;;;;MAMa,YAAY,CAAA;AAEvB;;;;AAIG;IACH,SAAS,CAAC,CAAS,EAAE,GAAW,EAAA;QAC9B,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,QAAQ,IAAI,GAAG,GAAG,CAAC;QAC7D,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAC,CAAC,KAAI,CAAC,CAAC;IACtD;8GAVW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAZ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;AC5BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"tft-interact.mjs","sources":["../../../../libs/interact/src/lib/pipes/array-of-n.pipe.ts","../../../../libs/interact/src/lib/models/interact.ts","../../../../libs/interact/src/lib/services/interact.service.ts","../../../../libs/interact/src/lib/directives/account-for-scale.directive.ts","../../../../libs/interact/src/lib/directives/dropzone.directive.ts","../../../../libs/interact/src/lib/directives/drag-preview.directive.ts","../../../../libs/interact/src/lib/utils/helpers.ts","../../../../libs/interact/src/lib/directives/drag-root.directive.ts","../../../../libs/interact/src/lib/directives/auto-scroll.directive.ts","../../../../libs/interact/src/lib/directives/draggable.directive.ts","../../../../libs/interact/src/lib/directives/resizable.directive.ts","../../../../libs/interact/src/lib/directives/gesturable.directive.ts","../../../../libs/interact/src/lib/directives/apply-scale.directive.ts","../../../../libs/interact/src/lib/directives/lasso.directive.ts","../../../../libs/interact/src/lib/provide-interact.ts","../../../../libs/interact/src/lib/interact.module.ts","../../../../libs/interact/src/tft-interact.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'arrayOfN',\n standalone: true,\n})\nexport class ArrayOfNPipe implements PipeTransform {\n\n /**\n * \n * @param n the number to make an array of \n * @param max the max length of the array (useful for limiting rendering in ngFor loop)\n */\n transform(n: number, max: number): any {\n const length = ((max && max < n) || n === Infinity) ? max : n;\n return new Array(length).fill(length).map((x,i)=> i); \n }\n\n}\n","import { DropzoneDirective, DraggableDirective, GesturableDirective, ResizableDirective } from '../directives';\nimport { Point, DragEvent, ResizeEvent, Interactable, DropEvent, GestureEvent } from '@interactjs/types';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { InjectionToken } from '@angular/core';\n\n\n\nexport type CssDimensionUnit = 'px' | 'em';\nexport interface InteractRootConfig {\n cssDimensionUnit: CssDimensionUnit;\n}\nexport const INTERACT_ROOT_CONFIG = new InjectionToken<InteractRootConfig>('INTERACT_ROOT_CONFIG_PARAMS');\n\nexport const DEFAULT_REGISTRY_ID = 'DEFAULT';\n/**\n * Default initial value for Delta BehaviorSubject\n */\nexport const defaultDelta: Delta = {\n deltaX: 0,\n deltaY: 0,\n targetElement: null\n};\n/**\n * Default initial value for Size BehaviorSubject\n */\nexport const defaultSize: Size = {\n width: null,\n height: null,\n targetElement: null\n}\n/**\n * Default initial value for Position BehaviorSubject\n */\nexport const defaultPosition: Position = {\n x: 0,\n y: 0,\n targetElement: null\n}\n/**\n * The shape of the state/events/behavior system for each dropzone\n * and the DEFAULT_REGISTRY_ID system (for drop components initialized outside\n * of a dropzone).\n */\nexport interface InteractableSystem {\n deltas$: BehaviorSubject<Delta>;\n position$: BehaviorSubject<Position>;\n size$: BehaviorSubject<Size & Delta>;\n\n interactable$: Observable<TftCoords>;\n}\n/**\n * The key map of InteractableSystems. One for the drag components\n * that originated outside of a dropzone, plus one for each dropzone.\n */\nexport interface InteractableRegistry {\n [key: string]: InteractableSystem\n}\n\n/**\n * HTMLElement with helpful drag directives attached to facilitate moving drag data between dropzones\n */\nexport type TftDragElement = HTMLElement & {\n dragRef?: DraggableDirective\n dragOrigin?: DropzoneDirective\n dropTarget?: DropzoneDirective\n}\n\n/**\n * HTMLElement with helpful drag directives attached to facilitate moving drag data between dropzones\n */\n export type TftResizeElement = HTMLElement & {\n resizeRef?: ResizableDirective\n}\n\n/**\n * Extends the interact drop events by adding reference to the dropped components drag\n * directive to the html element. This gives the dropzone access to things like data\n * and parent dropzone of the dropped component.\n */\nexport type NgDropEvent = DropEvent & {\n draggable: Interactable & {\n target: TftDragElement;\n };\n relatedTarget: TftDragElement;\n};\n/**\n * Extends the interact resize events by adding a reference to the dragRef\n * directive to the html element.\n */\nexport type NgResizeEvent = ResizeEvent & {\n draggable: Interactable & {\n target: TftDragElement;\n };\n};\n/**\n * We extend the interact DragEvent a little here, adding to the target element references for:\n * - the component we are dragging (dragRef)\n * - the dropzone component where the drag component originated (dragOrigin)\n * - the dropzone component that it was dropped in (dropTarget)\n * This helps us to pass references to directive classes as events like dragenter and drag exit happens.\n * We use these references to emit a (mostly) consistent event across drag, drop, resize event.\n */\nexport type NgDragEvent = DragEvent & {\n dropzone: { target: HTMLElement},\n target: TftDragElement\n};\n/**\n * Event emitted when resizing, dragging, dropping\n */\nexport interface TftInteractableEvent {\n dragRef: DraggableDirective;\n dragOrigin?: DropzoneDirective;\n dropTarget?: DropzoneDirective;\n positionInDropTarget: Point;\n}\n/**\n * Event emitted on drop\n */\nexport interface TftDropEvent extends TftInteractableEvent {\n interactEvent: NgDropEvent\n}\n/**\n * Event emitted on drag\n */\nexport interface TftDragEvent extends TftInteractableEvent {\n interactEvent: NgDragEvent\n}\n/**\n * Event emitted on resize\n */\nexport interface TftResizeEvent extends TftInteractableEvent {\n interactEvent: ResizeEvent,\n resizeRef: ResizableDirective\n size: {\n width: number;\n height: number;\n }\n}\n\nexport type TftCoords= Delta & Position & Size;\n\nexport interface Delta {\n deltaX: number | null;\n deltaY: number | null;\n targetElement: TftDragElement | null;\n}\n\nexport interface Position {\n x: number | null;\n y: number | null;\n targetElement: TftDragElement | null;\n}\n\nexport interface Size {\n width: number | null;\n height: number | null;\n targetElement: TftResizeElement | null;\n}\n\nexport interface TftGestureEvent {\n gestureRef: GesturableDirective;\n interactEvent: GestureEvent;\n}\n","\nimport { Injectable, Renderer2, RendererFactory2, NgZone, inject } from '@angular/core';\nimport { BehaviorSubject, Observable, combineLatest } from 'rxjs';\nimport { tap, map, shareReplay } from 'rxjs/operators';\nimport {\n TftCoords, Delta, Size, Position, InteractableRegistry,\n defaultPosition, defaultSize, defaultDelta, DEFAULT_REGISTRY_ID, TftDragElement, TftResizeElement, INTERACT_ROOT_CONFIG, InteractRootConfig\n} from '../models';\n\n\n\n@Injectable({providedIn: 'root'})\nexport class InteractService {\n private rendererFactory = inject(RendererFactory2);\n private ngZone = inject(NgZone);\n rootConfig = inject(INTERACT_ROOT_CONFIG, { optional: true });\n\n\n private _interactableIndex = 0;\n private _dropzoneIndex = 0;\n private renderer: Renderer2;\n\n // TODO: consider using Map here\n readonly dragRegistrySystem: { [key: string]: InteractableRegistry } = { };\n private cssUnit = 'px'\n constructor() {\n const rootConfig = this.rootConfig;\n\n this.renderer = this.rendererFactory.createRenderer(null, null);\n this.cssUnit = rootConfig?.cssDimensionUnit || 'px';\n }\n\n addDeltaToPosition(delta: Delta, position: Position) {\n return {\n x: delta.deltaX + position.x,\n y: delta.deltaY + position.y,\n targetElement: position.targetElement || delta.targetElement\n }\n }\n\n addRegistryToSystem(customRegistryId: string | null = null) {\n const registryId = customRegistryId || this.createDropzoneId(this._dropzoneIndex++);\n this.dragRegistrySystem[registryId] = {};\n return registryId;\n }\n\n addDraggableToRegistry(customRegistryId = null, interactableId: string | null = null ) {\n const registryId = customRegistryId || DEFAULT_REGISTRY_ID;\n // if we pass an id to createInteractableId then it is used when creating the interactable\n // and returned, otherwise a new id is created for the draggable.\n const key = this.createInteractableId(interactableId );\n if (!Object.prototype.hasOwnProperty.call(this.dragRegistrySystem, registryId)) {\n this.dragRegistrySystem[registryId] = {};\n }\n this.dragRegistrySystem[registryId][key] = this.createInteractableState(defaultPosition, defaultSize, defaultDelta);\n return key\n }\n\n destroyInteractable(interactableId: string, registryId = DEFAULT_REGISTRY_ID) {\n const interactableSystem =this.dragRegistrySystem[registryId][interactableId];\n if(interactableSystem) {\n // unsubscribe from all the subscriptions if they're subscriptions\n for (const propName in interactableSystem) {\n const prop = interactableSystem[propName];\n if (prop.unsubscribe && typeof prop.unsubscribe === 'function' ) {\n prop.unsubscribe();\n };\n }\n delete this.dragRegistrySystem[registryId][interactableId];\n }\n }\n\n subscribeToInteractable(interactableId: string, registryId = DEFAULT_REGISTRY_ID) {\n return this.dragRegistrySystem[registryId][interactableId];\n }\n\n createInteractableState(initialPosition: Position, initialSize: Size, initialDelta: Delta ) {\n\n const deltas$ = new BehaviorSubject(initialDelta);\n // tracks the size of the element\n const size$ = new BehaviorSubject({...initialSize, ...initialDelta});\n // Stream of positions as they change\n const position$ = new BehaviorSubject(initialPosition);\n\n // All draggable data mapped together\n const interactable$: Observable<TftCoords> = combineLatest([\n size$.pipe(\n // startWith({...initialSize, ...initialDelta}),\n shareReplay(1),\n // filter(resizeEvent => !!resizeEvent.targetElement),\n tap(({deltaX, deltaY, width, height, targetElement}) => {\n // DOM writes only, so skip change detection when running with zone.js (no-op when zoneless)\n this.ngZone.runOutsideAngular(() => {\n this.setElementSize(width, height, targetElement);\n });\n // only reposition if necessary i.e when resizing left or up\n if(deltaX || deltaY) {\n deltas$.next({deltaX, deltaY, targetElement});\n }\n })\n ),\n deltas$.pipe(\n shareReplay(1),\n tap((delta) => {\n const position = position$.value;\n const newPosition = this.addDeltaToPosition(delta, position);\n position$.next(newPosition);\n })\n ),\n position$.pipe(\n shareReplay(1),\n tap( position => {\n this.ngZone.runOutsideAngular(() => {\n this.setElementTransform(position.x, position.y, position);\n })\n })\n )\n ]).pipe(\n shareReplay(1),\n map( ([size, deltas, position]): TftCoords=> {\n return {\n x: position.x,\n y: position.y,\n deltaX: deltas.deltaX,\n deltaY: deltas.deltaY,\n width: size.width,\n height: size.height,\n targetElement: size.targetElement || position.targetElement || deltas.targetElement\n }\n }),\n )\n // TODO: update system to handle only returning interactable$\n return {\n deltas$,\n position$,\n size$,\n interactable$\n }\n }\n\n createInteractableId(customInteractableId: string | null = null) {\n return customInteractableId || `interactable${this._interactableIndex++}`\n }\n\n createDropzoneId(index: number) {\n return `dropzone${index}`\n }\n\n getInteractableState( interactableId: string, registryId = DEFAULT_REGISTRY_ID) {\n return this.dragRegistrySystem[registryId][interactableId].interactable$;\n }\n\n updateDeltas(interactId: string, registryId: string, { deltaX, deltaY }, targetElement) {\n if (!this.interactableExistOnRegistry(interactId, registryId)) return;\n this.dragRegistrySystem[registryId][interactId].deltas$.next({ deltaX, deltaY, targetElement })\n }\n\n updatePosition(interactId: string, registryId: string, { x, y }: {x: number; y: number;}, targetElement) {\n if (!this.interactableExistOnRegistry(interactId, registryId)) return;\n this.dragRegistrySystem[registryId][interactId].position$.next({ x, y, targetElement })\n }\n\n updateSize(interactId: string, registryId: string, { deltaX, deltaY, width, height }, targetElement) {\n if (!this.interactableExistOnRegistry(interactId, registryId)) return\n this.dragRegistrySystem[registryId][interactId].size$.next({deltaX, deltaY, width, height, targetElement});\n }\n\n interactableExistOnRegistry(interactId: string, registryId = DEFAULT_REGISTRY_ID) {\n // eslint-disable-next-line no-prototype-builtins\n return this.dragRegistrySystem.hasOwnProperty(registryId) && this.dragRegistrySystem[registryId].hasOwnProperty(interactId);\n }\n /**\n * Uses renderer to set width and height of angular component\n * @param width the desired width of component\n * @param height the desired height of component\n * @param target the element to transform\n */\n setElementSize(width: number, height: number, target: TftResizeElement) {\n if(!target) return;\n this.renderer.setStyle(target, 'width', `${width}${this.cssUnit}`);\n this.renderer.setStyle(target, 'height', `${height}${this.cssUnit}`);\n }\n /**\n * Uses renderer to set position of angular component\n * @param x position on x axis\n * @param y position on y axis\n * @param target the element to transform\n */\n setElementTransform(x: number, y: number, position: Position ) {\n if(!position?.targetElement) return;\n this.renderer.setStyle(position.targetElement, 'left', `${x}${this.cssUnit}`);\n this.renderer.setStyle(position.targetElement, 'top', `${y}${this.cssUnit}`);\n }\n /**\n * Generates a translate string for the x and y arguments passed to\n * be passed to css transform\n * @param x the position along the x axis\n * @param y the position along the y axis\n */\n createTransformString(x: number, y: number) {\n return `translate3d(${x}${this.cssUnit}, ${y}${this.cssUnit}, 0)`\n }\n\n calculatePositionInElement(zoneElement: Interact.Element, dragElement: TftDragElement, scale?: number) {\n // TODO: this calculation may not cover a lot of scenarios, keep an eye out for possible improvements\n const zoneRect = zoneElement.getBoundingClientRect();\n const dragRect = dragElement.getBoundingClientRect();\n const position = scale\n ? {\n x: (dragRect.left - zoneRect.left) / scale || 1,\n y: (dragRect.top - zoneRect.top) / scale || 1\n } : {\n x: dragRect.left - zoneRect.left,\n y: dragRect.top - zoneRect.top\n };\n // console.log({ y:position.y, drt:dragRect.top, zrt: zoneRect.top})\n return position;\n }\n}\n","import { Directive, ElementRef, inject, input } from '@angular/core';\n\n/**\n * Use to apply scale to the element and tell the drag and resize directives to account for the scale when\n * @example <div tftAccountForScale [scale]=\"2.5\"> <div tftDraggable> </div> </div>\n * @note if `dragRoot` is used this directive should be used on the same element to ensure that the drag\n * element accounts for scale\n */\n@Directive({\n selector: '[tftAccountForScale]',\n standalone: true,\n})\nexport class AccountForScaleDirective {\n el = inject(ElementRef);\n\n scale = input(1);\n}\n","import { Directive, ElementRef, OnInit, output, input, inject, effect, signal, computed, Renderer2 } from '@angular/core';\nimport interact from 'interactjs';\nimport { DropzoneOptions, Interactable } from '@interactjs/types/index';\nimport { InteractService } from '../services/interact.service';\nimport { NgDropEvent, TftDragElement, TftDropEvent } from '../models';\nimport { AccountForScaleDirective } from './account-for-scale.directive';\n\nexport type PositionOption = 'relative' | 'absolute' | 'fixed' | 'static' | 'sticky' | 'unset' | 'inherit' | 'initial' | 'revert';\n\n@Directive({\n selector: '[tftDropzone]',\n standalone: true,\n host: {\n '[id]': '_registeredId()',\n '[style.position]': 'position()',\n },\n})\nexport class DropzoneDirective implements OnInit {\n el = inject(ElementRef);\n private renderer = inject(Renderer2);\n private interactService = inject(InteractService);\n private account_for_scale_dir = inject(AccountForScaleDirective, { optional: true });\n\n dropzoneId = input<string>();\n dropzoneConfig = input<DropzoneOptions>({});\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n dropzoneData = input<any>();\n position = input<PositionOption>('relative');\n\n dropActivate = output<TftDropEvent>();\n dragEnter = output<TftDropEvent>();\n dragLeave = output<TftDropEvent>();\n dragDrop = output<TftDropEvent>();\n\n dropzone: Interactable;\n /** The actual registered ID — may differ from the dropzoneId input if none was provided. Drives [id] host binding. */\n _registeredId = signal<string>(null);\n\n scale = computed(() => this.account_for_scale_dir?.scale());\n\n ngOnInit() {\n this.dropzone = this.connectDropzoneEvents(this.el.nativeElement, this.dropzoneConfig());\n this._registeredId.set(this.interactService.addRegistryToSystem(this.dropzoneId()));\n }\n\n constructor() {\n effect(() => {\n const config = this.dropzoneConfig();\n if (!this.dropzone) return;\n this.dropzone.dropzone(config);\n });\n }\n\n /**\n * Connects element to interact's dropzone events and returns a reference to the interactable\n */\n connectDropzoneEvents(nativeElement, dropzoneConfig: DropzoneOptions) {\n return interact(nativeElement).dropzone(dropzoneConfig)\n .on('dropactivate', (event: NgDropEvent) => {\n this.dropActivate.emit(this.mapDropzoneEvent(event));\n })\n .on('dragenter', (event: NgDropEvent) => {\n this.renderer.setProperty(event.relatedTarget, 'dropTarget', this);\n this.dragEnter.emit(this.mapDropzoneEvent(event));\n })\n .on('dragleave', (event: NgDropEvent) => {\n if (event.relatedTarget.dropTarget === this) {\n this.renderer.setProperty(event.relatedTarget, 'dropTarget', null);\n }\n this.dragLeave.emit(this.mapDropzoneEvent(event));\n })\n .on('drop', (event: NgDropEvent) => {\n this.dragDrop.emit(this.mapDropzoneEvent(event));\n });\n }\n\n /**\n * Maps the drop event emitted by interact to something a little easier to use\n */\n mapDropzoneEvent(event: NgDropEvent): TftDropEvent {\n const zoneElement = event.target;\n const dragElement = event.relatedTarget?.dragRef?.previewRef as TftDragElement;\n const scale = this.scale();\n const positionInDropTarget = zoneElement && dragElement\n ? this.interactService.calculatePositionInElement(zoneElement, dragElement, scale)\n : null;\n return {\n interactEvent: event,\n dragRef: dragElement.dragRef,\n dragOrigin: dragElement.dragOrigin,\n dropTarget: event.relatedTarget.dropTarget,\n positionInDropTarget,\n };\n }\n}\n","import { Directive, InjectionToken, TemplateRef, inject, input } from '@angular/core';\n\nexport const TFT_DRAG_PREVIEW = new InjectionToken<DragPreviewDirective>('DragPreviewDirective');\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'ng-template[tftDragPreview]',\n standalone: true,\n})\nexport class DragPreviewDirective<T = any> {\n templateRef = inject<TemplateRef<T>>(TemplateRef);\n\n dragData = input<T>();\n}\n","import { EmbeddedViewRef } from '@angular/core';\n\ninterface IEElement extends HTMLElement {\n msMatchesSelector: (selector: string) => boolean; //\n}\n\n/** Gets the closest ancestor of an element that matches a selector. */\nexport function getClosestMatchingAncestor(element: HTMLElement, selector: string) {\n let currentElement = element.parentElement as HTMLElement | null;\n\n while (currentElement) {\n // IE doesn't support `matches` so we have to fall back to `msMatchesSelector`.\n if (currentElement.matches ? currentElement.matches(selector) :\n (currentElement as IEElement).msMatchesSelector(selector)) {\n return currentElement;\n }\n\n currentElement = currentElement.parentElement;\n }\n\n return null;\n}\n\n\n/**\n * Create a copy of the HTML Element\n */\nexport function cloneElement(element: HTMLElement) {\n\n const clone = element.cloneNode(true) as HTMLElement;\n clone.removeAttribute('id');\n return clone;\n}\n\n/**\n * Gets the root HTML element of an embedded view.\n * If the root is not an HTML element it gets wrapped in one.\n */\nexport function getRootNode(viewRef: EmbeddedViewRef<any>, _document: Document): HTMLElement {\n const rootNodes: Node[] = viewRef.rootNodes;\n\n if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {\n return rootNodes[0] as HTMLElement;\n }\n\n const wrapper = _document.createElement('div');\n rootNodes.forEach(node => wrapper.appendChild(node));\n return wrapper;\n}\n","import { AccountForScaleDirective } from './account-for-scale.directive';\nimport { Directive, ElementRef, inject, OnDestroy } from '@angular/core';\n\n/**\n * Use this directive to select which element to attach the element to while dragging\n * @example <div tftDragRoot><div tftDraggable> </div> </div>\n * @note this directive will overwrite any style transformations (e.g. transform: scale(2); )\n */\n@Directive({\n selector: '[tftDragRoot]',\n exportAs: 'tftDragRoot',\n standalone: true,\n})\nexport class DragRootDirective implements OnDestroy {\n el = inject(ElementRef);\n // This is used when passing a dragRoot as in input to a draggable element that not a child of that dragRoot\n // It allows the the interact service to check if the drag root has some scaling applied to it and account for it when the component is dragged\n account_for_scale_dir? = inject(AccountForScaleDirective, { optional: true, self: true });\n\n private _suppressNextClick = false;\n private _captureListener: (e: MouseEvent) => void;\n\n constructor() {\n // Registered in capture phase so it fires before any bubble-phase listeners,\n // including Angular template (click) bindings on this element. Suppresses the\n // spurious click that fires after a drag ends when the clone (a direct child of\n // this element) receives the pointerup and bubbles the event up.\n this._captureListener = (event: MouseEvent) => {\n if (this._suppressNextClick) {\n this._suppressNextClick = false;\n event.stopImmediatePropagation();\n }\n };\n this.el.nativeElement.addEventListener('click', this._captureListener, true);\n }\n\n /**\n * Called by DraggableDirective on dragend to suppress the spurious click that\n * fires when the drag clone (appended as a direct child of this element) receives\n * the pointerup and bubbles a click event up to this element.\n */\n suppressNextClick() {\n this._suppressNextClick = true;\n }\n\n ngOnDestroy() {\n this.el.nativeElement.removeEventListener('click', this._captureListener, true);\n }\n}\n","import { Directive, ElementRef, HostListener, inject, input } from '@angular/core';\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { scan, shareReplay } from 'rxjs/operators';\n\ninterface ScrollObject { scrollTop: number, scrollLeft: number }\n\n@Directive({\n selector: '[tftAutoScroll]',\n standalone: true,\n})\nexport class AutoScrollDirective {\n el = inject(ElementRef);\n\n autoScrollConfig = input({\n margin: 50,\n distance: 3,\n interval: 50,\n speed: 300,\n enabled: true,\n });\n\n private scrollSubject: BehaviorSubject<ScrollObject>;\n readonly scrollObserver: Observable<ScrollObject>;\n readonly scrollDeltaObserver = new Subject<ScrollObject>();\n\n @HostListener('scroll', ['$event']) scroll(scrollEvent: Event) {\n const target = (scrollEvent.target as HTMLElement);\n const { scrollTop, scrollLeft } = target;\n this.scrollSubject.next({ scrollTop, scrollLeft });\n }\n\n constructor() {\n const el = this.el;\n const { scrollTop, scrollLeft } = (el.nativeElement as HTMLElement);\n this.scrollSubject = new BehaviorSubject({ scrollTop, scrollLeft });\n this.scrollObserver = this.scrollSubject.pipe(\n scan((previous, current) => {\n const scrollTop = current.scrollTop - previous.scrollTop;\n const scrollLeft = current.scrollLeft - previous.scrollLeft;\n this.scrollDeltaObserver.next({ scrollTop, scrollLeft });\n return current;\n }),\n shareReplay(1),\n );\n this.scrollObserver.subscribe();\n }\n}\n","import { Directive, ElementRef, input, output, OnInit, OnDestroy, effect, computed, Renderer2, ViewContainerRef, AfterViewInit, DOCUMENT, inject, contentChild } from '@angular/core';\n\nimport interact from 'interactjs';\nimport { InteractService } from '../services/interact.service';\nimport { DraggableOptions, Interactable } from '@interactjs/types/index';\nimport { Subscription, Observable } from 'rxjs';\nimport { DropzoneDirective } from './dropzone.directive';\nimport { NgDragEvent, TftDragEvent, DEFAULT_REGISTRY_ID, TftCoords, TftDragElement } from '../models';\nimport { DragPreviewDirective } from './drag-preview.directive';\nimport { getRootNode } from '../utils';\nimport { DragRootDirective } from './drag-root.directive';\nimport { AccountForScaleDirective } from './account-for-scale.directive';\nimport { AutoScrollDirective } from './auto-scroll.directive';\n\n/** @dynamic */\n@Directive({\n selector: '[tftDraggable]',\n standalone: true,\n host: {\n '[style.user-select]': 'dragDisabled() ? \"auto\" : \"none\"',\n '[style.touch-action]': 'dragDisabled() ? \"auto\" : \"none\"',\n '[style.position]': '\"absolute\"',\n '[id]': 'interactableId',\n },\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class DraggableDirective<D = any> implements OnInit, OnDestroy, AfterViewInit {\n el = inject(ElementRef);\n private interactService = inject(InteractService);\n private renderer = inject(Renderer2);\n private _viewContainerRef = inject(ViewContainerRef);\n private _document = inject<Document>(DOCUMENT);\n account_for_scale_dir? = inject(AccountForScaleDirective, { optional: true });\n dropzone_dir? = inject(DropzoneDirective, { optional: true, skipSelf: true });\n drag_root_dir? = inject(DragRootDirective, { optional: true, skipSelf: true });\n auto_scroll_dir? = inject(AutoScrollDirective, { optional: true, skipSelf: true });\n\n x = input<number>();\n y = input<number>();\n /** zIndex while dragging */\n dragZIndex = input(10000);\n /** zIndex while at rest */\n zIndex = input<number>();\n interactableId: string;\n dragData = input<D>();\n enableDragDefault = input(true);\n /**\n * @deprecated replaced by 'dragDisabled' property, please migrate before v13\n */\n disabled = input(false);\n dragDisabled = input(false);\n dragConfig = input<Partial<Interact.OrBoolean<DraggableOptions>>>();\n showPlaceholder = input(false);\n\n /**\n * The element we want to prepend the drag element to.\n * Use `tftDragRoot` directive on a parent element to set custom root element\n * @default document.body\n */\n dragRoot = input<DragRootDirective>();\n\n private dragRootEl: HTMLElement;\n\n dragStart = output<TftDragEvent>();\n dragMove = output<TftDragEvent>();\n dragInertiaStart = output<TftDragEvent>();\n dragEnd = output<TftDragEvent>();\n\n readonly _previewTemplate = contentChild(DragPreviewDirective);\n interactableState: Observable<TftCoords>;\n interactable: Interactable;\n private registryId: string;\n private interactableSubscription: Subscription;\n private scrollEventsSubscription: Subscription;\n\n previewRef: TftDragElement;\n\n scale = computed(() =>\n this.account_for_scale_dir?.scale() || this.drag_root_dir?.account_for_scale_dir?.scale() || this.dragRoot()?.account_for_scale_dir?.scale() || 1\n );\n\n syncPosition = effect(() => {\n this.alignPositionWithInputs(this.x(), this.y());\n });\n\n syncDragConfig = effect(() => {\n const config = this.dragConfig();\n const enabled = !(this.disabled() || this.dragDisabled());\n if (!this.interactable) return;\n this.setDragConfig(config, enabled);\n });\n\n ngOnInit() {\n const disabled = this.disabled();\n if (disabled) {\n console.warn(`It looks like your using the 'disabled' input on a tftDraggable directive, it has been deprecated and is replaced with 'dragDisabled', please migrate by v13`);\n }\n this.interactable = this.initiateDragEvents(this.dragConfig(), this.el.nativeElement);\n this.dragRootEl = (this.dragRoot()?.el?.nativeElement || this.drag_root_dir?.el?.nativeElement) as HTMLElement || this._document.body;\n this.registryId = this.dropzone_dir?._registeredId() || DEFAULT_REGISTRY_ID;\n this.interactableId = this.interactService.addDraggableToRegistry(this.registryId, this.interactableId);\n this.alignPositionWithInputs(this.x(), this.y());\n this.interactableState = this.interactService\n .getInteractableState(this.interactableId, this.registryId);\n this.interactableSubscription = this.interactableState.subscribe();\n this.setDragConfig(this.dragConfig(), !(this.disabled() || this.dragDisabled()));\n }\n\n setDragConfig(config: Partial<Interact.OrBoolean<DraggableOptions>>, enabled: boolean) {\n this.interactable.draggable({ ...config, enabled });\n }\n\n ngAfterViewInit() {\n this.addDragPropertiesToElement(this.el.nativeElement);\n if (!this.dropzone_dir) {\n this.previewRef = this.el.nativeElement;\n }\n }\n\n ngOnDestroy() {\n this.interactableSubscription.unsubscribe();\n this.interactService.destroyInteractable(this.interactableId, this.registryId);\n }\n\n dragMoveListener(event: NgDragEvent, element: Interact.Element) {\n const { dx, dy } = event;\n const scale = this.scale();\n const deltaX = scale ? dx / scale : dx;\n const deltaY = scale ? dy / scale : dy;\n\n this.interactService.updateDeltas(\n this.interactableId,\n this.registryId,\n { deltaX, deltaY },\n element\n );\n }\n\n setDragStyles(dragElement: HTMLElement) {\n this.renderer.setStyle(dragElement, 'touch-action', 'none');\n this.renderer.setStyle(dragElement, 'z-index', this.dragZIndex());\n this.renderer.setStyle(dragElement, 'position', 'absolute');\n // Prevents highlighting text if dragging over, which will interrupt the next drag action\n this.renderer.setStyle(dragElement, 'user-select', 'none');\n }\n\n addDragPropertiesToElement(nativeElement: TftDragElement) {\n this.renderer.setProperty(nativeElement, 'dropTarget', this.dropzone_dir || null);\n this.renderer.setProperty(nativeElement, 'dragOrigin', this.dropzone_dir || null);\n this.renderer.setProperty(nativeElement, 'dragRef', this);\n }\n\n mapDragEvent(event: NgDragEvent): TftDragEvent {\n const { target, dropzone } = event;\n const dropzoneElement = dropzone?.target || target.dropTarget?.el.nativeElement;\n const scale = this.scale();\n const positionInDropTarget = target && dropzoneElement\n ? this.interactService.calculatePositionInElement(dropzoneElement, this.previewRef, scale)\n : null;\n return {\n interactEvent: event,\n dragRef: this,\n dragOrigin: target.dragOrigin,\n dropTarget: target.dropTarget,\n positionInDropTarget,\n };\n }\n\n setPosition(x: number, y: number) {\n this.interactService.updatePosition(\n this.interactableId,\n this.registryId,\n { x, y },\n this.el.nativeElement\n );\n }\n\n alignPositionWithInputs(x: number, y: number) {\n if (!this.isValidPosition(x, y)) return;\n this.interactService.updatePosition(\n this.interactableId,\n this.registryId,\n { x, y },\n this.el.nativeElement\n );\n }\n\n isValidPosition(x: number, y: number) {\n return this.isNumeric(x) && this.isNumeric(y);\n }\n\n isNumeric(num: number) {\n return typeof num === 'number' && !isNaN(num);\n }\n\n initiateDragEvents(dragConfig: Partial<Interact.OrBoolean<DraggableOptions>>, nativeElement: HTMLElement) {\n const defaultDragConfig = {\n ...dragConfig,\n enabled: !(this.disabled() || this.dragDisabled()),\n ...(this.auto_scroll_dir && {\n autoScroll: {\n ...this.auto_scroll_dir.autoScrollConfig(),\n container: this.auto_scroll_dir.el.nativeElement as HTMLElement,\n },\n }),\n };\n return interact(nativeElement).draggable(defaultDragConfig)\n .on('dragstart', (event: NgDragEvent) => {\n const interaction = event.interaction;\n if (this.enableDragDefault() && interaction.pointerIsDown) {\n const _previewTemplate = this._previewTemplate();\n if (_previewTemplate) {\n const viewRef = this._viewContainerRef.createEmbeddedView(_previewTemplate.templateRef);\n // interact.js calls this handler outside of Angular's change detection, so render the preview's\n // bindings now instead of waiting for a CD pass that nothing would schedule without zone.js\n viewRef.detectChanges();\n this.previewRef = getRootNode(viewRef, this._document);\n } else {\n this.previewRef = cloneElement(this.el.nativeElement);\n }\n this.addDragPropertiesToElement(this.previewRef);\n this.setDragStyles(this.previewRef);\n\n this.dragRootEl.prepend(this.previewRef);\n const scale = this.account_for_scale_dir?.scale() || this.dragRoot()?.account_for_scale_dir?.scale() || 1;\n const { x, y } = this.interactService.calculatePositionInElement(this.dragRootEl, nativeElement, scale);\n this.interactService.updatePosition(this.interactableId, this.registryId, { x, y }, this.previewRef);\n if (!this.showPlaceholder()) {\n this.renderer.setStyle(this.el.nativeElement, 'display', 'none');\n }\n }\n if (this.auto_scroll_dir) {\n this.subscribeToScrollEvents();\n }\n this.dragStart.emit(this.mapDragEvent(event));\n })\n .on('dragmove', (event: NgDragEvent) => {\n if (this.enableDragDefault()) {\n const dragElement = this.dropzone_dir && this.previewRef || nativeElement;\n this.dragMoveListener(event, dragElement);\n }\n this.dragMove.emit(this.mapDragEvent(event));\n })\n .on('draginertiastart', (event: NgDragEvent) => {\n this.dragInertiaStart.emit(this.mapDragEvent(event));\n })\n .on('dragend', (event: NgDragEvent) => {\n const mappedEvent = this.mapDragEvent(event);\n if (!!this.dropzone_dir && this.dropzone_dir === event.target.dropTarget) {\n const { x, y } = mappedEvent.positionInDropTarget;\n this.setPosition(x, y);\n }\n this.renderer.setStyle(this.el.nativeElement, 'display', '');\n // Prevents triggering a click event on the drag root when dropping\n // a drag element, which can deselect drag items \n (this.drag_root_dir ?? this.dragRoot())?.suppressNextClick();\n this.dragEnd.emit(mappedEvent);\n if (this.auto_scroll_dir) {\n this.scrollEventsSubscription.unsubscribe();\n }\n if (this.el.nativeElement !== this.previewRef) {\n // interact.js fires `dragend` before `drop`, and the drop handlers read the preview element\n // (it is the drop event's relatedTarget), so it must outlive the current event dispatch.\n setTimeout(() => {\n this.dragRootEl.removeChild(this.previewRef);\n });\n }\n });\n }\n\n subscribeToScrollEvents() {\n this.scrollEventsSubscription = this.auto_scroll_dir.scrollDeltaObserver.subscribe(({ scrollLeft, scrollTop }) => {\n const deltaX = this.scale() ? scrollLeft / this.scale() : scrollLeft;\n const deltaY = this.scale() ? scrollTop / this.scale() : scrollTop;\n\n this.interactService.updateDeltas(\n this.interactableId,\n this.registryId,\n { deltaX, deltaY },\n this.previewRef\n );\n });\n }\n}\n\n/**\n * Component utils\n */\nfunction cloneElement(element: HTMLElement) {\n const clone = element.cloneNode(true) as HTMLElement;\n clone.removeAttribute('id');\n return clone;\n}\n","import { Directive, OnInit, OnDestroy, ElementRef, output, input, effect, computed, Renderer2, DOCUMENT, inject } from '@angular/core';\n\nimport interact from 'interactjs';\nimport { InteractService } from '../services/interact.service';\nimport { ResizableOptions, ResizeEvent, Interactable } from '@interactjs/types/index';\nimport { Subscription } from 'rxjs';\nimport { DraggableDirective } from './draggable.directive';\nimport { DropzoneDirective } from './dropzone.directive';\nimport { DragRootDirective } from './drag-root.directive';\nimport { AccountForScaleDirective } from './account-for-scale.directive';\nimport { NgResizeEvent, TftResizeEvent, DEFAULT_REGISTRY_ID, TftDragElement } from '../models';\nimport { AutoScrollDirective } from './auto-scroll.directive';\n\ninterface ActiveEdges {\n top: boolean;\n bottom: boolean;\n left: boolean;\n right: boolean;\n}\n\n/** @dynamic */\n@Directive({\n selector: '[tftResizable]',\n standalone: true,\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n // prevents touch events from colliding with mouse events on touch screen\n '[style.touch-action]': 'resizeDisabled() ? \"auto\" : \"none\"',\n // default to absolute here to accommodate likely use cases\n '[style.position]': 'position()',\n // follows interactjs suggested practices\n '[style.box-sizing]': '\"border-box\"',\n },\n})\nexport class ResizableDirective implements OnInit, OnDestroy {\n el = inject(ElementRef);\n private _document = inject<Document>(DOCUMENT);\n private interactService = inject(InteractService);\n private renderer = inject(Renderer2);\n private drag_root_dir = inject(DragRootDirective, { optional: true });\n account_for_scale_dir? = inject(AccountForScaleDirective, { optional: true });\n private draggable_dir = inject(DraggableDirective, { optional: true });\n private dropzone_dir = inject(DropzoneDirective, { optional: true, skipSelf: true });\n auto_scroll_dir? = inject(AutoScrollDirective, { optional: true, skipSelf: true });\n\n enableResizeDefault = input(true);\n position = input('absolute');\n resizeConfig = input<Partial<Interact.OrBoolean<ResizableOptions>>>();\n interactableId = input<string>();\n\n width = input<number>();\n height = input<number>();\n resizeDisabled = input(false);\n\n resizeStart = output<TftResizeEvent>();\n resizeMove = output<TftResizeEvent>();\n resizeInertiaStart = output<TftResizeEvent>();\n resizeEnd = output<TftResizeEvent>();\n\n defaultConfig: Partial<Interact.OrBoolean<ResizableOptions>> = {\n edges: { left: true, right: true, bottom: true, top: true },\n };\n registryId: string;\n interactable: Interactable;\n dragRootEl: HTMLElement;\n _interactableId: string;\n\n private activeEdges: ActiveEdges = { left: false, right: false, top: false, bottom: false };\n private interactableSubscription: Subscription;\n private scrollEventsSubscription: Subscription;\n\n // Falls back to 1 when there is no tftAccountForScale, as the draggable does; sizes are divided by it\n scale = computed(() =>\n this.account_for_scale_dir?.scale() || this.drag_root_dir?.account_for_scale_dir?.scale() || 1\n );\n\n constructor() {\n this.dragRootEl = (this.drag_root_dir?.el?.nativeElement as HTMLElement) || this._document.body;\n\n effect(() => {\n this.resizeConfig(); this.resizeDisabled();\n if (!this.interactable) return;\n this.interactable.resizable({ ...this.resizeConfig(), enabled: !this.resizeDisabled() });\n });\n\n effect(() => {\n this.alignDimensionsWithInputs(this.width(), this.height());\n });\n }\n\n ngOnInit() {\n this.addResizePropertiesToElement(this.el.nativeElement);\n\n this.registryId = this.dropzone_dir?._registeredId() || DEFAULT_REGISTRY_ID;\n this._interactableId = this.draggable_dir?.interactableId || this.interactService.addDraggableToRegistry(this.registryId, this.interactableId());\n\n this.interactable = this.initiateResizeEvents(\n { ...this.defaultConfig, ...this.resizeConfig() },\n this.el.nativeElement\n );\n\n this.alignDimensionsWithInputs(this.width(), this.height());\n\n this.interactableSubscription = this.interactService\n .getInteractableState(this._interactableId, this.registryId)\n .subscribe();\n }\n\n ngOnDestroy() {\n this.interactableSubscription.unsubscribe();\n this.interactService.destroyInteractable(this._interactableId, this.registryId);\n }\n\n resizeListener(event: ResizeEvent) {\n const element: TftDragElement = this.el.nativeElement;\n const scale = this.scale();\n const { deltaRect } = event;\n const deltaX = deltaRect.left / scale;\n const deltaY = deltaRect.top / scale;\n const rect = element.getBoundingClientRect();\n const width = (rect.width + deltaRect.width) / scale;\n const height = (rect.height + deltaRect.height) / scale;\n\n this.interactService.updateSize(\n this._interactableId,\n this.registryId,\n { deltaX, deltaY, width, height },\n this.el.nativeElement\n );\n }\n\n initiateResizeEvents(resizeConfig: Partial<Interact.OrBoolean<ResizableOptions>>, nativeElement: TftDragElement) {\n const defaultResizeConfig = {\n ...resizeConfig,\n enabled: !this.resizeDisabled(),\n ...(this.auto_scroll_dir && {\n autoScroll: {\n ...this.auto_scroll_dir.autoScrollConfig(),\n container: this.auto_scroll_dir.el.nativeElement as HTMLElement,\n },\n }),\n };\n const interactable = this.draggable_dir?.interactable || interact(nativeElement);\n return interactable.resizable(defaultResizeConfig)\n .on('resizestart', (event: NgResizeEvent) => {\n this.activeEdges = event.edges as ActiveEdges;\n if (this.auto_scroll_dir) {\n this.subscribeToScrollEvents();\n }\n this.resizeStart.emit(this.mapResizeEvent(event));\n })\n .on('resizemove', (event: NgResizeEvent) => {\n if (this.enableResizeDefault()) {\n this.resizeListener(event);\n }\n this.resizeMove.emit(this.mapResizeEvent(event));\n })\n .on('resizeinertiastart', (event: NgResizeEvent) => this.resizeInertiaStart.emit(this.mapResizeEvent(event)))\n .on('resizeend', (event: NgResizeEvent) => {\n if (this.auto_scroll_dir) {\n this.scrollEventsSubscription.unsubscribe();\n }\n this.activeEdges = { left: false, right: false, top: false, bottom: false };\n this.resizeEnd.emit(this.mapResizeEvent(event));\n });\n }\n\n mapResizeEvent(event: NgResizeEvent): TftResizeEvent {\n const target = this.el.nativeElement as TftDragElement;\n const relatedTarget = this.draggable_dir?.dropzone_dir?.el.nativeElement;\n const scale = this.scale();\n const positionInDropTarget = target && relatedTarget\n ? this.interactService.calculatePositionInElement(relatedTarget, target, scale)\n : null;\n return {\n interactEvent: event,\n resizeRef: this,\n dragRef: this.draggable_dir,\n dragOrigin: this.dropzone_dir,\n dropTarget: this.el.nativeElement.dropTarget,\n positionInDropTarget,\n size: {\n width: target.clientWidth / scale,\n height: target.clientHeight / scale,\n },\n };\n }\n\n alignDimensionsWithInputs(width: number, height: number) {\n this.interactService.updateSize(\n this._interactableId,\n this.registryId,\n { deltaX: 0, deltaY: 0, width, height },\n this.el.nativeElement\n );\n }\n\n addResizePropertiesToElement(nativeElement: TftDragElement) {\n this.renderer.setProperty(nativeElement, 'resizeRef', this);\n }\n\n subscribeToScrollEvents() {\n this.scrollEventsSubscription = this.auto_scroll_dir.scrollDeltaObserver.subscribe(({ scrollLeft, scrollTop }) => {\n const scale = this.scale();\n const target = this.el.nativeElement as HTMLElement;\n const { width: prevWidth, height: prevHeight } = target.getBoundingClientRect();\n\n const deltaHeight = scrollTop * (this.activeEdges.top ? -1 : this.activeEdges.bottom ? 1 : 0);\n const deltaWidth = scrollLeft * (this.activeEdges.left ? -1 : this.activeEdges.right ? 1 : 0);\n\n const height = (prevHeight + deltaHeight) / scale;\n const width = (prevWidth + deltaWidth) / scale;\n const deltaX = this.activeEdges.left ? (scrollLeft / scale) : 0;\n const deltaY = this.activeEdges.top ? (scrollTop / scale) : 0;\n this.interactService.updateSize(\n this._interactableId,\n this.registryId,\n { deltaX, deltaY, width, height },\n this.el.nativeElement as HTMLElement\n );\n });\n }\n}\n","import { Directive, ElementRef, OnInit, output, input, inject, effect } from '@angular/core';\nimport interact from 'interactjs';\nimport { DraggableOptions, GesturableOptions, Interactable, GestureEvent } from '@interactjs/types/index';\nimport { Observable } from 'rxjs';\nimport { TftCoords, TftGestureEvent } from '../models';\nimport { DraggableDirective } from '../directives';\n\n/** @dynamic */\n@Directive({\n selector: '[tftGesturable]',\n standalone: true,\n host: {\n // '[style.touch-action]': 'gestureDisabled() ? \"auto\" : \"none\"',\n '[id]': 'gesturableId()',\n },\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class GesturableDirective<D = any> implements OnInit {\n el = inject(ElementRef);\n private draggable_dir = inject(DraggableDirective, { optional: true });\n\n gesturableId = input<string>();\n gestureDisabled = input(false);\n gestureConfig = input<Partial<Interact.OrBoolean<DraggableOptions>>>();\n\n gestureStart = output<TftGestureEvent>();\n gestureMove = output<TftGestureEvent>();\n gestureEnd = output<TftGestureEvent>();\n\n interactableState: Observable<TftCoords>;\n interactable: Interactable;\n\n constructor() {\n effect(() => {\n this.gestureConfig(); this.gestureDisabled();\n if (!this.interactable) return;\n this.setGestureConfig();\n });\n }\n\n ngOnInit() {\n this.interactable = this.initiateGestureEvents(this.gestureConfig(), this.el.nativeElement);\n this.setGestureConfig();\n }\n\n setGestureConfig() {\n const enabled = !this.gestureDisabled();\n const gestureConfig = { ...this.gestureConfig(), enabled };\n this.interactable.gesturable(gestureConfig);\n }\n\n initiateGestureEvents(gestureConfig: Partial<Interact.OrBoolean<GesturableOptions>>, nativeElement: HTMLElement) {\n const defaultConfig: GesturableOptions = {\n enabled: !this.gestureDisabled(),\n };\n const interactable = this.draggable_dir?.interactable || interact(nativeElement);\n\n return interactable.gesturable({ ...defaultConfig, ...gestureConfig })\n .on('gesturestart', (event: GestureEvent) => {\n this.gestureStart.emit({ gestureRef: this, interactEvent: event });\n })\n .on('gesturemove', (event: GestureEvent) => {\n this.gestureMove.emit({ gestureRef: this, interactEvent: event });\n })\n .on('gestureend', (event: GestureEvent) => {\n this.gestureEnd.emit({ gestureRef: this, interactEvent: event });\n });\n }\n}\n","import { Directive, ElementRef, inject, input } from '@angular/core';\n\n@Directive({\n selector: '[tftApplyScale]',\n standalone: true,\n host: {\n '[style.font-size]': 'scale() + \"px\"',\n },\n})\nexport class ApplyScaleDirective {\n el = inject(ElementRef);\n\n scale = input(1);\n}\n","import {\n computed,\n Directive,\n ElementRef,\n HostListener,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nexport interface LassoRect {\n left: number;\n right: number;\n top: number;\n bottom: number;\n}\n\n/**\n * Directive that handles lasso (drag-to-select) interaction geometry.\n * Manages mouse tracking, the visual selection rectangle, and click suppression.\n * Domain-specific hit-testing (what got selected) is the consumer's responsibility:\n * listen to `(lassoCommit)` with the viewport-space bounding rect and query your own elements.\n *\n * Usage:\n * ```html\n * <div tftLasso #lasso=\"tftLasso\" [scale]=\"scale\"\n * (lassoStart)=\"onStart()\" (lassoCommit)=\"onCommit($event)\">\n * @if (lasso.lassoDisplayRect(); as r) {\n * <div class=\"lasso-rect\" [style.left.em]=\"r.x\" [style.top.em]=\"r.y\"\n * [style.width.em]=\"r.w\" [style.height.em]=\"r.h\"></div>\n * }\n * </div>\n * ```\n */\n@Directive({\n selector: '[tftLasso]',\n exportAs: 'tftLasso',\n standalone: true,\n host: {\n '[style.touch-action]': 'lassoDisabled() ? \"auto\" : \"none\"',\n '[style.font-size]': 'scale() + \"px\"',\n },\n})\nexport class LassoDirective {\n private host = inject(ElementRef<HTMLElement>);\n\n /** Scale factor applied to the host element — used to convert viewport px to container-local px. */\n scale = input(1);\n /** When true, lasso interaction is disabled. */\n lassoDisabled = input(false);\n\n /** Emitted on pointerdown (before any drag). Use to clear previous selection state. */\n lassoStart = output<void>();\n /**\n * Emitted on pointerup when the drag exceeded the 5 px threshold.\n * Rect is in viewport (clientX/Y) space — pass directly to getBoundingClientRect comparisons.\n */\n lassoCommit = output<LassoRect>();\n\n // -------------------------------------------------------------------------\n // Internal state\n // -------------------------------------------------------------------------\n private _startVP: { x: number; y: number } | null = null;\n private _currentVP: { x: number; y: number } | null = null;\n private _startLocal = signal<{ x: number; y: number } | null>(null);\n private _currentLocal = signal<{ x: number; y: number } | null>(null);\n private _suppressNextClick = false;\n private _activePointerId: number | null = null;\n\n /** True while a lasso drag is in progress. */\n isLassoing = signal(false);\n\n /**\n * Rectangle in canvas units (viewport px ÷ scale) — bind with em units:\n * [style.left.em], [style.top.em], [style.width.em], [style.height.em].\n * The directive sets font-size: scale on its host, so 1em = scale px visually.\n * Null when no drag is in progress.\n */\n lassoDisplayRect = computed(\n (): { x: number; y: number; w: number; h: number } | null => {\n const s = this._startLocal();\n const c = this._currentLocal();\n if (!s || !c || !this.isLassoing()) return null;\n return {\n x: Math.min(s.x, c.x),\n y: Math.min(s.y, c.y),\n w: Math.abs(c.x - s.x),\n h: Math.abs(c.y - s.y),\n };\n }\n );\n\n private toLocal(vpX: number, vpY: number): { x: number; y: number } {\n const rect = this.host.nativeElement.getBoundingClientRect();\n return {\n x: (vpX - rect.left) / this.scale(),\n y: (vpY - rect.top) / this.scale(),\n };\n }\n\n // -------------------------------------------------------------------------\n // Event handling\n // -------------------------------------------------------------------------\n\n @HostListener('pointerdown', ['$event'])\n onPointerDown(e: PointerEvent) {\n if (this.lassoDisabled()) return;\n if (e.target !== e.currentTarget) return; // ignore clicks on children\n this._activePointerId = e.pointerId;\n this.host.nativeElement.setPointerCapture(e.pointerId); // track movement outside element bounds\n this._startVP = { x: e.clientX, y: e.clientY };\n this._currentVP = { x: e.clientX, y: e.clientY };\n this._startLocal.set(this.toLocal(e.clientX, e.clientY));\n this._currentLocal.set(this.toLocal(e.clientX, e.clientY));\n this.isLassoing.set(true);\n this.lassoStart.emit();\n e.preventDefault();\n }\n\n @HostListener('pointermove', ['$event'])\n onPointerMove(e: PointerEvent) {\n if (!this.isLassoing() || e.pointerId !== this._activePointerId) return;\n this._currentVP = { x: e.clientX, y: e.clientY };\n this._currentLocal.set(this.toLocal(e.clientX, e.clientY));\n }\n\n @HostListener('pointerup', ['$event'])\n @HostListener('pointercancel', ['$event'])\n onPointerUp(e: PointerEvent) {\n if (!this.isLassoing() || e.pointerId !== this._activePointerId) return;\n this.isLassoing.set(false);\n this._activePointerId = null;\n const s = this._startVP!;\n const c = this._currentVP!;\n this._startVP = null;\n this._currentVP = null;\n this._startLocal.set(null);\n this._currentLocal.set(null);\n\n // Treat tiny drags (< 5 px) as background clicks — clear, don't commit\n if (Math.abs(c.x - s.x) < 5 && Math.abs(c.y - s.y) < 5) return;\n\n this._suppressNextClick = true;\n this.lassoCommit.emit({\n left: Math.min(s.x, c.x),\n right: Math.max(s.x, c.x),\n top: Math.min(s.y, c.y),\n bottom: Math.max(s.y, c.y),\n });\n }\n\n /** Suppresses the click event that fires immediately after a real lasso drag ends. */\n @HostListener('click', ['$event'])\n onClick(e: MouseEvent) {\n if (this._suppressNextClick) {\n this._suppressNextClick = false;\n e.stopPropagation();\n }\n }\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { INTERACT_ROOT_CONFIG, InteractRootConfig } from './models';\nimport { InteractService } from './services/interact.service';\n\n/**\n * Provides the interact configuration and `InteractService`.\n *\n * Add it to the application providers, or to a route's `providers` to scope it to that route.\n * Options that are left out fall back to the defaults (`cssDimensionUnit: 'px'`).\n *\n * @example\n * bootstrapApplication(AppComponent, {\n * providers: [provideInteract({ cssDimensionUnit: 'em' })],\n * });\n */\nexport function provideInteract(\n config: Partial<InteractRootConfig> = {}\n): EnvironmentProviders {\n const defaultConfig: InteractRootConfig = { cssDimensionUnit: 'px' };\n return makeEnvironmentProviders([\n {\n provide: INTERACT_ROOT_CONFIG,\n useValue: { ...defaultConfig, ...config },\n },\n InteractService,\n ]);\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { ArrayOfNPipe } from './pipes/array-of-n.pipe';\nimport { ApplyScaleDirective, DraggableDirective, DragRootDirective, AutoScrollDirective, AccountForScaleDirective, GesturableDirective, ResizableDirective, DropzoneDirective, DragPreviewDirective, LassoDirective } from './directives';\nimport { InteractRootConfig } from './models';\nimport { provideInteract } from './provide-interact';\n\nconst EXPORTS = [\n DraggableDirective,\n ResizableDirective,\n DropzoneDirective,\n GesturableDirective,\n DragRootDirective,\n AutoScrollDirective,\n AccountForScaleDirective,\n ApplyScaleDirective,\n DragPreviewDirective,\n LassoDirective,\n ArrayOfNPipe,\n];\n\n/**\n * @deprecated Import the standalone directives and pipe (DraggableDirective, ResizableDirective, etc.) directly\n * and use `provideInteract()` to configure them. This module will be removed in the next major version.\n */\n@NgModule({\n imports: [...EXPORTS],\n exports: [...EXPORTS],\n})\nexport class InteractModule {\n /**\n * @deprecated Use `provideInteract(config)` in your application or route providers.\n */\n static forRoot(config: InteractRootConfig): ModuleWithProviders<InteractModule> {\n return {\n ngModule: InteractModule,\n providers: [provideInteract(config)],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["cloneElement"],"mappings":";;;;;;MAMa,YAAY,CAAA;AAEvB;;;;AAIG;IACH,SAAS,CAAC,CAAS,EAAE,GAAW,EAAA;QAC9B,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,QAAQ,IAAI,GAAG,GAAG,CAAC;QAC7D,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAC,C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AAkB;YAClB,iBAAiB;YACjB,mBAAmB;YACnB,iBAAiB;YACjB,mBAAmB;YACnB,wBAAwB;YACxB,mBAAmB;YACnB,oBAAoB;YACpB,cAAc;AACd,YAAA,YAAY,aAVZ,kBAAkB;YAClB,kBAAkB;YAClB,iBAAiB;YACjB,mBAAmB;YACnB,iBAAiB;YACjB,mBAAmB;YACnB,wBAAwB;YACxB,mBAAmB;YACnB,oBAAoB;YACpB,cAAc;YACd,YAAY,CAAA,EAAA,CAAA,CAAA;+GAWD,cAAc,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACtB,iBAAA;;;AC3BD;;AAEG;;;;"}
|
package/package.json
CHANGED
package/types/tft-interact.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnInit, ElementRef, TemplateRef, InjectionToken, OnDestroy, AfterViewInit, PipeTransform, ModuleWithProviders, EmbeddedViewRef } from '@angular/core';
|
|
2
|
+
import { OnInit, ElementRef, TemplateRef, InjectionToken, OnDestroy, AfterViewInit, PipeTransform, ModuleWithProviders, EmbeddedViewRef, EnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as _interactjs_core_Interactable from '@interactjs/core/Interactable';
|
|
4
4
|
import * as _interactjs_types_index from '@interactjs/types/index';
|
|
5
5
|
import { DropzoneOptions, Interactable, DraggableOptions, ResizableOptions, ResizeEvent, GesturableOptions } from '@interactjs/types/index';
|
|
6
6
|
import { Observable, Subject, BehaviorSubject } from 'rxjs';
|
|
7
7
|
import { Point, DropEvent, Interactable as Interactable$1, DragEvent, ResizeEvent as ResizeEvent$1, GestureEvent } from '@interactjs/types';
|
|
8
|
+
import * as _tft_interact from '@tft/interact';
|
|
8
9
|
|
|
9
10
|
type PositionOption = 'relative' | 'absolute' | 'fixed' | 'static' | 'sticky' | 'unset' | 'inherit' | 'initial' | 'revert';
|
|
10
11
|
declare class DropzoneDirective implements OnInit {
|
|
@@ -141,7 +142,7 @@ declare class DraggableDirective<D = any> implements OnInit, OnDestroy, AfterVie
|
|
|
141
142
|
dragMove: _angular_core.OutputEmitterRef<TftDragEvent>;
|
|
142
143
|
dragInertiaStart: _angular_core.OutputEmitterRef<TftDragEvent>;
|
|
143
144
|
dragEnd: _angular_core.OutputEmitterRef<TftDragEvent>;
|
|
144
|
-
_previewTemplate: DragPreviewDirective
|
|
145
|
+
readonly _previewTemplate: _angular_core.Signal<DragPreviewDirective<any>>;
|
|
145
146
|
interactableState: Observable<TftCoords>;
|
|
146
147
|
interactable: Interactable;
|
|
147
148
|
private registryId;
|
|
@@ -455,11 +456,13 @@ declare class ArrayOfNPipe implements PipeTransform {
|
|
|
455
456
|
}
|
|
456
457
|
|
|
457
458
|
/**
|
|
458
|
-
* @deprecated
|
|
459
|
-
*
|
|
460
|
-
* `InteractModule.forRoot()` is still supported for providing InteractService configuration.
|
|
459
|
+
* @deprecated Import the standalone directives and pipe (DraggableDirective, ResizableDirective, etc.) directly
|
|
460
|
+
* and use `provideInteract()` to configure them. This module will be removed in the next major version.
|
|
461
461
|
*/
|
|
462
462
|
declare class InteractModule {
|
|
463
|
+
/**
|
|
464
|
+
* @deprecated Use `provideInteract(config)` in your application or route providers.
|
|
465
|
+
*/
|
|
463
466
|
static forRoot(config: InteractRootConfig): ModuleWithProviders<InteractModule>;
|
|
464
467
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<InteractModule, never>;
|
|
465
468
|
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]>;
|
|
@@ -478,5 +481,98 @@ declare function cloneElement(element: HTMLElement): HTMLElement;
|
|
|
478
481
|
*/
|
|
479
482
|
declare function getRootNode(viewRef: EmbeddedViewRef<any>, _document: Document): HTMLElement;
|
|
480
483
|
|
|
481
|
-
|
|
484
|
+
declare class InteractService {
|
|
485
|
+
private rendererFactory;
|
|
486
|
+
private ngZone;
|
|
487
|
+
rootConfig: InteractRootConfig;
|
|
488
|
+
private _interactableIndex;
|
|
489
|
+
private _dropzoneIndex;
|
|
490
|
+
private renderer;
|
|
491
|
+
readonly dragRegistrySystem: {
|
|
492
|
+
[key: string]: InteractableRegistry;
|
|
493
|
+
};
|
|
494
|
+
private cssUnit;
|
|
495
|
+
constructor();
|
|
496
|
+
addDeltaToPosition(delta: Delta, position: Position): {
|
|
497
|
+
x: number;
|
|
498
|
+
y: number;
|
|
499
|
+
targetElement: TftDragElement;
|
|
500
|
+
};
|
|
501
|
+
addRegistryToSystem(customRegistryId?: string | null): string;
|
|
502
|
+
addDraggableToRegistry(customRegistryId?: any, interactableId?: string | null): string;
|
|
503
|
+
destroyInteractable(interactableId: string, registryId?: string): void;
|
|
504
|
+
subscribeToInteractable(interactableId: string, registryId?: string): _tft_interact.InteractableSystem;
|
|
505
|
+
createInteractableState(initialPosition: Position, initialSize: Size, initialDelta: Delta): {
|
|
506
|
+
deltas$: BehaviorSubject<Delta>;
|
|
507
|
+
position$: BehaviorSubject<Position>;
|
|
508
|
+
size$: BehaviorSubject<{
|
|
509
|
+
deltaX: number | null;
|
|
510
|
+
deltaY: number | null;
|
|
511
|
+
targetElement: TftDragElement | null;
|
|
512
|
+
width: number | null;
|
|
513
|
+
height: number | null;
|
|
514
|
+
}>;
|
|
515
|
+
interactable$: Observable<TftCoords>;
|
|
516
|
+
};
|
|
517
|
+
createInteractableId(customInteractableId?: string | null): string;
|
|
518
|
+
createDropzoneId(index: number): string;
|
|
519
|
+
getInteractableState(interactableId: string, registryId?: string): Observable<TftCoords>;
|
|
520
|
+
updateDeltas(interactId: string, registryId: string, { deltaX, deltaY }: {
|
|
521
|
+
deltaX: any;
|
|
522
|
+
deltaY: any;
|
|
523
|
+
}, targetElement: any): void;
|
|
524
|
+
updatePosition(interactId: string, registryId: string, { x, y }: {
|
|
525
|
+
x: number;
|
|
526
|
+
y: number;
|
|
527
|
+
}, targetElement: any): void;
|
|
528
|
+
updateSize(interactId: string, registryId: string, { deltaX, deltaY, width, height }: {
|
|
529
|
+
deltaX: any;
|
|
530
|
+
deltaY: any;
|
|
531
|
+
width: any;
|
|
532
|
+
height: any;
|
|
533
|
+
}, targetElement: any): void;
|
|
534
|
+
interactableExistOnRegistry(interactId: string, registryId?: string): boolean;
|
|
535
|
+
/**
|
|
536
|
+
* Uses renderer to set width and height of angular component
|
|
537
|
+
* @param width the desired width of component
|
|
538
|
+
* @param height the desired height of component
|
|
539
|
+
* @param target the element to transform
|
|
540
|
+
*/
|
|
541
|
+
setElementSize(width: number, height: number, target: TftResizeElement): void;
|
|
542
|
+
/**
|
|
543
|
+
* Uses renderer to set position of angular component
|
|
544
|
+
* @param x position on x axis
|
|
545
|
+
* @param y position on y axis
|
|
546
|
+
* @param target the element to transform
|
|
547
|
+
*/
|
|
548
|
+
setElementTransform(x: number, y: number, position: Position): void;
|
|
549
|
+
/**
|
|
550
|
+
* Generates a translate string for the x and y arguments passed to
|
|
551
|
+
* be passed to css transform
|
|
552
|
+
* @param x the position along the x axis
|
|
553
|
+
* @param y the position along the y axis
|
|
554
|
+
*/
|
|
555
|
+
createTransformString(x: number, y: number): string;
|
|
556
|
+
calculatePositionInElement(zoneElement: Interact.Element, dragElement: TftDragElement, scale?: number): {
|
|
557
|
+
x: number;
|
|
558
|
+
y: number;
|
|
559
|
+
};
|
|
560
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<InteractService, never>;
|
|
561
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<InteractService>;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Provides the interact configuration and `InteractService`.
|
|
566
|
+
*
|
|
567
|
+
* Add it to the application providers, or to a route's `providers` to scope it to that route.
|
|
568
|
+
* Options that are left out fall back to the defaults (`cssDimensionUnit: 'px'`).
|
|
569
|
+
*
|
|
570
|
+
* @example
|
|
571
|
+
* bootstrapApplication(AppComponent, {
|
|
572
|
+
* providers: [provideInteract({ cssDimensionUnit: 'em' })],
|
|
573
|
+
* });
|
|
574
|
+
*/
|
|
575
|
+
declare function provideInteract(config?: Partial<InteractRootConfig>): EnvironmentProviders;
|
|
576
|
+
|
|
577
|
+
export { AccountForScaleDirective, ApplyScaleDirective, ArrayOfNPipe, AutoScrollDirective, DEFAULT_REGISTRY_ID, DragPreviewDirective, DragRootDirective, DraggableDirective, DropzoneDirective, GesturableDirective, INTERACT_ROOT_CONFIG, InteractModule, InteractService, LassoDirective, ResizableDirective, TFT_DRAG_PREVIEW, cloneElement, defaultDelta, defaultPosition, defaultSize, getClosestMatchingAncestor, getRootNode, provideInteract };
|
|
482
578
|
export type { CssDimensionUnit, Delta, InteractRootConfig, InteractableRegistry, InteractableSystem, LassoRect, NgDragEvent, NgDropEvent, NgResizeEvent, Position, PositionOption, Size, TftCoords, TftDragElement, TftDragEvent, TftDropEvent, TftGestureEvent, TftInteractableEvent, TftResizeElement, TftResizeEvent };
|