@foblex/flow 17.0.9 → 17.1.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/domain/f-background/providers.d.ts +1 -1
- package/domain/f-canvas/providers.d.ts +1 -1
- package/domain/f-draggable/providers.d.ts +1 -1
- package/domain/f-flow/get-flow-state/get-flow-state-connections/get-flow-state-connections.execution.d.ts +2 -3
- package/domain/f-flow/get-flow-state/get-flow-state-nodes/get-flow-state-nodes.execution.d.ts +2 -2
- package/domain/f-flow/get-flow-state/get-flow-state.execution.d.ts +4 -6
- package/domain/f-flow/get-flow-state/providers.d.ts +1 -1
- package/domain/f-flow/providers.d.ts +1 -1
- package/domain/f-node/calculate-nodes-bounding-box-normalized-position/calculate-nodes-bounding-box-normalized-position.request.d.ts +3 -0
- package/domain/f-node/providers.d.ts +1 -1
- package/domain/index.d.ts +1 -0
- package/domain/log-execution-time.d.ts +1 -0
- package/domain/providers.d.ts +1 -1
- package/esm2022/domain/f-flow/get-flow-state/get-flow-state-connections/get-flow-state-connections.execution.mjs +17 -19
- package/esm2022/domain/f-flow/get-flow-state/get-flow-state-nodes/get-flow-state-nodes.execution.mjs +5 -5
- package/esm2022/domain/f-flow/get-flow-state/get-flow-state.execution.mjs +14 -19
- package/esm2022/domain/f-line-alignment/add-line-alignment-to-store/add-line-alignment-to-store.execution.mjs +2 -2
- package/esm2022/domain/f-line-alignment/remove-line-alignment-from-store/remove-line-alignment-from-store.execution.mjs +2 -2
- package/esm2022/domain/f-node/calculate-nodes-bounding-box-normalized-position/calculate-nodes-bounding-box-normalized-position.execution.mjs +4 -4
- package/esm2022/domain/f-node/calculate-nodes-bounding-box-normalized-position/calculate-nodes-bounding-box-normalized-position.request.mjs +5 -1
- package/esm2022/domain/index.mjs +2 -1
- package/esm2022/domain/log-execution-time.mjs +16 -0
- package/esm2022/f-draggable/connections/create-connection/create-connection.drag-handler.mjs +3 -3
- package/esm2022/f-draggable/connections/reassign-connection/reassign-connection-finalize/reassign-connection-finalize.execution.mjs +33 -33
- package/esm2022/f-draggable/connections/reassign-connection/reassign-connection-preparation/reassign-connection-preparation.execution.mjs +1 -1
- package/esm2022/f-draggable/connections/reassign-connection/reassign-connection.drag-handler.mjs +9 -3
- package/esm2022/f-draggable/domain/is-array-has-parent-node/is-array-has-parent-node.execution.mjs +8 -17
- package/esm2022/f-draggable/domain/is-array-has-parent-node/is-array-has-parent-node.request.mjs +6 -6
- package/esm2022/f-draggable/domain/is-connection-under-node/is-connection-under-node.execution.mjs +25 -19
- package/esm2022/f-draggable/f-draggable-data-context.mjs +4 -2
- package/esm2022/f-draggable/node/connection-base-drag-handler.mjs +1 -1
- package/esm2022/f-draggable/node/connection-source.drag-handler.mjs +5 -7
- package/esm2022/f-draggable/node/connection-target.drag-handler.mjs +5 -7
- package/esm2022/f-draggable/node/connection.drag-handler.mjs +5 -5
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/create-move-nodes-drag-model-from-selection.execution.mjs +37 -22
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-restrictions/calculate-common-node-move-restrictions.execution.mjs +40 -0
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-restrictions/calculate-common-node-move-restrictions.request.mjs +7 -0
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-restrictions/index.mjs +3 -0
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-restrictions/calculate-node-move-restrictions.execution.mjs +42 -0
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-restrictions/calculate-node-move-restrictions.request.mjs +9 -0
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-restrictions/index.mjs +3 -0
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/put-input-connection-handlers-to-array/put-input-connection-handlers-to-array.execution.mjs +16 -21
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/put-output-connection-handlers-to-array/put-output-connection-handlers-to-array.execution.mjs +4 -4
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/i-node-with-distance-restrictions.mjs +1 -1
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/index.mjs +3 -2
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/providers.mjs +5 -3
- package/esm2022/f-draggable/node/index.mjs +3 -1
- package/esm2022/f-draggable/node/line-alignment-preparation/index.mjs +3 -0
- package/esm2022/f-draggable/node/line-alignment-preparation/line-alignment-preparation.execution.mjs +67 -0
- package/esm2022/f-draggable/node/line-alignment-preparation/line-alignment-preparation.request.mjs +3 -0
- package/esm2022/f-draggable/node/line-alignment.drag-handler.mjs +61 -0
- package/esm2022/f-draggable/node/node-move-finalize/node-move-finalize.execution.mjs +5 -3
- package/esm2022/f-draggable/node/node-move-preparation/index.mjs +1 -2
- package/esm2022/f-draggable/node/node-move-preparation/node-move-preparation.execution.mjs +26 -21
- package/esm2022/f-draggable/node/node-move-preparation/providers.mjs +1 -3
- package/esm2022/f-draggable/node/node.drag-handler.mjs +13 -19
- package/esm2022/f-draggable/node/providers.mjs +3 -1
- package/esm2022/f-line-alignment/f-line-alignment-base.mjs +1 -1
- package/esm2022/f-line-alignment/f-line-alignment.component.mjs +12 -78
- package/esm2022/f-storage/f-components-store.mjs +2 -1
- package/f-backgroud/providers.d.ts +1 -1
- package/f-connection/providers.d.ts +1 -1
- package/f-connectors/providers.d.ts +1 -1
- package/f-draggable/connections/providers.d.ts +1 -1
- package/f-draggable/connections/reassign-connection/reassign-connection-finalize/reassign-connection-finalize.execution.d.ts +12 -13
- package/f-draggable/connections/reassign-connection/reassign-connection.drag-handler.d.ts +2 -0
- package/f-draggable/domain/is-array-has-parent-node/is-array-has-parent-node.execution.d.ts +3 -6
- package/f-draggable/domain/is-array-has-parent-node/is-array-has-parent-node.request.d.ts +3 -3
- package/f-draggable/domain/is-connection-under-node/is-connection-under-node.execution.d.ts +3 -2
- package/f-draggable/domain/providers.d.ts +1 -1
- package/f-draggable/f-draggable-data-context.d.ts +1 -2
- package/f-draggable/node/connection-base-drag-handler.d.ts +2 -3
- package/f-draggable/node/connection-source.drag-handler.d.ts +3 -4
- package/f-draggable/node/connection-target.drag-handler.d.ts +3 -4
- package/f-draggable/node/connection.drag-handler.d.ts +3 -3
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/create-move-nodes-drag-model-from-selection.execution.d.ts +6 -3
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-restrictions/calculate-common-node-move-restrictions.execution.d.ts +13 -0
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-restrictions/calculate-common-node-move-restrictions.request.d.ts +5 -0
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-restrictions/index.d.ts +2 -0
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-restrictions/calculate-node-move-restrictions.execution.d.ts +12 -0
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/{get-node-move-restrictions/get-node-move-restrictions.request.d.ts → calculate-node-move-restrictions/calculate-node-move-restrictions.request.d.ts} +1 -1
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-restrictions/index.d.ts +2 -0
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/put-input-connection-handlers-to-array/put-input-connection-handlers-to-array.execution.d.ts +4 -6
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/i-node-with-distance-restrictions.d.ts +4 -4
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/index.d.ts +2 -1
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/providers.d.ts +3 -2
- package/f-draggable/node/index.d.ts +2 -0
- package/f-draggable/node/line-alignment-preparation/index.d.ts +2 -0
- package/f-draggable/node/line-alignment-preparation/line-alignment-preparation.execution.d.ts +21 -0
- package/f-draggable/node/line-alignment-preparation/line-alignment-preparation.request.d.ts +2 -0
- package/f-draggable/node/line-alignment.drag-handler.d.ts +20 -0
- package/f-draggable/node/node-move-preparation/index.d.ts +0 -1
- package/f-draggable/node/node-move-preparation/node-move-preparation.execution.d.ts +4 -3
- package/f-draggable/node/node-move-preparation/providers.d.ts +1 -2
- package/f-draggable/node/node.drag-handler.d.ts +4 -7
- package/f-draggable/node/providers.d.ts +2 -1
- package/f-draggable/node-resize/node-resize-preparation/providers.d.ts +1 -1
- package/f-draggable/node-resize/providers.d.ts +1 -1
- package/f-draggable/providers.d.ts +1 -1
- package/f-line-alignment/f-line-alignment-base.d.ts +2 -8
- package/f-line-alignment/f-line-alignment.component.d.ts +6 -25
- package/f-node/providers.d.ts +1 -1
- package/f-storage/f-components-store.d.ts +2 -0
- package/f-storage/providers.d.ts +1 -1
- package/fesm2022/foblex-flow.mjs +638 -544
- package/fesm2022/foblex-flow.mjs.map +1 -1
- package/package.json +2 -2
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/get-node-move-restrictions/get-node-move-restrictions.execution.mjs +0 -42
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/get-node-move-restrictions/get-node-move-restrictions.request.mjs +0 -9
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/get-node-move-restrictions/i-node-move-restrictions.mjs +0 -2
- package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/get-node-move-restrictions/index.mjs +0 -4
- package/esm2022/f-draggable/node/node-move-preparation/node-move-preparation.validator.mjs +0 -39
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/get-node-move-restrictions/get-node-move-restrictions.execution.d.ts +0 -12
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/get-node-move-restrictions/i-node-move-restrictions.d.ts +0 -5
- package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/get-node-move-restrictions/index.d.ts +0 -3
- package/f-draggable/node/node-move-preparation/node-move-preparation.validator.d.ts +0 -14
package/fesm2022/foblex-flow.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, Injectable, Directive, ElementRef, Input, HostBinding, EventEmitter, DestroyRef, Output, booleanAttribute, Inject, Component, ChangeDetectionStrategy, ViewChild, Optional, ContentChildren, NgZone, ContentChild, NgModule } from '@angular/core';
|
|
3
|
-
import { RectExtensions, RoundedRect, TransformModelExtensions, PointExtensions, Point, SizeExtensions, LineExtensions, GetIntersections, setRectToElement, adjustRectToMinSize,
|
|
3
|
+
import { RectExtensions, RoundedRect, TransformModelExtensions, PointExtensions, Point, SizeExtensions, LineExtensions, GetIntersections, findClosestAlignment, setRectToElement, adjustRectToMinSize, setRectToViewBox } from '@foblex/2d';
|
|
4
4
|
import { __decorate } from 'tslib';
|
|
5
5
|
import * as i2 from '@foblex/mediator';
|
|
6
6
|
import { FExecutionRegister, FMediator, FValidatorRegister } from '@foblex/mediator';
|
|
@@ -229,6 +229,7 @@ class FComponentsStore {
|
|
|
229
229
|
fInputs = [];
|
|
230
230
|
fOutlets = [];
|
|
231
231
|
fDraggable;
|
|
232
|
+
fLineAlignment;
|
|
232
233
|
addComponent(collection, component) {
|
|
233
234
|
collection.push(component);
|
|
234
235
|
this.countChanged();
|
|
@@ -3355,7 +3356,6 @@ class FDraggableDataContext {
|
|
|
3355
3356
|
onPointerDownScale = 1;
|
|
3356
3357
|
onPointerDownPosition = new Point(0, 0);
|
|
3357
3358
|
draggableItems = [];
|
|
3358
|
-
fLineAlignment;
|
|
3359
3359
|
reset() {
|
|
3360
3360
|
this.draggableItems = [];
|
|
3361
3361
|
this.onPointerDownScale = 1;
|
|
@@ -3364,6 +3364,9 @@ class FDraggableDataContext {
|
|
|
3364
3364
|
markSelectionAsChanged() {
|
|
3365
3365
|
this.isSelectedChanged = true;
|
|
3366
3366
|
}
|
|
3367
|
+
isEmpty() {
|
|
3368
|
+
return !this.draggableItems.length;
|
|
3369
|
+
}
|
|
3367
3370
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FDraggableDataContext, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3368
3371
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FDraggableDataContext });
|
|
3369
3372
|
}
|
|
@@ -3644,13 +3647,13 @@ class CreateConnectionDragHandler {
|
|
|
3644
3647
|
}
|
|
3645
3648
|
}
|
|
3646
3649
|
_drawConnectionForCreate(fInputRect, fSide) {
|
|
3647
|
-
const line = this.fMediator.
|
|
3650
|
+
const line = this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this.fOutputWithRect.fRect, fInputRect, this.fConnection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, fSide));
|
|
3648
3651
|
this.fConnection.setLine(line.point1, this.fOutputWithRect.fConnector.fConnectableSide, line.point2, fSide);
|
|
3649
3652
|
this.fConnection.redraw();
|
|
3650
3653
|
}
|
|
3651
3654
|
_drawSnapConnection(fClosestInput) {
|
|
3652
3655
|
if (fClosestInput) {
|
|
3653
|
-
const line = this.fMediator.
|
|
3656
|
+
const line = this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this.fOutputWithRect.fRect, fClosestInput.fRect, this.fSnapConnection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, fClosestInput.fConnector.fConnectableSide));
|
|
3654
3657
|
this.fSnapConnection.show();
|
|
3655
3658
|
this.fSnapConnection.setLine(line.point1, this.fOutputWithRect.fConnector.fConnectableSide, line.point2, fClosestInput.fConnector.fConnectableSide);
|
|
3656
3659
|
this.fSnapConnection.redraw();
|
|
@@ -4106,13 +4109,16 @@ class ReassignConnectionDragHandler {
|
|
|
4106
4109
|
}
|
|
4107
4110
|
}
|
|
4108
4111
|
_drawConnection(fInputRect, fSide) {
|
|
4109
|
-
const line = this.
|
|
4112
|
+
const line = this._getLineToPointer(fInputRect, fSide);
|
|
4110
4113
|
this.fConnection.setLine(line.point1, this.fOutputWithRect.fConnector.fConnectableSide, line.point2, fSide);
|
|
4111
4114
|
this.fConnection.redraw();
|
|
4112
4115
|
}
|
|
4116
|
+
_getLineToPointer(fInputRect, fSide) {
|
|
4117
|
+
return this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this.fOutputWithRect.fRect, fInputRect, this.fConnection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, fSide));
|
|
4118
|
+
}
|
|
4113
4119
|
_drawSnapConnection(fClosestInput) {
|
|
4114
4120
|
if (fClosestInput) {
|
|
4115
|
-
const line = this.
|
|
4121
|
+
const line = this._getLineToClosestInput(fClosestInput);
|
|
4116
4122
|
this.fSnapConnection.show();
|
|
4117
4123
|
this.fSnapConnection.setLine(line.point1, this.fOutputWithRect.fConnector.fConnectableSide, line.point2, fClosestInput.fConnector.fConnectableSide);
|
|
4118
4124
|
this.fSnapConnection.redraw();
|
|
@@ -4121,6 +4127,9 @@ class ReassignConnectionDragHandler {
|
|
|
4121
4127
|
this.fSnapConnection?.hide();
|
|
4122
4128
|
}
|
|
4123
4129
|
}
|
|
4130
|
+
_getLineToClosestInput(fClosestInput) {
|
|
4131
|
+
return this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this.fOutputWithRect.fRect, fClosestInput.fRect, this.fSnapConnection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, fClosestInput.fConnector.fConnectableSide));
|
|
4132
|
+
}
|
|
4124
4133
|
getClosetInput(difference) {
|
|
4125
4134
|
if (!this.fSnapConnection) {
|
|
4126
4135
|
return undefined;
|
|
@@ -4155,44 +4164,45 @@ class FReassignConnectionEvent {
|
|
|
4155
4164
|
}
|
|
4156
4165
|
|
|
4157
4166
|
let ReassignConnectionFinalizeExecution = class ReassignConnectionFinalizeExecution {
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
get
|
|
4162
|
-
return this.
|
|
4163
|
-
}
|
|
4164
|
-
get dragHandler() {
|
|
4165
|
-
return this.fDraggableDataContext.draggableItems[0];
|
|
4167
|
+
_fMediator = inject(FMediator);
|
|
4168
|
+
_fComponentsStore = inject(FComponentsStore);
|
|
4169
|
+
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
4170
|
+
get _fDraggable() {
|
|
4171
|
+
return this._fComponentsStore.fDraggable;
|
|
4166
4172
|
}
|
|
4167
|
-
|
|
4168
|
-
this.
|
|
4169
|
-
this.fDraggableDataContext = fDraggableDataContext;
|
|
4170
|
-
this.fMediator = fMediator;
|
|
4173
|
+
get _fDragHandler() {
|
|
4174
|
+
return this._fDraggableDataContext.draggableItems[0];
|
|
4171
4175
|
}
|
|
4172
4176
|
handle(request) {
|
|
4173
|
-
if (!this.
|
|
4177
|
+
if (!this._isDroppedConnectionReassignEvent()) {
|
|
4174
4178
|
return;
|
|
4175
4179
|
}
|
|
4176
|
-
this.
|
|
4177
|
-
this.
|
|
4180
|
+
this._applyReassignEvent(request.event);
|
|
4181
|
+
this._fDragHandler.onPointerUp();
|
|
4178
4182
|
}
|
|
4179
|
-
|
|
4180
|
-
return this.
|
|
4183
|
+
_isDroppedConnectionReassignEvent() {
|
|
4184
|
+
return this._fDraggableDataContext.draggableItems.some((x) => x instanceof ReassignConnectionDragHandler);
|
|
4181
4185
|
}
|
|
4182
|
-
|
|
4183
|
-
const
|
|
4184
|
-
if (!!
|
|
4186
|
+
_applyReassignEvent(event) {
|
|
4187
|
+
const fInput = this._getInputUnderPointer(event);
|
|
4188
|
+
if (!!fInput && !this._isReassignToDifferentInput(fInput)) {
|
|
4185
4189
|
return;
|
|
4186
4190
|
}
|
|
4187
|
-
this.
|
|
4191
|
+
this._emitReassignConnectionEvent(event, fInput);
|
|
4188
4192
|
}
|
|
4189
|
-
|
|
4190
|
-
return this.
|
|
4193
|
+
_getInputUnderPointer(event) {
|
|
4194
|
+
return this._fMediator.send(new GetInputUnderPointerRequest(event, this._fDragHandler));
|
|
4195
|
+
}
|
|
4196
|
+
_isReassignToDifferentInput(fInput) {
|
|
4197
|
+
return this._fDragHandler.fConnection.fInputId !== fInput.fId;
|
|
4191
4198
|
}
|
|
4192
|
-
|
|
4193
|
-
|
|
4199
|
+
_emitReassignConnectionEvent(event, fInput) {
|
|
4200
|
+
this._fDraggable.fReassignConnection.emit(this._getEventData(event, fInput));
|
|
4194
4201
|
}
|
|
4195
|
-
|
|
4202
|
+
_getEventData(event, fInput) {
|
|
4203
|
+
return new FReassignConnectionEvent(this._fDragHandler.fConnection.fId, this._fDragHandler.fConnection.fOutputId, this._fDragHandler.fConnection.fInputId, fInput?.fId, event.getPosition());
|
|
4204
|
+
}
|
|
4205
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ReassignConnectionFinalizeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4196
4206
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ReassignConnectionFinalizeExecution });
|
|
4197
4207
|
};
|
|
4198
4208
|
ReassignConnectionFinalizeExecution = __decorate([
|
|
@@ -4200,7 +4210,7 @@ ReassignConnectionFinalizeExecution = __decorate([
|
|
|
4200
4210
|
], ReassignConnectionFinalizeExecution);
|
|
4201
4211
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ReassignConnectionFinalizeExecution, decorators: [{
|
|
4202
4212
|
type: Injectable
|
|
4203
|
-
}]
|
|
4213
|
+
}] });
|
|
4204
4214
|
|
|
4205
4215
|
class ReassignConnectionPreparationRequest {
|
|
4206
4216
|
event;
|
|
@@ -4332,66 +4342,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
|
|
|
4332
4342
|
}], ctorParameters: () => [{ type: FComponentsStore }, { type: i2.FMediator }] });
|
|
4333
4343
|
|
|
4334
4344
|
class IsArrayHasParentNodeRequest {
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
constructor(
|
|
4338
|
-
this.
|
|
4339
|
-
this.
|
|
4340
|
-
}
|
|
4341
|
-
}
|
|
4342
|
-
|
|
4343
|
-
class GetParentNodesRequest {
|
|
4344
|
-
fNode;
|
|
4345
|
-
constructor(fNode) {
|
|
4346
|
-
this.fNode = fNode;
|
|
4345
|
+
fParentNodes;
|
|
4346
|
+
fDraggedNodes;
|
|
4347
|
+
constructor(fParentNodes, fDraggedNodes) {
|
|
4348
|
+
this.fParentNodes = fParentNodes;
|
|
4349
|
+
this.fDraggedNodes = fDraggedNodes;
|
|
4347
4350
|
}
|
|
4348
4351
|
}
|
|
4349
4352
|
|
|
4350
|
-
let GetParentNodesExecution = class GetParentNodesExecution {
|
|
4351
|
-
_fComponentsStore = inject(FComponentsStore);
|
|
4352
|
-
handle(request) {
|
|
4353
|
-
return this._getParentNodes(request.fNode, new Set(), []);
|
|
4354
|
-
}
|
|
4355
|
-
_getParentNodes(fNode, visited, result) {
|
|
4356
|
-
if (visited.has(fNode.fId)) {
|
|
4357
|
-
throw new Error('Circular reference detected in the node hierarchy. Node id: ' + fNode.fId);
|
|
4358
|
-
}
|
|
4359
|
-
visited.add(fNode.fId);
|
|
4360
|
-
const parent = this._fComponentsStore.fNodes.find((x) => x.fId === fNode.fParentId);
|
|
4361
|
-
if (!parent) {
|
|
4362
|
-
return result;
|
|
4363
|
-
}
|
|
4364
|
-
result.push(parent);
|
|
4365
|
-
return this._getParentNodes(parent, visited, result);
|
|
4366
|
-
}
|
|
4367
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetParentNodesExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4368
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetParentNodesExecution });
|
|
4369
|
-
};
|
|
4370
|
-
GetParentNodesExecution = __decorate([
|
|
4371
|
-
FExecutionRegister(GetParentNodesRequest)
|
|
4372
|
-
], GetParentNodesExecution);
|
|
4373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetParentNodesExecution, decorators: [{
|
|
4374
|
-
type: Injectable
|
|
4375
|
-
}] });
|
|
4376
|
-
|
|
4377
4353
|
let IsArrayHasParentNodeExecution = class IsArrayHasParentNodeExecution {
|
|
4378
|
-
fMediator;
|
|
4379
|
-
constructor(fMediator) {
|
|
4380
|
-
this.fMediator = fMediator;
|
|
4381
|
-
}
|
|
4382
4354
|
handle(request) {
|
|
4383
|
-
return this.
|
|
4384
|
-
}
|
|
4385
|
-
getParentNodeIds(fNode) {
|
|
4386
|
-
return this.getParentNodes(fNode).map((x) => x.fId);
|
|
4355
|
+
return this._isParentNodeInArray(this._getParentNodeIds(request.fParentNodes), request.fDraggedNodes);
|
|
4387
4356
|
}
|
|
4388
|
-
|
|
4389
|
-
return
|
|
4357
|
+
_getParentNodeIds(fParentNodes) {
|
|
4358
|
+
return fParentNodes.map((x) => x.fId);
|
|
4390
4359
|
}
|
|
4391
|
-
|
|
4392
|
-
return
|
|
4360
|
+
_isParentNodeInArray(parentNodeIds, fDraggedNodes) {
|
|
4361
|
+
return fDraggedNodes.some((x) => parentNodeIds.includes(x.fId));
|
|
4393
4362
|
}
|
|
4394
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: IsArrayHasParentNodeExecution, deps: [
|
|
4363
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: IsArrayHasParentNodeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4395
4364
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: IsArrayHasParentNodeExecution });
|
|
4396
4365
|
};
|
|
4397
4366
|
IsArrayHasParentNodeExecution = __decorate([
|
|
@@ -4399,7 +4368,7 @@ IsArrayHasParentNodeExecution = __decorate([
|
|
|
4399
4368
|
], IsArrayHasParentNodeExecution);
|
|
4400
4369
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: IsArrayHasParentNodeExecution, decorators: [{
|
|
4401
4370
|
type: Injectable
|
|
4402
|
-
}]
|
|
4371
|
+
}] });
|
|
4403
4372
|
|
|
4404
4373
|
class FNodeIntersectedWithConnections {
|
|
4405
4374
|
fNodeId;
|
|
@@ -4421,27 +4390,30 @@ let IsConnectionUnderNodeExecution = class IsConnectionUnderNodeExecution {
|
|
|
4421
4390
|
_fMediator = inject(FMediator);
|
|
4422
4391
|
_fComponentsStore = inject(FComponentsStore);
|
|
4423
4392
|
handle(request) {
|
|
4424
|
-
const
|
|
4425
|
-
const
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
const canBeConnectedInputs = fInputConnectors.filter((x) => x.canBeConnected);
|
|
4429
|
-
if (canBeConnectedOutputs.length && canBeConnectedInputs.length) {
|
|
4430
|
-
const fOutputConnections = this._getOutputConnectionsId(canBeConnectedOutputs);
|
|
4431
|
-
const fInputConnections = this._getInputConnectionsId(canBeConnectedInputs);
|
|
4432
|
-
const fConnectionsUnderNode = this._calculateConnectionsUnderNode(fNode).filter((x) => {
|
|
4433
|
-
return !fOutputConnections.includes(x.fId) && !fInputConnections.includes(x.fId);
|
|
4434
|
-
});
|
|
4435
|
-
if (fConnectionsUnderNode.length) {
|
|
4436
|
-
this._fComponentsStore.fDraggable?.fNodeIntersectedWithConnections.emit(new FNodeIntersectedWithConnections(fNode.fId, fConnectionsUnderNode.map((x) => x.fId)));
|
|
4437
|
-
}
|
|
4393
|
+
const fOutputConnectors = this._getOutputConnectors(request.fNode);
|
|
4394
|
+
const fInputConnectors = this._getInputConnectors(request.fNode);
|
|
4395
|
+
if (!fOutputConnectors.length || !fInputConnectors.length) {
|
|
4396
|
+
return;
|
|
4438
4397
|
}
|
|
4398
|
+
const fOutputConnections = this._getOutputConnectionsId(fOutputConnectors);
|
|
4399
|
+
const fInputConnections = this._getInputConnectionsId(fInputConnectors);
|
|
4400
|
+
const fConnectionsUnderNode = this._calculateConnectionsUnderNode(request.fNode).filter((x) => {
|
|
4401
|
+
return !fOutputConnections.includes(x.fId) && !fInputConnections.includes(x.fId);
|
|
4402
|
+
});
|
|
4403
|
+
if (!fConnectionsUnderNode.length) {
|
|
4404
|
+
return;
|
|
4405
|
+
}
|
|
4406
|
+
this._emitNodeIntersectedWithConnections(request.fNode, fConnectionsUnderNode);
|
|
4439
4407
|
}
|
|
4440
|
-
|
|
4441
|
-
return this._fComponentsStore.fOutputs.filter((x) =>
|
|
4408
|
+
_getOutputConnectors(fNode) {
|
|
4409
|
+
return this._fComponentsStore.fOutputs.filter((x) => {
|
|
4410
|
+
return fNode.isContains(x.hostElement) && x.canBeConnected;
|
|
4411
|
+
});
|
|
4442
4412
|
}
|
|
4443
|
-
|
|
4444
|
-
return this._fComponentsStore.fInputs.filter((x) =>
|
|
4413
|
+
_getInputConnectors(fNode) {
|
|
4414
|
+
return this._fComponentsStore.fInputs.filter((x) => {
|
|
4415
|
+
return fNode.isContains(x.hostElement) && x.canBeConnected;
|
|
4416
|
+
});
|
|
4445
4417
|
}
|
|
4446
4418
|
_getOutputConnectionsId(connectors) {
|
|
4447
4419
|
const connectorsId = this._getConnectorsId(connectors);
|
|
@@ -4465,6 +4437,9 @@ let IsConnectionUnderNodeExecution = class IsConnectionUnderNodeExecution {
|
|
|
4465
4437
|
_isConnectionHasIntersectionsWithNode(fConnection, fNodeRect) {
|
|
4466
4438
|
return GetIntersections.getRoundedRectIntersectionsWithSVGPath(fConnection.fPath.hostElement, fNodeRect).length > 0;
|
|
4467
4439
|
}
|
|
4440
|
+
_emitNodeIntersectedWithConnections(fNode, fConnections) {
|
|
4441
|
+
this._fComponentsStore.fDraggable?.fNodeIntersectedWithConnections.emit(new FNodeIntersectedWithConnections(fNode.fId, fConnections.map((x) => x.fId)));
|
|
4442
|
+
}
|
|
4468
4443
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: IsConnectionUnderNodeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4469
4444
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: IsConnectionUnderNodeExecution });
|
|
4470
4445
|
};
|
|
@@ -4499,6 +4474,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
|
|
|
4499
4474
|
type: Injectable
|
|
4500
4475
|
}] });
|
|
4501
4476
|
|
|
4477
|
+
class CalculateCommonNodeMoveRestrictionsRequest {
|
|
4478
|
+
restrictions;
|
|
4479
|
+
constructor(restrictions) {
|
|
4480
|
+
this.restrictions = restrictions;
|
|
4481
|
+
}
|
|
4482
|
+
}
|
|
4483
|
+
|
|
4484
|
+
let CalculateCommonNodeMoveRestrictionsExecution = class CalculateCommonNodeMoveRestrictionsExecution {
|
|
4485
|
+
handle(request) {
|
|
4486
|
+
return this._calculateCommonRestrictions(request.restrictions);
|
|
4487
|
+
}
|
|
4488
|
+
_calculateCommonRestrictions(restrictions) {
|
|
4489
|
+
return restrictions.reduce((result, x) => this._clampRestrictions(result, x), restrictions[0]);
|
|
4490
|
+
}
|
|
4491
|
+
_clampRestrictions(common, x) {
|
|
4492
|
+
common.min = this._clampMinRestrictions(common.min, x.min);
|
|
4493
|
+
common.max = this._clampMaxRestrictions(common.max, x.max);
|
|
4494
|
+
return common;
|
|
4495
|
+
}
|
|
4496
|
+
_clampMinRestrictions(common, node) {
|
|
4497
|
+
return {
|
|
4498
|
+
x: Math.max(common.x, node.x),
|
|
4499
|
+
y: Math.max(common.y, node.y),
|
|
4500
|
+
};
|
|
4501
|
+
}
|
|
4502
|
+
_clampMaxRestrictions(common, node) {
|
|
4503
|
+
return {
|
|
4504
|
+
x: Math.min(common.x, node.x),
|
|
4505
|
+
y: Math.min(common.y, node.y),
|
|
4506
|
+
};
|
|
4507
|
+
}
|
|
4508
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateCommonNodeMoveRestrictionsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4509
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateCommonNodeMoveRestrictionsExecution });
|
|
4510
|
+
};
|
|
4511
|
+
CalculateCommonNodeMoveRestrictionsExecution = __decorate([
|
|
4512
|
+
FExecutionRegister(CalculateCommonNodeMoveRestrictionsRequest)
|
|
4513
|
+
], CalculateCommonNodeMoveRestrictionsExecution);
|
|
4514
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateCommonNodeMoveRestrictionsExecution, decorators: [{
|
|
4515
|
+
type: Injectable
|
|
4516
|
+
}] });
|
|
4517
|
+
|
|
4502
4518
|
class PutInputConnectionHandlersToArrayRequest {
|
|
4503
4519
|
nodeDragHandler;
|
|
4504
4520
|
outputIds;
|
|
@@ -4565,11 +4581,11 @@ class ConnectionDragHandler extends ConnectionBaseDragHandler {
|
|
|
4565
4581
|
constructor(fMediator, fComponentsStore, connection) {
|
|
4566
4582
|
super(fMediator, fComponentsStore, connection);
|
|
4567
4583
|
}
|
|
4568
|
-
setOutputRestrictions(
|
|
4569
|
-
this.sourceRestrictions =
|
|
4584
|
+
setOutputRestrictions(restrictions) {
|
|
4585
|
+
this.sourceRestrictions = restrictions;
|
|
4570
4586
|
}
|
|
4571
|
-
setInputRestrictions(
|
|
4572
|
-
this.targetRestrictions =
|
|
4587
|
+
setInputRestrictions(restrictions) {
|
|
4588
|
+
this.targetRestrictions = restrictions;
|
|
4573
4589
|
}
|
|
4574
4590
|
onPointerMove(difference) {
|
|
4575
4591
|
this.redrawConnection(this.getNewLineValue(difference));
|
|
@@ -4580,30 +4596,24 @@ class ConnectionDragHandler extends ConnectionBaseDragHandler {
|
|
|
4580
4596
|
}
|
|
4581
4597
|
|
|
4582
4598
|
class ConnectionTargetDragHandler extends ConnectionBaseDragHandler {
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
constructor(fMediator, fComponentsStore, connection, minDistance, maxDistance) {
|
|
4599
|
+
restrictions;
|
|
4600
|
+
constructor(fMediator, fComponentsStore, connection, restrictions) {
|
|
4586
4601
|
super(fMediator, fComponentsStore, connection);
|
|
4587
|
-
this.
|
|
4588
|
-
this.maxDistance = maxDistance;
|
|
4602
|
+
this.restrictions = restrictions;
|
|
4589
4603
|
}
|
|
4590
4604
|
onPointerMove(difference) {
|
|
4591
4605
|
this.redrawConnection(this.getNewLineValue(difference));
|
|
4592
4606
|
}
|
|
4593
4607
|
getNewLineValue(difference) {
|
|
4594
|
-
return this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this.fOutputWithRect.fRect, RoundedRect.fromRoundedRect(this.fInputWithRect.fRect).addPoint(this.getRestrictedDifference({ ...difference },
|
|
4608
|
+
return this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this.fOutputWithRect.fRect, RoundedRect.fromRoundedRect(this.fInputWithRect.fRect).addPoint(this.getRestrictedDifference({ ...difference }, this.restrictions)), this.connection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, this.fInputWithRect.fConnector.fConnectableSide));
|
|
4595
4609
|
}
|
|
4596
4610
|
}
|
|
4597
4611
|
|
|
4598
4612
|
let PutInputConnectionHandlersToArrayExecution = class PutInputConnectionHandlersToArrayExecution {
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
get
|
|
4602
|
-
return this.
|
|
4603
|
-
}
|
|
4604
|
-
constructor(fComponentsStore, fMediator) {
|
|
4605
|
-
this.fComponentsStore = fComponentsStore;
|
|
4606
|
-
this.fMediator = fMediator;
|
|
4613
|
+
_fMediator = inject(FMediator);
|
|
4614
|
+
_fComponentsStore = inject(FComponentsStore);
|
|
4615
|
+
get _fConnections() {
|
|
4616
|
+
return this._fComponentsStore.fConnections;
|
|
4607
4617
|
}
|
|
4608
4618
|
handle(request) {
|
|
4609
4619
|
this.getInputConnections(request.nodeDragHandler.fNode).forEach((connection) => {
|
|
@@ -4618,10 +4628,10 @@ let PutInputConnectionHandlersToArrayExecution = class PutInputConnectionHandler
|
|
|
4618
4628
|
}
|
|
4619
4629
|
getInputConnections(node) {
|
|
4620
4630
|
const inputIds = new Set(this.getInputsForNode(node).map((x) => x.fId));
|
|
4621
|
-
return this.
|
|
4631
|
+
return this._fConnections.filter((x) => inputIds.has(x.fInputId));
|
|
4622
4632
|
}
|
|
4623
4633
|
getInputsForNode(node) {
|
|
4624
|
-
return this.
|
|
4634
|
+
return this._fComponentsStore.fInputs.filter((x) => node.isContains(x.hostElement));
|
|
4625
4635
|
}
|
|
4626
4636
|
getExistingConnectionHandlerIndex(result, connection) {
|
|
4627
4637
|
return result.findIndex((x) => x instanceof ConnectionDragHandler && x.connection.fId === connection.fId);
|
|
@@ -4637,17 +4647,17 @@ let PutInputConnectionHandlersToArrayExecution = class PutInputConnectionHandler
|
|
|
4637
4647
|
return result;
|
|
4638
4648
|
}
|
|
4639
4649
|
getNewConnectionHandler(connection, nodeDragHandler) {
|
|
4640
|
-
const handler = new ConnectionDragHandler(this.
|
|
4641
|
-
handler.setInputRestrictions(nodeDragHandler.
|
|
4650
|
+
const handler = new ConnectionDragHandler(this._fMediator, this._fComponentsStore, connection);
|
|
4651
|
+
handler.setInputRestrictions(nodeDragHandler.restrictions);
|
|
4642
4652
|
return handler;
|
|
4643
4653
|
}
|
|
4644
4654
|
updateExistingConnectionHandler(result, index, nodeDragHandler) {
|
|
4645
|
-
result[index].setInputRestrictions(nodeDragHandler.
|
|
4655
|
+
result[index].setInputRestrictions(nodeDragHandler.restrictions);
|
|
4646
4656
|
}
|
|
4647
4657
|
getNewSourceConnectionHandler(connection, nodeDragHandler) {
|
|
4648
|
-
return new ConnectionTargetDragHandler(this.
|
|
4658
|
+
return new ConnectionTargetDragHandler(this._fMediator, this._fComponentsStore, connection, nodeDragHandler.restrictions);
|
|
4649
4659
|
}
|
|
4650
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutInputConnectionHandlersToArrayExecution, deps: [
|
|
4660
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutInputConnectionHandlersToArrayExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4651
4661
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutInputConnectionHandlersToArrayExecution });
|
|
4652
4662
|
};
|
|
4653
4663
|
PutInputConnectionHandlersToArrayExecution = __decorate([
|
|
@@ -4655,7 +4665,7 @@ PutInputConnectionHandlersToArrayExecution = __decorate([
|
|
|
4655
4665
|
], PutInputConnectionHandlersToArrayExecution);
|
|
4656
4666
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutInputConnectionHandlersToArrayExecution, decorators: [{
|
|
4657
4667
|
type: Injectable
|
|
4658
|
-
}]
|
|
4668
|
+
}] });
|
|
4659
4669
|
|
|
4660
4670
|
class PutOutputConnectionHandlersToArrayRequest {
|
|
4661
4671
|
nodeDragHandler;
|
|
@@ -4669,18 +4679,16 @@ class PutOutputConnectionHandlersToArrayRequest {
|
|
|
4669
4679
|
}
|
|
4670
4680
|
|
|
4671
4681
|
class ConnectionSourceDragHandler extends ConnectionBaseDragHandler {
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
constructor(fMediator, fComponentsStore, connection, minDistance, maxDistance) {
|
|
4682
|
+
restrictions;
|
|
4683
|
+
constructor(fMediator, fComponentsStore, connection, restrictions) {
|
|
4675
4684
|
super(fMediator, fComponentsStore, connection);
|
|
4676
|
-
this.
|
|
4677
|
-
this.maxDistance = maxDistance;
|
|
4685
|
+
this.restrictions = restrictions;
|
|
4678
4686
|
}
|
|
4679
4687
|
onPointerMove(difference) {
|
|
4680
4688
|
this.redrawConnection(this.getNewLineValue(difference));
|
|
4681
4689
|
}
|
|
4682
4690
|
getNewLineValue(difference) {
|
|
4683
|
-
return this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(RoundedRect.fromRoundedRect(this.fOutputWithRect.fRect).addPoint(this.getRestrictedDifference({ ...difference },
|
|
4691
|
+
return this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(RoundedRect.fromRoundedRect(this.fOutputWithRect.fRect).addPoint(this.getRestrictedDifference({ ...difference }, this.restrictions)), this.fInputWithRect.fRect, this.connection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, this.fInputWithRect.fConnector.fConnectableSide));
|
|
4684
4692
|
}
|
|
4685
4693
|
}
|
|
4686
4694
|
|
|
@@ -4727,14 +4735,14 @@ let PutOutputConnectionHandlersToArrayExecution = class PutOutputConnectionHandl
|
|
|
4727
4735
|
}
|
|
4728
4736
|
getNewConnectionHandler(connection, nodeDragHandler) {
|
|
4729
4737
|
const handler = new ConnectionDragHandler(this.fMediator, this.fComponentsStore, connection);
|
|
4730
|
-
handler.setOutputRestrictions(nodeDragHandler.
|
|
4738
|
+
handler.setOutputRestrictions(nodeDragHandler.restrictions);
|
|
4731
4739
|
return handler;
|
|
4732
4740
|
}
|
|
4733
4741
|
updateExistingConnectionHandler(result, index, nodeDragHandler) {
|
|
4734
|
-
result[index].setOutputRestrictions(nodeDragHandler.
|
|
4742
|
+
result[index].setOutputRestrictions(nodeDragHandler.restrictions);
|
|
4735
4743
|
}
|
|
4736
4744
|
getNewSourceConnectionHandler(connection, nodeDragHandler) {
|
|
4737
|
-
return new ConnectionSourceDragHandler(this.fMediator, this.fComponentsStore, connection, nodeDragHandler.
|
|
4745
|
+
return new ConnectionSourceDragHandler(this.fMediator, this.fComponentsStore, connection, nodeDragHandler.restrictions);
|
|
4738
4746
|
}
|
|
4739
4747
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutOutputConnectionHandlersToArrayExecution, deps: [{ token: FComponentsStore }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4740
4748
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutOutputConnectionHandlersToArrayExecution });
|
|
@@ -4746,7 +4754,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
|
|
|
4746
4754
|
type: Injectable
|
|
4747
4755
|
}], ctorParameters: () => [{ type: FComponentsStore }, { type: i2.FMediator }] });
|
|
4748
4756
|
|
|
4749
|
-
class
|
|
4757
|
+
class CalculateNodeMoveRestrictionsRequest {
|
|
4750
4758
|
fNode;
|
|
4751
4759
|
hasParentNodeInSelected;
|
|
4752
4760
|
constructor(fNode, hasParentNodeInSelected) {
|
|
@@ -4755,32 +4763,32 @@ class GetNodeMoveRestrictionsRequest {
|
|
|
4755
4763
|
}
|
|
4756
4764
|
}
|
|
4757
4765
|
|
|
4758
|
-
let
|
|
4766
|
+
let CalculateNodeMoveRestrictionsExecution = class CalculateNodeMoveRestrictionsExecution {
|
|
4759
4767
|
_fMediator = inject(FMediator);
|
|
4760
4768
|
handle(request) {
|
|
4761
|
-
if (request.fNode.fParentId
|
|
4762
|
-
|
|
4763
|
-
const fCurrentNodeRect = this._getNodeRect(request.fNode);
|
|
4764
|
-
return {
|
|
4765
|
-
min: PointExtensions.initialize(fParentNodeRect.x - fCurrentNodeRect.x, fParentNodeRect.y - fCurrentNodeRect.y),
|
|
4766
|
-
max: PointExtensions.initialize((fParentNodeRect.x + fParentNodeRect.width) - (fCurrentNodeRect.x + fCurrentNodeRect.width), (fParentNodeRect.y + fParentNodeRect.height) - (fCurrentNodeRect.y + fCurrentNodeRect.height))
|
|
4767
|
-
};
|
|
4769
|
+
if (!request.fNode.fParentId || request.hasParentNodeInSelected) {
|
|
4770
|
+
return { ...DEFAULT_RESTRICTIONS };
|
|
4768
4771
|
}
|
|
4769
|
-
|
|
4772
|
+
const fParentNodeRect = this._getParentNodeRect(request.fNode);
|
|
4773
|
+
const fCurrentNodeRect = this._getNodeRect(request.fNode);
|
|
4774
|
+
return {
|
|
4775
|
+
min: PointExtensions.initialize(fParentNodeRect.x - fCurrentNodeRect.x, fParentNodeRect.y - fCurrentNodeRect.y),
|
|
4776
|
+
max: PointExtensions.initialize((fParentNodeRect.x + fParentNodeRect.width) - (fCurrentNodeRect.x + fCurrentNodeRect.width), (fParentNodeRect.y + fParentNodeRect.height) - (fCurrentNodeRect.y + fCurrentNodeRect.height))
|
|
4777
|
+
};
|
|
4770
4778
|
}
|
|
4771
4779
|
_getNodeRect(fNode) {
|
|
4772
|
-
return this._fMediator.
|
|
4780
|
+
return this._fMediator.execute(new GetNormalizedElementRectRequest(fNode.hostElement, false));
|
|
4773
4781
|
}
|
|
4774
|
-
|
|
4775
|
-
return this._fMediator.
|
|
4782
|
+
_getParentNodeRect(fNode) {
|
|
4783
|
+
return this._fMediator.execute(new GetNormalizedParentNodeRectRequest(fNode));
|
|
4776
4784
|
}
|
|
4777
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type:
|
|
4778
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type:
|
|
4785
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateNodeMoveRestrictionsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4786
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateNodeMoveRestrictionsExecution });
|
|
4779
4787
|
};
|
|
4780
|
-
|
|
4781
|
-
FExecutionRegister(
|
|
4782
|
-
],
|
|
4783
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type:
|
|
4788
|
+
CalculateNodeMoveRestrictionsExecution = __decorate([
|
|
4789
|
+
FExecutionRegister(CalculateNodeMoveRestrictionsRequest)
|
|
4790
|
+
], CalculateNodeMoveRestrictionsExecution);
|
|
4791
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateNodeMoveRestrictionsExecution, decorators: [{
|
|
4784
4792
|
type: Injectable
|
|
4785
4793
|
}] });
|
|
4786
4794
|
const DEFAULT_RESTRICTIONS = {
|
|
@@ -4796,32 +4804,27 @@ class CreateMoveNodesDragModelFromSelectionRequest {
|
|
|
4796
4804
|
}
|
|
4797
4805
|
|
|
4798
4806
|
class NodeDragHandler {
|
|
4799
|
-
|
|
4800
|
-
fComponentsStore;
|
|
4807
|
+
_fComponentsStore;
|
|
4801
4808
|
fNode;
|
|
4802
|
-
|
|
4803
|
-
maxDistance;
|
|
4809
|
+
restrictions;
|
|
4804
4810
|
_onPointerDownPosition = PointExtensions.initialize();
|
|
4805
|
-
constructor(
|
|
4806
|
-
this.
|
|
4807
|
-
this.fComponentsStore = fComponentsStore;
|
|
4811
|
+
constructor(_fComponentsStore, fNode, restrictions) {
|
|
4812
|
+
this._fComponentsStore = _fComponentsStore;
|
|
4808
4813
|
this.fNode = fNode;
|
|
4809
|
-
this.
|
|
4810
|
-
this.maxDistance = maxDistance;
|
|
4814
|
+
this.restrictions = restrictions;
|
|
4811
4815
|
this._onPointerDownPosition = { ...fNode.position };
|
|
4812
4816
|
}
|
|
4813
4817
|
onPointerMove(difference) {
|
|
4814
|
-
const restrictedDifference = this._getDifference(difference
|
|
4818
|
+
const restrictedDifference = this._getDifference(difference);
|
|
4815
4819
|
this._redraw(this._getPosition(restrictedDifference));
|
|
4816
|
-
this.fDraggableDataContext.fLineAlignment?.handle(restrictedDifference);
|
|
4817
4820
|
}
|
|
4818
4821
|
_getPosition(difference) {
|
|
4819
4822
|
return Point.fromPoint(this._onPointerDownPosition).add(difference);
|
|
4820
4823
|
}
|
|
4821
|
-
_getDifference(difference
|
|
4824
|
+
_getDifference(difference) {
|
|
4822
4825
|
return {
|
|
4823
|
-
x: Math.min(Math.max(difference.x, restrictions.min.x), restrictions.max.x),
|
|
4824
|
-
y: Math.min(Math.max(difference.y, restrictions.min.y), restrictions.max.y)
|
|
4826
|
+
x: Math.min(Math.max(difference.x, this.restrictions.min.x), this.restrictions.max.x),
|
|
4827
|
+
y: Math.min(Math.max(difference.y, this.restrictions.min.y), this.restrictions.max.y)
|
|
4825
4828
|
};
|
|
4826
4829
|
}
|
|
4827
4830
|
_redraw(position) {
|
|
@@ -4832,13 +4835,12 @@ class NodeDragHandler {
|
|
|
4832
4835
|
this.fNode.positionChange.emit(this.fNode.position);
|
|
4833
4836
|
}
|
|
4834
4837
|
getDifferenceWithCellSize(difference) {
|
|
4835
|
-
const
|
|
4836
|
-
const position = this._getPosition(restrictedDifference);
|
|
4838
|
+
const position = this._getPosition(this._getDifference(difference));
|
|
4837
4839
|
return Point.fromPoint(this._applyCellSize(position)).sub(this._onPointerDownPosition);
|
|
4838
4840
|
}
|
|
4839
4841
|
_applyCellSize(position) {
|
|
4840
|
-
const hCellSize = this.
|
|
4841
|
-
const vCellSize = this.
|
|
4842
|
+
const hCellSize = this._fComponentsStore.fDraggable.hCellSize;
|
|
4843
|
+
const vCellSize = this._fComponentsStore.fDraggable.vCellSize;
|
|
4842
4844
|
return {
|
|
4843
4845
|
x: Math.round(position.x / hCellSize) * hCellSize,
|
|
4844
4846
|
y: Math.round(position.y / vCellSize) * vCellSize
|
|
@@ -4866,10 +4868,10 @@ let CreateMoveNodesDragModelFromSelectionExecution = class CreateMoveNodesDragMo
|
|
|
4866
4868
|
_fComponentsStore = inject(FComponentsStore);
|
|
4867
4869
|
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
4868
4870
|
handle(request) {
|
|
4869
|
-
const
|
|
4870
|
-
return this.getDragHandlersWithConnections(this.getDragHandlersFromNodes(
|
|
4871
|
+
const fItemsToDrag = this._getNodesWithRestrictions(this._getDraggedNodes(request.nodeWithDisabledSelection));
|
|
4872
|
+
return this.getDragHandlersWithConnections(this.getDragHandlersFromNodes(fItemsToDrag), this.getAllOutputIds(fItemsToDrag), this.getAllInputIds(fItemsToDrag));
|
|
4871
4873
|
}
|
|
4872
|
-
|
|
4874
|
+
_getDraggedNodes(nodeWithDisabledSelection) {
|
|
4873
4875
|
const result = this._getNodesFromSelection();
|
|
4874
4876
|
if (nodeWithDisabledSelection) {
|
|
4875
4877
|
result.push(nodeWithDisabledSelection);
|
|
@@ -4882,32 +4884,46 @@ let CreateMoveNodesDragModelFromSelectionExecution = class CreateMoveNodesDragMo
|
|
|
4882
4884
|
.filter((x) => !!x);
|
|
4883
4885
|
}
|
|
4884
4886
|
_findNode(hostElement) {
|
|
4885
|
-
return this._fComponentsStore.fNodes
|
|
4887
|
+
return this._fComponentsStore.fNodes
|
|
4888
|
+
.find(n => n.isContains(hostElement));
|
|
4886
4889
|
}
|
|
4887
|
-
_getNodesWithRestrictions(
|
|
4890
|
+
_getNodesWithRestrictions(fDraggedNodes) {
|
|
4888
4891
|
const result = [];
|
|
4889
|
-
|
|
4890
|
-
const
|
|
4891
|
-
const restrictions = this.
|
|
4892
|
-
|
|
4893
|
-
result.push({ node: x, parentNodes, ...restrictions }, ...this.getChildrenItemsToDrag(x, restrictions));
|
|
4892
|
+
fDraggedNodes.forEach((x) => {
|
|
4893
|
+
const fParentNodes = this._fMediator.execute(new GetParentNodesRequest(x));
|
|
4894
|
+
const restrictions = this._getNodeMoveRestrictions(x, fParentNodes, fDraggedNodes);
|
|
4895
|
+
result.push({ fDraggedNode: x, fParentNodes, ...restrictions }, ...this._getChildrenItemsToDrag(x, restrictions));
|
|
4894
4896
|
});
|
|
4897
|
+
this._applyCommonRestrictions(result);
|
|
4895
4898
|
return result;
|
|
4896
4899
|
}
|
|
4897
|
-
|
|
4898
|
-
return this.
|
|
4900
|
+
_getNodeMoveRestrictions(fNode, fParentNodes, fDraggedNodes) {
|
|
4901
|
+
return this._fMediator.execute(new CalculateNodeMoveRestrictionsRequest(fNode, this._isParentNodeInArray(fParentNodes, fDraggedNodes)));
|
|
4899
4902
|
}
|
|
4900
|
-
|
|
4901
|
-
return this._fMediator.
|
|
4903
|
+
_isParentNodeInArray(fParentNodes, fDraggedNodes) {
|
|
4904
|
+
return this._fMediator.execute(new IsArrayHasParentNodeRequest(fParentNodes, fDraggedNodes));
|
|
4905
|
+
}
|
|
4906
|
+
_getChildrenItemsToDrag(node, restrictions) {
|
|
4907
|
+
return this._getChildrenNodes(node.fId).map((x) => ({ fDraggedNode: x, ...restrictions }));
|
|
4908
|
+
}
|
|
4909
|
+
_getChildrenNodes(fId) {
|
|
4910
|
+
return this._fMediator.execute(new GetDeepChildrenNodesAndGroupsRequest(fId));
|
|
4911
|
+
}
|
|
4912
|
+
_applyCommonRestrictions(restrictions) {
|
|
4913
|
+
const commonRestrictions = this._fMediator.execute(new CalculateCommonNodeMoveRestrictionsRequest(restrictions));
|
|
4914
|
+
restrictions.forEach((x) => {
|
|
4915
|
+
x.min = commonRestrictions.min;
|
|
4916
|
+
x.max = commonRestrictions.max;
|
|
4917
|
+
});
|
|
4902
4918
|
}
|
|
4903
4919
|
getAllOutputIds(items) {
|
|
4904
|
-
return flatMap(items, (item) => this.getOutputsForNode(item.
|
|
4920
|
+
return flatMap(items, (item) => this.getOutputsForNode(item.fDraggedNode).map((x) => x.fId));
|
|
4905
4921
|
}
|
|
4906
4922
|
getOutputsForNode(node) {
|
|
4907
4923
|
return this._fComponentsStore.fOutputs.filter((x) => node.isContains(x.hostElement));
|
|
4908
4924
|
}
|
|
4909
4925
|
getAllInputIds(items) {
|
|
4910
|
-
return flatMap(items, (item) => this.getInputsForNode(item.
|
|
4926
|
+
return flatMap(items, (item) => this.getInputsForNode(item.fDraggedNode).map((x) => x.fId));
|
|
4911
4927
|
}
|
|
4912
4928
|
getInputsForNode(node) {
|
|
4913
4929
|
return this._fComponentsStore.fInputs.filter((x) => node.isContains(x.hostElement));
|
|
@@ -4915,15 +4931,15 @@ let CreateMoveNodesDragModelFromSelectionExecution = class CreateMoveNodesDragMo
|
|
|
4915
4931
|
getDragHandlersFromNodes(items) {
|
|
4916
4932
|
let result = [];
|
|
4917
4933
|
items.forEach((node) => {
|
|
4918
|
-
result.push(new NodeDragHandler(this.
|
|
4934
|
+
result.push(new NodeDragHandler(this._fComponentsStore, node.fDraggedNode, { min: node.min, max: node.max }), ...(node.fParentNodes || []).map(() => new NodeResizeByChildDragHandler(this._fDraggableDataContext)));
|
|
4919
4935
|
});
|
|
4920
4936
|
return result;
|
|
4921
4937
|
}
|
|
4922
4938
|
getDragHandlersWithConnections(handlers, outputIds, inputIds) {
|
|
4923
4939
|
let result = handlers;
|
|
4924
|
-
handlers.filter((x) => x instanceof NodeDragHandler).forEach((
|
|
4925
|
-
this._fMediator.
|
|
4926
|
-
this._fMediator.
|
|
4940
|
+
handlers.filter((x) => x instanceof NodeDragHandler).forEach((x) => {
|
|
4941
|
+
this._fMediator.execute(new PutOutputConnectionHandlersToArrayRequest(x, inputIds, result));
|
|
4942
|
+
this._fMediator.execute(new PutInputConnectionHandlersToArrayRequest(x, outputIds, result));
|
|
4927
4943
|
});
|
|
4928
4944
|
return result;
|
|
4929
4945
|
}
|
|
@@ -4938,125 +4954,345 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
|
|
|
4938
4954
|
}] });
|
|
4939
4955
|
|
|
4940
4956
|
const CREATE_MOVE_NODE_DRAG_MODEL_FROM_SELECTION_PROVIDERS = [
|
|
4941
|
-
|
|
4957
|
+
CalculateCommonNodeMoveRestrictionsExecution,
|
|
4958
|
+
CalculateNodeMoveRestrictionsExecution,
|
|
4942
4959
|
PutInputConnectionHandlersToArrayExecution,
|
|
4943
4960
|
PutOutputConnectionHandlersToArrayExecution,
|
|
4944
4961
|
CreateMoveNodesDragModelFromSelectionExecution,
|
|
4945
4962
|
];
|
|
4946
4963
|
|
|
4947
|
-
class
|
|
4948
|
-
event;
|
|
4949
|
-
constructor(event) {
|
|
4950
|
-
this.event = event;
|
|
4951
|
-
}
|
|
4964
|
+
class LineAlignmentPreparationRequest {
|
|
4952
4965
|
}
|
|
4953
4966
|
|
|
4954
|
-
class
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
}
|
|
4962
|
-
_onPointerDownPosition = PointExtensions.initialize();
|
|
4967
|
+
class LineAlignmentDragHandler {
|
|
4968
|
+
_fComponentsStore;
|
|
4969
|
+
_lineService;
|
|
4970
|
+
_size;
|
|
4971
|
+
_draggedNodeRect;
|
|
4972
|
+
_rects;
|
|
4973
|
+
_restrictions;
|
|
4963
4974
|
_debounceTimer = null;
|
|
4964
|
-
|
|
4965
|
-
constructor(
|
|
4966
|
-
this.
|
|
4967
|
-
this.
|
|
4968
|
-
this.
|
|
4969
|
-
this.
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
if (isInclude) {
|
|
4974
|
-
this._markIncludeNode(isInclude);
|
|
4975
|
-
}
|
|
4976
|
-
else {
|
|
4977
|
-
this._unmarkIncludeNode();
|
|
4978
|
-
}
|
|
4979
|
-
}
|
|
4980
|
-
_getNewPosition(difference) {
|
|
4981
|
-
return Point.fromPoint(this._onPointerDownPosition).add(difference).mult(this._transform.scale);
|
|
4982
|
-
}
|
|
4983
|
-
_isNodeInsideAnotherNode(point) {
|
|
4984
|
-
return this.notDraggedNodesRects.find((x) => RectExtensions.isIncludePoint(x.rect, point));
|
|
4975
|
+
_transform;
|
|
4976
|
+
constructor(_fComponentsStore, _lineService, _size, _draggedNodeRect, _rects, _restrictions) {
|
|
4977
|
+
this._fComponentsStore = _fComponentsStore;
|
|
4978
|
+
this._lineService = _lineService;
|
|
4979
|
+
this._size = _size;
|
|
4980
|
+
this._draggedNodeRect = _draggedNodeRect;
|
|
4981
|
+
this._rects = _rects;
|
|
4982
|
+
this._restrictions = _restrictions;
|
|
4983
|
+
this._transform = this._fComponentsStore.fCanvas?.transform;
|
|
4985
4984
|
}
|
|
4986
4985
|
onPointerMove(difference) {
|
|
4986
|
+
const restrictedDifference = this._getDifference(difference);
|
|
4987
4987
|
if (this._debounceTimer) {
|
|
4988
4988
|
clearTimeout(this._debounceTimer);
|
|
4989
4989
|
}
|
|
4990
|
-
this._debounceTimer = setTimeout(() => this.
|
|
4990
|
+
this._debounceTimer = setTimeout(() => this._drawIntersectingLines(restrictedDifference), 15);
|
|
4991
4991
|
}
|
|
4992
|
-
|
|
4993
|
-
this.
|
|
4994
|
-
|
|
4995
|
-
|
|
4992
|
+
_drawIntersectingLines(difference) {
|
|
4993
|
+
const intersect = this.findNearestCoordinate(difference);
|
|
4994
|
+
if (intersect.xResult.value !== undefined) {
|
|
4995
|
+
this._lineService.drawVerticalLine(intersect.xResult.value, this._size, this._transform);
|
|
4996
|
+
}
|
|
4997
|
+
else {
|
|
4998
|
+
this._lineService.hideVerticalLine();
|
|
4999
|
+
}
|
|
5000
|
+
if (intersect.yResult.value !== undefined) {
|
|
5001
|
+
this._lineService.drawHorizontalLine(intersect.yResult.value, this._size, this._transform);
|
|
5002
|
+
}
|
|
5003
|
+
else {
|
|
5004
|
+
this._lineService.hideHorizontalLine();
|
|
5005
|
+
}
|
|
4996
5006
|
}
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5007
|
+
_getDifference(difference) {
|
|
5008
|
+
return {
|
|
5009
|
+
x: Math.min(Math.max(difference.x, this._restrictions.min.x), this._restrictions.max.x),
|
|
5010
|
+
y: Math.min(Math.max(difference.y, this._restrictions.min.y), this._restrictions.max.y)
|
|
5011
|
+
};
|
|
5012
|
+
}
|
|
5013
|
+
findNearestCoordinate(difference) {
|
|
5014
|
+
const rect = RectExtensions.addPoint(this._draggedNodeRect, difference);
|
|
5015
|
+
return findClosestAlignment(this._rects, rect, this._fComponentsStore.fLineAlignment.fAlignThreshold);
|
|
5000
5016
|
}
|
|
5001
5017
|
onPointerUp() {
|
|
5002
|
-
this.
|
|
5018
|
+
this._lineService.hideVerticalLine();
|
|
5019
|
+
this._lineService.hideHorizontalLine();
|
|
5003
5020
|
if (this._debounceTimer) {
|
|
5004
5021
|
clearTimeout(this._debounceTimer);
|
|
5005
5022
|
this._debounceTimer = null;
|
|
5006
5023
|
}
|
|
5007
5024
|
}
|
|
5008
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeDragToParentDragHandler, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
5009
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: NodeDragToParentDragHandler, ngImport: i0 });
|
|
5010
|
-
}
|
|
5011
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeDragToParentDragHandler, decorators: [{
|
|
5012
|
-
type: Directive
|
|
5013
|
-
}], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: undefined }] });
|
|
5014
|
-
|
|
5015
|
-
class FDropToGroupEvent {
|
|
5016
|
-
fTargetNode;
|
|
5017
|
-
fNodes;
|
|
5018
|
-
fDropPosition;
|
|
5019
|
-
constructor(fTargetNode, fNodes, fDropPosition) {
|
|
5020
|
-
this.fTargetNode = fTargetNode;
|
|
5021
|
-
this.fNodes = fNodes;
|
|
5022
|
-
this.fDropPosition = fDropPosition;
|
|
5023
|
-
}
|
|
5024
5025
|
}
|
|
5025
5026
|
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
constructor(
|
|
5030
|
-
this.
|
|
5031
|
-
this.
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
if (!this._isValid()) {
|
|
5035
|
-
return;
|
|
5036
|
-
}
|
|
5037
|
-
const item = this.getDragHandleItem();
|
|
5038
|
-
if (item.fNodeWithRect) {
|
|
5039
|
-
this.emitDroppedChildrenEvent(item.fNodeWithRect.node.fId, request.event);
|
|
5040
|
-
}
|
|
5041
|
-
item.onPointerUp?.();
|
|
5027
|
+
class LineElement {
|
|
5028
|
+
hostElement;
|
|
5029
|
+
element;
|
|
5030
|
+
constructor(fBrowser, hostElement) {
|
|
5031
|
+
this.hostElement = hostElement;
|
|
5032
|
+
this.element = fBrowser.document.createElement('div');
|
|
5033
|
+
this.hostElement.appendChild(this.element);
|
|
5034
|
+
this.element.classList.add('f-line');
|
|
5042
5035
|
}
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
.some((x) => x instanceof NodeDragToParentDragHandler);
|
|
5036
|
+
hide() {
|
|
5037
|
+
this.element.style.display = 'none';
|
|
5046
5038
|
}
|
|
5047
|
-
|
|
5048
|
-
this.
|
|
5039
|
+
show() {
|
|
5040
|
+
this.element.style.display = 'block';
|
|
5049
5041
|
}
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5042
|
+
draw(object) {
|
|
5043
|
+
this.element.style.position = 'absolute';
|
|
5044
|
+
Object.keys(object).forEach((key) => {
|
|
5045
|
+
// @ts-ignore
|
|
5046
|
+
this.element.style[key] = object[key] + 'px';
|
|
5047
|
+
});
|
|
5056
5048
|
}
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5049
|
+
}
|
|
5050
|
+
|
|
5051
|
+
class LineService {
|
|
5052
|
+
hostElement;
|
|
5053
|
+
fHorizontalLine;
|
|
5054
|
+
fVerticalLine;
|
|
5055
|
+
constructor(fBrowser, hostElement) {
|
|
5056
|
+
this.hostElement = hostElement;
|
|
5057
|
+
this.fHorizontalLine = new LineElement(fBrowser, this.hostElement);
|
|
5058
|
+
this.fVerticalLine = new LineElement(fBrowser, this.hostElement);
|
|
5059
|
+
this.fHorizontalLine.hide();
|
|
5060
|
+
this.fVerticalLine.hide();
|
|
5061
|
+
}
|
|
5062
|
+
drawVerticalLine(x, size, transform) {
|
|
5063
|
+
this.fVerticalLine.show();
|
|
5064
|
+
this.fVerticalLine.draw({
|
|
5065
|
+
left: x * transform.scale + transform.position.x + transform.scaledPosition.x,
|
|
5066
|
+
top: 0,
|
|
5067
|
+
width: 1,
|
|
5068
|
+
height: size.height
|
|
5069
|
+
});
|
|
5070
|
+
}
|
|
5071
|
+
drawHorizontalLine(y, size, transform) {
|
|
5072
|
+
this.fHorizontalLine.show();
|
|
5073
|
+
this.fHorizontalLine.draw({
|
|
5074
|
+
left: 0,
|
|
5075
|
+
top: y * transform.scale + transform.position.y + transform.scaledPosition.y,
|
|
5076
|
+
width: size.width,
|
|
5077
|
+
height: 1
|
|
5078
|
+
});
|
|
5079
|
+
}
|
|
5080
|
+
hideVerticalLine() {
|
|
5081
|
+
this.fVerticalLine.hide();
|
|
5082
|
+
}
|
|
5083
|
+
hideHorizontalLine() {
|
|
5084
|
+
this.fHorizontalLine.hide();
|
|
5085
|
+
}
|
|
5086
|
+
}
|
|
5087
|
+
|
|
5088
|
+
const F_LINE_ALIGNMENT = new InjectionToken('F_LINE_ALIGNMENT');
|
|
5089
|
+
class FLineAlignmentBase {
|
|
5090
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FLineAlignmentBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5091
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: FLineAlignmentBase, ngImport: i0 });
|
|
5092
|
+
}
|
|
5093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FLineAlignmentBase, decorators: [{
|
|
5094
|
+
type: Directive
|
|
5095
|
+
}] });
|
|
5096
|
+
|
|
5097
|
+
class FLineAlignmentComponent extends FLineAlignmentBase {
|
|
5098
|
+
fAlignThreshold = 10;
|
|
5099
|
+
_fMediator = inject(FMediator);
|
|
5100
|
+
_elementReference = inject(ElementRef);
|
|
5101
|
+
get hostElement() {
|
|
5102
|
+
return this._elementReference.nativeElement;
|
|
5103
|
+
}
|
|
5104
|
+
ngOnInit() {
|
|
5105
|
+
this._fMediator.execute(new AddLineAlignmentToStoreRequest(this));
|
|
5106
|
+
}
|
|
5107
|
+
ngOnDestroy() {
|
|
5108
|
+
this._fMediator.execute(new RemoveLineAlignmentFromStoreRequest());
|
|
5109
|
+
}
|
|
5110
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FLineAlignmentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
5111
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.4", type: FLineAlignmentComponent, selector: "f-line-alignment", inputs: { fAlignThreshold: "fAlignThreshold" }, host: { classAttribute: "f-line-alignment f-component" }, providers: [
|
|
5112
|
+
{ provide: F_LINE_ALIGNMENT, useExisting: FLineAlignmentComponent }
|
|
5113
|
+
], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0, template: "", isInline: true, styles: [":host{display:block;position:absolute;left:0;top:0;width:100%;height:100%;overflow:hidden;pointer-events:none;-webkit-user-select:none;user-select:none}\n"] });
|
|
5114
|
+
}
|
|
5115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FLineAlignmentComponent, decorators: [{
|
|
5116
|
+
type: Component,
|
|
5117
|
+
args: [{ selector: "f-line-alignment", template: "", exportAs: "fComponent", host: {
|
|
5118
|
+
'class': 'f-line-alignment f-component'
|
|
5119
|
+
}, providers: [
|
|
5120
|
+
{ provide: F_LINE_ALIGNMENT, useExisting: FLineAlignmentComponent }
|
|
5121
|
+
], styles: [":host{display:block;position:absolute;left:0;top:0;width:100%;height:100%;overflow:hidden;pointer-events:none;-webkit-user-select:none;user-select:none}\n"] }]
|
|
5122
|
+
}], propDecorators: { fAlignThreshold: [{
|
|
5123
|
+
type: Input
|
|
5124
|
+
}] } });
|
|
5125
|
+
|
|
5126
|
+
const F_LINE_ALIGNMENT_PROVIDERS = [
|
|
5127
|
+
FLineAlignmentComponent
|
|
5128
|
+
];
|
|
5129
|
+
|
|
5130
|
+
let LineAlignmentPreparationExecution = class LineAlignmentPreparationExecution {
|
|
5131
|
+
_fMediator = inject(FMediator);
|
|
5132
|
+
_fComponentsStore = inject(FComponentsStore);
|
|
5133
|
+
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
5134
|
+
_fBrowser = inject(BrowserService);
|
|
5135
|
+
_lineService;
|
|
5136
|
+
handle(request) {
|
|
5137
|
+
this._addLineAlignmentDragHandler(this._getDraggedNodes());
|
|
5138
|
+
}
|
|
5139
|
+
_getDraggedNodes() {
|
|
5140
|
+
return this._fDraggableDataContext.draggableItems
|
|
5141
|
+
.filter((x) => x instanceof NodeDragHandler)
|
|
5142
|
+
.map((x) => x.fNode);
|
|
5143
|
+
}
|
|
5144
|
+
_addLineAlignmentDragHandler(fNodes) {
|
|
5145
|
+
this._fDraggableDataContext.draggableItems.push(new LineAlignmentDragHandler(this._fComponentsStore, this._lineService || this._createLineService(), this._getFlowHostSize(), this._getDraggedNodesBoundingRect(fNodes), this._getStaticNodeRects(fNodes), this._getCommonRestrictions()));
|
|
5146
|
+
}
|
|
5147
|
+
_getFlowHostSize() {
|
|
5148
|
+
return this._fMediator.send(new GetFlowHostElementRequest())
|
|
5149
|
+
.getBoundingClientRect();
|
|
5150
|
+
}
|
|
5151
|
+
_createLineService() {
|
|
5152
|
+
this._lineService = new LineService(this._fBrowser, this._fComponentsStore.fLineAlignment.hostElement);
|
|
5153
|
+
return this._lineService;
|
|
5154
|
+
}
|
|
5155
|
+
_getDraggedNodesBoundingRect(fNodes) {
|
|
5156
|
+
return RectExtensions.union(fNodes.map((x) => {
|
|
5157
|
+
return this._fMediator.execute(new GetNormalizedElementRectRequest(x.hostElement, false));
|
|
5158
|
+
})) || RectExtensions.initialize();
|
|
5159
|
+
}
|
|
5160
|
+
_getStaticNodeRects(fNodes) {
|
|
5161
|
+
return this._getStaticNodes(fNodes).map((x) => {
|
|
5162
|
+
return this._fMediator.execute(new GetNormalizedElementRectRequest(x.hostElement, false));
|
|
5163
|
+
});
|
|
5164
|
+
}
|
|
5165
|
+
_getStaticNodes(fNodes) {
|
|
5166
|
+
return this._fComponentsStore.fNodes
|
|
5167
|
+
.filter((x) => !fNodes.includes(x));
|
|
5168
|
+
}
|
|
5169
|
+
_getCommonRestrictions() {
|
|
5170
|
+
return this._fDraggableDataContext.draggableItems
|
|
5171
|
+
.filter((x) => x instanceof NodeDragHandler)[0].restrictions;
|
|
5172
|
+
}
|
|
5173
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: LineAlignmentPreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5174
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: LineAlignmentPreparationExecution });
|
|
5175
|
+
};
|
|
5176
|
+
LineAlignmentPreparationExecution = __decorate([
|
|
5177
|
+
FExecutionRegister(LineAlignmentPreparationRequest)
|
|
5178
|
+
], LineAlignmentPreparationExecution);
|
|
5179
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: LineAlignmentPreparationExecution, decorators: [{
|
|
5180
|
+
type: Injectable
|
|
5181
|
+
}] });
|
|
5182
|
+
|
|
5183
|
+
class NodeDragToParentFinalizeRequest {
|
|
5184
|
+
event;
|
|
5185
|
+
constructor(event) {
|
|
5186
|
+
this.event = event;
|
|
5187
|
+
}
|
|
5188
|
+
}
|
|
5189
|
+
|
|
5190
|
+
class NodeDragToParentDragHandler {
|
|
5191
|
+
fComponentsStore;
|
|
5192
|
+
fDraggableDataContext;
|
|
5193
|
+
notDraggedNodesRects;
|
|
5194
|
+
DEBOUNCE_TIME = 15;
|
|
5195
|
+
get _transform() {
|
|
5196
|
+
return this.fComponentsStore.fCanvas.transform;
|
|
5197
|
+
}
|
|
5198
|
+
_onPointerDownPosition = PointExtensions.initialize();
|
|
5199
|
+
_debounceTimer = null;
|
|
5200
|
+
fNodeWithRect = null;
|
|
5201
|
+
constructor(fComponentsStore, fDraggableDataContext, notDraggedNodesRects) {
|
|
5202
|
+
this.fComponentsStore = fComponentsStore;
|
|
5203
|
+
this.fDraggableDataContext = fDraggableDataContext;
|
|
5204
|
+
this.notDraggedNodesRects = notDraggedNodesRects;
|
|
5205
|
+
this._onPointerDownPosition = this.fDraggableDataContext.onPointerDownPosition;
|
|
5206
|
+
}
|
|
5207
|
+
_toggleParentNode(difference) {
|
|
5208
|
+
const isInclude = this._isNodeInsideAnotherNode(this._getNewPosition(difference));
|
|
5209
|
+
if (isInclude) {
|
|
5210
|
+
this._markIncludeNode(isInclude);
|
|
5211
|
+
}
|
|
5212
|
+
else {
|
|
5213
|
+
this._unmarkIncludeNode();
|
|
5214
|
+
}
|
|
5215
|
+
}
|
|
5216
|
+
_getNewPosition(difference) {
|
|
5217
|
+
return Point.fromPoint(this._onPointerDownPosition).add(difference).mult(this._transform.scale);
|
|
5218
|
+
}
|
|
5219
|
+
_isNodeInsideAnotherNode(point) {
|
|
5220
|
+
return this.notDraggedNodesRects.find((x) => RectExtensions.isIncludePoint(x.rect, point));
|
|
5221
|
+
}
|
|
5222
|
+
onPointerMove(difference) {
|
|
5223
|
+
if (this._debounceTimer) {
|
|
5224
|
+
clearTimeout(this._debounceTimer);
|
|
5225
|
+
}
|
|
5226
|
+
this._debounceTimer = setTimeout(() => this._toggleParentNode(difference), this.DEBOUNCE_TIME);
|
|
5227
|
+
}
|
|
5228
|
+
_markIncludeNode(nodeWithRect) {
|
|
5229
|
+
this._unmarkIncludeNode();
|
|
5230
|
+
this.fNodeWithRect = nodeWithRect;
|
|
5231
|
+
nodeWithRect.node.setClass('f-parent-for-drop');
|
|
5232
|
+
}
|
|
5233
|
+
_unmarkIncludeNode() {
|
|
5234
|
+
this.fNodeWithRect?.node.removeClass('f-parent-for-drop');
|
|
5235
|
+
this.fNodeWithRect = null;
|
|
5236
|
+
}
|
|
5237
|
+
onPointerUp() {
|
|
5238
|
+
this._unmarkIncludeNode();
|
|
5239
|
+
if (this._debounceTimer) {
|
|
5240
|
+
clearTimeout(this._debounceTimer);
|
|
5241
|
+
this._debounceTimer = null;
|
|
5242
|
+
}
|
|
5243
|
+
}
|
|
5244
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeDragToParentDragHandler, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
5245
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: NodeDragToParentDragHandler, ngImport: i0 });
|
|
5246
|
+
}
|
|
5247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeDragToParentDragHandler, decorators: [{
|
|
5248
|
+
type: Directive
|
|
5249
|
+
}], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: undefined }] });
|
|
5250
|
+
|
|
5251
|
+
class FDropToGroupEvent {
|
|
5252
|
+
fTargetNode;
|
|
5253
|
+
fNodes;
|
|
5254
|
+
fDropPosition;
|
|
5255
|
+
constructor(fTargetNode, fNodes, fDropPosition) {
|
|
5256
|
+
this.fTargetNode = fTargetNode;
|
|
5257
|
+
this.fNodes = fNodes;
|
|
5258
|
+
this.fDropPosition = fDropPosition;
|
|
5259
|
+
}
|
|
5260
|
+
}
|
|
5261
|
+
|
|
5262
|
+
let NodeDragToParentFinalizeExecution = class NodeDragToParentFinalizeExecution {
|
|
5263
|
+
fComponentsStore;
|
|
5264
|
+
fDraggableDataContext;
|
|
5265
|
+
constructor(fComponentsStore, fDraggableDataContext) {
|
|
5266
|
+
this.fComponentsStore = fComponentsStore;
|
|
5267
|
+
this.fDraggableDataContext = fDraggableDataContext;
|
|
5268
|
+
}
|
|
5269
|
+
handle(request) {
|
|
5270
|
+
if (!this._isValid()) {
|
|
5271
|
+
return;
|
|
5272
|
+
}
|
|
5273
|
+
const item = this.getDragHandleItem();
|
|
5274
|
+
if (item.fNodeWithRect) {
|
|
5275
|
+
this.emitDroppedChildrenEvent(item.fNodeWithRect.node.fId, request.event);
|
|
5276
|
+
}
|
|
5277
|
+
item.onPointerUp?.();
|
|
5278
|
+
}
|
|
5279
|
+
_isValid() {
|
|
5280
|
+
return this.fDraggableDataContext.draggableItems
|
|
5281
|
+
.some((x) => x instanceof NodeDragToParentDragHandler);
|
|
5282
|
+
}
|
|
5283
|
+
emitDroppedChildrenEvent(fTargetId, event) {
|
|
5284
|
+
this.fComponentsStore.fDraggable?.fDropToGroup.emit(new FDropToGroupEvent(fTargetId, this.getDraggedNodeIds(), event.getPosition()));
|
|
5285
|
+
}
|
|
5286
|
+
getDragHandleItem() {
|
|
5287
|
+
const result = this.findDragHandleItem();
|
|
5288
|
+
if (!result) {
|
|
5289
|
+
throw new Error('NodeDragToParentDragHandler not found');
|
|
5290
|
+
}
|
|
5291
|
+
return result;
|
|
5292
|
+
}
|
|
5293
|
+
findDragHandleItem() {
|
|
5294
|
+
return this.fDraggableDataContext.draggableItems
|
|
5295
|
+
.find((x) => x instanceof NodeDragToParentDragHandler);
|
|
5060
5296
|
}
|
|
5061
5297
|
getDraggedNodeIds() {
|
|
5062
5298
|
return this.fDraggableDataContext.draggableItems
|
|
@@ -5184,27 +5420,38 @@ let NodeMovePreparationExecution = class NodeMovePreparationExecution {
|
|
|
5184
5420
|
get _fHost() {
|
|
5185
5421
|
return this._fComponentsStore.fFlow.hostElement;
|
|
5186
5422
|
}
|
|
5423
|
+
_fNode;
|
|
5187
5424
|
handle(request) {
|
|
5188
|
-
|
|
5189
|
-
|
|
5425
|
+
if (!this._isValid(request)) {
|
|
5426
|
+
return;
|
|
5427
|
+
}
|
|
5190
5428
|
this._fDraggableDataContext.onPointerDownScale = this._transform.scale;
|
|
5191
5429
|
this._fDraggableDataContext.onPointerDownPosition = Point.fromPoint(request.event.getPosition())
|
|
5192
5430
|
.elementTransform(this._fHost).div(this._transform.scale);
|
|
5193
|
-
this._fDraggableDataContext.draggableItems =
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
const result = this._fComponentsStore.fNodes.find(n => n.isContains(targetElement));
|
|
5197
|
-
if (!result) {
|
|
5198
|
-
throw new Error('Node not found');
|
|
5431
|
+
this._fDraggableDataContext.draggableItems = this._calculateDraggedItems(this._fNode);
|
|
5432
|
+
if (this._fComponentsStore.fLineAlignment) {
|
|
5433
|
+
this._fMediator.execute(new LineAlignmentPreparationRequest());
|
|
5199
5434
|
}
|
|
5200
|
-
|
|
5435
|
+
}
|
|
5436
|
+
_isValid(request) {
|
|
5437
|
+
return this._fDraggableDataContext.isEmpty()
|
|
5438
|
+
&& this._isDragHandleElement(request.event.targetElement)
|
|
5439
|
+
&& !!this._getNode(request.event.targetElement);
|
|
5440
|
+
}
|
|
5441
|
+
_isDragHandleElement(element) {
|
|
5442
|
+
return isClosestElementHasClass(element, '.f-drag-handle');
|
|
5443
|
+
}
|
|
5444
|
+
_getNode(element) {
|
|
5445
|
+
this._fNode = this._fComponentsStore.fNodes
|
|
5446
|
+
.find(x => x.isContains(element) && !x.fDraggingDisabled);
|
|
5447
|
+
return this._fNode;
|
|
5201
5448
|
}
|
|
5202
5449
|
//We drag nodes from selection model
|
|
5203
|
-
|
|
5450
|
+
_calculateDraggedItems(fNode) {
|
|
5204
5451
|
let result = [];
|
|
5205
5452
|
if (!fNode.fSelectionDisabled) {
|
|
5206
5453
|
// Need to select node before drag
|
|
5207
|
-
this._fMediator.
|
|
5454
|
+
this._fMediator.execute(new SelectAndUpdateNodeLayerRequest(fNode));
|
|
5208
5455
|
result = this._dragModelFromSelection();
|
|
5209
5456
|
}
|
|
5210
5457
|
else {
|
|
@@ -5214,14 +5461,7 @@ let NodeMovePreparationExecution = class NodeMovePreparationExecution {
|
|
|
5214
5461
|
return result;
|
|
5215
5462
|
}
|
|
5216
5463
|
_dragModelFromSelection(nodeWithDisabledSelection) {
|
|
5217
|
-
return this._fMediator.
|
|
5218
|
-
}
|
|
5219
|
-
_initializeLineAlignment(itemsToDrag) {
|
|
5220
|
-
this._fDraggableDataContext.fLineAlignment?.initialize(this._fComponentsStore.fNodes, this._filterNodesFromDraggableItems(itemsToDrag));
|
|
5221
|
-
}
|
|
5222
|
-
_filterNodesFromDraggableItems(items) {
|
|
5223
|
-
return items.filter((x) => x instanceof NodeDragHandler)
|
|
5224
|
-
.map(x => x.fNode);
|
|
5464
|
+
return this._fMediator.execute(new CreateMoveNodesDragModelFromSelectionRequest(nodeWithDisabledSelection));
|
|
5225
5465
|
}
|
|
5226
5466
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeMovePreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5227
5467
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeMovePreparationExecution });
|
|
@@ -5233,39 +5473,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
|
|
|
5233
5473
|
type: Injectable
|
|
5234
5474
|
}] });
|
|
5235
5475
|
|
|
5236
|
-
let NodeMovePreparationValidator = class NodeMovePreparationValidator {
|
|
5237
|
-
_fComponentsStore = inject(FComponentsStore);
|
|
5238
|
-
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
5239
|
-
handle(request) {
|
|
5240
|
-
return this._isDragHandlesEmpty()
|
|
5241
|
-
&& this._isDragHandleElement(request.event.targetElement)
|
|
5242
|
-
&& this._isNodeCanBeDragged(this._getNode(request.event.targetElement));
|
|
5243
|
-
}
|
|
5244
|
-
_isDragHandlesEmpty() {
|
|
5245
|
-
return !this._fDraggableDataContext.draggableItems.length;
|
|
5246
|
-
}
|
|
5247
|
-
_isDragHandleElement(element) {
|
|
5248
|
-
return isClosestElementHasClass(element, '.f-drag-handle');
|
|
5249
|
-
}
|
|
5250
|
-
_isNodeCanBeDragged(fNode) {
|
|
5251
|
-
return !!fNode && !fNode.fDraggingDisabled;
|
|
5252
|
-
}
|
|
5253
|
-
_getNode(element) {
|
|
5254
|
-
return this._fComponentsStore.fNodes.find(x => x.isContains(element));
|
|
5255
|
-
}
|
|
5256
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeMovePreparationValidator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5257
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeMovePreparationValidator });
|
|
5258
|
-
};
|
|
5259
|
-
NodeMovePreparationValidator = __decorate([
|
|
5260
|
-
FValidatorRegister(NodeMovePreparationRequest)
|
|
5261
|
-
], NodeMovePreparationValidator);
|
|
5262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeMovePreparationValidator, decorators: [{
|
|
5263
|
-
type: Injectable
|
|
5264
|
-
}] });
|
|
5265
|
-
|
|
5266
5476
|
const NODE_MOVE_PREPARATION_PROVIDERS = [
|
|
5267
5477
|
NodeMovePreparationExecution,
|
|
5268
|
-
NodeMovePreparationValidator,
|
|
5269
5478
|
];
|
|
5270
5479
|
|
|
5271
5480
|
class NodeMoveFinalizeRequest {
|
|
@@ -5291,7 +5500,6 @@ let NodeMoveFinalizeExecution = class NodeMoveFinalizeExecution {
|
|
|
5291
5500
|
.find((x) => x instanceof NodeDragHandler);
|
|
5292
5501
|
const differenceWithCellSize = firstNodeOrGroup.getDifferenceWithCellSize(difference);
|
|
5293
5502
|
this._finalizeMove(differenceWithCellSize);
|
|
5294
|
-
this._fDraggableDataContext.fLineAlignment?.complete();
|
|
5295
5503
|
this._applyConnectionUnderDroppedNode();
|
|
5296
5504
|
}
|
|
5297
5505
|
_isValid() {
|
|
@@ -5316,7 +5524,9 @@ let NodeMoveFinalizeExecution = class NodeMoveFinalizeExecution {
|
|
|
5316
5524
|
return this._applyLineAlignmentDifference(difference, this._getLineAlignmentDifference(difference));
|
|
5317
5525
|
}
|
|
5318
5526
|
_getLineAlignmentDifference(difference) {
|
|
5319
|
-
return this._fDraggableDataContext.
|
|
5527
|
+
return this._fDraggableDataContext.draggableItems
|
|
5528
|
+
.find((x) => x instanceof LineAlignmentDragHandler)
|
|
5529
|
+
?.findNearestCoordinate(difference);
|
|
5320
5530
|
}
|
|
5321
5531
|
_applyLineAlignmentDifference(difference, intersection) {
|
|
5322
5532
|
if (intersection) {
|
|
@@ -5344,6 +5554,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
|
|
|
5344
5554
|
|
|
5345
5555
|
const NODE_PROVIDERS = [
|
|
5346
5556
|
...CREATE_MOVE_NODE_DRAG_MODEL_FROM_SELECTION_PROVIDERS,
|
|
5557
|
+
LineAlignmentPreparationExecution,
|
|
5347
5558
|
NodeMoveFinalizeExecution,
|
|
5348
5559
|
...NODE_MOVE_PREPARATION_PROVIDERS,
|
|
5349
5560
|
...NODE_DRAG_TO_PARENT_PREPARATION_PROVIDERS,
|
|
@@ -7638,23 +7849,21 @@ class GetFlowStateConnectionsRequest {
|
|
|
7638
7849
|
}
|
|
7639
7850
|
|
|
7640
7851
|
let GetFlowStateConnectionsExecution = class GetFlowStateConnectionsExecution {
|
|
7641
|
-
|
|
7642
|
-
constructor(fComponentsStore) {
|
|
7643
|
-
this.fComponentsStore = fComponentsStore;
|
|
7644
|
-
}
|
|
7852
|
+
_fComponentsStore = inject(FComponentsStore);
|
|
7645
7853
|
handle(request) {
|
|
7646
|
-
return this.
|
|
7647
|
-
return {
|
|
7648
|
-
id: x.fId,
|
|
7649
|
-
fOutputId: x.fOutputId,
|
|
7650
|
-
fInputId: x.fInputId,
|
|
7651
|
-
fType: x.fType,
|
|
7652
|
-
fBehavior: x.fBehavior,
|
|
7653
|
-
isSelected: x.isSelected()
|
|
7654
|
-
};
|
|
7655
|
-
});
|
|
7854
|
+
return this._fComponentsStore.fConnections.map(this._mapToConnectionState);
|
|
7656
7855
|
}
|
|
7657
|
-
|
|
7856
|
+
_mapToConnectionState(x) {
|
|
7857
|
+
return {
|
|
7858
|
+
id: x.fId,
|
|
7859
|
+
fOutputId: x.fOutputId,
|
|
7860
|
+
fInputId: x.fInputId,
|
|
7861
|
+
fType: x.fType,
|
|
7862
|
+
fBehavior: x.fBehavior,
|
|
7863
|
+
isSelected: x.isSelected()
|
|
7864
|
+
};
|
|
7865
|
+
}
|
|
7866
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetFlowStateConnectionsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7658
7867
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetFlowStateConnectionsExecution });
|
|
7659
7868
|
};
|
|
7660
7869
|
GetFlowStateConnectionsExecution = __decorate([
|
|
@@ -7662,7 +7871,7 @@ GetFlowStateConnectionsExecution = __decorate([
|
|
|
7662
7871
|
], GetFlowStateConnectionsExecution);
|
|
7663
7872
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetFlowStateConnectionsExecution, decorators: [{
|
|
7664
7873
|
type: Injectable
|
|
7665
|
-
}]
|
|
7874
|
+
}] });
|
|
7666
7875
|
|
|
7667
7876
|
class GetFlowStateNodesRequest {
|
|
7668
7877
|
type;
|
|
@@ -7683,13 +7892,13 @@ let GetFlowStateNodesExecution = class GetFlowStateNodesExecution {
|
|
|
7683
7892
|
parent: x.fParentId,
|
|
7684
7893
|
position: x.position,
|
|
7685
7894
|
size: x.size,
|
|
7686
|
-
fOutputs: this.
|
|
7687
|
-
fInputs: this.
|
|
7895
|
+
fOutputs: this._getOutputs(x.hostElement),
|
|
7896
|
+
fInputs: this._getInputs(x.hostElement),
|
|
7688
7897
|
isSelected: x.isSelected()
|
|
7689
7898
|
};
|
|
7690
7899
|
});
|
|
7691
7900
|
}
|
|
7692
|
-
|
|
7901
|
+
_getOutputs(hostElement) {
|
|
7693
7902
|
return this.fComponentsStore.fOutputs.filter((x) => hostElement.contains(x.hostElement)).map((x) => {
|
|
7694
7903
|
return {
|
|
7695
7904
|
id: x.fId,
|
|
@@ -7697,7 +7906,7 @@ let GetFlowStateNodesExecution = class GetFlowStateNodesExecution {
|
|
|
7697
7906
|
};
|
|
7698
7907
|
});
|
|
7699
7908
|
}
|
|
7700
|
-
|
|
7909
|
+
_getInputs(hostElement) {
|
|
7701
7910
|
return this.fComponentsStore.fInputs.filter((x) => hostElement.contains(x.hostElement)).map((x) => {
|
|
7702
7911
|
return {
|
|
7703
7912
|
id: x.fId,
|
|
@@ -7719,25 +7928,21 @@ class GetFlowStateRequest {
|
|
|
7719
7928
|
}
|
|
7720
7929
|
|
|
7721
7930
|
let GetFlowStateExecution = class GetFlowStateExecution {
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
constructor(fComponentsStore, fMediator) {
|
|
7725
|
-
this.fComponentsStore = fComponentsStore;
|
|
7726
|
-
this.fMediator = fMediator;
|
|
7727
|
-
}
|
|
7931
|
+
_fMediator = inject(FMediator);
|
|
7932
|
+
_fComponentsStore = inject(FComponentsStore);
|
|
7728
7933
|
handle(payload) {
|
|
7729
7934
|
return {
|
|
7730
|
-
position: this.
|
|
7731
|
-
scale: this.
|
|
7732
|
-
nodes: this.
|
|
7733
|
-
groups: this.
|
|
7734
|
-
connections: this.
|
|
7935
|
+
position: this._getCanvasPosition(this._fComponentsStore.fCanvas.transform),
|
|
7936
|
+
scale: this._fComponentsStore.fCanvas.transform.scale,
|
|
7937
|
+
nodes: this._fMediator.send(new GetFlowStateNodesRequest(FNodeDirective)),
|
|
7938
|
+
groups: this._fMediator.send(new GetFlowStateNodesRequest(FGroupDirective)),
|
|
7939
|
+
connections: this._fMediator.send(new GetFlowStateConnectionsRequest())
|
|
7735
7940
|
};
|
|
7736
7941
|
}
|
|
7737
|
-
|
|
7942
|
+
_getCanvasPosition(transform) {
|
|
7738
7943
|
return PointExtensions.sum(transform.position, transform.scaledPosition);
|
|
7739
7944
|
}
|
|
7740
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetFlowStateExecution, deps: [
|
|
7945
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetFlowStateExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7741
7946
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetFlowStateExecution });
|
|
7742
7947
|
};
|
|
7743
7948
|
GetFlowStateExecution = __decorate([
|
|
@@ -7745,7 +7950,7 @@ GetFlowStateExecution = __decorate([
|
|
|
7745
7950
|
], GetFlowStateExecution);
|
|
7746
7951
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetFlowStateExecution, decorators: [{
|
|
7747
7952
|
type: Injectable
|
|
7748
|
-
}]
|
|
7953
|
+
}] });
|
|
7749
7954
|
|
|
7750
7955
|
const GET_FLOW_STATE_PROVIDERS = [
|
|
7751
7956
|
GetFlowStateExecution,
|
|
@@ -7789,7 +7994,7 @@ class AddLineAlignmentToStoreRequest {
|
|
|
7789
7994
|
let AddLineAlignmentToStoreExecution = class AddLineAlignmentToStoreExecution {
|
|
7790
7995
|
_fComponentsStore = inject(FComponentsStore);
|
|
7791
7996
|
handle(request) {
|
|
7792
|
-
|
|
7997
|
+
this._fComponentsStore.fLineAlignment = request.fComponent;
|
|
7793
7998
|
}
|
|
7794
7999
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: AddLineAlignmentToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7795
8000
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: AddLineAlignmentToStoreExecution });
|
|
@@ -7807,7 +8012,7 @@ class RemoveLineAlignmentFromStoreRequest {
|
|
|
7807
8012
|
let RemoveLineAlignmentFromStoreExecution = class RemoveLineAlignmentFromStoreExecution {
|
|
7808
8013
|
_fComponentsStore = inject(FComponentsStore);
|
|
7809
8014
|
handle(request) {
|
|
7810
|
-
this._fComponentsStore.
|
|
8015
|
+
this._fComponentsStore.fLineAlignment = undefined;
|
|
7811
8016
|
}
|
|
7812
8017
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveLineAlignmentFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7813
8018
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveLineAlignmentFromStoreExecution });
|
|
@@ -7873,15 +8078,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
|
|
|
7873
8078
|
}] });
|
|
7874
8079
|
|
|
7875
8080
|
class CalculateNodesBoundingBoxNormalizedPositionRequest {
|
|
8081
|
+
fNodes;
|
|
8082
|
+
constructor(fNodes) {
|
|
8083
|
+
this.fNodes = fNodes;
|
|
8084
|
+
}
|
|
7876
8085
|
}
|
|
7877
8086
|
|
|
7878
8087
|
let CalculateNodesBoundingBoxNormalizedPositionExecution = class CalculateNodesBoundingBoxNormalizedPositionExecution {
|
|
7879
8088
|
_fComponentsStore = inject(FComponentsStore);
|
|
7880
8089
|
handle(request) {
|
|
7881
|
-
return RectExtensions.union(this._getNodesRects());
|
|
8090
|
+
return RectExtensions.union(this._getNodesRects(request.fNodes || this._fComponentsStore.fNodes));
|
|
7882
8091
|
}
|
|
7883
|
-
_getNodesRects() {
|
|
7884
|
-
return
|
|
8092
|
+
_getNodesRects(fNodes) {
|
|
8093
|
+
return fNodes.map((x) => {
|
|
7885
8094
|
return this._getElementRect(x, RectExtensions.fromElement(x.hostElement));
|
|
7886
8095
|
});
|
|
7887
8096
|
}
|
|
@@ -7952,6 +8161,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
|
|
|
7952
8161
|
type: Injectable
|
|
7953
8162
|
}] });
|
|
7954
8163
|
|
|
8164
|
+
class GetParentNodesRequest {
|
|
8165
|
+
fNode;
|
|
8166
|
+
constructor(fNode) {
|
|
8167
|
+
this.fNode = fNode;
|
|
8168
|
+
}
|
|
8169
|
+
}
|
|
8170
|
+
|
|
8171
|
+
let GetParentNodesExecution = class GetParentNodesExecution {
|
|
8172
|
+
_fComponentsStore = inject(FComponentsStore);
|
|
8173
|
+
handle(request) {
|
|
8174
|
+
return this._getParentNodes(request.fNode, new Set(), []);
|
|
8175
|
+
}
|
|
8176
|
+
_getParentNodes(fNode, visited, result) {
|
|
8177
|
+
if (visited.has(fNode.fId)) {
|
|
8178
|
+
throw new Error('Circular reference detected in the node hierarchy. Node id: ' + fNode.fId);
|
|
8179
|
+
}
|
|
8180
|
+
visited.add(fNode.fId);
|
|
8181
|
+
const parent = this._fComponentsStore.fNodes.find((x) => x.fId === fNode.fParentId);
|
|
8182
|
+
if (!parent) {
|
|
8183
|
+
return result;
|
|
8184
|
+
}
|
|
8185
|
+
result.push(parent);
|
|
8186
|
+
return this._getParentNodes(parent, visited, result);
|
|
8187
|
+
}
|
|
8188
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetParentNodesExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8189
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetParentNodesExecution });
|
|
8190
|
+
};
|
|
8191
|
+
GetParentNodesExecution = __decorate([
|
|
8192
|
+
FExecutionRegister(GetParentNodesRequest)
|
|
8193
|
+
], GetParentNodesExecution);
|
|
8194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetParentNodesExecution, decorators: [{
|
|
8195
|
+
type: Injectable
|
|
8196
|
+
}] });
|
|
8197
|
+
|
|
7955
8198
|
class UpdateNodeWhenStateOrSizeChangedRequest {
|
|
7956
8199
|
fComponent;
|
|
7957
8200
|
destroyRef;
|
|
@@ -8195,6 +8438,22 @@ function isMobile() {
|
|
|
8195
8438
|
return /android|iPad|iPhone|iPod/i.test(navigator.userAgent || navigator.vendor || window['opera']);
|
|
8196
8439
|
}
|
|
8197
8440
|
|
|
8441
|
+
function LogExecutionTime(label) {
|
|
8442
|
+
return function (target, propertyKey, descriptor) {
|
|
8443
|
+
const originalMethod = descriptor.value;
|
|
8444
|
+
descriptor.value = function (...args) {
|
|
8445
|
+
console.time(label || String(propertyKey));
|
|
8446
|
+
const result = originalMethod.apply(this, args);
|
|
8447
|
+
if (result instanceof Promise) {
|
|
8448
|
+
return result.finally(() => console.timeEnd(label || String(propertyKey)));
|
|
8449
|
+
}
|
|
8450
|
+
console.timeEnd(label || String(propertyKey));
|
|
8451
|
+
return result;
|
|
8452
|
+
};
|
|
8453
|
+
return descriptor;
|
|
8454
|
+
};
|
|
8455
|
+
}
|
|
8456
|
+
|
|
8198
8457
|
const COMMON_PROVIDERS = [
|
|
8199
8458
|
...F_CANVAS_FEATURES,
|
|
8200
8459
|
...F_CONNECTION_FEATURES,
|
|
@@ -8570,171 +8829,6 @@ const F_CANVAS_PROVIDERS = [
|
|
|
8570
8829
|
FCanvasComponent,
|
|
8571
8830
|
];
|
|
8572
8831
|
|
|
8573
|
-
class LineElement {
|
|
8574
|
-
hostElement;
|
|
8575
|
-
element;
|
|
8576
|
-
constructor(fBrowser, hostElement) {
|
|
8577
|
-
this.hostElement = hostElement;
|
|
8578
|
-
this.element = fBrowser.document.createElement('div');
|
|
8579
|
-
this.hostElement.appendChild(this.element);
|
|
8580
|
-
this.element.classList.add('f-line');
|
|
8581
|
-
}
|
|
8582
|
-
hide() {
|
|
8583
|
-
this.element.style.display = 'none';
|
|
8584
|
-
}
|
|
8585
|
-
show() {
|
|
8586
|
-
this.element.style.display = 'block';
|
|
8587
|
-
}
|
|
8588
|
-
draw(object) {
|
|
8589
|
-
this.element.style.position = 'absolute';
|
|
8590
|
-
Object.keys(object).forEach((key) => {
|
|
8591
|
-
// @ts-ignore
|
|
8592
|
-
this.element.style[key] = object[key] + 'px';
|
|
8593
|
-
});
|
|
8594
|
-
}
|
|
8595
|
-
}
|
|
8596
|
-
|
|
8597
|
-
class LineService {
|
|
8598
|
-
hostElement;
|
|
8599
|
-
fHorizontalLine;
|
|
8600
|
-
fVerticalLine;
|
|
8601
|
-
constructor(fBrowser, hostElement) {
|
|
8602
|
-
this.hostElement = hostElement;
|
|
8603
|
-
this.fHorizontalLine = new LineElement(fBrowser, this.hostElement);
|
|
8604
|
-
this.fVerticalLine = new LineElement(fBrowser, this.hostElement);
|
|
8605
|
-
this.fHorizontalLine.hide();
|
|
8606
|
-
this.fVerticalLine.hide();
|
|
8607
|
-
}
|
|
8608
|
-
drawVerticalLine(x, size, transform) {
|
|
8609
|
-
this.fVerticalLine.show();
|
|
8610
|
-
this.fVerticalLine.draw({
|
|
8611
|
-
left: x * transform.scale + transform.position.x + transform.scaledPosition.x,
|
|
8612
|
-
top: 0,
|
|
8613
|
-
width: 1,
|
|
8614
|
-
height: size.height
|
|
8615
|
-
});
|
|
8616
|
-
}
|
|
8617
|
-
drawHorizontalLine(y, size, transform) {
|
|
8618
|
-
this.fHorizontalLine.show();
|
|
8619
|
-
this.fHorizontalLine.draw({
|
|
8620
|
-
left: 0,
|
|
8621
|
-
top: y * transform.scale + transform.position.y + transform.scaledPosition.y,
|
|
8622
|
-
width: size.width,
|
|
8623
|
-
height: 1
|
|
8624
|
-
});
|
|
8625
|
-
}
|
|
8626
|
-
hideVerticalLine() {
|
|
8627
|
-
this.fVerticalLine.hide();
|
|
8628
|
-
}
|
|
8629
|
-
hideHorizontalLine() {
|
|
8630
|
-
this.fHorizontalLine.hide();
|
|
8631
|
-
}
|
|
8632
|
-
}
|
|
8633
|
-
|
|
8634
|
-
const F_LINE_ALIGNMENT = new InjectionToken('F_LINE_ALIGNMENT');
|
|
8635
|
-
class FLineAlignmentBase {
|
|
8636
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FLineAlignmentBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8637
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: FLineAlignmentBase, ngImport: i0 });
|
|
8638
|
-
}
|
|
8639
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FLineAlignmentBase, decorators: [{
|
|
8640
|
-
type: Directive
|
|
8641
|
-
}] });
|
|
8642
|
-
|
|
8643
|
-
class FLineAlignmentComponent extends FLineAlignmentBase {
|
|
8644
|
-
elementReference;
|
|
8645
|
-
fDraggableDataContext;
|
|
8646
|
-
DEBOUNCE_TIME = 10;
|
|
8647
|
-
fAlignThreshold = 10;
|
|
8648
|
-
get hostElement() {
|
|
8649
|
-
return this.elementReference.nativeElement;
|
|
8650
|
-
}
|
|
8651
|
-
lineService;
|
|
8652
|
-
size = SizeExtensions.initialize();
|
|
8653
|
-
draggedNodeRect = RectExtensions.initialize();
|
|
8654
|
-
rects = [];
|
|
8655
|
-
_fMediator = inject(FMediator);
|
|
8656
|
-
_fCanvas;
|
|
8657
|
-
_debounceTimer = null;
|
|
8658
|
-
get _transform() {
|
|
8659
|
-
return this._fCanvas.transform;
|
|
8660
|
-
}
|
|
8661
|
-
constructor(elementReference, fDraggableDataContext, fBrowser) {
|
|
8662
|
-
super();
|
|
8663
|
-
this.elementReference = elementReference;
|
|
8664
|
-
this.fDraggableDataContext = fDraggableDataContext;
|
|
8665
|
-
this.lineService = new LineService(fBrowser, this.hostElement);
|
|
8666
|
-
}
|
|
8667
|
-
ngAfterViewInit() {
|
|
8668
|
-
this._fCanvas = this._fMediator.send(new GetCanvasRequest());
|
|
8669
|
-
this.fDraggableDataContext.fLineAlignment = this;
|
|
8670
|
-
}
|
|
8671
|
-
initialize(allNodes, currentNodes) {
|
|
8672
|
-
this.size = this._fMediator.send(new GetFlowHostElementRequest()).getBoundingClientRect();
|
|
8673
|
-
this.rects = [];
|
|
8674
|
-
const draggedNodeRects = currentNodes.map((x) => {
|
|
8675
|
-
return this._fMediator.execute(new GetNormalizedElementRectRequest(x.hostElement, false));
|
|
8676
|
-
});
|
|
8677
|
-
this.draggedNodeRect = RectExtensions.union(draggedNodeRects) || RectExtensions.initialize();
|
|
8678
|
-
const allNodesExcludeCurrents = allNodes.filter((x) => {
|
|
8679
|
-
return !currentNodes.includes(x);
|
|
8680
|
-
});
|
|
8681
|
-
this.rects = allNodesExcludeCurrents.map((x) => {
|
|
8682
|
-
return this._fMediator.execute(new GetNormalizedElementRectRequest(x.hostElement, false));
|
|
8683
|
-
});
|
|
8684
|
-
}
|
|
8685
|
-
handle(difference) {
|
|
8686
|
-
if (this._debounceTimer) {
|
|
8687
|
-
clearTimeout(this._debounceTimer);
|
|
8688
|
-
}
|
|
8689
|
-
this._debounceTimer = setTimeout(() => this.drawIntersectingLines(difference), this.DEBOUNCE_TIME);
|
|
8690
|
-
}
|
|
8691
|
-
drawIntersectingLines(difference) {
|
|
8692
|
-
const intersect = this.findNearestCoordinate(difference);
|
|
8693
|
-
if (intersect.xResult.value !== undefined) {
|
|
8694
|
-
this.lineService.drawVerticalLine(intersect.xResult.value, this.size, this._transform);
|
|
8695
|
-
}
|
|
8696
|
-
else {
|
|
8697
|
-
this.lineService.hideVerticalLine();
|
|
8698
|
-
}
|
|
8699
|
-
if (intersect.yResult.value !== undefined) {
|
|
8700
|
-
this.lineService.drawHorizontalLine(intersect.yResult.value, this.size, this._transform);
|
|
8701
|
-
}
|
|
8702
|
-
else {
|
|
8703
|
-
this.lineService.hideHorizontalLine();
|
|
8704
|
-
}
|
|
8705
|
-
}
|
|
8706
|
-
findNearestCoordinate(difference) {
|
|
8707
|
-
const rect = RectExtensions.addPoint(this.draggedNodeRect, difference);
|
|
8708
|
-
return findClosestAlignment(this.rects, rect, this.fAlignThreshold);
|
|
8709
|
-
}
|
|
8710
|
-
complete() {
|
|
8711
|
-
this.lineService.hideVerticalLine();
|
|
8712
|
-
this.lineService.hideHorizontalLine();
|
|
8713
|
-
if (this._debounceTimer) {
|
|
8714
|
-
clearTimeout(this._debounceTimer);
|
|
8715
|
-
this._debounceTimer = null;
|
|
8716
|
-
}
|
|
8717
|
-
}
|
|
8718
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FLineAlignmentComponent, deps: [{ token: i0.ElementRef }, { token: FDraggableDataContext }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8719
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.4", type: FLineAlignmentComponent, selector: "f-line-alignment", inputs: { fAlignThreshold: "fAlignThreshold" }, host: { classAttribute: "f-line-alignment f-component" }, providers: [
|
|
8720
|
-
{ provide: F_LINE_ALIGNMENT, useExisting: FLineAlignmentComponent }
|
|
8721
|
-
], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0, template: "", isInline: true, styles: [":host{display:block;position:absolute;left:0;top:0;width:100%;height:100%;overflow:hidden;pointer-events:none;-webkit-user-select:none;user-select:none}\n"] });
|
|
8722
|
-
}
|
|
8723
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FLineAlignmentComponent, decorators: [{
|
|
8724
|
-
type: Component,
|
|
8725
|
-
args: [{ selector: "f-line-alignment", template: "", exportAs: "fComponent", host: {
|
|
8726
|
-
'class': 'f-line-alignment f-component'
|
|
8727
|
-
}, providers: [
|
|
8728
|
-
{ provide: F_LINE_ALIGNMENT, useExisting: FLineAlignmentComponent }
|
|
8729
|
-
], styles: [":host{display:block;position:absolute;left:0;top:0;width:100%;height:100%;overflow:hidden;pointer-events:none;-webkit-user-select:none;user-select:none}\n"] }]
|
|
8730
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: FDraggableDataContext }, { type: i1.BrowserService }], propDecorators: { fAlignThreshold: [{
|
|
8731
|
-
type: Input
|
|
8732
|
-
}] } });
|
|
8733
|
-
|
|
8734
|
-
const F_LINE_ALIGNMENT_PROVIDERS = [
|
|
8735
|
-
FLineAlignmentComponent
|
|
8736
|
-
];
|
|
8737
|
-
|
|
8738
8832
|
class FMinimapData {
|
|
8739
8833
|
element;
|
|
8740
8834
|
scale;
|
|
@@ -9187,5 +9281,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
|
|
|
9187
9281
|
* Generated bundle index. Do not edit.
|
|
9188
9282
|
*/
|
|
9189
9283
|
|
|
9190
|
-
export { AddBackgroundToStoreExecution, AddBackgroundToStoreRequest, AddCanvasToStoreExecution, AddCanvasToStoreRequest, AddConnectionForCreateToStoreExecution, AddConnectionForCreateToStoreRequest, AddConnectionMarkerToStoreExecution, AddConnectionMarkerToStoreRequest, AddConnectionToStoreExecution, AddConnectionToStoreRequest, AddDndToStoreExecution, AddDndToStoreRequest, AddFlowToStoreExecution, AddFlowToStoreRequest, AddInputToStoreExecution, AddInputToStoreRequest, AddLineAlignmentToStoreExecution, AddLineAlignmentToStoreRequest, AddNodeToStoreExecution, AddNodeToStoreRequest, AddOutletToStoreExecution, AddOutletToStoreRequest, AddOutputToStoreExecution, AddOutputToStoreRequest, AddPatternToBackgroundExecution, AddPatternToBackgroundRequest, AddSnapConnectionToStoreExecution, AddSnapConnectionToStoreRequest, ApplyChildResizeRestrictionsExecution, ApplyChildResizeRestrictionsRequest, ApplyParentResizeRestrictionsExecution, ApplyParentResizeRestrictionsRequest, CANVAS_MOVE_FINALIZE_PROVIDERS, CANVAS_MOVE_PREPARATION_PROVIDERS, CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CREATE_MOVE_NODE_DRAG_MODEL_FROM_SELECTION_PROVIDERS, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateChangedPositionExecution, CalculateChangedPositionRequest, CalculateChangedSizeExecution, CalculateChangedSizeRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectionLineByBehaviorExecution, CalculateConnectionLineByBehaviorRequest, CalculateConnectorConnectableSideHandler, CalculateConnectorConnectableSideRequest, CalculateFlowPointFromMinimapPointExecution, CalculateFlowPointFromMinimapPointRequest, CalculateNodesBoundingBoxExecution, CalculateNodesBoundingBoxNormalizedPositionExecution, CalculateNodesBoundingBoxNormalizedPositionRequest, CalculateNodesBoundingBoxRequest, CanvasDragHandler, CanvasMoveFinalizeExecution, CanvasMoveFinalizeRequest, CanvasMovePreparationExecution, CanvasMovePreparationRequest, CanvasMovePreparationValidator, CenterGroupOrNodeExecution, CenterGroupOrNodeRequest, ClearSelectionExecution, ClearSelectionRequest, ConnectionBaseDragHandler, ConnectionDragHandler, ConnectionSourceDragHandler, ConnectionTargetDragHandler, CreateConnectionDragHandler, CreateConnectionDragHandlerExecution, CreateConnectionDragHandlerRequest, CreateConnectionFinalizeExecution, CreateConnectionFinalizeRequest, CreateConnectionFromOutletPreparationExecution, CreateConnectionFromOutletPreparationRequest, CreateConnectionFromOutputPreparationExecution, CreateConnectionFromOutputPreparationRequest, CreateConnectionFromOutputPreparationValidator, CreateConnectionMarkersExecution, CreateConnectionMarkersRequest, CreateConnectionPreparationExecution, CreateConnectionPreparationRequest, CreateMoveNodesDragModelFromSelectionExecution, CreateMoveNodesDragModelFromSelectionRequest, DRAG_AND_DROP_COMMON_PROVIDERS, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFMarkerType, EFResizeHandleType, EXTERNAL_ITEM_FINALIZE_PROVIDERS, EXTERNAL_ITEM_PREPARATION_PROVIDERS, EmitSelectionChangeEventExecution, EmitSelectionChangeEventRequest, EndDragSequenceExecution, EndDragSequenceRequest, ExternalItemDragHandler, ExternalItemFinalizeExecution, ExternalItemFinalizeRequest, ExternalItemPreparationExecution, ExternalItemPreparationRequest, ExternalItemPreparationValidator, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FChannel, FChannelHub, FCirclePatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, FConnectionDragHandleComponent, FConnectionFactory, FConnectionForCreateComponent, FConnectionGradientComponent, FConnectionPathComponent, FConnectionSelectionComponent, FConnectionTextComponent, FConnectionTextPathDirective, FConnectorBase, FCreateConnectionEvent, FCreateNodeEvent, FDragHandleDirective, FDraggableBase, FDraggableDataContext, FDraggableDirective, FDropToGroupEvent, FExternalItemBase, FExternalItemDirective, FExternalItemService, FFlowBase, FFlowComponent, FFlowModule, FGroupDirective, FLineAlignmentBase, FLineAlignmentComponent, FMarkerBase, FMarkerDirective, FMinimapCanvasDirective, FMinimapComponent, FMinimapData, FMinimapDragHandler, FMinimapFlowDirective, FMinimapViewDirective, FNodeBase, FNodeDirective, FNodeInputBase, FNodeInputDirective, FNodeIntersectedWithConnections, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FReassignConnectionEvent, FRectPatternComponent, FResizeChannel, FResizeHandleDirective, FRotateHandleDirective, FSegmentPathBuilder, FSelectionAreaBase, FSelectionAreaComponent, FSelectionChangeEvent, FSnapConnectionComponent, FStraightPathBuilder, FZoomBase, FZoomDirective, F_BACKGROUND, F_BACKGROUND_FEATURES, F_BACKGROUND_PATTERN, F_BACKGROUND_PROVIDERS, F_CANVAS, F_CANVAS_FEATURES, F_CANVAS_PROVIDERS, F_CONNECTION_BUILDERS, F_CONNECTION_DRAG_HANDLE_CLASS, F_CONNECTION_FEATURES, F_CONNECTION_IDENTIFIERS, F_CONNECTION_PROVIDERS, F_CONNECTORS_FEATURES, F_CONNECTORS_PROVIDERS, F_DRAGGABLE_FEATURES, F_DRAGGABLE_PROVIDERS, F_DRAG_AND_DROP_PLUGIN, F_DRAG_HANDLE, F_EXTERNAL_ITEM, F_EXTERNAL_ITEM_DRAG_AND_DROP_PROVIDERS, F_EXTERNAL_ITEM_PROVIDERS, F_FLOW, F_FLOW_FEATURES, F_FLOW_PROVIDERS, F_LINE_ALIGNMENT, F_LINE_ALIGNMENT_FEATURES, F_LINE_ALIGNMENT_PROVIDERS, F_MARKER, F_MINIMAP_DRAG_AND_DROP_PROVIDERS, F_MINIMAP_PROVIDERS, F_NODE, F_NODE_FEATURES, F_NODE_INPUT, F_NODE_OUTLET, F_NODE_OUTPUT, F_NODE_PROVIDERS, F_RESIZE_HANDLE, F_SELECTED_CLASS, F_SELECTION_AREA_DRAG_AND_DROP_PROVIDERS, F_SELECTION_AREA_PROVIDERS, F_SELECTION_FEATURES, F_STORAGE_PROVIDERS, F_ZOOM, F_ZOOM_PROVIDERS, FindClosestInputExecution, FindClosestInputRequest, FitToFlowExecution, FitToFlowRequest, GET_FLOW_STATE_PROVIDERS, GetAllCanBeConnectedInputPositionsExecution, GetAllCanBeConnectedInputPositionsRequest, GetCanBeConnectedOutputByOutletExecution, GetCanBeConnectedOutputByOutletRequest, GetCanBeConnectedOutputByOutletValidator, GetCanBeSelectedItemsExecution, GetCanBeSelectedItemsRequest, GetCanvasExecution, GetCanvasRequest, GetConnectorWithRectExecution, GetConnectorWithRectRequest, GetCurrentSelectionExecution, GetCurrentSelectionRequest, GetDeepChildrenNodesAndGroupsExecution, GetDeepChildrenNodesAndGroupsRequest, GetElementRoundedRectExecution, GetElementRoundedRectRequest, GetFlowExecution, GetFlowHostElementExecution, GetFlowHostElementRequest, GetFlowRequest, GetFlowStateConnectionsExecution, GetFlowStateConnectionsRequest, GetFlowStateExecution, GetFlowStateNodesExecution, GetFlowStateNodesRequest, GetFlowStateRequest, GetInputUnderPointerExecution, GetInputUnderPointerRequest, GetInputUnderPointerValidator, GetNodeMoveRestrictionsExecution, GetNodeMoveRestrictionsRequest, GetNodePaddingExecution, GetNodePaddingRequest, GetNodeResizeRestrictionsExecution, GetNodeResizeRestrictionsRequest, GetNodesExecution, GetNodesRequest, GetNormalizedChildrenNodesRectExecution, GetNormalizedChildrenNodesRectRequest, GetNormalizedElementRectExecution, GetNormalizedElementRectRequest, GetNormalizedParentNodeRectExecution, GetNormalizedParentNodeRectRequest, GetNormalizedPointExecution, GetNormalizedPointRequest, GetParentNodesExecution, GetParentNodesRequest, InitializeDragSequenceExecution, InitializeDragSequenceRequest, InputCanvasPositionExecution, InputCanvasPositionRequest, InputCanvasScaleExecution, InputCanvasScaleRequest, IsArrayHasParentNodeExecution, IsArrayHasParentNodeRequest, IsConnectionUnderNodeExecution, IsConnectionUnderNodeRequest, IsDragStartedExecution, IsDragStartedRequest, LineElement, LineService, ListenCountChangesExecution, ListenCountChangesRequest, ListenDataChangesExecution, ListenDataChangesRequest, ListenTransformChangesExecution, ListenTransformChangesRequest, MINIMAP_DRAG_FINALIZE_PROVIDERS, MINIMAP_DRAG_PREPARATION_PROVIDERS, MinimapCalculateSvgScaleAndViewBoxExecution, MinimapCalculateSvgScaleAndViewBoxRequest, MinimapCalculateViewBoxExecution, MinimapCalculateViewBoxRequest, MinimapDragFinalizeExecution, MinimapDragFinalizeRequest, MinimapDragFinalizeValidator, MinimapDragPreparationExecution, MinimapDragPreparationRequest, MinimapDragPreparationValidator, MinimapDrawNodesExecution, MinimapDrawNodesRequest, MoveFrontElementsBeforeTargetElementExecution, MoveFrontElementsBeforeTargetElementRequest, NODE_DRAG_TO_PARENT_FINALIZE_PROVIDERS, NODE_DRAG_TO_PARENT_PREPARATION_PROVIDERS, NODE_MOVE_PREPARATION_PROVIDERS, NODE_PROVIDERS, NODE_RESIZE_FINALIZE_PROVIDERS, NODE_RESIZE_PREPARATION_PROVIDERS, NODE_RESIZE_PROVIDERS, NodeDragHandler, NodeDragToParentDragHandler, NodeDragToParentFinalizeExecution, NodeDragToParentFinalizeRequest, NodeDragToParentPreparationExecution, NodeDragToParentPreparationRequest, NodeDragToParentPreparationValidator, NodeMoveFinalizeExecution, NodeMoveFinalizeRequest, NodeMovePreparationExecution, NodeMovePreparationRequest, NodeMovePreparationValidator, NodeResizeByChildDragHandler, NodeResizeDragHandler, NodeResizeFinalizeExecution, NodeResizeFinalizeRequest, NodeResizePreparationExecution, NodeResizePreparationRequest, NodeResizePreparationValidator, NotifyDataChangedExecution, NotifyDataChangedRequest, NotifyTransformChangedExecution, NotifyTransformChangedRequest, OnPointerMoveExecution, OnPointerMoveRequest, PrepareDragSequenceExecution, PrepareDragSequenceRequest, PreventDefaultIsExternalItemExecution, PreventDefaultIsExternalItemRequest, PutInputConnectionHandlersToArrayExecution, PutInputConnectionHandlersToArrayRequest, PutOutputConnectionHandlersToArrayExecution, PutOutputConnectionHandlersToArrayRequest, RESIZE_DIRECTIONS, ReassignConnectionDragHandler, ReassignConnectionFinalizeExecution, ReassignConnectionFinalizeRequest, ReassignConnectionPreparationExecution, ReassignConnectionPreparationRequest, RedrawCanvasWithAnimationExecution, RedrawCanvasWithAnimationRequest, RedrawConnectionsExecution, RedrawConnectionsRequest, RemoveBackgroundFromStoreExecution, RemoveBackgroundFromStoreRequest, RemoveCanvasFromStoreExecution, RemoveCanvasFromStoreRequest, RemoveConnectionForCreateFromStoreExecution, RemoveConnectionForCreateFromStoreRequest, RemoveConnectionFromStoreExecution, RemoveConnectionFromStoreRequest, RemoveConnectionMarkerFromStoreExecution, RemoveConnectionMarkerFromStoreRequest, RemoveDndFromStoreExecution, RemoveDndFromStoreRequest, RemoveFlowFromStoreExecution, RemoveFlowFromStoreRequest, RemoveInputFromStoreExecution, RemoveInputFromStoreRequest, RemoveLineAlignmentFromStoreExecution, RemoveLineAlignmentFromStoreRequest, RemoveNodeFromStoreExecution, RemoveNodeFromStoreRequest, RemoveOutletFromStoreExecution, RemoveOutletFromStoreRequest, RemoveOutputFromStoreExecution, RemoveOutputFromStoreRequest, RemoveSnapConnectionFromStoreExecution, RemoveSnapConnectionFromStoreRequest, ResetScaleAndCenterExecution, ResetScaleAndCenterRequest, ResetScaleExecution, ResetScaleRequest, SELECTION_AREA_FINALIZE_PROVIDERS, SELECTION_AREA_PREPARATION_PROVIDERS, SINGLE_SELECT_PROVIDERS, SelectAllExecution, SelectAllRequest, SelectAndUpdateNodeLayerExecution, SelectAndUpdateNodeLayerRequest, SelectExecution, SelectRequest, SelectionAreaDragHandle, SelectionAreaFinalizeExecution, SelectionAreaFinalizeRequest, SelectionAreaFinalizeValidator, SelectionAreaPreparationExecution, SelectionAreaPreparationRequest, SelectionAreaPreparationValidator, SetBackgroundTransformExecution, SetBackgroundTransformRequest, SingleSelectExecution, SingleSelectRequest, SortItemLayersExecution, SortItemLayersRequest, SortItemsByParentExecution, SortItemsByParentRequest, SortNodeLayersExecution, SortNodeLayersRequest, StartDragSequenceExecution, StartDragSequenceRequest, UpdateItemAndChildrenLayersExecution, UpdateItemAndChildrenLayersRequest, UpdateNodeWhenStateOrSizeChangedExecution, UpdateNodeWhenStateOrSizeChangedRequest, UpdateScaleExecution, UpdateScaleRequest, createSVGElement, debounceTime, fixedCenterBehavior, fixedOutboundBehavior, floatingBehavior, getExternalItem, getMarkerEndId, getMarkerSelectedEndId, getMarkerSelectedStartId, getMarkerStartId, isExternalItem, isMobile, isNode, isNodeOutlet, isNodeOutput, mixinChangeSelection, mixinChangeVisibility, notifyOnStart, transitionEnd };
|
|
9284
|
+
export { AddBackgroundToStoreExecution, AddBackgroundToStoreRequest, AddCanvasToStoreExecution, AddCanvasToStoreRequest, AddConnectionForCreateToStoreExecution, AddConnectionForCreateToStoreRequest, AddConnectionMarkerToStoreExecution, AddConnectionMarkerToStoreRequest, AddConnectionToStoreExecution, AddConnectionToStoreRequest, AddDndToStoreExecution, AddDndToStoreRequest, AddFlowToStoreExecution, AddFlowToStoreRequest, AddInputToStoreExecution, AddInputToStoreRequest, AddLineAlignmentToStoreExecution, AddLineAlignmentToStoreRequest, AddNodeToStoreExecution, AddNodeToStoreRequest, AddOutletToStoreExecution, AddOutletToStoreRequest, AddOutputToStoreExecution, AddOutputToStoreRequest, AddPatternToBackgroundExecution, AddPatternToBackgroundRequest, AddSnapConnectionToStoreExecution, AddSnapConnectionToStoreRequest, ApplyChildResizeRestrictionsExecution, ApplyChildResizeRestrictionsRequest, ApplyParentResizeRestrictionsExecution, ApplyParentResizeRestrictionsRequest, CANVAS_MOVE_FINALIZE_PROVIDERS, CANVAS_MOVE_PREPARATION_PROVIDERS, CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CREATE_MOVE_NODE_DRAG_MODEL_FROM_SELECTION_PROVIDERS, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateChangedPositionExecution, CalculateChangedPositionRequest, CalculateChangedSizeExecution, CalculateChangedSizeRequest, CalculateCommonNodeMoveRestrictionsExecution, CalculateCommonNodeMoveRestrictionsRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectionLineByBehaviorExecution, CalculateConnectionLineByBehaviorRequest, CalculateConnectorConnectableSideHandler, CalculateConnectorConnectableSideRequest, CalculateFlowPointFromMinimapPointExecution, CalculateFlowPointFromMinimapPointRequest, CalculateNodeMoveRestrictionsExecution, CalculateNodeMoveRestrictionsRequest, CalculateNodesBoundingBoxExecution, CalculateNodesBoundingBoxNormalizedPositionExecution, CalculateNodesBoundingBoxNormalizedPositionRequest, CalculateNodesBoundingBoxRequest, CanvasDragHandler, CanvasMoveFinalizeExecution, CanvasMoveFinalizeRequest, CanvasMovePreparationExecution, CanvasMovePreparationRequest, CanvasMovePreparationValidator, CenterGroupOrNodeExecution, CenterGroupOrNodeRequest, ClearSelectionExecution, ClearSelectionRequest, ConnectionBaseDragHandler, ConnectionDragHandler, ConnectionSourceDragHandler, ConnectionTargetDragHandler, CreateConnectionDragHandler, CreateConnectionDragHandlerExecution, CreateConnectionDragHandlerRequest, CreateConnectionFinalizeExecution, CreateConnectionFinalizeRequest, CreateConnectionFromOutletPreparationExecution, CreateConnectionFromOutletPreparationRequest, CreateConnectionFromOutputPreparationExecution, CreateConnectionFromOutputPreparationRequest, CreateConnectionFromOutputPreparationValidator, CreateConnectionMarkersExecution, CreateConnectionMarkersRequest, CreateConnectionPreparationExecution, CreateConnectionPreparationRequest, CreateMoveNodesDragModelFromSelectionExecution, CreateMoveNodesDragModelFromSelectionRequest, DRAG_AND_DROP_COMMON_PROVIDERS, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFMarkerType, EFResizeHandleType, EXTERNAL_ITEM_FINALIZE_PROVIDERS, EXTERNAL_ITEM_PREPARATION_PROVIDERS, EmitSelectionChangeEventExecution, EmitSelectionChangeEventRequest, EndDragSequenceExecution, EndDragSequenceRequest, ExternalItemDragHandler, ExternalItemFinalizeExecution, ExternalItemFinalizeRequest, ExternalItemPreparationExecution, ExternalItemPreparationRequest, ExternalItemPreparationValidator, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FChannel, FChannelHub, FCirclePatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, FConnectionDragHandleComponent, FConnectionFactory, FConnectionForCreateComponent, FConnectionGradientComponent, FConnectionPathComponent, FConnectionSelectionComponent, FConnectionTextComponent, FConnectionTextPathDirective, FConnectorBase, FCreateConnectionEvent, FCreateNodeEvent, FDragHandleDirective, FDraggableBase, FDraggableDataContext, FDraggableDirective, FDropToGroupEvent, FExternalItemBase, FExternalItemDirective, FExternalItemService, FFlowBase, FFlowComponent, FFlowModule, FGroupDirective, FLineAlignmentBase, FLineAlignmentComponent, FMarkerBase, FMarkerDirective, FMinimapCanvasDirective, FMinimapComponent, FMinimapData, FMinimapDragHandler, FMinimapFlowDirective, FMinimapViewDirective, FNodeBase, FNodeDirective, FNodeInputBase, FNodeInputDirective, FNodeIntersectedWithConnections, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FReassignConnectionEvent, FRectPatternComponent, FResizeChannel, FResizeHandleDirective, FRotateHandleDirective, FSegmentPathBuilder, FSelectionAreaBase, FSelectionAreaComponent, FSelectionChangeEvent, FSnapConnectionComponent, FStraightPathBuilder, FZoomBase, FZoomDirective, F_BACKGROUND, F_BACKGROUND_FEATURES, F_BACKGROUND_PATTERN, F_BACKGROUND_PROVIDERS, F_CANVAS, F_CANVAS_FEATURES, F_CANVAS_PROVIDERS, F_CONNECTION_BUILDERS, F_CONNECTION_DRAG_HANDLE_CLASS, F_CONNECTION_FEATURES, F_CONNECTION_IDENTIFIERS, F_CONNECTION_PROVIDERS, F_CONNECTORS_FEATURES, F_CONNECTORS_PROVIDERS, F_DRAGGABLE_FEATURES, F_DRAGGABLE_PROVIDERS, F_DRAG_AND_DROP_PLUGIN, F_DRAG_HANDLE, F_EXTERNAL_ITEM, F_EXTERNAL_ITEM_DRAG_AND_DROP_PROVIDERS, F_EXTERNAL_ITEM_PROVIDERS, F_FLOW, F_FLOW_FEATURES, F_FLOW_PROVIDERS, F_LINE_ALIGNMENT, F_LINE_ALIGNMENT_FEATURES, F_LINE_ALIGNMENT_PROVIDERS, F_MARKER, F_MINIMAP_DRAG_AND_DROP_PROVIDERS, F_MINIMAP_PROVIDERS, F_NODE, F_NODE_FEATURES, F_NODE_INPUT, F_NODE_OUTLET, F_NODE_OUTPUT, F_NODE_PROVIDERS, F_RESIZE_HANDLE, F_SELECTED_CLASS, F_SELECTION_AREA_DRAG_AND_DROP_PROVIDERS, F_SELECTION_AREA_PROVIDERS, F_SELECTION_FEATURES, F_STORAGE_PROVIDERS, F_ZOOM, F_ZOOM_PROVIDERS, FindClosestInputExecution, FindClosestInputRequest, FitToFlowExecution, FitToFlowRequest, GET_FLOW_STATE_PROVIDERS, GetAllCanBeConnectedInputPositionsExecution, GetAllCanBeConnectedInputPositionsRequest, GetCanBeConnectedOutputByOutletExecution, GetCanBeConnectedOutputByOutletRequest, GetCanBeConnectedOutputByOutletValidator, GetCanBeSelectedItemsExecution, GetCanBeSelectedItemsRequest, GetCanvasExecution, GetCanvasRequest, GetConnectorWithRectExecution, GetConnectorWithRectRequest, GetCurrentSelectionExecution, GetCurrentSelectionRequest, GetDeepChildrenNodesAndGroupsExecution, GetDeepChildrenNodesAndGroupsRequest, GetElementRoundedRectExecution, GetElementRoundedRectRequest, GetFlowExecution, GetFlowHostElementExecution, GetFlowHostElementRequest, GetFlowRequest, GetFlowStateConnectionsExecution, GetFlowStateConnectionsRequest, GetFlowStateExecution, GetFlowStateNodesExecution, GetFlowStateNodesRequest, GetFlowStateRequest, GetInputUnderPointerExecution, GetInputUnderPointerRequest, GetInputUnderPointerValidator, GetNodePaddingExecution, GetNodePaddingRequest, GetNodeResizeRestrictionsExecution, GetNodeResizeRestrictionsRequest, GetNodesExecution, GetNodesRequest, GetNormalizedChildrenNodesRectExecution, GetNormalizedChildrenNodesRectRequest, GetNormalizedElementRectExecution, GetNormalizedElementRectRequest, GetNormalizedParentNodeRectExecution, GetNormalizedParentNodeRectRequest, GetNormalizedPointExecution, GetNormalizedPointRequest, GetParentNodesExecution, GetParentNodesRequest, InitializeDragSequenceExecution, InitializeDragSequenceRequest, InputCanvasPositionExecution, InputCanvasPositionRequest, InputCanvasScaleExecution, InputCanvasScaleRequest, IsArrayHasParentNodeExecution, IsArrayHasParentNodeRequest, IsConnectionUnderNodeExecution, IsConnectionUnderNodeRequest, IsDragStartedExecution, IsDragStartedRequest, LineAlignmentDragHandler, LineAlignmentPreparationExecution, LineAlignmentPreparationRequest, LineElement, LineService, ListenCountChangesExecution, ListenCountChangesRequest, ListenDataChangesExecution, ListenDataChangesRequest, ListenTransformChangesExecution, ListenTransformChangesRequest, LogExecutionTime, MINIMAP_DRAG_FINALIZE_PROVIDERS, MINIMAP_DRAG_PREPARATION_PROVIDERS, MinimapCalculateSvgScaleAndViewBoxExecution, MinimapCalculateSvgScaleAndViewBoxRequest, MinimapCalculateViewBoxExecution, MinimapCalculateViewBoxRequest, MinimapDragFinalizeExecution, MinimapDragFinalizeRequest, MinimapDragFinalizeValidator, MinimapDragPreparationExecution, MinimapDragPreparationRequest, MinimapDragPreparationValidator, MinimapDrawNodesExecution, MinimapDrawNodesRequest, MoveFrontElementsBeforeTargetElementExecution, MoveFrontElementsBeforeTargetElementRequest, NODE_DRAG_TO_PARENT_FINALIZE_PROVIDERS, NODE_DRAG_TO_PARENT_PREPARATION_PROVIDERS, NODE_MOVE_PREPARATION_PROVIDERS, NODE_PROVIDERS, NODE_RESIZE_FINALIZE_PROVIDERS, NODE_RESIZE_PREPARATION_PROVIDERS, NODE_RESIZE_PROVIDERS, NodeDragHandler, NodeDragToParentDragHandler, NodeDragToParentFinalizeExecution, NodeDragToParentFinalizeRequest, NodeDragToParentPreparationExecution, NodeDragToParentPreparationRequest, NodeDragToParentPreparationValidator, NodeMoveFinalizeExecution, NodeMoveFinalizeRequest, NodeMovePreparationExecution, NodeMovePreparationRequest, NodeResizeByChildDragHandler, NodeResizeDragHandler, NodeResizeFinalizeExecution, NodeResizeFinalizeRequest, NodeResizePreparationExecution, NodeResizePreparationRequest, NodeResizePreparationValidator, NotifyDataChangedExecution, NotifyDataChangedRequest, NotifyTransformChangedExecution, NotifyTransformChangedRequest, OnPointerMoveExecution, OnPointerMoveRequest, PrepareDragSequenceExecution, PrepareDragSequenceRequest, PreventDefaultIsExternalItemExecution, PreventDefaultIsExternalItemRequest, PutInputConnectionHandlersToArrayExecution, PutInputConnectionHandlersToArrayRequest, PutOutputConnectionHandlersToArrayExecution, PutOutputConnectionHandlersToArrayRequest, RESIZE_DIRECTIONS, ReassignConnectionDragHandler, ReassignConnectionFinalizeExecution, ReassignConnectionFinalizeRequest, ReassignConnectionPreparationExecution, ReassignConnectionPreparationRequest, RedrawCanvasWithAnimationExecution, RedrawCanvasWithAnimationRequest, RedrawConnectionsExecution, RedrawConnectionsRequest, RemoveBackgroundFromStoreExecution, RemoveBackgroundFromStoreRequest, RemoveCanvasFromStoreExecution, RemoveCanvasFromStoreRequest, RemoveConnectionForCreateFromStoreExecution, RemoveConnectionForCreateFromStoreRequest, RemoveConnectionFromStoreExecution, RemoveConnectionFromStoreRequest, RemoveConnectionMarkerFromStoreExecution, RemoveConnectionMarkerFromStoreRequest, RemoveDndFromStoreExecution, RemoveDndFromStoreRequest, RemoveFlowFromStoreExecution, RemoveFlowFromStoreRequest, RemoveInputFromStoreExecution, RemoveInputFromStoreRequest, RemoveLineAlignmentFromStoreExecution, RemoveLineAlignmentFromStoreRequest, RemoveNodeFromStoreExecution, RemoveNodeFromStoreRequest, RemoveOutletFromStoreExecution, RemoveOutletFromStoreRequest, RemoveOutputFromStoreExecution, RemoveOutputFromStoreRequest, RemoveSnapConnectionFromStoreExecution, RemoveSnapConnectionFromStoreRequest, ResetScaleAndCenterExecution, ResetScaleAndCenterRequest, ResetScaleExecution, ResetScaleRequest, SELECTION_AREA_FINALIZE_PROVIDERS, SELECTION_AREA_PREPARATION_PROVIDERS, SINGLE_SELECT_PROVIDERS, SelectAllExecution, SelectAllRequest, SelectAndUpdateNodeLayerExecution, SelectAndUpdateNodeLayerRequest, SelectExecution, SelectRequest, SelectionAreaDragHandle, SelectionAreaFinalizeExecution, SelectionAreaFinalizeRequest, SelectionAreaFinalizeValidator, SelectionAreaPreparationExecution, SelectionAreaPreparationRequest, SelectionAreaPreparationValidator, SetBackgroundTransformExecution, SetBackgroundTransformRequest, SingleSelectExecution, SingleSelectRequest, SortItemLayersExecution, SortItemLayersRequest, SortItemsByParentExecution, SortItemsByParentRequest, SortNodeLayersExecution, SortNodeLayersRequest, StartDragSequenceExecution, StartDragSequenceRequest, UpdateItemAndChildrenLayersExecution, UpdateItemAndChildrenLayersRequest, UpdateNodeWhenStateOrSizeChangedExecution, UpdateNodeWhenStateOrSizeChangedRequest, UpdateScaleExecution, UpdateScaleRequest, createSVGElement, debounceTime, fixedCenterBehavior, fixedOutboundBehavior, floatingBehavior, getExternalItem, getMarkerEndId, getMarkerSelectedEndId, getMarkerSelectedStartId, getMarkerStartId, isExternalItem, isMobile, isNode, isNodeOutlet, isNodeOutput, mixinChangeSelection, mixinChangeVisibility, notifyOnStart, transitionEnd };
|
|
9191
9285
|
//# sourceMappingURL=foblex-flow.mjs.map
|