@tft/interact 21.0.0 → 21.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/tft-interact.mjs +82 -130
- package/fesm2022/tft-interact.mjs.map +1 -1
- package/package.json +1 -1
- package/types/tft-interact.d.ts +35 -123
- package/tft-interact-21.0.0.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe, InjectionToken,
|
|
2
|
+
import { Pipe, InjectionToken, inject, RendererFactory2, NgZone, Injectable, ElementRef, Input, Directive, Renderer2, EventEmitter, Output, HostBinding, TemplateRef, HostListener, ViewContainerRef, DOCUMENT, ContentChild, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import interact from 'interactjs';
|
|
5
5
|
import { BehaviorSubject, combineLatest, Subject } from 'rxjs';
|
|
@@ -54,15 +54,16 @@ const defaultPosition = {
|
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
class InteractService {
|
|
57
|
-
constructor(
|
|
58
|
-
this.rendererFactory =
|
|
59
|
-
this.ngZone =
|
|
60
|
-
this.rootConfig =
|
|
57
|
+
constructor() {
|
|
58
|
+
this.rendererFactory = inject(RendererFactory2);
|
|
59
|
+
this.ngZone = inject(NgZone);
|
|
60
|
+
this.rootConfig = inject(INTERACT_ROOT_CONFIG, { optional: true });
|
|
61
61
|
this._interactableIndex = 0;
|
|
62
62
|
this._dropzoneIndex = 0;
|
|
63
63
|
// TODO: consider using Map here
|
|
64
64
|
this.dragRegistrySystem = {};
|
|
65
65
|
this.cssUnit = 'px';
|
|
66
|
+
const rootConfig = this.rootConfig;
|
|
66
67
|
this.renderer = this.rendererFactory.createRenderer(null, null);
|
|
67
68
|
this.cssUnit = rootConfig?.cssDimensionUnit || 'px';
|
|
68
69
|
}
|
|
@@ -232,18 +233,13 @@ class InteractService {
|
|
|
232
233
|
// console.log({ y:position.y, drt:dragRect.top, zrt: zoneRect.top})
|
|
233
234
|
return position;
|
|
234
235
|
}
|
|
235
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: InteractService, deps: [
|
|
236
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: InteractService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
236
237
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: InteractService, providedIn: 'root' }); }
|
|
237
238
|
}
|
|
238
239
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: InteractService, decorators: [{
|
|
239
240
|
type: Injectable,
|
|
240
241
|
args: [{ providedIn: 'root' }]
|
|
241
|
-
}], ctorParameters: () => [
|
|
242
|
-
type: Optional
|
|
243
|
-
}, {
|
|
244
|
-
type: Inject,
|
|
245
|
-
args: [INTERACT_ROOT_CONFIG]
|
|
246
|
-
}] }] });
|
|
242
|
+
}], ctorParameters: () => [] });
|
|
247
243
|
|
|
248
244
|
/**
|
|
249
245
|
* Use to apply scale to the element and tell the drag and resize directives to account for the scale when
|
|
@@ -252,12 +248,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
252
248
|
* element accounts for scale
|
|
253
249
|
*/
|
|
254
250
|
class AccountForScaleDirective {
|
|
255
|
-
constructor(
|
|
256
|
-
this.el =
|
|
251
|
+
constructor() {
|
|
252
|
+
this.el = inject(ElementRef);
|
|
257
253
|
// this setup allows consumers to set x, y scale independently or just set them both with scale
|
|
258
254
|
this.scale = 1;
|
|
259
255
|
}
|
|
260
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AccountForScaleDirective, deps: [
|
|
256
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AccountForScaleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
261
257
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: AccountForScaleDirective, isStandalone: false, selector: "[tftAccountForScale]", inputs: { scale: "scale" }, ngImport: i0 }); }
|
|
262
258
|
}
|
|
263
259
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AccountForScaleDirective, decorators: [{
|
|
@@ -266,19 +262,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
266
262
|
selector: '[tftAccountForScale]',
|
|
267
263
|
standalone: false
|
|
268
264
|
}]
|
|
269
|
-
}],
|
|
265
|
+
}], propDecorators: { scale: [{
|
|
270
266
|
type: Input
|
|
271
267
|
}] } });
|
|
272
268
|
|
|
273
269
|
class DropzoneDirective {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
this.
|
|
279
|
-
this.renderer = renderer;
|
|
280
|
-
this.interactService = interactService;
|
|
281
|
-
this.account_for_scale_dir = account_for_scale_dir;
|
|
270
|
+
constructor() {
|
|
271
|
+
this.el = inject(ElementRef);
|
|
272
|
+
this.renderer = inject(Renderer2);
|
|
273
|
+
this.interactService = inject(InteractService);
|
|
274
|
+
this.account_for_scale_dir = inject(AccountForScaleDirective, { optional: true });
|
|
282
275
|
this.dropzoneConfig = {};
|
|
283
276
|
this.position = 'relative';
|
|
284
277
|
// proxies to pass interact events through to consumer of directive
|
|
@@ -287,6 +280,9 @@ class DropzoneDirective {
|
|
|
287
280
|
this.dragLeave = new EventEmitter();
|
|
288
281
|
this.dragDrop = new EventEmitter();
|
|
289
282
|
}
|
|
283
|
+
get scale() {
|
|
284
|
+
return this.account_for_scale_dir?.scale;
|
|
285
|
+
}
|
|
290
286
|
ngOnInit() {
|
|
291
287
|
// connects
|
|
292
288
|
this.dropzone = this.connectDropzoneEvents(this.el.nativeElement, this.dropzoneConfig);
|
|
@@ -343,7 +339,7 @@ class DropzoneDirective {
|
|
|
343
339
|
positionInDropTarget
|
|
344
340
|
};
|
|
345
341
|
}
|
|
346
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DropzoneDirective, deps: [
|
|
342
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DropzoneDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
347
343
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: DropzoneDirective, isStandalone: false, selector: "[tftDropzone]", inputs: { dropzoneId: "dropzoneId", dropzoneConfig: "dropzoneConfig", dropzoneData: "dropzoneData", position: "position" }, outputs: { dropActivate: "dropActivate", dragEnter: "dragEnter", dragLeave: "dragLeave", dragDrop: "dragDrop" }, host: { properties: { "id": "dropzoneId", "style.position": "this.position" } }, usesOnChanges: true, ngImport: i0 }); }
|
|
348
344
|
}
|
|
349
345
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DropzoneDirective, decorators: [{
|
|
@@ -355,9 +351,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
355
351
|
},
|
|
356
352
|
standalone: false
|
|
357
353
|
}]
|
|
358
|
-
}],
|
|
359
|
-
type: Optional
|
|
360
|
-
}] }], propDecorators: { dropzoneId: [{
|
|
354
|
+
}], propDecorators: { dropzoneId: [{
|
|
361
355
|
type: Input
|
|
362
356
|
}], dropzoneConfig: [{
|
|
363
357
|
type: Input
|
|
@@ -380,10 +374,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
380
374
|
|
|
381
375
|
const TFT_DRAG_PREVIEW = new InjectionToken('DragPreviewDirective');
|
|
382
376
|
class DragPreviewDirective {
|
|
383
|
-
constructor(
|
|
384
|
-
this.templateRef =
|
|
377
|
+
constructor() {
|
|
378
|
+
this.templateRef = inject(TemplateRef);
|
|
385
379
|
}
|
|
386
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DragPreviewDirective, deps: [
|
|
380
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DragPreviewDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
387
381
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: DragPreviewDirective, isStandalone: false, selector: "ng-template[tftDragPreview]", inputs: { dragData: "dragData" }, ngImport: i0 }); }
|
|
388
382
|
}
|
|
389
383
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DragPreviewDirective, decorators: [{
|
|
@@ -393,7 +387,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
393
387
|
selector: 'ng-template[tftDragPreview]',
|
|
394
388
|
standalone: false
|
|
395
389
|
}]
|
|
396
|
-
}],
|
|
390
|
+
}], propDecorators: { dragData: [{
|
|
397
391
|
type: Input
|
|
398
392
|
}] } });
|
|
399
393
|
|
|
@@ -438,14 +432,13 @@ function getRootNode(viewRef, _document) {
|
|
|
438
432
|
* @note this directive will overwrite any style transformations (e.g. transform: scale(2); )
|
|
439
433
|
*/
|
|
440
434
|
class DragRootDirective {
|
|
441
|
-
constructor(
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
this.
|
|
446
|
-
|
|
447
|
-
}
|
|
448
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DragRootDirective, deps: [{ token: i0.ElementRef }, { token: AccountForScaleDirective, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
435
|
+
constructor() {
|
|
436
|
+
this.el = inject(ElementRef);
|
|
437
|
+
// This is used when passing a dragRoot as in input to a draggable element that not a child of that dragRoot
|
|
438
|
+
// 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
|
|
439
|
+
this.account_for_scale_dir = inject(AccountForScaleDirective, { optional: true, self: true });
|
|
440
|
+
}
|
|
441
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DragRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
449
442
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: DragRootDirective, isStandalone: false, selector: "[tftDragRoot]", exportAs: ["tftDragRoot"], ngImport: i0 }); }
|
|
450
443
|
}
|
|
451
444
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DragRootDirective, decorators: [{
|
|
@@ -455,11 +448,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
455
448
|
exportAs: 'tftDragRoot',
|
|
456
449
|
standalone: false
|
|
457
450
|
}]
|
|
458
|
-
}]
|
|
459
|
-
type: Optional
|
|
460
|
-
}, {
|
|
461
|
-
type: Self
|
|
462
|
-
}] }] });
|
|
451
|
+
}] });
|
|
463
452
|
|
|
464
453
|
;
|
|
465
454
|
/**
|
|
@@ -475,8 +464,8 @@ class AutoScrollDirective {
|
|
|
475
464
|
const { scrollTop, scrollLeft } = target;
|
|
476
465
|
this.scrollSubject.next({ scrollTop, scrollLeft });
|
|
477
466
|
}
|
|
478
|
-
constructor(
|
|
479
|
-
this.el =
|
|
467
|
+
constructor() {
|
|
468
|
+
this.el = inject(ElementRef);
|
|
480
469
|
/**
|
|
481
470
|
* Limit minimum time between scroll events in milliseconds
|
|
482
471
|
*/
|
|
@@ -488,6 +477,7 @@ class AutoScrollDirective {
|
|
|
488
477
|
enabled: true
|
|
489
478
|
};
|
|
490
479
|
this.scrollDeltaObserver = new Subject();
|
|
480
|
+
const el = this.el;
|
|
491
481
|
const { scrollTop, scrollLeft } = el.nativeElement;
|
|
492
482
|
this.scrollSubject = new BehaviorSubject({ scrollTop, scrollLeft });
|
|
493
483
|
this.scrollObserver = this.scrollSubject.pipe(scan((previous, current) => {
|
|
@@ -498,7 +488,7 @@ class AutoScrollDirective {
|
|
|
498
488
|
}), shareReplay(1));
|
|
499
489
|
this.scrollObserver.subscribe();
|
|
500
490
|
}
|
|
501
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AutoScrollDirective, deps: [
|
|
491
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AutoScrollDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
502
492
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: AutoScrollDirective, isStandalone: false, selector: "[tftAutoScroll]", inputs: { autoScrollConfig: "autoScrollConfig" }, host: { listeners: { "scroll": "scroll($event)" } }, ngImport: i0 }); }
|
|
503
493
|
}
|
|
504
494
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AutoScrollDirective, decorators: [{
|
|
@@ -507,7 +497,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
507
497
|
selector: '[tftAutoScroll]',
|
|
508
498
|
standalone: false
|
|
509
499
|
}]
|
|
510
|
-
}], ctorParameters: () => [
|
|
500
|
+
}], ctorParameters: () => [], propDecorators: { autoScrollConfig: [{
|
|
511
501
|
type: Input
|
|
512
502
|
}], scroll: [{
|
|
513
503
|
type: HostListener,
|
|
@@ -517,20 +507,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
517
507
|
/** @dynamic */
|
|
518
508
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
519
509
|
class DraggableDirective {
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
this.
|
|
526
|
-
this.
|
|
527
|
-
this.
|
|
528
|
-
this.
|
|
529
|
-
this.
|
|
530
|
-
this.account_for_scale_dir = account_for_scale_dir;
|
|
531
|
-
this.dropzone_dir = dropzone_dir;
|
|
532
|
-
this.drag_root_dir = drag_root_dir;
|
|
533
|
-
this.auto_scroll_dir = auto_scroll_dir;
|
|
510
|
+
constructor() {
|
|
511
|
+
this.el = inject(ElementRef);
|
|
512
|
+
this.interactService = inject(InteractService);
|
|
513
|
+
this.renderer = inject(Renderer2);
|
|
514
|
+
this._viewContainerRef = inject(ViewContainerRef);
|
|
515
|
+
this._document = inject(DOCUMENT);
|
|
516
|
+
this.account_for_scale_dir = inject(AccountForScaleDirective, { optional: true });
|
|
517
|
+
this.dropzone_dir = inject(DropzoneDirective, { optional: true, skipSelf: true });
|
|
518
|
+
this.drag_root_dir = inject(DragRootDirective, { optional: true, skipSelf: true });
|
|
519
|
+
this.auto_scroll_dir = inject(AutoScrollDirective, { optional: true, skipSelf: true });
|
|
534
520
|
/* zIndex while dragging*/
|
|
535
521
|
this.dragZIndex = 10000;
|
|
536
522
|
this.enableDragDefault = true;
|
|
@@ -546,6 +532,10 @@ class DraggableDirective {
|
|
|
546
532
|
this.dragInertiaStart = new EventEmitter();
|
|
547
533
|
this.dragEnd = new EventEmitter();
|
|
548
534
|
}
|
|
535
|
+
// check all the different places for scale
|
|
536
|
+
get scale() {
|
|
537
|
+
return this.account_for_scale_dir?.scale || this.drag_root_dir?.account_for_scale_dir?.scale || this.dragRoot?.account_for_scale_dir?.scale || 1;
|
|
538
|
+
}
|
|
549
539
|
ngOnInit() {
|
|
550
540
|
this.interactable = this.initiateDragEvents(this.dragConfig, this.el.nativeElement);
|
|
551
541
|
this.dragRootEl = (this.dragRoot?.el?.nativeElement || this.drag_root_dir?.el?.nativeElement) || this._document.body;
|
|
@@ -611,6 +601,8 @@ class DraggableDirective {
|
|
|
611
601
|
this.renderer.setStyle(dragElement, 'touchAction', 'none');
|
|
612
602
|
this.renderer.setStyle(dragElement, 'zIndex', this.dragZIndex);
|
|
613
603
|
this.renderer.setStyle(dragElement, 'position', 'absolute');
|
|
604
|
+
// Prevents highlighting text if dragging over, which will interrupt the next drag action
|
|
605
|
+
this.renderer.setStyle(dragElement, 'userSelect', 'none');
|
|
614
606
|
}
|
|
615
607
|
addDragPropertiesToElement(nativeElement) {
|
|
616
608
|
this.renderer.setProperty(nativeElement, 'dropTarget', this.dropzone_dir || null);
|
|
@@ -664,12 +656,7 @@ class DraggableDirective {
|
|
|
664
656
|
.on('dragstart', (event) => {
|
|
665
657
|
const interaction = event.interaction;
|
|
666
658
|
// check if we should append drag element to body
|
|
667
|
-
if (this.enableDragDefault
|
|
668
|
-
&& interaction.pointerIsDown
|
|
669
|
-
// TODO: probably don't need following condition checks anymore remove by 2022
|
|
670
|
-
// && !!this.dropzone_dir
|
|
671
|
-
// && !interaction.interacting()
|
|
672
|
-
) {
|
|
659
|
+
if (this.enableDragDefault && interaction.pointerIsDown) {
|
|
673
660
|
if (this._previewTemplate) {
|
|
674
661
|
const viewRef = this._viewContainerRef.createEmbeddedView(this._previewTemplate.templateRef);
|
|
675
662
|
this.previewRef = getRootNode(viewRef, this._document);
|
|
@@ -731,7 +718,7 @@ class DraggableDirective {
|
|
|
731
718
|
this.interactService.updateDeltas(this.interactableId, this.registryId, { deltaX, deltaY }, this.previewRef);
|
|
732
719
|
});
|
|
733
720
|
}
|
|
734
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DraggableDirective, deps: [
|
|
721
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DraggableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
735
722
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: DraggableDirective, isStandalone: false, selector: "[tftDraggable]", inputs: { x: "x", y: "y", dragZIndex: "dragZIndex", zIndex: "zIndex", interactableId: "interactableId", dragData: "dragData", enableDragDefault: "enableDragDefault", disabled: "disabled", dragDisabled: "dragDisabled", dragConfig: "dragConfig", showPlaceholder: "showPlaceholder", dragRoot: "dragRoot" }, outputs: { dragStart: "dragStart", dragMove: "dragMove", dragInertiaStart: "dragInertiaStart", dragEnd: "dragEnd" }, host: { properties: { "style.touchAction": "this.dragDisabled ? \"auto\" : \"none\"", "style.position": "\"absolute\"", "id": "interactableId" } }, queries: [{ propertyName: "_previewTemplate", first: true, predicate: DragPreviewDirective, descendants: true }], usesOnChanges: true, ngImport: i0 }); }
|
|
736
723
|
}
|
|
737
724
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DraggableDirective, decorators: [{
|
|
@@ -746,24 +733,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
746
733
|
},
|
|
747
734
|
standalone: false
|
|
748
735
|
}]
|
|
749
|
-
}],
|
|
750
|
-
type: Inject,
|
|
751
|
-
args: [DOCUMENT]
|
|
752
|
-
}] }, { type: AccountForScaleDirective, decorators: [{
|
|
753
|
-
type: Optional
|
|
754
|
-
}] }, { type: DropzoneDirective, decorators: [{
|
|
755
|
-
type: Optional
|
|
756
|
-
}, {
|
|
757
|
-
type: SkipSelf
|
|
758
|
-
}] }, { type: DragRootDirective, decorators: [{
|
|
759
|
-
type: Optional
|
|
760
|
-
}, {
|
|
761
|
-
type: SkipSelf
|
|
762
|
-
}] }, { type: AutoScrollDirective, decorators: [{
|
|
763
|
-
type: Optional
|
|
764
|
-
}, {
|
|
765
|
-
type: SkipSelf
|
|
766
|
-
}] }], propDecorators: { x: [{
|
|
736
|
+
}], propDecorators: { x: [{
|
|
767
737
|
type: Input
|
|
768
738
|
}], y: [{
|
|
769
739
|
type: Input
|
|
@@ -823,16 +793,16 @@ class ResizableDirective {
|
|
|
823
793
|
get scale() {
|
|
824
794
|
return this.account_for_scale_dir?.scale || this.drag_root_dir?.account_for_scale_dir?.scale;
|
|
825
795
|
}
|
|
826
|
-
constructor(
|
|
827
|
-
this.el =
|
|
828
|
-
this._document =
|
|
829
|
-
this.interactService =
|
|
830
|
-
this.renderer =
|
|
831
|
-
this.drag_root_dir =
|
|
832
|
-
this.account_for_scale_dir =
|
|
833
|
-
this.draggable_dir =
|
|
834
|
-
this.dropzone_dir =
|
|
835
|
-
this.auto_scroll_dir =
|
|
796
|
+
constructor() {
|
|
797
|
+
this.el = inject(ElementRef);
|
|
798
|
+
this._document = inject(DOCUMENT);
|
|
799
|
+
this.interactService = inject(InteractService);
|
|
800
|
+
this.renderer = inject(Renderer2);
|
|
801
|
+
this.drag_root_dir = inject(DragRootDirective, { optional: true });
|
|
802
|
+
this.account_for_scale_dir = inject(AccountForScaleDirective, { optional: true });
|
|
803
|
+
this.draggable_dir = inject(DraggableDirective, { optional: true });
|
|
804
|
+
this.dropzone_dir = inject(DropzoneDirective, { optional: true, skipSelf: true });
|
|
805
|
+
this.auto_scroll_dir = inject(AutoScrollDirective, { optional: true, skipSelf: true });
|
|
836
806
|
this.enableResizeDefault = true;
|
|
837
807
|
// TODO: should this be an input with default or should consuming user set display in styles each time
|
|
838
808
|
this.position = 'absolute';
|
|
@@ -845,6 +815,7 @@ class ResizableDirective {
|
|
|
845
815
|
edges: { left: true, right: true, bottom: true, top: true }
|
|
846
816
|
};
|
|
847
817
|
this.activeEdges = { left: false, right: false, top: false, bottom: false };
|
|
818
|
+
const drag_root_dir = this.drag_root_dir;
|
|
848
819
|
this.dragRootEl = drag_root_dir?.el?.nativeElement || this._document.body;
|
|
849
820
|
}
|
|
850
821
|
ngOnInit() {
|
|
@@ -969,7 +940,7 @@ class ResizableDirective {
|
|
|
969
940
|
this.interactService.updateSize(this.interactableId, this.registryId, { deltaX, deltaY, width, height }, this.el.nativeElement);
|
|
970
941
|
});
|
|
971
942
|
}
|
|
972
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: ResizableDirective, deps: [
|
|
943
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: ResizableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
973
944
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: ResizableDirective, isStandalone: false, selector: "[tftResizable]", inputs: { enableResizeDefault: "enableResizeDefault", position: "position", resizeConfig: "resizeConfig", interactableId: "interactableId", width: "width", height: "height", resizeDisabled: "resizeDisabled" }, outputs: { resizeStart: "resizeStart", resizeMove: "resizeMove", resizeInertiaStart: "resizeInertiaStart", resizeEnd: "resizeEnd" }, host: { properties: { "style.touchAction": "this.resizeDisabled ? \"auto\" : \"none\"", "style.position": "position", "style.boxSizing": "\"border-box\"" } }, usesOnChanges: true, ngImport: i0 }); }
|
|
974
945
|
}
|
|
975
946
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: ResizableDirective, decorators: [{
|
|
@@ -989,24 +960,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
989
960
|
},
|
|
990
961
|
standalone: false
|
|
991
962
|
}]
|
|
992
|
-
}], ctorParameters: () => [
|
|
993
|
-
type: Inject,
|
|
994
|
-
args: [DOCUMENT]
|
|
995
|
-
}] }, { type: InteractService }, { type: i0.Renderer2 }, { type: DragRootDirective, decorators: [{
|
|
996
|
-
type: Optional
|
|
997
|
-
}] }, { type: AccountForScaleDirective, decorators: [{
|
|
998
|
-
type: Optional
|
|
999
|
-
}] }, { type: DraggableDirective, decorators: [{
|
|
1000
|
-
type: Optional
|
|
1001
|
-
}] }, { type: DropzoneDirective, decorators: [{
|
|
1002
|
-
type: Optional
|
|
1003
|
-
}, {
|
|
1004
|
-
type: SkipSelf
|
|
1005
|
-
}] }, { type: AutoScrollDirective, decorators: [{
|
|
1006
|
-
type: Optional
|
|
1007
|
-
}, {
|
|
1008
|
-
type: SkipSelf
|
|
1009
|
-
}] }], propDecorators: { enableResizeDefault: [{
|
|
963
|
+
}], ctorParameters: () => [], propDecorators: { enableResizeDefault: [{
|
|
1010
964
|
type: Input
|
|
1011
965
|
}], position: [{
|
|
1012
966
|
type: Input
|
|
@@ -1033,9 +987,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1033
987
|
/** @dynamic */
|
|
1034
988
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1035
989
|
class GesturableDirective {
|
|
1036
|
-
constructor(
|
|
1037
|
-
this.el =
|
|
1038
|
-
this.draggable_dir =
|
|
990
|
+
constructor() {
|
|
991
|
+
this.el = inject(ElementRef);
|
|
992
|
+
this.draggable_dir = inject(DraggableDirective, { optional: true });
|
|
1039
993
|
this.gestureDisabled = false;
|
|
1040
994
|
// pipes all interact events to event emitters
|
|
1041
995
|
this.gestureStart = new EventEmitter();
|
|
@@ -1078,7 +1032,7 @@ class GesturableDirective {
|
|
|
1078
1032
|
this.gestureEnd.emit({ gestureRef: this, interactEvent: event });
|
|
1079
1033
|
});
|
|
1080
1034
|
}
|
|
1081
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: GesturableDirective, deps: [
|
|
1035
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: GesturableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1082
1036
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: GesturableDirective, isStandalone: false, selector: "[tftGesturable]", inputs: { gesturableId: "gesturableId", gestureDisabled: "gestureDisabled", gestureConfig: "gestureConfig" }, outputs: { gestureStart: "gestureStart", gestureMove: "gestureMove", gestureEnd: "gestureEnd" }, host: { properties: { "id": "gesturableId" } }, usesOnChanges: true, ngImport: i0 }); }
|
|
1083
1037
|
}
|
|
1084
1038
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: GesturableDirective, decorators: [{
|
|
@@ -1092,9 +1046,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1092
1046
|
},
|
|
1093
1047
|
standalone: false
|
|
1094
1048
|
}]
|
|
1095
|
-
}],
|
|
1096
|
-
type: Optional
|
|
1097
|
-
}] }], propDecorators: { gesturableId: [{
|
|
1049
|
+
}], propDecorators: { gesturableId: [{
|
|
1098
1050
|
type: Input
|
|
1099
1051
|
}], gestureDisabled: [{
|
|
1100
1052
|
type: Input
|
|
@@ -1109,17 +1061,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1109
1061
|
}] } });
|
|
1110
1062
|
|
|
1111
1063
|
class ApplyScaleDirective {
|
|
1064
|
+
constructor() {
|
|
1065
|
+
this.el = inject(ElementRef);
|
|
1066
|
+
this._scale = 1;
|
|
1067
|
+
}
|
|
1112
1068
|
// this setup allows consumers to set x, y scale independently or just set them both with scale
|
|
1113
1069
|
set scale(val) {
|
|
1114
1070
|
this._scale;
|
|
1115
1071
|
this.fontSize = `${val}px`;
|
|
1116
1072
|
}
|
|
1117
1073
|
;
|
|
1118
|
-
|
|
1119
|
-
this.el = el;
|
|
1120
|
-
this._scale = 1;
|
|
1121
|
-
}
|
|
1122
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: ApplyScaleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1074
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: ApplyScaleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1123
1075
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: ApplyScaleDirective, isStandalone: false, selector: "[tftApplyScale]", inputs: { scale: "scale" }, host: { properties: { "style.fontSize": "this.fontSize" } }, ngImport: i0 }); }
|
|
1124
1076
|
}
|
|
1125
1077
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: ApplyScaleDirective, decorators: [{
|
|
@@ -1128,7 +1080,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
1128
1080
|
selector: '[tftApplyScale]',
|
|
1129
1081
|
standalone: false
|
|
1130
1082
|
}]
|
|
1131
|
-
}],
|
|
1083
|
+
}], propDecorators: { scale: [{
|
|
1132
1084
|
type: Input
|
|
1133
1085
|
}], fontSize: [{
|
|
1134
1086
|
type: HostBinding,
|
|
@@ -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/interact.module.ts","../../../../libs/interact/src/tft-interact.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'arrayOfN',\n standalone: false\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, Optional } 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\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 private rendererFactory: RendererFactory2,\n private ngZone: NgZone,\n @Optional() @Inject(INTERACT_ROOT_CONFIG) public 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, HostBinding, Input, OnChanges, SimpleChanges } 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: false\n})\nexport class AccountForScaleDirective {\n // this setup allows consumers to set x, y scale independently or just set them both with scale\n @Input() scale = 1;\n\n constructor(\n public el: ElementRef\n ) { }\n}\n","import { Directive, ElementRef, Input, OnInit, Output, EventEmitter, SimpleChanges, OnChanges, Renderer2, Optional, HostBinding } 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@Directive({\n selector: '[tftDropzone]',\n host: {\n '[id]': 'dropzoneId'\n },\n standalone: false\n})\nexport class DropzoneDirective implements OnInit, OnChanges {\n\n @Input() dropzoneId: string;\n @Input() dropzoneConfig: DropzoneOptions = {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Input() dropzoneData: any;\n\n @Input()\n @HostBinding('style.position') position: PositionOption = 'relative';\n // proxies to pass interact events through to consumer of directive\n @Output() dropActivate = new EventEmitter<TftDropEvent>();\n @Output() dragEnter = new EventEmitter<TftDropEvent>();\n @Output() dragLeave = new EventEmitter<TftDropEvent>();\n @Output() dragDrop = new EventEmitter<TftDropEvent>();\n\n dropzone: Interactable;\n\n get scale(): number {\n return this.account_for_scale_dir?.scale;\n }\n constructor(\n public el: ElementRef,\n private renderer: Renderer2,\n private interactService: InteractService,\n @Optional() private account_for_scale_dir?: AccountForScaleDirective\n ) { }\n\n ngOnInit() {\n // connects\n this.dropzone = this.connectDropzoneEvents(this.el.nativeElement, this.dropzoneConfig);\n this.dropzoneId = this.interactService.addRegistryToSystem(this.dropzoneId);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if(!changes.dropzoneConfig || !this.dropzone) return;\n // this.dropzone.unset();\n // this.dropzone = this.connectDropzoneEvents(this.el.nativeElement, this.dropzoneConfig)\n this.dropzone.dropzone(this.dropzoneConfig)\n }\n /**\n * Connects element to interacts dropzone events and returns a reference to the interactable\n * @param nativeElement the element to tie drop events to\n * @param dropzoneConfig the interact configuration to use when connecting\n */\n connectDropzoneEvents(nativeElement, dropzoneConfig: DropzoneOptions) {\n return interact(nativeElement).dropzone(dropzoneConfig)\n // TODO: investigate when this fires in different scenarios\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 * Maps the drop event emitted by interact to something a little easier to use\n * @param event the drop event emitted by interact, extended with extra fields we added to\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, Input, TemplateRef} 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: false\n})\nexport class DragPreviewDirective<T = any> {\n\n @Input() dragData: T;\n constructor(public templateRef: TemplateRef<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, Optional, Self } 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: false\n})\nexport class DragRootDirective {\n\n constructor(\n public el: 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 @Optional() @Self() public account_for_scale_dir?: AccountForScaleDirective\n ) { }\n}\n","import { Directive, ElementRef, HostListener, 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 * 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: '[tftAutoScroll]',\n standalone: false\n})\nexport class AutoScrollDirective {\n /**\n * Limit minimum time between scroll events in milliseconds\n */\n @Input() autoScrollConfig = {\n margin: 50,\n distance: 3,\n interval: 50,\n speed: 300,\n enabled: true\n };\n private scrollSubject: BehaviorSubject<ScrollObject>;\n readonly scrollObserver: Observable<ScrollObject>;\n readonly scrollDeltaObserver = new Subject<ScrollObject>();\n // this setup allows consumers to set x, y scale independently or just set them both with scale\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\n constructor(\n public el: ElementRef\n ) {\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}\n","import {\n Directive, ElementRef, Input, OnInit, Output,\n OnDestroy, EventEmitter, Optional, SkipSelf, Renderer2, SimpleChanges, OnChanges, ContentChild, ViewContainerRef, Inject, AfterViewInit,\n DOCUMENT\n} 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 // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n '[style.touchAction]': 'this.dragDisabled ? \"auto\" : \"none\"',\n '[style.position]': '\"absolute\"',\n '[id]': 'interactableId',\n },\n standalone: false\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class DraggableDirective<D = any> implements OnInit, OnChanges, OnDestroy, AfterViewInit {\n\n\n @Input() x: number;\n @Input() y: number;\n /* zIndex while dragging*/\n @Input() dragZIndex = 10000;\n /** zIndex while at rest */\n @Input() zIndex: number\n @Input() interactableId: string;\n @Input() dragData: D;\n @Input() enableDragDefault = true;\n /**\n * @deprecated replaced by 'dragDisabled' property, please migrate before v13\n */\n @Input() disabled = false;\n @Input() dragDisabled = false;\n @Input() dragConfig: Partial<Interact.OrBoolean<DraggableOptions>>;\n @Input() showPlaceholder = 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 @Input() dragRoot: DragRootDirective; // HTMLElement;\n\n private dragRootEl: HTMLElement;\n // pipes all interact events to event emitters\n @Output() dragStart = new EventEmitter<TftDragEvent>();\n @Output() dragMove = new EventEmitter<TftDragEvent>();\n @Output() dragInertiaStart = new EventEmitter<TftDragEvent>();\n @Output() dragEnd = new EventEmitter<TftDragEvent>();\n\n @ContentChild(DragPreviewDirective) _previewTemplate: DragPreviewDirective;\n // dragPreview: Interact.Element;\n interactableState: Observable<TftCoords>;\n interactable: Interactable;\n private registryId: string;\n private interactableSubscription: Subscription;\n private scrollEventsSubscription: Subscription;\n\n // cache holding element to use as drag preview (the element the user sees being dragged around)\n previewRef: TftDragElement;\n // check all the different places for scale\n get scale(): number {\n return 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 constructor(\n public el: ElementRef,\n private interactService: InteractService,\n private renderer: Renderer2,\n private _viewContainerRef: ViewContainerRef,\n @Inject(DOCUMENT) private _document: Document,\n @Optional() public account_for_scale_dir?: AccountForScaleDirective,\n @Optional() @SkipSelf() public dropzone_dir?: DropzoneDirective,\n @Optional() @SkipSelf() public drag_root_dir?: DragRootDirective,\n @Optional() @SkipSelf() public auto_scroll_dir?: AutoScrollDirective\n ) { }\n\n ngOnInit() {\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 // register with parent dropzone if it exists, otherwise use default\n // this gives us a place on the registry to store our drag items that don't have a dropzone\n this.registryId = this.dropzone_dir?.dropzoneId || DEFAULT_REGISTRY_ID;\n // add draggable to directory and store its id\n this.interactableId = this.interactService.addDraggableToRegistry(this.registryId, this.interactableId);\n this.alignPositionWithInputs(this.x, this.y);\n // cache subscription to interactable state so we can unsubscribe onDestroy\n this.interactableState = this.interactService\n .getInteractableState(this.interactableId, this.registryId);\n // keep our cached position values in line with our drag state\n this.interactableSubscription = this.interactableState.subscribe((state) => {\n this.y = state.y;\n this.x = state.x;\n });\n this.setDragConfig();\n }\n\n // TODO: watch config here as well and update interactable\n ngOnChanges(changes: SimpleChanges) {\n // we do this here instead of using a setter on the input so that it\n // will only run once when there is a change to x and y\n if(changes.y || changes.x) {\n this.alignPositionWithInputs(this.x, this.y);\n }\n if(changes.dragConfig || changes.disabled || changes.dragDisabled) {\n if(!this.interactable) return;\n this.setDragConfig();\n }\n /**\n * @deprecated remove this in v13\n */\n if (changes.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 }\n\n setDragConfig() {\n const enabled = !(this.disabled || this.dragDisabled)\n const dragConfig = {...this.dragConfig, enabled};\n this.interactable.draggable(dragConfig);\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 // clean up state and subscriptions related to destroyed component\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, 'touchAction', 'none')\n this.renderer.setStyle(dragElement, 'zIndex', this.dragZIndex)\n this.renderer.setStyle(dragElement, 'position', 'absolute')\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 // short circuit if positions aren't numbers or if they haven't changed\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 // We use use this instead of isNaN here to try and help performance\n // We should be able to reliably restrict to numbers or falsey values\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 {\n ...this.auto_scroll_dir.autoScrollConfig,\n container: this.auto_scroll_dir.el.nativeElement as HTMLElement\n }\n }\n )\n };\n return interact(nativeElement).draggable(defaultDragConfig)\n .on('dragstart', (event: NgDragEvent) => {\n const interaction = event.interaction;\n // check if we should append drag element to body\n if ( this.enableDragDefault\n && interaction.pointerIsDown\n // TODO: probably don't need following condition checks anymore remove by 2022\n // && !!this.dropzone_dir\n // && !interaction.interacting()\n ) {\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 // subscribe to scroll events if they are there, by only subscribing on dragstart we avoid wasting subscriptions on interactables that aren't be dragged\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 const mappedEvent = this.mapDragEvent(event);\n this.dragMove.emit(mappedEvent);\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 this.dragEnd.emit(mappedEvent);\n // unsubscribe from scroll events if subscribed\n if (this.auto_scroll_dir) {\n this.scrollEventsSubscription.unsubscribe();\n }\n if ( this.el.nativeElement !== this.previewRef) {\n // we do this in a timeout, so that we don't remove before the dropzone can get the boundingElementRect\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/**\n * Component utils\n */\n// create a clone of the component passed in and add it to the root component\nfunction cloneElement(element: HTMLElement) {\n const clone = element.cloneNode(true) as HTMLElement;\n clone.removeAttribute('id');\n return clone;\n}\nfunction getPreviewInsertionPoint(documentRef: any): HTMLElement {\n // We can't use the body if the user is in fullscreen mode,\n // because the preview will render under the fullscreen element.\n return documentRef.fullscreenElement ||\n documentRef.webkitFullscreenElement ||\n documentRef.mozFullScreenElement ||\n documentRef.msFullscreenElement ||\n documentRef.body;\n}\n","import { Directive, OnInit, OnDestroy, ElementRef, Input, Optional, SkipSelf, Output, EventEmitter, OnChanges, SimpleChanges, Renderer2, Inject, DOCUMENT } 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/** @dynamic */\n@Directive({\n selector: '[tftResizable]',\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n // prevents touch events from colliding with with mouse events\n // on touch screen\n '[style.touchAction]': 'this.resizeDisabled ? \"auto\" : \"none\"',\n // default to absolute here to accommodate likely use cases\n // consuming component can easily over ride with position input\n '[style.position]': 'position',\n // follows interactjs suggested practices\n '[style.boxSizing]': '\"border-box\"',\n },\n standalone: false\n})\nexport class ResizableDirective implements OnInit, OnDestroy, OnChanges {\n\n @Input() enableResizeDefault = true;\n // TODO: should this be an input with default or should consuming user set display in styles each time\n @Input() position = 'absolute';\n @Input() resizeConfig: Partial<Interact.OrBoolean<ResizableOptions>>;\n @Input() interactableId: string;\n\n @Input() width: number;\n @Input() height: number;\n @Input() resizeDisabled = false;\n\n @Output() resizeStart = new EventEmitter<TftResizeEvent>();\n @Output() resizeMove = new EventEmitter<TftResizeEvent>();\n @Output() resizeInertiaStart = new EventEmitter<TftResizeEvent>();\n @Output() resizeEnd = new EventEmitter<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 // The\n dragRootEl: HTMLElement;\n\n private activeEdges: ActiveEdges = {left: false, right: false, top: false, bottom: false}\n private interactableSubscription: Subscription;\n private scrollEventsSubscription: Subscription;\n\n get scale(): number {\n return this.account_for_scale_dir?.scale || this.drag_root_dir?.account_for_scale_dir?.scale;\n }\n\n constructor(\n public el: ElementRef,\n @Inject(DOCUMENT) private _document: Document,\n private interactService: InteractService,\n private renderer: Renderer2,\n @Optional() private drag_root_dir?: DragRootDirective,\n @Optional() public account_for_scale_dir?: AccountForScaleDirective,\n @Optional() private draggable_dir?: DraggableDirective,\n @Optional() @SkipSelf() private dropzone_dir?: DropzoneDirective,\n @Optional() @SkipSelf() public auto_scroll_dir?: AutoScrollDirective\n\n\n ) {\n this.dragRootEl = (drag_root_dir?.el?.nativeElement as HTMLElement) || this._document.body;\n }\n\n ngOnInit() {\n this.addResizePropertiesToElement(this.el.nativeElement);\n\n // we check for a dropzone, we use its id as the registry id if there is on\n // otherwise, we use DEFAULT_REGISTRY_ID as a registry id. This allows us to keep our interactable\n // drag state organized by dropzones.\n this.registryId = this.dropzone_dir?.dropzoneId || DEFAULT_REGISTRY_ID;\n\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 ngOnChanges(changes: SimpleChanges) {\n if ((changes.resizeConfig || changes.resizeDisabled) && this.interactable) {\n this.interactable.resizable({...this.resizeConfig, enabled: !this.resizeDisabled,});\n }\n if (changes.width || changes.height) {\n this.alignDimensionsWithInputs(this.width, this.height);\n }\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 // We get the width and height directly from the native element because\n // the event dimension can get out of sync when resizing with autoScroll\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 * hook elements into interacts resize event listeners\n * we spread the configs so that the consuming component only overwrites the\n * pieces that it explicitly indicates\n * @param resizeConfig\n * @param nativeElement\n */\n initiateResizeEvents(resizeConfig: Partial<Interact.OrBoolean<ResizableOptions>>, nativeElement: TftDragElement) {\n // TODO: This should try and get interactable from tft_draggable if it exists\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 const mappedEvent = this.mapResizeEvent(event);\n this.resizeMove.emit(mappedEvent)\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\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, Input, OnInit, Output,\n EventEmitter, Optional, SimpleChanges, OnChanges } 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 // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n // '[style.touchAction]': 'this.gestureDisabled ? \"auto\" : \"none\"',\n '[id]': 'gesturableId',\n },\n standalone: false\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class GesturableDirective<D = any> implements OnInit, OnChanges {\n\n @Input() gesturableId: string;\n @Input() gestureDisabled = false;\n @Input() gestureConfig: Partial<Interact.OrBoolean<DraggableOptions>>;\n // pipes all interact events to event emitters\n @Output() gestureStart = new EventEmitter<TftGestureEvent>();\n @Output() gestureMove = new EventEmitter<TftGestureEvent>();\n @Output() gestureEnd = new EventEmitter<TftGestureEvent>();\n\n interactableState: Observable<TftCoords>;\n interactable: Interactable;\n\n constructor(\n public el: ElementRef,\n @Optional() private draggable_dir?: DraggableDirective,\n ) { }\n\n ngOnInit() {\n this.gesturableId = this.draggable_dir?.interactableId || 'id';\n this.interactable = this.initiateGestureEvents(this.gestureConfig, this.el.nativeElement);\n this.setGestureConfig();\n }\n\n // TODO: watch config here as well and update interactable\n ngOnChanges(changes: SimpleChanges) {\n // we do this here instead of using a setter on the input so that it\n // will only run once when there is a change to x and y\n if(changes.gestureConfig || changes.gestureDisabled) {\n if(!this.interactable) return;\n this.setGestureConfig();\n }\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\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, HostBinding, Input } from '@angular/core';\n\n@Directive({\n selector: '[tftApplyScale]',\n standalone: false\n})\nexport class ApplyScaleDirective {\n\n _scale = 1;\n // this setup allows consumers to set x, y scale independently or just set them both with scale\n @Input() set scale(val: number){\n this._scale;\n this.fontSize = `${val}px`;\n };\n\n @HostBinding('style.fontSize') fontSize: string;\n\n constructor(\n public el: ElementRef\n ) { }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ArrayOfNPipe } from './pipes/array-of-n.pipe';\nimport { ApplyScaleDirective, DraggableDirective, DragRootDirective, AutoScrollDirective, AccountForScaleDirective, GesturableDirective, ResizableDirective, DropzoneDirective, DragPreviewDirective } from './directives';\nimport { InteractService } from './services/interact.service';\nimport { InteractRootConfig, INTERACT_ROOT_CONFIG } from './models';\n\n\n\nconst EXPORTS = [\n DraggableDirective,\n ResizableDirective,\n DropzoneDirective,\n GesturableDirective,\n DragRootDirective,\n AutoScrollDirective,\n AccountForScaleDirective,\n ApplyScaleDirective,\n DragPreviewDirective,\n ArrayOfNPipe,\n];\n\n\n@NgModule({\n imports: [CommonModule],\n // providers: [{ provide: INTERACT_ROOT_CONFIG, useValue: 'px' }],\n declarations: [\n ...EXPORTS,\n ],\n exports: [\n ...EXPORTS\n ]\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":["i1.InteractService","i2.AccountForScaleDirective","cloneElement","i1.AccountForScaleDirective","i3.DropzoneDirective","i4.DragRootDirective","i5.AutoScrollDirective","i2.DragRootDirective","i3.AccountForScaleDirective","i4.DraggableDirective","i5.DropzoneDirective","i6.AutoScrollDirective","i1.DraggableDirective"],"mappings":";;;;;;;MAMa,YAAY,CAAA;AAEvB;;;;AAI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AAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YATf,YAAY,CAAA,EAAA,CAAA,CAAA;;2FASX,cAAc,EAAA,UAAA,EAAA,CAAA;kBAV1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;;AAEvB,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,OAAO;AACX,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG;AACJ;AACF,iBAAA;;;AChCD;;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/interact.module.ts","../../../../libs/interact/src/tft-interact.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'arrayOfN',\n standalone: false\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, HostBinding, Input, OnChanges, SimpleChanges, inject } 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: false\n})\nexport class AccountForScaleDirective {\n el = inject(ElementRef);\n\n // this setup allows consumers to set x, y scale independently or just set them both with scale\n @Input() scale = 1;\n}\n","import { Directive, ElementRef, Input, OnInit, Output, EventEmitter, SimpleChanges, OnChanges, Renderer2, HostBinding, inject } 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@Directive({\n selector: '[tftDropzone]',\n host: {\n '[id]': 'dropzoneId'\n },\n standalone: false\n})\nexport class DropzoneDirective implements OnInit, OnChanges {\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\n @Input() dropzoneId: string;\n @Input() dropzoneConfig: DropzoneOptions = {};\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Input() dropzoneData: any;\n\n @Input()\n @HostBinding('style.position') position: PositionOption = 'relative';\n // proxies to pass interact events through to consumer of directive\n @Output() dropActivate = new EventEmitter<TftDropEvent>();\n @Output() dragEnter = new EventEmitter<TftDropEvent>();\n @Output() dragLeave = new EventEmitter<TftDropEvent>();\n @Output() dragDrop = new EventEmitter<TftDropEvent>();\n\n dropzone: Interactable;\n\n get scale(): number {\n return this.account_for_scale_dir?.scale;\n }\n\n ngOnInit() {\n // connects\n this.dropzone = this.connectDropzoneEvents(this.el.nativeElement, this.dropzoneConfig);\n this.dropzoneId = this.interactService.addRegistryToSystem(this.dropzoneId);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if(!changes.dropzoneConfig || !this.dropzone) return;\n // this.dropzone.unset();\n // this.dropzone = this.connectDropzoneEvents(this.el.nativeElement, this.dropzoneConfig)\n this.dropzone.dropzone(this.dropzoneConfig)\n }\n /**\n * Connects element to interacts dropzone events and returns a reference to the interactable\n * @param nativeElement the element to tie drop events to\n * @param dropzoneConfig the interact configuration to use when connecting\n */\n connectDropzoneEvents(nativeElement, dropzoneConfig: DropzoneOptions) {\n return interact(nativeElement).dropzone(dropzoneConfig)\n // TODO: investigate when this fires in different scenarios\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 * Maps the drop event emitted by interact to something a little easier to use\n * @param event the drop event emitted by interact, extended with extra fields we added to\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, Input, TemplateRef, inject } 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: false\n})\nexport class DragPreviewDirective<T = any> {\n templateRef = inject<TemplateRef<T>>(TemplateRef);\n\n\n @Input() dragData: 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 } 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: false\n})\nexport class DragRootDirective {\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","import { Directive, ElementRef, HostListener, Input, inject } from '@angular/core';\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { scan, shareReplay } from 'rxjs/operators';\n\ninterface ScrollObject {scrollTop: number, scrollLeft: number};\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: '[tftAutoScroll]',\n standalone: false\n})\nexport class AutoScrollDirective {\n el = inject(ElementRef);\n\n /**\n * Limit minimum time between scroll events in milliseconds\n */\n @Input() autoScrollConfig = {\n margin: 50,\n distance: 3,\n interval: 50,\n speed: 300,\n enabled: true\n };\n private scrollSubject: BehaviorSubject<ScrollObject>;\n readonly scrollObserver: Observable<ScrollObject>;\n readonly scrollDeltaObserver = new Subject<ScrollObject>();\n // this setup allows consumers to set x, y scale independently or just set them both with scale\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\n constructor() {\n const el = this.el;\n\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}\n","import { Directive, ElementRef, Input, OnInit, Output, OnDestroy, EventEmitter, Renderer2, SimpleChanges, OnChanges, 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 // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n '[style.touchAction]': 'this.dragDisabled ? \"auto\" : \"none\"',\n '[style.position]': '\"absolute\"',\n '[id]': 'interactableId',\n },\n standalone: false\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class DraggableDirective<D = any> implements OnInit, OnChanges, 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\n\n @Input() x: number;\n @Input() y: number;\n /* zIndex while dragging*/\n @Input() dragZIndex = 10000;\n /** zIndex while at rest */\n @Input() zIndex: number\n @Input() interactableId: string;\n @Input() dragData: D;\n @Input() enableDragDefault = true;\n /**\n * @deprecated replaced by 'dragDisabled' property, please migrate before v13\n */\n @Input() disabled = false;\n @Input() dragDisabled = false;\n @Input() dragConfig: Partial<Interact.OrBoolean<DraggableOptions>>;\n @Input() showPlaceholder = 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 @Input() dragRoot: DragRootDirective; // HTMLElement;\n\n private dragRootEl: HTMLElement;\n // pipes all interact events to event emitters\n @Output() dragStart = new EventEmitter<TftDragEvent>();\n @Output() dragMove = new EventEmitter<TftDragEvent>();\n @Output() dragInertiaStart = new EventEmitter<TftDragEvent>();\n @Output() dragEnd = new EventEmitter<TftDragEvent>();\n\n @ContentChild(DragPreviewDirective) _previewTemplate: DragPreviewDirective;\n // dragPreview: Interact.Element;\n interactableState: Observable<TftCoords>;\n interactable: Interactable;\n private registryId: string;\n private interactableSubscription: Subscription;\n private scrollEventsSubscription: Subscription;\n\n // cache holding element to use as drag preview (the element the user sees being dragged around)\n previewRef: TftDragElement;\n // check all the different places for scale\n get scale(): number {\n return 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 ngOnInit() {\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 // register with parent dropzone if it exists, otherwise use default\n // this gives us a place on the registry to store our drag items that don't have a dropzone\n this.registryId = this.dropzone_dir?.dropzoneId || DEFAULT_REGISTRY_ID;\n // add draggable to directory and store its id\n this.interactableId = this.interactService.addDraggableToRegistry(this.registryId, this.interactableId);\n this.alignPositionWithInputs(this.x, this.y);\n // cache subscription to interactable state so we can unsubscribe onDestroy\n this.interactableState = this.interactService\n .getInteractableState(this.interactableId, this.registryId);\n // keep our cached position values in line with our drag state\n this.interactableSubscription = this.interactableState.subscribe((state) => {\n this.y = state.y;\n this.x = state.x;\n });\n this.setDragConfig();\n }\n\n // TODO: watch config here as well and update interactable\n ngOnChanges(changes: SimpleChanges) {\n // we do this here instead of using a setter on the input so that it\n // will only run once when there is a change to x and y\n if(changes.y || changes.x) {\n this.alignPositionWithInputs(this.x, this.y);\n }\n if(changes.dragConfig || changes.disabled || changes.dragDisabled) {\n if(!this.interactable) return;\n this.setDragConfig();\n }\n /**\n * @deprecated remove this in v13\n */\n if (changes.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 }\n\n setDragConfig() {\n const enabled = !(this.disabled || this.dragDisabled)\n const dragConfig = {...this.dragConfig, enabled};\n this.interactable.draggable(dragConfig);\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 // clean up state and subscriptions related to destroyed component\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, 'touchAction', 'none');\n this.renderer.setStyle(dragElement, 'zIndex', 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, 'userSelect', 'none');\n\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 // short circuit if positions aren't numbers or if they haven't changed\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 // We use use this instead of isNaN here to try and help performance\n // We should be able to reliably restrict to numbers or falsey values\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 {\n ...this.auto_scroll_dir.autoScrollConfig,\n container: this.auto_scroll_dir.el.nativeElement as HTMLElement\n }\n }\n )\n };\n return interact(nativeElement).draggable(defaultDragConfig)\n .on('dragstart', (event: NgDragEvent) => {\n const interaction = event.interaction;\n // check if we should append drag element to body\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 // subscribe to scroll events if they are there, by only subscribing on dragstart we avoid wasting subscriptions on interactables that aren't be dragged\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 const mappedEvent = this.mapDragEvent(event);\n this.dragMove.emit(mappedEvent);\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 this.dragEnd.emit(mappedEvent);\n // unsubscribe from scroll events if subscribed\n if (this.auto_scroll_dir) {\n this.scrollEventsSubscription.unsubscribe();\n }\n if ( this.el.nativeElement !== this.previewRef) {\n // we do this in a timeout, so that we don't remove before the dropzone can get the boundingElementRect\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/**\n * Component utils\n */\n// create a clone of the component passed in and add it to the root component\nfunction cloneElement(element: HTMLElement) {\n const clone = element.cloneNode(true) as HTMLElement;\n clone.removeAttribute('id');\n return clone;\n}\nfunction getPreviewInsertionPoint(documentRef: any): HTMLElement {\n // We can't use the body if the user is in fullscreen mode,\n // because the preview will render under the fullscreen element.\n return documentRef.fullscreenElement ||\n documentRef.webkitFullscreenElement ||\n documentRef.mozFullScreenElement ||\n documentRef.msFullscreenElement ||\n documentRef.body;\n}\n","import { Directive, OnInit, OnDestroy, ElementRef, Input, Output, EventEmitter, OnChanges, SimpleChanges, 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/** @dynamic */\n@Directive({\n selector: '[tftResizable]',\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n // prevents touch events from colliding with with mouse events\n // on touch screen\n '[style.touchAction]': 'this.resizeDisabled ? \"auto\" : \"none\"',\n // default to absolute here to accommodate likely use cases\n // consuming component can easily over ride with position input\n '[style.position]': 'position',\n // follows interactjs suggested practices\n '[style.boxSizing]': '\"border-box\"',\n },\n standalone: false\n})\nexport class ResizableDirective implements OnInit, OnDestroy, OnChanges {\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\n @Input() enableResizeDefault = true;\n // TODO: should this be an input with default or should consuming user set display in styles each time\n @Input() position = 'absolute';\n @Input() resizeConfig: Partial<Interact.OrBoolean<ResizableOptions>>;\n @Input() interactableId: string;\n\n @Input() width: number;\n @Input() height: number;\n @Input() resizeDisabled = false;\n\n @Output() resizeStart = new EventEmitter<TftResizeEvent>();\n @Output() resizeMove = new EventEmitter<TftResizeEvent>();\n @Output() resizeInertiaStart = new EventEmitter<TftResizeEvent>();\n @Output() resizeEnd = new EventEmitter<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 // The\n dragRootEl: HTMLElement;\n\n private activeEdges: ActiveEdges = {left: false, right: false, top: false, bottom: false}\n private interactableSubscription: Subscription;\n private scrollEventsSubscription: Subscription;\n\n get scale(): number {\n return this.account_for_scale_dir?.scale || this.drag_root_dir?.account_for_scale_dir?.scale;\n }\n\n constructor() {\n const drag_root_dir = this.drag_root_dir;\n\n this.dragRootEl = (drag_root_dir?.el?.nativeElement as HTMLElement) || this._document.body;\n }\n\n ngOnInit() {\n this.addResizePropertiesToElement(this.el.nativeElement);\n\n // we check for a dropzone, we use its id as the registry id if there is on\n // otherwise, we use DEFAULT_REGISTRY_ID as a registry id. This allows us to keep our interactable\n // drag state organized by dropzones.\n this.registryId = this.dropzone_dir?.dropzoneId || DEFAULT_REGISTRY_ID;\n\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 ngOnChanges(changes: SimpleChanges) {\n if ((changes.resizeConfig || changes.resizeDisabled) && this.interactable) {\n this.interactable.resizable({...this.resizeConfig, enabled: !this.resizeDisabled,});\n }\n if (changes.width || changes.height) {\n this.alignDimensionsWithInputs(this.width, this.height);\n }\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 // We get the width and height directly from the native element because\n // the event dimension can get out of sync when resizing with autoScroll\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 * hook elements into interacts resize event listeners\n * we spread the configs so that the consuming component only overwrites the\n * pieces that it explicitly indicates\n * @param resizeConfig\n * @param nativeElement\n */\n initiateResizeEvents(resizeConfig: Partial<Interact.OrBoolean<ResizableOptions>>, nativeElement: TftDragElement) {\n // TODO: This should try and get interactable from tft_draggable if it exists\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 const mappedEvent = this.mapResizeEvent(event);\n this.resizeMove.emit(mappedEvent)\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\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, Input, OnInit, Output, EventEmitter, SimpleChanges, OnChanges, inject } 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 // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: {\n // '[style.touchAction]': 'this.gestureDisabled ? \"auto\" : \"none\"',\n '[id]': 'gesturableId',\n },\n standalone: false\n})\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class GesturableDirective<D = any> implements OnInit, OnChanges {\n el = inject(ElementRef);\n private draggable_dir = inject(DraggableDirective, { optional: true });\n\n\n @Input() gesturableId: string;\n @Input() gestureDisabled = false;\n @Input() gestureConfig: Partial<Interact.OrBoolean<DraggableOptions>>;\n // pipes all interact events to event emitters\n @Output() gestureStart = new EventEmitter<TftGestureEvent>();\n @Output() gestureMove = new EventEmitter<TftGestureEvent>();\n @Output() gestureEnd = new EventEmitter<TftGestureEvent>();\n\n interactableState: Observable<TftCoords>;\n interactable: Interactable;\n\n ngOnInit() {\n this.gesturableId = this.draggable_dir?.interactableId || 'id';\n this.interactable = this.initiateGestureEvents(this.gestureConfig, this.el.nativeElement);\n this.setGestureConfig();\n }\n\n // TODO: watch config here as well and update interactable\n ngOnChanges(changes: SimpleChanges) {\n // we do this here instead of using a setter on the input so that it\n // will only run once when there is a change to x and y\n if(changes.gestureConfig || changes.gestureDisabled) {\n if(!this.interactable) return;\n this.setGestureConfig();\n }\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\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, HostBinding, Input, inject } from '@angular/core';\n\n@Directive({\n selector: '[tftApplyScale]',\n standalone: false\n})\nexport class ApplyScaleDirective {\n el = inject(ElementRef);\n\n\n _scale = 1;\n // this setup allows consumers to set x, y scale independently or just set them both with scale\n @Input() set scale(val: number){\n this._scale;\n this.fontSize = `${val}px`;\n };\n\n @HostBinding('style.fontSize') fontSize: string;\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ArrayOfNPipe } from './pipes/array-of-n.pipe';\nimport { ApplyScaleDirective, DraggableDirective, DragRootDirective, AutoScrollDirective, AccountForScaleDirective, GesturableDirective, ResizableDirective, DropzoneDirective, DragPreviewDirective } from './directives';\nimport { InteractService } from './services/interact.service';\nimport { InteractRootConfig, INTERACT_ROOT_CONFIG } from './models';\n\n\n\nconst EXPORTS = [\n DraggableDirective,\n ResizableDirective,\n DropzoneDirective,\n GesturableDirective,\n DragRootDirective,\n AutoScrollDirective,\n AccountForScaleDirective,\n ApplyScaleDirective,\n DragPreviewDirective,\n ArrayOfNPipe,\n];\n\n\n@NgModule({\n imports: [CommonModule],\n // providers: [{ provide: INTERACT_ROOT_CONFIG, useValue: 'px' }],\n declarations: [\n ...EXPORTS,\n ],\n exports: [\n ...EXPORTS\n ]\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,YAAY,EAAA,YAAA,EAAA,KAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,UAAU;AAChB,oBAAA,UAAU,EAAE;AACf,iBAAA;;;MCMY,oBAAoB,GAAG,IAAI,cAAc,CAAqB,6BAA6B;AAEj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O,EAAE;AACP,wBAAA,GAAG;AACJ;AACF,iBAAA;;;AChCD;;AAEG;;;;"}
|
package/package.json
CHANGED
package/types/tft-interact.d.ts
CHANGED
|
@@ -1,112 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { OnInit, OnChanges, ElementRef, EventEmitter, SimpleChanges, TemplateRef, InjectionToken, OnDestroy, AfterViewInit, PipeTransform, ModuleWithProviders, EmbeddedViewRef } from '@angular/core';
|
|
3
3
|
import * as _interactjs_core_Interactable from '@interactjs/core/Interactable';
|
|
4
|
-
import * as _tft_interact from '@tft/interact';
|
|
5
|
-
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
6
4
|
import { DropzoneOptions, Interactable, DraggableOptions, ResizableOptions, ResizeEvent, GesturableOptions } from '@interactjs/types/index';
|
|
7
|
-
import {
|
|
5
|
+
import { Observable, Subject, BehaviorSubject } from 'rxjs';
|
|
6
|
+
import { Point, DropEvent, Interactable as Interactable$1, DragEvent, ResizeEvent as ResizeEvent$1, GestureEvent } from '@interactjs/types';
|
|
8
7
|
import * as i11 from '@angular/common';
|
|
9
8
|
|
|
10
|
-
declare class InteractService {
|
|
11
|
-
private rendererFactory;
|
|
12
|
-
private ngZone;
|
|
13
|
-
rootConfig: any;
|
|
14
|
-
private _interactableIndex;
|
|
15
|
-
private _dropzoneIndex;
|
|
16
|
-
private renderer;
|
|
17
|
-
readonly dragRegistrySystem: {
|
|
18
|
-
[key: string]: InteractableRegistry;
|
|
19
|
-
};
|
|
20
|
-
private cssUnit;
|
|
21
|
-
constructor(rendererFactory: RendererFactory2, ngZone: NgZone, rootConfig: any);
|
|
22
|
-
addDeltaToPosition(delta: Delta, position: Position): {
|
|
23
|
-
x: number;
|
|
24
|
-
y: number;
|
|
25
|
-
targetElement: TftDragElement;
|
|
26
|
-
};
|
|
27
|
-
addRegistryToSystem(customRegistryId?: string | null): string;
|
|
28
|
-
addDraggableToRegistry(customRegistryId?: any, interactableId?: string | null): string;
|
|
29
|
-
destroyInteractable(interactableId: string, registryId?: string): void;
|
|
30
|
-
subscribeToInteractable(interactableId: string, registryId?: string): _tft_interact.InteractableSystem;
|
|
31
|
-
createInteractableState(initialPosition: Position, initialSize: Size, initialDelta: Delta): {
|
|
32
|
-
deltas$: BehaviorSubject<Delta>;
|
|
33
|
-
position$: BehaviorSubject<Position>;
|
|
34
|
-
size$: BehaviorSubject<{
|
|
35
|
-
deltaX: number | null;
|
|
36
|
-
deltaY: number | null;
|
|
37
|
-
targetElement: TftDragElement | null;
|
|
38
|
-
width: number | null;
|
|
39
|
-
height: number | null;
|
|
40
|
-
}>;
|
|
41
|
-
interactable$: Observable<TftCoords>;
|
|
42
|
-
};
|
|
43
|
-
createInteractableId(customInteractableId?: string | null): string;
|
|
44
|
-
createDropzoneId(index: number): string;
|
|
45
|
-
getInteractableState(interactableId: string, registryId?: string): Observable<TftCoords>;
|
|
46
|
-
updateDeltas(interactId: string, registryId: string, { deltaX, deltaY }: {
|
|
47
|
-
deltaX: any;
|
|
48
|
-
deltaY: any;
|
|
49
|
-
}, targetElement: any): void;
|
|
50
|
-
updatePosition(interactId: string, registryId: string, { x, y }: {
|
|
51
|
-
x: number;
|
|
52
|
-
y: number;
|
|
53
|
-
}, targetElement: any): void;
|
|
54
|
-
updateSize(interactId: string, registryId: string, { deltaX, deltaY, width, height }: {
|
|
55
|
-
deltaX: any;
|
|
56
|
-
deltaY: any;
|
|
57
|
-
width: any;
|
|
58
|
-
height: any;
|
|
59
|
-
}, targetElement: any): void;
|
|
60
|
-
interactableExistOnRegistry(interactId: string, registryId?: string): boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Uses renderer to set width and height of angular component
|
|
63
|
-
* @param width the desired width of component
|
|
64
|
-
* @param height the desired height of component
|
|
65
|
-
* @param target the element to transform
|
|
66
|
-
*/
|
|
67
|
-
setElementSize(width: number, height: number, target: TftResizeElement): void;
|
|
68
|
-
/**
|
|
69
|
-
* Uses renderer to set position of angular component
|
|
70
|
-
* @param x position on x axis
|
|
71
|
-
* @param y position on y axis
|
|
72
|
-
* @param target the element to transform
|
|
73
|
-
*/
|
|
74
|
-
setElementTransform(x: number, y: number, position: Position): void;
|
|
75
|
-
/**
|
|
76
|
-
* Generates a translate string for the x and y arguments passed to
|
|
77
|
-
* be passed to css transform
|
|
78
|
-
* @param x the position along the x axis
|
|
79
|
-
* @param y the position along the y axis
|
|
80
|
-
*/
|
|
81
|
-
createTransformString(x: number, y: number): string;
|
|
82
|
-
calculatePositionInElement(zoneElement: Interact.Element, dragElement: TftDragElement, scale?: number): {
|
|
83
|
-
x: number;
|
|
84
|
-
y: number;
|
|
85
|
-
};
|
|
86
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<InteractService, [null, null, { optional: true; }]>;
|
|
87
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<InteractService>;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Use to apply scale to the element and tell the drag and resize directives to account for the scale when
|
|
92
|
-
* @example <div tftAccountForScale [scale]="2.5"> <div tftDraggable> </div> </div>
|
|
93
|
-
* @note if `dragRoot` is used this directive should be used on the same element to ensure that the drag
|
|
94
|
-
* element accounts for scale
|
|
95
|
-
*/
|
|
96
|
-
declare class AccountForScaleDirective {
|
|
97
|
-
el: ElementRef;
|
|
98
|
-
scale: number;
|
|
99
|
-
constructor(el: ElementRef);
|
|
100
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AccountForScaleDirective, never>;
|
|
101
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AccountForScaleDirective, "[tftAccountForScale]", never, { "scale": { "alias": "scale"; "required": false; }; }, {}, never, never, false, never>;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
9
|
type PositionOption = 'relative' | 'absolute' | 'fixed' | 'static' | 'sticky' | 'unset' | 'inherit' | 'initial' | 'revert';
|
|
105
10
|
declare class DropzoneDirective implements OnInit, OnChanges {
|
|
106
|
-
el: ElementRef
|
|
11
|
+
el: ElementRef<any>;
|
|
107
12
|
private renderer;
|
|
108
13
|
private interactService;
|
|
109
|
-
private account_for_scale_dir
|
|
14
|
+
private account_for_scale_dir;
|
|
110
15
|
dropzoneId: string;
|
|
111
16
|
dropzoneConfig: DropzoneOptions;
|
|
112
17
|
dropzoneData: any;
|
|
@@ -117,7 +22,6 @@ declare class DropzoneDirective implements OnInit, OnChanges {
|
|
|
117
22
|
dragDrop: EventEmitter<TftDropEvent>;
|
|
118
23
|
dropzone: Interactable;
|
|
119
24
|
get scale(): number;
|
|
120
|
-
constructor(el: ElementRef, renderer: Renderer2, interactService: InteractService, account_for_scale_dir?: AccountForScaleDirective);
|
|
121
25
|
ngOnInit(): void;
|
|
122
26
|
ngOnChanges(changes: SimpleChanges): void;
|
|
123
27
|
/**
|
|
@@ -131,7 +35,7 @@ declare class DropzoneDirective implements OnInit, OnChanges {
|
|
|
131
35
|
* @param event the drop event emitted by interact, extended with extra fields we added to
|
|
132
36
|
*/
|
|
133
37
|
mapDropzoneEvent(event: NgDropEvent): TftDropEvent;
|
|
134
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DropzoneDirective,
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropzoneDirective, never>;
|
|
135
39
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DropzoneDirective, "[tftDropzone]", never, { "dropzoneId": { "alias": "dropzoneId"; "required": false; }; "dropzoneConfig": { "alias": "dropzoneConfig"; "required": false; }; "dropzoneData": { "alias": "dropzoneData"; "required": false; }; "position": { "alias": "position"; "required": false; }; }, { "dropActivate": "dropActivate"; "dragEnter": "dragEnter"; "dragLeave": "dragLeave"; "dragDrop": "dragDrop"; }, never, never, false, never>;
|
|
136
40
|
}
|
|
137
41
|
|
|
@@ -139,21 +43,32 @@ declare const TFT_DRAG_PREVIEW: InjectionToken<DragPreviewDirective<any>>;
|
|
|
139
43
|
declare class DragPreviewDirective<T = any> {
|
|
140
44
|
templateRef: TemplateRef<T>;
|
|
141
45
|
dragData: T;
|
|
142
|
-
constructor(templateRef: TemplateRef<T>);
|
|
143
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<DragPreviewDirective<any>, never>;
|
|
144
47
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DragPreviewDirective<any>, "ng-template[tftDragPreview]", never, { "dragData": { "alias": "dragData"; "required": false; }; }, {}, never, never, false, never>;
|
|
145
48
|
}
|
|
146
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Use to apply scale to the element and tell the drag and resize directives to account for the scale when
|
|
52
|
+
* @example <div tftAccountForScale [scale]="2.5"> <div tftDraggable> </div> </div>
|
|
53
|
+
* @note if `dragRoot` is used this directive should be used on the same element to ensure that the drag
|
|
54
|
+
* element accounts for scale
|
|
55
|
+
*/
|
|
56
|
+
declare class AccountForScaleDirective {
|
|
57
|
+
el: ElementRef<any>;
|
|
58
|
+
scale: number;
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AccountForScaleDirective, never>;
|
|
60
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AccountForScaleDirective, "[tftAccountForScale]", never, { "scale": { "alias": "scale"; "required": false; }; }, {}, never, never, false, never>;
|
|
61
|
+
}
|
|
62
|
+
|
|
147
63
|
/**
|
|
148
64
|
* Use this directive to select which element to attach the element to while dragging
|
|
149
65
|
* @example <div tftDragRoot><div tftDraggable> </div> </div>
|
|
150
66
|
* @note this directive will overwrite any style transformations (e.g. transform: scale(2); )
|
|
151
67
|
*/
|
|
152
68
|
declare class DragRootDirective {
|
|
153
|
-
el: ElementRef
|
|
69
|
+
el: ElementRef<any>;
|
|
154
70
|
account_for_scale_dir?: AccountForScaleDirective;
|
|
155
|
-
|
|
156
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DragRootDirective, [null, { optional: true; self: true; }]>;
|
|
71
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragRootDirective, never>;
|
|
157
72
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DragRootDirective, "[tftDragRoot]", ["tftDragRoot"], {}, {}, never, never, false, never>;
|
|
158
73
|
}
|
|
159
74
|
|
|
@@ -168,7 +83,7 @@ interface ScrollObject {
|
|
|
168
83
|
* element accounts for scale
|
|
169
84
|
*/
|
|
170
85
|
declare class AutoScrollDirective {
|
|
171
|
-
el: ElementRef
|
|
86
|
+
el: ElementRef<any>;
|
|
172
87
|
/**
|
|
173
88
|
* Limit minimum time between scroll events in milliseconds
|
|
174
89
|
*/
|
|
@@ -183,14 +98,14 @@ declare class AutoScrollDirective {
|
|
|
183
98
|
readonly scrollObserver: Observable<ScrollObject>;
|
|
184
99
|
readonly scrollDeltaObserver: Subject<ScrollObject>;
|
|
185
100
|
scroll(scrollEvent: Event): void;
|
|
186
|
-
constructor(
|
|
101
|
+
constructor();
|
|
187
102
|
static ɵfac: i0.ɵɵFactoryDeclaration<AutoScrollDirective, never>;
|
|
188
103
|
static ɵdir: i0.ɵɵDirectiveDeclaration<AutoScrollDirective, "[tftAutoScroll]", never, { "autoScrollConfig": { "alias": "autoScrollConfig"; "required": false; }; }, {}, never, never, false, never>;
|
|
189
104
|
}
|
|
190
105
|
|
|
191
106
|
/** @dynamic */
|
|
192
107
|
declare class DraggableDirective<D = any> implements OnInit, OnChanges, OnDestroy, AfterViewInit {
|
|
193
|
-
el: ElementRef
|
|
108
|
+
el: ElementRef<any>;
|
|
194
109
|
private interactService;
|
|
195
110
|
private renderer;
|
|
196
111
|
private _viewContainerRef;
|
|
@@ -233,7 +148,6 @@ declare class DraggableDirective<D = any> implements OnInit, OnChanges, OnDestro
|
|
|
233
148
|
private scrollEventsSubscription;
|
|
234
149
|
previewRef: TftDragElement;
|
|
235
150
|
get scale(): number;
|
|
236
|
-
constructor(el: ElementRef, interactService: InteractService, renderer: Renderer2, _viewContainerRef: ViewContainerRef, _document: Document, account_for_scale_dir?: AccountForScaleDirective, dropzone_dir?: DropzoneDirective, drag_root_dir?: DragRootDirective, auto_scroll_dir?: AutoScrollDirective);
|
|
237
151
|
ngOnInit(): void;
|
|
238
152
|
ngOnChanges(changes: SimpleChanges): void;
|
|
239
153
|
setDragConfig(): void;
|
|
@@ -249,20 +163,20 @@ declare class DraggableDirective<D = any> implements OnInit, OnChanges, OnDestro
|
|
|
249
163
|
isNumeric(num: number): boolean;
|
|
250
164
|
initiateDragEvents(dragConfig: Partial<Interact.OrBoolean<DraggableOptions>>, nativeElement: HTMLElement): _interactjs_core_Interactable.Interactable;
|
|
251
165
|
subscribeToScrollEvents(): void;
|
|
252
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DraggableDirective<any>,
|
|
166
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DraggableDirective<any>, never>;
|
|
253
167
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DraggableDirective<any>, "[tftDraggable]", never, { "x": { "alias": "x"; "required": false; }; "y": { "alias": "y"; "required": false; }; "dragZIndex": { "alias": "dragZIndex"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "interactableId": { "alias": "interactableId"; "required": false; }; "dragData": { "alias": "dragData"; "required": false; }; "enableDragDefault": { "alias": "enableDragDefault"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "dragDisabled": { "alias": "dragDisabled"; "required": false; }; "dragConfig": { "alias": "dragConfig"; "required": false; }; "showPlaceholder": { "alias": "showPlaceholder"; "required": false; }; "dragRoot": { "alias": "dragRoot"; "required": false; }; }, { "dragStart": "dragStart"; "dragMove": "dragMove"; "dragInertiaStart": "dragInertiaStart"; "dragEnd": "dragEnd"; }, ["_previewTemplate"], never, false, never>;
|
|
254
168
|
}
|
|
255
169
|
|
|
256
170
|
/** @dynamic */
|
|
257
171
|
declare class ResizableDirective implements OnInit, OnDestroy, OnChanges {
|
|
258
|
-
el: ElementRef
|
|
172
|
+
el: ElementRef<any>;
|
|
259
173
|
private _document;
|
|
260
174
|
private interactService;
|
|
261
175
|
private renderer;
|
|
262
|
-
private drag_root_dir
|
|
176
|
+
private drag_root_dir;
|
|
263
177
|
account_for_scale_dir?: AccountForScaleDirective;
|
|
264
|
-
private draggable_dir
|
|
265
|
-
private dropzone_dir
|
|
178
|
+
private draggable_dir;
|
|
179
|
+
private dropzone_dir;
|
|
266
180
|
auto_scroll_dir?: AutoScrollDirective;
|
|
267
181
|
enableResizeDefault: boolean;
|
|
268
182
|
position: string;
|
|
@@ -283,7 +197,7 @@ declare class ResizableDirective implements OnInit, OnDestroy, OnChanges {
|
|
|
283
197
|
private interactableSubscription;
|
|
284
198
|
private scrollEventsSubscription;
|
|
285
199
|
get scale(): number;
|
|
286
|
-
constructor(
|
|
200
|
+
constructor();
|
|
287
201
|
ngOnInit(): void;
|
|
288
202
|
ngOnChanges(changes: SimpleChanges): void;
|
|
289
203
|
ngOnDestroy(): void;
|
|
@@ -300,14 +214,14 @@ declare class ResizableDirective implements OnInit, OnDestroy, OnChanges {
|
|
|
300
214
|
alignDimensionsWithInputs(width: number, height: number): void;
|
|
301
215
|
addResizePropertiesToElement(nativeElement: TftDragElement): void;
|
|
302
216
|
subscribeToScrollEvents(): void;
|
|
303
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ResizableDirective,
|
|
217
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResizableDirective, never>;
|
|
304
218
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ResizableDirective, "[tftResizable]", never, { "enableResizeDefault": { "alias": "enableResizeDefault"; "required": false; }; "position": { "alias": "position"; "required": false; }; "resizeConfig": { "alias": "resizeConfig"; "required": false; }; "interactableId": { "alias": "interactableId"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "resizeDisabled": { "alias": "resizeDisabled"; "required": false; }; }, { "resizeStart": "resizeStart"; "resizeMove": "resizeMove"; "resizeInertiaStart": "resizeInertiaStart"; "resizeEnd": "resizeEnd"; }, never, never, false, never>;
|
|
305
219
|
}
|
|
306
220
|
|
|
307
221
|
/** @dynamic */
|
|
308
222
|
declare class GesturableDirective<D = any> implements OnInit, OnChanges {
|
|
309
|
-
el: ElementRef
|
|
310
|
-
private draggable_dir
|
|
223
|
+
el: ElementRef<any>;
|
|
224
|
+
private draggable_dir;
|
|
311
225
|
gesturableId: string;
|
|
312
226
|
gestureDisabled: boolean;
|
|
313
227
|
gestureConfig: Partial<Interact.OrBoolean<DraggableOptions>>;
|
|
@@ -316,21 +230,19 @@ declare class GesturableDirective<D = any> implements OnInit, OnChanges {
|
|
|
316
230
|
gestureEnd: EventEmitter<TftGestureEvent>;
|
|
317
231
|
interactableState: Observable<TftCoords>;
|
|
318
232
|
interactable: Interactable;
|
|
319
|
-
constructor(el: ElementRef, draggable_dir?: DraggableDirective);
|
|
320
233
|
ngOnInit(): void;
|
|
321
234
|
ngOnChanges(changes: SimpleChanges): void;
|
|
322
235
|
setGestureConfig(): void;
|
|
323
236
|
initiateGestureEvents(gestureConfig: Partial<Interact.OrBoolean<GesturableOptions>>, nativeElement: HTMLElement): _interactjs_core_Interactable.Interactable;
|
|
324
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GesturableDirective<any>,
|
|
237
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GesturableDirective<any>, never>;
|
|
325
238
|
static ɵdir: i0.ɵɵDirectiveDeclaration<GesturableDirective<any>, "[tftGesturable]", never, { "gesturableId": { "alias": "gesturableId"; "required": false; }; "gestureDisabled": { "alias": "gestureDisabled"; "required": false; }; "gestureConfig": { "alias": "gestureConfig"; "required": false; }; }, { "gestureStart": "gestureStart"; "gestureMove": "gestureMove"; "gestureEnd": "gestureEnd"; }, never, never, false, never>;
|
|
326
239
|
}
|
|
327
240
|
|
|
328
241
|
declare class ApplyScaleDirective {
|
|
329
|
-
el: ElementRef
|
|
242
|
+
el: ElementRef<any>;
|
|
330
243
|
_scale: number;
|
|
331
244
|
set scale(val: number);
|
|
332
245
|
fontSize: string;
|
|
333
|
-
constructor(el: ElementRef);
|
|
334
246
|
static ɵfac: i0.ɵɵFactoryDeclaration<ApplyScaleDirective, never>;
|
|
335
247
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ApplyScaleDirective, "[tftApplyScale]", never, { "scale": { "alias": "scale"; "required": false; }; }, {}, never, never, false, never>;
|
|
336
248
|
}
|
package/tft-interact-21.0.0.tgz
DELETED
|
Binary file
|