@foblex/flow 17.8.4 → 17.8.6
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/drag-rect-cache.d.ts +8 -0
- package/domain/f-background/providers.d.ts +1 -1
- package/domain/f-canvas/providers.d.ts +1 -1
- package/domain/f-connection/calculate-connection-line-by-behavior/calculate-connection-line-by-behavior-request.d.ts +7 -7
- package/domain/f-connection/calculate-connection-line-by-behavior/calculate-connection-line-by-behavior.d.ts +37 -3
- package/domain/f-connection/calculate-connection-line-by-behavior/index.d.ts +4 -3
- package/domain/f-connection/calculate-connection-line-by-behavior/models/calculate-behavior-request.d.ts +8 -0
- package/domain/f-connection/calculate-connection-line-by-behavior/{fixed-center-behavior.d.ts → utils/fixed-center-behavior.d.ts} +2 -2
- package/domain/f-connection/calculate-connection-line-by-behavior/{fixed-outbound-behavior.d.ts → utils/fixed-outbound-behavior.d.ts} +2 -2
- package/domain/f-connection/calculate-connection-line-by-behavior/{floating-behavior.d.ts → utils/floating-behavior.d.ts} +2 -2
- package/domain/f-connection/providers.d.ts +2 -2
- package/domain/f-connection/redraw-connections/index.d.ts +1 -1
- package/domain/f-connection/redraw-connections/{redraw-connections.execution.d.ts → redraw-connections.d.ts} +3 -3
- package/domain/f-connectors/calculate-source-connectors-to-connect/calculate-source-connectors-to-connect-request.d.ts +8 -0
- package/domain/f-connectors/calculate-source-connectors-to-connect/calculate-source-connectors-to-connect.d.ts +21 -0
- package/domain/f-connectors/calculate-source-connectors-to-connect/index.d.ts +2 -0
- package/domain/f-connectors/calculate-target-connectors-to-connect/calculate-target-connectors-to-connect-request.d.ts +8 -0
- package/domain/f-connectors/calculate-target-connectors-to-connect/calculate-target-connectors-to-connect.d.ts +20 -0
- package/domain/f-connectors/calculate-target-connectors-to-connect/index.d.ts +2 -0
- package/domain/f-connectors/index.d.ts +2 -2
- package/domain/f-connectors/providers.d.ts +3 -3
- package/domain/f-draggable/emit-selection-change-event/emit-selection-change-event.execution.d.ts +1 -1
- package/domain/f-event-trigger.d.ts +1 -1
- package/domain/f-line-alignment/add-line-alignment-to-store/add-line-alignment-to-store-request.d.ts +2 -2
- package/domain/f-line-alignment/add-line-alignment-to-store/{add-line-alignment-to-store.execution.d.ts → add-line-alignment-to-store.d.ts} +4 -4
- package/domain/f-line-alignment/add-line-alignment-to-store/index.d.ts +1 -1
- package/domain/f-line-alignment/providers.d.ts +3 -3
- package/domain/f-line-alignment/remove-line-alignment-from-store/index.d.ts +1 -1
- package/domain/f-line-alignment/remove-line-alignment-from-store/{remove-line-alignment-from-store.execution.d.ts → remove-line-alignment-from-store.d.ts} +4 -4
- package/domain/f-node/add-node-to-store/add-node-to-store-request.d.ts +2 -2
- package/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions-request.d.ts +8 -0
- package/domain/f-node/{calculate-node-connectors-connectable-sides → calculate-connectors-connectable-sides}/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions.d.ts +2 -28
- package/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position.d.ts +52 -0
- package/domain/f-node/calculate-connectors-connectable-sides/calculate-connectors-connectable-sides-request.d.ts +6 -0
- package/domain/f-node/calculate-connectors-connectable-sides/calculate-connectors-connectable-sides.d.ts +22 -0
- package/domain/f-node/calculate-connectors-connectable-sides/constants/calculatable-sides.d.ts +6 -0
- package/domain/f-node/calculate-connectors-connectable-sides/constants/index.d.ts +1 -0
- package/domain/f-node/calculate-connectors-connectable-sides/index.d.ts +7 -0
- package/domain/f-node/calculate-connectors-connectable-sides/models/index.d.ts +1 -0
- package/domain/f-node/calculate-connectors-connectable-sides/models/t-calculate-mode.d.ts +2 -0
- package/domain/f-node/calculate-connectors-connectable-sides/utils/determine-side.d.ts +10 -0
- package/domain/f-node/calculate-connectors-connectable-sides/utils/index.d.ts +2 -0
- package/domain/f-node/calculate-connectors-connectable-sides/utils/is-calculate-mode.d.ts +7 -0
- package/domain/f-node/calculate-input-connections/calculate-input-connections-request.d.ts +2 -2
- package/domain/f-node/calculate-input-connections/calculate-input-connections.d.ts +3 -3
- package/domain/f-node/calculate-nodes-bounding-box/calculate-nodes-bounding-box.d.ts +2 -3
- package/domain/f-node/calculate-output-connections/calculate-output-connections-request.d.ts +2 -2
- package/domain/f-node/calculate-output-connections/calculate-output-connections.d.ts +3 -3
- package/domain/f-node/get-parent-nodes/get-parent-nodes.d.ts +1 -1
- package/domain/f-node/get-parent-nodes/get-parent-nodes.request.d.ts +2 -2
- package/domain/f-node/index.d.ts +1 -2
- package/domain/f-node/providers.d.ts +2 -3
- package/domain/f-node/remove-node-from-store/remove-node-from-store-request.d.ts +2 -2
- package/domain/f-node/remove-node-from-store/remove-node-from-store.d.ts +1 -1
- package/domain/f-selection/select-and-update-node-layer/select-and-update-node-layer.execution.d.ts +2 -2
- package/domain/f-selection/select-and-update-node-layer/select-and-update-node-layer.request.d.ts +2 -2
- package/domain/index.d.ts +1 -0
- package/domain/providers.d.ts +4 -3
- package/domain/update-item-and-children-layers/move-front-elements-before-target-element/index.d.ts +2 -2
- package/domain/update-item-and-children-layers/move-front-elements-before-target-element/{move-front-elements-before-target-element.request.d.ts → move-front-elements-before-target-element-request.d.ts} +4 -4
- package/domain/update-item-and-children-layers/move-front-elements-before-target-element/{move-front-elements-before-target-element.execution.d.ts → move-front-elements-before-target-element.d.ts} +4 -4
- package/esm2022/domain/css-cls.mjs +2 -1
- package/esm2022/domain/drag-rect-cache.mjs +19 -0
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/calculate-connection-line-by-behavior-request.mjs +4 -4
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/calculate-connection-line-by-behavior.mjs +126 -13
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/index.mjs +5 -4
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/models/calculate-behavior-request.mjs +2 -0
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/utils/fixed-center-behavior.mjs +12 -0
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/utils/fixed-outbound-behavior.mjs +31 -0
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/utils/floating-behavior.mjs +22 -0
- package/esm2022/domain/f-connection/providers.mjs +3 -3
- package/esm2022/domain/f-connection/redraw-connections/index.mjs +2 -2
- package/esm2022/domain/f-connection/redraw-connections/redraw-connections.mjs +75 -0
- package/esm2022/domain/f-connectors/calculate-source-connectors-to-connect/calculate-source-connectors-to-connect-request.mjs +10 -0
- package/esm2022/domain/f-connectors/calculate-source-connectors-to-connect/calculate-source-connectors-to-connect.mjs +59 -0
- package/esm2022/domain/f-connectors/calculate-source-connectors-to-connect/index.mjs +3 -0
- package/esm2022/domain/f-connectors/calculate-target-connectors-to-connect/calculate-target-connectors-to-connect-request.mjs +10 -0
- package/esm2022/domain/f-connectors/calculate-target-connectors-to-connect/calculate-target-connectors-to-connect.mjs +64 -0
- package/esm2022/domain/f-connectors/calculate-target-connectors-to-connect/index.mjs +3 -0
- package/esm2022/domain/f-connectors/index.mjs +3 -3
- package/esm2022/domain/f-connectors/providers.mjs +5 -5
- package/esm2022/domain/f-draggable/emit-selection-change-event/emit-selection-change-event-request.mjs +1 -1
- package/esm2022/domain/f-draggable/emit-selection-change-event/emit-selection-change-event.execution.mjs +2 -2
- package/esm2022/domain/f-event-trigger.mjs +2 -2
- package/esm2022/domain/f-line-alignment/add-line-alignment-to-store/add-line-alignment-to-store-request.mjs +4 -4
- package/esm2022/domain/f-line-alignment/add-line-alignment-to-store/add-line-alignment-to-store.mjs +25 -0
- package/esm2022/domain/f-line-alignment/add-line-alignment-to-store/index.mjs +2 -2
- package/esm2022/domain/f-line-alignment/providers.mjs +4 -7
- package/esm2022/domain/f-line-alignment/remove-line-alignment-from-store/index.mjs +2 -2
- package/esm2022/domain/f-line-alignment/remove-line-alignment-from-store/remove-line-alignment-from-store.mjs +25 -0
- package/esm2022/domain/f-node/add-node-to-store/add-node-to-store-request.mjs +4 -4
- package/esm2022/domain/f-node/add-node-to-store/add-node-to-store.mjs +2 -2
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions-request.mjs +10 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions.mjs +59 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/index.mjs +3 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position-request.mjs +8 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position.mjs +132 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-internal-position/index.mjs +3 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectors-connectable-sides-request.mjs +8 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectors-connectable-sides.mjs +73 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/constants/calculatable-sides.mjs +12 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/constants/index.mjs +2 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/index.mjs +8 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/models/index.mjs +2 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/models/t-calculate-mode.mjs +2 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/utils/determine-side.mjs +124 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/utils/index.mjs +3 -0
- package/esm2022/domain/f-node/calculate-connectors-connectable-sides/utils/is-calculate-mode.mjs +12 -0
- package/esm2022/domain/f-node/calculate-input-connections/calculate-input-connections-request.mjs +4 -4
- package/esm2022/domain/f-node/calculate-input-connections/calculate-input-connections.mjs +20 -7
- package/esm2022/domain/f-node/calculate-nodes-bounding-box/calculate-nodes-bounding-box.mjs +5 -8
- package/esm2022/domain/f-node/calculate-nodes-bounding-box-normalized-position/calculate-nodes-bounding-box-normalized-position.mjs +1 -1
- package/esm2022/domain/f-node/calculate-output-connections/calculate-output-connections-request.mjs +4 -4
- package/esm2022/domain/f-node/calculate-output-connections/calculate-output-connections.mjs +20 -7
- package/esm2022/domain/f-node/fit-to-child-nodes-and-groups/fit-to-child-nodes-and-groups-request.mjs +1 -1
- package/esm2022/domain/f-node/get-child-node-ids/get-child-node-ids.request.mjs +1 -1
- package/esm2022/domain/f-node/get-parent-nodes/get-parent-nodes.mjs +8 -8
- package/esm2022/domain/f-node/get-parent-nodes/get-parent-nodes.request.mjs +4 -4
- package/esm2022/domain/f-node/index.mjs +2 -3
- package/esm2022/domain/f-node/providers.mjs +3 -5
- package/esm2022/domain/f-node/remove-node-from-store/remove-node-from-store-request.mjs +4 -4
- package/esm2022/domain/f-node/remove-node-from-store/remove-node-from-store.mjs +3 -3
- package/esm2022/domain/f-node/update-node-when-state-or-size-changed/update-node-when-state-or-size-changed.mjs +3 -3
- package/esm2022/domain/f-selection/select-and-update-node-layer/select-and-update-node-layer.execution.mjs +5 -5
- package/esm2022/domain/f-selection/select-and-update-node-layer/select-and-update-node-layer.request.mjs +4 -4
- package/esm2022/domain/get-normalized-connector-rect/get-normalized-connector-rect-request.mjs +1 -1
- package/esm2022/domain/get-normalized-connector-rect/get-normalized-connector-rect.execution.mjs +2 -2
- package/esm2022/domain/get-normalized-element-rect/get-normalized-element-rect.execution.mjs +2 -14
- package/esm2022/domain/get-normalized-point/get-normalized-point.execution.mjs +4 -1
- package/esm2022/domain/index.mjs +2 -1
- package/esm2022/domain/is-mobile.mjs +5 -3
- package/esm2022/domain/providers.mjs +5 -5
- package/esm2022/domain/update-item-and-children-layers/move-front-elements-before-target-element/index.mjs +3 -3
- package/esm2022/domain/update-item-and-children-layers/move-front-elements-before-target-element/move-front-elements-before-target-element-request.mjs +15 -0
- package/esm2022/domain/update-item-and-children-layers/move-front-elements-before-target-element/move-front-elements-before-target-element.mjs +34 -0
- package/esm2022/f-connection/common/domain/adaptive-curve-builder.mjs +201 -0
- package/esm2022/f-connection/common/domain/index.mjs +2 -1
- package/esm2022/f-connection/common/e-f-connection-connectable-side.mjs +12 -0
- package/esm2022/f-connection/common/e-f-connection-type.mjs +2 -1
- package/esm2022/f-connection/common/f-connection-base.mjs +28 -5
- package/esm2022/f-connection/common/index.mjs +2 -1
- package/esm2022/f-connection/f-connection/f-connection.component.mjs +13 -3
- package/esm2022/f-connection/f-connection-builder/f-connection-factory.mjs +9 -17
- package/esm2022/f-connection/f-connection-content/f-connection-content.mjs +10 -4
- package/esm2022/f-connection/f-connection-content/polyline-content-engine/polyline-content-layout-engine.mjs +4 -5
- package/esm2022/f-connection/f-connection-content/polyline-content-engine/polyline-content-place.mjs +3 -2
- package/esm2022/f-connection/f-connection-for-create/f-connection-for-create.component.mjs +14 -4
- package/esm2022/f-connection/f-snap-connection/f-snap-connection.component.mjs +14 -4
- package/esm2022/f-connectors/f-node-output/f-node-output.directive.mjs +1 -1
- package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/create-connection-preparation-request.mjs +10 -0
- package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/create-connection-preparation.mjs +58 -0
- package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/create-connection-from-output-preparation-request.mjs +10 -0
- package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/create-connection-from-output-preparation.mjs +47 -0
- package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/index.mjs +3 -3
- package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/index.mjs +3 -3
- package/esm2022/f-draggable/f-connection/f-create-connection/f-create-connection.drag-handler.mjs +12 -12
- package/esm2022/f-draggable/f-connection/f-reassign-connection/f-reassign-source.drag-handler.mjs +7 -7
- package/esm2022/f-draggable/f-connection/f-reassign-connection/f-reassign-target.drag-handler.mjs +10 -10
- package/esm2022/f-draggable/f-connection/providers.mjs +4 -4
- package/esm2022/f-draggable/f-draggable.directive.mjs +5 -4
- package/esm2022/f-draggable/f-drop-to-group/drop-to-group-preparation/drop-to-group-preparation-request.mjs +1 -1
- package/esm2022/f-draggable/f-drop-to-group/drop-to-group-preparation/drop-to-group-preparation.mjs +11 -13
- package/esm2022/f-draggable/f-node-move/connection-drag-handlers/base-connection.drag-handler.mjs +3 -3
- package/esm2022/f-draggable/f-node-move/move-preparation/f-node-move-preparation.execution.mjs +14 -12
- package/esm2022/f-draggable/f-node-move/move-preparation/f-node-move-preparation.request.mjs +1 -1
- package/esm2022/f-flow/f-flow.component.mjs +2 -2
- package/esm2022/f-node/f-group.directive.mjs +3 -3
- package/esm2022/f-node/f-node.directive.mjs +3 -3
- package/esm2022/f-storage/f-connectors-store.mjs +11 -0
- package/esm2022/f-storage/index.mjs +2 -1
- package/f-backgroud/providers.d.ts +1 -1
- package/f-connection/common/domain/adaptive-curve-builder.d.ts +102 -0
- package/f-connection/common/domain/index.d.ts +1 -0
- package/f-connection/common/e-f-connection-connectable-side.d.ts +10 -0
- package/f-connection/common/e-f-connection-type.d.ts +2 -1
- package/f-connection/common/f-connection-base.d.ts +14 -2
- package/f-connection/common/index.d.ts +1 -0
- package/f-connection/f-connection/f-connection.component.d.ts +4 -2
- package/f-connection/f-connection-builder/f-connection-factory.d.ts +2 -4
- package/f-connection/f-connection-content/f-connection-content.d.ts +2 -2
- package/f-connection/f-connection-for-create/f-connection-for-create.component.d.ts +4 -2
- package/f-connection/f-snap-connection/f-snap-connection.component.d.ts +4 -2
- package/f-connection/providers.d.ts +1 -1
- package/f-draggable/f-connection/f-create-connection/create-preparation/create-connection-preparation-request.d.ts +8 -0
- package/f-draggable/f-connection/f-create-connection/create-preparation/create-connection-preparation.d.ts +16 -0
- package/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/create-connection-from-output-preparation-request.d.ts +8 -0
- package/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/create-connection-from-output-preparation.d.ts +14 -0
- package/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/index.d.ts +2 -2
- package/f-draggable/f-connection/f-create-connection/create-preparation/index.d.ts +2 -2
- package/f-draggable/f-connection/providers.d.ts +2 -2
- package/f-draggable/f-drop-to-group/drop-to-group-preparation/drop-to-group-preparation-request.d.ts +2 -2
- package/f-draggable/f-drop-to-group/providers.d.ts +1 -1
- package/f-draggable/f-node-move/create-drag-model-from-selection/providers.d.ts +1 -1
- package/f-draggable/f-node-move/move-preparation/f-node-move-preparation.execution.d.ts +1 -1
- package/f-draggable/f-node-move/move-preparation/f-node-move-preparation.request.d.ts +1 -1
- package/f-draggable/f-node-move/providers.d.ts +1 -1
- package/f-draggable/providers.d.ts +1 -1
- package/f-minimap/domain/providers.d.ts +1 -1
- package/f-node/providers.d.ts +1 -1
- package/f-selection-area/domain/providers.d.ts +1 -1
- package/f-storage/f-connectors-store.d.ts +6 -0
- package/f-storage/index.d.ts +1 -0
- package/f-storage/providers.d.ts +1 -1
- package/fesm2022/foblex-flow.mjs +1741 -1235
- package/fesm2022/foblex-flow.mjs.map +1 -1
- package/package.json +1 -1
- package/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.execution.d.ts +0 -17
- package/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.request.d.ts +0 -6
- package/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/index.d.ts +0 -2
- package/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/get-all-can-be-connected-source-connectors-and-rects.execution.d.ts +0 -18
- package/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/get-all-can-be-connected-source-connectors-and-rects.request.d.ts +0 -6
- package/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/index.d.ts +0 -2
- package/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions-request.d.ts +0 -9
- package/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position.d.ts +0 -20
- package/domain/f-node/calculate-node-connectors-connectable-sides/calculate-node-connectors-connectable-sides-request.d.ts +0 -6
- package/domain/f-node/calculate-node-connectors-connectable-sides/calculate-node-connectors-connectable-sides.d.ts +0 -28
- package/domain/f-node/calculate-node-connectors-connectable-sides/index.d.ts +0 -4
- package/domain/f-node/get-nodes/get-nodes-request.d.ts +0 -3
- package/domain/f-node/get-nodes/get-nodes.d.ts +0 -13
- package/domain/f-node/get-nodes/index.d.ts +0 -2
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/fixed-center-behavior.mjs +0 -12
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/fixed-outbound-behavior.mjs +0 -31
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/floating-behavior.mjs +0 -22
- package/esm2022/domain/f-connection/redraw-connections/redraw-connections.execution.mjs +0 -73
- package/esm2022/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.execution.mjs +0 -48
- package/esm2022/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.request.mjs +0 -8
- package/esm2022/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/index.mjs +0 -3
- package/esm2022/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/get-all-can-be-connected-source-connectors-and-rects.execution.mjs +0 -43
- package/esm2022/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/get-all-can-be-connected-source-connectors-and-rects.request.mjs +0 -8
- package/esm2022/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/index.mjs +0 -3
- package/esm2022/domain/f-line-alignment/add-line-alignment-to-store/add-line-alignment-to-store.execution.mjs +0 -25
- package/esm2022/domain/f-line-alignment/remove-line-alignment-from-store/remove-line-alignment-from-store.execution.mjs +0 -25
- package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions-request.mjs +0 -16
- package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions.mjs +0 -181
- package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/index.mjs +0 -3
- package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position-request.mjs +0 -8
- package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position.mjs +0 -55
- package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-internal-position/index.mjs +0 -3
- package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-node-connectors-connectable-sides-request.mjs +0 -8
- package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-node-connectors-connectable-sides.mjs +0 -90
- package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/index.mjs +0 -5
- package/esm2022/domain/f-node/get-nodes/get-nodes-request.mjs +0 -4
- package/esm2022/domain/f-node/get-nodes/get-nodes.mjs +0 -25
- package/esm2022/domain/f-node/get-nodes/index.mjs +0 -3
- package/esm2022/domain/update-item-and-children-layers/move-front-elements-before-target-element/move-front-elements-before-target-element.execution.mjs +0 -34
- package/esm2022/domain/update-item-and-children-layers/move-front-elements-before-target-element/move-front-elements-before-target-element.request.mjs +0 -15
- package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/f-create-connection-preparation.execution.mjs +0 -52
- package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/f-create-connection-preparation.request.mjs +0 -10
- package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/f-create-connection-from-output-preparation.execution.mjs +0 -49
- package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/f-create-connection-from-output-preparation.request.mjs +0 -10
- package/f-draggable/f-connection/f-create-connection/create-preparation/f-create-connection-preparation.execution.d.ts +0 -16
- package/f-draggable/f-connection/f-create-connection/create-preparation/f-create-connection-preparation.request.d.ts +0 -8
- package/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/f-create-connection-from-output-preparation.execution.d.ts +0 -14
- package/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/f-create-connection-from-output-preparation.request.d.ts +0 -8
- /package/domain/f-node/{calculate-node-connectors-connectable-sides → calculate-connectors-connectable-sides}/calculate-connectable-side-by-connected-positions/index.d.ts +0 -0
- /package/domain/f-node/{calculate-node-connectors-connectable-sides → calculate-connectors-connectable-sides}/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position-request.d.ts +0 -0
- /package/domain/f-node/{calculate-node-connectors-connectable-sides → calculate-connectors-connectable-sides}/calculate-connectable-side-by-internal-position/index.d.ts +0 -0
package/fesm2022/foblex-flow.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Injectable, Directive, input, computed, signal, Injector, Renderer2, effect, untracked, DestroyRef, model, output, booleanAttribute, ElementRef, Input, viewChild, Component, ChangeDetectionStrategy,
|
|
2
|
+
import { InjectionToken, inject, Injectable, Directive, input, computed, signal, Injector, Renderer2, effect, untracked, DestroyRef, model, output, booleanAttribute, ElementRef, Input, viewChild, Component, ChangeDetectionStrategy, isDevMode, contentChildren, numberAttribute, ViewContainerRef, TemplateRef, EventEmitter, NgZone, Output, ContentChildren, contentChild, NgModule } from '@angular/core';
|
|
3
3
|
import { RectExtensions, RoundedRect, TransformModelExtensions, PointExtensions, Point, LineExtensions, GetIntersections, SizeExtensions, findClosestAlignment, setRectToElement, adjustRectToMinSize, setRectToViewBox } from '@foblex/2d';
|
|
4
4
|
import { __decorate } from 'tslib';
|
|
5
5
|
import { FExecutionRegister, FMediator } from '@foblex/mediator';
|
|
6
6
|
import { BrowserService, PlatformService, EOperationSystem } from '@foblex/platform';
|
|
7
7
|
import { normalizeDomElementId, castToEnum, isClosestElementHasClass, flatMap, getOrCreateRootNodeForViewRef, deepCloneNode, disableDragInteractions, extendStyles, getDataAttrValueFromClosestElementWithClass } from '@foblex/utils';
|
|
8
|
+
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
8
9
|
import { CommonModule } from '@angular/common';
|
|
9
10
|
|
|
10
11
|
const F_BACKGROUND_PATTERN = new InjectionToken('F_BACKGROUND_PATTERN');
|
|
@@ -278,6 +279,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
278
279
|
type: Injectable
|
|
279
280
|
}] });
|
|
280
281
|
|
|
282
|
+
class FConnectorsStore {
|
|
283
|
+
_connectors = {};
|
|
284
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectorsStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
285
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectorsStore });
|
|
286
|
+
}
|
|
287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectorsStore, decorators: [{
|
|
288
|
+
type: Injectable
|
|
289
|
+
}] });
|
|
290
|
+
|
|
281
291
|
const F_STORAGE_PROVIDERS = [
|
|
282
292
|
NotifyDataChangedExecution,
|
|
283
293
|
ListenCountChangesExecution,
|
|
@@ -1014,14 +1024,14 @@ function createSVGElement$1(tag, fBrowser) {
|
|
|
1014
1024
|
class CalculateConnectionLineByBehaviorRequest {
|
|
1015
1025
|
sourceRect;
|
|
1016
1026
|
targetRect;
|
|
1017
|
-
|
|
1027
|
+
connection;
|
|
1018
1028
|
sourceConnectableSide;
|
|
1019
1029
|
targetConnectableSide;
|
|
1020
1030
|
static fToken = Symbol('CalculateConnectionLineByBehaviorRequest');
|
|
1021
|
-
constructor(sourceRect, targetRect,
|
|
1031
|
+
constructor(sourceRect, targetRect, connection, sourceConnectableSide, targetConnectableSide) {
|
|
1022
1032
|
this.sourceRect = sourceRect;
|
|
1023
1033
|
this.targetRect = targetRect;
|
|
1024
|
-
this.
|
|
1034
|
+
this.connection = connection;
|
|
1025
1035
|
this.sourceConnectableSide = sourceConnectableSide;
|
|
1026
1036
|
this.targetConnectableSide = targetConnectableSide;
|
|
1027
1037
|
}
|
|
@@ -1429,7 +1439,7 @@ class FGroupDirective extends FNodeBase {
|
|
|
1429
1439
|
this._debounceTimer = setTimeout(() => this._calculateNodeConnectorsConnectableSides(), _DEBOUNCE_TIME$2);
|
|
1430
1440
|
}
|
|
1431
1441
|
_calculateNodeConnectorsConnectableSides() {
|
|
1432
|
-
this._mediator.execute(new
|
|
1442
|
+
this._mediator.execute(new CalculateConnectorsConnectableSidesRequest(this));
|
|
1433
1443
|
}
|
|
1434
1444
|
ngAfterViewInit() {
|
|
1435
1445
|
if (!this.browser.isBrowser()) {
|
|
@@ -1556,7 +1566,7 @@ class FNodeDirective extends FNodeBase {
|
|
|
1556
1566
|
this._debounceTimer = setTimeout(() => this._calculateNodeConnectorsConnectableSides(), _DEBOUNCE_TIME$1);
|
|
1557
1567
|
}
|
|
1558
1568
|
_calculateNodeConnectorsConnectableSides() {
|
|
1559
|
-
this._mediator.execute(new
|
|
1569
|
+
this._mediator.execute(new CalculateConnectorsConnectableSidesRequest(this));
|
|
1560
1570
|
}
|
|
1561
1571
|
ngAfterViewInit() {
|
|
1562
1572
|
if (!this.browser.isBrowser()) {
|
|
@@ -1860,6 +1870,205 @@ const F_CONNECTORS_PROVIDERS = [
|
|
|
1860
1870
|
FNodeOutputDirective,
|
|
1861
1871
|
];
|
|
1862
1872
|
|
|
1873
|
+
/**
|
|
1874
|
+
* AdaptiveCurveBuilder
|
|
1875
|
+
*
|
|
1876
|
+
* Builds a smooth **adaptive connector curve** between two points using a cubic Bézier path,
|
|
1877
|
+
* but with control points computed differently from a classic “Bezier” connector.
|
|
1878
|
+
*
|
|
1879
|
+
* Key differences from a classic Bézier builder:
|
|
1880
|
+
* - Control handles are **aligned with the port side** (LEFT/RIGHT/TOP/BOTTOM),
|
|
1881
|
+
* yet are **slightly blended toward the target direction** to reduce harsh S-shapes.
|
|
1882
|
+
* - Handle lengths are **adaptive**: based on the `offset` (your “padding” from ports)
|
|
1883
|
+
* and the projected distance along the side’s axis. This produces a subtler curvature
|
|
1884
|
+
* and a distinct look & feel compared to a standard Bézier connector.
|
|
1885
|
+
*
|
|
1886
|
+
* Compatibility:
|
|
1887
|
+
* - Implements {@link IFConnectionBuilder}; output shape is the same:
|
|
1888
|
+
* SVG path, sampled points for hit-testing, and connection center.
|
|
1889
|
+
* - Only the four base sides are expected to be passed here:
|
|
1890
|
+
* {@link EFConnectableSide.LEFT}, {@link EFConnectableSide.RIGHT},
|
|
1891
|
+
* {@link EFConnectableSide.TOP}, {@link EFConnectableSide.BOTTOM}.
|
|
1892
|
+
*
|
|
1893
|
+
* Usage example:
|
|
1894
|
+
* ```ts
|
|
1895
|
+
* const builder = new AdaptiveCurveBuilder();
|
|
1896
|
+
* const res = builder.handle({
|
|
1897
|
+
* source: { x: 100, y: 120 },
|
|
1898
|
+
* sourceSide: EFConnectableSide.RIGHT,
|
|
1899
|
+
* target: { x: 340, y: 220 },
|
|
1900
|
+
* targetSide: EFConnectableSide.LEFT,
|
|
1901
|
+
* offset: 16, // acts as padding + minimal handle baseline
|
|
1902
|
+
* });
|
|
1903
|
+
* // res.path -> SVG "M … C …" string
|
|
1904
|
+
* // res.points -> sampled points along the curve
|
|
1905
|
+
* ```
|
|
1906
|
+
*/
|
|
1907
|
+
class AdaptiveCurveBuilder {
|
|
1908
|
+
/**
|
|
1909
|
+
* Returns a unit direction vector for a given side.
|
|
1910
|
+
*
|
|
1911
|
+
* @param side - One of LEFT/RIGHT/TOP/BOTTOM.
|
|
1912
|
+
* @returns Unit vector pointing outwards from the side.
|
|
1913
|
+
* @remarks
|
|
1914
|
+
* Only base sides should reach this builder. A fallback `{0,0}` is returned
|
|
1915
|
+
* defensively, but should not occur in normal usage.
|
|
1916
|
+
*/
|
|
1917
|
+
static _dir(side) {
|
|
1918
|
+
switch (side) {
|
|
1919
|
+
case EFConnectableSide.LEFT:
|
|
1920
|
+
return { x: -1, y: 0 };
|
|
1921
|
+
case EFConnectableSide.RIGHT:
|
|
1922
|
+
return { x: 1, y: 0 };
|
|
1923
|
+
case EFConnectableSide.TOP:
|
|
1924
|
+
return { x: 0, y: -1 };
|
|
1925
|
+
case EFConnectableSide.BOTTOM:
|
|
1926
|
+
return { x: 0, y: 1 };
|
|
1927
|
+
}
|
|
1928
|
+
return { x: 0, y: 0 };
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* Checks whether a side is horizontal (LEFT/RIGHT).
|
|
1932
|
+
*
|
|
1933
|
+
* @param side - Side to check.
|
|
1934
|
+
* @returns `true` for LEFT/RIGHT, otherwise `false`.
|
|
1935
|
+
*/
|
|
1936
|
+
static _isH(side) {
|
|
1937
|
+
return side === EFConnectableSide.LEFT || side === EFConnectableSide.RIGHT;
|
|
1938
|
+
}
|
|
1939
|
+
/**
|
|
1940
|
+
* Computes a **soft** handle length for a control point.
|
|
1941
|
+
*
|
|
1942
|
+
* The handle length is derived from:
|
|
1943
|
+
* - `offset` (acts as padding & the baseline handle),
|
|
1944
|
+
* - distance projected along the side’s axis (dx for horizontal, dy for vertical),
|
|
1945
|
+
* - a conservative upper bound to avoid bloated curves.
|
|
1946
|
+
*
|
|
1947
|
+
* @param p0 - Start (or end) point of the segment.
|
|
1948
|
+
* @param p3 - Opposite end (or start) point.
|
|
1949
|
+
* @param side - Side at which the handle originates.
|
|
1950
|
+
* @param offset - Visual padding/minimal handle baseline (must be ≥ 0).
|
|
1951
|
+
* @returns A bounded positive handle length.
|
|
1952
|
+
*/
|
|
1953
|
+
static _handleLen(p0, p3, side, offset) {
|
|
1954
|
+
const dx = Math.abs(p3.x - p0.x);
|
|
1955
|
+
const dy = Math.abs(p3.y - p0.y);
|
|
1956
|
+
const d = Math.hypot(dx, dy);
|
|
1957
|
+
const along = this._isH(side) ? dx : dy;
|
|
1958
|
+
const MIN = Math.max(8, offset);
|
|
1959
|
+
const MAX = offset + 0.5 * d; // upper cap to keep the shape compact
|
|
1960
|
+
const len = offset * 1.05 + along * 0.3; // moderate growth along the axis
|
|
1961
|
+
return Math.min(MAX, Math.max(MIN, len));
|
|
1962
|
+
}
|
|
1963
|
+
/**
|
|
1964
|
+
* Computes a control point by taking the side direction and **lightly blending**
|
|
1965
|
+
* it toward the target direction. This reduces harsh inflections while keeping
|
|
1966
|
+
* the perceptual attachment to the port side.
|
|
1967
|
+
*
|
|
1968
|
+
* @param side - Base side defining the primary direction (LEFT/RIGHT/TOP/BOTTOM).
|
|
1969
|
+
* @param source - Anchor point where the control handle is attached.
|
|
1970
|
+
* @param target - Opposite end; used to orient the handle slightly toward the goal.
|
|
1971
|
+
* @param handle - Handle length (see {@link _handleLen}).
|
|
1972
|
+
* @returns Control point coordinates for the cubic Bézier segment.
|
|
1973
|
+
*/
|
|
1974
|
+
static _softControl(side, source, target, handle) {
|
|
1975
|
+
const v = this._dir(side);
|
|
1976
|
+
const dx = target.x - source.x;
|
|
1977
|
+
const dy = target.y - source.y;
|
|
1978
|
+
const dist = Math.hypot(dx, dy) || 1;
|
|
1979
|
+
const tx = dx / dist;
|
|
1980
|
+
const ty = dy / dist;
|
|
1981
|
+
// Orientation of side vs. target direction (in [-1, 1])
|
|
1982
|
+
const dot = v.x * tx + v.y * ty;
|
|
1983
|
+
// Small base blend toward the target; slightly increase if the side points away.
|
|
1984
|
+
const baseBlend = 0.12;
|
|
1985
|
+
const extra = Math.max(0, -dot) * 0.08; // add a bit when pointing “backwards”
|
|
1986
|
+
const blend = Math.min(0.2, baseBlend + extra);
|
|
1987
|
+
const dirX = v.x * (1 - blend) + tx * blend;
|
|
1988
|
+
const dirY = v.y * (1 - blend) + ty * blend;
|
|
1989
|
+
const len = Math.hypot(dirX, dirY) || 1;
|
|
1990
|
+
return { x: source.x + (dirX / len) * handle, y: source.y + (dirY / len) * handle };
|
|
1991
|
+
}
|
|
1992
|
+
/**
|
|
1993
|
+
* Builds an adaptive connector between `source` and `target`.
|
|
1994
|
+
*
|
|
1995
|
+
* @param request - Connection build request.
|
|
1996
|
+
* @param request.source - Start point of the connector.
|
|
1997
|
+
* @param request.sourceSide - Side at the source port (LEFT/RIGHT/TOP/BOTTOM).
|
|
1998
|
+
* @param request.target - End point of the connector.
|
|
1999
|
+
* @param request.targetSide - Side at the target port (LEFT/RIGHT/TOP/BOTTOM).
|
|
2000
|
+
* @param request.offset - Visual padding & minimal handle baseline (≥ 0).
|
|
2001
|
+
*
|
|
2002
|
+
* @returns Standard {@link IFConnectionBuilderResponse}:
|
|
2003
|
+
* - `path`: SVG cubic path (“M … C …”),
|
|
2004
|
+
* - `points`: discretized samples along the curve,
|
|
2005
|
+
* - `connectionCenter`: approximate visual center for labeling/interaction,
|
|
2006
|
+
* - `secondPoint`/`penultimatePoint`: first/second control points (for tooling).
|
|
2007
|
+
*
|
|
2008
|
+
* @remarks
|
|
2009
|
+
* The returned path slightly offsets the end point by +0.0002 on both axes
|
|
2010
|
+
* to avoid edge cases in some renderers and hit-testing implementations.
|
|
2011
|
+
*/
|
|
2012
|
+
handle(request) {
|
|
2013
|
+
const { source, sourceSide, target, targetSide } = request;
|
|
2014
|
+
const offset = Math.max(0, request.offset ?? 0);
|
|
2015
|
+
const p0 = { x: source.x, y: source.y };
|
|
2016
|
+
const p3 = { x: target.x, y: target.y };
|
|
2017
|
+
const h0 = AdaptiveCurveBuilder._handleLen(p0, p3, sourceSide, offset);
|
|
2018
|
+
const h3 = AdaptiveCurveBuilder._handleLen(p3, p0, targetSide, offset);
|
|
2019
|
+
const c1 = AdaptiveCurveBuilder._softControl(sourceSide, p0, p3, h0);
|
|
2020
|
+
const c2 = AdaptiveCurveBuilder._softControl(targetSide, p3, p0, h3);
|
|
2021
|
+
const path = `M ${p0.x} ${p0.y} C ${c1.x} ${c1.y}, ${c2.x} ${c2.y}, ${p3.x + 0.0002} ${p3.y + 0.0002}`;
|
|
2022
|
+
const connectionCenter = new CalculateConnectionCenterHandler().handle(new CalculateConnectionCenterRequest([p0, c1, c2, p3]));
|
|
2023
|
+
return {
|
|
2024
|
+
path,
|
|
2025
|
+
connectionCenter,
|
|
2026
|
+
secondPoint: c1,
|
|
2027
|
+
penultimatePoint: c2,
|
|
2028
|
+
points: _sampleCubic$1(p0, c1, c2, p3, 32),
|
|
2029
|
+
};
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
/**
|
|
2033
|
+
* Evaluates a cubic Bézier at parameter `t` in [0, 1].
|
|
2034
|
+
*
|
|
2035
|
+
* @param p0 - Start point.
|
|
2036
|
+
* @param p1 - First control point.
|
|
2037
|
+
* @param p2 - Second control point.
|
|
2038
|
+
* @param p3 - End point.
|
|
2039
|
+
* @param t - Parameter in [0, 1].
|
|
2040
|
+
* @returns Point on the curve at `t`.
|
|
2041
|
+
*/
|
|
2042
|
+
function bez3$1(p0, p1, p2, p3, t) {
|
|
2043
|
+
const u = 1 - t, tt = t * t, uu = u * u, uuu = uu * u, ttt = tt * t;
|
|
2044
|
+
return {
|
|
2045
|
+
x: uuu * p0.x + 3 * uu * t * p1.x + 3 * u * tt * p2.x + ttt * p3.x,
|
|
2046
|
+
y: uuu * p0.y + 3 * uu * t * p1.y + 3 * u * tt * p2.y + ttt * p3.y,
|
|
2047
|
+
};
|
|
2048
|
+
}
|
|
2049
|
+
/**
|
|
2050
|
+
* Uniformly samples a cubic Bézier segment.
|
|
2051
|
+
*
|
|
2052
|
+
* @param p0 - Start point.
|
|
2053
|
+
* @param p1 - First control point.
|
|
2054
|
+
* @param p2 - Second control point.
|
|
2055
|
+
* @param p3 - End point.
|
|
2056
|
+
* @param samples - Number of sub-segments (default: 32). The function returns `samples + 1` points.
|
|
2057
|
+
* @returns Array of sampled points including both endpoints.
|
|
2058
|
+
* @remarks
|
|
2059
|
+
* Sampling is uniform in parameter `t`, not in arc length. This is typically
|
|
2060
|
+
* sufficient for hit-testing and bounding boxes; if you need error-bounded
|
|
2061
|
+
* flattening, consider an adaptive subdivision strategy instead.
|
|
2062
|
+
*/
|
|
2063
|
+
function _sampleCubic$1(p0, p1, p2, p3, samples = 32) {
|
|
2064
|
+
const out = new Array(samples + 1);
|
|
2065
|
+
out[0] = { ...p0 };
|
|
2066
|
+
for (let i = 1; i <= samples; i++) {
|
|
2067
|
+
out[i] = bez3$1(p0, p1, p2, p3, i / samples);
|
|
2068
|
+
}
|
|
2069
|
+
return out;
|
|
2070
|
+
}
|
|
2071
|
+
|
|
1863
2072
|
class FBezierPathBuilder {
|
|
1864
2073
|
static _getConnectorOffset(distance, offset) {
|
|
1865
2074
|
if (distance >= offset) {
|
|
@@ -2222,6 +2431,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2222
2431
|
}, providers: [{ provide: CONNECTION_TEXT, useExisting: FConnectionTextComponent }], template: "<ng-container xmlns:svg=\"http://www.w3.org/2000/svg\">\n <svg:textPath f-connection-text-path>\n {{ text }}\n </svg:textPath>\n</ng-container>\n" }]
|
|
2223
2432
|
}] });
|
|
2224
2433
|
|
|
2434
|
+
/* eslint-disable */
|
|
2225
2435
|
const F_CSS_CLASS = {
|
|
2226
2436
|
DRAG_AND_DROP: {
|
|
2227
2437
|
DRAGGING: 'f-dragging',
|
|
@@ -2439,34 +2649,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2439
2649
|
const F_CONNECTION_BUILDERS = new InjectionToken('F_CONNECTION_BUILDERS');
|
|
2440
2650
|
|
|
2441
2651
|
class FConnectionFactory {
|
|
2442
|
-
|
|
2652
|
+
_builders = {
|
|
2443
2653
|
[EFConnectionType.STRAIGHT]: new FStraightPathBuilder(),
|
|
2444
2654
|
[EFConnectionType.BEZIER]: new FBezierPathBuilder(),
|
|
2655
|
+
[EFConnectionType.ADAPTIVE_CURVE]: new AdaptiveCurveBuilder(),
|
|
2445
2656
|
[EFConnectionType.SEGMENT]: new FSegmentPathBuilder(),
|
|
2657
|
+
...(inject(F_CONNECTION_BUILDERS, { optional: true }) || {}),
|
|
2446
2658
|
};
|
|
2447
|
-
constructor(builders) {
|
|
2448
|
-
if (builders) {
|
|
2449
|
-
this.builders = { ...this.builders, ...builders };
|
|
2450
|
-
}
|
|
2451
|
-
}
|
|
2452
2659
|
handle(request) {
|
|
2453
|
-
const builder = this.
|
|
2660
|
+
const builder = this._builders[request.type];
|
|
2454
2661
|
if (!builder) {
|
|
2455
2662
|
throw new Error(`FConnectionBuilder not found for type ${request.type}`);
|
|
2456
2663
|
}
|
|
2457
2664
|
return builder.handle(request.payload);
|
|
2458
2665
|
}
|
|
2459
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionFactory, deps: [
|
|
2666
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2460
2667
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionFactory });
|
|
2461
2668
|
}
|
|
2462
2669
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionFactory, decorators: [{
|
|
2463
2670
|
type: Injectable
|
|
2464
|
-
}]
|
|
2465
|
-
type: Optional
|
|
2466
|
-
}, {
|
|
2467
|
-
type: Inject,
|
|
2468
|
-
args: [F_CONNECTION_BUILDERS]
|
|
2469
|
-
}] }] });
|
|
2671
|
+
}] });
|
|
2470
2672
|
|
|
2471
2673
|
let warnedFConnectionCenter = false;
|
|
2472
2674
|
/** @deprecated '[fConnectionCenter] is deprecated and will be removed in v18.0.0. Use FConnectionContent directive instead.' */
|
|
@@ -2749,7 +2951,7 @@ class PolylineContentPlace {
|
|
|
2749
2951
|
return { x, y };
|
|
2750
2952
|
}
|
|
2751
2953
|
_sizeAlongDirection(element, dir) {
|
|
2752
|
-
const rect =
|
|
2954
|
+
const rect = DragRectCache.fromElement(element);
|
|
2753
2955
|
return Math.abs(dir.x) * rect.width + Math.abs(dir.y) * rect.height;
|
|
2754
2956
|
}
|
|
2755
2957
|
_normalize180(angleDeg) {
|
|
@@ -2790,16 +2992,15 @@ class ConnectionContentLayoutEngine {
|
|
|
2790
2992
|
const total = sampler.totalLength;
|
|
2791
2993
|
for (const item of contents) {
|
|
2792
2994
|
const { position, rotationDeg } = this._placement.compute(sampler, item);
|
|
2793
|
-
|
|
2794
|
-
item.hostElement.setAttribute('style', style);
|
|
2995
|
+
item.hostElement.style.transform = this._createTransformString(position, rotationDeg);
|
|
2795
2996
|
}
|
|
2796
2997
|
return total;
|
|
2797
2998
|
}
|
|
2798
2999
|
_createTransformString(position, rotationDeg) {
|
|
2799
|
-
return `position
|
|
3000
|
+
return `translate3d(${position.x}px, ${position.y}px, 0) translate(-50%, -50%) rotate(${rotationDeg}deg)`;
|
|
2800
3001
|
}
|
|
2801
3002
|
}
|
|
2802
|
-
function calculatePathPointsIfEmpty({ point1, point2 }, { secondPoint, connectionCenter, penultimatePoint }) {
|
|
3003
|
+
function calculatePathPointsIfEmpty({ point1, point2 }, { secondPoint, connectionCenter, penultimatePoint, }) {
|
|
2803
3004
|
return [point1, secondPoint || point1, connectionCenter, penultimatePoint || point2, point2];
|
|
2804
3005
|
}
|
|
2805
3006
|
|
|
@@ -2847,7 +3048,10 @@ class FConnectionContent {
|
|
|
2847
3048
|
* - `0.5` — at the middle of the connection (default).
|
|
2848
3049
|
*/
|
|
2849
3050
|
position = input(0.5, {
|
|
2850
|
-
transform: (
|
|
3051
|
+
transform: (x) => {
|
|
3052
|
+
const v = coerceNumberProperty(x);
|
|
3053
|
+
return v < 0 ? 0 : v > 1 ? 1 : v;
|
|
3054
|
+
},
|
|
2851
3055
|
});
|
|
2852
3056
|
/**
|
|
2853
3057
|
* Perpendicular offset from the connection line (in pixels).
|
|
@@ -2857,7 +3061,9 @@ class FConnectionContent {
|
|
|
2857
3061
|
* - Negative values shift it to the left.
|
|
2858
3062
|
* - Default: `0` (no shift).
|
|
2859
3063
|
*/
|
|
2860
|
-
offset = input(0
|
|
3064
|
+
offset = input(0, {
|
|
3065
|
+
transform: (x) => coerceNumberProperty(x),
|
|
3066
|
+
});
|
|
2861
3067
|
/**
|
|
2862
3068
|
* Controls the orientation (rotation) of the content relative to the connection.
|
|
2863
3069
|
*
|
|
@@ -2893,6 +3099,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2893
3099
|
}]
|
|
2894
3100
|
}] });
|
|
2895
3101
|
|
|
3102
|
+
var EFConnectionConnectableSide;
|
|
3103
|
+
(function (EFConnectionConnectableSide) {
|
|
3104
|
+
EFConnectionConnectableSide["DEFAULT"] = "default";
|
|
3105
|
+
EFConnectionConnectableSide["TOP"] = "top";
|
|
3106
|
+
EFConnectionConnectableSide["BOTTOM"] = "bottom";
|
|
3107
|
+
EFConnectionConnectableSide["LEFT"] = "left";
|
|
3108
|
+
EFConnectionConnectableSide["RIGHT"] = "right";
|
|
3109
|
+
EFConnectionConnectableSide["CALCULATE"] = "calculate";
|
|
3110
|
+
EFConnectionConnectableSide["CALCULATE_HORIZONTAL"] = "calculate_horizontal";
|
|
3111
|
+
EFConnectionConnectableSide["CALCULATE_VERTICAL"] = "calculate_vertical";
|
|
3112
|
+
})(EFConnectionConnectableSide || (EFConnectionConnectableSide = {}));
|
|
3113
|
+
|
|
2896
3114
|
const MIXIN_BASE = mixinChangeSelection(mixinChangeVisibility(class {
|
|
2897
3115
|
hostElement;
|
|
2898
3116
|
constructor(hostElement) {
|
|
@@ -2922,6 +3140,10 @@ class FConnectionBase extends MIXIN_BASE {
|
|
|
2922
3140
|
fConnectionContents = contentChildren(FConnectionContent, {
|
|
2923
3141
|
descendants: true,
|
|
2924
3142
|
});
|
|
3143
|
+
fInputSide = signal(EFConnectionConnectableSide.DEFAULT);
|
|
3144
|
+
_sourceSide = EFConnectableSide.AUTO;
|
|
3145
|
+
fOutputSide = signal(EFConnectionConnectableSide.DEFAULT);
|
|
3146
|
+
_targetSide = EFConnectableSide.AUTO;
|
|
2925
3147
|
_penultimatePoint = PointExtensions.initialize();
|
|
2926
3148
|
_secondPoint = PointExtensions.initialize();
|
|
2927
3149
|
constructor() {
|
|
@@ -2935,9 +3157,9 @@ class FConnectionBase extends MIXIN_BASE {
|
|
|
2935
3157
|
isContains(element) {
|
|
2936
3158
|
return (this.hostElement.firstChild?.lastChild).contains(element);
|
|
2937
3159
|
}
|
|
2938
|
-
setLine({ point1, point2 }
|
|
3160
|
+
setLine({ point1, point2 }) {
|
|
2939
3161
|
this.line = LineExtensions.initialize(point1, point2);
|
|
2940
|
-
const pathResult = this._getPathResult(point1,
|
|
3162
|
+
const pathResult = this._getPathResult(point1, point2);
|
|
2941
3163
|
this.path = pathResult.path;
|
|
2942
3164
|
this._penultimatePoint = pathResult.penultimatePoint || point1;
|
|
2943
3165
|
this._secondPoint = pathResult.secondPoint || point2;
|
|
@@ -2947,12 +3169,19 @@ class FConnectionBase extends MIXIN_BASE {
|
|
|
2947
3169
|
_contents() {
|
|
2948
3170
|
return Array.from(this.fConnectionContents()?.values() ?? []);
|
|
2949
3171
|
}
|
|
2950
|
-
_getPathResult(source,
|
|
3172
|
+
_getPathResult(source, target) {
|
|
2951
3173
|
const radius = this.fRadius > 0 ? this.fRadius : 0;
|
|
2952
3174
|
const offset = this.fOffset > 0 ? this.fOffset : 1;
|
|
2953
3175
|
return this._connectionFactory.handle({
|
|
2954
3176
|
type: this.fType,
|
|
2955
|
-
payload: {
|
|
3177
|
+
payload: {
|
|
3178
|
+
source,
|
|
3179
|
+
sourceSide: this._sourceSide,
|
|
3180
|
+
target,
|
|
3181
|
+
targetSide: this._targetSide,
|
|
3182
|
+
radius,
|
|
3183
|
+
offset,
|
|
3184
|
+
},
|
|
2956
3185
|
});
|
|
2957
3186
|
}
|
|
2958
3187
|
_createTransformString(position, rotate = 0) {
|
|
@@ -2972,6 +3201,16 @@ class FConnectionBase extends MIXIN_BASE {
|
|
|
2972
3201
|
this.fDragHandleStart()?.redraw(this._secondPoint, this.line.point1);
|
|
2973
3202
|
this.fTextComponent().redraw(this.line);
|
|
2974
3203
|
}
|
|
3204
|
+
/**
|
|
3205
|
+
* Applies the resolved sides to the connection. Don't call this method directly; it's used internally.
|
|
3206
|
+
*
|
|
3207
|
+
* @param sourceSide The resolved side for the source element.
|
|
3208
|
+
* @param targetSide The resolved side for the target element.
|
|
3209
|
+
*/
|
|
3210
|
+
_applyResolvedSidesToConnection(sourceSide, targetSide) {
|
|
3211
|
+
this._sourceSide = sourceSide;
|
|
3212
|
+
this._targetSide = targetSide;
|
|
3213
|
+
}
|
|
2975
3214
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2976
3215
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "18.2.13", type: FConnectionBase, inputs: { fStartColor: { classPropertyName: "fStartColor", publicName: "fStartColor", isSignal: true, isRequired: false, transformFunction: null }, fEndColor: { classPropertyName: "fEndColor", publicName: "fEndColor", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true, isSignal: true }, { propertyName: "fConnectionContents", predicate: FConnectionContent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, isSignal: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, isSignal: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, isSignal: true }, { propertyName: "fDragHandleStart", first: true, predicate: FConnectionDragHandleStartComponent, descendants: true, isSignal: true }, { propertyName: "fDragHandleEnd", first: true, predicate: FConnectionDragHandleEndComponent, descendants: true, isSignal: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, isSignal: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, isSignal: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 });
|
|
2977
3216
|
}
|
|
@@ -2991,6 +3230,7 @@ var EFConnectionType;
|
|
|
2991
3230
|
EFConnectionType["SEGMENT"] = "segment";
|
|
2992
3231
|
EFConnectionType["STRAIGHT"] = "straight";
|
|
2993
3232
|
EFConnectionType["BEZIER"] = "bezier";
|
|
3233
|
+
EFConnectionType["ADAPTIVE_CURVE"] = "adaptive-curve";
|
|
2994
3234
|
})(EFConnectionType || (EFConnectionType = {}));
|
|
2995
3235
|
|
|
2996
3236
|
let uniqueId$6 = 0;
|
|
@@ -3004,6 +3244,16 @@ class FConnectionForCreateComponent extends FConnectionBase {
|
|
|
3004
3244
|
fOffset = 12;
|
|
3005
3245
|
fBehavior = EFConnectionBehavior.FIXED;
|
|
3006
3246
|
fType = EFConnectionType.STRAIGHT;
|
|
3247
|
+
fInputSide = input(EFConnectionConnectableSide.DEFAULT, {
|
|
3248
|
+
transform: (x) => {
|
|
3249
|
+
return castToEnum(x, 'fInputSide', EFConnectionConnectableSide);
|
|
3250
|
+
},
|
|
3251
|
+
});
|
|
3252
|
+
fOutputSide = input(EFConnectionConnectableSide.DEFAULT, {
|
|
3253
|
+
transform: (x) => {
|
|
3254
|
+
return castToEnum(x, 'fOutputSide', EFConnectionConnectableSide);
|
|
3255
|
+
},
|
|
3256
|
+
});
|
|
3007
3257
|
get boundingElement() {
|
|
3008
3258
|
return this.fPath().hostElement;
|
|
3009
3259
|
}
|
|
@@ -3021,7 +3271,7 @@ class FConnectionForCreateComponent extends FConnectionBase {
|
|
|
3021
3271
|
this._mediator.execute(new RemoveConnectionForCreateFromStoreRequest());
|
|
3022
3272
|
}
|
|
3023
3273
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionForCreateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3024
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FConnectionForCreateComponent, selector: "f-connection-for-create", inputs: { fRadius:
|
|
3274
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FConnectionForCreateComponent, selector: "f-connection-for-create", inputs: { fRadius: { classPropertyName: "fRadius", publicName: "fRadius", isSignal: false, isRequired: false, transformFunction: numberAttribute }, fOffset: { classPropertyName: "fOffset", publicName: "fOffset", isSignal: false, isRequired: false, transformFunction: numberAttribute }, fBehavior: { classPropertyName: "fBehavior", publicName: "fBehavior", isSignal: false, isRequired: false, transformFunction: (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior) }, fType: { classPropertyName: "fType", publicName: "fType", isSignal: false, isRequired: false, transformFunction: null }, fInputSide: { classPropertyName: "fInputSide", publicName: "fInputSide", isSignal: true, isRequired: false, transformFunction: null }, fOutputSide: { classPropertyName: "fOutputSide", publicName: "fOutputSide", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "f-component f-connection f-connection-for-create" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionForCreateComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path [attr.d]=\"path\"></path>\n <circle f-connection-drag-handle-start r=\"8\"></circle>\n <circle f-connection-drag-handle-end r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n@if (fConnectionCenters().length) {\n <div #fConnectionCenter class=\"f-connection-center\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n </div>\n}\n\n@if (fConnectionContents().length) {\n <ng-content select=\"[fConnectionContent]\"></ng-content>\n}\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center,:host .f-connection-content{pointer-events:all}\n"], dependencies: [{ kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionDragHandleStartComponent, selector: "circle[f-connection-drag-handle-start]" }, { kind: "component", type: FConnectionDragHandleEndComponent, selector: "circle[f-connection-drag-handle-end]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3025
3275
|
}
|
|
3026
3276
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionForCreateComponent, decorators: [{
|
|
3027
3277
|
type: Component,
|
|
@@ -3064,6 +3314,16 @@ class FConnectionComponent extends FConnectionBase {
|
|
|
3064
3314
|
alias: 'fReassignDisabled',
|
|
3065
3315
|
transform: booleanAttribute,
|
|
3066
3316
|
});
|
|
3317
|
+
fInputSide = input(EFConnectionConnectableSide.DEFAULT, {
|
|
3318
|
+
transform: (x) => {
|
|
3319
|
+
return castToEnum(x, 'fInputSide', EFConnectionConnectableSide);
|
|
3320
|
+
},
|
|
3321
|
+
});
|
|
3322
|
+
fOutputSide = input(EFConnectionConnectableSide.DEFAULT, {
|
|
3323
|
+
transform: (x) => {
|
|
3324
|
+
return castToEnum(x, 'fOutputSide', EFConnectionConnectableSide);
|
|
3325
|
+
},
|
|
3326
|
+
});
|
|
3067
3327
|
get boundingElement() {
|
|
3068
3328
|
return this.fPath().hostElement;
|
|
3069
3329
|
}
|
|
@@ -3078,7 +3338,7 @@ class FConnectionComponent extends FConnectionBase {
|
|
|
3078
3338
|
this._mediator.execute(new RemoveConnectionFromStoreRequest(this));
|
|
3079
3339
|
}
|
|
3080
3340
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3081
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FConnectionComponent, selector: "f-connection", inputs: { fId: { classPropertyName: "fId", publicName: "fConnectionId", isSignal: true, isRequired: false, transformFunction: null }, fText: { classPropertyName: "fText", publicName: "fText", isSignal: false, isRequired: false, transformFunction: null }, fTextStartOffset: { classPropertyName: "fTextStartOffset", publicName: "fTextStartOffset", isSignal: false, isRequired: false, transformFunction: null }, fOutputId: { classPropertyName: "fOutputId", publicName: "fOutputId", isSignal: true, isRequired: false, transformFunction: null }, fInputId: { classPropertyName: "fInputId", publicName: "fInputId", isSignal: true, isRequired: false, transformFunction: null }, fRadius: { classPropertyName: "fRadius", publicName: "fRadius", isSignal: false, isRequired: false, transformFunction: numberAttribute }, fOffset: { classPropertyName: "fOffset", publicName: "fOffset", isSignal: false, isRequired: false, transformFunction: numberAttribute }, fBehavior: { classPropertyName: "fBehavior", publicName: "fBehavior", isSignal: false, isRequired: false, transformFunction: (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior) }, fType: { classPropertyName: "fType", publicName: "fType", isSignal: false, isRequired: false, transformFunction: null }, fSelectionDisabled: { classPropertyName: "fSelectionDisabled", publicName: "fSelectionDisabled", isSignal: true, isRequired: false, transformFunction: null }, fReassignableStart: { classPropertyName: "fReassignableStart", publicName: "fReassignableStart", isSignal: true, isRequired: false, transformFunction: null }, fDraggingDisabled: { classPropertyName: "fDraggingDisabled", publicName: "fReassignDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "fId()", "class.f-connection-selection-disabled": "fSelectionDisabled()", "class.f-connection-reassign-disabled": "fDraggingDisabled()" }, classAttribute: "f-component f-connection" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }], exportAs: ["fComponent"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n style=\"overflow: visible; display: block; vertical-align: middle;\"\n>\n <defs #defs></defs>\n <ng-content></ng-content>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path [attr.d]=\"path\"></path>\n @if (fReassignableStart()) {\n <circle f-connection-drag-handle-start r=\"8\"></circle>\n }\n <circle f-connection-drag-handle-end r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n</svg>\n@if (fConnectionCenters().length) {\n <div #fConnectionCenter class=\"f-connection-center\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n </div>\n}\n\n@if (fConnectionContents().length) {\n <ng-content select=\"[fConnectionContent]\"></ng-content>\n}\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center,:host .f-connection-content{pointer-events:all}\n"], dependencies: [{ kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionDragHandleStartComponent, selector: "circle[f-connection-drag-handle-start]" }, { kind: "component", type: FConnectionDragHandleEndComponent, selector: "circle[f-connection-drag-handle-end]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3341
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FConnectionComponent, selector: "f-connection", inputs: { fId: { classPropertyName: "fId", publicName: "fConnectionId", isSignal: true, isRequired: false, transformFunction: null }, fText: { classPropertyName: "fText", publicName: "fText", isSignal: false, isRequired: false, transformFunction: null }, fTextStartOffset: { classPropertyName: "fTextStartOffset", publicName: "fTextStartOffset", isSignal: false, isRequired: false, transformFunction: null }, fOutputId: { classPropertyName: "fOutputId", publicName: "fOutputId", isSignal: true, isRequired: false, transformFunction: null }, fInputId: { classPropertyName: "fInputId", publicName: "fInputId", isSignal: true, isRequired: false, transformFunction: null }, fRadius: { classPropertyName: "fRadius", publicName: "fRadius", isSignal: false, isRequired: false, transformFunction: numberAttribute }, fOffset: { classPropertyName: "fOffset", publicName: "fOffset", isSignal: false, isRequired: false, transformFunction: numberAttribute }, fBehavior: { classPropertyName: "fBehavior", publicName: "fBehavior", isSignal: false, isRequired: false, transformFunction: (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior) }, fType: { classPropertyName: "fType", publicName: "fType", isSignal: false, isRequired: false, transformFunction: null }, fSelectionDisabled: { classPropertyName: "fSelectionDisabled", publicName: "fSelectionDisabled", isSignal: true, isRequired: false, transformFunction: null }, fReassignableStart: { classPropertyName: "fReassignableStart", publicName: "fReassignableStart", isSignal: true, isRequired: false, transformFunction: null }, fDraggingDisabled: { classPropertyName: "fDraggingDisabled", publicName: "fReassignDisabled", isSignal: true, isRequired: false, transformFunction: null }, fInputSide: { classPropertyName: "fInputSide", publicName: "fInputSide", isSignal: true, isRequired: false, transformFunction: null }, fOutputSide: { classPropertyName: "fOutputSide", publicName: "fOutputSide", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "fId()", "class.f-connection-selection-disabled": "fSelectionDisabled()", "class.f-connection-reassign-disabled": "fDraggingDisabled()" }, classAttribute: "f-component f-connection" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }], exportAs: ["fComponent"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n style=\"overflow: visible; display: block; vertical-align: middle;\"\n>\n <defs #defs></defs>\n <ng-content></ng-content>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path [attr.d]=\"path\"></path>\n @if (fReassignableStart()) {\n <circle f-connection-drag-handle-start r=\"8\"></circle>\n }\n <circle f-connection-drag-handle-end r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n</svg>\n@if (fConnectionCenters().length) {\n <div #fConnectionCenter class=\"f-connection-center\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n </div>\n}\n\n@if (fConnectionContents().length) {\n <ng-content select=\"[fConnectionContent]\"></ng-content>\n}\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center,:host .f-connection-content{pointer-events:all}\n"], dependencies: [{ kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionDragHandleStartComponent, selector: "circle[f-connection-drag-handle-start]" }, { kind: "component", type: FConnectionDragHandleEndComponent, selector: "circle[f-connection-drag-handle-end]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3082
3342
|
}
|
|
3083
3343
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionComponent, decorators: [{
|
|
3084
3344
|
type: Component,
|
|
@@ -3174,6 +3434,16 @@ class FSnapConnectionComponent extends FConnectionBase {
|
|
|
3174
3434
|
fOffset = 12;
|
|
3175
3435
|
fBehavior = EFConnectionBehavior.FIXED;
|
|
3176
3436
|
fType = EFConnectionType.STRAIGHT;
|
|
3437
|
+
fInputSide = input(EFConnectionConnectableSide.DEFAULT, {
|
|
3438
|
+
transform: (x) => {
|
|
3439
|
+
return castToEnum(x, 'fInputSide', EFConnectionConnectableSide);
|
|
3440
|
+
},
|
|
3441
|
+
});
|
|
3442
|
+
fOutputSide = input(EFConnectionConnectableSide.DEFAULT, {
|
|
3443
|
+
transform: (x) => {
|
|
3444
|
+
return castToEnum(x, 'fOutputSide', EFConnectionConnectableSide);
|
|
3445
|
+
},
|
|
3446
|
+
});
|
|
3177
3447
|
get boundingElement() {
|
|
3178
3448
|
return this.fPath().hostElement;
|
|
3179
3449
|
}
|
|
@@ -3191,7 +3461,7 @@ class FSnapConnectionComponent extends FConnectionBase {
|
|
|
3191
3461
|
this._mediator.execute(new RemoveSnapConnectionFromStoreRequest());
|
|
3192
3462
|
}
|
|
3193
3463
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FSnapConnectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3194
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FSnapConnectionComponent, selector: "f-snap-connection", inputs: { fSnapThreshold:
|
|
3464
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FSnapConnectionComponent, selector: "f-snap-connection", inputs: { fSnapThreshold: { classPropertyName: "fSnapThreshold", publicName: "fSnapThreshold", isSignal: false, isRequired: false, transformFunction: numberAttribute }, fRadius: { classPropertyName: "fRadius", publicName: "fRadius", isSignal: false, isRequired: false, transformFunction: numberAttribute }, fOffset: { classPropertyName: "fOffset", publicName: "fOffset", isSignal: false, isRequired: false, transformFunction: numberAttribute }, fBehavior: { classPropertyName: "fBehavior", publicName: "fBehavior", isSignal: false, isRequired: false, transformFunction: (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior) }, fType: { classPropertyName: "fType", publicName: "fType", isSignal: false, isRequired: false, transformFunction: null }, fInputSide: { classPropertyName: "fInputSide", publicName: "fInputSide", isSignal: true, isRequired: false, transformFunction: null }, fOutputSide: { classPropertyName: "fOutputSide", publicName: "fOutputSide", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "f-component f-connection f-snap-connection" }, providers: [{ provide: F_CONNECTION, useExisting: FSnapConnectionComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path [attr.d]=\"path\"></path>\n <circle f-connection-drag-handle-start r=\"8\"></circle>\n <circle f-connection-drag-handle-end r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n@if (fConnectionCenters().length) {\n <div #fConnectionCenter class=\"f-connection-center\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n </div>\n}\n\n@if (fConnectionContents().length) {\n <ng-content select=\"[fConnectionContent]\"></ng-content>\n}\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center,:host .f-connection-content{pointer-events:all}\n"], dependencies: [{ kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionDragHandleStartComponent, selector: "circle[f-connection-drag-handle-start]" }, { kind: "component", type: FConnectionDragHandleEndComponent, selector: "circle[f-connection-drag-handle-end]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3195
3465
|
}
|
|
3196
3466
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FSnapConnectionComponent, decorators: [{
|
|
3197
3467
|
type: Component,
|
|
@@ -3234,7 +3504,7 @@ const F_CONNECTION_PROVIDERS = [
|
|
|
3234
3504
|
* It constructs a line between the intersections of the connectors rectangles and line from the centers of the connector rectangles
|
|
3235
3505
|
* @param payload
|
|
3236
3506
|
*/
|
|
3237
|
-
function floatingBehavior({ sourceRect, targetRect
|
|
3507
|
+
function floatingBehavior({ sourceRect, targetRect }) {
|
|
3238
3508
|
return _getIntersectionsLine(_fromRoundedRectIntersections(sourceRect, targetRect), _toRoundedRectIntersections(sourceRect, targetRect), sourceRect, targetRect);
|
|
3239
3509
|
}
|
|
3240
3510
|
function _fromRoundedRectIntersections(sourceRect, targetRect) {
|
|
@@ -3255,7 +3525,7 @@ function _getIntersectionsLine(from, to, sourceRect, targetRect) {
|
|
|
3255
3525
|
* It constructs a line between the gravity centers of the connector rectangles
|
|
3256
3526
|
* @param payload
|
|
3257
3527
|
*/
|
|
3258
|
-
function fixedCenterBehavior({ sourceRect, targetRect
|
|
3528
|
+
function fixedCenterBehavior({ sourceRect, targetRect }) {
|
|
3259
3529
|
return {
|
|
3260
3530
|
point1: sourceRect.gravityCenter,
|
|
3261
3531
|
point2: targetRect.gravityCenter,
|
|
@@ -3293,16 +3563,128 @@ function _getPosition(rect, side) {
|
|
|
3293
3563
|
}
|
|
3294
3564
|
|
|
3295
3565
|
/**
|
|
3296
|
-
*
|
|
3566
|
+
* Small epsilon to treat near-zero differences as negligible.
|
|
3567
|
+
*/
|
|
3568
|
+
const EPSILON = 0.5;
|
|
3569
|
+
/**
|
|
3570
|
+
* Registry of all connection behavior handlers.
|
|
3571
|
+
*/
|
|
3572
|
+
const BEHAVIOR_HANDLERS = {
|
|
3573
|
+
[EFConnectionBehavior.FLOATING]: floatingBehavior,
|
|
3574
|
+
[EFConnectionBehavior.FIXED_CENTER]: fixedCenterBehavior,
|
|
3575
|
+
[EFConnectionBehavior.FIXED]: fixedOutboundBehavior,
|
|
3576
|
+
};
|
|
3577
|
+
/**
|
|
3578
|
+
* Calculates connection lines based on behavior rules.
|
|
3579
|
+
* It determines which sides of the source and target should connect,
|
|
3580
|
+
* then delegates to a registered behavior handler.
|
|
3297
3581
|
*/
|
|
3298
3582
|
let CalculateConnectionLineByBehavior = class CalculateConnectionLineByBehavior {
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3583
|
+
/**
|
|
3584
|
+
* Main execution entry point.
|
|
3585
|
+
*
|
|
3586
|
+
* @param request The request containing source, target, and connection details.
|
|
3587
|
+
* @returns A calculated connection line (ILine).
|
|
3588
|
+
*/
|
|
3589
|
+
handle(request) {
|
|
3590
|
+
const vectors = this._calculateDirectionalVectors(request.sourceRect.gravityCenter.x, request.sourceRect.gravityCenter.y, request.targetRect.gravityCenter.x, request.targetRect.gravityCenter.y);
|
|
3591
|
+
const sourceSide = this._determineSourceSide(request, vectors);
|
|
3592
|
+
const targetSide = this._determineTargetSide(request, vectors);
|
|
3593
|
+
request.connection._applyResolvedSidesToConnection(sourceSide, targetSide);
|
|
3594
|
+
const handler = this._getBehaviorHandler(request.connection.fBehavior);
|
|
3595
|
+
return handler({
|
|
3596
|
+
sourceRect: request.sourceRect,
|
|
3597
|
+
targetRect: request.targetRect,
|
|
3598
|
+
sourceConnectableSide: sourceSide,
|
|
3599
|
+
targetConnectableSide: targetSide,
|
|
3600
|
+
});
|
|
3601
|
+
}
|
|
3602
|
+
/**
|
|
3603
|
+
* Computes the directional deltas between two rectangles.
|
|
3604
|
+
*/
|
|
3605
|
+
_calculateDirectionalVectors(sourceX, sourceY, targetX, targetY) {
|
|
3606
|
+
const sourceToTargetX = targetX - sourceX;
|
|
3607
|
+
const sourceToTargetY = targetY - sourceY;
|
|
3608
|
+
return {
|
|
3609
|
+
sourceToTargetX,
|
|
3610
|
+
sourceToTargetY,
|
|
3611
|
+
targetToSourceX: -sourceToTargetX,
|
|
3612
|
+
targetToSourceY: -sourceToTargetY,
|
|
3613
|
+
};
|
|
3614
|
+
}
|
|
3615
|
+
/**
|
|
3616
|
+
* Determines the side for the source element.
|
|
3617
|
+
*/
|
|
3618
|
+
_determineSourceSide(request, vectors) {
|
|
3619
|
+
return this._resolveConnectableSide(request.connection.fOutputSide(), vectors.sourceToTargetX, vectors.sourceToTargetY, request.sourceConnectableSide);
|
|
3620
|
+
}
|
|
3621
|
+
/**
|
|
3622
|
+
* Determines the side for the target element.
|
|
3623
|
+
*/
|
|
3624
|
+
_determineTargetSide(request, vectors) {
|
|
3625
|
+
return this._resolveConnectableSide(request.connection.fInputSide(), vectors.targetToSourceX, vectors.targetToSourceY, request.targetConnectableSide);
|
|
3626
|
+
}
|
|
3627
|
+
/**
|
|
3628
|
+
* Resolves which side of a shape to connect to based on direction, fallback, and connection mode.
|
|
3629
|
+
*
|
|
3630
|
+
* @param requestedSide The side mode (e.g. CALCULATE, CALCULATE_HORIZONTAL, FIXED, etc.).
|
|
3631
|
+
* @param deltaX Difference in X between source and target.
|
|
3632
|
+
* @param deltaY Difference in Y between source and target.
|
|
3633
|
+
* @param fallbackSide The default fallback side if calculation is ambiguous.
|
|
3634
|
+
*/
|
|
3635
|
+
_resolveConnectableSide(requestedSide, deltaX, deltaY, fallbackSide) {
|
|
3636
|
+
if (requestedSide === EFConnectionConnectableSide.DEFAULT) {
|
|
3637
|
+
return fallbackSide;
|
|
3638
|
+
}
|
|
3639
|
+
const absoluteX = Math.abs(deltaX);
|
|
3640
|
+
const absoluteY = Math.abs(deltaY);
|
|
3641
|
+
const isNearZero = absoluteX < EPSILON && absoluteY < EPSILON;
|
|
3642
|
+
if (isNearZero) {
|
|
3643
|
+
return fallbackSide;
|
|
3644
|
+
}
|
|
3645
|
+
const isHorizontalDominant = absoluteX >= absoluteY;
|
|
3646
|
+
switch (requestedSide) {
|
|
3647
|
+
case EFConnectionConnectableSide.CALCULATE:
|
|
3648
|
+
return isHorizontalDominant
|
|
3649
|
+
? deltaX >= 0
|
|
3650
|
+
? EFConnectableSide.RIGHT
|
|
3651
|
+
: EFConnectableSide.LEFT
|
|
3652
|
+
: deltaY >= 0
|
|
3653
|
+
? EFConnectableSide.BOTTOM
|
|
3654
|
+
: EFConnectableSide.TOP;
|
|
3655
|
+
case EFConnectionConnectableSide.CALCULATE_HORIZONTAL:
|
|
3656
|
+
if (absoluteX < EPSILON) {
|
|
3657
|
+
return fallbackSide;
|
|
3658
|
+
}
|
|
3659
|
+
return deltaX >= 0 ? EFConnectableSide.RIGHT : EFConnectableSide.LEFT;
|
|
3660
|
+
case EFConnectionConnectableSide.CALCULATE_VERTICAL:
|
|
3661
|
+
if (absoluteY < EPSILON) {
|
|
3662
|
+
return fallbackSide;
|
|
3663
|
+
}
|
|
3664
|
+
return deltaY >= 0 ? EFConnectableSide.BOTTOM : EFConnectableSide.TOP;
|
|
3665
|
+
case EFConnectionConnectableSide.TOP:
|
|
3666
|
+
return EFConnectableSide.TOP;
|
|
3667
|
+
case EFConnectionConnectableSide.BOTTOM:
|
|
3668
|
+
return EFConnectableSide.BOTTOM;
|
|
3669
|
+
case EFConnectionConnectableSide.LEFT:
|
|
3670
|
+
return EFConnectableSide.LEFT;
|
|
3671
|
+
case EFConnectionConnectableSide.RIGHT:
|
|
3672
|
+
return EFConnectableSide.RIGHT;
|
|
3673
|
+
default:
|
|
3674
|
+
return fallbackSide;
|
|
3675
|
+
}
|
|
3676
|
+
}
|
|
3677
|
+
/**
|
|
3678
|
+
* Returns the appropriate handler for the given connection behavior.
|
|
3679
|
+
*
|
|
3680
|
+
* @throws Error if no handler is registered for the behavior.
|
|
3681
|
+
*/
|
|
3682
|
+
_getBehaviorHandler(behavior) {
|
|
3683
|
+
const handler = BEHAVIOR_HANDLERS[behavior];
|
|
3684
|
+
if (!handler) {
|
|
3685
|
+
throw new Error(`[Behavior] No handler for behavior: ${behavior}`);
|
|
3686
|
+
}
|
|
3687
|
+
return handler;
|
|
3306
3688
|
}
|
|
3307
3689
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectionLineByBehavior, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3308
3690
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectionLineByBehavior });
|
|
@@ -3363,6 +3745,9 @@ let GetNormalizedPointExecution = class GetNormalizedPointExecution {
|
|
|
3363
3745
|
// +------------------------------------------+
|
|
3364
3746
|
// Transform from the browser window to the canvas coordinates:
|
|
3365
3747
|
handle(request) {
|
|
3748
|
+
if (!this._store.flowHost) {
|
|
3749
|
+
return request.position;
|
|
3750
|
+
}
|
|
3366
3751
|
return Point.fromPoint(request.position)
|
|
3367
3752
|
.elementTransform(this._store.flowHost)
|
|
3368
3753
|
.sub(this._transform.scaledPosition)
|
|
@@ -3423,12 +3808,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3423
3808
|
type: Injectable
|
|
3424
3809
|
}] });
|
|
3425
3810
|
|
|
3811
|
+
class DragRectCache {
|
|
3812
|
+
static _cache = new WeakMap();
|
|
3813
|
+
static fromElement(element) {
|
|
3814
|
+
const rect = this._cache.get(element) || RectExtensions.fromElement(element);
|
|
3815
|
+
this._cache.set(element, rect);
|
|
3816
|
+
return rect;
|
|
3817
|
+
}
|
|
3818
|
+
static set(element) {
|
|
3819
|
+
this._cache.set(element, RectExtensions.fromElement(element));
|
|
3820
|
+
}
|
|
3821
|
+
static invalidate(element) {
|
|
3822
|
+
this._cache.delete(element);
|
|
3823
|
+
}
|
|
3824
|
+
static invalidateAll() {
|
|
3825
|
+
this._cache = new WeakMap();
|
|
3826
|
+
}
|
|
3827
|
+
}
|
|
3828
|
+
|
|
3426
3829
|
/**
|
|
3427
3830
|
* Execution that redraws connections in the FComponentsStore.
|
|
3428
3831
|
* It resets connectors, sets markers for temporary and snap connections,
|
|
3429
3832
|
* and sets up connections based on the stored outputs and inputs.
|
|
3430
3833
|
*/
|
|
3431
|
-
let
|
|
3834
|
+
let RedrawConnections = class RedrawConnections {
|
|
3432
3835
|
_mediator = inject(FMediator);
|
|
3433
3836
|
_store = inject(FComponentsStore);
|
|
3434
3837
|
handle(_request) {
|
|
@@ -3442,6 +3845,7 @@ let RedrawConnectionsExecution = class RedrawConnectionsExecution {
|
|
|
3442
3845
|
this._store.fConnections.forEach((x) => {
|
|
3443
3846
|
this._setupConnection(this._getOutput(x.fOutputId()), this._getInput(x.fInputId()), x);
|
|
3444
3847
|
});
|
|
3848
|
+
DragRectCache.invalidateAll();
|
|
3445
3849
|
}
|
|
3446
3850
|
_getOutput(id) {
|
|
3447
3851
|
const result = this._store.fOutputs.find((x) => x.fId() === id);
|
|
@@ -3466,23 +3870,23 @@ let RedrawConnectionsExecution = class RedrawConnectionsExecution {
|
|
|
3466
3870
|
fInput.setConnected(fOutput);
|
|
3467
3871
|
const line = this._getLine(fOutput, fInput, fConnection);
|
|
3468
3872
|
this._setMarkers(fConnection);
|
|
3469
|
-
fConnection.setLine(line
|
|
3873
|
+
fConnection.setLine(line);
|
|
3470
3874
|
fConnection.initialize();
|
|
3471
3875
|
fConnection.isSelected() ? fConnection.markAsSelected() : null;
|
|
3472
3876
|
}
|
|
3473
3877
|
_getLine(output, input, connection) {
|
|
3474
|
-
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(this._mediator.execute(new GetNormalizedConnectorRectRequest(output.hostElement)), this._mediator.execute(new GetNormalizedConnectorRectRequest(input.hostElement)), connection
|
|
3878
|
+
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(this._mediator.execute(new GetNormalizedConnectorRectRequest(output.hostElement)), this._mediator.execute(new GetNormalizedConnectorRectRequest(input.hostElement)), connection, output.fConnectableSide, input.fConnectableSide));
|
|
3475
3879
|
}
|
|
3476
3880
|
_setMarkers(connection) {
|
|
3477
3881
|
this._mediator.execute(new CreateConnectionMarkersRequest(connection));
|
|
3478
3882
|
}
|
|
3479
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3480
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3883
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RedrawConnections, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3884
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RedrawConnections });
|
|
3481
3885
|
};
|
|
3482
|
-
|
|
3886
|
+
RedrawConnections = __decorate([
|
|
3483
3887
|
FExecutionRegister(RedrawConnectionsRequest)
|
|
3484
|
-
],
|
|
3485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3888
|
+
], RedrawConnections);
|
|
3889
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RedrawConnections, decorators: [{
|
|
3486
3890
|
type: Injectable
|
|
3487
3891
|
}] });
|
|
3488
3892
|
|
|
@@ -3600,7 +4004,7 @@ const F_CONNECTION_FEATURES = [
|
|
|
3600
4004
|
AddSnapConnectionToStoreExecution,
|
|
3601
4005
|
CreateConnectionMarkersExecution,
|
|
3602
4006
|
CalculateConnectionLineByBehavior,
|
|
3603
|
-
|
|
4007
|
+
RedrawConnections,
|
|
3604
4008
|
RemoveConnectionForCreateFromStoreExecution,
|
|
3605
4009
|
RemoveConnectionFromStoreExecution,
|
|
3606
4010
|
RemoveConnectionMarkerFromStoreExecution,
|
|
@@ -3839,11 +4243,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3839
4243
|
type: Injectable
|
|
3840
4244
|
}] });
|
|
3841
4245
|
|
|
3842
|
-
class
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
4246
|
+
class CalculateTargetConnectorsToConnectRequest {
|
|
4247
|
+
sourceConnector;
|
|
4248
|
+
pointerPosition;
|
|
4249
|
+
static fToken = Symbol('CalculateTargetConnectorsToConnectRequest');
|
|
4250
|
+
constructor(sourceConnector, pointerPosition) {
|
|
4251
|
+
this.sourceConnector = sourceConnector;
|
|
4252
|
+
this.pointerPosition = pointerPosition;
|
|
3847
4253
|
}
|
|
3848
4254
|
}
|
|
3849
4255
|
|
|
@@ -3879,245 +4285,341 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3879
4285
|
type: Injectable
|
|
3880
4286
|
}] });
|
|
3881
4287
|
|
|
4288
|
+
class AddNodeToStoreRequest {
|
|
4289
|
+
nodeOrGroup;
|
|
4290
|
+
static fToken = Symbol('AddNodeToStoreRequest');
|
|
4291
|
+
constructor(nodeOrGroup) {
|
|
4292
|
+
this.nodeOrGroup = nodeOrGroup;
|
|
4293
|
+
}
|
|
4294
|
+
}
|
|
4295
|
+
|
|
3882
4296
|
/**
|
|
3883
|
-
* Execution that
|
|
4297
|
+
* Execution that adds a Node to the FComponentsStore.
|
|
3884
4298
|
*/
|
|
3885
|
-
let
|
|
3886
|
-
_mediator = inject(FMediator);
|
|
4299
|
+
let AddNodeToStore = class AddNodeToStore {
|
|
3887
4300
|
_store = inject(FComponentsStore);
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
}
|
|
3891
|
-
handle({ outputOrOutlet, }) {
|
|
3892
|
-
return this._getCanBeConnectedInputs(outputOrOutlet).map((x) => {
|
|
3893
|
-
return this._mediator.execute(new GetConnectorAndRectRequest(x));
|
|
3894
|
-
});
|
|
3895
|
-
}
|
|
3896
|
-
_getCanBeConnectedInputs(outputOrOutlet) {
|
|
3897
|
-
let targetConnectors = [];
|
|
3898
|
-
if (outputOrOutlet.hasConnectionLimits) {
|
|
3899
|
-
targetConnectors = this._targetConnectors.filter((x) => outputOrOutlet.canConnectTo(x));
|
|
3900
|
-
}
|
|
3901
|
-
else {
|
|
3902
|
-
targetConnectors = this._targetConnectors.filter((x) => x.canBeConnected);
|
|
3903
|
-
if (!outputOrOutlet.isSelfConnectable) {
|
|
3904
|
-
targetConnectors = this._filterSelfConnectable(targetConnectors, outputOrOutlet);
|
|
3905
|
-
}
|
|
3906
|
-
}
|
|
3907
|
-
return targetConnectors;
|
|
3908
|
-
}
|
|
3909
|
-
_filterSelfConnectable(targetConnectors, outputOrOutlet) {
|
|
3910
|
-
return targetConnectors.filter(({ fNodeId }) => outputOrOutlet.fNodeId !== fNodeId);
|
|
4301
|
+
handle(request) {
|
|
4302
|
+
this._store.addComponent(this._store.fNodes, request.nodeOrGroup);
|
|
3911
4303
|
}
|
|
3912
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3913
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
4304
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddNodeToStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4305
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddNodeToStore });
|
|
3914
4306
|
};
|
|
3915
|
-
|
|
3916
|
-
FExecutionRegister(
|
|
3917
|
-
],
|
|
3918
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
4307
|
+
AddNodeToStore = __decorate([
|
|
4308
|
+
FExecutionRegister(AddNodeToStoreRequest)
|
|
4309
|
+
], AddNodeToStore);
|
|
4310
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddNodeToStore, decorators: [{
|
|
3919
4311
|
type: Injectable
|
|
3920
4312
|
}] });
|
|
3921
4313
|
|
|
3922
|
-
class
|
|
3923
|
-
|
|
3924
|
-
static fToken = Symbol('
|
|
3925
|
-
constructor(
|
|
3926
|
-
this.
|
|
4314
|
+
class CalculateInputConnectionsRequest {
|
|
4315
|
+
nodeOrGroup;
|
|
4316
|
+
static fToken = Symbol('CalculateInputConnectionsRequest');
|
|
4317
|
+
constructor(nodeOrGroup) {
|
|
4318
|
+
this.nodeOrGroup = nodeOrGroup;
|
|
3927
4319
|
}
|
|
3928
4320
|
}
|
|
3929
4321
|
|
|
3930
4322
|
/**
|
|
3931
|
-
* Execution that
|
|
3932
|
-
* along with their rectangles.
|
|
3933
|
-
* Source - Output or Outlet connectors.
|
|
4323
|
+
* Execution that calculates input connections for a given FNode.
|
|
3934
4324
|
*/
|
|
3935
|
-
let
|
|
3936
|
-
_mediator = inject(FMediator);
|
|
4325
|
+
let CalculateInputConnections = class CalculateInputConnections {
|
|
3937
4326
|
_store = inject(FComponentsStore);
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
4327
|
+
handle({ nodeOrGroup }) {
|
|
4328
|
+
const ids = this._collectInputIds(nodeOrGroup);
|
|
4329
|
+
return this._collectConnections(ids);
|
|
4330
|
+
}
|
|
4331
|
+
_collectInputIds(nodeOrGroup) {
|
|
4332
|
+
const ids = new Set();
|
|
4333
|
+
for (const connector of this._store.fInputs) {
|
|
4334
|
+
if (nodeOrGroup.isContains(connector.hostElement)) {
|
|
4335
|
+
ids.add(connector.fId());
|
|
4336
|
+
}
|
|
4337
|
+
}
|
|
4338
|
+
return ids;
|
|
3945
4339
|
}
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
if (
|
|
3950
|
-
result
|
|
4340
|
+
_collectConnections(ids) {
|
|
4341
|
+
const result = [];
|
|
4342
|
+
for (const conn of this._store.fConnections) {
|
|
4343
|
+
if (ids.has(conn.fInputId())) {
|
|
4344
|
+
result.push(conn);
|
|
3951
4345
|
}
|
|
3952
|
-
|
|
3953
|
-
|
|
4346
|
+
}
|
|
4347
|
+
return result;
|
|
3954
4348
|
}
|
|
3955
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3956
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
4349
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateInputConnections, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4350
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateInputConnections });
|
|
3957
4351
|
};
|
|
3958
|
-
|
|
3959
|
-
FExecutionRegister(
|
|
3960
|
-
],
|
|
3961
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
4352
|
+
CalculateInputConnections = __decorate([
|
|
4353
|
+
FExecutionRegister(CalculateInputConnectionsRequest)
|
|
4354
|
+
], CalculateInputConnections);
|
|
4355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateInputConnections, decorators: [{
|
|
3962
4356
|
type: Injectable
|
|
3963
4357
|
}] });
|
|
3964
4358
|
|
|
3965
|
-
class
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
4359
|
+
class CalculateConnectableSideByConnectedPositionsRequest {
|
|
4360
|
+
connector;
|
|
4361
|
+
pointerPosition;
|
|
4362
|
+
static fToken = Symbol('CalculateConnectableSideByConnectedPositionsRequest');
|
|
4363
|
+
constructor(connector, pointerPosition) {
|
|
4364
|
+
this.connector = connector;
|
|
4365
|
+
this.pointerPosition = pointerPosition;
|
|
3970
4366
|
}
|
|
3971
4367
|
}
|
|
3972
4368
|
|
|
3973
4369
|
/**
|
|
3974
|
-
*
|
|
4370
|
+
* Converts allowed sides array to a compact bit mask.
|
|
4371
|
+
* If not provided or empty -> all sides allowed.
|
|
3975
4372
|
*/
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
static fToken = Symbol('RemoveInputFromStoreRequest');
|
|
3998
|
-
constructor(component) {
|
|
3999
|
-
this.component = component;
|
|
4373
|
+
const SNAP_EPS = 2;
|
|
4374
|
+
var SideMask;
|
|
4375
|
+
(function (SideMask) {
|
|
4376
|
+
SideMask[SideMask["NONE"] = 0] = "NONE";
|
|
4377
|
+
SideMask[SideMask["LEFT"] = 1] = "LEFT";
|
|
4378
|
+
SideMask[SideMask["RIGHT"] = 2] = "RIGHT";
|
|
4379
|
+
SideMask[SideMask["TOP"] = 4] = "TOP";
|
|
4380
|
+
SideMask[SideMask["BOTTOM"] = 8] = "BOTTOM";
|
|
4381
|
+
SideMask[SideMask["ALL"] = 15] = "ALL";
|
|
4382
|
+
})(SideMask || (SideMask = {}));
|
|
4383
|
+
/**
|
|
4384
|
+
* Determines final side using ideal side first; if disallowed, picks best fallback.
|
|
4385
|
+
* Inputs are numbers to avoid object wrappers on hot path.
|
|
4386
|
+
*/
|
|
4387
|
+
function determineSide(selfX, selfY, avgX, avgY, allowed) {
|
|
4388
|
+
const allowedMask = _toSideMask(allowed);
|
|
4389
|
+
const dx = avgX - selfX;
|
|
4390
|
+
const dy = avgY - selfY;
|
|
4391
|
+
const ideal = _pickIdealSide(dx, dy);
|
|
4392
|
+
if (_isAllowed(ideal, allowedMask)) {
|
|
4393
|
+
return ideal;
|
|
4000
4394
|
}
|
|
4395
|
+
return _pickFallbackSide(dx, dy, allowedMask, ideal);
|
|
4001
4396
|
}
|
|
4002
|
-
|
|
4003
4397
|
/**
|
|
4004
|
-
*
|
|
4398
|
+
* Converts allowed sides array to a compact bit mask.
|
|
4399
|
+
* If not provided or empty -> all sides allowed.
|
|
4005
4400
|
*/
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
this.fComponent = fComponent;
|
|
4401
|
+
function _toSideMask(allowed) {
|
|
4402
|
+
if (!allowed || allowed.length === 0)
|
|
4403
|
+
return SideMask.ALL;
|
|
4404
|
+
let mask = SideMask.NONE;
|
|
4405
|
+
for (let i = 0; i < allowed.length; i++) {
|
|
4406
|
+
switch (allowed[i]) {
|
|
4407
|
+
case EFConnectableSide.LEFT:
|
|
4408
|
+
mask |= SideMask.LEFT;
|
|
4409
|
+
break;
|
|
4410
|
+
case EFConnectableSide.RIGHT:
|
|
4411
|
+
mask |= SideMask.RIGHT;
|
|
4412
|
+
break;
|
|
4413
|
+
case EFConnectableSide.TOP:
|
|
4414
|
+
mask |= SideMask.TOP;
|
|
4415
|
+
break;
|
|
4416
|
+
case EFConnectableSide.BOTTOM:
|
|
4417
|
+
mask |= SideMask.BOTTOM;
|
|
4418
|
+
break;
|
|
4419
|
+
}
|
|
4026
4420
|
}
|
|
4421
|
+
return mask || SideMask.ALL;
|
|
4027
4422
|
}
|
|
4028
|
-
|
|
4029
4423
|
/**
|
|
4030
|
-
*
|
|
4424
|
+
* Picks the "ideal" side based on vector (dx, dy) with hysteresis.
|
|
4031
4425
|
*/
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4426
|
+
function _pickIdealSide(dx, dy) {
|
|
4427
|
+
const ax = dx < 0 ? -dx : dx;
|
|
4428
|
+
const ay = dy < 0 ? -dy : dy;
|
|
4429
|
+
if (ax - ay > SNAP_EPS) {
|
|
4430
|
+
return dx < 0 ? EFConnectableSide.LEFT : EFConnectableSide.RIGHT;
|
|
4036
4431
|
}
|
|
4037
|
-
|
|
4038
|
-
|
|
4432
|
+
if (ay - ax > SNAP_EPS) {
|
|
4433
|
+
return dy < 0 ? EFConnectableSide.TOP : EFConnectableSide.BOTTOM;
|
|
4434
|
+
}
|
|
4435
|
+
return dy < 0 ? EFConnectableSide.TOP : EFConnectableSide.BOTTOM;
|
|
4436
|
+
}
|
|
4437
|
+
/**
|
|
4438
|
+
* Quick membership check via bit mask.
|
|
4439
|
+
*/
|
|
4440
|
+
function _isAllowed(side, mask) {
|
|
4441
|
+
switch (side) {
|
|
4442
|
+
case EFConnectableSide.LEFT:
|
|
4443
|
+
return (mask & SideMask.LEFT) !== 0;
|
|
4444
|
+
case EFConnectableSide.RIGHT:
|
|
4445
|
+
return (mask & SideMask.RIGHT) !== 0;
|
|
4446
|
+
case EFConnectableSide.TOP:
|
|
4447
|
+
return (mask & SideMask.TOP) !== 0;
|
|
4448
|
+
case EFConnectableSide.BOTTOM:
|
|
4449
|
+
return (mask & SideMask.BOTTOM) !== 0;
|
|
4450
|
+
default:
|
|
4451
|
+
return true;
|
|
4452
|
+
}
|
|
4453
|
+
}
|
|
4454
|
+
/**
|
|
4455
|
+
* Picks the best available side from allowed mask by maximizing directional score.
|
|
4456
|
+
* No intermediate objects, constant-time operations.
|
|
4457
|
+
*/
|
|
4458
|
+
function _pickFallbackSide(dx, dy, allowedMask, ideal) {
|
|
4459
|
+
let bestSide = ideal;
|
|
4460
|
+
let bestScore = -Infinity;
|
|
4461
|
+
if (allowedMask & SideMask.RIGHT) {
|
|
4462
|
+
const s = dx;
|
|
4463
|
+
if (s > bestScore) {
|
|
4464
|
+
bestScore = s;
|
|
4465
|
+
bestSide = EFConnectableSide.RIGHT;
|
|
4466
|
+
}
|
|
4467
|
+
}
|
|
4468
|
+
if (allowedMask & SideMask.LEFT) {
|
|
4469
|
+
const s = -dx;
|
|
4470
|
+
if (s > bestScore) {
|
|
4471
|
+
bestScore = s;
|
|
4472
|
+
bestSide = EFConnectableSide.LEFT;
|
|
4473
|
+
}
|
|
4474
|
+
}
|
|
4475
|
+
if (allowedMask & SideMask.BOTTOM) {
|
|
4476
|
+
const s = dy;
|
|
4477
|
+
if (s > bestScore) {
|
|
4478
|
+
bestScore = s;
|
|
4479
|
+
bestSide = EFConnectableSide.BOTTOM;
|
|
4480
|
+
}
|
|
4481
|
+
}
|
|
4482
|
+
if (allowedMask & SideMask.TOP) {
|
|
4483
|
+
const s = -dy;
|
|
4484
|
+
if (s > bestScore) {
|
|
4485
|
+
bestScore = s;
|
|
4486
|
+
bestSide = EFConnectableSide.TOP;
|
|
4487
|
+
}
|
|
4488
|
+
}
|
|
4489
|
+
return bestSide;
|
|
4490
|
+
}
|
|
4491
|
+
|
|
4492
|
+
/**
|
|
4493
|
+
* Checks if the given side is one of the calculate modes.
|
|
4494
|
+
* @param side The connectable side to check.
|
|
4495
|
+
* @returns True if the side is a calculate mode, false otherwise.
|
|
4496
|
+
*/
|
|
4497
|
+
function isCalculateMode(side) {
|
|
4498
|
+
return (side === EFConnectableSide.CALCULATE ||
|
|
4499
|
+
side === EFConnectableSide.CALCULATE_HORIZONTAL ||
|
|
4500
|
+
side === EFConnectableSide.CALCULATE_VERTICAL);
|
|
4501
|
+
}
|
|
4502
|
+
|
|
4503
|
+
const CALCULATABLE_SIDES = {
|
|
4504
|
+
[EFConnectableSide.CALCULATE]: [
|
|
4505
|
+
EFConnectableSide.TOP,
|
|
4506
|
+
EFConnectableSide.BOTTOM,
|
|
4507
|
+
EFConnectableSide.LEFT,
|
|
4508
|
+
EFConnectableSide.RIGHT,
|
|
4509
|
+
],
|
|
4510
|
+
[EFConnectableSide.CALCULATE_HORIZONTAL]: [EFConnectableSide.LEFT, EFConnectableSide.RIGHT],
|
|
4511
|
+
[EFConnectableSide.CALCULATE_VERTICAL]: [EFConnectableSide.TOP, EFConnectableSide.BOTTOM],
|
|
4039
4512
|
};
|
|
4040
|
-
RemoveOutletFromStoreExecution = __decorate([
|
|
4041
|
-
FExecutionRegister(RemoveOutletFromStoreRequest)
|
|
4042
|
-
], RemoveOutletFromStoreExecution);
|
|
4043
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutletFromStoreExecution, decorators: [{
|
|
4044
|
-
type: Injectable
|
|
4045
|
-
}] });
|
|
4046
4513
|
|
|
4047
|
-
class
|
|
4048
|
-
|
|
4049
|
-
static fToken = Symbol('
|
|
4050
|
-
constructor(
|
|
4051
|
-
this.
|
|
4514
|
+
class GetNormalizedElementRectRequest {
|
|
4515
|
+
element;
|
|
4516
|
+
static fToken = Symbol('GetNormalizedElementRectRequest');
|
|
4517
|
+
constructor(element) {
|
|
4518
|
+
this.element = element;
|
|
4052
4519
|
}
|
|
4053
4520
|
}
|
|
4054
4521
|
|
|
4055
4522
|
/**
|
|
4056
|
-
* Execution that
|
|
4523
|
+
* Execution that retrieves the normalized rectangle of an element.
|
|
4524
|
+
* It calculates the rectangle based on the element's position and size,
|
|
4525
|
+
* adjusting for the canvas transformation and element offsets.
|
|
4057
4526
|
*/
|
|
4058
|
-
let
|
|
4527
|
+
let GetNormalizedElementRectExecution = class GetNormalizedElementRectExecution {
|
|
4059
4528
|
_store = inject(FComponentsStore);
|
|
4529
|
+
_mediator = inject(FMediator);
|
|
4530
|
+
get _transform() {
|
|
4531
|
+
return this._store.fCanvas.transform;
|
|
4532
|
+
}
|
|
4060
4533
|
handle(request) {
|
|
4061
|
-
this.
|
|
4534
|
+
const systemRect = this._getElementRoundedRect(request);
|
|
4535
|
+
const position = this._normalizePosition(systemRect);
|
|
4536
|
+
const unscaledSize = this._unscaleSize(systemRect);
|
|
4537
|
+
const unscaledRect = this._getUnscaledRect(position, unscaledSize, systemRect);
|
|
4538
|
+
const offsetSize = this._getOffsetSize(request.element, unscaledSize);
|
|
4539
|
+
return RoundedRect.fromCenter(unscaledRect, offsetSize.width, offsetSize.height);
|
|
4062
4540
|
}
|
|
4063
|
-
|
|
4064
|
-
|
|
4541
|
+
_getElementRoundedRect(request) {
|
|
4542
|
+
return RoundedRect.fromRect(RectExtensions.fromElement(request.element));
|
|
4543
|
+
}
|
|
4544
|
+
_normalizePosition(rect) {
|
|
4545
|
+
return this._mediator.execute(new GetNormalizedPointRequest(rect));
|
|
4546
|
+
}
|
|
4547
|
+
_unscaleSize(rect) {
|
|
4548
|
+
return SizeExtensions.initialize(rect.width / this._transform.scale, rect.height / this._transform.scale);
|
|
4549
|
+
}
|
|
4550
|
+
_getUnscaledRect(position, size, rect) {
|
|
4551
|
+
return new RoundedRect(position.x, position.y, size.width, size.height, rect.radius1, rect.radius2, rect.radius3, rect.radius4);
|
|
4552
|
+
}
|
|
4553
|
+
_getOffsetSize(element, size) {
|
|
4554
|
+
return SizeExtensions.offsetFromElement(element) || size;
|
|
4555
|
+
}
|
|
4556
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedElementRectExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4557
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedElementRectExecution });
|
|
4065
4558
|
};
|
|
4066
|
-
|
|
4067
|
-
FExecutionRegister(
|
|
4068
|
-
],
|
|
4069
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
4559
|
+
GetNormalizedElementRectExecution = __decorate([
|
|
4560
|
+
FExecutionRegister(GetNormalizedElementRectRequest)
|
|
4561
|
+
], GetNormalizedElementRectExecution);
|
|
4562
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedElementRectExecution, decorators: [{
|
|
4070
4563
|
type: Injectable
|
|
4071
4564
|
}] });
|
|
4072
4565
|
|
|
4073
|
-
class UnmarkConnectableConnectorsRequest {
|
|
4074
|
-
connectors;
|
|
4075
|
-
static fToken = Symbol('UnmarkConnectableConnectorsRequest');
|
|
4076
|
-
constructor(connectors) {
|
|
4077
|
-
this.connectors = connectors;
|
|
4078
|
-
}
|
|
4079
|
-
}
|
|
4080
|
-
|
|
4081
4566
|
/**
|
|
4082
|
-
* Execution that
|
|
4567
|
+
* Execution that calculates the connectable side for a connector
|
|
4568
|
+
* based on positions of connected connectors and allowed sides.
|
|
4083
4569
|
*/
|
|
4084
|
-
let
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4570
|
+
let CalculateConnectableSideByConnectedPositions = class CalculateConnectableSideByConnectedPositions {
|
|
4571
|
+
_mediator = inject(FMediator);
|
|
4572
|
+
/**
|
|
4573
|
+
* Entry point (hot path). Avoids intermediate arrays and redundant allocations.
|
|
4574
|
+
*
|
|
4575
|
+
* @param request - Contains the connector and optionally allowed sides.
|
|
4576
|
+
* @returns {EFConnectableSide} - The chosen connectable side.
|
|
4577
|
+
*/
|
|
4578
|
+
handle({ connector, pointerPosition, }) {
|
|
4579
|
+
const mode = connector.userFConnectableSide;
|
|
4580
|
+
const selfCenter = this._getConnectorRect(connector.hostElement).gravityCenter;
|
|
4581
|
+
const acc = this._accumulateConnectedCenters(connector.hostElement, connector.toConnector, pointerPosition);
|
|
4582
|
+
const avgX = acc.sumX / acc.count;
|
|
4583
|
+
const avgY = acc.sumY / acc.count;
|
|
4584
|
+
return determineSide(selfCenter.x, selfCenter.y, avgX, avgY, CALCULATABLE_SIDES[mode]);
|
|
4089
4585
|
}
|
|
4090
|
-
|
|
4091
|
-
|
|
4586
|
+
_accumulateConnectedCenters(selfHost, connected, pointerPosition) {
|
|
4587
|
+
let sumX = pointerPosition?.x || 0;
|
|
4588
|
+
let sumY = pointerPosition?.y || 0;
|
|
4589
|
+
let count = pointerPosition ? 1 : 0;
|
|
4590
|
+
if (connected && connected.length) {
|
|
4591
|
+
for (let i = 0; i < connected.length; i++) {
|
|
4592
|
+
const el = connected[i].hostElement;
|
|
4593
|
+
if (el === selfHost)
|
|
4594
|
+
continue;
|
|
4595
|
+
const c = this._getConnectorRect(el).gravityCenter;
|
|
4596
|
+
sumX += c.x;
|
|
4597
|
+
sumY += c.y;
|
|
4598
|
+
count++;
|
|
4599
|
+
}
|
|
4600
|
+
}
|
|
4601
|
+
return { sumX, sumY, count };
|
|
4092
4602
|
}
|
|
4093
|
-
|
|
4094
|
-
|
|
4603
|
+
_getConnectorRect(element) {
|
|
4604
|
+
return this._mediator.execute(new GetNormalizedElementRectRequest(element));
|
|
4605
|
+
}
|
|
4606
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByConnectedPositions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4607
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByConnectedPositions });
|
|
4095
4608
|
};
|
|
4096
|
-
|
|
4097
|
-
FExecutionRegister(
|
|
4098
|
-
],
|
|
4099
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
4609
|
+
CalculateConnectableSideByConnectedPositions = __decorate([
|
|
4610
|
+
FExecutionRegister(CalculateConnectableSideByConnectedPositionsRequest)
|
|
4611
|
+
], CalculateConnectableSideByConnectedPositions);
|
|
4612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByConnectedPositions, decorators: [{
|
|
4100
4613
|
type: Injectable
|
|
4101
4614
|
}] });
|
|
4102
4615
|
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
CalculateClosestConnector,
|
|
4111
|
-
FindConnectableConnectorUsingPriorityAndPositionExecution,
|
|
4112
|
-
GetAllCanBeConnectedSourceConnectorsAndRectsExecution,
|
|
4113
|
-
GetAllCanBeConnectedInputsAndRectsExecution,
|
|
4114
|
-
GetConnectorAndRect,
|
|
4115
|
-
MarkConnectableConnectors,
|
|
4116
|
-
RemoveInputFromStore,
|
|
4117
|
-
RemoveOutletFromStoreExecution,
|
|
4118
|
-
RemoveOutputFromStoreExecution,
|
|
4119
|
-
UnmarkConnectableConnectors,
|
|
4120
|
-
];
|
|
4616
|
+
class CalculateConnectableSideByInternalPositionRequest {
|
|
4617
|
+
connector;
|
|
4618
|
+
static fToken = Symbol('CalculateConnectableSideByInternalPositionRequest');
|
|
4619
|
+
constructor(connector) {
|
|
4620
|
+
this.connector = connector;
|
|
4621
|
+
}
|
|
4622
|
+
}
|
|
4121
4623
|
|
|
4122
4624
|
class AddDndToStoreRequest {
|
|
4123
4625
|
fComponent;
|
|
@@ -4585,14 +5087,14 @@ class FCreateConnectionDragHandler {
|
|
|
4585
5087
|
this._store = _injector.get(FComponentsStore);
|
|
4586
5088
|
this._toConnectorRect = RoundedRect.fromRect(RectExtensions.initialize(_onPointerDownPosition.x, _onPointerDownPosition.y));
|
|
4587
5089
|
this.fData = {
|
|
4588
|
-
fOutputOrOutletId: this._fOutputOrOutlet.fId,
|
|
5090
|
+
fOutputOrOutletId: this._fOutputOrOutlet.fId(),
|
|
4589
5091
|
};
|
|
4590
5092
|
}
|
|
4591
5093
|
prepareDragSequence() {
|
|
5094
|
+
this._fOutputWithRect = this._mediator.execute(new GetConnectorAndRectRequest(this._fOutputOrOutlet));
|
|
4592
5095
|
this._getAndMarkCanBeConnectedInputs();
|
|
4593
5096
|
this._initializeSnapConnection();
|
|
4594
5097
|
this._initializeConnectionForCreate();
|
|
4595
|
-
this._fOutputWithRect = this._mediator.execute(new GetConnectorAndRectRequest(this._fOutputOrOutlet));
|
|
4596
5098
|
this._connection.show();
|
|
4597
5099
|
this.onPointerMove(PointExtensions.initialize());
|
|
4598
5100
|
this._result.setData({
|
|
@@ -4602,7 +5104,7 @@ class FCreateConnectionDragHandler {
|
|
|
4602
5104
|
});
|
|
4603
5105
|
}
|
|
4604
5106
|
_getAndMarkCanBeConnectedInputs() {
|
|
4605
|
-
this._canBeConnectedInputs = this._mediator.execute(new
|
|
5107
|
+
this._canBeConnectedInputs = this._mediator.execute(new CalculateTargetConnectorsToConnectRequest(this._fOutputOrOutlet, this._fOutputWithRect.fRect.gravityCenter));
|
|
4606
5108
|
this._mediator.execute(new MarkConnectableConnectorsRequest(this._canBeConnectedInputs.map((x) => x.fConnector)));
|
|
4607
5109
|
}
|
|
4608
5110
|
_initializeSnapConnection() {
|
|
@@ -4617,22 +5119,22 @@ class FCreateConnectionDragHandler {
|
|
|
4617
5119
|
this._connection.initialize();
|
|
4618
5120
|
}
|
|
4619
5121
|
onPointerMove(difference) {
|
|
4620
|
-
const
|
|
4621
|
-
this._drawConnectionForCreate(this._toConnectorRect.addPoint(difference),
|
|
5122
|
+
const closestInput = this._findClosestInput(difference);
|
|
5123
|
+
this._drawConnectionForCreate(this._toConnectorRect.addPoint(difference), closestInput?.fConnector.fConnectableSide || EFConnectableSide.TOP);
|
|
4622
5124
|
if (this._snapConnection) {
|
|
4623
|
-
this._drawSnapConnection(this._getClosestInputForSnapConnection(
|
|
5125
|
+
this._drawSnapConnection(this._getClosestInputForSnapConnection(closestInput));
|
|
4624
5126
|
}
|
|
4625
5127
|
}
|
|
4626
5128
|
_drawConnectionForCreate(toConnectorRect, fSide) {
|
|
4627
|
-
const line = this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(this._fOutputWithRect.fRect, toConnectorRect, this._connection
|
|
4628
|
-
this._connection.setLine(line
|
|
5129
|
+
const line = this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(this._fOutputWithRect.fRect, toConnectorRect, this._connection, this._fOutputWithRect.fConnector.fConnectableSide, fSide));
|
|
5130
|
+
this._connection.setLine(line);
|
|
4629
5131
|
this._connection.redraw();
|
|
4630
5132
|
}
|
|
4631
5133
|
_drawSnapConnection(fClosestInput) {
|
|
4632
5134
|
if (fClosestInput) {
|
|
4633
|
-
const line = this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(this._fOutputWithRect.fRect, fClosestInput.fRect, this._snapConnection
|
|
5135
|
+
const line = this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(this._fOutputWithRect.fRect, fClosestInput.fRect, this._snapConnection, this._fOutputWithRect.fConnector.fConnectableSide, fClosestInput.fConnector.fConnectableSide));
|
|
4634
5136
|
this._snapConnection?.show();
|
|
4635
|
-
this._snapConnection?.setLine(line
|
|
5137
|
+
this._snapConnection?.setLine(line);
|
|
4636
5138
|
this._snapConnection?.redraw();
|
|
4637
5139
|
}
|
|
4638
5140
|
else {
|
|
@@ -4799,18 +5301,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
4799
5301
|
type: Injectable
|
|
4800
5302
|
}] });
|
|
4801
5303
|
|
|
4802
|
-
class
|
|
5304
|
+
class CreateConnectionFromOutputPreparationRequest {
|
|
4803
5305
|
event;
|
|
4804
|
-
|
|
4805
|
-
static fToken = Symbol('
|
|
4806
|
-
constructor(event,
|
|
5306
|
+
node;
|
|
5307
|
+
static fToken = Symbol('CreateConnectionFromOutputPreparationRequest');
|
|
5308
|
+
constructor(event, node) {
|
|
4807
5309
|
this.event = event;
|
|
4808
|
-
this.
|
|
5310
|
+
this.node = node;
|
|
4809
5311
|
}
|
|
4810
5312
|
}
|
|
4811
5313
|
|
|
4812
|
-
let
|
|
4813
|
-
|
|
5314
|
+
let CreateConnectionFromOutputPreparation = class CreateConnectionFromOutputPreparation {
|
|
5315
|
+
_mediator = inject(FMediator);
|
|
4814
5316
|
_store = inject(FComponentsStore);
|
|
4815
5317
|
handle(request) {
|
|
4816
5318
|
if (!this._isValid(request)) {
|
|
@@ -4818,70 +5320,74 @@ let FCreateConnectionFromOutputPreparationExecution = class FCreateConnectionFro
|
|
|
4818
5320
|
}
|
|
4819
5321
|
const fOutput = this._getOutput(request.event.targetElement);
|
|
4820
5322
|
if (fOutput.canBeConnected) {
|
|
4821
|
-
this.
|
|
5323
|
+
this._mediator.execute(new FCreateConnectionDragHandlerPreparationRequest(request.event.getPosition(), fOutput));
|
|
4822
5324
|
}
|
|
4823
5325
|
}
|
|
4824
5326
|
_isValid(request) {
|
|
4825
|
-
return this._isNodeOutput(request.event.targetElement, request.
|
|
5327
|
+
return this._isNodeOutput(request.event.targetElement, request.node);
|
|
4826
5328
|
}
|
|
4827
5329
|
_isNodeOutput(element, fNode) {
|
|
4828
5330
|
return isNodeOutput(element) && !this._getNodeOutlets(fNode).length;
|
|
4829
5331
|
}
|
|
4830
5332
|
_getNodeOutlets(node) {
|
|
4831
|
-
return this._store.fOutlets
|
|
4832
|
-
.filter((x) => node.isContains(x.hostElement));
|
|
5333
|
+
return this._store.fOutlets.filter((x) => node.isContains(x.hostElement));
|
|
4833
5334
|
}
|
|
4834
5335
|
_getOutput(element) {
|
|
4835
|
-
const result = this._store.fOutputs
|
|
4836
|
-
.find((x) => x.hostElement.contains(element));
|
|
5336
|
+
const result = this._store.fOutputs.find((x) => x.hostElement.contains(element));
|
|
4837
5337
|
if (!result) {
|
|
4838
5338
|
throw new Error('Output not found');
|
|
4839
5339
|
}
|
|
4840
5340
|
return result;
|
|
4841
5341
|
}
|
|
4842
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
4843
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
5342
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionFromOutputPreparation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5343
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionFromOutputPreparation });
|
|
4844
5344
|
};
|
|
4845
|
-
|
|
4846
|
-
FExecutionRegister(
|
|
4847
|
-
],
|
|
4848
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
5345
|
+
CreateConnectionFromOutputPreparation = __decorate([
|
|
5346
|
+
FExecutionRegister(CreateConnectionFromOutputPreparationRequest)
|
|
5347
|
+
], CreateConnectionFromOutputPreparation);
|
|
5348
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionFromOutputPreparation, decorators: [{
|
|
4849
5349
|
type: Injectable
|
|
4850
5350
|
}] });
|
|
4851
5351
|
|
|
4852
|
-
class
|
|
5352
|
+
class CreateConnectionPreparationRequest {
|
|
4853
5353
|
event;
|
|
4854
5354
|
fTrigger;
|
|
4855
|
-
static fToken = Symbol('
|
|
5355
|
+
static fToken = Symbol('CreateConnectionPreparationRequest');
|
|
4856
5356
|
constructor(event, fTrigger) {
|
|
4857
5357
|
this.event = event;
|
|
4858
5358
|
this.fTrigger = fTrigger;
|
|
4859
5359
|
}
|
|
4860
5360
|
}
|
|
4861
5361
|
|
|
4862
|
-
|
|
4863
|
-
|
|
5362
|
+
// import { IPoint } from '@foblex/2d';
|
|
5363
|
+
// import { BrowserService } from '@foblex/platform';
|
|
5364
|
+
let CreateConnectionPreparation = class CreateConnectionPreparation {
|
|
5365
|
+
_mediator = inject(FMediator);
|
|
4864
5366
|
_store = inject(FComponentsStore);
|
|
4865
5367
|
_dragContext = inject(FDraggableDataContext);
|
|
4866
|
-
|
|
5368
|
+
// private readonly _browser = inject(BrowserService);
|
|
5369
|
+
_node;
|
|
4867
5370
|
handle(request) {
|
|
4868
5371
|
if (!this._isValid(request) || !this._isValidTrigger(request)) {
|
|
4869
5372
|
return;
|
|
4870
5373
|
}
|
|
5374
|
+
// const elements = this._elementsFromPoint(request.event.getPosition());
|
|
5375
|
+
//
|
|
5376
|
+
// const outlet = this._findOutlet(elements);
|
|
5377
|
+
// const output = this._findOutput(elements);
|
|
4871
5378
|
if (isNodeOutlet(request.event.targetElement)) {
|
|
4872
|
-
this.
|
|
5379
|
+
this._mediator.execute(new FCreateConnectionFromOutletPreparationRequest(request.event, this._node));
|
|
4873
5380
|
}
|
|
4874
5381
|
else if (isNodeOutput(request.event.targetElement)) {
|
|
4875
|
-
this.
|
|
5382
|
+
this._mediator.execute(new CreateConnectionFromOutputPreparationRequest(request.event, this._node));
|
|
4876
5383
|
}
|
|
4877
5384
|
}
|
|
4878
5385
|
_isValid(request) {
|
|
4879
5386
|
return !!this._getNode(request.event) && this._isValidConditions();
|
|
4880
5387
|
}
|
|
4881
5388
|
_getNode(event) {
|
|
4882
|
-
this.
|
|
4883
|
-
|
|
4884
|
-
return this._fNode;
|
|
5389
|
+
this._node = this._store.fNodes.find((n) => n.isContains(event.targetElement));
|
|
5390
|
+
return this._node;
|
|
4885
5391
|
}
|
|
4886
5392
|
_isValidConditions() {
|
|
4887
5393
|
return this._dragContext.isEmpty() && !!this._store.fTempConnection;
|
|
@@ -4889,13 +5395,13 @@ let FCreateConnectionPreparationExecution = class FCreateConnectionPreparationEx
|
|
|
4889
5395
|
_isValidTrigger(request) {
|
|
4890
5396
|
return isValidEventTrigger(request.event.originalEvent, request.fTrigger);
|
|
4891
5397
|
}
|
|
4892
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
4893
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
5398
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionPreparation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5399
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionPreparation });
|
|
4894
5400
|
};
|
|
4895
|
-
|
|
4896
|
-
FExecutionRegister(
|
|
4897
|
-
],
|
|
4898
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
5401
|
+
CreateConnectionPreparation = __decorate([
|
|
5402
|
+
FExecutionRegister(CreateConnectionPreparationRequest)
|
|
5403
|
+
], CreateConnectionPreparation);
|
|
5404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionPreparation, decorators: [{
|
|
4899
5405
|
type: Injectable
|
|
4900
5406
|
}] });
|
|
4901
5407
|
|
|
@@ -4942,7 +5448,7 @@ class FReassignTargetDragHandler {
|
|
|
4942
5448
|
return this._connectableConnectors;
|
|
4943
5449
|
}
|
|
4944
5450
|
markConnectableConnector() {
|
|
4945
|
-
this._connectableConnectors = this._mediator.execute(new
|
|
5451
|
+
this._connectableConnectors = this._mediator.execute(new CalculateTargetConnectorsToConnectRequest(this._sourceConnector, this._sourceConnectorRect.gravityCenter));
|
|
4946
5452
|
this._mediator.execute(new MarkConnectableConnectorsRequest(this._connectableConnectors.map((x) => x.fConnector)));
|
|
4947
5453
|
}
|
|
4948
5454
|
initializeSnapConnection(snapConnection) {
|
|
@@ -4966,18 +5472,18 @@ class FReassignTargetDragHandler {
|
|
|
4966
5472
|
}
|
|
4967
5473
|
_drawConnection(newPoint, fSide) {
|
|
4968
5474
|
const line = this._calculateNewLine(newPoint, fSide);
|
|
4969
|
-
this._connection.setLine(line
|
|
5475
|
+
this._connection.setLine(line);
|
|
4970
5476
|
this._connection.redraw();
|
|
4971
5477
|
}
|
|
4972
5478
|
_calculateNewLine(targetPoint, fSide) {
|
|
4973
|
-
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(this._sourceConnectorRect, roundedRectFromPoint(targetPoint), this._connection
|
|
5479
|
+
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(this._sourceConnectorRect, roundedRectFromPoint(targetPoint), this._connection, this._sourceConnector.fConnectableSide, fSide));
|
|
4974
5480
|
}
|
|
4975
|
-
_drawSnapConnection(
|
|
5481
|
+
_drawSnapConnection(closestConnector) {
|
|
4976
5482
|
const snapConnection = this._snapConnection;
|
|
4977
|
-
if (
|
|
4978
|
-
const line = this._getLineToClosestTargetConnector(
|
|
5483
|
+
if (closestConnector) {
|
|
5484
|
+
const line = this._getLineToClosestTargetConnector(closestConnector, snapConnection);
|
|
4979
5485
|
snapConnection.show();
|
|
4980
|
-
snapConnection.setLine(line
|
|
5486
|
+
snapConnection.setLine(line);
|
|
4981
5487
|
snapConnection.redraw();
|
|
4982
5488
|
}
|
|
4983
5489
|
else {
|
|
@@ -4985,7 +5491,7 @@ class FReassignTargetDragHandler {
|
|
|
4985
5491
|
}
|
|
4986
5492
|
}
|
|
4987
5493
|
_getLineToClosestTargetConnector(fClosestInput, snapConnection) {
|
|
4988
|
-
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(this._sourceConnectorRect, fClosestInput.fRect, snapConnection
|
|
5494
|
+
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(this._sourceConnectorRect, fClosestInput.fRect, snapConnection, this._sourceConnector.fConnectableSide, fClosestInput.fConnector.fConnectableSide));
|
|
4989
5495
|
}
|
|
4990
5496
|
onPointerUp() {
|
|
4991
5497
|
this._drawConnection(this._connectorRect, this._targetConnectorAndRect.fConnector.fConnectableSide);
|
|
@@ -5019,7 +5525,7 @@ class FReassignSourceDragHandler {
|
|
|
5019
5525
|
return this._connectableConnectors;
|
|
5020
5526
|
}
|
|
5021
5527
|
markConnectableConnector() {
|
|
5022
|
-
this._connectableConnectors = this._mediator.execute(new
|
|
5528
|
+
this._connectableConnectors = this._mediator.execute(new CalculateSourceConnectorsToConnectRequest(this._targetConnector, this._targetConnectorAndRect.fRect.gravityCenter));
|
|
5023
5529
|
const isExistCurrentSourceConnector = this._connectableConnectors.some((x) => x.fConnector.fId() === this._sourceConnector.fId());
|
|
5024
5530
|
if (!isExistCurrentSourceConnector) {
|
|
5025
5531
|
this._connectableConnectors.push(this._sourceConnectorAndRect);
|
|
@@ -5047,18 +5553,18 @@ class FReassignSourceDragHandler {
|
|
|
5047
5553
|
}
|
|
5048
5554
|
_drawConnection(newPoint, fSide) {
|
|
5049
5555
|
const line = this._calculateNewLine(newPoint, fSide);
|
|
5050
|
-
this._connection.setLine(line
|
|
5556
|
+
this._connection.setLine(line);
|
|
5051
5557
|
this._connection.redraw();
|
|
5052
5558
|
}
|
|
5053
5559
|
_calculateNewLine(sourcePoint, fSide) {
|
|
5054
|
-
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(roundedRectFromPoint(sourcePoint), this._targetConnectorAndRect.fRect, this._connection
|
|
5560
|
+
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(roundedRectFromPoint(sourcePoint), this._targetConnectorAndRect.fRect, this._connection, fSide, this._targetConnectorAndRect.fConnector.fConnectableSide));
|
|
5055
5561
|
}
|
|
5056
5562
|
_drawSnapConnection(fClosestConnector) {
|
|
5057
5563
|
const snapConnection = this._snapConnection;
|
|
5058
5564
|
if (fClosestConnector) {
|
|
5059
5565
|
const line = this._getLineToClosestSourceConnector(fClosestConnector, snapConnection);
|
|
5060
5566
|
snapConnection.show();
|
|
5061
|
-
snapConnection.setLine(line
|
|
5567
|
+
snapConnection.setLine(line);
|
|
5062
5568
|
snapConnection.redraw();
|
|
5063
5569
|
}
|
|
5064
5570
|
else {
|
|
@@ -5066,7 +5572,7 @@ class FReassignSourceDragHandler {
|
|
|
5066
5572
|
}
|
|
5067
5573
|
}
|
|
5068
5574
|
_getLineToClosestSourceConnector(fClosestInput, snapConnection) {
|
|
5069
|
-
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(fClosestInput.fRect, this._targetConnectorAndRect.fRect, snapConnection
|
|
5575
|
+
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(fClosestInput.fRect, this._targetConnectorAndRect.fRect, snapConnection, fClosestInput.fConnector.fConnectableSide, this._targetConnector.fConnectableSide));
|
|
5070
5576
|
}
|
|
5071
5577
|
onPointerUp() {
|
|
5072
5578
|
this._drawConnection(this._connectorRect, this._sourceConnectorAndRect.fConnector.fConnectableSide);
|
|
@@ -5316,8 +5822,8 @@ const CONNECTIONS_PROVIDERS = [
|
|
|
5316
5822
|
FCreateConnectionDragHandlerPreparationExecution,
|
|
5317
5823
|
FCreateConnectionFromOutletPreparationExecution,
|
|
5318
5824
|
GetFirstConnectableOutputExecution,
|
|
5319
|
-
|
|
5320
|
-
|
|
5825
|
+
CreateConnectionFromOutputPreparation,
|
|
5826
|
+
CreateConnectionPreparation,
|
|
5321
5827
|
FReassignConnectionFinalizeExecution,
|
|
5322
5828
|
FReassignConnectionPreparationExecution,
|
|
5323
5829
|
];
|
|
@@ -5435,10 +5941,10 @@ class BaseConnectionDragHandler {
|
|
|
5435
5941
|
this._redrawConnection(this._recalculateConnection());
|
|
5436
5942
|
}
|
|
5437
5943
|
_recalculateConnection() {
|
|
5438
|
-
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(RoundedRect.fromRoundedRect(this._fOutputWithRect.fRect).addPoint(this._sourceDifference), RoundedRect.fromRoundedRect(this._fInputWithRect.fRect).addPoint(this._targetDifference), this.fConnection
|
|
5944
|
+
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(RoundedRect.fromRoundedRect(this._fOutputWithRect.fRect).addPoint(this._sourceDifference), RoundedRect.fromRoundedRect(this._fInputWithRect.fRect).addPoint(this._targetDifference), this.fConnection, this._fOutputWithRect.fConnector.fConnectableSide, this._fInputWithRect.fConnector.fConnectableSide));
|
|
5439
5945
|
}
|
|
5440
5946
|
_redrawConnection(line) {
|
|
5441
|
-
this.fConnection.setLine(line
|
|
5947
|
+
this.fConnection.setLine(line);
|
|
5442
5948
|
this.fConnection.redraw();
|
|
5443
5949
|
}
|
|
5444
5950
|
_connectorNotFoundPrefix(message) {
|
|
@@ -6382,8 +6888,8 @@ let FNodeMovePreparationExecution = class FNodeMovePreparationExecution {
|
|
|
6382
6888
|
_mediator = inject(FMediator);
|
|
6383
6889
|
_store = inject(FComponentsStore);
|
|
6384
6890
|
_dragContext = inject(FDraggableDataContext);
|
|
6385
|
-
get
|
|
6386
|
-
return this._store.fCanvas.
|
|
6891
|
+
get _scale() {
|
|
6892
|
+
return this._store.fCanvas?.transform.scale || 1;
|
|
6387
6893
|
}
|
|
6388
6894
|
get _fHost() {
|
|
6389
6895
|
return this._store.fFlow.hostElement;
|
|
@@ -6394,25 +6900,25 @@ let FNodeMovePreparationExecution = class FNodeMovePreparationExecution {
|
|
|
6394
6900
|
return;
|
|
6395
6901
|
}
|
|
6396
6902
|
const summaryDragHandler = this._calculateDraggedItems(this._fNode);
|
|
6397
|
-
this._dragContext.onPointerDownScale = this.
|
|
6903
|
+
this._dragContext.onPointerDownScale = this._scale;
|
|
6398
6904
|
this._dragContext.onPointerDownPosition = Point.fromPoint(event.getPosition())
|
|
6399
|
-
.elementTransform(this._fHost)
|
|
6905
|
+
.elementTransform(this._fHost)
|
|
6906
|
+
.div(this._scale);
|
|
6400
6907
|
this._dragContext.draggableItems = [summaryDragHandler];
|
|
6401
6908
|
if (this._store.fLineAlignment) {
|
|
6402
6909
|
this._mediator.execute(new CreateSnapLinesRequest(summaryDragHandler));
|
|
6403
6910
|
}
|
|
6404
6911
|
}
|
|
6405
6912
|
_isValid(event) {
|
|
6406
|
-
return this._dragContext.isEmpty()
|
|
6407
|
-
|
|
6408
|
-
|
|
6913
|
+
return (this._dragContext.isEmpty() &&
|
|
6914
|
+
this._isDragHandleElement(event.targetElement) &&
|
|
6915
|
+
!!this._getNode(event.targetElement));
|
|
6409
6916
|
}
|
|
6410
6917
|
_isDragHandleElement(element) {
|
|
6411
6918
|
return isClosestElementHasClass(element, '.f-drag-handle');
|
|
6412
6919
|
}
|
|
6413
6920
|
_getNode(element) {
|
|
6414
|
-
this._fNode = this._store.fNodes
|
|
6415
|
-
.find(x => x.isContains(element) && !x.fDraggingDisabled());
|
|
6921
|
+
this._fNode = this._store.fNodes.find((x) => x.isContains(element) && !x.fDraggingDisabled());
|
|
6416
6922
|
return this._fNode;
|
|
6417
6923
|
}
|
|
6418
6924
|
_isValidTrigger(event, fTrigger) {
|
|
@@ -6423,7 +6929,9 @@ let FNodeMovePreparationExecution = class FNodeMovePreparationExecution {
|
|
|
6423
6929
|
let result;
|
|
6424
6930
|
if (!fNode.fSelectionDisabled()) {
|
|
6425
6931
|
// Need to select node before drag
|
|
6426
|
-
|
|
6932
|
+
setTimeout(() => {
|
|
6933
|
+
this._mediator.execute(new SelectAndUpdateNodeLayerRequest(fNode));
|
|
6934
|
+
});
|
|
6427
6935
|
result = this._dragModelFromSelection();
|
|
6428
6936
|
}
|
|
6429
6937
|
else {
|
|
@@ -7270,7 +7778,7 @@ let DropToGroupPreparation = class DropToGroupPreparation {
|
|
|
7270
7778
|
// We can drop items only to children of direct parent
|
|
7271
7779
|
const childIds = this._mediator.execute(new GetChildNodeIdsRequest(_dragTarget.fParentId()));
|
|
7272
7780
|
if (childIds.length) {
|
|
7273
|
-
targetRects = targetRects.filter(t => childIds.includes(t.node.fId()));
|
|
7781
|
+
targetRects = targetRects.filter((t) => childIds.includes(t.node.fId()));
|
|
7274
7782
|
}
|
|
7275
7783
|
}
|
|
7276
7784
|
this._dragContext.draggableItems.push(new FNodeDropToGroupDragHandler(this._injector, targetRects));
|
|
@@ -7279,12 +7787,10 @@ let DropToGroupPreparation = class DropToGroupPreparation {
|
|
|
7279
7787
|
return this._isNodeDragHandler() || this._isExternalItemDragHandler();
|
|
7280
7788
|
}
|
|
7281
7789
|
_isNodeDragHandler() {
|
|
7282
|
-
return this._dragContext.draggableItems
|
|
7283
|
-
.some((x) => x instanceof MoveSummaryDragHandler);
|
|
7790
|
+
return this._dragContext.draggableItems.some((x) => x instanceof MoveSummaryDragHandler);
|
|
7284
7791
|
}
|
|
7285
7792
|
_isExternalItemDragHandler() {
|
|
7286
|
-
return this._dragContext.draggableItems
|
|
7287
|
-
.some((x) => x instanceof FExternalItemDragHandler);
|
|
7793
|
+
return this._dragContext.draggableItems.some((x) => x instanceof FExternalItemDragHandler);
|
|
7288
7794
|
}
|
|
7289
7795
|
_collectGroupingTargetRects() {
|
|
7290
7796
|
const dragged = this._draggedNodes();
|
|
@@ -7296,9 +7802,9 @@ let DropToGroupPreparation = class DropToGroupPreparation {
|
|
|
7296
7802
|
});
|
|
7297
7803
|
}
|
|
7298
7804
|
_draggedNodes() {
|
|
7299
|
-
return this._dragContext.draggableItems
|
|
7805
|
+
return (this._dragContext.draggableItems
|
|
7300
7806
|
.find((x) => x instanceof MoveSummaryDragHandler)
|
|
7301
|
-
?.allDraggedNodeHandlers.map((x) => x.nodeOrGroup) || [];
|
|
7807
|
+
?.allDraggedNodeHandlers.map((x) => x.nodeOrGroup) || []);
|
|
7302
7808
|
}
|
|
7303
7809
|
/**
|
|
7304
7810
|
* Returns the list of dragged nodes extended with all of their parent nodes.
|
|
@@ -7313,8 +7819,8 @@ let DropToGroupPreparation = class DropToGroupPreparation {
|
|
|
7313
7819
|
}, []);
|
|
7314
7820
|
}
|
|
7315
7821
|
_eligibleTargets(dragged, draggingGroup) {
|
|
7316
|
-
const nonDragged = this._allNodesAndGroups.filter(x => !dragged.includes(x));
|
|
7317
|
-
return draggingGroup ? nonDragged.filter(x => x instanceof FGroupDirective) : nonDragged;
|
|
7822
|
+
const nonDragged = this._allNodesAndGroups.filter((x) => !dragged.includes(x));
|
|
7823
|
+
return draggingGroup ? nonDragged.filter((x) => x instanceof FGroupDirective) : nonDragged;
|
|
7318
7824
|
}
|
|
7319
7825
|
_toCanvasRect(rect) {
|
|
7320
7826
|
return RectExtensions.initialize(rect.x * this._canvasTransform.scale + this._canvasPosition.x, rect.y * this._canvasTransform.scale + this._canvasPosition.y, rect.width * this._canvasTransform.scale, rect.height * this._canvasTransform.scale);
|
|
@@ -8746,7 +9252,7 @@ class FDraggableDirective extends FDraggableBase {
|
|
|
8746
9252
|
this._beforePlugins.forEach((p) => p.onPointerDown?.(event));
|
|
8747
9253
|
this._mediator.execute(new FSingleSelectRequest(event, this.fMultiSelectTrigger));
|
|
8748
9254
|
this._mediator.execute(new FReassignConnectionPreparationRequest(event, this.fReassignConnectionTrigger));
|
|
8749
|
-
this._mediator.execute(new
|
|
9255
|
+
this._mediator.execute(new CreateConnectionPreparationRequest(event, this.fCreateConnectionTrigger));
|
|
8750
9256
|
this._afterPlugins.forEach((p) => p.onPointerDown?.(event));
|
|
8751
9257
|
const isMouseLeftOrTouch = event.isMouseLeftButton();
|
|
8752
9258
|
if (!isMouseLeftOrTouch) {
|
|
@@ -8785,6 +9291,7 @@ class FDraggableDirective extends FDraggableBase {
|
|
|
8785
9291
|
this._mediator.execute(new EndDragSequenceRequest());
|
|
8786
9292
|
}
|
|
8787
9293
|
finalizeDragSequence() {
|
|
9294
|
+
DragRectCache.invalidateAll();
|
|
8788
9295
|
this._mediator.execute(new EmitSelectionChangeEventRequest());
|
|
8789
9296
|
this._result.clear();
|
|
8790
9297
|
}
|
|
@@ -9458,75 +9965,11 @@ class GetCanBeSelectedItemsRequest {
|
|
|
9458
9965
|
static fToken = Symbol('GetCanBeSelectedItemsRequest');
|
|
9459
9966
|
}
|
|
9460
9967
|
|
|
9461
|
-
class GetNormalizedElementRectRequest {
|
|
9462
|
-
element;
|
|
9463
|
-
static fToken = Symbol('GetNormalizedElementRectRequest');
|
|
9464
|
-
constructor(element) {
|
|
9465
|
-
this.element = element;
|
|
9466
|
-
}
|
|
9467
|
-
}
|
|
9468
|
-
|
|
9469
9968
|
/**
|
|
9470
|
-
* Execution that retrieves the
|
|
9471
|
-
* It
|
|
9472
|
-
* adjusting for the canvas transformation and element offsets.
|
|
9969
|
+
* Execution that retrieves elements that can be selected in the Flow, along with their bounding rectangles.
|
|
9970
|
+
* It filters out elements that are already selected in the FDraggableDataContext.
|
|
9473
9971
|
*/
|
|
9474
|
-
let
|
|
9475
|
-
_store = inject(FComponentsStore);
|
|
9476
|
-
_mediator = inject(FMediator);
|
|
9477
|
-
get _transform() {
|
|
9478
|
-
return this._store.fCanvas.transform;
|
|
9479
|
-
}
|
|
9480
|
-
handle(request) {
|
|
9481
|
-
const systemRect = this._getElementRoundedRect(request);
|
|
9482
|
-
const position = this._normalizePosition(systemRect);
|
|
9483
|
-
const unscaledSize = this._unscaleSize(systemRect);
|
|
9484
|
-
const unscaledRect = this._getUnscaledRect(position, unscaledSize, systemRect);
|
|
9485
|
-
const offsetSize = this._getOffsetSize(request.element, unscaledSize);
|
|
9486
|
-
return RoundedRect.fromCenter(unscaledRect, offsetSize.width, offsetSize.height);
|
|
9487
|
-
}
|
|
9488
|
-
// BrowserWindow
|
|
9489
|
-
// +--------------------------------+
|
|
9490
|
-
// | |
|
|
9491
|
-
// | Element |
|
|
9492
|
-
// | (x: 100, y: 50) |
|
|
9493
|
-
// | +--------+ |
|
|
9494
|
-
// | | | |
|
|
9495
|
-
// | | | |
|
|
9496
|
-
// | +--------+ |
|
|
9497
|
-
// | |
|
|
9498
|
-
// +--------------------------------+
|
|
9499
|
-
// This data of the element is relative to the browser window, not the canvas, with all transformations applied.
|
|
9500
|
-
_getElementRoundedRect(request) {
|
|
9501
|
-
return RoundedRect.fromRect(RectExtensions.fromElement(request.element));
|
|
9502
|
-
}
|
|
9503
|
-
_normalizePosition(rect) {
|
|
9504
|
-
return this._mediator.execute(new GetNormalizedPointRequest(rect));
|
|
9505
|
-
}
|
|
9506
|
-
_unscaleSize(rect) {
|
|
9507
|
-
return SizeExtensions.initialize(rect.width / this._transform.scale, rect.height / this._transform.scale);
|
|
9508
|
-
}
|
|
9509
|
-
_getUnscaledRect(position, size, rect) {
|
|
9510
|
-
return new RoundedRect(position.x, position.y, size.width, size.height, rect.radius1, rect.radius2, rect.radius3, rect.radius4);
|
|
9511
|
-
}
|
|
9512
|
-
_getOffsetSize(element, size) {
|
|
9513
|
-
return SizeExtensions.offsetFromElement(element) || size;
|
|
9514
|
-
}
|
|
9515
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedElementRectExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9516
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedElementRectExecution });
|
|
9517
|
-
};
|
|
9518
|
-
GetNormalizedElementRectExecution = __decorate([
|
|
9519
|
-
FExecutionRegister(GetNormalizedElementRectRequest)
|
|
9520
|
-
], GetNormalizedElementRectExecution);
|
|
9521
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedElementRectExecution, decorators: [{
|
|
9522
|
-
type: Injectable
|
|
9523
|
-
}] });
|
|
9524
|
-
|
|
9525
|
-
/**
|
|
9526
|
-
* Execution that retrieves elements that can be selected in the Flow, along with their bounding rectangles.
|
|
9527
|
-
* It filters out elements that are already selected in the FDraggableDataContext.
|
|
9528
|
-
*/
|
|
9529
|
-
let GetCanBeSelectedItemsExecution = class GetCanBeSelectedItemsExecution {
|
|
9972
|
+
let GetCanBeSelectedItemsExecution = class GetCanBeSelectedItemsExecution {
|
|
9530
9973
|
_mediator = inject(FMediator);
|
|
9531
9974
|
_store = inject(FComponentsStore);
|
|
9532
9975
|
_dragContext = inject(FDraggableDataContext);
|
|
@@ -9705,10 +10148,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
9705
10148
|
}] });
|
|
9706
10149
|
|
|
9707
10150
|
class SelectAndUpdateNodeLayerRequest {
|
|
9708
|
-
|
|
10151
|
+
nodeOrGroup;
|
|
9709
10152
|
static fToken = Symbol('SelectAndUpdateNodeLayerRequest');
|
|
9710
|
-
constructor(
|
|
9711
|
-
this.
|
|
10153
|
+
constructor(nodeOrGroup) {
|
|
10154
|
+
this.nodeOrGroup = nodeOrGroup;
|
|
9712
10155
|
}
|
|
9713
10156
|
}
|
|
9714
10157
|
|
|
@@ -9731,7 +10174,7 @@ class MoveFrontElementsBeforeTargetElementRequest {
|
|
|
9731
10174
|
* Execution that moves elements in the FItemsContainer before a target element.
|
|
9732
10175
|
* It removes elements that should not be in front and inserts them before the target element.
|
|
9733
10176
|
*/
|
|
9734
|
-
let
|
|
10177
|
+
let MoveFrontElementsBeforeTargetElement = class MoveFrontElementsBeforeTargetElement {
|
|
9735
10178
|
handle(request) {
|
|
9736
10179
|
const elementsToMove = [];
|
|
9737
10180
|
for (let i = request.targetIndex + 1; i < request.allElements.length; i++) {
|
|
@@ -9745,13 +10188,13 @@ let MoveFrontElementsBeforeTargetElementExecution = class MoveFrontElementsBefor
|
|
|
9745
10188
|
request.fItemsContainer.insertBefore(x, request.allElements[request.targetIndex]);
|
|
9746
10189
|
});
|
|
9747
10190
|
}
|
|
9748
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
9749
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10191
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MoveFrontElementsBeforeTargetElement, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10192
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MoveFrontElementsBeforeTargetElement });
|
|
9750
10193
|
};
|
|
9751
|
-
|
|
10194
|
+
MoveFrontElementsBeforeTargetElement = __decorate([
|
|
9752
10195
|
FExecutionRegister(MoveFrontElementsBeforeTargetElementRequest)
|
|
9753
|
-
],
|
|
9754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10196
|
+
], MoveFrontElementsBeforeTargetElement);
|
|
10197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MoveFrontElementsBeforeTargetElement, decorators: [{
|
|
9755
10198
|
type: Injectable
|
|
9756
10199
|
}] });
|
|
9757
10200
|
|
|
@@ -9899,11 +10342,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
9899
10342
|
let SelectAndUpdateNodeLayerExecution = class SelectAndUpdateNodeLayerExecution {
|
|
9900
10343
|
_dragContext = inject(FDraggableDataContext);
|
|
9901
10344
|
_mediator = inject(FMediator);
|
|
9902
|
-
handle(
|
|
9903
|
-
this.
|
|
9904
|
-
this._mediator.execute(new UpdateItemAndChildrenLayersRequest(
|
|
10345
|
+
handle({ nodeOrGroup }) {
|
|
10346
|
+
this._selectNodeIfNotSelected(nodeOrGroup);
|
|
10347
|
+
this._mediator.execute(new UpdateItemAndChildrenLayersRequest(nodeOrGroup, nodeOrGroup.hostElement.parentElement));
|
|
9905
10348
|
}
|
|
9906
|
-
|
|
10349
|
+
_selectNodeIfNotSelected(fNode) {
|
|
9907
10350
|
if (!this._dragContext.selectedItems.includes(fNode) && !fNode.fSelectionDisabled()) {
|
|
9908
10351
|
this._dragContext.selectedItems.push(fNode);
|
|
9909
10352
|
fNode.markAsSelected();
|
|
@@ -9943,7 +10386,7 @@ let EmitSelectionChangeEventExecution = class EmitSelectionChangeEventExecution
|
|
|
9943
10386
|
return this._store.fDraggable.fSelectionChange;
|
|
9944
10387
|
}
|
|
9945
10388
|
_dragContext = inject(FDraggableDataContext);
|
|
9946
|
-
handle(
|
|
10389
|
+
handle(_request) {
|
|
9947
10390
|
if (!this._dragContext.isSelectedChanged) {
|
|
9948
10391
|
return;
|
|
9949
10392
|
}
|
|
@@ -10190,1088 +10633,1149 @@ const F_DRAGGABLE_FEATURES = [
|
|
|
10190
10633
|
RemoveDndFromStoreExecution,
|
|
10191
10634
|
];
|
|
10192
10635
|
|
|
10193
|
-
class AddFlowToStoreRequest {
|
|
10194
|
-
fComponent;
|
|
10195
|
-
static fToken = Symbol('AddFlowToStoreRequest');
|
|
10196
|
-
constructor(fComponent) {
|
|
10197
|
-
this.fComponent = fComponent;
|
|
10198
|
-
}
|
|
10199
|
-
}
|
|
10200
|
-
|
|
10201
10636
|
/**
|
|
10202
|
-
*
|
|
10637
|
+
* Injection token for configuring the side detection tolerance (in pixels).
|
|
10638
|
+
* A new side must beat the previous side by more than this value to switch.
|
|
10203
10639
|
*/
|
|
10204
|
-
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10640
|
+
const CONNECTABLE_SIDE_EPSILON = new InjectionToken('CONNECTABLE_SIDE_EPSILON');
|
|
10641
|
+
/**
|
|
10642
|
+
* Calculates the connectable side of a connector relative to its node host.
|
|
10643
|
+
*
|
|
10644
|
+
* Optimizations & behavior:
|
|
10645
|
+
* - Hysteresis via epsilon to avoid jitter near boundaries.
|
|
10646
|
+
* - Per-connector memoization using WeakMap (no leaks).
|
|
10647
|
+
* - During drag (isDragging === true) the last memorized side is returned immediately
|
|
10648
|
+
* for maximum stability and performance; a safe fallback computes it if missing.
|
|
10649
|
+
*/
|
|
10650
|
+
let CalculateConnectableSideByInternalPosition = class CalculateConnectableSideByInternalPosition {
|
|
10651
|
+
_mediator = inject(FMediator);
|
|
10652
|
+
/**
|
|
10653
|
+
* Stores the last computed side per connector.
|
|
10654
|
+
* WeakMap ensures entries are garbage-collected with the connector objects.
|
|
10655
|
+
*/
|
|
10656
|
+
_lastSide = new WeakMap();
|
|
10657
|
+
/** Pixel threshold to prevent side switching unless the new side is sufficiently better. */
|
|
10658
|
+
_epsilon = Math.max(0, inject(CONNECTABLE_SIDE_EPSILON, { optional: true }) ?? 2);
|
|
10659
|
+
/**
|
|
10660
|
+
* Entry point: returns the connectable side for a given connector.
|
|
10661
|
+
* If a drag is in progress, returns the last memorized side for stability.
|
|
10662
|
+
*/
|
|
10663
|
+
handle({ connector, }) {
|
|
10664
|
+
// Fast path during drag: use memorized side (guaranteed to be present by caller’s contract).
|
|
10665
|
+
if (this._isDragging()) {
|
|
10666
|
+
const cached = this._lastSide.get(connector);
|
|
10667
|
+
if (cached !== undefined)
|
|
10668
|
+
return cached;
|
|
10669
|
+
// Safe fallback: compute once and cache.
|
|
10670
|
+
const computed = this._getSideByDelta(connector.hostElement, connector.fNodeHost, connector);
|
|
10671
|
+
this._lastSide.set(connector, computed);
|
|
10672
|
+
return computed;
|
|
10673
|
+
}
|
|
10674
|
+
// Normal path: compute with hysteresis, then remember.
|
|
10675
|
+
const side = this._getSideByDelta(connector.hostElement, connector.fNodeHost, connector);
|
|
10676
|
+
this._lastSide.set(connector, side);
|
|
10677
|
+
return side;
|
|
10208
10678
|
}
|
|
10209
|
-
|
|
10210
|
-
|
|
10679
|
+
/**
|
|
10680
|
+
* Determines the side of the connector relative to the node host by
|
|
10681
|
+
* comparing distances from the connector's gravity center to each host edge.
|
|
10682
|
+
*
|
|
10683
|
+
* Hysteresis rule:
|
|
10684
|
+
* If the previously chosen side is within `epsilon` pixels of the new best side,
|
|
10685
|
+
* keep the previous side to avoid flicker.
|
|
10686
|
+
*
|
|
10687
|
+
* @param connectorHost - The connector element (HTML or SVG).
|
|
10688
|
+
* @param nodeHost - The parent node element (HTML or SVG).
|
|
10689
|
+
* @param connectorKey - The connector object, used as WeakMap key.
|
|
10690
|
+
* @returns The most stable connectable side.
|
|
10691
|
+
*/
|
|
10692
|
+
_getSideByDelta(connectorHost, nodeHost, connectorKey) {
|
|
10693
|
+
const childRect = RectExtensions.fromElement(connectorHost);
|
|
10694
|
+
const parentRect = nodeHost.getBoundingClientRect();
|
|
10695
|
+
const cx = childRect.gravityCenter.x;
|
|
10696
|
+
const cy = childRect.gravityCenter.y;
|
|
10697
|
+
const deltaLeft = cx - parentRect.left;
|
|
10698
|
+
const deltaRight = parentRect.right - cx;
|
|
10699
|
+
const deltaTop = cy - parentRect.top;
|
|
10700
|
+
const deltaBottom = parentRect.bottom - cy;
|
|
10701
|
+
// Determine best side (min delta) in one pass
|
|
10702
|
+
let minIdx = 0;
|
|
10703
|
+
let minVal = deltaLeft;
|
|
10704
|
+
// i=1..3 correspond to Right, Top, Bottom respectively
|
|
10705
|
+
const candidates = [deltaLeft, deltaRight, deltaTop, deltaBottom];
|
|
10706
|
+
for (let i = 1; i < 4; i++) {
|
|
10707
|
+
const v = candidates[i];
|
|
10708
|
+
if (v < minVal) {
|
|
10709
|
+
minVal = v;
|
|
10710
|
+
minIdx = i;
|
|
10711
|
+
}
|
|
10712
|
+
}
|
|
10713
|
+
let candidate = minIdx === 0
|
|
10714
|
+
? EFConnectableSide.LEFT
|
|
10715
|
+
: minIdx === 1
|
|
10716
|
+
? EFConnectableSide.RIGHT
|
|
10717
|
+
: minIdx === 2
|
|
10718
|
+
? EFConnectableSide.TOP
|
|
10719
|
+
: EFConnectableSide.BOTTOM;
|
|
10720
|
+
// Hysteresis: prefer previously chosen side if it's almost as good
|
|
10721
|
+
const prev = this._lastSide.get(connectorKey);
|
|
10722
|
+
if (prev !== undefined && prev !== candidate) {
|
|
10723
|
+
const prevIdx = prev === EFConnectableSide.LEFT
|
|
10724
|
+
? 0
|
|
10725
|
+
: prev === EFConnectableSide.RIGHT
|
|
10726
|
+
? 1
|
|
10727
|
+
: prev === EFConnectableSide.TOP
|
|
10728
|
+
? 2
|
|
10729
|
+
: 3;
|
|
10730
|
+
const prevDelta = prevIdx === 0
|
|
10731
|
+
? deltaLeft
|
|
10732
|
+
: prevIdx === 1
|
|
10733
|
+
? deltaRight
|
|
10734
|
+
: prevIdx === 2
|
|
10735
|
+
? deltaTop
|
|
10736
|
+
: deltaBottom;
|
|
10737
|
+
// How much better the new side is (smaller is better)
|
|
10738
|
+
const advantage = prevDelta - minVal;
|
|
10739
|
+
if (advantage <= this._epsilon) {
|
|
10740
|
+
candidate = prev;
|
|
10741
|
+
}
|
|
10742
|
+
}
|
|
10743
|
+
return candidate;
|
|
10744
|
+
}
|
|
10745
|
+
/** Returns true if a drag operation is currently active. */
|
|
10746
|
+
_isDragging() {
|
|
10747
|
+
return this._mediator.execute(new IsDragStartedRequest());
|
|
10748
|
+
}
|
|
10749
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByInternalPosition, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10750
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByInternalPosition });
|
|
10211
10751
|
};
|
|
10212
|
-
|
|
10213
|
-
FExecutionRegister(
|
|
10214
|
-
],
|
|
10215
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10752
|
+
CalculateConnectableSideByInternalPosition = __decorate([
|
|
10753
|
+
FExecutionRegister(CalculateConnectableSideByInternalPositionRequest)
|
|
10754
|
+
], CalculateConnectableSideByInternalPosition);
|
|
10755
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByInternalPosition, decorators: [{
|
|
10216
10756
|
type: Injectable
|
|
10217
10757
|
}] });
|
|
10218
10758
|
|
|
10219
|
-
class
|
|
10220
|
-
|
|
10759
|
+
class CalculateConnectorsConnectableSidesRequest {
|
|
10760
|
+
nodeOrGroup;
|
|
10761
|
+
static fToken = Symbol('CalculateConnectorsConnectableSidesRequest');
|
|
10762
|
+
constructor(nodeOrGroup) {
|
|
10763
|
+
this.nodeOrGroup = nodeOrGroup;
|
|
10764
|
+
}
|
|
10221
10765
|
}
|
|
10222
10766
|
|
|
10223
10767
|
/**
|
|
10224
|
-
* Execution that
|
|
10768
|
+
* Execution that calculates connectable sides for all connectors of a node.
|
|
10225
10769
|
*/
|
|
10226
|
-
let
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
|
|
10770
|
+
let CalculateConnectorsConnectableSides = class CalculateConnectorsConnectableSides {
|
|
10771
|
+
_mediator = inject(FMediator);
|
|
10772
|
+
/**
|
|
10773
|
+
* Orchestrates side calculation for all connectors of the given node.
|
|
10774
|
+
*/
|
|
10775
|
+
handle({ nodeOrGroup }) {
|
|
10776
|
+
const connectors = nodeOrGroup.connectors;
|
|
10777
|
+
const len = connectors.length;
|
|
10778
|
+
for (let i = 0; i < len; i++) {
|
|
10779
|
+
const connection = connectors[i];
|
|
10780
|
+
connection.fConnectableSide = this._resolveSideForConnectorFast(connection);
|
|
10781
|
+
}
|
|
10782
|
+
const toRecalc = new Set();
|
|
10783
|
+
for (let i = 0; i < len; i++) {
|
|
10784
|
+
const source = connectors[i];
|
|
10785
|
+
const outs = source.toConnector;
|
|
10786
|
+
if (outs && outs.length) {
|
|
10787
|
+
for (let j = 0, m = outs.length; j < m; j++) {
|
|
10788
|
+
const target = outs[j];
|
|
10789
|
+
const userSide = target.userFConnectableSide;
|
|
10790
|
+
if (isCalculateMode(userSide)) {
|
|
10791
|
+
toRecalc.add(target);
|
|
10792
|
+
}
|
|
10793
|
+
}
|
|
10794
|
+
}
|
|
10795
|
+
}
|
|
10796
|
+
if (toRecalc.size > 0) {
|
|
10797
|
+
toRecalc.forEach((target) => {
|
|
10798
|
+
target.fConnectableSide = this._calculateByConnectedPositions(target);
|
|
10799
|
+
});
|
|
10232
10800
|
}
|
|
10233
|
-
return result;
|
|
10234
10801
|
}
|
|
10235
|
-
|
|
10236
|
-
|
|
10802
|
+
/**
|
|
10803
|
+
* Resolves the connectable side for a connector quickly.
|
|
10804
|
+
* Avoids intermediate arrays and redundant allocations.
|
|
10805
|
+
*/
|
|
10806
|
+
_resolveSideForConnectorFast(connector) {
|
|
10807
|
+
const mode = connector.userFConnectableSide;
|
|
10808
|
+
if (mode === EFConnectableSide.AUTO) {
|
|
10809
|
+
return this._mediator.execute(new CalculateConnectableSideByInternalPositionRequest(connector));
|
|
10810
|
+
}
|
|
10811
|
+
if (isCalculateMode(mode)) {
|
|
10812
|
+
return this._calculateByConnectedPositions(connector);
|
|
10813
|
+
}
|
|
10814
|
+
return mode;
|
|
10815
|
+
}
|
|
10816
|
+
/** Delegates to the connected-positions calculation execution. */
|
|
10817
|
+
_calculateByConnectedPositions(connector) {
|
|
10818
|
+
return this._mediator.execute(new CalculateConnectableSideByConnectedPositionsRequest(connector));
|
|
10819
|
+
}
|
|
10820
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectorsConnectableSides, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10821
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectorsConnectableSides });
|
|
10237
10822
|
};
|
|
10238
|
-
|
|
10239
|
-
FExecutionRegister(
|
|
10240
|
-
],
|
|
10241
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10823
|
+
CalculateConnectorsConnectableSides = __decorate([
|
|
10824
|
+
FExecutionRegister(CalculateConnectorsConnectableSidesRequest)
|
|
10825
|
+
], CalculateConnectorsConnectableSides);
|
|
10826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectorsConnectableSides, decorators: [{
|
|
10242
10827
|
type: Injectable
|
|
10243
10828
|
}] });
|
|
10244
10829
|
|
|
10245
|
-
class
|
|
10246
|
-
static fToken = Symbol('
|
|
10830
|
+
class CalculateNodesBoundingBoxRequest {
|
|
10831
|
+
static fToken = Symbol('CalculateNodesBoundingBoxRequest');
|
|
10247
10832
|
}
|
|
10248
10833
|
|
|
10249
10834
|
/**
|
|
10250
|
-
* Execution that
|
|
10835
|
+
* Execution that calculates the bounding box of all nodes in the FComponentsStore.
|
|
10836
|
+
* It retrieves the rectangles of each node's host element and computes their union.
|
|
10251
10837
|
*/
|
|
10252
|
-
let
|
|
10838
|
+
let CalculateNodesBoundingBox = class CalculateNodesBoundingBox {
|
|
10253
10839
|
_store = inject(FComponentsStore);
|
|
10254
|
-
handle() {
|
|
10255
|
-
return this.
|
|
10840
|
+
handle(_request) {
|
|
10841
|
+
return RectExtensions.union(this._nodesRects());
|
|
10256
10842
|
}
|
|
10257
|
-
|
|
10258
|
-
|
|
10843
|
+
_nodesRects() {
|
|
10844
|
+
return this._store.fNodes.map((x) => RectExtensions.fromElement(x.hostElement));
|
|
10845
|
+
}
|
|
10846
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBox, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10847
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBox });
|
|
10259
10848
|
};
|
|
10260
|
-
|
|
10261
|
-
FExecutionRegister(
|
|
10262
|
-
],
|
|
10263
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10849
|
+
CalculateNodesBoundingBox = __decorate([
|
|
10850
|
+
FExecutionRegister(CalculateNodesBoundingBoxRequest)
|
|
10851
|
+
], CalculateNodesBoundingBox);
|
|
10852
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBox, decorators: [{
|
|
10264
10853
|
type: Injectable
|
|
10265
10854
|
}] });
|
|
10266
10855
|
|
|
10267
|
-
class
|
|
10268
|
-
|
|
10856
|
+
class CalculateNodesBoundingBoxNormalizedPositionRequest {
|
|
10857
|
+
fNodes;
|
|
10858
|
+
static fToken = Symbol('CalculateNodesBoundingBoxNormalizedPositionRequest');
|
|
10859
|
+
constructor(fNodes) {
|
|
10860
|
+
this.fNodes = fNodes;
|
|
10861
|
+
}
|
|
10269
10862
|
}
|
|
10270
10863
|
|
|
10271
10864
|
/**
|
|
10272
|
-
* Execution that
|
|
10865
|
+
* Execution that calculates the bounding box of all nodes in the FComponentsStore
|
|
10866
|
+
* and returns their normalized positions.
|
|
10867
|
+
* It retrieves the rectangles of each node's host element and computes their union.
|
|
10273
10868
|
*/
|
|
10274
|
-
let
|
|
10869
|
+
let CalculateNodesBoundingBoxNormalizedPosition = class CalculateNodesBoundingBoxNormalizedPosition {
|
|
10275
10870
|
_store = inject(FComponentsStore);
|
|
10276
|
-
handle(
|
|
10277
|
-
return this.
|
|
10871
|
+
handle(request) {
|
|
10872
|
+
return RectExtensions.union(this._getNodesRects(request.fNodes || this._store.fNodes));
|
|
10278
10873
|
}
|
|
10279
|
-
|
|
10280
|
-
return {
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
fInputId: x.fInputId(),
|
|
10284
|
-
fType: x.fType,
|
|
10285
|
-
fBehavior: x.fBehavior,
|
|
10286
|
-
isSelected: x.isSelected(),
|
|
10287
|
-
};
|
|
10874
|
+
_getNodesRects(fNodes) {
|
|
10875
|
+
return fNodes.map((x) => {
|
|
10876
|
+
return this._getElementRect(x, RectExtensions.fromElement(x.hostElement));
|
|
10877
|
+
});
|
|
10288
10878
|
}
|
|
10289
|
-
|
|
10290
|
-
|
|
10879
|
+
_getElementRect(fNode, rect) {
|
|
10880
|
+
return RectExtensions.initialize(fNode._position.x, fNode._position.y, rect.width, rect.height);
|
|
10881
|
+
}
|
|
10882
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBoxNormalizedPosition, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10883
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBoxNormalizedPosition });
|
|
10291
10884
|
};
|
|
10292
|
-
|
|
10293
|
-
FExecutionRegister(
|
|
10294
|
-
],
|
|
10295
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10885
|
+
CalculateNodesBoundingBoxNormalizedPosition = __decorate([
|
|
10886
|
+
FExecutionRegister(CalculateNodesBoundingBoxNormalizedPositionRequest)
|
|
10887
|
+
], CalculateNodesBoundingBoxNormalizedPosition);
|
|
10888
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBoxNormalizedPosition, decorators: [{
|
|
10296
10889
|
type: Injectable
|
|
10297
10890
|
}] });
|
|
10298
10891
|
|
|
10299
|
-
class
|
|
10300
|
-
|
|
10301
|
-
static fToken = Symbol('
|
|
10302
|
-
constructor(
|
|
10303
|
-
this.
|
|
10892
|
+
class CalculateOutputConnectionsRequest {
|
|
10893
|
+
nodeOrGroup;
|
|
10894
|
+
static fToken = Symbol('CalculateOutputConnectionsRequest');
|
|
10895
|
+
constructor(nodeOrGroup) {
|
|
10896
|
+
this.nodeOrGroup = nodeOrGroup;
|
|
10304
10897
|
}
|
|
10305
10898
|
}
|
|
10306
10899
|
|
|
10307
10900
|
/**
|
|
10308
|
-
* Execution that
|
|
10901
|
+
* Execution that calculates output connections for a given FNode.
|
|
10309
10902
|
*/
|
|
10310
|
-
let
|
|
10903
|
+
let CalculateOutputConnections = class CalculateOutputConnections {
|
|
10311
10904
|
_store = inject(FComponentsStore);
|
|
10312
|
-
handle(
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
isSelected: x.isSelected(),
|
|
10325
|
-
};
|
|
10326
|
-
});
|
|
10905
|
+
handle({ nodeOrGroup }) {
|
|
10906
|
+
const ids = this._collectOutputIds(nodeOrGroup);
|
|
10907
|
+
return this._collectConnections(ids);
|
|
10908
|
+
}
|
|
10909
|
+
_collectOutputIds(nodeOrGroup) {
|
|
10910
|
+
const ids = new Set();
|
|
10911
|
+
for (const connector of this._store.fOutputs) {
|
|
10912
|
+
if (nodeOrGroup.isContains(connector.hostElement)) {
|
|
10913
|
+
ids.add(connector.fId());
|
|
10914
|
+
}
|
|
10915
|
+
}
|
|
10916
|
+
return ids;
|
|
10327
10917
|
}
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
|
|
10331
|
-
.
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
});
|
|
10337
|
-
}
|
|
10338
|
-
_getInputs(hostElement) {
|
|
10339
|
-
return this._store.fInputs
|
|
10340
|
-
.filter((x) => hostElement.contains(x.hostElement))
|
|
10341
|
-
.map((x) => {
|
|
10342
|
-
return {
|
|
10343
|
-
id: x.fId(),
|
|
10344
|
-
fConnectableSide: x.fConnectableSide,
|
|
10345
|
-
};
|
|
10346
|
-
});
|
|
10918
|
+
_collectConnections(ids) {
|
|
10919
|
+
const result = [];
|
|
10920
|
+
for (const conn of this._store.fConnections) {
|
|
10921
|
+
if (ids.has(conn.fOutputId())) {
|
|
10922
|
+
result.push(conn);
|
|
10923
|
+
}
|
|
10924
|
+
}
|
|
10925
|
+
return result;
|
|
10347
10926
|
}
|
|
10348
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10349
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10927
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateOutputConnections, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10928
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateOutputConnections });
|
|
10350
10929
|
};
|
|
10351
|
-
|
|
10352
|
-
FExecutionRegister(
|
|
10353
|
-
],
|
|
10354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10930
|
+
CalculateOutputConnections = __decorate([
|
|
10931
|
+
FExecutionRegister(CalculateOutputConnectionsRequest)
|
|
10932
|
+
], CalculateOutputConnections);
|
|
10933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateOutputConnections, decorators: [{
|
|
10355
10934
|
type: Injectable
|
|
10356
10935
|
}] });
|
|
10357
10936
|
|
|
10358
|
-
class
|
|
10359
|
-
|
|
10937
|
+
class FitToChildNodesAndGroupsRequest {
|
|
10938
|
+
nodeOrGroup;
|
|
10939
|
+
static fToken = Symbol('FitToChildNodesAndGroupsRequest');
|
|
10940
|
+
constructor(nodeOrGroup) {
|
|
10941
|
+
this.nodeOrGroup = nodeOrGroup;
|
|
10942
|
+
}
|
|
10943
|
+
}
|
|
10944
|
+
|
|
10945
|
+
class GetNodePaddingRequest {
|
|
10946
|
+
fNode;
|
|
10947
|
+
rect;
|
|
10948
|
+
static fToken = Symbol('GetNodePaddingRequest');
|
|
10949
|
+
constructor(fNode, rect) {
|
|
10950
|
+
this.fNode = fNode;
|
|
10951
|
+
this.rect = rect;
|
|
10952
|
+
}
|
|
10360
10953
|
}
|
|
10361
10954
|
|
|
10362
10955
|
/**
|
|
10363
|
-
* Execution that retrieves the
|
|
10956
|
+
* Execution that retrieves the padding data of a Node.
|
|
10957
|
+
* If the Node does not include padding, it returns [0, 0, 0, 0].
|
|
10364
10958
|
*/
|
|
10365
|
-
let
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
return {
|
|
10370
|
-
position: this._getCanvasPosition(this._store.fCanvas.transform),
|
|
10371
|
-
scale: this._store.fCanvas.transform.scale,
|
|
10372
|
-
nodes: this._mediator.execute(new GetFlowStateNodesRequest(FNodeDirective)),
|
|
10373
|
-
groups: this._mediator.execute(new GetFlowStateNodesRequest(FGroupDirective)),
|
|
10374
|
-
connections: this._mediator.execute(new GetFlowStateConnectionsRequest()),
|
|
10375
|
-
};
|
|
10959
|
+
let GetNodePadding = class GetNodePadding {
|
|
10960
|
+
_browser = inject(BrowserService);
|
|
10961
|
+
handle(request) {
|
|
10962
|
+
return request.fNode.fIncludePadding() ? this.getPaddingData(request.fNode, request.rect) : [0, 0, 0, 0];
|
|
10376
10963
|
}
|
|
10377
|
-
|
|
10378
|
-
|
|
10964
|
+
getPaddingData(node, rect) {
|
|
10965
|
+
const style = this._browser.window.getComputedStyle(node.hostElement);
|
|
10966
|
+
return [
|
|
10967
|
+
this._browser.toPixels(style.paddingLeft, rect.width, rect.height, style.fontSize),
|
|
10968
|
+
this._browser.toPixels(style.paddingTop, rect.width, rect.height, style.fontSize),
|
|
10969
|
+
this._browser.toPixels(style.paddingRight, rect.width, rect.height, style.fontSize),
|
|
10970
|
+
this._browser.toPixels(style.paddingBottom, rect.width, rect.height, style.fontSize),
|
|
10971
|
+
];
|
|
10379
10972
|
}
|
|
10380
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10381
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10973
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodePadding, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
10974
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodePadding });
|
|
10382
10975
|
};
|
|
10383
|
-
|
|
10384
|
-
FExecutionRegister(
|
|
10385
|
-
],
|
|
10386
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10976
|
+
GetNodePadding = __decorate([
|
|
10977
|
+
FExecutionRegister(GetNodePaddingRequest)
|
|
10978
|
+
], GetNodePadding);
|
|
10979
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodePadding, decorators: [{
|
|
10387
10980
|
type: Injectable
|
|
10388
10981
|
}] });
|
|
10389
10982
|
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
*/
|
|
10393
|
-
const GET_FLOW_STATE_PROVIDERS = [
|
|
10394
|
-
GetFlowStateExecution,
|
|
10395
|
-
GetFlowStateNodesExecution,
|
|
10396
|
-
GetFlowStateConnectionsExecution,
|
|
10397
|
-
];
|
|
10398
|
-
|
|
10399
|
-
class RemoveFlowFromStoreRequest {
|
|
10400
|
-
static fToken = Symbol('RemoveFlowFromStoreRequest');
|
|
10401
|
-
}
|
|
10402
|
-
|
|
10403
|
-
/**
|
|
10404
|
-
* Execution that removes a Flow from the FComponentsStore.
|
|
10405
|
-
*/
|
|
10406
|
-
let RemoveFlowFromStoreExecution = class RemoveFlowFromStoreExecution {
|
|
10983
|
+
let FitToChildNodesAndGroups = class FitToChildNodesAndGroups {
|
|
10984
|
+
_mediator = inject(FMediator);
|
|
10407
10985
|
_store = inject(FComponentsStore);
|
|
10408
|
-
|
|
10409
|
-
this._store.
|
|
10986
|
+
get _nodes() {
|
|
10987
|
+
return this._store.fNodes;
|
|
10410
10988
|
}
|
|
10411
|
-
|
|
10412
|
-
|
|
10989
|
+
handle({ nodeOrGroup }) {
|
|
10990
|
+
if (nodeOrGroup.fAutoSizeToFitChildren()) {
|
|
10991
|
+
const directChildren = this._calculateDirectChildren(nodeOrGroup);
|
|
10992
|
+
if (directChildren.length) {
|
|
10993
|
+
const currentBounding = this._boundingRect(nodeOrGroup);
|
|
10994
|
+
const childrenBounding = this._calculateChildrenBounding(directChildren, this._paddings(nodeOrGroup, currentBounding));
|
|
10995
|
+
nodeOrGroup.updatePosition(childrenBounding);
|
|
10996
|
+
nodeOrGroup.updateSize(childrenBounding);
|
|
10997
|
+
nodeOrGroup.redraw();
|
|
10998
|
+
}
|
|
10999
|
+
}
|
|
11000
|
+
const parent = nodeOrGroup.fParentId();
|
|
11001
|
+
if (!parent) {
|
|
11002
|
+
return;
|
|
11003
|
+
}
|
|
11004
|
+
const parentNode = this._nodes.find(x => x.fId() === parent);
|
|
11005
|
+
if (!parentNode) {
|
|
11006
|
+
return;
|
|
11007
|
+
}
|
|
11008
|
+
this._mediator.execute(new FitToChildNodesAndGroupsRequest(parentNode));
|
|
11009
|
+
}
|
|
11010
|
+
_calculateDirectChildren(nodeOrGroup) {
|
|
11011
|
+
return this._nodes.filter(x => x.fParentId() === nodeOrGroup.fId());
|
|
11012
|
+
}
|
|
11013
|
+
_unionRect(nodeOrGroups) {
|
|
11014
|
+
return RectExtensions.union(nodeOrGroups.map((x) => this._boundingRect(x))) || RectExtensions.initialize();
|
|
11015
|
+
}
|
|
11016
|
+
_boundingRect(nodeOrGroup) {
|
|
11017
|
+
return this._mediator.execute(new GetNormalizedElementRectRequest(nodeOrGroup.hostElement));
|
|
11018
|
+
}
|
|
11019
|
+
_paddings(nodeOrGroup, rect) {
|
|
11020
|
+
return this._mediator.execute(new GetNodePaddingRequest(nodeOrGroup, rect));
|
|
11021
|
+
}
|
|
11022
|
+
_calculateChildrenBounding(directChildren, [top, right, bottom, left]) {
|
|
11023
|
+
let childrenBounding = this._unionRect(directChildren);
|
|
11024
|
+
childrenBounding = RectExtensions.initialize(childrenBounding.x - left, childrenBounding.y - top, childrenBounding.width + left + right, childrenBounding.height + top + bottom);
|
|
11025
|
+
return childrenBounding;
|
|
11026
|
+
}
|
|
11027
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FitToChildNodesAndGroups, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11028
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FitToChildNodesAndGroups });
|
|
10413
11029
|
};
|
|
10414
|
-
|
|
10415
|
-
FExecutionRegister(
|
|
10416
|
-
],
|
|
10417
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11030
|
+
FitToChildNodesAndGroups = __decorate([
|
|
11031
|
+
FExecutionRegister(FitToChildNodesAndGroupsRequest)
|
|
11032
|
+
], FitToChildNodesAndGroups);
|
|
11033
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FitToChildNodesAndGroups, decorators: [{
|
|
10418
11034
|
type: Injectable
|
|
10419
11035
|
}] });
|
|
10420
11036
|
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
const F_FLOW_FEATURES = [
|
|
10427
|
-
AddFlowToStoreExecution,
|
|
10428
|
-
GetFlowExecution,
|
|
10429
|
-
GetFlowHostElementExecution,
|
|
10430
|
-
...GET_FLOW_STATE_PROVIDERS,
|
|
10431
|
-
RemoveFlowFromStoreExecution,
|
|
10432
|
-
];
|
|
10433
|
-
|
|
10434
|
-
class AddLineAlignmentToStoreRequest {
|
|
10435
|
-
fComponent;
|
|
10436
|
-
static fToken = Symbol('AddLineAlignmentToStoreRequest');
|
|
10437
|
-
constructor(fComponent) {
|
|
10438
|
-
this.fComponent = fComponent;
|
|
11037
|
+
class GetChildNodeIdsRequest {
|
|
11038
|
+
id;
|
|
11039
|
+
static fToken = Symbol('GetChildNodeIdsRequest');
|
|
11040
|
+
constructor(id) {
|
|
11041
|
+
this.id = id;
|
|
10439
11042
|
}
|
|
10440
11043
|
}
|
|
10441
11044
|
|
|
10442
11045
|
/**
|
|
10443
|
-
* Execution that
|
|
11046
|
+
* Execution that retrieves all child nodes of a given node in the Flow.
|
|
10444
11047
|
*/
|
|
10445
|
-
let
|
|
11048
|
+
let GetChildNodeIds = class GetChildNodeIds {
|
|
10446
11049
|
_store = inject(FComponentsStore);
|
|
11050
|
+
get _allNodesAndGroups() {
|
|
11051
|
+
return this._store.fNodes;
|
|
11052
|
+
}
|
|
10447
11053
|
handle(request) {
|
|
10448
|
-
|
|
11054
|
+
if (!request.id) {
|
|
11055
|
+
return [];
|
|
11056
|
+
}
|
|
11057
|
+
const visited = new Set();
|
|
11058
|
+
const result = [];
|
|
11059
|
+
this._collectDescendants(request.id, result, visited);
|
|
11060
|
+
return result;
|
|
11061
|
+
}
|
|
11062
|
+
_collectDescendants(nodeId, result, visited) {
|
|
11063
|
+
if (visited.has(nodeId)) {
|
|
11064
|
+
throw new Error(`Circular reference detected in the node hierarchy. Node id: ${nodeId}`);
|
|
11065
|
+
}
|
|
11066
|
+
visited.add(nodeId);
|
|
11067
|
+
const children = this._allNodesAndGroups.filter(n => n.fParentId() === nodeId).map((x) => x.fId());
|
|
11068
|
+
result.push(...children);
|
|
11069
|
+
for (const id of children) {
|
|
11070
|
+
this._collectDescendants(id, result, visited);
|
|
11071
|
+
}
|
|
10449
11072
|
}
|
|
10450
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10451
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11073
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetChildNodeIds, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11074
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetChildNodeIds });
|
|
10452
11075
|
};
|
|
10453
|
-
|
|
10454
|
-
FExecutionRegister(
|
|
10455
|
-
],
|
|
10456
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11076
|
+
GetChildNodeIds = __decorate([
|
|
11077
|
+
FExecutionRegister(GetChildNodeIdsRequest)
|
|
11078
|
+
], GetChildNodeIds);
|
|
11079
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetChildNodeIds, decorators: [{
|
|
10457
11080
|
type: Injectable
|
|
10458
11081
|
}] });
|
|
10459
11082
|
|
|
10460
|
-
class
|
|
10461
|
-
|
|
11083
|
+
class GetParentNodesRequest {
|
|
11084
|
+
nodeOrGroup;
|
|
11085
|
+
static fToken = Symbol('GetParentNodesRequest');
|
|
11086
|
+
constructor(nodeOrGroup) {
|
|
11087
|
+
this.nodeOrGroup = nodeOrGroup;
|
|
11088
|
+
}
|
|
10462
11089
|
}
|
|
10463
11090
|
|
|
10464
11091
|
/**
|
|
10465
|
-
* Execution that
|
|
11092
|
+
* Execution that retrieves all parent nodes of a given node from the FComponentsStore.
|
|
10466
11093
|
*/
|
|
10467
|
-
let
|
|
11094
|
+
let GetParentNodes = class GetParentNodes {
|
|
10468
11095
|
_store = inject(FComponentsStore);
|
|
10469
|
-
handle(
|
|
10470
|
-
this.
|
|
11096
|
+
handle({ nodeOrGroup }) {
|
|
11097
|
+
return this._getParentNodes(nodeOrGroup, new Set(), []);
|
|
10471
11098
|
}
|
|
10472
|
-
|
|
10473
|
-
|
|
11099
|
+
_getParentNodes(nodeOrGroup, visited, result) {
|
|
11100
|
+
if (visited.has(nodeOrGroup.fId())) {
|
|
11101
|
+
throw new Error('Circular reference detected in the node hierarchy. Node id: ' + nodeOrGroup.fId());
|
|
11102
|
+
}
|
|
11103
|
+
visited.add(nodeOrGroup.fId());
|
|
11104
|
+
const parent = this._store.fNodes.find((x) => x.fId() === nodeOrGroup.fParentId());
|
|
11105
|
+
if (!parent) {
|
|
11106
|
+
return result;
|
|
11107
|
+
}
|
|
11108
|
+
result.push(parent);
|
|
11109
|
+
return this._getParentNodes(parent, visited, result);
|
|
11110
|
+
}
|
|
11111
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetParentNodes, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11112
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetParentNodes });
|
|
10474
11113
|
};
|
|
10475
|
-
|
|
10476
|
-
FExecutionRegister(
|
|
10477
|
-
],
|
|
10478
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11114
|
+
GetParentNodes = __decorate([
|
|
11115
|
+
FExecutionRegister(GetParentNodesRequest)
|
|
11116
|
+
], GetParentNodes);
|
|
11117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetParentNodes, decorators: [{
|
|
10479
11118
|
type: Injectable
|
|
10480
11119
|
}] });
|
|
10481
11120
|
|
|
11121
|
+
class UpdateNodeWhenStateOrSizeChangedRequest {
|
|
11122
|
+
nodeOrGroup;
|
|
11123
|
+
destroyRef;
|
|
11124
|
+
static fToken = Symbol('UpdateNodeWhenStateOrSizeChangedRequest');
|
|
11125
|
+
constructor(nodeOrGroup, destroyRef) {
|
|
11126
|
+
this.nodeOrGroup = nodeOrGroup;
|
|
11127
|
+
this.destroyRef = destroyRef;
|
|
11128
|
+
}
|
|
11129
|
+
}
|
|
11130
|
+
|
|
10482
11131
|
/**
|
|
10483
|
-
*
|
|
10484
|
-
* These executions handle the addition and removal of line alignments
|
|
10485
|
-
* in the FComponentsStore.
|
|
11132
|
+
* Execution that updates a node's connectors when its state or size changes.
|
|
10486
11133
|
*/
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
11134
|
+
let UpdateNodeWhenStateOrSizeChanged = class UpdateNodeWhenStateOrSizeChanged {
|
|
11135
|
+
_mediator = inject(FMediator);
|
|
11136
|
+
/**
|
|
11137
|
+
* Handles the request to update the node's connectors based on state or size changes.
|
|
11138
|
+
* It listens for resize events and recalculates the connectable sides of the connectors.
|
|
11139
|
+
* @param request
|
|
11140
|
+
*/
|
|
11141
|
+
handle({ nodeOrGroup, destroyRef }) {
|
|
11142
|
+
const { hostElement, stateChanges } = nodeOrGroup;
|
|
11143
|
+
new FChannelHub(new FResizeChannel(hostElement), stateChanges)
|
|
11144
|
+
.pipe(notifyOnStart(), debounceTime(10))
|
|
11145
|
+
.listen(destroyRef, () => {
|
|
11146
|
+
this._mediator.execute(new NotifyDataChangedRequest());
|
|
11147
|
+
if (!this._isDragging()) {
|
|
11148
|
+
this._mediator.execute(new CalculateConnectorsConnectableSidesRequest(nodeOrGroup));
|
|
11149
|
+
this._mediator.execute(new FitToChildNodesAndGroupsRequest(nodeOrGroup));
|
|
11150
|
+
}
|
|
11151
|
+
});
|
|
10497
11152
|
}
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
/**
|
|
10501
|
-
* Execution that adds a Node to the FComponentsStore.
|
|
10502
|
-
*/
|
|
10503
|
-
let AddNodeToStore = class AddNodeToStore {
|
|
10504
|
-
_store = inject(FComponentsStore);
|
|
10505
|
-
handle(request) {
|
|
10506
|
-
this._store.addComponent(this._store.fNodes, request.fComponent);
|
|
11153
|
+
_isDragging() {
|
|
11154
|
+
return this._mediator.execute(new IsDragStartedRequest());
|
|
10507
11155
|
}
|
|
10508
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10509
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11156
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UpdateNodeWhenStateOrSizeChanged, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11157
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UpdateNodeWhenStateOrSizeChanged });
|
|
10510
11158
|
};
|
|
10511
|
-
|
|
10512
|
-
FExecutionRegister(
|
|
10513
|
-
],
|
|
10514
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11159
|
+
UpdateNodeWhenStateOrSizeChanged = __decorate([
|
|
11160
|
+
FExecutionRegister(UpdateNodeWhenStateOrSizeChangedRequest)
|
|
11161
|
+
], UpdateNodeWhenStateOrSizeChanged);
|
|
11162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UpdateNodeWhenStateOrSizeChanged, decorators: [{
|
|
10515
11163
|
type: Injectable
|
|
10516
11164
|
}] });
|
|
10517
11165
|
|
|
10518
|
-
class
|
|
10519
|
-
|
|
10520
|
-
static fToken = Symbol('
|
|
10521
|
-
constructor(
|
|
10522
|
-
this.
|
|
11166
|
+
class RemoveNodeFromStoreRequest {
|
|
11167
|
+
instance;
|
|
11168
|
+
static fToken = Symbol('RemoveNodeFromStoreRequest');
|
|
11169
|
+
constructor(instance) {
|
|
11170
|
+
this.instance = instance;
|
|
10523
11171
|
}
|
|
10524
11172
|
}
|
|
10525
11173
|
|
|
10526
11174
|
/**
|
|
10527
|
-
* Execution that
|
|
11175
|
+
* Execution that removes a node from the FComponentsStore.
|
|
10528
11176
|
*/
|
|
10529
|
-
let
|
|
11177
|
+
let RemoveNodeFromStore = class RemoveNodeFromStore {
|
|
10530
11178
|
_store = inject(FComponentsStore);
|
|
10531
|
-
handle(
|
|
10532
|
-
|
|
10533
|
-
}
|
|
10534
|
-
_calculateConnectors(fNode) {
|
|
10535
|
-
return this._store.fInputs.filter((x) => fNode.isContains(x.hostElement)).map((x) => x.fId());
|
|
10536
|
-
}
|
|
10537
|
-
_calculateConnections(ids) {
|
|
10538
|
-
return this._store.fConnections.filter((x) => ids.has(x.fInputId()));
|
|
11179
|
+
handle({ instance }) {
|
|
11180
|
+
this._store.removeComponent(this._store.fNodes, instance);
|
|
10539
11181
|
}
|
|
10540
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10541
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11182
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveNodeFromStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11183
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveNodeFromStore });
|
|
10542
11184
|
};
|
|
10543
|
-
|
|
10544
|
-
FExecutionRegister(
|
|
10545
|
-
],
|
|
10546
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11185
|
+
RemoveNodeFromStore = __decorate([
|
|
11186
|
+
FExecutionRegister(RemoveNodeFromStoreRequest)
|
|
11187
|
+
], RemoveNodeFromStore);
|
|
11188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveNodeFromStore, decorators: [{
|
|
10547
11189
|
type: Injectable
|
|
10548
11190
|
}] });
|
|
10549
11191
|
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
11192
|
+
/**
|
|
11193
|
+
* This file exports all the node-related executions that can be used in the F-Flow domain.
|
|
11194
|
+
*/
|
|
11195
|
+
const F_NODE_FEATURES = [
|
|
11196
|
+
AddNodeToStore,
|
|
11197
|
+
CalculateConnectableSideByConnectedPositions,
|
|
11198
|
+
CalculateConnectableSideByInternalPosition,
|
|
11199
|
+
CalculateInputConnections,
|
|
11200
|
+
CalculateConnectorsConnectableSides,
|
|
11201
|
+
CalculateNodesBoundingBox,
|
|
11202
|
+
CalculateNodesBoundingBoxNormalizedPosition,
|
|
11203
|
+
CalculateOutputConnections,
|
|
11204
|
+
FitToChildNodesAndGroups,
|
|
11205
|
+
GetChildNodeIds,
|
|
11206
|
+
GetNodePadding,
|
|
11207
|
+
GetParentNodes,
|
|
11208
|
+
UpdateNodeWhenStateOrSizeChanged,
|
|
11209
|
+
RemoveNodeFromStore,
|
|
10554
11210
|
];
|
|
10555
|
-
class CalculateConnectableSideByConnectedPositionsRequest {
|
|
10556
|
-
connector;
|
|
10557
|
-
mode;
|
|
10558
|
-
static fToken = Symbol('CalculateConnectableSideByConnectedPositionsRequest');
|
|
10559
|
-
constructor(connector, mode) {
|
|
10560
|
-
this.connector = connector;
|
|
10561
|
-
this.mode = mode;
|
|
10562
|
-
}
|
|
10563
|
-
}
|
|
10564
|
-
|
|
10565
|
-
class CalculateConnectableSideByInternalPositionRequest {
|
|
10566
|
-
connector;
|
|
10567
|
-
static fToken = Symbol('CalculateConnectableSideByInternalPositionRequest');
|
|
10568
|
-
constructor(connector) {
|
|
10569
|
-
this.connector = connector;
|
|
10570
|
-
}
|
|
10571
|
-
}
|
|
10572
11211
|
|
|
10573
11212
|
/**
|
|
10574
|
-
* Execution that
|
|
10575
|
-
* based on the internal position of the connector relative to its node host.
|
|
11213
|
+
* Execution that retrieves all input connectors that can be connected to a given output or outlet connector,
|
|
10576
11214
|
*/
|
|
10577
|
-
let
|
|
10578
|
-
|
|
10579
|
-
|
|
11215
|
+
let CalculateTargetConnectorsToConnect = class CalculateTargetConnectorsToConnect {
|
|
11216
|
+
_mediator = inject(FMediator);
|
|
11217
|
+
_store = inject(FComponentsStore);
|
|
11218
|
+
get _targetConnectors() {
|
|
11219
|
+
return this._store.fInputs;
|
|
10580
11220
|
}
|
|
10581
|
-
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10593
|
-
|
|
10594
|
-
const deltaBottom = parentRect.bottom - childRect.gravityCenter.y;
|
|
10595
|
-
const minDelta = Math.min(deltaLeft, deltaRight, deltaTop, deltaBottom);
|
|
10596
|
-
if (minDelta === deltaLeft) {
|
|
10597
|
-
result = EFConnectableSide.LEFT;
|
|
10598
|
-
}
|
|
10599
|
-
else if (minDelta === deltaRight) {
|
|
10600
|
-
result = EFConnectableSide.RIGHT;
|
|
10601
|
-
}
|
|
10602
|
-
else if (minDelta === deltaTop) {
|
|
10603
|
-
result = EFConnectableSide.TOP;
|
|
11221
|
+
handle({ sourceConnector, pointerPosition, }) {
|
|
11222
|
+
const result = this._getCanBeConnectedInputs(sourceConnector).map((x) => {
|
|
11223
|
+
return this._mediator.execute(new GetConnectorAndRectRequest(x));
|
|
11224
|
+
});
|
|
11225
|
+
setTimeout(() => {
|
|
11226
|
+
this._calculateConnectableSides(result, pointerPosition);
|
|
11227
|
+
});
|
|
11228
|
+
return result;
|
|
11229
|
+
}
|
|
11230
|
+
_getCanBeConnectedInputs(outputOrOutlet) {
|
|
11231
|
+
let targetConnectors = [];
|
|
11232
|
+
if (outputOrOutlet.hasConnectionLimits) {
|
|
11233
|
+
targetConnectors = this._targetConnectors.filter((x) => outputOrOutlet.canConnectTo(x));
|
|
10604
11234
|
}
|
|
10605
11235
|
else {
|
|
10606
|
-
|
|
11236
|
+
targetConnectors = this._targetConnectors.filter((x) => x.canBeConnected);
|
|
11237
|
+
if (!outputOrOutlet.isSelfConnectable) {
|
|
11238
|
+
targetConnectors = this._filterSelfConnectable(targetConnectors, outputOrOutlet);
|
|
11239
|
+
}
|
|
10607
11240
|
}
|
|
10608
|
-
return
|
|
11241
|
+
return targetConnectors;
|
|
10609
11242
|
}
|
|
10610
|
-
|
|
10611
|
-
|
|
11243
|
+
_filterSelfConnectable(targetConnectors, outputOrOutlet) {
|
|
11244
|
+
return targetConnectors.filter(({ fNodeId }) => outputOrOutlet.fNodeId !== fNodeId);
|
|
11245
|
+
}
|
|
11246
|
+
_calculateConnectableSides(connectors, pointerPosition) {
|
|
11247
|
+
connectors.forEach((x) => {
|
|
11248
|
+
if (isCalculateMode(x.fConnector.userFConnectableSide)) {
|
|
11249
|
+
x.fConnector.fConnectableSide = this._calculateByConnectedPositions(x.fConnector, pointerPosition);
|
|
11250
|
+
}
|
|
11251
|
+
});
|
|
11252
|
+
}
|
|
11253
|
+
/** Delegates to the connected-positions calculation execution. */
|
|
11254
|
+
_calculateByConnectedPositions(connector, pointerPosition) {
|
|
11255
|
+
return this._mediator.execute(new CalculateConnectableSideByConnectedPositionsRequest(connector, pointerPosition));
|
|
11256
|
+
}
|
|
11257
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateTargetConnectorsToConnect, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11258
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateTargetConnectorsToConnect });
|
|
10612
11259
|
};
|
|
10613
|
-
|
|
10614
|
-
FExecutionRegister(
|
|
10615
|
-
],
|
|
10616
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11260
|
+
CalculateTargetConnectorsToConnect = __decorate([
|
|
11261
|
+
FExecutionRegister(CalculateTargetConnectorsToConnectRequest)
|
|
11262
|
+
], CalculateTargetConnectorsToConnect);
|
|
11263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateTargetConnectorsToConnect, decorators: [{
|
|
10617
11264
|
type: Injectable
|
|
10618
11265
|
}] });
|
|
10619
11266
|
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
};
|
|
11267
|
+
class CalculateSourceConnectorsToConnectRequest {
|
|
11268
|
+
targetConnector;
|
|
11269
|
+
pointerPosition;
|
|
11270
|
+
static fToken = Symbol('CalculateSourceConnectorsToConnectRequest');
|
|
11271
|
+
constructor(targetConnector, pointerPosition) {
|
|
11272
|
+
this.targetConnector = targetConnector;
|
|
11273
|
+
this.pointerPosition = pointerPosition;
|
|
11274
|
+
}
|
|
11275
|
+
}
|
|
11276
|
+
|
|
10631
11277
|
/**
|
|
10632
|
-
* Execution that
|
|
10633
|
-
*
|
|
11278
|
+
* Execution that retrieves all source connectors that can be connected to a given target connector,
|
|
11279
|
+
* along with their rectangles.
|
|
11280
|
+
* Source - Output or Outlet connectors.
|
|
10634
11281
|
*/
|
|
10635
|
-
let
|
|
11282
|
+
let CalculateSourceConnectorsToConnect = class CalculateSourceConnectorsToConnect {
|
|
10636
11283
|
_mediator = inject(FMediator);
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
* @param request - Contains the connector and optionally allowed sides.
|
|
10641
|
-
* @returns {EFConnectableSide} - The chosen connectable side.
|
|
10642
|
-
*/
|
|
10643
|
-
handle({ connector, mode, }) {
|
|
10644
|
-
const selfCenter = RectExtensions.fromElement(connector.hostElement).gravityCenter;
|
|
10645
|
-
const acc = this._accumulateConnectedCenters(connector.hostElement, connector.toConnector);
|
|
10646
|
-
if (acc.count === 0) {
|
|
10647
|
-
return this._mediator.execute(new CalculateConnectableSideByInternalPositionRequest(connector));
|
|
10648
|
-
}
|
|
10649
|
-
const avgX = acc.sumX / acc.count;
|
|
10650
|
-
const avgY = acc.sumY / acc.count;
|
|
10651
|
-
const mask = this._toSideMask(CALCULATE_SIDES[mode]);
|
|
10652
|
-
return this._determineSide(selfCenter.x, selfCenter.y, avgX, avgY, mask);
|
|
11284
|
+
_store = inject(FComponentsStore);
|
|
11285
|
+
get _sourceConnectors() {
|
|
11286
|
+
return this._store.fOutputs;
|
|
10653
11287
|
}
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
sumX += c.x;
|
|
10669
|
-
sumY += c.y;
|
|
10670
|
-
count++;
|
|
11288
|
+
handle({ targetConnector, pointerPosition, }) {
|
|
11289
|
+
const result = this._getConnectableSources(targetConnector).map((x) => {
|
|
11290
|
+
return this._mediator.execute(new GetConnectorAndRectRequest(x));
|
|
11291
|
+
});
|
|
11292
|
+
setTimeout(() => {
|
|
11293
|
+
this._calculateConnectableSides(result, pointerPosition);
|
|
11294
|
+
});
|
|
11295
|
+
return result;
|
|
11296
|
+
}
|
|
11297
|
+
_getConnectableSources(targetConnector) {
|
|
11298
|
+
return this._sourceConnectors.filter((x) => {
|
|
11299
|
+
let result = x.canBeConnected;
|
|
11300
|
+
if (result && x.hasConnectionLimits) {
|
|
11301
|
+
result = x.canConnectTo(targetConnector);
|
|
10671
11302
|
}
|
|
10672
|
-
|
|
10673
|
-
|
|
11303
|
+
return result;
|
|
11304
|
+
});
|
|
10674
11305
|
}
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
_toSideMask(allowed) {
|
|
10680
|
-
if (!allowed || allowed.length === 0)
|
|
10681
|
-
return 15 /* SideMask.ALL */;
|
|
10682
|
-
let mask = 0 /* SideMask.NONE */;
|
|
10683
|
-
for (let i = 0; i < allowed.length; i++) {
|
|
10684
|
-
switch (allowed[i]) {
|
|
10685
|
-
case EFConnectableSide.LEFT:
|
|
10686
|
-
mask |= 1 /* SideMask.LEFT */;
|
|
10687
|
-
break;
|
|
10688
|
-
case EFConnectableSide.RIGHT:
|
|
10689
|
-
mask |= 2 /* SideMask.RIGHT */;
|
|
10690
|
-
break;
|
|
10691
|
-
case EFConnectableSide.TOP:
|
|
10692
|
-
mask |= 4 /* SideMask.TOP */;
|
|
10693
|
-
break;
|
|
10694
|
-
case EFConnectableSide.BOTTOM:
|
|
10695
|
-
mask |= 8 /* SideMask.BOTTOM */;
|
|
10696
|
-
break;
|
|
11306
|
+
_calculateConnectableSides(connectors, pointerPosition) {
|
|
11307
|
+
connectors.forEach((x) => {
|
|
11308
|
+
if (isCalculateMode(x.fConnector.userFConnectableSide)) {
|
|
11309
|
+
x.fConnector.fConnectableSide = this._calculateByConnectedPositions(x.fConnector, pointerPosition);
|
|
10697
11310
|
}
|
|
10698
|
-
}
|
|
10699
|
-
return mask || 15 /* SideMask.ALL */;
|
|
11311
|
+
});
|
|
10700
11312
|
}
|
|
10701
|
-
/**
|
|
10702
|
-
|
|
10703
|
-
|
|
10704
|
-
*/
|
|
10705
|
-
_determineSide(selfX, selfY, avgX, avgY, allowedMask) {
|
|
10706
|
-
const dx = avgX - selfX;
|
|
10707
|
-
const dy = avgY - selfY;
|
|
10708
|
-
const ideal = this._pickIdealSide(dx, dy);
|
|
10709
|
-
if (this._isAllowed(ideal, allowedMask)) {
|
|
10710
|
-
return ideal;
|
|
10711
|
-
}
|
|
10712
|
-
return this._pickFallbackSide(dx, dy, allowedMask, ideal);
|
|
11313
|
+
/** Delegates to the connected-positions calculation execution. */
|
|
11314
|
+
_calculateByConnectedPositions(connector, pointerPosition) {
|
|
11315
|
+
return this._mediator.execute(new CalculateConnectableSideByConnectedPositionsRequest(connector, pointerPosition));
|
|
10713
11316
|
}
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
|
|
10719
|
-
|
|
10720
|
-
|
|
10721
|
-
|
|
10722
|
-
}
|
|
10723
|
-
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
11317
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateSourceConnectorsToConnect, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11318
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateSourceConnectorsToConnect });
|
|
11319
|
+
};
|
|
11320
|
+
CalculateSourceConnectorsToConnect = __decorate([
|
|
11321
|
+
FExecutionRegister(CalculateSourceConnectorsToConnectRequest)
|
|
11322
|
+
], CalculateSourceConnectorsToConnect);
|
|
11323
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateSourceConnectorsToConnect, decorators: [{
|
|
11324
|
+
type: Injectable
|
|
11325
|
+
}] });
|
|
11326
|
+
|
|
11327
|
+
class MarkConnectableConnectorsRequest {
|
|
11328
|
+
connectors;
|
|
11329
|
+
static fToken = Symbol('MarkConnectableConnectorsRequest');
|
|
11330
|
+
constructor(connectors) {
|
|
11331
|
+
this.connectors = connectors;
|
|
10727
11332
|
}
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
return (mask & 4 /* SideMask.TOP */) !== 0;
|
|
10739
|
-
case EFConnectableSide.BOTTOM:
|
|
10740
|
-
return (mask & 8 /* SideMask.BOTTOM */) !== 0;
|
|
10741
|
-
default:
|
|
10742
|
-
return true;
|
|
10743
|
-
}
|
|
11333
|
+
}
|
|
11334
|
+
|
|
11335
|
+
/**
|
|
11336
|
+
* Execution that marks connectors as connectable.
|
|
11337
|
+
*/
|
|
11338
|
+
let MarkConnectableConnectors = class MarkConnectableConnectors {
|
|
11339
|
+
_store = inject(FComponentsStore);
|
|
11340
|
+
handle({ connectors }) {
|
|
11341
|
+
this._store.flowHost.classList.add(F_CSS_CLASS.DRAG_AND_DROP.CONNECTIONS_DRAGGING);
|
|
11342
|
+
connectors.forEach((x) => this._markConnector(x));
|
|
10744
11343
|
}
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
* No intermediate objects, constant-time operations.
|
|
10748
|
-
*/
|
|
10749
|
-
_pickFallbackSide(dx, dy, allowedMask, ideal) {
|
|
10750
|
-
let bestSide = ideal;
|
|
10751
|
-
let bestScore = -Infinity;
|
|
10752
|
-
if (allowedMask & 2 /* SideMask.RIGHT */) {
|
|
10753
|
-
const s = dx;
|
|
10754
|
-
if (s > bestScore) {
|
|
10755
|
-
bestScore = s;
|
|
10756
|
-
bestSide = EFConnectableSide.RIGHT;
|
|
10757
|
-
}
|
|
10758
|
-
}
|
|
10759
|
-
if (allowedMask & 1 /* SideMask.LEFT */) {
|
|
10760
|
-
const s = -dx;
|
|
10761
|
-
if (s > bestScore) {
|
|
10762
|
-
bestScore = s;
|
|
10763
|
-
bestSide = EFConnectableSide.LEFT;
|
|
10764
|
-
}
|
|
10765
|
-
}
|
|
10766
|
-
if (allowedMask & 8 /* SideMask.BOTTOM */) {
|
|
10767
|
-
const s = dy;
|
|
10768
|
-
if (s > bestScore) {
|
|
10769
|
-
bestScore = s;
|
|
10770
|
-
bestSide = EFConnectableSide.BOTTOM;
|
|
10771
|
-
}
|
|
10772
|
-
}
|
|
10773
|
-
if (allowedMask & 4 /* SideMask.TOP */) {
|
|
10774
|
-
const s = -dy;
|
|
10775
|
-
if (s > bestScore) {
|
|
10776
|
-
bestScore = s;
|
|
10777
|
-
bestSide = EFConnectableSide.TOP;
|
|
10778
|
-
}
|
|
10779
|
-
}
|
|
10780
|
-
return bestSide;
|
|
11344
|
+
_markConnector({ hostElement }) {
|
|
11345
|
+
hostElement.classList.add(F_CSS_CLASS.CONNECTOR.CONNECTABLE);
|
|
10781
11346
|
}
|
|
10782
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10783
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11347
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MarkConnectableConnectors, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11348
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MarkConnectableConnectors });
|
|
10784
11349
|
};
|
|
10785
|
-
|
|
10786
|
-
FExecutionRegister(
|
|
10787
|
-
],
|
|
10788
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11350
|
+
MarkConnectableConnectors = __decorate([
|
|
11351
|
+
FExecutionRegister(MarkConnectableConnectorsRequest)
|
|
11352
|
+
], MarkConnectableConnectors);
|
|
11353
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MarkConnectableConnectors, decorators: [{
|
|
10789
11354
|
type: Injectable
|
|
10790
11355
|
}] });
|
|
10791
11356
|
|
|
10792
|
-
class
|
|
10793
|
-
|
|
10794
|
-
static fToken = Symbol('
|
|
10795
|
-
constructor(
|
|
10796
|
-
this.
|
|
11357
|
+
class RemoveInputFromStoreRequest {
|
|
11358
|
+
component;
|
|
11359
|
+
static fToken = Symbol('RemoveInputFromStoreRequest');
|
|
11360
|
+
constructor(component) {
|
|
11361
|
+
this.component = component;
|
|
10797
11362
|
}
|
|
10798
11363
|
}
|
|
10799
11364
|
|
|
10800
|
-
/** Fast predicate: whether the user side is a calculate mode. */
|
|
10801
|
-
function isCalculateMode(side) {
|
|
10802
|
-
return (side === EFConnectableSide.CALCULATE ||
|
|
10803
|
-
side === EFConnectableSide.CALCULATE_HORIZONTAL ||
|
|
10804
|
-
side === EFConnectableSide.CALCULATE_VERTICAL);
|
|
10805
|
-
}
|
|
10806
11365
|
/**
|
|
10807
|
-
* Execution that
|
|
10808
|
-
*
|
|
10809
|
-
* Performance goals:
|
|
10810
|
-
* - Single-pass loops (no `forEach`).
|
|
10811
|
-
* - Unique target recomputation (avoid repeated mediator calls for the same target).
|
|
10812
|
-
* - Fast checks for "calculate" modes (bit mask instead of `includes`).
|
|
11366
|
+
* Execution that removes an inputConnector from the FComponentsStore.
|
|
10813
11367
|
*/
|
|
10814
|
-
let
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
* Two-phase approach:
|
|
10819
|
-
* 1) Update each connector's own side.
|
|
10820
|
-
* 2) Collect unique `toConnector` with calculate modes and recompute once.
|
|
10821
|
-
*/
|
|
10822
|
-
handle({ node }) {
|
|
10823
|
-
const mediator = this._mediator;
|
|
10824
|
-
const connectors = node.connectors;
|
|
10825
|
-
const len = connectors.length;
|
|
10826
|
-
for (let i = 0; i < len; i++) {
|
|
10827
|
-
const connection = connectors[i];
|
|
10828
|
-
connection.fConnectableSide = this._resolveSideForConnectorFast(mediator, connection);
|
|
10829
|
-
}
|
|
10830
|
-
const toRecalc = new Set();
|
|
10831
|
-
for (let i = 0; i < len; i++) {
|
|
10832
|
-
const source = connectors[i];
|
|
10833
|
-
const outs = source.toConnector;
|
|
10834
|
-
if (outs && outs.length) {
|
|
10835
|
-
for (let j = 0, m = outs.length; j < m; j++) {
|
|
10836
|
-
const target = outs[j];
|
|
10837
|
-
const userSide = target.userFConnectableSide;
|
|
10838
|
-
if (isCalculateMode(userSide)) {
|
|
10839
|
-
toRecalc.add(target);
|
|
10840
|
-
}
|
|
10841
|
-
}
|
|
10842
|
-
}
|
|
10843
|
-
}
|
|
10844
|
-
if (toRecalc.size > 0) {
|
|
10845
|
-
toRecalc.forEach((target) => {
|
|
10846
|
-
target.fConnectableSide = mediator.execute(new CalculateConnectableSideByConnectedPositionsRequest(target, userSideToTCalculateMode(target.userFConnectableSide)));
|
|
10847
|
-
});
|
|
10848
|
-
}
|
|
11368
|
+
let RemoveInputFromStore = class RemoveInputFromStore {
|
|
11369
|
+
_store = inject(FComponentsStore);
|
|
11370
|
+
handle({ component }) {
|
|
11371
|
+
this._store.removeComponent(this._store.fInputs, component);
|
|
10849
11372
|
}
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
}
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
11373
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveInputFromStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11374
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveInputFromStore });
|
|
11375
|
+
};
|
|
11376
|
+
RemoveInputFromStore = __decorate([
|
|
11377
|
+
FExecutionRegister(RemoveInputFromStoreRequest)
|
|
11378
|
+
], RemoveInputFromStore);
|
|
11379
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveInputFromStore, decorators: [{
|
|
11380
|
+
type: Injectable
|
|
11381
|
+
}] });
|
|
11382
|
+
|
|
11383
|
+
class RemoveOutletFromStoreRequest {
|
|
11384
|
+
fComponent;
|
|
11385
|
+
static fToken = Symbol('RemoveOutletFromStoreRequest');
|
|
11386
|
+
constructor(fComponent) {
|
|
11387
|
+
this.fComponent = fComponent;
|
|
11388
|
+
}
|
|
11389
|
+
}
|
|
11390
|
+
|
|
11391
|
+
/**
|
|
11392
|
+
* Execution that removes an outlet connector from the FComponentsStore.
|
|
11393
|
+
*/
|
|
11394
|
+
let RemoveOutletFromStoreExecution = class RemoveOutletFromStoreExecution {
|
|
11395
|
+
_store = inject(FComponentsStore);
|
|
11396
|
+
handle(request) {
|
|
11397
|
+
this._store.removeComponent(this._store.fOutlets, request.fComponent);
|
|
10863
11398
|
}
|
|
10864
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10865
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11399
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutletFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11400
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutletFromStoreExecution });
|
|
10866
11401
|
};
|
|
10867
|
-
|
|
10868
|
-
FExecutionRegister(
|
|
10869
|
-
],
|
|
10870
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11402
|
+
RemoveOutletFromStoreExecution = __decorate([
|
|
11403
|
+
FExecutionRegister(RemoveOutletFromStoreRequest)
|
|
11404
|
+
], RemoveOutletFromStoreExecution);
|
|
11405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutletFromStoreExecution, decorators: [{
|
|
10871
11406
|
type: Injectable
|
|
10872
11407
|
}] });
|
|
10873
|
-
/**
|
|
10874
|
-
* Utility: maps EFConnectableSide user value to TCalculateMode safely.
|
|
10875
|
-
* If your enums are distinct, implement the exact mapping here.
|
|
10876
|
-
*/
|
|
10877
|
-
function userSideToTCalculateMode(side) {
|
|
10878
|
-
return side;
|
|
10879
|
-
}
|
|
10880
11408
|
|
|
10881
|
-
class
|
|
10882
|
-
|
|
11409
|
+
class RemoveOutputFromStoreRequest {
|
|
11410
|
+
fComponent;
|
|
11411
|
+
static fToken = Symbol('RemoveOutputFromStoreRequest');
|
|
11412
|
+
constructor(fComponent) {
|
|
11413
|
+
this.fComponent = fComponent;
|
|
11414
|
+
}
|
|
10883
11415
|
}
|
|
10884
11416
|
|
|
10885
11417
|
/**
|
|
10886
|
-
* Execution that
|
|
10887
|
-
* It retrieves the rectangles of each node's host element and computes their union.
|
|
11418
|
+
* Execution that removes an outlet connector from the FComponentsStore.
|
|
10888
11419
|
*/
|
|
10889
|
-
let
|
|
11420
|
+
let RemoveOutputFromStoreExecution = class RemoveOutputFromStoreExecution {
|
|
10890
11421
|
_store = inject(FComponentsStore);
|
|
10891
11422
|
handle(request) {
|
|
10892
|
-
|
|
10893
|
-
}
|
|
10894
|
-
_getNodesRects() {
|
|
10895
|
-
return this._store.fNodes.map((x) => this._getElementRect(x.hostElement));
|
|
10896
|
-
}
|
|
10897
|
-
_getElementRect(element) {
|
|
10898
|
-
return RectExtensions.fromElement(element);
|
|
11423
|
+
this._store.removeComponent(this._store.fOutputs, request.fComponent);
|
|
10899
11424
|
}
|
|
10900
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10901
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11425
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutputFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11426
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutputFromStoreExecution });
|
|
10902
11427
|
};
|
|
10903
|
-
|
|
10904
|
-
FExecutionRegister(
|
|
10905
|
-
],
|
|
10906
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11428
|
+
RemoveOutputFromStoreExecution = __decorate([
|
|
11429
|
+
FExecutionRegister(RemoveOutputFromStoreRequest)
|
|
11430
|
+
], RemoveOutputFromStoreExecution);
|
|
11431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutputFromStoreExecution, decorators: [{
|
|
10907
11432
|
type: Injectable
|
|
10908
11433
|
}] });
|
|
10909
11434
|
|
|
10910
|
-
class
|
|
10911
|
-
|
|
10912
|
-
static fToken = Symbol('
|
|
10913
|
-
constructor(
|
|
10914
|
-
this.
|
|
11435
|
+
class UnmarkConnectableConnectorsRequest {
|
|
11436
|
+
connectors;
|
|
11437
|
+
static fToken = Symbol('UnmarkConnectableConnectorsRequest');
|
|
11438
|
+
constructor(connectors) {
|
|
11439
|
+
this.connectors = connectors;
|
|
10915
11440
|
}
|
|
10916
11441
|
}
|
|
10917
11442
|
|
|
10918
11443
|
/**
|
|
10919
|
-
* Execution that
|
|
10920
|
-
* and returns their normalized positions.
|
|
10921
|
-
* It retrieves the rectangles of each node's host element and computes their union.
|
|
11444
|
+
* Execution that unmarks connectors as connectable.
|
|
10922
11445
|
*/
|
|
10923
|
-
let
|
|
11446
|
+
let UnmarkConnectableConnectors = class UnmarkConnectableConnectors {
|
|
10924
11447
|
_store = inject(FComponentsStore);
|
|
10925
|
-
handle(
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
_getNodesRects(fNodes) {
|
|
10929
|
-
return fNodes.map((x) => {
|
|
10930
|
-
return this._getElementRect(x, RectExtensions.fromElement(x.hostElement));
|
|
10931
|
-
});
|
|
11448
|
+
handle({ connectors }) {
|
|
11449
|
+
this._store.flowHost.classList.remove(F_CSS_CLASS.DRAG_AND_DROP.CONNECTIONS_DRAGGING);
|
|
11450
|
+
connectors.forEach((x) => this._unmarkConnector(x));
|
|
10932
11451
|
}
|
|
10933
|
-
|
|
10934
|
-
|
|
11452
|
+
_unmarkConnector({ hostElement }) {
|
|
11453
|
+
hostElement.classList.remove(F_CSS_CLASS.CONNECTOR.CONNECTABLE);
|
|
10935
11454
|
}
|
|
10936
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10937
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11455
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UnmarkConnectableConnectors, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11456
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UnmarkConnectableConnectors });
|
|
10938
11457
|
};
|
|
10939
|
-
|
|
10940
|
-
FExecutionRegister(
|
|
10941
|
-
],
|
|
10942
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11458
|
+
UnmarkConnectableConnectors = __decorate([
|
|
11459
|
+
FExecutionRegister(UnmarkConnectableConnectorsRequest)
|
|
11460
|
+
], UnmarkConnectableConnectors);
|
|
11461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UnmarkConnectableConnectors, decorators: [{
|
|
10943
11462
|
type: Injectable
|
|
10944
11463
|
}] });
|
|
10945
11464
|
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
11465
|
+
/*
|
|
11466
|
+
* This file exports all the connector-related executions that can be used in the FFlow domain.
|
|
11467
|
+
*/
|
|
11468
|
+
const F_CONNECTORS_FEATURES = [
|
|
11469
|
+
AddInputToStore,
|
|
11470
|
+
AddOutletToStore,
|
|
11471
|
+
AddOutputToStore,
|
|
11472
|
+
CalculateClosestConnector,
|
|
11473
|
+
FindConnectableConnectorUsingPriorityAndPositionExecution,
|
|
11474
|
+
CalculateSourceConnectorsToConnect,
|
|
11475
|
+
CalculateTargetConnectorsToConnect,
|
|
11476
|
+
GetConnectorAndRect,
|
|
11477
|
+
MarkConnectableConnectors,
|
|
11478
|
+
RemoveInputFromStore,
|
|
11479
|
+
RemoveOutletFromStoreExecution,
|
|
11480
|
+
RemoveOutputFromStoreExecution,
|
|
11481
|
+
UnmarkConnectableConnectors,
|
|
11482
|
+
];
|
|
11483
|
+
|
|
11484
|
+
class AddFlowToStoreRequest {
|
|
11485
|
+
fComponent;
|
|
11486
|
+
static fToken = Symbol('AddFlowToStoreRequest');
|
|
11487
|
+
constructor(fComponent) {
|
|
11488
|
+
this.fComponent = fComponent;
|
|
10951
11489
|
}
|
|
10952
11490
|
}
|
|
10953
11491
|
|
|
10954
11492
|
/**
|
|
10955
|
-
* Execution that
|
|
11493
|
+
* Execution that adds a Flow to the FComponentsStore.
|
|
10956
11494
|
*/
|
|
10957
|
-
let
|
|
11495
|
+
let AddFlowToStoreExecution = class AddFlowToStoreExecution {
|
|
10958
11496
|
_store = inject(FComponentsStore);
|
|
10959
11497
|
handle(request) {
|
|
10960
|
-
|
|
10961
|
-
}
|
|
10962
|
-
_calculateConnectors(fNode) {
|
|
10963
|
-
return this._store.fOutputs.filter((x) => fNode.isContains(x.hostElement)).map((x) => x.fId());
|
|
10964
|
-
}
|
|
10965
|
-
_calculateConnections(ids) {
|
|
10966
|
-
return this._store.fConnections.filter((x) => ids.has(x.fOutputId()));
|
|
11498
|
+
this._store.fFlow = request.fComponent;
|
|
10967
11499
|
}
|
|
10968
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
10969
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11500
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddFlowToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11501
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddFlowToStoreExecution });
|
|
10970
11502
|
};
|
|
10971
|
-
|
|
10972
|
-
FExecutionRegister(
|
|
10973
|
-
],
|
|
10974
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11503
|
+
AddFlowToStoreExecution = __decorate([
|
|
11504
|
+
FExecutionRegister(AddFlowToStoreRequest)
|
|
11505
|
+
], AddFlowToStoreExecution);
|
|
11506
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddFlowToStoreExecution, decorators: [{
|
|
10975
11507
|
type: Injectable
|
|
10976
11508
|
}] });
|
|
10977
11509
|
|
|
10978
|
-
class
|
|
10979
|
-
|
|
10980
|
-
static fToken = Symbol('FitToChildNodesAndGroupsRequest');
|
|
10981
|
-
constructor(nodeOrGroup) {
|
|
10982
|
-
this.nodeOrGroup = nodeOrGroup;
|
|
10983
|
-
}
|
|
11510
|
+
class GetFlowRequest {
|
|
11511
|
+
static fToken = Symbol('GetFlowRequest');
|
|
10984
11512
|
}
|
|
10985
11513
|
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
11514
|
+
/**
|
|
11515
|
+
* Execution that retrieves the current Flow from the FComponentsStore.
|
|
11516
|
+
*/
|
|
11517
|
+
let GetFlowExecution = class GetFlowExecution {
|
|
11518
|
+
_store = inject(FComponentsStore);
|
|
11519
|
+
handle(request) {
|
|
11520
|
+
const result = this._store.fFlow;
|
|
11521
|
+
if (!result) {
|
|
11522
|
+
throw new Error(`Flow not found in store`);
|
|
11523
|
+
}
|
|
11524
|
+
return result;
|
|
10993
11525
|
}
|
|
11526
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11527
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowExecution });
|
|
11528
|
+
};
|
|
11529
|
+
GetFlowExecution = __decorate([
|
|
11530
|
+
FExecutionRegister(GetFlowRequest)
|
|
11531
|
+
], GetFlowExecution);
|
|
11532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowExecution, decorators: [{
|
|
11533
|
+
type: Injectable
|
|
11534
|
+
}] });
|
|
11535
|
+
|
|
11536
|
+
class GetFlowHostElementRequest {
|
|
11537
|
+
static fToken = Symbol('GetFlowHostElementRequest');
|
|
10994
11538
|
}
|
|
10995
11539
|
|
|
10996
11540
|
/**
|
|
10997
|
-
* Execution that retrieves the
|
|
10998
|
-
* If the Node does not include padding, it returns [0, 0, 0, 0].
|
|
11541
|
+
* Execution that retrieves the Flow host element from the FComponentsStore.
|
|
10999
11542
|
*/
|
|
11000
|
-
let
|
|
11001
|
-
|
|
11002
|
-
handle(
|
|
11003
|
-
return
|
|
11004
|
-
}
|
|
11005
|
-
getPaddingData(node, rect) {
|
|
11006
|
-
const style = this._browser.window.getComputedStyle(node.hostElement);
|
|
11007
|
-
return [
|
|
11008
|
-
this._browser.toPixels(style.paddingLeft, rect.width, rect.height, style.fontSize),
|
|
11009
|
-
this._browser.toPixels(style.paddingTop, rect.width, rect.height, style.fontSize),
|
|
11010
|
-
this._browser.toPixels(style.paddingRight, rect.width, rect.height, style.fontSize),
|
|
11011
|
-
this._browser.toPixels(style.paddingBottom, rect.width, rect.height, style.fontSize),
|
|
11012
|
-
];
|
|
11543
|
+
let GetFlowHostElementExecution = class GetFlowHostElementExecution {
|
|
11544
|
+
_store = inject(FComponentsStore);
|
|
11545
|
+
handle() {
|
|
11546
|
+
return this._store.flowHost;
|
|
11013
11547
|
}
|
|
11014
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11015
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11548
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowHostElementExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11549
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowHostElementExecution });
|
|
11016
11550
|
};
|
|
11017
|
-
|
|
11018
|
-
FExecutionRegister(
|
|
11019
|
-
],
|
|
11020
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11551
|
+
GetFlowHostElementExecution = __decorate([
|
|
11552
|
+
FExecutionRegister(GetFlowHostElementRequest)
|
|
11553
|
+
], GetFlowHostElementExecution);
|
|
11554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowHostElementExecution, decorators: [{
|
|
11021
11555
|
type: Injectable
|
|
11022
11556
|
}] });
|
|
11023
11557
|
|
|
11024
|
-
|
|
11025
|
-
|
|
11558
|
+
class GetFlowStateConnectionsRequest {
|
|
11559
|
+
static fToken = Symbol('GetFlowStateConnectionsRequest');
|
|
11560
|
+
}
|
|
11561
|
+
|
|
11562
|
+
/**
|
|
11563
|
+
* Execution that retrieves the current Flow state connections from the FComponentsStore.
|
|
11564
|
+
*/
|
|
11565
|
+
let GetFlowStateConnectionsExecution = class GetFlowStateConnectionsExecution {
|
|
11026
11566
|
_store = inject(FComponentsStore);
|
|
11027
|
-
|
|
11028
|
-
return this._store.
|
|
11029
|
-
}
|
|
11030
|
-
handle({ nodeOrGroup }) {
|
|
11031
|
-
if (nodeOrGroup.fAutoSizeToFitChildren()) {
|
|
11032
|
-
const directChildren = this._calculateDirectChildren(nodeOrGroup);
|
|
11033
|
-
if (directChildren.length) {
|
|
11034
|
-
const currentBounding = this._boundingRect(nodeOrGroup);
|
|
11035
|
-
const childrenBounding = this._calculateChildrenBounding(directChildren, this._paddings(nodeOrGroup, currentBounding));
|
|
11036
|
-
nodeOrGroup.updatePosition(childrenBounding);
|
|
11037
|
-
nodeOrGroup.updateSize(childrenBounding);
|
|
11038
|
-
nodeOrGroup.redraw();
|
|
11039
|
-
}
|
|
11040
|
-
}
|
|
11041
|
-
const parent = nodeOrGroup.fParentId();
|
|
11042
|
-
if (!parent) {
|
|
11043
|
-
return;
|
|
11044
|
-
}
|
|
11045
|
-
const parentNode = this._nodes.find(x => x.fId() === parent);
|
|
11046
|
-
if (!parentNode) {
|
|
11047
|
-
return;
|
|
11048
|
-
}
|
|
11049
|
-
this._mediator.execute(new FitToChildNodesAndGroupsRequest(parentNode));
|
|
11050
|
-
}
|
|
11051
|
-
_calculateDirectChildren(nodeOrGroup) {
|
|
11052
|
-
return this._nodes.filter(x => x.fParentId() === nodeOrGroup.fId());
|
|
11053
|
-
}
|
|
11054
|
-
_unionRect(nodeOrGroups) {
|
|
11055
|
-
return RectExtensions.union(nodeOrGroups.map((x) => this._boundingRect(x))) || RectExtensions.initialize();
|
|
11056
|
-
}
|
|
11057
|
-
_boundingRect(nodeOrGroup) {
|
|
11058
|
-
return this._mediator.execute(new GetNormalizedElementRectRequest(nodeOrGroup.hostElement));
|
|
11059
|
-
}
|
|
11060
|
-
_paddings(nodeOrGroup, rect) {
|
|
11061
|
-
return this._mediator.execute(new GetNodePaddingRequest(nodeOrGroup, rect));
|
|
11567
|
+
handle(_request) {
|
|
11568
|
+
return this._store.fConnections.map(this._mapToConnectionState);
|
|
11062
11569
|
}
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
11570
|
+
_mapToConnectionState(x) {
|
|
11571
|
+
return {
|
|
11572
|
+
id: x.fId(),
|
|
11573
|
+
fOutputId: x.fOutputId(),
|
|
11574
|
+
fInputId: x.fInputId(),
|
|
11575
|
+
fType: x.fType,
|
|
11576
|
+
fBehavior: x.fBehavior,
|
|
11577
|
+
isSelected: x.isSelected(),
|
|
11578
|
+
};
|
|
11067
11579
|
}
|
|
11068
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11069
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11580
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateConnectionsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11581
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateConnectionsExecution });
|
|
11070
11582
|
};
|
|
11071
|
-
|
|
11072
|
-
FExecutionRegister(
|
|
11073
|
-
],
|
|
11074
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11583
|
+
GetFlowStateConnectionsExecution = __decorate([
|
|
11584
|
+
FExecutionRegister(GetFlowStateConnectionsRequest)
|
|
11585
|
+
], GetFlowStateConnectionsExecution);
|
|
11586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateConnectionsExecution, decorators: [{
|
|
11075
11587
|
type: Injectable
|
|
11076
11588
|
}] });
|
|
11077
11589
|
|
|
11078
|
-
class
|
|
11079
|
-
|
|
11080
|
-
static fToken = Symbol('
|
|
11081
|
-
constructor(
|
|
11082
|
-
this.
|
|
11590
|
+
class GetFlowStateNodesRequest {
|
|
11591
|
+
type;
|
|
11592
|
+
static fToken = Symbol('GetFlowStateNodesRequest');
|
|
11593
|
+
constructor(type) {
|
|
11594
|
+
this.type = type;
|
|
11083
11595
|
}
|
|
11084
11596
|
}
|
|
11085
11597
|
|
|
11086
11598
|
/**
|
|
11087
|
-
* Execution that retrieves
|
|
11599
|
+
* Execution that retrieves the state of Flow nodes, including their position, size, inputs, outputs, and selection status.
|
|
11088
11600
|
*/
|
|
11089
|
-
let
|
|
11601
|
+
let GetFlowStateNodesExecution = class GetFlowStateNodesExecution {
|
|
11090
11602
|
_store = inject(FComponentsStore);
|
|
11091
|
-
get _allNodesAndGroups() {
|
|
11092
|
-
return this._store.fNodes;
|
|
11093
|
-
}
|
|
11094
11603
|
handle(request) {
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
|
|
11098
|
-
|
|
11099
|
-
|
|
11100
|
-
|
|
11101
|
-
|
|
11604
|
+
return this._store.fNodes
|
|
11605
|
+
.filter((x) => x instanceof request.type)
|
|
11606
|
+
.map((x) => {
|
|
11607
|
+
return {
|
|
11608
|
+
id: x.fId(),
|
|
11609
|
+
parent: x.fParentId(),
|
|
11610
|
+
position: x._position,
|
|
11611
|
+
size: x._size,
|
|
11612
|
+
rotate: x._rotate,
|
|
11613
|
+
fOutputs: this._getOutputs(x.hostElement),
|
|
11614
|
+
fInputs: this._getInputs(x.hostElement),
|
|
11615
|
+
isSelected: x.isSelected(),
|
|
11616
|
+
};
|
|
11617
|
+
});
|
|
11102
11618
|
}
|
|
11103
|
-
|
|
11104
|
-
|
|
11105
|
-
|
|
11106
|
-
|
|
11107
|
-
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
}
|
|
11619
|
+
_getOutputs(hostElement) {
|
|
11620
|
+
return this._store.fOutputs
|
|
11621
|
+
.filter((x) => hostElement.contains(x.hostElement))
|
|
11622
|
+
.map((x) => {
|
|
11623
|
+
return {
|
|
11624
|
+
id: x.fId(),
|
|
11625
|
+
fConnectableSide: x.fConnectableSide,
|
|
11626
|
+
};
|
|
11627
|
+
});
|
|
11113
11628
|
}
|
|
11114
|
-
|
|
11115
|
-
|
|
11629
|
+
_getInputs(hostElement) {
|
|
11630
|
+
return this._store.fInputs
|
|
11631
|
+
.filter((x) => hostElement.contains(x.hostElement))
|
|
11632
|
+
.map((x) => {
|
|
11633
|
+
return {
|
|
11634
|
+
id: x.fId(),
|
|
11635
|
+
fConnectableSide: x.fConnectableSide,
|
|
11636
|
+
};
|
|
11637
|
+
});
|
|
11638
|
+
}
|
|
11639
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateNodesExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11640
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateNodesExecution });
|
|
11116
11641
|
};
|
|
11117
|
-
|
|
11118
|
-
FExecutionRegister(
|
|
11119
|
-
],
|
|
11120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11642
|
+
GetFlowStateNodesExecution = __decorate([
|
|
11643
|
+
FExecutionRegister(GetFlowStateNodesRequest)
|
|
11644
|
+
], GetFlowStateNodesExecution);
|
|
11645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateNodesExecution, decorators: [{
|
|
11121
11646
|
type: Injectable
|
|
11122
11647
|
}] });
|
|
11123
11648
|
|
|
11124
|
-
class
|
|
11125
|
-
static fToken = Symbol('
|
|
11649
|
+
class GetFlowStateRequest {
|
|
11650
|
+
static fToken = Symbol('GetFlowStateRequest');
|
|
11126
11651
|
}
|
|
11127
11652
|
|
|
11128
11653
|
/**
|
|
11129
|
-
* Execution that retrieves
|
|
11654
|
+
* Execution that retrieves the current state of the Flow, including its position, scale, nodes, groups, and connections.
|
|
11130
11655
|
*/
|
|
11131
|
-
let
|
|
11656
|
+
let GetFlowStateExecution = class GetFlowStateExecution {
|
|
11657
|
+
_mediator = inject(FMediator);
|
|
11132
11658
|
_store = inject(FComponentsStore);
|
|
11133
|
-
handle(
|
|
11134
|
-
return
|
|
11659
|
+
handle(payload) {
|
|
11660
|
+
return {
|
|
11661
|
+
position: this._getCanvasPosition(this._store.fCanvas.transform),
|
|
11662
|
+
scale: this._store.fCanvas.transform.scale,
|
|
11663
|
+
nodes: this._mediator.execute(new GetFlowStateNodesRequest(FNodeDirective)),
|
|
11664
|
+
groups: this._mediator.execute(new GetFlowStateNodesRequest(FGroupDirective)),
|
|
11665
|
+
connections: this._mediator.execute(new GetFlowStateConnectionsRequest()),
|
|
11666
|
+
};
|
|
11667
|
+
}
|
|
11668
|
+
_getCanvasPosition(transform) {
|
|
11669
|
+
return PointExtensions.sum(transform.position, transform.scaledPosition);
|
|
11135
11670
|
}
|
|
11136
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11137
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11671
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11672
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateExecution });
|
|
11138
11673
|
};
|
|
11139
|
-
|
|
11140
|
-
FExecutionRegister(
|
|
11141
|
-
],
|
|
11142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11674
|
+
GetFlowStateExecution = __decorate([
|
|
11675
|
+
FExecutionRegister(GetFlowStateRequest)
|
|
11676
|
+
], GetFlowStateExecution);
|
|
11677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateExecution, decorators: [{
|
|
11143
11678
|
type: Injectable
|
|
11144
11679
|
}] });
|
|
11145
11680
|
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11681
|
+
/**
|
|
11682
|
+
* Providers for retrieving the current Flow state, including nodes, groups, and connections.
|
|
11683
|
+
*/
|
|
11684
|
+
const GET_FLOW_STATE_PROVIDERS = [
|
|
11685
|
+
GetFlowStateExecution,
|
|
11686
|
+
GetFlowStateNodesExecution,
|
|
11687
|
+
GetFlowStateConnectionsExecution,
|
|
11688
|
+
];
|
|
11689
|
+
|
|
11690
|
+
class RemoveFlowFromStoreRequest {
|
|
11691
|
+
static fToken = Symbol('RemoveFlowFromStoreRequest');
|
|
11152
11692
|
}
|
|
11153
11693
|
|
|
11154
11694
|
/**
|
|
11155
|
-
* Execution that
|
|
11695
|
+
* Execution that removes a Flow from the FComponentsStore.
|
|
11156
11696
|
*/
|
|
11157
|
-
let
|
|
11697
|
+
let RemoveFlowFromStoreExecution = class RemoveFlowFromStoreExecution {
|
|
11158
11698
|
_store = inject(FComponentsStore);
|
|
11159
11699
|
handle(request) {
|
|
11160
|
-
|
|
11161
|
-
}
|
|
11162
|
-
_getParentNodes(fNode, visited, result) {
|
|
11163
|
-
if (visited.has(fNode.fId())) {
|
|
11164
|
-
throw new Error('Circular reference detected in the node hierarchy. Node id: ' + fNode.fId());
|
|
11165
|
-
}
|
|
11166
|
-
visited.add(fNode.fId());
|
|
11167
|
-
const parent = this._store.fNodes.find((x) => x.fId() === fNode.fParentId());
|
|
11168
|
-
if (!parent) {
|
|
11169
|
-
return result;
|
|
11170
|
-
}
|
|
11171
|
-
result.push(parent);
|
|
11172
|
-
return this._getParentNodes(parent, visited, result);
|
|
11700
|
+
this._store.fFlow = undefined;
|
|
11173
11701
|
}
|
|
11174
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11175
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11702
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveFlowFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11703
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveFlowFromStoreExecution });
|
|
11176
11704
|
};
|
|
11177
|
-
|
|
11178
|
-
FExecutionRegister(
|
|
11179
|
-
],
|
|
11180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11705
|
+
RemoveFlowFromStoreExecution = __decorate([
|
|
11706
|
+
FExecutionRegister(RemoveFlowFromStoreRequest)
|
|
11707
|
+
], RemoveFlowFromStoreExecution);
|
|
11708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveFlowFromStoreExecution, decorators: [{
|
|
11181
11709
|
type: Injectable
|
|
11182
11710
|
}] });
|
|
11183
11711
|
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11712
|
+
/**
|
|
11713
|
+
* Providers for managing the Flow in the FComponentsStore.
|
|
11714
|
+
* This includes adding, retrieving, and removing the Flow,
|
|
11715
|
+
* as well as getting the Flow host element and its state.
|
|
11716
|
+
*/
|
|
11717
|
+
const F_FLOW_FEATURES = [
|
|
11718
|
+
AddFlowToStoreExecution,
|
|
11719
|
+
GetFlowExecution,
|
|
11720
|
+
GetFlowHostElementExecution,
|
|
11721
|
+
...GET_FLOW_STATE_PROVIDERS,
|
|
11722
|
+
RemoveFlowFromStoreExecution,
|
|
11723
|
+
];
|
|
11724
|
+
|
|
11725
|
+
class AddLineAlignmentToStoreRequest {
|
|
11726
|
+
instance;
|
|
11727
|
+
static fToken = Symbol('AddLineAlignmentToStoreRequest');
|
|
11728
|
+
constructor(instance) {
|
|
11729
|
+
this.instance = instance;
|
|
11191
11730
|
}
|
|
11192
11731
|
}
|
|
11193
11732
|
|
|
11194
11733
|
/**
|
|
11195
|
-
* Execution that
|
|
11734
|
+
* Execution that adds a line alignment to the FComponentsStore.
|
|
11196
11735
|
*/
|
|
11197
|
-
let
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
* It listens for resize events and recalculates the connectable sides of the connectors.
|
|
11202
|
-
* @param request
|
|
11203
|
-
*/
|
|
11204
|
-
handle({ nodeOrGroup, destroyRef }) {
|
|
11205
|
-
const { hostElement, stateChanges } = nodeOrGroup;
|
|
11206
|
-
new FChannelHub(new FResizeChannel(hostElement), stateChanges)
|
|
11207
|
-
.pipe(notifyOnStart(), debounceTime(10))
|
|
11208
|
-
.listen(destroyRef, () => {
|
|
11209
|
-
this._mediator.execute(new NotifyDataChangedRequest());
|
|
11210
|
-
if (!this._isDragging()) {
|
|
11211
|
-
this._mediator.execute(new CalculateNodeConnectorsConnectableSidesRequest(nodeOrGroup));
|
|
11212
|
-
this._mediator.execute(new FitToChildNodesAndGroupsRequest(nodeOrGroup));
|
|
11213
|
-
}
|
|
11214
|
-
});
|
|
11215
|
-
}
|
|
11216
|
-
_isDragging() {
|
|
11217
|
-
return this._mediator.execute(new IsDragStartedRequest());
|
|
11736
|
+
let AddLineAlignmentToStore = class AddLineAlignmentToStore {
|
|
11737
|
+
_store = inject(FComponentsStore);
|
|
11738
|
+
handle({ instance }) {
|
|
11739
|
+
this._store.fLineAlignment = instance;
|
|
11218
11740
|
}
|
|
11219
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11220
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11741
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddLineAlignmentToStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11742
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddLineAlignmentToStore });
|
|
11221
11743
|
};
|
|
11222
|
-
|
|
11223
|
-
FExecutionRegister(
|
|
11224
|
-
],
|
|
11225
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11744
|
+
AddLineAlignmentToStore = __decorate([
|
|
11745
|
+
FExecutionRegister(AddLineAlignmentToStoreRequest)
|
|
11746
|
+
], AddLineAlignmentToStore);
|
|
11747
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddLineAlignmentToStore, decorators: [{
|
|
11226
11748
|
type: Injectable
|
|
11227
11749
|
}] });
|
|
11228
11750
|
|
|
11229
|
-
class
|
|
11230
|
-
|
|
11231
|
-
static fToken = Symbol('RemoveNodeFromStoreRequest');
|
|
11232
|
-
constructor(fComponent) {
|
|
11233
|
-
this.fComponent = fComponent;
|
|
11234
|
-
}
|
|
11751
|
+
class RemoveLineAlignmentFromStoreRequest {
|
|
11752
|
+
static fToken = Symbol('RemoveLineAlignmentFromStoreRequest');
|
|
11235
11753
|
}
|
|
11236
11754
|
|
|
11237
11755
|
/**
|
|
11238
|
-
* Execution that removes a
|
|
11756
|
+
* Execution that removes a line alignment from the FComponentsStore.
|
|
11239
11757
|
*/
|
|
11240
|
-
let
|
|
11758
|
+
let RemoveLineAlignmentFromStore = class RemoveLineAlignmentFromStore {
|
|
11241
11759
|
_store = inject(FComponentsStore);
|
|
11242
|
-
handle(
|
|
11243
|
-
this._store.
|
|
11760
|
+
handle(_request) {
|
|
11761
|
+
this._store.fLineAlignment = undefined;
|
|
11244
11762
|
}
|
|
11245
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11246
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11763
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveLineAlignmentFromStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11764
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveLineAlignmentFromStore });
|
|
11247
11765
|
};
|
|
11248
|
-
|
|
11249
|
-
FExecutionRegister(
|
|
11250
|
-
],
|
|
11251
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
11766
|
+
RemoveLineAlignmentFromStore = __decorate([
|
|
11767
|
+
FExecutionRegister(RemoveLineAlignmentFromStoreRequest)
|
|
11768
|
+
], RemoveLineAlignmentFromStore);
|
|
11769
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveLineAlignmentFromStore, decorators: [{
|
|
11252
11770
|
type: Injectable
|
|
11253
11771
|
}] });
|
|
11254
11772
|
|
|
11255
11773
|
/**
|
|
11256
|
-
*
|
|
11774
|
+
* Collection of all FLineAlignment feature executions.
|
|
11775
|
+
* These executions handle the addition and removal of line alignments
|
|
11776
|
+
* in the FComponentsStore.
|
|
11257
11777
|
*/
|
|
11258
|
-
const
|
|
11259
|
-
AddNodeToStore,
|
|
11260
|
-
CalculateConnectableSideByConnectedPositions,
|
|
11261
|
-
CalculateConnectableSideByInternalPosition,
|
|
11262
|
-
CalculateInputConnections,
|
|
11263
|
-
CalculateNodeConnectorsConnectableSides,
|
|
11264
|
-
CalculateNodesBoundingBox,
|
|
11265
|
-
CalculateNodesBoundingBoxNormalizedPosition,
|
|
11266
|
-
CalculateOutputConnections,
|
|
11267
|
-
FitToChildNodesAndGroups,
|
|
11268
|
-
GetChildNodeIds,
|
|
11269
|
-
GetNodePadding,
|
|
11270
|
-
GetNodes,
|
|
11271
|
-
GetParentNodes,
|
|
11272
|
-
UpdateNodeWhenStateOrSizeChanged,
|
|
11273
|
-
RemoveNodeFromStore,
|
|
11274
|
-
];
|
|
11778
|
+
const F_LINE_ALIGNMENT_FEATURES = [AddLineAlignmentToStore, RemoveLineAlignmentFromStore];
|
|
11275
11779
|
|
|
11276
11780
|
class AddZoomToStoreRequest {
|
|
11277
11781
|
fComponent;
|
|
@@ -11585,13 +12089,15 @@ function createSVGElement(tag, fBrowser) {
|
|
|
11585
12089
|
function isValidEventTrigger(event, fTrigger) {
|
|
11586
12090
|
return fTrigger(event);
|
|
11587
12091
|
}
|
|
11588
|
-
function defaultEventTrigger(
|
|
12092
|
+
function defaultEventTrigger(_event) {
|
|
11589
12093
|
return true;
|
|
11590
12094
|
}
|
|
11591
12095
|
|
|
11592
12096
|
function isMobile() {
|
|
11593
|
-
|
|
11594
|
-
|
|
12097
|
+
return /android|iPad|iPhone|iPod/i.test(
|
|
12098
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
12099
|
+
// @ts-expect-error
|
|
12100
|
+
navigator.userAgent || navigator.vendor || window['opera']);
|
|
11595
12101
|
}
|
|
11596
12102
|
|
|
11597
12103
|
function Deprecated(newMethodName, removalVersion = '18.0.0') {
|
|
@@ -11647,7 +12153,7 @@ const COMMON_PROVIDERS = [
|
|
|
11647
12153
|
SortItemsByParentExecution,
|
|
11648
12154
|
SortNodeLayersExecution,
|
|
11649
12155
|
UpdateItemAndChildrenLayersExecution,
|
|
11650
|
-
|
|
12156
|
+
MoveFrontElementsBeforeTargetElement,
|
|
11651
12157
|
];
|
|
11652
12158
|
|
|
11653
12159
|
let uniqueId$2 = 0;
|
|
@@ -12293,7 +12799,7 @@ class FFlowComponent extends FFlowBase {
|
|
|
12293
12799
|
...COMMON_PROVIDERS,
|
|
12294
12800
|
...F_DRAGGABLE_PROVIDERS,
|
|
12295
12801
|
{ provide: F_FLOW, useExisting: FFlowComponent },
|
|
12296
|
-
], usesInheritance: true, ngImport: i0, template: "<ng-container>\n <ng-content select=\"[fDefinitions]\"></ng-content>\n\n <ng-content select=\"f-background\"></ng-content>\n\n <ng-content select=\"f-line-alignment\"></ng-content>\n\n <ng-content select=\"f-canvas\"></ng-content>\n\n <ng-content select=\"f-selection-area\"></ng-content>\n\n <ng-content></ng-content>\n</ng-container>\n", styles: [":host{display:block;position:relative;width:100%;height:100%;overflow:hidden;pointer-events:all;-webkit-user-select:none;user-select:none;touch-action:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12802
|
+
], usesInheritance: true, ngImport: i0, template: "<ng-container>\n <ng-content select=\"[fDefinitions]\"></ng-content>\n\n <ng-content select=\"f-background\"></ng-content>\n\n <ng-content select=\"f-line-alignment\"></ng-content>\n\n <ng-content select=\"f-canvas\"></ng-content>\n\n <ng-content select=\"f-selection-area\"></ng-content>\n\n <ng-content></ng-content>\n</ng-container>\n", styles: [":host{display:block;position:relative;width:100%;height:100%;overflow:hidden;pointer-events:all;-webkit-user-select:none;user-select:none;touch-action:none}::ng-deep .f-connection-content{position:fixed;left:0;top:0;pointer-events:all;transform-origin:50% 50%;will-change:transform}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12297
12803
|
}
|
|
12298
12804
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FFlowComponent, decorators: [{
|
|
12299
12805
|
type: Component,
|
|
@@ -12308,7 +12814,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
12308
12814
|
...COMMON_PROVIDERS,
|
|
12309
12815
|
...F_DRAGGABLE_PROVIDERS,
|
|
12310
12816
|
{ provide: F_FLOW, useExisting: FFlowComponent },
|
|
12311
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container>\n <ng-content select=\"[fDefinitions]\"></ng-content>\n\n <ng-content select=\"f-background\"></ng-content>\n\n <ng-content select=\"f-line-alignment\"></ng-content>\n\n <ng-content select=\"f-canvas\"></ng-content>\n\n <ng-content select=\"f-selection-area\"></ng-content>\n\n <ng-content></ng-content>\n</ng-container>\n", styles: [":host{display:block;position:relative;width:100%;height:100%;overflow:hidden;pointer-events:all;-webkit-user-select:none;user-select:none;touch-action:none}\n"] }]
|
|
12817
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container>\n <ng-content select=\"[fDefinitions]\"></ng-content>\n\n <ng-content select=\"f-background\"></ng-content>\n\n <ng-content select=\"f-line-alignment\"></ng-content>\n\n <ng-content select=\"f-canvas\"></ng-content>\n\n <ng-content select=\"f-selection-area\"></ng-content>\n\n <ng-content></ng-content>\n</ng-container>\n", styles: [":host{display:block;position:relative;width:100%;height:100%;overflow:hidden;pointer-events:all;-webkit-user-select:none;user-select:none;touch-action:none}::ng-deep .f-connection-content{position:fixed;left:0;top:0;pointer-events:all;transform-origin:50% 50%;will-change:transform}\n"] }]
|
|
12312
12818
|
}] });
|
|
12313
12819
|
|
|
12314
12820
|
const F_FLOW_PROVIDERS = [
|
|
@@ -12522,5 +13028,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
12522
13028
|
* Generated bundle index. Do not edit.
|
|
12523
13029
|
*/
|
|
12524
13030
|
|
|
12525
|
-
export { AddBackgroundToStoreExecution, AddBackgroundToStoreRequest, AddCanvasToStoreExecution, AddCanvasToStoreRequest, AddConnectionForCreateToStoreExecution, AddConnectionForCreateToStoreRequest, AddConnectionMarkerToStoreExecution, AddConnectionMarkerToStoreRequest, AddConnectionToStoreExecution, AddConnectionToStoreRequest, AddDndToStoreExecution, AddDndToStoreRequest, AddFlowToStoreExecution, AddFlowToStoreRequest, AddInputToStore, AddInputToStoreRequest, AddLineAlignmentToStoreExecution, AddLineAlignmentToStoreRequest, AddNodeToStore, AddNodeToStoreRequest, AddOutletToStore, AddOutletToStoreRequest, AddOutputToStore, AddOutputToStoreRequest, AddPatternToBackgroundExecution, AddPatternToBackgroundRequest, AddSnapConnectionToStoreExecution, AddSnapConnectionToStoreRequest, AddZoomToStoreExecution, AddZoomToStoreRequest, ApplyChildResizeConstraints, ApplyChildResizeConstraintsRequest, ApplyParentResizeConstraints, ApplyParentResizeConstraintsRequest, BaseConnectionDragHandler, BuildDragHierarchy, BuildDragHierarchyRequest, BuildDragHierarchyResponse, CALCULATE_MODES, CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CREATE_MOVE_NODE_DRAG_MODEL_FROM_SELECTION_PROVIDERS, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateChangedRectFromDifference, CalculateChangedRectFromDifferenceRequest, CalculateClosestConnector, CalculateClosestConnectorRequest, CalculateConnectableSideByConnectedPositions, CalculateConnectableSideByConnectedPositionsRequest, CalculateConnectableSideByInternalPosition, CalculateConnectableSideByInternalPositionRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectionLineByBehavior, CalculateConnectionLineByBehaviorRequest, CalculateDirectChildrenUnionRect, CalculateDirectChildrenUnionRectRequest, CalculateDragLimits, CalculateDragLimitsRequest, CalculateFlowPointFromMinimapPointExecution, CalculateFlowPointFromMinimapPointRequest, CalculateInputConnections, CalculateInputConnectionsRequest, CalculateNodeConnectorsConnectableSides, CalculateNodeConnectorsConnectableSidesRequest, CalculateNodesBoundingBox, CalculateNodesBoundingBoxNormalizedPosition, CalculateNodesBoundingBoxNormalizedPositionRequest, CalculateNodesBoundingBoxRequest, CalculateOutputConnections, CalculateOutputConnectionsRequest, CalculateResizeLimits, CalculateResizeLimitsRequest, CenterGroupOrNodeExecution, CenterGroupOrNodeRequest, ClearSelectionExecution, ClearSelectionRequest, ConnectionContentLayoutEngine, CreateConnectionMarkersExecution, CreateConnectionMarkersRequest, CreateDragModelFromSelection, CreateDragModelFromSelectionRequest, CreateInputConnectionHandlerAndSetToNodeHandler, CreateInputConnectionHandlerAndSetToNodeHandlerRequest, CreateOutputConnectionHandlerAndSetToNodeHandler, CreateOutputConnectionHandlerAndSetToNodeHandlerRequest, CreateSnapLines, CreateSnapLinesRequest, CreateSummaryDragHandler, CreateSummaryDragHandlerRequest, DRAG_AND_DROP_COMMON_PROVIDERS, Deprecated, DragAndDropBase, DragConstraintPipeline, DropToGroupFinalize, DropToGroupFinalizeRequest, DropToGroupPreparation, DropToGroupPreparationRequest, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFMarkerType, EFResizeHandleType, EFZoomDirection, EmitSelectionChangeEventExecution, EmitSelectionChangeEventRequest, EndDragSequenceExecution, EndDragSequenceRequest, EventExtensions, ExternalRectConstraint, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FCanvasDragHandler, FCanvasMoveFinalizeExecution, FCanvasMoveFinalizeRequest, FCanvasMovePreparationExecution, FCanvasMovePreparationRequest, FChannel, FChannelHub, FCirclePatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, FConnectionContent, FConnectionDragHandleEndComponent, FConnectionDragHandleStartComponent, FConnectionFactory, FConnectionForCreateComponent, FConnectionGradientComponent, FConnectionPathComponent, FConnectionSelectionComponent, FConnectionTextComponent, FConnectionTextPathDirective, FConnectorBase, FCreateConnectionDragHandler, FCreateConnectionDragHandlerPreparationExecution, FCreateConnectionDragHandlerPreparationRequest, FCreateConnectionEvent, FCreateConnectionFinalizeExecution, FCreateConnectionFinalizeRequest, FCreateConnectionFromOutletPreparationExecution, FCreateConnectionFromOutletPreparationRequest, FCreateConnectionFromOutputPreparationExecution, FCreateConnectionFromOutputPreparationRequest, FCreateConnectionPreparationExecution, FCreateConnectionPreparationRequest, FCreateNodeEvent, FDragBlockerDirective, FDragHandleDirective, FDragHandlerResult, FDragStartedEvent, FDraggableBase, FDraggableDataContext, FDraggableDirective, FDropToGroupEvent, FExternalItemBase, FExternalItemCreatePlaceholderExecution, FExternalItemCreatePlaceholderRequest, FExternalItemCreatePreviewExecution, FExternalItemCreatePreviewRequest, FExternalItemDirective, FExternalItemDragHandler, FExternalItemFinalizeExecution, FExternalItemFinalizeRequest, FExternalItemPlaceholderDirective, FExternalItemPreparationExecution, FExternalItemPreparationRequest, FExternalItemPreviewDirective, FExternalItemService, FFlowBase, FFlowComponent, FFlowModule, FGroupDirective, FLineAlignmentBase, FLineAlignmentComponent, FMarkerBase, FMarkerDirective, FMinimapCanvasDirective, FMinimapComponent, FMinimapData, FMinimapDragHandler, FMinimapFlowDirective, FMinimapViewDirective, FMoveNodesEvent, FNodeBase, FNodeDirective, FNodeDropToGroupDragHandler, FNodeInputBase, FNodeInputDirective, FNodeIntersectedWithConnections, FNodeMoveFinalizeExecution, FNodeMoveFinalizeRequest, FNodeMovePreparationExecution, FNodeMovePreparationRequest, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FNodeRotateDragHandler, FNodeRotateFinalizeExecution, FNodeRotateFinalizeRequest, FNodeRotatePreparationExecution, FNodeRotatePreparationRequest, FReassignConnectionDragHandler, FReassignConnectionEvent, FReassignConnectionFinalizeExecution, FReassignConnectionFinalizeRequest, FReassignConnectionPreparationExecution, FReassignConnectionPreparationRequest, FReassignSourceDragHandler, FReassignTargetDragHandler, FRectPatternComponent, FResizeChannel, FResizeHandleDirective, FRotateHandleDirective, FSegmentPathBuilder, FSelectionAreaBase, FSelectionAreaComponent, FSelectionChangeEvent, FSingleSelectExecution, FSingleSelectRequest, FSnapConnectionComponent, FSourceConnectorBase, FStraightPathBuilder, FZoomBase, FZoomDirective, F_AFTER_MAIN_PLUGIN, F_BACKGROUND, F_BACKGROUND_FEATURES, F_BACKGROUND_PATTERN, F_BACKGROUND_PROVIDERS, F_BEFORE_MAIN_PLUGIN, F_CANVAS, F_CANVAS_FEATURES, F_CANVAS_PROVIDERS, F_CONNECTION_BUILDERS, F_CONNECTION_FEATURES, F_CONNECTION_IDENTIFIERS, F_CONNECTION_PROVIDERS, F_CONNECTORS_FEATURES, F_CONNECTORS_PROVIDERS, F_CSS_CLASS, F_DRAGGABLE_FEATURES, F_DRAGGABLE_PROVIDERS, 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_SELECTED_CLASS, F_SELECTION_AREA_DRAG_AND_DROP_PROVIDERS, F_SELECTION_AREA_PROVIDERS, F_SELECTION_FEATURES, F_STORAGE_PROVIDERS, F_ZOOM, F_ZOOM_FEATURES, F_ZOOM_PROVIDERS, F_ZOOM_TAG, FindConnectableConnectorUsingPriorityAndPositionExecution, FindConnectableConnectorUsingPriorityAndPositionRequest, FitToChildNodesAndGroups, FitToChildNodesAndGroupsRequest, FitToFlowExecution, FitToFlowRequest, GET_FLOW_STATE_PROVIDERS, GetAllCanBeConnectedInputsAndRectsExecution, GetAllCanBeConnectedInputsAndRectsRequest, GetAllCanBeConnectedSourceConnectorsAndRectsExecution, GetAllCanBeConnectedSourceConnectorsAndRectsRequest, GetCanBeSelectedItemsExecution, GetCanBeSelectedItemsRequest, GetCanvasExecution, GetCanvasRequest, GetChildNodeIds, GetChildNodeIdsRequest, GetConnectorAndRect, GetConnectorAndRectRequest, GetCurrentSelectionExecution, GetCurrentSelectionRequest, GetDeepChildrenNodesAndGroupsExecution, GetDeepChildrenNodesAndGroupsRequest, GetElementRoundedRectExecution, GetElementRoundedRectRequest, GetFirstConnectableOutputExecution, GetFirstConnectableOutputRequest, GetFlowExecution, GetFlowHostElementExecution, GetFlowHostElementRequest, GetFlowRequest, GetFlowStateConnectionsExecution, GetFlowStateConnectionsRequest, GetFlowStateExecution, GetFlowStateNodesExecution, GetFlowStateNodesRequest, GetFlowStateRequest, GetNodeBoundingIncludePaddings, GetNodeBoundingIncludePaddingsRequest, GetNodeBoundingIncludePaddingsResponse, GetNodePadding, GetNodePaddingRequest, GetNodes, GetNodesRequest, GetNormalizedConnectorRectExecution, GetNormalizedConnectorRectRequest, GetNormalizedElementRectExecution, GetNormalizedElementRectRequest, GetNormalizedParentNodeRectExecution, GetNormalizedParentNodeRectRequest, GetNormalizedPointExecution, GetNormalizedPointRequest, GetParentNodes, GetParentNodesRequest, IMouseEvent, IPointerEvent, IPointerUpEvent, ITouchDownEvent, ITouchMoveEvent, InitializeDragSequenceExecution, InitializeDragSequenceRequest, InputCanvasPositionExecution, InputCanvasPositionRequest, InputCanvasScaleExecution, InputCanvasScaleRequest, IsArrayHasParentNodeExecution, IsArrayHasParentNodeRequest, IsConnectionUnderNodeExecution, IsConnectionUnderNodeRequest, IsDragStarted, IsDragStartedRequest, ListenCountChangesExecution, ListenCountChangesRequest, ListenDataChangesExecution, ListenDataChangesRequest, ListenTransformChangesExecution, ListenTransformChangesRequest, LogExecutionTime, MINIMAP_DRAG_FINALIZE_PROVIDERS, MINIMAP_DRAG_PREPARATION_PROVIDERS, MOUSE_EVENT_IGNORE_TIME, MarkConnectableConnectors, MarkConnectableConnectorsRequest, MinimapCalculateSvgScaleAndViewBoxExecution, MinimapCalculateSvgScaleAndViewBoxRequest, MinimapCalculateViewBoxExecution, MinimapCalculateViewBoxRequest, MinimapDragFinalizeExecution, MinimapDragFinalizeRequest, MinimapDragPreparationExecution, MinimapDragPreparationRequest, MinimapDrawNodesExecution, MinimapDrawNodesRequest, MoveDragHandler, MoveFrontElementsBeforeTargetElementExecution, MoveFrontElementsBeforeTargetElementRequest, MoveSummaryDragHandler, NODE_DROP_TO_GROUP_PROVIDERS, NODE_PROVIDERS, NODE_RESIZE_PROVIDERS, NODE_ROTATE_PROVIDERS, NodeResizeDragHandler, NodeResizeFinalize, NodeResizeFinalizeRequest, NodeResizePreparation, NodeResizePreparationRequest, NotifyDataChangedExecution, NotifyDataChangedRequest, NotifyTransformChangedExecution, NotifyTransformChangedRequest, OnPointerMoveExecution, OnPointerMoveRequest, Polyline, PolylineContentAlign, PolylineContentPlace, PolylineSampler, PrepareDragSequenceExecution, PrepareDragSequenceRequest, PreventDefaultIsExternalItemExecution, PreventDefaultIsExternalItemRequest, RESIZE_DIRECTIONS, RectConstraint, RedrawCanvasWithAnimationExecution, RedrawCanvasWithAnimationRequest, RedrawConnectionsExecution, RedrawConnectionsRequest, RemoveBackgroundFromStoreExecution, RemoveBackgroundFromStoreRequest, RemoveCanvasFromStoreExecution, RemoveCanvasFromStoreRequest, RemoveConnectionForCreateFromStoreExecution, RemoveConnectionForCreateFromStoreRequest, RemoveConnectionFromStoreExecution, RemoveConnectionFromStoreRequest, RemoveConnectionMarkerFromStoreExecution, RemoveConnectionMarkerFromStoreRequest, RemoveDndFromStoreExecution, RemoveDndFromStoreRequest, RemoveFlowFromStoreExecution, RemoveFlowFromStoreRequest, RemoveInputFromStore, RemoveInputFromStoreRequest, RemoveLineAlignmentFromStoreExecution, RemoveLineAlignmentFromStoreRequest, RemoveNodeFromStore, RemoveNodeFromStoreRequest, RemoveOutletFromStoreExecution, RemoveOutletFromStoreRequest, RemoveOutputFromStoreExecution, RemoveOutputFromStoreRequest, RemoveSnapConnectionFromStoreExecution, RemoveSnapConnectionFromStoreRequest, RemoveZoomFromStoreExecution, RemoveZoomFromStoreRequest, ResetScaleAndCenterExecution, ResetScaleAndCenterRequest, ResetScaleExecution, ResetScaleRequest, ResetZoomExecution, ResetZoomRequest, SINGLE_SELECT_PROVIDERS, SelectAllExecution, SelectAllRequest, SelectAndUpdateNodeLayerExecution, SelectAndUpdateNodeLayerRequest, SelectExecution, SelectRequest, SelectionAreaDragHandle, SelectionAreaFinalizeExecution, SelectionAreaFinalizeRequest, SelectionAreaPreparationExecution, SelectionAreaPreparationRequest, SetBackgroundTransformExecution, SetBackgroundTransformRequest, SetZoomExecution, SetZoomRequest, SnapLineElement, SnapLineService, SnapLinesDragHandler, SnapToGrid, SortContainersForDropByLayer, SortContainersForDropByLayerRequest, SortItemLayersExecution, SortItemLayersRequest, SortItemsByParentExecution, SortItemsByParentRequest, SortNodeLayersExecution, SortNodeLayersRequest, SourceConnectionDragHandler, SourceTargetConnectionDragHandler, StartDragSequenceExecution, StartDragSequenceRequest, TargetConnectionDragHandler, UnmarkConnectableConnectors, UnmarkConnectableConnectorsRequest, UpdateItemAndChildrenLayersExecution, UpdateItemAndChildrenLayersRequest, UpdateNodeWhenStateOrSizeChanged, UpdateNodeWhenStateOrSizeChangedRequest, UpdateScaleExecution, UpdateScaleRequest, createSVGElement, debounceTime, defaultEventTrigger, expandRectFromBaseline, fixedCenterBehavior, fixedOutboundBehavior, floatingBehavior, getExternalItem, getMarkerEndId, getMarkerSelectedEndId, getMarkerSelectedStartId, getMarkerStartId, infinityMinMax, isClosestConnectorInsideSnapThreshold, isDragBlocker, isDragHandleEnd, isDragHandleStart, isExternalItem, isMobile, isNode, isNodeOutlet, isNodeOutput, isPointerInsideStartOrEndDragHandles, isRotateHandle, isValidEventTrigger, mixinChangeSelection, mixinChangeVisibility, notifyOnStart, roundedRectFromPoint, stringAttribute, transitionEnd };
|
|
13031
|
+
export { AdaptiveCurveBuilder, AddBackgroundToStoreExecution, AddBackgroundToStoreRequest, AddCanvasToStoreExecution, AddCanvasToStoreRequest, AddConnectionForCreateToStoreExecution, AddConnectionForCreateToStoreRequest, AddConnectionMarkerToStoreExecution, AddConnectionMarkerToStoreRequest, AddConnectionToStoreExecution, AddConnectionToStoreRequest, AddDndToStoreExecution, AddDndToStoreRequest, AddFlowToStoreExecution, AddFlowToStoreRequest, AddInputToStore, AddInputToStoreRequest, AddLineAlignmentToStore, AddLineAlignmentToStoreRequest, AddNodeToStore, AddNodeToStoreRequest, AddOutletToStore, AddOutletToStoreRequest, AddOutputToStore, AddOutputToStoreRequest, AddPatternToBackgroundExecution, AddPatternToBackgroundRequest, AddSnapConnectionToStoreExecution, AddSnapConnectionToStoreRequest, AddZoomToStoreExecution, AddZoomToStoreRequest, ApplyChildResizeConstraints, ApplyChildResizeConstraintsRequest, ApplyParentResizeConstraints, ApplyParentResizeConstraintsRequest, BaseConnectionDragHandler, BuildDragHierarchy, BuildDragHierarchyRequest, BuildDragHierarchyResponse, CALCULATABLE_SIDES, CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTABLE_SIDE_EPSILON, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CREATE_MOVE_NODE_DRAG_MODEL_FROM_SELECTION_PROVIDERS, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateChangedRectFromDifference, CalculateChangedRectFromDifferenceRequest, CalculateClosestConnector, CalculateClosestConnectorRequest, CalculateConnectableSideByConnectedPositions, CalculateConnectableSideByConnectedPositionsRequest, CalculateConnectableSideByInternalPosition, CalculateConnectableSideByInternalPositionRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectionLineByBehavior, CalculateConnectionLineByBehaviorRequest, CalculateConnectorsConnectableSides, CalculateConnectorsConnectableSidesRequest, CalculateDirectChildrenUnionRect, CalculateDirectChildrenUnionRectRequest, CalculateDragLimits, CalculateDragLimitsRequest, CalculateFlowPointFromMinimapPointExecution, CalculateFlowPointFromMinimapPointRequest, CalculateInputConnections, CalculateInputConnectionsRequest, CalculateNodesBoundingBox, CalculateNodesBoundingBoxNormalizedPosition, CalculateNodesBoundingBoxNormalizedPositionRequest, CalculateNodesBoundingBoxRequest, CalculateOutputConnections, CalculateOutputConnectionsRequest, CalculateResizeLimits, CalculateResizeLimitsRequest, CalculateSourceConnectorsToConnect, CalculateSourceConnectorsToConnectRequest, CalculateTargetConnectorsToConnect, CalculateTargetConnectorsToConnectRequest, CenterGroupOrNodeExecution, CenterGroupOrNodeRequest, ClearSelectionExecution, ClearSelectionRequest, ConnectionContentLayoutEngine, CreateConnectionFromOutputPreparation, CreateConnectionFromOutputPreparationRequest, CreateConnectionMarkersExecution, CreateConnectionMarkersRequest, CreateConnectionPreparation, CreateConnectionPreparationRequest, CreateDragModelFromSelection, CreateDragModelFromSelectionRequest, CreateInputConnectionHandlerAndSetToNodeHandler, CreateInputConnectionHandlerAndSetToNodeHandlerRequest, CreateOutputConnectionHandlerAndSetToNodeHandler, CreateOutputConnectionHandlerAndSetToNodeHandlerRequest, CreateSnapLines, CreateSnapLinesRequest, CreateSummaryDragHandler, CreateSummaryDragHandlerRequest, DRAG_AND_DROP_COMMON_PROVIDERS, Deprecated, DragAndDropBase, DragConstraintPipeline, DragRectCache, DropToGroupFinalize, DropToGroupFinalizeRequest, DropToGroupPreparation, DropToGroupPreparationRequest, EFConnectableSide, EFConnectionBehavior, EFConnectionConnectableSide, EFConnectionType, EFMarkerType, EFResizeHandleType, EFZoomDirection, EmitSelectionChangeEventExecution, EmitSelectionChangeEventRequest, EndDragSequenceExecution, EndDragSequenceRequest, EventExtensions, ExternalRectConstraint, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FCanvasDragHandler, FCanvasMoveFinalizeExecution, FCanvasMoveFinalizeRequest, FCanvasMovePreparationExecution, FCanvasMovePreparationRequest, FChannel, FChannelHub, FCirclePatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, FConnectionContent, FConnectionDragHandleEndComponent, FConnectionDragHandleStartComponent, FConnectionFactory, FConnectionForCreateComponent, FConnectionGradientComponent, FConnectionPathComponent, FConnectionSelectionComponent, FConnectionTextComponent, FConnectionTextPathDirective, FConnectorBase, FConnectorsStore, FCreateConnectionDragHandler, FCreateConnectionDragHandlerPreparationExecution, FCreateConnectionDragHandlerPreparationRequest, FCreateConnectionEvent, FCreateConnectionFinalizeExecution, FCreateConnectionFinalizeRequest, FCreateConnectionFromOutletPreparationExecution, FCreateConnectionFromOutletPreparationRequest, FCreateNodeEvent, FDragBlockerDirective, FDragHandleDirective, FDragHandlerResult, FDragStartedEvent, FDraggableBase, FDraggableDataContext, FDraggableDirective, FDropToGroupEvent, FExternalItemBase, FExternalItemCreatePlaceholderExecution, FExternalItemCreatePlaceholderRequest, FExternalItemCreatePreviewExecution, FExternalItemCreatePreviewRequest, FExternalItemDirective, FExternalItemDragHandler, FExternalItemFinalizeExecution, FExternalItemFinalizeRequest, FExternalItemPlaceholderDirective, FExternalItemPreparationExecution, FExternalItemPreparationRequest, FExternalItemPreviewDirective, FExternalItemService, FFlowBase, FFlowComponent, FFlowModule, FGroupDirective, FLineAlignmentBase, FLineAlignmentComponent, FMarkerBase, FMarkerDirective, FMinimapCanvasDirective, FMinimapComponent, FMinimapData, FMinimapDragHandler, FMinimapFlowDirective, FMinimapViewDirective, FMoveNodesEvent, FNodeBase, FNodeDirective, FNodeDropToGroupDragHandler, FNodeInputBase, FNodeInputDirective, FNodeIntersectedWithConnections, FNodeMoveFinalizeExecution, FNodeMoveFinalizeRequest, FNodeMovePreparationExecution, FNodeMovePreparationRequest, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FNodeRotateDragHandler, FNodeRotateFinalizeExecution, FNodeRotateFinalizeRequest, FNodeRotatePreparationExecution, FNodeRotatePreparationRequest, FReassignConnectionDragHandler, FReassignConnectionEvent, FReassignConnectionFinalizeExecution, FReassignConnectionFinalizeRequest, FReassignConnectionPreparationExecution, FReassignConnectionPreparationRequest, FReassignSourceDragHandler, FReassignTargetDragHandler, FRectPatternComponent, FResizeChannel, FResizeHandleDirective, FRotateHandleDirective, FSegmentPathBuilder, FSelectionAreaBase, FSelectionAreaComponent, FSelectionChangeEvent, FSingleSelectExecution, FSingleSelectRequest, FSnapConnectionComponent, FSourceConnectorBase, FStraightPathBuilder, FZoomBase, FZoomDirective, F_AFTER_MAIN_PLUGIN, F_BACKGROUND, F_BACKGROUND_FEATURES, F_BACKGROUND_PATTERN, F_BACKGROUND_PROVIDERS, F_BEFORE_MAIN_PLUGIN, F_CANVAS, F_CANVAS_FEATURES, F_CANVAS_PROVIDERS, F_CONNECTION_BUILDERS, F_CONNECTION_FEATURES, F_CONNECTION_IDENTIFIERS, F_CONNECTION_PROVIDERS, F_CONNECTORS_FEATURES, F_CONNECTORS_PROVIDERS, F_CSS_CLASS, F_DRAGGABLE_FEATURES, F_DRAGGABLE_PROVIDERS, 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_SELECTED_CLASS, F_SELECTION_AREA_DRAG_AND_DROP_PROVIDERS, F_SELECTION_AREA_PROVIDERS, F_SELECTION_FEATURES, F_STORAGE_PROVIDERS, F_ZOOM, F_ZOOM_FEATURES, F_ZOOM_PROVIDERS, F_ZOOM_TAG, FindConnectableConnectorUsingPriorityAndPositionExecution, FindConnectableConnectorUsingPriorityAndPositionRequest, FitToChildNodesAndGroups, FitToChildNodesAndGroupsRequest, FitToFlowExecution, FitToFlowRequest, GET_FLOW_STATE_PROVIDERS, GetCanBeSelectedItemsExecution, GetCanBeSelectedItemsRequest, GetCanvasExecution, GetCanvasRequest, GetChildNodeIds, GetChildNodeIdsRequest, GetConnectorAndRect, GetConnectorAndRectRequest, GetCurrentSelectionExecution, GetCurrentSelectionRequest, GetDeepChildrenNodesAndGroupsExecution, GetDeepChildrenNodesAndGroupsRequest, GetElementRoundedRectExecution, GetElementRoundedRectRequest, GetFirstConnectableOutputExecution, GetFirstConnectableOutputRequest, GetFlowExecution, GetFlowHostElementExecution, GetFlowHostElementRequest, GetFlowRequest, GetFlowStateConnectionsExecution, GetFlowStateConnectionsRequest, GetFlowStateExecution, GetFlowStateNodesExecution, GetFlowStateNodesRequest, GetFlowStateRequest, GetNodeBoundingIncludePaddings, GetNodeBoundingIncludePaddingsRequest, GetNodeBoundingIncludePaddingsResponse, GetNodePadding, GetNodePaddingRequest, GetNormalizedConnectorRectExecution, GetNormalizedConnectorRectRequest, GetNormalizedElementRectExecution, GetNormalizedElementRectRequest, GetNormalizedParentNodeRectExecution, GetNormalizedParentNodeRectRequest, GetNormalizedPointExecution, GetNormalizedPointRequest, GetParentNodes, GetParentNodesRequest, IMouseEvent, IPointerEvent, IPointerUpEvent, ITouchDownEvent, ITouchMoveEvent, InitializeDragSequenceExecution, InitializeDragSequenceRequest, InputCanvasPositionExecution, InputCanvasPositionRequest, InputCanvasScaleExecution, InputCanvasScaleRequest, IsArrayHasParentNodeExecution, IsArrayHasParentNodeRequest, IsConnectionUnderNodeExecution, IsConnectionUnderNodeRequest, IsDragStarted, IsDragStartedRequest, ListenCountChangesExecution, ListenCountChangesRequest, ListenDataChangesExecution, ListenDataChangesRequest, ListenTransformChangesExecution, ListenTransformChangesRequest, LogExecutionTime, MINIMAP_DRAG_FINALIZE_PROVIDERS, MINIMAP_DRAG_PREPARATION_PROVIDERS, MOUSE_EVENT_IGNORE_TIME, MarkConnectableConnectors, MarkConnectableConnectorsRequest, MinimapCalculateSvgScaleAndViewBoxExecution, MinimapCalculateSvgScaleAndViewBoxRequest, MinimapCalculateViewBoxExecution, MinimapCalculateViewBoxRequest, MinimapDragFinalizeExecution, MinimapDragFinalizeRequest, MinimapDragPreparationExecution, MinimapDragPreparationRequest, MinimapDrawNodesExecution, MinimapDrawNodesRequest, MoveDragHandler, MoveFrontElementsBeforeTargetElement, MoveFrontElementsBeforeTargetElementRequest, MoveSummaryDragHandler, NODE_DROP_TO_GROUP_PROVIDERS, NODE_PROVIDERS, NODE_RESIZE_PROVIDERS, NODE_ROTATE_PROVIDERS, NodeResizeDragHandler, NodeResizeFinalize, NodeResizeFinalizeRequest, NodeResizePreparation, NodeResizePreparationRequest, NotifyDataChangedExecution, NotifyDataChangedRequest, NotifyTransformChangedExecution, NotifyTransformChangedRequest, OnPointerMoveExecution, OnPointerMoveRequest, Polyline, PolylineContentAlign, PolylineContentPlace, PolylineSampler, PrepareDragSequenceExecution, PrepareDragSequenceRequest, PreventDefaultIsExternalItemExecution, PreventDefaultIsExternalItemRequest, RESIZE_DIRECTIONS, RectConstraint, RedrawCanvasWithAnimationExecution, RedrawCanvasWithAnimationRequest, RedrawConnections, RedrawConnectionsRequest, RemoveBackgroundFromStoreExecution, RemoveBackgroundFromStoreRequest, RemoveCanvasFromStoreExecution, RemoveCanvasFromStoreRequest, RemoveConnectionForCreateFromStoreExecution, RemoveConnectionForCreateFromStoreRequest, RemoveConnectionFromStoreExecution, RemoveConnectionFromStoreRequest, RemoveConnectionMarkerFromStoreExecution, RemoveConnectionMarkerFromStoreRequest, RemoveDndFromStoreExecution, RemoveDndFromStoreRequest, RemoveFlowFromStoreExecution, RemoveFlowFromStoreRequest, RemoveInputFromStore, RemoveInputFromStoreRequest, RemoveLineAlignmentFromStore, RemoveLineAlignmentFromStoreRequest, RemoveNodeFromStore, RemoveNodeFromStoreRequest, RemoveOutletFromStoreExecution, RemoveOutletFromStoreRequest, RemoveOutputFromStoreExecution, RemoveOutputFromStoreRequest, RemoveSnapConnectionFromStoreExecution, RemoveSnapConnectionFromStoreRequest, RemoveZoomFromStoreExecution, RemoveZoomFromStoreRequest, ResetScaleAndCenterExecution, ResetScaleAndCenterRequest, ResetScaleExecution, ResetScaleRequest, ResetZoomExecution, ResetZoomRequest, SINGLE_SELECT_PROVIDERS, SelectAllExecution, SelectAllRequest, SelectAndUpdateNodeLayerExecution, SelectAndUpdateNodeLayerRequest, SelectExecution, SelectRequest, SelectionAreaDragHandle, SelectionAreaFinalizeExecution, SelectionAreaFinalizeRequest, SelectionAreaPreparationExecution, SelectionAreaPreparationRequest, SetBackgroundTransformExecution, SetBackgroundTransformRequest, SetZoomExecution, SetZoomRequest, SnapLineElement, SnapLineService, SnapLinesDragHandler, SnapToGrid, SortContainersForDropByLayer, SortContainersForDropByLayerRequest, SortItemLayersExecution, SortItemLayersRequest, SortItemsByParentExecution, SortItemsByParentRequest, SortNodeLayersExecution, SortNodeLayersRequest, SourceConnectionDragHandler, SourceTargetConnectionDragHandler, StartDragSequenceExecution, StartDragSequenceRequest, TargetConnectionDragHandler, UnmarkConnectableConnectors, UnmarkConnectableConnectorsRequest, UpdateItemAndChildrenLayersExecution, UpdateItemAndChildrenLayersRequest, UpdateNodeWhenStateOrSizeChanged, UpdateNodeWhenStateOrSizeChangedRequest, UpdateScaleExecution, UpdateScaleRequest, createSVGElement, debounceTime, defaultEventTrigger, determineSide, expandRectFromBaseline, fixedCenterBehavior, fixedOutboundBehavior, floatingBehavior, getExternalItem, getMarkerEndId, getMarkerSelectedEndId, getMarkerSelectedStartId, getMarkerStartId, infinityMinMax, isCalculateMode, isClosestConnectorInsideSnapThreshold, isDragBlocker, isDragHandleEnd, isDragHandleStart, isExternalItem, isMobile, isNode, isNodeOutlet, isNodeOutput, isPointerInsideStartOrEndDragHandles, isRotateHandle, isValidEventTrigger, mixinChangeSelection, mixinChangeVisibility, notifyOnStart, roundedRectFromPoint, stringAttribute, transitionEnd };
|
|
12526
13032
|
//# sourceMappingURL=foblex-flow.mjs.map
|