@tetacom/ng-components 1.0.55 → 1.0.56
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/directive/drag-drop/drag-drop.service.d.ts +1 -1
- package/directive/drag-drop/drag.directive.d.ts +3 -1
- package/esm2020/directive/drag-drop/drag-drop.service.mjs +4 -2
- package/esm2020/directive/drag-drop/drag.directive.mjs +8 -4
- package/fesm2015/tetacom-ng-components.mjs +10 -4
- package/fesm2015/tetacom-ng-components.mjs.map +1 -1
- package/fesm2020/tetacom-ng-components.mjs +10 -4
- package/fesm2020/tetacom-ng-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -11277,10 +11277,12 @@ class DragDropService {
|
|
|
11277
11277
|
this.dragProcess = {
|
|
11278
11278
|
selection: this.selection
|
|
11279
11279
|
};
|
|
11280
|
+
this._document.body.style.cursor = 'copy';
|
|
11280
11281
|
this._preview = this.createPreview();
|
|
11281
11282
|
}
|
|
11282
11283
|
stopProcess() {
|
|
11283
11284
|
this.destroyPreview();
|
|
11285
|
+
this._document.body.style.cursor = 'default';
|
|
11284
11286
|
this.dragProcess = null;
|
|
11285
11287
|
this.startPosition = null;
|
|
11286
11288
|
}
|
|
@@ -11325,7 +11327,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
11325
11327
|
args: [{
|
|
11326
11328
|
providedIn: 'root'
|
|
11327
11329
|
}]
|
|
11328
|
-
}], ctorParameters: function () { return [{ type:
|
|
11330
|
+
}], ctorParameters: function () { return [{ type: Document, decorators: [{
|
|
11329
11331
|
type: Inject,
|
|
11330
11332
|
args: [DOCUMENT]
|
|
11331
11333
|
}] }, { type: i0.RendererFactory2 }]; } });
|
|
@@ -11432,7 +11434,7 @@ class DragDirective {
|
|
|
11432
11434
|
return this._dragService?.selection?.items?.indexOf(this.instance) >= 0;
|
|
11433
11435
|
}
|
|
11434
11436
|
get isDropTarget() {
|
|
11435
|
-
return this.dropTarget === this.instance;
|
|
11437
|
+
return this.dropTarget === this.instance && this.allowDrop;
|
|
11436
11438
|
}
|
|
11437
11439
|
mousedown(event) {
|
|
11438
11440
|
if (!this.allowDrag) {
|
|
@@ -11452,7 +11454,9 @@ class DragDirective {
|
|
|
11452
11454
|
mouseenter(event) {
|
|
11453
11455
|
if (this.allowDrop) {
|
|
11454
11456
|
event.stopPropagation();
|
|
11455
|
-
this.
|
|
11457
|
+
if (this.allowDropPredicate === undefined || this.allowDropPredicate(this._dragService.selection, this.data)) {
|
|
11458
|
+
this._dragService.setDropTarget(this.instance);
|
|
11459
|
+
}
|
|
11456
11460
|
}
|
|
11457
11461
|
}
|
|
11458
11462
|
mouseleave(event) {
|
|
@@ -11485,7 +11489,7 @@ class DragDirective {
|
|
|
11485
11489
|
}
|
|
11486
11490
|
}
|
|
11487
11491
|
DragDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: DragDirective, deps: [{ token: DragContainerDirective, optional: true, skipSelf: true }, { token: DragDropService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
11488
|
-
DragDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: DragDirective, selector: "[tetaDrag]", inputs: { data: ["tetaDrag", "data"], allowDrag: "allowDrag", allowDrop: "allowDrop" }, outputs: { tetaDragEnter: "tetaDragEnter", tetaDrop: "tetaDrop" }, host: { listeners: { "mousedown": "mousedown($event)", "touchstart": "mousedown($event)", "mouseenter": "mouseenter($event)", "mouseleave": "mouseleave($event)" }, properties: { "style.userSelect": "\"none\"", "class.teta-drag-item": "\"true\"", "class.teta_draggable_item": "this.allowDrag", "class.teta_droppable_item": "this.allowDrop", "class.teta-drag-selection": "this.selection", "class.teta-drop-target": "this.isDropTarget" } }, exportAs: ["drag"], ngImport: i0 });
|
|
11492
|
+
DragDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: DragDirective, selector: "[tetaDrag]", inputs: { data: ["tetaDrag", "data"], allowDrag: "allowDrag", allowDrop: "allowDrop", allowDropPredicate: "allowDropPredicate" }, outputs: { tetaDragEnter: "tetaDragEnter", tetaDrop: "tetaDrop" }, host: { listeners: { "mousedown": "mousedown($event)", "touchstart": "mousedown($event)", "mouseenter": "mouseenter($event)", "mouseleave": "mouseleave($event)" }, properties: { "style.userSelect": "\"none\"", "class.teta-drag-item": "\"true\"", "class.teta_draggable_item": "this.allowDrag", "class.teta_droppable_item": "this.allowDrop", "class.teta-drag-selection": "this.selection", "class.teta-drop-target": "this.isDropTarget" } }, exportAs: ["drag"], ngImport: i0 });
|
|
11489
11493
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: DragDirective, decorators: [{
|
|
11490
11494
|
type: Directive,
|
|
11491
11495
|
args: [{
|
|
@@ -11516,6 +11520,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
11516
11520
|
args: ['class.teta_droppable_item']
|
|
11517
11521
|
}, {
|
|
11518
11522
|
type: Input
|
|
11523
|
+
}], allowDropPredicate: [{
|
|
11524
|
+
type: Input
|
|
11519
11525
|
}], tetaDragEnter: [{
|
|
11520
11526
|
type: Output
|
|
11521
11527
|
}], tetaDrop: [{
|