@tft/interact 14.0.0 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{esm2020 → esm2022}/index.mjs +5 -5
- package/{esm2020 → esm2022}/lib/directives/account-for-scale.directive.mjs +26 -26
- package/{esm2020 → esm2022}/lib/directives/apply-scale.directive.mjs +28 -28
- package/esm2022/lib/directives/auto-scroll.directive.mjs +56 -0
- package/{esm2020 → esm2022}/lib/directives/drag-preview.directive.mjs +20 -20
- package/{esm2020 → esm2022}/lib/directives/drag-root.directive.mjs +32 -32
- package/{esm2020 → esm2022}/lib/directives/draggable.directive.mjs +320 -320
- package/{esm2020 → esm2022}/lib/directives/dropzone.directive.mjs +114 -114
- package/{esm2020 → esm2022}/lib/directives/gesturable.directive.mjs +82 -82
- package/{esm2020 → esm2022}/lib/directives/index.mjs +9 -9
- package/esm2022/lib/directives/resizable.directive.mjs +228 -0
- package/{esm2020 → esm2022}/lib/interact.module.mjs +66 -66
- package/{esm2020 → esm2022}/lib/models/index.mjs +1 -1
- package/{esm2020 → esm2022}/lib/models/interact.mjs +27 -27
- package/{esm2020 → esm2022}/lib/pipes/array-of-n.pipe.mjs +22 -22
- package/{esm2020 → esm2022}/lib/pipes/index.mjs +1 -1
- package/{esm2020 → esm2022}/lib/services/interact.service.mjs +197 -197
- package/{esm2020 → esm2022}/lib/utils/helpers.mjs +34 -34
- package/{esm2020 → esm2022}/lib/utils/index.mjs +1 -1
- package/{esm2020 → esm2022}/tft-interact.mjs +4 -4
- package/{fesm2020 → fesm2022}/tft-interact.mjs +1155 -1155
- package/{fesm2020 → fesm2022}/tft-interact.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/directives/account-for-scale.directive.d.ts +15 -15
- package/lib/directives/apply-scale.directive.d.ts +11 -11
- package/lib/directives/auto-scroll.directive.d.ts +34 -34
- package/lib/directives/drag-preview.directive.d.ts +10 -10
- package/lib/directives/drag-root.directive.d.ts +15 -15
- package/lib/directives/draggable.directive.d.ts +76 -76
- package/lib/directives/dropzone.directive.d.ts +40 -40
- package/lib/directives/gesturable.directive.d.ts +27 -27
- package/lib/directives/index.d.ts +9 -9
- package/lib/directives/resizable.directive.d.ts +61 -61
- package/lib/interact.module.d.ts +20 -20
- package/lib/models/index.d.ts +1 -1
- package/lib/models/interact.d.ts +140 -140
- package/lib/pipes/array-of-n.pipe.d.ts +12 -12
- package/lib/pipes/index.d.ts +1 -1
- package/lib/services/interact.service.d.ts +83 -83
- package/lib/utils/helpers.d.ts +12 -12
- package/lib/utils/index.d.ts +1 -1
- package/package.json +7 -15
- package/tft-interact-15.0.0.tgz +0 -0
- package/esm2020/lib/directives/auto-scroll.directive.mjs +0 -56
- package/esm2020/lib/directives/resizable.directive.mjs +0 -228
- package/fesm2015/tft-interact.mjs +0 -1203
- package/fesm2015/tft-interact.mjs.map +0 -1
- package/tft-interact-14.0.0.tgz +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { InjectionToken, TemplateRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare const TFT_DRAG_PREVIEW: InjectionToken<DragPreviewDirective<any>>;
|
|
4
|
-
export declare class DragPreviewDirective<T = any> {
|
|
5
|
-
templateRef: TemplateRef<T>;
|
|
6
|
-
dragData: T;
|
|
7
|
-
constructor(templateRef: TemplateRef<T>);
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DragPreviewDirective<any>, never>;
|
|
9
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DragPreviewDirective<any>, "ng-template[tftDragPreview]", never, { "dragData": "dragData"; }, {}, never, never, false>;
|
|
10
|
-
}
|
|
1
|
+
import { InjectionToken, TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare const TFT_DRAG_PREVIEW: InjectionToken<DragPreviewDirective<any>>;
|
|
4
|
+
export declare class DragPreviewDirective<T = any> {
|
|
5
|
+
templateRef: TemplateRef<T>;
|
|
6
|
+
dragData: T;
|
|
7
|
+
constructor(templateRef: TemplateRef<T>);
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragPreviewDirective<any>, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DragPreviewDirective<any>, "ng-template[tftDragPreview]", never, { "dragData": { "alias": "dragData"; "required": false; }; }, {}, never, never, false, never>;
|
|
10
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { AccountForScaleDirective } from './account-for-scale.directive';
|
|
2
|
-
import { ElementRef } from '@angular/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Use this directive to select which element to attach the element to while dragging
|
|
6
|
-
* @example <div tftDragRoot><div tftDraggable> </div> </div>
|
|
7
|
-
* @note this directive will overwrite any style transformations (e.g. transform: scale(2); )
|
|
8
|
-
*/
|
|
9
|
-
export declare class DragRootDirective {
|
|
10
|
-
el: ElementRef;
|
|
11
|
-
account_for_scale_dir?: AccountForScaleDirective;
|
|
12
|
-
constructor(el: ElementRef, account_for_scale_dir?: AccountForScaleDirective);
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DragRootDirective, [null, { optional: true; self: true; }]>;
|
|
14
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DragRootDirective, "[tftDragRoot]", ["tftDragRoot"], {}, {}, never, never, false>;
|
|
15
|
-
}
|
|
1
|
+
import { AccountForScaleDirective } from './account-for-scale.directive';
|
|
2
|
+
import { ElementRef } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Use this directive to select which element to attach the element to while dragging
|
|
6
|
+
* @example <div tftDragRoot><div tftDraggable> </div> </div>
|
|
7
|
+
* @note this directive will overwrite any style transformations (e.g. transform: scale(2); )
|
|
8
|
+
*/
|
|
9
|
+
export declare class DragRootDirective {
|
|
10
|
+
el: ElementRef;
|
|
11
|
+
account_for_scale_dir?: AccountForScaleDirective;
|
|
12
|
+
constructor(el: ElementRef, account_for_scale_dir?: AccountForScaleDirective);
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DragRootDirective, [null, { optional: true; self: true; }]>;
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DragRootDirective, "[tftDragRoot]", ["tftDragRoot"], {}, {}, never, never, false, never>;
|
|
15
|
+
}
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
/// <reference types="@interactjs/types" />
|
|
2
|
-
import { ElementRef, OnInit, OnDestroy, EventEmitter, Renderer2, SimpleChanges, OnChanges, ViewContainerRef, AfterViewInit } from '@angular/core';
|
|
3
|
-
import { InteractService } from '../services/interact.service';
|
|
4
|
-
import { DraggableOptions, Interactable } from '@interactjs/types/index';
|
|
5
|
-
import { Observable } from 'rxjs';
|
|
6
|
-
import { DropzoneDirective } from './dropzone.directive';
|
|
7
|
-
import { NgDragEvent, TftDragEvent, TftCoords, TftDragElement } from '../models';
|
|
8
|
-
import { DragPreviewDirective } from './drag-preview.directive';
|
|
9
|
-
import { DragRootDirective } from './drag-root.directive';
|
|
10
|
-
import { AccountForScaleDirective } from './account-for-scale.directive';
|
|
11
|
-
import { AutoScrollDirective } from './auto-scroll.directive';
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
/** @dynamic */
|
|
14
|
-
export declare class DraggableDirective<D = any> implements OnInit, OnChanges, OnDestroy, AfterViewInit {
|
|
15
|
-
el: ElementRef;
|
|
16
|
-
private interactService;
|
|
17
|
-
private renderer;
|
|
18
|
-
private _viewContainerRef;
|
|
19
|
-
private _document;
|
|
20
|
-
account_for_scale_dir?: AccountForScaleDirective;
|
|
21
|
-
dropzone_dir?: DropzoneDirective;
|
|
22
|
-
drag_root_dir?: DragRootDirective;
|
|
23
|
-
auto_scroll_dir?: AutoScrollDirective;
|
|
24
|
-
x: number;
|
|
25
|
-
y: number;
|
|
26
|
-
dragZIndex: number;
|
|
27
|
-
/** zIndex while at rest */
|
|
28
|
-
zIndex: number;
|
|
29
|
-
interactableId: string;
|
|
30
|
-
dragData: D;
|
|
31
|
-
enableDragDefault: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* @deprecated replaced by 'dragDisabled' property, please migrate before v13
|
|
34
|
-
*/
|
|
35
|
-
disabled: boolean;
|
|
36
|
-
dragDisabled: boolean;
|
|
37
|
-
dragConfig: Partial<Interact.OrBoolean<DraggableOptions>>;
|
|
38
|
-
showPlaceholder: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* The element we want to prepend the drag element to.
|
|
41
|
-
* Use `tftDragRoot` directive on a parent element to set custom root element
|
|
42
|
-
* @default document.body
|
|
43
|
-
*/
|
|
44
|
-
dragRoot: DragRootDirective;
|
|
45
|
-
private dragRootEl;
|
|
46
|
-
dragStart: EventEmitter<TftDragEvent>;
|
|
47
|
-
dragMove: EventEmitter<TftDragEvent>;
|
|
48
|
-
dragInertiaStart: EventEmitter<TftDragEvent>;
|
|
49
|
-
dragEnd: EventEmitter<TftDragEvent>;
|
|
50
|
-
_previewTemplate: DragPreviewDirective;
|
|
51
|
-
interactableState: Observable<TftCoords>;
|
|
52
|
-
interactable: Interactable;
|
|
53
|
-
private registryId;
|
|
54
|
-
private interactableSubscription;
|
|
55
|
-
private scrollEventsSubscription;
|
|
56
|
-
previewRef: TftDragElement;
|
|
57
|
-
get scale(): number;
|
|
58
|
-
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);
|
|
59
|
-
ngOnInit(): void;
|
|
60
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
61
|
-
setDragConfig(): void;
|
|
62
|
-
ngAfterViewInit(): void;
|
|
63
|
-
ngOnDestroy(): void;
|
|
64
|
-
dragMoveListener(event: NgDragEvent, element: Interact.Element): void;
|
|
65
|
-
setDragStyles(dragElement: HTMLElement): void;
|
|
66
|
-
addDragPropertiesToElement(nativeElement: TftDragElement): void;
|
|
67
|
-
mapDragEvent(event: NgDragEvent): TftDragEvent;
|
|
68
|
-
setPosition(x: number, y: number): void;
|
|
69
|
-
alignPositionWithInputs(x: number, y: number): void;
|
|
70
|
-
isValidPosition(x: number, y: number): boolean;
|
|
71
|
-
isNumeric(num: number): boolean;
|
|
72
|
-
initiateDragEvents(dragConfig: Partial<Interact.OrBoolean<DraggableOptions>>, nativeElement: HTMLElement): import("@interactjs/core/Interactable").Interactable;
|
|
73
|
-
subscribeToScrollEvents(): void;
|
|
74
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DraggableDirective<any>, [null, null, null, null, null, { optional: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }]>;
|
|
75
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DraggableDirective<any>, "[tftDraggable]", never, { "x": "x"; "y": "y"; "dragZIndex": "dragZIndex"; "zIndex": "zIndex"; "interactableId": "interactableId"; "dragData": "dragData"; "enableDragDefault": "enableDragDefault"; "disabled": "disabled"; "dragDisabled": "dragDisabled"; "dragConfig": "dragConfig"; "showPlaceholder": "showPlaceholder"; "dragRoot": "dragRoot"; }, { "dragStart": "dragStart"; "dragMove": "dragMove"; "dragInertiaStart": "dragInertiaStart"; "dragEnd": "dragEnd"; }, ["_previewTemplate"], never, false>;
|
|
76
|
-
}
|
|
1
|
+
/// <reference types="@interactjs/types" />
|
|
2
|
+
import { ElementRef, OnInit, OnDestroy, EventEmitter, Renderer2, SimpleChanges, OnChanges, ViewContainerRef, AfterViewInit } from '@angular/core';
|
|
3
|
+
import { InteractService } from '../services/interact.service';
|
|
4
|
+
import { DraggableOptions, Interactable } from '@interactjs/types/index';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
import { DropzoneDirective } from './dropzone.directive';
|
|
7
|
+
import { NgDragEvent, TftDragEvent, TftCoords, TftDragElement } from '../models';
|
|
8
|
+
import { DragPreviewDirective } from './drag-preview.directive';
|
|
9
|
+
import { DragRootDirective } from './drag-root.directive';
|
|
10
|
+
import { AccountForScaleDirective } from './account-for-scale.directive';
|
|
11
|
+
import { AutoScrollDirective } from './auto-scroll.directive';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
/** @dynamic */
|
|
14
|
+
export declare class DraggableDirective<D = any> implements OnInit, OnChanges, OnDestroy, AfterViewInit {
|
|
15
|
+
el: ElementRef;
|
|
16
|
+
private interactService;
|
|
17
|
+
private renderer;
|
|
18
|
+
private _viewContainerRef;
|
|
19
|
+
private _document;
|
|
20
|
+
account_for_scale_dir?: AccountForScaleDirective;
|
|
21
|
+
dropzone_dir?: DropzoneDirective;
|
|
22
|
+
drag_root_dir?: DragRootDirective;
|
|
23
|
+
auto_scroll_dir?: AutoScrollDirective;
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
dragZIndex: number;
|
|
27
|
+
/** zIndex while at rest */
|
|
28
|
+
zIndex: number;
|
|
29
|
+
interactableId: string;
|
|
30
|
+
dragData: D;
|
|
31
|
+
enableDragDefault: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated replaced by 'dragDisabled' property, please migrate before v13
|
|
34
|
+
*/
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
dragDisabled: boolean;
|
|
37
|
+
dragConfig: Partial<Interact.OrBoolean<DraggableOptions>>;
|
|
38
|
+
showPlaceholder: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The element we want to prepend the drag element to.
|
|
41
|
+
* Use `tftDragRoot` directive on a parent element to set custom root element
|
|
42
|
+
* @default document.body
|
|
43
|
+
*/
|
|
44
|
+
dragRoot: DragRootDirective;
|
|
45
|
+
private dragRootEl;
|
|
46
|
+
dragStart: EventEmitter<TftDragEvent>;
|
|
47
|
+
dragMove: EventEmitter<TftDragEvent>;
|
|
48
|
+
dragInertiaStart: EventEmitter<TftDragEvent>;
|
|
49
|
+
dragEnd: EventEmitter<TftDragEvent>;
|
|
50
|
+
_previewTemplate: DragPreviewDirective;
|
|
51
|
+
interactableState: Observable<TftCoords>;
|
|
52
|
+
interactable: Interactable;
|
|
53
|
+
private registryId;
|
|
54
|
+
private interactableSubscription;
|
|
55
|
+
private scrollEventsSubscription;
|
|
56
|
+
previewRef: TftDragElement;
|
|
57
|
+
get scale(): number;
|
|
58
|
+
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);
|
|
59
|
+
ngOnInit(): void;
|
|
60
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
61
|
+
setDragConfig(): void;
|
|
62
|
+
ngAfterViewInit(): void;
|
|
63
|
+
ngOnDestroy(): void;
|
|
64
|
+
dragMoveListener(event: NgDragEvent, element: Interact.Element): void;
|
|
65
|
+
setDragStyles(dragElement: HTMLElement): void;
|
|
66
|
+
addDragPropertiesToElement(nativeElement: TftDragElement): void;
|
|
67
|
+
mapDragEvent(event: NgDragEvent): TftDragEvent;
|
|
68
|
+
setPosition(x: number, y: number): void;
|
|
69
|
+
alignPositionWithInputs(x: number, y: number): void;
|
|
70
|
+
isValidPosition(x: number, y: number): boolean;
|
|
71
|
+
isNumeric(num: number): boolean;
|
|
72
|
+
initiateDragEvents(dragConfig: Partial<Interact.OrBoolean<DraggableOptions>>, nativeElement: HTMLElement): import("@interactjs/core/Interactable").Interactable;
|
|
73
|
+
subscribeToScrollEvents(): void;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DraggableDirective<any>, [null, null, null, null, null, { optional: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }]>;
|
|
75
|
+
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>;
|
|
76
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
/// <reference types="@interactjs/types" />
|
|
2
|
-
import { ElementRef, OnInit, EventEmitter, SimpleChanges, OnChanges, Renderer2 } from '@angular/core';
|
|
3
|
-
import { DropzoneOptions, Interactable } from '@interactjs/types/index';
|
|
4
|
-
import { InteractService } from '../services/interact.service';
|
|
5
|
-
import { NgDropEvent, TftDropEvent } from '../models';
|
|
6
|
-
import { AccountForScaleDirective } from './account-for-scale.directive';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export
|
|
9
|
-
export declare class DropzoneDirective implements OnInit, OnChanges {
|
|
10
|
-
el: ElementRef;
|
|
11
|
-
private renderer;
|
|
12
|
-
private interactService;
|
|
13
|
-
private account_for_scale_dir?;
|
|
14
|
-
dropzoneId: string;
|
|
15
|
-
dropzoneConfig: DropzoneOptions;
|
|
16
|
-
dropzoneData: any;
|
|
17
|
-
position: PositionOption;
|
|
18
|
-
dropActivate: EventEmitter<TftDropEvent>;
|
|
19
|
-
dragEnter: EventEmitter<TftDropEvent>;
|
|
20
|
-
dragLeave: EventEmitter<TftDropEvent>;
|
|
21
|
-
dragDrop: EventEmitter<TftDropEvent>;
|
|
22
|
-
dropzone: Interactable;
|
|
23
|
-
get scale(): number;
|
|
24
|
-
constructor(el: ElementRef, renderer: Renderer2, interactService: InteractService, account_for_scale_dir?: AccountForScaleDirective);
|
|
25
|
-
ngOnInit(): void;
|
|
26
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
27
|
-
/**
|
|
28
|
-
* Connects element to interacts dropzone events and returns a reference to the interactable
|
|
29
|
-
* @param nativeElement the element to tie drop events to
|
|
30
|
-
* @param dropzoneConfig the interact configuration to use when connecting
|
|
31
|
-
*/
|
|
32
|
-
connectDropzoneEvents(nativeElement: any, dropzoneConfig: DropzoneOptions): import("@interactjs/core/Interactable").Interactable;
|
|
33
|
-
/**
|
|
34
|
-
* Maps the drop event emitted by interact to something a little easier to use
|
|
35
|
-
* @param event the drop event emitted by interact, extended with extra fields we added to
|
|
36
|
-
*/
|
|
37
|
-
mapDropzoneEvent(event: NgDropEvent): TftDropEvent;
|
|
38
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DropzoneDirective, [null, null, null, { optional: true; }]>;
|
|
39
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DropzoneDirective, "[tftDropzone]", never, { "dropzoneId": "dropzoneId"; "dropzoneConfig": "dropzoneConfig"; "dropzoneData": "dropzoneData"; "position": "position"; }, { "dropActivate": "dropActivate"; "dragEnter": "dragEnter"; "dragLeave": "dragLeave"; "dragDrop": "dragDrop"; }, never, never, false>;
|
|
40
|
-
}
|
|
1
|
+
/// <reference types="@interactjs/types" />
|
|
2
|
+
import { ElementRef, OnInit, EventEmitter, SimpleChanges, OnChanges, Renderer2 } from '@angular/core';
|
|
3
|
+
import { DropzoneOptions, Interactable } from '@interactjs/types/index';
|
|
4
|
+
import { InteractService } from '../services/interact.service';
|
|
5
|
+
import { NgDropEvent, TftDropEvent } from '../models';
|
|
6
|
+
import { AccountForScaleDirective } from './account-for-scale.directive';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export type PositionOption = 'relative' | 'absolute' | 'fixed' | 'static' | 'sticky' | 'unset' | 'inherit' | 'initial' | 'revert';
|
|
9
|
+
export declare class DropzoneDirective implements OnInit, OnChanges {
|
|
10
|
+
el: ElementRef;
|
|
11
|
+
private renderer;
|
|
12
|
+
private interactService;
|
|
13
|
+
private account_for_scale_dir?;
|
|
14
|
+
dropzoneId: string;
|
|
15
|
+
dropzoneConfig: DropzoneOptions;
|
|
16
|
+
dropzoneData: any;
|
|
17
|
+
position: PositionOption;
|
|
18
|
+
dropActivate: EventEmitter<TftDropEvent>;
|
|
19
|
+
dragEnter: EventEmitter<TftDropEvent>;
|
|
20
|
+
dragLeave: EventEmitter<TftDropEvent>;
|
|
21
|
+
dragDrop: EventEmitter<TftDropEvent>;
|
|
22
|
+
dropzone: Interactable;
|
|
23
|
+
get scale(): number;
|
|
24
|
+
constructor(el: ElementRef, renderer: Renderer2, interactService: InteractService, account_for_scale_dir?: AccountForScaleDirective);
|
|
25
|
+
ngOnInit(): void;
|
|
26
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
27
|
+
/**
|
|
28
|
+
* Connects element to interacts dropzone events and returns a reference to the interactable
|
|
29
|
+
* @param nativeElement the element to tie drop events to
|
|
30
|
+
* @param dropzoneConfig the interact configuration to use when connecting
|
|
31
|
+
*/
|
|
32
|
+
connectDropzoneEvents(nativeElement: any, dropzoneConfig: DropzoneOptions): import("@interactjs/core/Interactable").Interactable;
|
|
33
|
+
/**
|
|
34
|
+
* Maps the drop event emitted by interact to something a little easier to use
|
|
35
|
+
* @param event the drop event emitted by interact, extended with extra fields we added to
|
|
36
|
+
*/
|
|
37
|
+
mapDropzoneEvent(event: NgDropEvent): TftDropEvent;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropzoneDirective, [null, null, null, { optional: true; }]>;
|
|
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>;
|
|
40
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
/// <reference types="@interactjs/types" />
|
|
2
|
-
import { ElementRef, OnInit, EventEmitter, SimpleChanges, OnChanges } from '@angular/core';
|
|
3
|
-
import { DraggableOptions, GesturableOptions, Interactable } from '@interactjs/types/index';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { TftCoords, TftGestureEvent } from '../models';
|
|
6
|
-
import { DraggableDirective } from '../directives';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/** @dynamic */
|
|
9
|
-
export declare class GesturableDirective<D = any> implements OnInit, OnChanges {
|
|
10
|
-
el: ElementRef;
|
|
11
|
-
private draggable_dir?;
|
|
12
|
-
gesturableId: string;
|
|
13
|
-
gestureDisabled: boolean;
|
|
14
|
-
gestureConfig: Partial<Interact.OrBoolean<DraggableOptions>>;
|
|
15
|
-
gestureStart: EventEmitter<TftGestureEvent>;
|
|
16
|
-
gestureMove: EventEmitter<TftGestureEvent>;
|
|
17
|
-
gestureEnd: EventEmitter<TftGestureEvent>;
|
|
18
|
-
interactableState: Observable<TftCoords>;
|
|
19
|
-
interactable: Interactable;
|
|
20
|
-
constructor(el: ElementRef, draggable_dir?: DraggableDirective);
|
|
21
|
-
ngOnInit(): void;
|
|
22
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
23
|
-
setGestureConfig(): void;
|
|
24
|
-
initiateGestureEvents(gestureConfig: Partial<Interact.OrBoolean<GesturableOptions>>, nativeElement: HTMLElement): import("@interactjs/core/Interactable").Interactable;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GesturableDirective<any>, [null, { optional: true; }]>;
|
|
26
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<GesturableDirective<any>, "[tftGesturable]", never, { "gesturableId": "gesturableId"; "gestureDisabled": "gestureDisabled"; "gestureConfig": "gestureConfig"; }, { "gestureStart": "gestureStart"; "gestureMove": "gestureMove"; "gestureEnd": "gestureEnd"; }, never, never, false>;
|
|
27
|
-
}
|
|
1
|
+
/// <reference types="@interactjs/types" />
|
|
2
|
+
import { ElementRef, OnInit, EventEmitter, SimpleChanges, OnChanges } from '@angular/core';
|
|
3
|
+
import { DraggableOptions, GesturableOptions, Interactable } from '@interactjs/types/index';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { TftCoords, TftGestureEvent } from '../models';
|
|
6
|
+
import { DraggableDirective } from '../directives';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/** @dynamic */
|
|
9
|
+
export declare class GesturableDirective<D = any> implements OnInit, OnChanges {
|
|
10
|
+
el: ElementRef;
|
|
11
|
+
private draggable_dir?;
|
|
12
|
+
gesturableId: string;
|
|
13
|
+
gestureDisabled: boolean;
|
|
14
|
+
gestureConfig: Partial<Interact.OrBoolean<DraggableOptions>>;
|
|
15
|
+
gestureStart: EventEmitter<TftGestureEvent>;
|
|
16
|
+
gestureMove: EventEmitter<TftGestureEvent>;
|
|
17
|
+
gestureEnd: EventEmitter<TftGestureEvent>;
|
|
18
|
+
interactableState: Observable<TftCoords>;
|
|
19
|
+
interactable: Interactable;
|
|
20
|
+
constructor(el: ElementRef, draggable_dir?: DraggableDirective);
|
|
21
|
+
ngOnInit(): void;
|
|
22
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
23
|
+
setGestureConfig(): void;
|
|
24
|
+
initiateGestureEvents(gestureConfig: Partial<Interact.OrBoolean<GesturableOptions>>, nativeElement: HTMLElement): import("@interactjs/core/Interactable").Interactable;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GesturableDirective<any>, [null, { optional: true; }]>;
|
|
26
|
+
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>;
|
|
27
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './draggable.directive';
|
|
2
|
-
export * from './dropzone.directive';
|
|
3
|
-
export * from './resizable.directive';
|
|
4
|
-
export * from './drag-preview.directive';
|
|
5
|
-
export * from './gesturable.directive';
|
|
6
|
-
export * from './drag-root.directive';
|
|
7
|
-
export * from './account-for-scale.directive';
|
|
8
|
-
export * from './apply-scale.directive';
|
|
9
|
-
export * from './auto-scroll.directive';
|
|
1
|
+
export * from './draggable.directive';
|
|
2
|
+
export * from './dropzone.directive';
|
|
3
|
+
export * from './resizable.directive';
|
|
4
|
+
export * from './drag-preview.directive';
|
|
5
|
+
export * from './gesturable.directive';
|
|
6
|
+
export * from './drag-root.directive';
|
|
7
|
+
export * from './account-for-scale.directive';
|
|
8
|
+
export * from './apply-scale.directive';
|
|
9
|
+
export * from './auto-scroll.directive';
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
/// <reference types="@interactjs/types" />
|
|
2
|
-
import { OnInit, OnDestroy, ElementRef, EventEmitter, OnChanges, SimpleChanges, Renderer2 } from '@angular/core';
|
|
3
|
-
import { InteractService } from '../services/interact.service';
|
|
4
|
-
import { ResizableOptions, ResizeEvent, Interactable } from '@interactjs/types/index';
|
|
5
|
-
import { DraggableDirective } from './draggable.directive';
|
|
6
|
-
import { DropzoneDirective } from './dropzone.directive';
|
|
7
|
-
import { DragRootDirective } from './drag-root.directive';
|
|
8
|
-
import { AccountForScaleDirective } from './account-for-scale.directive';
|
|
9
|
-
import { NgResizeEvent, TftResizeEvent, TftDragElement } from '../models';
|
|
10
|
-
import { AutoScrollDirective } from './auto-scroll.directive';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
/** @dynamic */
|
|
13
|
-
export declare class ResizableDirective implements OnInit, OnDestroy, OnChanges {
|
|
14
|
-
el: ElementRef;
|
|
15
|
-
private _document;
|
|
16
|
-
private interactService;
|
|
17
|
-
private renderer;
|
|
18
|
-
private drag_root_dir?;
|
|
19
|
-
account_for_scale_dir?: AccountForScaleDirective;
|
|
20
|
-
private draggable_dir?;
|
|
21
|
-
private dropzone_dir?;
|
|
22
|
-
auto_scroll_dir?: AutoScrollDirective;
|
|
23
|
-
enableResizeDefault: boolean;
|
|
24
|
-
position: string;
|
|
25
|
-
resizeConfig: Partial<Interact.OrBoolean<ResizableOptions>>;
|
|
26
|
-
interactableId: string;
|
|
27
|
-
width: number;
|
|
28
|
-
height: number;
|
|
29
|
-
resizeDisabled: boolean;
|
|
30
|
-
resizeStart: EventEmitter<TftResizeEvent>;
|
|
31
|
-
resizeMove: EventEmitter<TftResizeEvent>;
|
|
32
|
-
resizeInertiaStart: EventEmitter<TftResizeEvent>;
|
|
33
|
-
resizeEnd: EventEmitter<TftResizeEvent>;
|
|
34
|
-
defaultConfig: Partial<Interact.OrBoolean<ResizableOptions>>;
|
|
35
|
-
registryId: string;
|
|
36
|
-
interactable: Interactable;
|
|
37
|
-
dragRootEl: HTMLElement;
|
|
38
|
-
private activeEdges;
|
|
39
|
-
private interactableSubscription;
|
|
40
|
-
private scrollEventsSubscription;
|
|
41
|
-
get scale(): number;
|
|
42
|
-
constructor(el: ElementRef, _document: Document, interactService: InteractService, renderer: Renderer2, drag_root_dir?: DragRootDirective, account_for_scale_dir?: AccountForScaleDirective, draggable_dir?: DraggableDirective, dropzone_dir?: DropzoneDirective, auto_scroll_dir?: AutoScrollDirective);
|
|
43
|
-
ngOnInit(): void;
|
|
44
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
45
|
-
ngOnDestroy(): void;
|
|
46
|
-
resizeListener(event: ResizeEvent): void;
|
|
47
|
-
/**
|
|
48
|
-
* hook elements into interacts resize event listeners
|
|
49
|
-
* we spread the configs so that the consuming component only overwrites the
|
|
50
|
-
* pieces that it explicitly indicates
|
|
51
|
-
* @param resizeConfig
|
|
52
|
-
* @param nativeElement
|
|
53
|
-
*/
|
|
54
|
-
initiateResizeEvents(resizeConfig: Partial<Interact.OrBoolean<ResizableOptions>>, nativeElement: TftDragElement): import("@interactjs/core/Interactable").Interactable;
|
|
55
|
-
mapResizeEvent(event: NgResizeEvent): TftResizeEvent;
|
|
56
|
-
alignDimensionsWithInputs(width: number, height: number): void;
|
|
57
|
-
addResizePropertiesToElement(nativeElement: TftDragElement): void;
|
|
58
|
-
subscribeToScrollEvents(): void;
|
|
59
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ResizableDirective, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }]>;
|
|
60
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ResizableDirective, "[tftResizable]", never, { "enableResizeDefault": "enableResizeDefault"; "position": "position"; "resizeConfig": "resizeConfig"; "interactableId": "interactableId"; "width": "width"; "height": "height"; "resizeDisabled": "resizeDisabled"; }, { "resizeStart": "resizeStart"; "resizeMove": "resizeMove"; "resizeInertiaStart": "resizeInertiaStart"; "resizeEnd": "resizeEnd"; }, never, never, false>;
|
|
61
|
-
}
|
|
1
|
+
/// <reference types="@interactjs/types" />
|
|
2
|
+
import { OnInit, OnDestroy, ElementRef, EventEmitter, OnChanges, SimpleChanges, Renderer2 } from '@angular/core';
|
|
3
|
+
import { InteractService } from '../services/interact.service';
|
|
4
|
+
import { ResizableOptions, ResizeEvent, Interactable } from '@interactjs/types/index';
|
|
5
|
+
import { DraggableDirective } from './draggable.directive';
|
|
6
|
+
import { DropzoneDirective } from './dropzone.directive';
|
|
7
|
+
import { DragRootDirective } from './drag-root.directive';
|
|
8
|
+
import { AccountForScaleDirective } from './account-for-scale.directive';
|
|
9
|
+
import { NgResizeEvent, TftResizeEvent, TftDragElement } from '../models';
|
|
10
|
+
import { AutoScrollDirective } from './auto-scroll.directive';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
/** @dynamic */
|
|
13
|
+
export declare class ResizableDirective implements OnInit, OnDestroy, OnChanges {
|
|
14
|
+
el: ElementRef;
|
|
15
|
+
private _document;
|
|
16
|
+
private interactService;
|
|
17
|
+
private renderer;
|
|
18
|
+
private drag_root_dir?;
|
|
19
|
+
account_for_scale_dir?: AccountForScaleDirective;
|
|
20
|
+
private draggable_dir?;
|
|
21
|
+
private dropzone_dir?;
|
|
22
|
+
auto_scroll_dir?: AutoScrollDirective;
|
|
23
|
+
enableResizeDefault: boolean;
|
|
24
|
+
position: string;
|
|
25
|
+
resizeConfig: Partial<Interact.OrBoolean<ResizableOptions>>;
|
|
26
|
+
interactableId: string;
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
resizeDisabled: boolean;
|
|
30
|
+
resizeStart: EventEmitter<TftResizeEvent>;
|
|
31
|
+
resizeMove: EventEmitter<TftResizeEvent>;
|
|
32
|
+
resizeInertiaStart: EventEmitter<TftResizeEvent>;
|
|
33
|
+
resizeEnd: EventEmitter<TftResizeEvent>;
|
|
34
|
+
defaultConfig: Partial<Interact.OrBoolean<ResizableOptions>>;
|
|
35
|
+
registryId: string;
|
|
36
|
+
interactable: Interactable;
|
|
37
|
+
dragRootEl: HTMLElement;
|
|
38
|
+
private activeEdges;
|
|
39
|
+
private interactableSubscription;
|
|
40
|
+
private scrollEventsSubscription;
|
|
41
|
+
get scale(): number;
|
|
42
|
+
constructor(el: ElementRef, _document: Document, interactService: InteractService, renderer: Renderer2, drag_root_dir?: DragRootDirective, account_for_scale_dir?: AccountForScaleDirective, draggable_dir?: DraggableDirective, dropzone_dir?: DropzoneDirective, auto_scroll_dir?: AutoScrollDirective);
|
|
43
|
+
ngOnInit(): void;
|
|
44
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
45
|
+
ngOnDestroy(): void;
|
|
46
|
+
resizeListener(event: ResizeEvent): void;
|
|
47
|
+
/**
|
|
48
|
+
* hook elements into interacts resize event listeners
|
|
49
|
+
* we spread the configs so that the consuming component only overwrites the
|
|
50
|
+
* pieces that it explicitly indicates
|
|
51
|
+
* @param resizeConfig
|
|
52
|
+
* @param nativeElement
|
|
53
|
+
*/
|
|
54
|
+
initiateResizeEvents(resizeConfig: Partial<Interact.OrBoolean<ResizableOptions>>, nativeElement: TftDragElement): import("@interactjs/core/Interactable").Interactable;
|
|
55
|
+
mapResizeEvent(event: NgResizeEvent): TftResizeEvent;
|
|
56
|
+
alignDimensionsWithInputs(width: number, height: number): void;
|
|
57
|
+
addResizePropertiesToElement(nativeElement: TftDragElement): void;
|
|
58
|
+
subscribeToScrollEvents(): void;
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResizableDirective, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; skipSelf: true; }, { optional: true; skipSelf: true; }]>;
|
|
60
|
+
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>;
|
|
61
|
+
}
|
package/lib/interact.module.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import { InteractRootConfig } from './models';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "./directives/draggable.directive";
|
|
5
|
-
import * as i2 from "./directives/resizable.directive";
|
|
6
|
-
import * as i3 from "./directives/dropzone.directive";
|
|
7
|
-
import * as i4 from "./directives/gesturable.directive";
|
|
8
|
-
import * as i5 from "./directives/drag-root.directive";
|
|
9
|
-
import * as i6 from "./directives/auto-scroll.directive";
|
|
10
|
-
import * as i7 from "./directives/account-for-scale.directive";
|
|
11
|
-
import * as i8 from "./directives/apply-scale.directive";
|
|
12
|
-
import * as i9 from "./directives/drag-preview.directive";
|
|
13
|
-
import * as i10 from "./pipes/array-of-n.pipe";
|
|
14
|
-
import * as i11 from "@angular/common";
|
|
15
|
-
export declare class InteractModule {
|
|
16
|
-
static forRoot(config: InteractRootConfig): ModuleWithProviders<InteractModule>;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<InteractModule, never>;
|
|
18
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<InteractModule, [typeof i1.DraggableDirective, typeof i2.ResizableDirective, typeof i3.DropzoneDirective, typeof i4.GesturableDirective, typeof i5.DragRootDirective, typeof i6.AutoScrollDirective, typeof i7.AccountForScaleDirective, typeof i8.ApplyScaleDirective, typeof i9.DragPreviewDirective, typeof i10.ArrayOfNPipe], [typeof i11.CommonModule], [typeof i1.DraggableDirective, typeof i2.ResizableDirective, typeof i3.DropzoneDirective, typeof i4.GesturableDirective, typeof i5.DragRootDirective, typeof i6.AutoScrollDirective, typeof i7.AccountForScaleDirective, typeof i8.ApplyScaleDirective, typeof i9.DragPreviewDirective, typeof i10.ArrayOfNPipe]>;
|
|
19
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<InteractModule>;
|
|
20
|
-
}
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { InteractRootConfig } from './models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./directives/draggable.directive";
|
|
5
|
+
import * as i2 from "./directives/resizable.directive";
|
|
6
|
+
import * as i3 from "./directives/dropzone.directive";
|
|
7
|
+
import * as i4 from "./directives/gesturable.directive";
|
|
8
|
+
import * as i5 from "./directives/drag-root.directive";
|
|
9
|
+
import * as i6 from "./directives/auto-scroll.directive";
|
|
10
|
+
import * as i7 from "./directives/account-for-scale.directive";
|
|
11
|
+
import * as i8 from "./directives/apply-scale.directive";
|
|
12
|
+
import * as i9 from "./directives/drag-preview.directive";
|
|
13
|
+
import * as i10 from "./pipes/array-of-n.pipe";
|
|
14
|
+
import * as i11 from "@angular/common";
|
|
15
|
+
export declare class InteractModule {
|
|
16
|
+
static forRoot(config: InteractRootConfig): ModuleWithProviders<InteractModule>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InteractModule, never>;
|
|
18
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<InteractModule, [typeof i1.DraggableDirective, typeof i2.ResizableDirective, typeof i3.DropzoneDirective, typeof i4.GesturableDirective, typeof i5.DragRootDirective, typeof i6.AutoScrollDirective, typeof i7.AccountForScaleDirective, typeof i8.ApplyScaleDirective, typeof i9.DragPreviewDirective, typeof i10.ArrayOfNPipe], [typeof i11.CommonModule], [typeof i1.DraggableDirective, typeof i2.ResizableDirective, typeof i3.DropzoneDirective, typeof i4.GesturableDirective, typeof i5.DragRootDirective, typeof i6.AutoScrollDirective, typeof i7.AccountForScaleDirective, typeof i8.ApplyScaleDirective, typeof i9.DragPreviewDirective, typeof i10.ArrayOfNPipe]>;
|
|
19
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<InteractModule>;
|
|
20
|
+
}
|
package/lib/models/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './interact';
|
|
1
|
+
export * from './interact';
|