@tft/interact 12.5.3 → 13.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.
Files changed (116) hide show
  1. package/esm2020/index.mjs +6 -0
  2. package/esm2020/lib/directives/account-for-scale.directive.mjs +26 -0
  3. package/esm2020/lib/directives/apply-scale.directive.mjs +28 -0
  4. package/esm2020/lib/directives/auto-scroll.directive.mjs +56 -0
  5. package/esm2020/lib/directives/drag-preview.directive.mjs +20 -0
  6. package/esm2020/lib/directives/drag-root.directive.mjs +32 -0
  7. package/esm2020/lib/directives/draggable.directive.mjs +320 -0
  8. package/esm2020/lib/directives/dropzone.directive.mjs +114 -0
  9. package/esm2020/lib/directives/gesturable.directive.mjs +82 -0
  10. package/esm2020/lib/directives/index.mjs +10 -0
  11. package/esm2020/lib/directives/resizable.directive.mjs +228 -0
  12. package/esm2020/lib/interact.module.mjs +66 -0
  13. package/esm2020/lib/models/index.mjs +2 -0
  14. package/esm2020/lib/models/interact.mjs +28 -0
  15. package/esm2020/lib/pipes/array-of-n.pipe.mjs +22 -0
  16. package/esm2020/lib/pipes/index.mjs +2 -0
  17. package/esm2020/lib/services/interact.service.mjs +197 -0
  18. package/esm2020/lib/utils/helpers.mjs +35 -0
  19. package/esm2020/lib/utils/index.mjs +2 -0
  20. package/esm2020/tft-interact.mjs +5 -0
  21. package/fesm2015/{tft-interact.js → tft-interact.mjs} +355 -257
  22. package/fesm2015/tft-interact.mjs.map +1 -0
  23. package/fesm2020/tft-interact.mjs +1192 -0
  24. package/fesm2020/tft-interact.mjs.map +1 -0
  25. package/lib/directives/account-for-scale.directive.d.ts +3 -0
  26. package/lib/directives/apply-scale.directive.d.ts +3 -0
  27. package/lib/directives/auto-scroll.directive.d.ts +3 -0
  28. package/lib/directives/drag-preview.directive.d.ts +3 -0
  29. package/lib/directives/drag-root.directive.d.ts +3 -0
  30. package/lib/directives/draggable.directive.d.ts +3 -0
  31. package/lib/directives/dropzone.directive.d.ts +3 -0
  32. package/lib/directives/gesturable.directive.d.ts +3 -0
  33. package/lib/directives/resizable.directive.d.ts +3 -0
  34. package/lib/interact.module.d.ts +15 -0
  35. package/lib/pipes/array-of-n.pipe.d.ts +3 -0
  36. package/lib/services/interact.service.d.ts +3 -0
  37. package/package.json +23 -10
  38. package/tft-interact-13.0.0.tgz +0 -0
  39. package/tft-interact.d.ts +1 -2
  40. package/bundles/tft-interact.umd.js +0 -1526
  41. package/bundles/tft-interact.umd.js.map +0 -1
  42. package/esm2015/index.js +0 -6
  43. package/esm2015/index.js.map +0 -1
  44. package/esm2015/index.metadata.json +0 -1
  45. package/esm2015/lib/directives/account-for-scale.directive.js +0 -26
  46. package/esm2015/lib/directives/account-for-scale.directive.js.map +0 -1
  47. package/esm2015/lib/directives/account-for-scale.directive.metadata.json +0 -1
  48. package/esm2015/lib/directives/account-for-scale.directive.ngfactory.js.map +0 -1
  49. package/esm2015/lib/directives/apply-scale.directive.js +0 -26
  50. package/esm2015/lib/directives/apply-scale.directive.js.map +0 -1
  51. package/esm2015/lib/directives/apply-scale.directive.metadata.json +0 -1
  52. package/esm2015/lib/directives/apply-scale.directive.ngfactory.js.map +0 -1
  53. package/esm2015/lib/directives/auto-scroll.directive.js +0 -54
  54. package/esm2015/lib/directives/auto-scroll.directive.js.map +0 -1
  55. package/esm2015/lib/directives/auto-scroll.directive.metadata.json +0 -1
  56. package/esm2015/lib/directives/auto-scroll.directive.ngfactory.js.map +0 -1
  57. package/esm2015/lib/directives/drag-preview.directive.js +0 -20
  58. package/esm2015/lib/directives/drag-preview.directive.js.map +0 -1
  59. package/esm2015/lib/directives/drag-preview.directive.metadata.json +0 -1
  60. package/esm2015/lib/directives/drag-preview.directive.ngfactory.js.map +0 -1
  61. package/esm2015/lib/directives/drag-root.directive.js +0 -27
  62. package/esm2015/lib/directives/drag-root.directive.js.map +0 -1
  63. package/esm2015/lib/directives/drag-root.directive.metadata.json +0 -1
  64. package/esm2015/lib/directives/drag-root.directive.ngfactory.js.map +0 -1
  65. package/esm2015/lib/directives/draggable.directive.js +0 -286
  66. package/esm2015/lib/directives/draggable.directive.js.map +0 -1
  67. package/esm2015/lib/directives/draggable.directive.metadata.json +0 -1
  68. package/esm2015/lib/directives/draggable.directive.ngfactory.js.map +0 -1
  69. package/esm2015/lib/directives/dropzone.directive.js +0 -105
  70. package/esm2015/lib/directives/dropzone.directive.js.map +0 -1
  71. package/esm2015/lib/directives/dropzone.directive.metadata.json +0 -1
  72. package/esm2015/lib/directives/dropzone.directive.ngfactory.js.map +0 -1
  73. package/esm2015/lib/directives/gesturable.directive.js +0 -77
  74. package/esm2015/lib/directives/gesturable.directive.js.map +0 -1
  75. package/esm2015/lib/directives/gesturable.directive.metadata.json +0 -1
  76. package/esm2015/lib/directives/gesturable.directive.ngfactory.js.map +0 -1
  77. package/esm2015/lib/directives/index.js +0 -10
  78. package/esm2015/lib/directives/index.js.map +0 -1
  79. package/esm2015/lib/directives/index.metadata.json +0 -1
  80. package/esm2015/lib/directives/resizable.directive.js +0 -201
  81. package/esm2015/lib/directives/resizable.directive.js.map +0 -1
  82. package/esm2015/lib/directives/resizable.directive.metadata.json +0 -1
  83. package/esm2015/lib/directives/resizable.directive.ngfactory.js.map +0 -1
  84. package/esm2015/lib/interact.module.js +0 -43
  85. package/esm2015/lib/interact.module.js.map +0 -1
  86. package/esm2015/lib/interact.module.metadata.json +0 -1
  87. package/esm2015/lib/interact.module.ngfactory.js.map +0 -1
  88. package/esm2015/lib/models/index.js +0 -2
  89. package/esm2015/lib/models/index.js.map +0 -1
  90. package/esm2015/lib/models/index.metadata.json +0 -1
  91. package/esm2015/lib/models/interact.js +0 -28
  92. package/esm2015/lib/models/interact.js.map +0 -1
  93. package/esm2015/lib/models/interact.metadata.json +0 -1
  94. package/esm2015/lib/pipes/array-of-n.pipe.js +0 -18
  95. package/esm2015/lib/pipes/array-of-n.pipe.js.map +0 -1
  96. package/esm2015/lib/pipes/array-of-n.pipe.metadata.json +0 -1
  97. package/esm2015/lib/pipes/array-of-n.pipe.ngfactory.js.map +0 -1
  98. package/esm2015/lib/pipes/index.js +0 -2
  99. package/esm2015/lib/pipes/index.js.map +0 -1
  100. package/esm2015/lib/pipes/index.metadata.json +0 -1
  101. package/esm2015/lib/services/interact.service.js +0 -196
  102. package/esm2015/lib/services/interact.service.js.map +0 -1
  103. package/esm2015/lib/services/interact.service.metadata.json +0 -1
  104. package/esm2015/lib/services/interact.service.ngfactory.js.map +0 -1
  105. package/esm2015/lib/utils/helpers.js +0 -35
  106. package/esm2015/lib/utils/helpers.js.map +0 -1
  107. package/esm2015/lib/utils/helpers.metadata.json +0 -1
  108. package/esm2015/lib/utils/index.js +0 -2
  109. package/esm2015/lib/utils/index.js.map +0 -1
  110. package/esm2015/lib/utils/index.metadata.json +0 -1
  111. package/esm2015/tft-interact.js +0 -7
  112. package/esm2015/tft-interact.js.map +0 -1
  113. package/esm2015/tft-interact.metadata.json +0 -1
  114. package/fesm2015/tft-interact.js.map +0 -1
  115. package/tft-interact-12.5.3.tgz +0 -0
  116. package/tft-interact.metadata.json +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Pipe, InjectionToken, Injectable, RendererFactory2, NgZone, Optional, Inject, Directive, ElementRef, Input, EventEmitter, Renderer2, HostBinding, Output, TemplateRef, Self, HostListener, ViewContainerRef, SkipSelf, ContentChild, NgModule } from '@angular/core';
2
+ import { Pipe, InjectionToken, Directive, Input, Injectable, Optional, Inject, EventEmitter, HostBinding, Output, Self, HostListener, SkipSelf, ContentChild, NgModule } from '@angular/core';
3
3
  import { DOCUMENT, CommonModule } from '@angular/common';
4
4
  import interact from 'interactjs';
5
5
  import { BehaviorSubject, combineLatest, Subject } from 'rxjs';
@@ -16,11 +16,14 @@ class ArrayOfNPipe {
16
16
  return new Array(length).fill(length).map((x, i) => i);
17
17
  }
18
18
  }
19
- ArrayOfNPipe.decorators = [
20
- { type: Pipe, args: [{
21
- name: 'arrayOfN'
22
- },] }
23
- ];
19
+ ArrayOfNPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ArrayOfNPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
20
+ ArrayOfNPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ArrayOfNPipe, name: "arrayOfN" });
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ArrayOfNPipe, decorators: [{
22
+ type: Pipe,
23
+ args: [{
24
+ name: 'arrayOfN'
25
+ }]
26
+ }] });
24
27
 
25
28
  const INTERACT_ROOT_CONFIG = new InjectionToken('INTERACT_ROOT_CONFIG_PARAMS');
26
29
  const DEFAULT_REGISTRY_ID = 'DEFAULT';
@@ -49,6 +52,59 @@ const defaultPosition = {
49
52
  targetElement: null
50
53
  };
51
54
 
55
+ const TFT_DRAG_PREVIEW = new InjectionToken('DragPreviewDirective');
56
+ class DragPreviewDirective {
57
+ constructor(templateRef) {
58
+ this.templateRef = templateRef;
59
+ }
60
+ }
61
+ DragPreviewDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: DragPreviewDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
62
+ DragPreviewDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.1", type: DragPreviewDirective, selector: "ng-template[tftDragPreview]", inputs: { dragData: "dragData" }, ngImport: i0 });
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: DragPreviewDirective, decorators: [{
64
+ type: Directive,
65
+ args: [{
66
+ // eslint-disable-next-line @angular-eslint/directive-selector
67
+ selector: 'ng-template[tftDragPreview]',
68
+ }]
69
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { dragData: [{
70
+ type: Input
71
+ }] } });
72
+
73
+ /** Gets the closest ancestor of an element that matches a selector. */
74
+ function getClosestMatchingAncestor(element, selector) {
75
+ let currentElement = element.parentElement;
76
+ while (currentElement) {
77
+ // IE doesn't support `matches` so we have to fall back to `msMatchesSelector`.
78
+ if (currentElement.matches ? currentElement.matches(selector) :
79
+ currentElement.msMatchesSelector(selector)) {
80
+ return currentElement;
81
+ }
82
+ currentElement = currentElement.parentElement;
83
+ }
84
+ return null;
85
+ }
86
+ /**
87
+ * Create a copy of the HTML Element
88
+ */
89
+ function cloneElement$1(element) {
90
+ const clone = element.cloneNode(true);
91
+ clone.removeAttribute('id');
92
+ return clone;
93
+ }
94
+ /**
95
+ * Gets the root HTML element of an embedded view.
96
+ * If the root is not an HTML element it gets wrapped in one.
97
+ */
98
+ function getRootNode(viewRef, _document) {
99
+ const rootNodes = viewRef.rootNodes;
100
+ if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {
101
+ return rootNodes[0];
102
+ }
103
+ const wrapper = _document.createElement('div');
104
+ rootNodes.forEach(node => wrapper.appendChild(node));
105
+ return wrapper;
106
+ }
107
+
52
108
  class InteractService {
53
109
  constructor(rendererFactory, ngZone, rootConfig) {
54
110
  this.rendererFactory = rendererFactory;
@@ -229,15 +285,19 @@ class InteractService {
229
285
  return position;
230
286
  }
231
287
  }
232
- InteractService.ɵprov = i0.ɵɵdefineInjectable({ factory: function InteractService_Factory() { return new InteractService(i0.ɵɵinject(i0.RendererFactory2), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(INTERACT_ROOT_CONFIG, 8)); }, token: InteractService, providedIn: "root" });
233
- InteractService.decorators = [
234
- { type: Injectable, args: [{ providedIn: 'root' },] }
235
- ];
236
- InteractService.ctorParameters = () => [
237
- { type: RendererFactory2 },
238
- { type: NgZone },
239
- { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [INTERACT_ROOT_CONFIG,] }] }
240
- ];
288
+ InteractService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: InteractService, deps: [{ token: i0.RendererFactory2 }, { token: i0.NgZone }, { token: INTERACT_ROOT_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
289
+ InteractService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: InteractService, providedIn: 'root' });
290
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: InteractService, decorators: [{
291
+ type: Injectable,
292
+ args: [{ providedIn: 'root' }]
293
+ }], ctorParameters: function () {
294
+ return [{ type: i0.RendererFactory2 }, { type: i0.NgZone }, { type: undefined, decorators: [{
295
+ type: Optional
296
+ }, {
297
+ type: Inject,
298
+ args: [INTERACT_ROOT_CONFIG]
299
+ }] }];
300
+ } });
241
301
 
242
302
  /**
243
303
  * Use to apply scale to the element and tell the drag and resize directives to account for the scale when
@@ -252,17 +312,16 @@ class AccountForScaleDirective {
252
312
  this.scale = 1;
253
313
  }
254
314
  }
255
- AccountForScaleDirective.decorators = [
256
- { type: Directive, args: [{
257
- selector: '[tftAccountForScale]'
258
- },] }
259
- ];
260
- AccountForScaleDirective.ctorParameters = () => [
261
- { type: ElementRef }
262
- ];
263
- AccountForScaleDirective.propDecorators = {
264
- scale: [{ type: Input }]
265
- };
315
+ AccountForScaleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AccountForScaleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
316
+ AccountForScaleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.1", type: AccountForScaleDirective, selector: "[tftAccountForScale]", inputs: { scale: "scale" }, ngImport: i0 });
317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AccountForScaleDirective, decorators: [{
318
+ type: Directive,
319
+ args: [{
320
+ selector: '[tftAccountForScale]'
321
+ }]
322
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { scale: [{
323
+ type: Input
324
+ }] } });
266
325
 
267
326
  class DropzoneDirective {
268
327
  constructor(el, renderer, interactService, account_for_scale_dir) {
@@ -340,84 +399,40 @@ class DropzoneDirective {
340
399
  };
341
400
  }
342
401
  }
343
- DropzoneDirective.decorators = [
344
- { type: Directive, args: [{
345
- selector: '[tftDropzone]',
346
- host: {
347
- '[id]': 'dropzoneId'
348
- }
349
- },] }
350
- ];
351
- DropzoneDirective.ctorParameters = () => [
352
- { type: ElementRef },
353
- { type: Renderer2 },
354
- { type: InteractService },
355
- { type: AccountForScaleDirective, decorators: [{ type: Optional }] }
356
- ];
357
- DropzoneDirective.propDecorators = {
358
- dropzoneId: [{ type: Input }],
359
- dropzoneConfig: [{ type: Input }],
360
- dropzoneData: [{ type: Input }],
361
- position: [{ type: Input }, { type: HostBinding, args: ['style.position',] }],
362
- dropActivate: [{ type: Output }],
363
- dragEnter: [{ type: Output }],
364
- dragLeave: [{ type: Output }],
365
- dragDrop: [{ type: Output }]
366
- };
367
-
368
- const TFT_DRAG_PREVIEW = new InjectionToken('DragPreviewDirective');
369
- class DragPreviewDirective {
370
- constructor(templateRef) {
371
- this.templateRef = templateRef;
372
- }
373
- }
374
- DragPreviewDirective.decorators = [
375
- { type: Directive, args: [{
376
- // eslint-disable-next-line @angular-eslint/directive-selector
377
- selector: 'ng-template[tftDragPreview]',
378
- },] }
379
- ];
380
- DragPreviewDirective.ctorParameters = () => [
381
- { type: TemplateRef }
382
- ];
383
- DragPreviewDirective.propDecorators = {
384
- dragData: [{ type: Input }]
385
- };
386
-
387
- /** Gets the closest ancestor of an element that matches a selector. */
388
- function getClosestMatchingAncestor(element, selector) {
389
- let currentElement = element.parentElement;
390
- while (currentElement) {
391
- // IE doesn't support `matches` so we have to fall back to `msMatchesSelector`.
392
- if (currentElement.matches ? currentElement.matches(selector) :
393
- currentElement.msMatchesSelector(selector)) {
394
- return currentElement;
395
- }
396
- currentElement = currentElement.parentElement;
397
- }
398
- return null;
399
- }
400
- /**
401
- * Create a copy of the HTML Element
402
- */
403
- function cloneElement$1(element) {
404
- const clone = element.cloneNode(true);
405
- clone.removeAttribute('id');
406
- return clone;
407
- }
408
- /**
409
- * Gets the root HTML element of an embedded view.
410
- * If the root is not an HTML element it gets wrapped in one.
411
- */
412
- function getRootNode(viewRef, _document) {
413
- const rootNodes = viewRef.rootNodes;
414
- if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {
415
- return rootNodes[0];
416
- }
417
- const wrapper = _document.createElement('div');
418
- rootNodes.forEach(node => wrapper.appendChild(node));
419
- return wrapper;
420
- }
402
+ DropzoneDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: DropzoneDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: InteractService }, { token: AccountForScaleDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
403
+ DropzoneDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.1", type: DropzoneDirective, 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 });
404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: DropzoneDirective, decorators: [{
405
+ type: Directive,
406
+ args: [{
407
+ selector: '[tftDropzone]',
408
+ host: {
409
+ '[id]': 'dropzoneId'
410
+ }
411
+ }]
412
+ }], ctorParameters: function () {
413
+ return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: InteractService }, { type: AccountForScaleDirective, decorators: [{
414
+ type: Optional
415
+ }] }];
416
+ }, propDecorators: { dropzoneId: [{
417
+ type: Input
418
+ }], dropzoneConfig: [{
419
+ type: Input
420
+ }], dropzoneData: [{
421
+ type: Input
422
+ }], position: [{
423
+ type: Input
424
+ }, {
425
+ type: HostBinding,
426
+ args: ['style.position']
427
+ }], dropActivate: [{
428
+ type: Output
429
+ }], dragEnter: [{
430
+ type: Output
431
+ }], dragLeave: [{
432
+ type: Output
433
+ }], dragDrop: [{
434
+ type: Output
435
+ }] } });
421
436
 
422
437
  /**
423
438
  * Use this directive to select which element to attach the element to while dragging
@@ -433,16 +448,21 @@ class DragRootDirective {
433
448
  this.account_for_scale_dir = account_for_scale_dir;
434
449
  }
435
450
  }
436
- DragRootDirective.decorators = [
437
- { type: Directive, args: [{
438
- selector: '[tftDragRoot]',
439
- exportAs: 'tftDragRoot'
440
- },] }
441
- ];
442
- DragRootDirective.ctorParameters = () => [
443
- { type: ElementRef },
444
- { type: AccountForScaleDirective, decorators: [{ type: Optional }, { type: Self }] }
445
- ];
451
+ DragRootDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: DragRootDirective, deps: [{ token: i0.ElementRef }, { token: AccountForScaleDirective, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
452
+ DragRootDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.1", type: DragRootDirective, selector: "[tftDragRoot]", exportAs: ["tftDragRoot"], ngImport: i0 });
453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: DragRootDirective, decorators: [{
454
+ type: Directive,
455
+ args: [{
456
+ selector: '[tftDragRoot]',
457
+ exportAs: 'tftDragRoot'
458
+ }]
459
+ }], ctorParameters: function () {
460
+ return [{ type: i0.ElementRef }, { type: AccountForScaleDirective, decorators: [{
461
+ type: Optional
462
+ }, {
463
+ type: Self
464
+ }] }];
465
+ } });
446
466
 
447
467
  ;
448
468
  /**
@@ -482,18 +502,19 @@ class AutoScrollDirective {
482
502
  this.scrollSubject.next({ scrollTop, scrollLeft });
483
503
  }
484
504
  }
485
- AutoScrollDirective.decorators = [
486
- { type: Directive, args: [{
487
- selector: '[tftAutoScroll]'
488
- },] }
489
- ];
490
- AutoScrollDirective.ctorParameters = () => [
491
- { type: ElementRef }
492
- ];
493
- AutoScrollDirective.propDecorators = {
494
- autoScrollConfig: [{ type: Input }],
495
- scroll: [{ type: HostListener, args: ['scroll', ['$event'],] }]
496
- };
505
+ AutoScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AutoScrollDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
506
+ AutoScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.1", type: AutoScrollDirective, selector: "[tftAutoScroll]", inputs: { autoScrollConfig: "autoScrollConfig" }, host: { listeners: { "scroll": "scroll($event)" } }, ngImport: i0 });
507
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AutoScrollDirective, decorators: [{
508
+ type: Directive,
509
+ args: [{
510
+ selector: '[tftAutoScroll]'
511
+ }]
512
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { autoScrollConfig: [{
513
+ type: Input
514
+ }], scroll: [{
515
+ type: HostListener,
516
+ args: ['scroll', ['$event']]
517
+ }] } });
497
518
 
498
519
  /** @dynamic */
499
520
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -525,8 +546,8 @@ class DraggableDirective {
525
546
  }
526
547
  // check all the different places for scale
527
548
  get scale() {
528
- var _a, _b, _c, _d;
529
- return ((_a = this.account_for_scale_dir) === null || _a === void 0 ? void 0 : _a.scale) || ((_b = this.drag_root_dir) === null || _b === void 0 ? void 0 : _b.account_for_scale_dir.scale) || ((_d = (_c = this.dragRoot) === null || _c === void 0 ? void 0 : _c.account_for_scale_dir) === null || _d === void 0 ? void 0 : _d.scale);
549
+ var _a, _b, _c, _d, _e;
550
+ return ((_a = this.account_for_scale_dir) === null || _a === void 0 ? void 0 : _a.scale) || ((_c = (_b = this.drag_root_dir) === null || _b === void 0 ? void 0 : _b.account_for_scale_dir) === null || _c === void 0 ? void 0 : _c.scale) || ((_e = (_d = this.dragRoot) === null || _d === void 0 ? void 0 : _d.account_for_scale_dir) === null || _e === void 0 ? void 0 : _e.scale) || 1;
530
551
  }
531
552
  ngOnInit() {
532
553
  var _a, _b, _c, _d, _e;
@@ -710,47 +731,74 @@ class DraggableDirective {
710
731
  });
711
732
  }
712
733
  }
713
- DraggableDirective.decorators = [
714
- { type: Directive, args: [{
715
- selector: '[tftDraggable]',
716
- // eslint-disable-next-line @angular-eslint/no-host-metadata-property
717
- host: {
718
- '[style.touchAction]': 'this.dragDisabled ? "auto" : "none"',
719
- '[style.position]': '"absolute"',
720
- '[id]': 'interactableId',
721
- }
722
- },] }
723
- ];
724
- DraggableDirective.ctorParameters = () => [
725
- { type: ElementRef },
726
- { type: InteractService },
727
- { type: Renderer2 },
728
- { type: ViewContainerRef },
729
- { type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
730
- { type: AccountForScaleDirective, decorators: [{ type: Optional }] },
731
- { type: DropzoneDirective, decorators: [{ type: Optional }, { type: SkipSelf }] },
732
- { type: DragRootDirective, decorators: [{ type: Optional }, { type: SkipSelf }] },
733
- { type: AutoScrollDirective, decorators: [{ type: Optional }, { type: SkipSelf }] }
734
- ];
735
- DraggableDirective.propDecorators = {
736
- x: [{ type: Input }],
737
- y: [{ type: Input }],
738
- dragZIndex: [{ type: Input }],
739
- zIndex: [{ type: Input }],
740
- interactableId: [{ type: Input }],
741
- dragData: [{ type: Input }],
742
- enableDragDefault: [{ type: Input }],
743
- disabled: [{ type: Input }],
744
- dragDisabled: [{ type: Input }],
745
- dragConfig: [{ type: Input }],
746
- showPlaceholder: [{ type: Input }],
747
- dragRoot: [{ type: Input }],
748
- dragStart: [{ type: Output }],
749
- dragMove: [{ type: Output }],
750
- dragInertiaStart: [{ type: Output }],
751
- dragEnd: [{ type: Output }],
752
- _previewTemplate: [{ type: ContentChild, args: [DragPreviewDirective,] }]
753
- };
734
+ DraggableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: DraggableDirective, deps: [{ token: i0.ElementRef }, { token: InteractService }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: DOCUMENT }, { token: AccountForScaleDirective, optional: true }, { token: DropzoneDirective, optional: true, skipSelf: true }, { token: DragRootDirective, optional: true, skipSelf: true }, { token: AutoScrollDirective, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
735
+ DraggableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.1", type: DraggableDirective, 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
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: DraggableDirective, decorators: [{
737
+ type: Directive,
738
+ args: [{
739
+ selector: '[tftDraggable]',
740
+ // eslint-disable-next-line @angular-eslint/no-host-metadata-property
741
+ host: {
742
+ '[style.touchAction]': 'this.dragDisabled ? "auto" : "none"',
743
+ '[style.position]': '"absolute"',
744
+ '[id]': 'interactableId',
745
+ }
746
+ }]
747
+ }], ctorParameters: function () {
748
+ return [{ type: i0.ElementRef }, { type: InteractService }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: Document, decorators: [{
749
+ type: Inject,
750
+ args: [DOCUMENT]
751
+ }] }, { type: AccountForScaleDirective, decorators: [{
752
+ type: Optional
753
+ }] }, { type: DropzoneDirective, decorators: [{
754
+ type: Optional
755
+ }, {
756
+ type: SkipSelf
757
+ }] }, { type: DragRootDirective, decorators: [{
758
+ type: Optional
759
+ }, {
760
+ type: SkipSelf
761
+ }] }, { type: AutoScrollDirective, decorators: [{
762
+ type: Optional
763
+ }, {
764
+ type: SkipSelf
765
+ }] }];
766
+ }, propDecorators: { x: [{
767
+ type: Input
768
+ }], y: [{
769
+ type: Input
770
+ }], dragZIndex: [{
771
+ type: Input
772
+ }], zIndex: [{
773
+ type: Input
774
+ }], interactableId: [{
775
+ type: Input
776
+ }], dragData: [{
777
+ type: Input
778
+ }], enableDragDefault: [{
779
+ type: Input
780
+ }], disabled: [{
781
+ type: Input
782
+ }], dragDisabled: [{
783
+ type: Input
784
+ }], dragConfig: [{
785
+ type: Input
786
+ }], showPlaceholder: [{
787
+ type: Input
788
+ }], dragRoot: [{
789
+ type: Input
790
+ }], dragStart: [{
791
+ type: Output
792
+ }], dragMove: [{
793
+ type: Output
794
+ }], dragInertiaStart: [{
795
+ type: Output
796
+ }], dragEnd: [{
797
+ type: Output
798
+ }], _previewTemplate: [{
799
+ type: ContentChild,
800
+ args: [DragPreviewDirective]
801
+ }] } });
754
802
  /**
755
803
  * Component utils
756
804
  */
@@ -920,46 +968,66 @@ class ResizableDirective {
920
968
  });
921
969
  }
922
970
  }
923
- ResizableDirective.decorators = [
924
- { type: Directive, args: [{
925
- selector: '[tftResizable]',
926
- // eslint-disable-next-line @angular-eslint/no-host-metadata-property
927
- host: {
928
- // prevents touch events from colliding with with mouse events
929
- // on touch screen
930
- '[style.touchAction]': 'this.resizeDisabled ? "auto" : "none"',
931
- // default to absolute here to accommodate likely use cases
932
- // consuming component can easily over ride with position input
933
- '[style.position]': 'position',
934
- // follows interactjs suggested practices
935
- '[style.boxSizing]': '"border-box"',
936
- }
937
- },] }
938
- ];
939
- ResizableDirective.ctorParameters = () => [
940
- { type: ElementRef },
941
- { type: Document, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
942
- { type: InteractService },
943
- { type: Renderer2 },
944
- { type: DragRootDirective, decorators: [{ type: Optional }] },
945
- { type: AccountForScaleDirective, decorators: [{ type: Optional }] },
946
- { type: DraggableDirective, decorators: [{ type: Optional }] },
947
- { type: DropzoneDirective, decorators: [{ type: Optional }, { type: SkipSelf }] },
948
- { type: AutoScrollDirective, decorators: [{ type: Optional }, { type: SkipSelf }] }
949
- ];
950
- ResizableDirective.propDecorators = {
951
- enableResizeDefault: [{ type: Input }],
952
- position: [{ type: Input }],
953
- resizeConfig: [{ type: Input }],
954
- interactableId: [{ type: Input }],
955
- width: [{ type: Input }],
956
- height: [{ type: Input }],
957
- resizeDisabled: [{ type: Input }],
958
- resizeStart: [{ type: Output }],
959
- resizeMove: [{ type: Output }],
960
- resizeInertiaStart: [{ type: Output }],
961
- resizeEnd: [{ type: Output }]
962
- };
971
+ ResizableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ResizableDirective, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }, { token: InteractService }, { token: i0.Renderer2 }, { token: DragRootDirective, optional: true }, { token: AccountForScaleDirective, optional: true }, { token: DraggableDirective, optional: true }, { token: DropzoneDirective, optional: true, skipSelf: true }, { token: AutoScrollDirective, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
972
+ ResizableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.1", type: ResizableDirective, 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 });
973
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ResizableDirective, decorators: [{
974
+ type: Directive,
975
+ args: [{
976
+ selector: '[tftResizable]',
977
+ // eslint-disable-next-line @angular-eslint/no-host-metadata-property
978
+ host: {
979
+ // prevents touch events from colliding with with mouse events
980
+ // on touch screen
981
+ '[style.touchAction]': 'this.resizeDisabled ? "auto" : "none"',
982
+ // default to absolute here to accommodate likely use cases
983
+ // consuming component can easily over ride with position input
984
+ '[style.position]': 'position',
985
+ // follows interactjs suggested practices
986
+ '[style.boxSizing]': '"border-box"',
987
+ }
988
+ }]
989
+ }], ctorParameters: function () {
990
+ return [{ type: i0.ElementRef }, { type: Document, decorators: [{
991
+ type: Inject,
992
+ args: [DOCUMENT]
993
+ }] }, { type: InteractService }, { type: i0.Renderer2 }, { type: DragRootDirective, decorators: [{
994
+ type: Optional
995
+ }] }, { type: AccountForScaleDirective, decorators: [{
996
+ type: Optional
997
+ }] }, { type: DraggableDirective, decorators: [{
998
+ type: Optional
999
+ }] }, { type: DropzoneDirective, decorators: [{
1000
+ type: Optional
1001
+ }, {
1002
+ type: SkipSelf
1003
+ }] }, { type: AutoScrollDirective, decorators: [{
1004
+ type: Optional
1005
+ }, {
1006
+ type: SkipSelf
1007
+ }] }];
1008
+ }, propDecorators: { enableResizeDefault: [{
1009
+ type: Input
1010
+ }], position: [{
1011
+ type: Input
1012
+ }], resizeConfig: [{
1013
+ type: Input
1014
+ }], interactableId: [{
1015
+ type: Input
1016
+ }], width: [{
1017
+ type: Input
1018
+ }], height: [{
1019
+ type: Input
1020
+ }], resizeDisabled: [{
1021
+ type: Input
1022
+ }], resizeStart: [{
1023
+ type: Output
1024
+ }], resizeMove: [{
1025
+ type: Output
1026
+ }], resizeInertiaStart: [{
1027
+ type: Output
1028
+ }], resizeEnd: [{
1029
+ type: Output
1030
+ }] } });
963
1031
 
964
1032
  /** @dynamic */
965
1033
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1012,28 +1080,35 @@ class GesturableDirective {
1012
1080
  });
1013
1081
  }
1014
1082
  }
1015
- GesturableDirective.decorators = [
1016
- { type: Directive, args: [{
1017
- selector: '[tftGesturable]',
1018
- // eslint-disable-next-line @angular-eslint/no-host-metadata-property
1019
- host: {
1020
- // '[style.touchAction]': 'this.gestureDisabled ? "auto" : "none"',
1021
- '[id]': 'gesturableId',
1022
- }
1023
- },] }
1024
- ];
1025
- GesturableDirective.ctorParameters = () => [
1026
- { type: ElementRef },
1027
- { type: DraggableDirective, decorators: [{ type: Optional }] }
1028
- ];
1029
- GesturableDirective.propDecorators = {
1030
- gesturableId: [{ type: Input }],
1031
- gestureDisabled: [{ type: Input }],
1032
- gestureConfig: [{ type: Input }],
1033
- gestureStart: [{ type: Output }],
1034
- gestureMove: [{ type: Output }],
1035
- gestureEnd: [{ type: Output }]
1036
- };
1083
+ GesturableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: GesturableDirective, deps: [{ token: i0.ElementRef }, { token: DraggableDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1084
+ GesturableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.1", type: GesturableDirective, selector: "[tftGesturable]", inputs: { gesturableId: "gesturableId", gestureDisabled: "gestureDisabled", gestureConfig: "gestureConfig" }, outputs: { gestureStart: "gestureStart", gestureMove: "gestureMove", gestureEnd: "gestureEnd" }, host: { properties: { "id": "gesturableId" } }, usesOnChanges: true, ngImport: i0 });
1085
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: GesturableDirective, decorators: [{
1086
+ type: Directive,
1087
+ args: [{
1088
+ selector: '[tftGesturable]',
1089
+ // eslint-disable-next-line @angular-eslint/no-host-metadata-property
1090
+ host: {
1091
+ // '[style.touchAction]': 'this.gestureDisabled ? "auto" : "none"',
1092
+ '[id]': 'gesturableId',
1093
+ }
1094
+ }]
1095
+ }], ctorParameters: function () {
1096
+ return [{ type: i0.ElementRef }, { type: DraggableDirective, decorators: [{
1097
+ type: Optional
1098
+ }] }];
1099
+ }, propDecorators: { gesturableId: [{
1100
+ type: Input
1101
+ }], gestureDisabled: [{
1102
+ type: Input
1103
+ }], gestureConfig: [{
1104
+ type: Input
1105
+ }], gestureStart: [{
1106
+ type: Output
1107
+ }], gestureMove: [{
1108
+ type: Output
1109
+ }], gestureEnd: [{
1110
+ type: Output
1111
+ }] } });
1037
1112
 
1038
1113
  class ApplyScaleDirective {
1039
1114
  constructor(el) {
@@ -1047,18 +1122,19 @@ class ApplyScaleDirective {
1047
1122
  }
1048
1123
  ;
1049
1124
  }
1050
- ApplyScaleDirective.decorators = [
1051
- { type: Directive, args: [{
1052
- selector: '[tftApplyScale]'
1053
- },] }
1054
- ];
1055
- ApplyScaleDirective.ctorParameters = () => [
1056
- { type: ElementRef }
1057
- ];
1058
- ApplyScaleDirective.propDecorators = {
1059
- scale: [{ type: Input }],
1060
- fontSize: [{ type: HostBinding, args: ['style.fontSize',] }]
1061
- };
1125
+ ApplyScaleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ApplyScaleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1126
+ ApplyScaleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.1", type: ApplyScaleDirective, selector: "[tftApplyScale]", inputs: { scale: "scale" }, host: { properties: { "style.fontSize": "this.fontSize" } }, ngImport: i0 });
1127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ApplyScaleDirective, decorators: [{
1128
+ type: Directive,
1129
+ args: [{
1130
+ selector: '[tftApplyScale]'
1131
+ }]
1132
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { scale: [{
1133
+ type: Input
1134
+ }], fontSize: [{
1135
+ type: HostBinding,
1136
+ args: ['style.fontSize']
1137
+ }] } });
1062
1138
 
1063
1139
  const EXPORTS = [
1064
1140
  DraggableDirective,
@@ -1084,22 +1160,44 @@ class InteractModule {
1084
1160
  };
1085
1161
  }
1086
1162
  }
1087
- InteractModule.decorators = [
1088
- { type: NgModule, args: [{
1089
- imports: [CommonModule],
1090
- // providers: [{ provide: INTERACT_ROOT_CONFIG, useValue: 'px' }],
1091
- declarations: [
1092
- ...EXPORTS,
1093
- ],
1094
- exports: [
1095
- ...EXPORTS
1096
- ]
1097
- },] }
1098
- ];
1163
+ InteractModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: InteractModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1164
+ InteractModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: InteractModule, declarations: [DraggableDirective,
1165
+ ResizableDirective,
1166
+ DropzoneDirective,
1167
+ GesturableDirective,
1168
+ DragRootDirective,
1169
+ AutoScrollDirective,
1170
+ AccountForScaleDirective,
1171
+ ApplyScaleDirective,
1172
+ DragPreviewDirective,
1173
+ ArrayOfNPipe], imports: [CommonModule], exports: [DraggableDirective,
1174
+ ResizableDirective,
1175
+ DropzoneDirective,
1176
+ GesturableDirective,
1177
+ DragRootDirective,
1178
+ AutoScrollDirective,
1179
+ AccountForScaleDirective,
1180
+ ApplyScaleDirective,
1181
+ DragPreviewDirective,
1182
+ ArrayOfNPipe] });
1183
+ InteractModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: InteractModule, imports: [[CommonModule]] });
1184
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: InteractModule, decorators: [{
1185
+ type: NgModule,
1186
+ args: [{
1187
+ imports: [CommonModule],
1188
+ // providers: [{ provide: INTERACT_ROOT_CONFIG, useValue: 'px' }],
1189
+ declarations: [
1190
+ ...EXPORTS,
1191
+ ],
1192
+ exports: [
1193
+ ...EXPORTS
1194
+ ]
1195
+ }]
1196
+ }] });
1099
1197
 
1100
1198
  /**
1101
1199
  * Generated bundle index. Do not edit.
1102
1200
  */
1103
1201
 
1104
- export { AccountForScaleDirective, ApplyScaleDirective, ArrayOfNPipe, AutoScrollDirective, DEFAULT_REGISTRY_ID, DragPreviewDirective, DragRootDirective, DraggableDirective, DropzoneDirective, GesturableDirective, INTERACT_ROOT_CONFIG, InteractModule, ResizableDirective, TFT_DRAG_PREVIEW, cloneElement$1 as cloneElement, defaultDelta, defaultPosition, defaultSize, getClosestMatchingAncestor, getRootNode, DraggableDirective as ɵa, ResizableDirective as ɵb, DropzoneDirective as ɵc, GesturableDirective as ɵd, DragRootDirective as ɵe, AutoScrollDirective as ɵf, AccountForScaleDirective as ɵg, ApplyScaleDirective as ɵh, DragPreviewDirective as ɵi, ArrayOfNPipe as ɵj };
1105
- //# sourceMappingURL=tft-interact.js.map
1202
+ export { AccountForScaleDirective, ApplyScaleDirective, ArrayOfNPipe, AutoScrollDirective, DEFAULT_REGISTRY_ID, DragPreviewDirective, DragRootDirective, DraggableDirective, DropzoneDirective, GesturableDirective, INTERACT_ROOT_CONFIG, InteractModule, ResizableDirective, TFT_DRAG_PREVIEW, cloneElement$1 as cloneElement, defaultDelta, defaultPosition, defaultSize, getClosestMatchingAncestor, getRootNode };
1203
+ //# sourceMappingURL=tft-interact.mjs.map