@foblex/flow 17.5.9 → 17.6.1
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/css-cls.d.ts +1 -1
- package/domain/f-background/add-background-to-store/add-background-to-store.execution.d.ts +4 -1
- package/domain/f-background/add-pattern-to-background/add-pattern-to-background.execution.d.ts +4 -1
- package/domain/f-background/providers.d.ts +4 -0
- package/domain/f-background/remove-background-from-store/remove-background-from-store.execution.d.ts +4 -1
- package/domain/f-background/set-background-transform/set-background-transform.execution.d.ts +4 -1
- package/domain/f-canvas/add-canvas-to-store/add-canvas-to-store.execution.d.ts +4 -1
- package/domain/f-canvas/center-group-or-node/center-group-or-node.execution.d.ts +4 -1
- package/domain/f-canvas/fit-to-flow/fit-to-flow.execution.d.ts +4 -1
- package/domain/f-canvas/get-canvas/get-canvas.execution.d.ts +4 -1
- package/domain/f-canvas/input-canvas-position/input-canvas-position.execution.d.ts +4 -1
- package/domain/f-canvas/input-canvas-scale/input-canvas-scale.execution.d.ts +5 -1
- package/domain/f-canvas/providers.d.ts +3 -0
- package/domain/f-canvas/redraw-canvas-with-animation/redraw-canvas-with-animation.execution.d.ts +6 -1
- package/domain/f-canvas/remove-canvas-from-store/remove-canvas-from-store.execution.d.ts +4 -1
- package/domain/f-canvas/reset-scale/reset-scale.execution.d.ts +4 -1
- package/domain/f-canvas/reset-scale-and-center/reset-scale-and-center.execution.d.ts +4 -1
- package/domain/f-canvas/update-scale/update-scale.execution.d.ts +5 -1
- package/domain/f-connection/add-connection-for-create-to-store/add-connection-for-create-to-store.execution.d.ts +4 -1
- package/domain/f-connection/add-connection-marker-to-store/add-connection-marker-to-store.execution.d.ts +4 -1
- package/domain/f-connection/add-connection-to-store/add-connection-to-store.execution.d.ts +4 -1
- package/domain/f-connection/add-snap-connection-to-store/add-snap-connection-to-store.execution.d.ts +4 -1
- package/domain/f-connection/calculate-connection-line-by-behavior/calculate-connection-line-by-behavior.execution.d.ts +3 -0
- package/domain/f-connection/calculate-connection-line-by-behavior/fixed-center-behavior.d.ts +5 -0
- package/domain/f-connection/calculate-connection-line-by-behavior/fixed-outbound-behavior.d.ts +5 -0
- package/domain/f-connection/calculate-connection-line-by-behavior/floating-behavior.d.ts +5 -0
- package/domain/f-connection/create-connection-markers/create-connection-markers.execution.d.ts +5 -5
- package/domain/f-connection/providers.d.ts +3 -0
- package/domain/f-connection/redraw-connections/redraw-connections.execution.d.ts +6 -1
- package/domain/f-connection/remove-connection-for-create-from-store/remove-connection-for-create-from-store.execution.d.ts +4 -1
- package/domain/f-connection/remove-connection-from-store/remove-connection-from-store.execution.d.ts +4 -1
- package/domain/f-connection/remove-connection-marker-from-store/remove-connection-marker-from-store.execution.d.ts +4 -1
- package/domain/f-connection/remove-snap-connection-from-store/remove-snap-connection-from-store.execution.d.ts +4 -1
- package/domain/f-connectors/add-input-to-store/add-input-to-store.execution.d.ts +4 -1
- package/domain/f-connectors/add-outlet-to-store/add-outlet-to-store.execution.d.ts +3 -0
- package/domain/f-connectors/add-output-to-store/add-output-to-store.execution.d.ts +3 -0
- package/domain/f-connectors/find-closest-connector/find-closest-connector.execution.d.ts +16 -0
- package/domain/f-connectors/find-closest-connector/find-closest-connector.request.d.ts +8 -0
- package/domain/f-connectors/find-closest-connector/index.d.ts +2 -0
- package/domain/f-connectors/find-connectable-connector-using-priority-and-position/find-connectable-connector-using-priority-and-position.execution.d.ts +30 -0
- package/domain/f-connectors/find-connectable-connector-using-priority-and-position/find-connectable-connector-using-priority-and-position.request.d.ts +8 -0
- package/domain/f-connectors/find-connectable-connector-using-priority-and-position/index.d.ts +2 -0
- package/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.execution.d.ts +4 -1
- 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 +18 -0
- 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 +6 -0
- package/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/index.d.ts +2 -0
- package/domain/f-connectors/get-connector-and-rect/get-connector-and-rect.execution.d.ts +4 -1
- package/domain/f-connectors/{i-closest-input.d.ts → i-closest-connector.d.ts} +4 -1
- package/domain/f-connectors/index.d.ts +6 -5
- package/domain/f-connectors/mark-connectable-connectors/index.d.ts +2 -0
- package/domain/f-connectors/mark-connectable-connectors/mark-connectable-connectors.execution.d.ts +13 -0
- package/domain/f-connectors/mark-connectable-connectors/mark-connectable-connectors.request.d.ts +6 -0
- package/domain/f-connectors/providers.d.ts +6 -5
- package/domain/f-connectors/remove-input-from-store/remove-input-from-store.execution.d.ts +4 -1
- package/domain/f-connectors/remove-outlet-from-store/remove-outlet-from-store.execution.d.ts +4 -1
- package/domain/f-connectors/remove-output-from-store/remove-output-from-store.execution.d.ts +4 -1
- package/domain/f-connectors/unmark-connectable-connectors/index.d.ts +2 -0
- package/domain/f-connectors/unmark-connectable-connectors/unmark-connectable-connectors.execution.d.ts +13 -0
- package/domain/f-connectors/unmark-connectable-connectors/unmark-connectable-connectors.request.d.ts +6 -0
- package/domain/f-draggable/add-dnd-to-store/add-dnd-to-store.execution.d.ts +4 -1
- package/domain/f-draggable/emit-selection-change-event/emit-selection-change-event.execution.d.ts +7 -3
- package/domain/f-draggable/end-drag-sequence/end-drag-sequence.execution.d.ts +4 -1
- package/domain/f-draggable/initialize-drag-sequence/initialize-drag-sequence.execution.d.ts +3 -0
- package/domain/f-draggable/is-drag-started/is-drag-started.execution.d.ts +4 -1
- package/domain/f-draggable/on-pointer-move/on-pointer-move.execution.d.ts +6 -1
- package/domain/f-draggable/prepare-drag-sequence/prepare-drag-sequence.execution.d.ts +4 -1
- package/domain/f-draggable/providers.d.ts +4 -1
- package/domain/f-draggable/remove-dnd-from-store/remove-dnd-from-store.execution.d.ts +4 -1
- package/domain/f-draggable/start-drag-sequence/start-drag-sequence.execution.d.ts +5 -2
- package/domain/f-flow/add-flow-to-store/add-flow-to-store.execution.d.ts +4 -1
- package/domain/f-flow/get-flow/get-flow.execution.d.ts +4 -1
- package/domain/f-flow/get-flow-host-element/get-flow-host-element.execution.d.ts +4 -1
- package/domain/f-flow/get-flow-state/get-flow-state-connections/get-flow-state-connections.execution.d.ts +4 -1
- package/domain/f-flow/get-flow-state/get-flow-state-nodes/get-flow-state-nodes.execution.d.ts +4 -3
- package/domain/f-flow/get-flow-state/get-flow-state.execution.d.ts +5 -2
- package/domain/f-flow/get-flow-state/providers.d.ts +4 -1
- package/domain/f-flow/providers.d.ts +6 -1
- package/domain/f-flow/remove-flow-from-store/remove-flow-from-store.execution.d.ts +4 -1
- package/domain/f-line-alignment/add-line-alignment-to-store/add-line-alignment-to-store.execution.d.ts +4 -1
- package/domain/f-line-alignment/providers.d.ts +5 -0
- package/domain/f-line-alignment/remove-line-alignment-from-store/remove-line-alignment-from-store.execution.d.ts +4 -1
- package/domain/f-node/add-node-to-store/add-node-to-store.execution.d.ts +4 -1
- package/domain/f-node/calculate-input-connections/calculate-input-connections.execution.d.ts +4 -1
- package/domain/f-node/calculate-nodes-bounding-box/calculate-nodes-bounding-box.execution.d.ts +5 -1
- package/domain/f-node/calculate-nodes-bounding-box-normalized-position/calculate-nodes-bounding-box-normalized-position.execution.d.ts +6 -1
- package/domain/f-node/calculate-output-connections/calculate-output-connections.execution.d.ts +4 -1
- package/domain/f-node/get-node-padding/get-node-padding.execution.d.ts +4 -0
- package/domain/f-node/get-nodes/get-nodes.execution.d.ts +4 -1
- package/domain/f-node/get-parent-nodes/get-parent-nodes.execution.d.ts +4 -1
- package/domain/f-node/providers.d.ts +3 -0
- package/domain/f-node/remove-node-from-store/remove-node-from-store.execution.d.ts +4 -1
- package/domain/f-node/update-node-when-state-or-size-changed/update-node-when-state-or-size-changed.execution.d.ts +28 -1
- package/domain/f-selection/clear-selection/clear-selection.execution.d.ts +3 -0
- package/domain/f-selection/get-can-be-selected-items/get-can-be-selected-items.execution.d.ts +14 -2
- package/domain/f-selection/get-current-selection/get-current-selection.execution.d.ts +3 -0
- package/domain/f-selection/providers.d.ts +3 -0
- package/domain/f-selection/select/select.execution.d.ts +4 -1
- package/domain/f-selection/select-all/select-all.execution.d.ts +5 -1
- package/domain/f-selection/select-and-update-node-layer/select-and-update-node-layer.execution.d.ts +7 -5
- package/domain/f-zoom/add-zoom-to-store/add-zoom-to-store.execution.d.ts +4 -1
- package/domain/f-zoom/providers.d.ts +5 -0
- package/domain/f-zoom/remove-zoom-from-store/remove-zoom-from-store.execution.d.ts +4 -1
- package/domain/f-zoom/reset-zoom/reset-zoom.execution.d.ts +4 -1
- package/domain/f-zoom/set-zoom/set-zoom.execution.d.ts +6 -2
- package/domain/get-deep-children-nodes-and-groups/get-deep-children-nodes-and-groups.execution.d.ts +5 -1
- package/domain/get-element-rounded-rect/get-element-rounded-rect.execution.d.ts +5 -1
- package/domain/get-normalized-connector-rect/get-normalized-connector-rect.execution.d.ts +7 -2
- package/domain/get-normalized-element-rect/get-normalized-element-rect.execution.d.ts +7 -2
- package/domain/get-normalized-point/get-normalized-point.execution.d.ts +6 -1
- package/domain/providers.d.ts +7 -1
- package/domain/sort-item-layers/sort-item-layers.execution.d.ts +9 -2
- package/domain/sort-item-layers/sort-items-by-parent/sort-items-by-parent.execution.d.ts +8 -3
- package/domain/sort-item-layers/sort-node-layers-by-groups/sort-node-layers.execution.d.ts +8 -3
- package/domain/update-item-and-children-layers/move-front-elements-before-target-element/move-front-elements-before-target-element.execution.d.ts +4 -0
- package/domain/update-item-and-children-layers/update-item-and-children-layers.execution.d.ts +6 -2
- package/drag-toolkit/drag-and-drop-base.d.ts +60 -0
- package/esm2022/domain/css-cls.mjs +2 -2
- package/esm2022/domain/f-background/add-background-to-store/add-background-to-store.execution.mjs +6 -3
- package/esm2022/domain/f-background/add-pattern-to-background/add-pattern-to-background.execution.mjs +7 -4
- package/esm2022/domain/f-background/providers.mjs +5 -1
- package/esm2022/domain/f-background/remove-background-from-store/remove-background-from-store.execution.mjs +6 -3
- package/esm2022/domain/f-background/set-background-transform/set-background-transform.execution.mjs +6 -3
- package/esm2022/domain/f-canvas/add-canvas-to-store/add-canvas-to-store.execution.mjs +6 -3
- package/esm2022/domain/f-canvas/center-group-or-node/center-group-or-node.execution.mjs +8 -5
- package/esm2022/domain/f-canvas/fit-to-flow/fit-to-flow.execution.mjs +7 -4
- package/esm2022/domain/f-canvas/get-canvas/get-canvas.execution.mjs +6 -3
- package/esm2022/domain/f-canvas/input-canvas-position/input-canvas-position.execution.mjs +6 -3
- package/esm2022/domain/f-canvas/input-canvas-scale/input-canvas-scale.execution.mjs +7 -3
- package/esm2022/domain/f-canvas/providers.mjs +4 -1
- package/esm2022/domain/f-canvas/redraw-canvas-with-animation/redraw-canvas-with-animation.execution.mjs +13 -8
- package/esm2022/domain/f-canvas/remove-canvas-from-store/remove-canvas-from-store.execution.mjs +6 -3
- package/esm2022/domain/f-canvas/reset-scale/reset-scale.execution.mjs +6 -3
- package/esm2022/domain/f-canvas/reset-scale-and-center/reset-scale-and-center.execution.mjs +7 -4
- package/esm2022/domain/f-canvas/update-scale/update-scale.execution.mjs +7 -3
- package/esm2022/domain/f-connection/add-connection-for-create-to-store/add-connection-for-create-to-store.execution.mjs +6 -3
- package/esm2022/domain/f-connection/add-connection-marker-to-store/add-connection-marker-to-store.execution.mjs +6 -3
- package/esm2022/domain/f-connection/add-connection-to-store/add-connection-to-store.execution.mjs +7 -4
- package/esm2022/domain/f-connection/add-snap-connection-to-store/add-snap-connection-to-store.execution.mjs +6 -3
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/calculate-connection-line-by-behavior.execution.mjs +4 -1
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/fixed-center-behavior.mjs +6 -1
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/fixed-outbound-behavior.mjs +6 -1
- package/esm2022/domain/f-connection/calculate-connection-line-by-behavior/floating-behavior.mjs +6 -1
- package/esm2022/domain/f-connection/create-connection-markers/create-connection-markers.execution.mjs +20 -18
- package/esm2022/domain/f-connection/providers.mjs +4 -1
- package/esm2022/domain/f-connection/redraw-connections/redraw-connections.execution.mjs +16 -11
- package/esm2022/domain/f-connection/remove-connection-for-create-from-store/remove-connection-for-create-from-store.execution.mjs +6 -3
- package/esm2022/domain/f-connection/remove-connection-from-store/remove-connection-from-store.execution.mjs +8 -5
- package/esm2022/domain/f-connection/remove-connection-marker-from-store/remove-connection-marker-from-store.execution.mjs +6 -3
- package/esm2022/domain/f-connection/remove-snap-connection-from-store/remove-snap-connection-from-store.execution.mjs +6 -3
- package/esm2022/domain/f-connectors/add-input-to-store/add-input-to-store.execution.mjs +6 -3
- package/esm2022/domain/f-connectors/add-outlet-to-store/add-outlet-to-store.execution.mjs +4 -1
- package/esm2022/domain/f-connectors/add-output-to-store/add-output-to-store.execution.mjs +4 -1
- package/esm2022/domain/f-connectors/find-closest-connector/find-closest-connector.execution.mjs +47 -0
- package/esm2022/domain/f-connectors/find-closest-connector/find-closest-connector.request.mjs +10 -0
- package/esm2022/domain/f-connectors/{find-input-at-position → find-closest-connector}/index.mjs +3 -3
- package/esm2022/domain/f-connectors/find-connectable-connector-using-priority-and-position/find-connectable-connector-using-priority-and-position.execution.mjs +98 -0
- package/esm2022/domain/f-connectors/find-connectable-connector-using-priority-and-position/find-connectable-connector-using-priority-and-position.request.mjs +10 -0
- package/esm2022/domain/f-connectors/find-connectable-connector-using-priority-and-position/index.mjs +3 -0
- package/esm2022/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.execution.mjs +6 -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 +43 -0
- 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 +8 -0
- package/esm2022/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/index.mjs +3 -0
- package/esm2022/domain/f-connectors/get-connector-and-rect/get-connector-and-rect.execution.mjs +6 -3
- package/esm2022/domain/f-connectors/i-closest-connector.mjs +2 -0
- package/esm2022/domain/f-connectors/index.mjs +7 -6
- package/esm2022/domain/f-connectors/mark-connectable-connectors/index.mjs +3 -0
- package/esm2022/domain/f-connectors/mark-connectable-connectors/mark-connectable-connectors.execution.mjs +30 -0
- package/esm2022/domain/f-connectors/mark-connectable-connectors/mark-connectable-connectors.request.mjs +8 -0
- package/esm2022/domain/f-connectors/providers.mjs +14 -9
- package/esm2022/domain/f-connectors/remove-input-from-store/remove-input-from-store.execution.mjs +6 -3
- package/esm2022/domain/f-connectors/remove-outlet-from-store/remove-outlet-from-store.execution.mjs +6 -3
- package/esm2022/domain/f-connectors/remove-output-from-store/remove-output-from-store.execution.mjs +6 -3
- package/esm2022/domain/f-connectors/unmark-connectable-connectors/index.mjs +3 -0
- package/esm2022/domain/f-connectors/unmark-connectable-connectors/unmark-connectable-connectors.execution.mjs +30 -0
- package/esm2022/domain/f-connectors/unmark-connectable-connectors/unmark-connectable-connectors.request.mjs +8 -0
- package/esm2022/domain/f-draggable/add-dnd-to-store/add-dnd-to-store.execution.mjs +6 -3
- package/esm2022/domain/f-draggable/emit-selection-change-event/emit-selection-change-event.execution.mjs +10 -6
- package/esm2022/domain/f-draggable/end-drag-sequence/end-drag-sequence.execution.mjs +7 -4
- package/esm2022/domain/f-draggable/initialize-drag-sequence/initialize-drag-sequence.execution.mjs +4 -1
- package/esm2022/domain/f-draggable/is-drag-started/is-drag-started.execution.mjs +6 -3
- package/esm2022/domain/f-draggable/on-pointer-move/on-pointer-move.execution.mjs +8 -3
- package/esm2022/domain/f-draggable/prepare-drag-sequence/prepare-drag-sequence.execution.mjs +6 -3
- package/esm2022/domain/f-draggable/providers.mjs +4 -1
- package/esm2022/domain/f-draggable/remove-dnd-from-store/remove-dnd-from-store.execution.mjs +6 -3
- package/esm2022/domain/f-draggable/start-drag-sequence/start-drag-sequence.execution.mjs +9 -6
- package/esm2022/domain/f-flow/add-flow-to-store/add-flow-to-store.execution.mjs +6 -3
- package/esm2022/domain/f-flow/get-flow/get-flow.execution.mjs +6 -3
- package/esm2022/domain/f-flow/get-flow-host-element/get-flow-host-element.execution.mjs +6 -3
- package/esm2022/domain/f-flow/get-flow-state/get-flow-state-connections/get-flow-state-connections.execution.mjs +7 -4
- package/esm2022/domain/f-flow/get-flow-state/get-flow-state-nodes/get-flow-state-nodes.execution.mjs +13 -13
- package/esm2022/domain/f-flow/get-flow-state/get-flow-state.execution.mjs +11 -8
- package/esm2022/domain/f-flow/get-flow-state/providers.mjs +4 -1
- package/esm2022/domain/f-flow/providers.mjs +6 -1
- package/esm2022/domain/f-flow/remove-flow-from-store/remove-flow-from-store.execution.mjs +6 -3
- package/esm2022/domain/f-line-alignment/add-line-alignment-to-store/add-line-alignment-to-store.execution.mjs +6 -3
- package/esm2022/domain/f-line-alignment/providers.mjs +6 -1
- package/esm2022/domain/f-line-alignment/remove-line-alignment-from-store/remove-line-alignment-from-store.execution.mjs +6 -3
- package/esm2022/domain/f-node/add-node-to-store/add-node-to-store.execution.mjs +6 -3
- package/esm2022/domain/f-node/calculate-input-connections/calculate-input-connections.execution.mjs +7 -4
- package/esm2022/domain/f-node/calculate-nodes-bounding-box/calculate-nodes-bounding-box.execution.mjs +7 -3
- package/esm2022/domain/f-node/calculate-nodes-bounding-box-normalized-position/calculate-nodes-bounding-box-normalized-position.execution.mjs +8 -3
- package/esm2022/domain/f-node/calculate-output-connections/calculate-output-connections.execution.mjs +7 -4
- package/esm2022/domain/f-node/get-node-padding/get-node-padding.execution.mjs +5 -1
- package/esm2022/domain/f-node/get-nodes/get-nodes.execution.mjs +6 -3
- package/esm2022/domain/f-node/get-parent-nodes/get-parent-nodes.execution.mjs +9 -6
- package/esm2022/domain/f-node/providers.mjs +4 -1
- package/esm2022/domain/f-node/remove-node-from-store/remove-node-from-store.execution.mjs +6 -3
- package/esm2022/domain/f-node/update-node-when-state-or-size-changed/update-node-when-state-or-size-changed.execution.mjs +30 -3
- package/esm2022/domain/f-selection/clear-selection/clear-selection.execution.mjs +4 -1
- package/esm2022/domain/f-selection/get-can-be-selected-items/get-can-be-selected-items.execution.mjs +20 -8
- package/esm2022/domain/f-selection/get-current-selection/get-current-selection.execution.mjs +4 -1
- package/esm2022/domain/f-selection/providers.mjs +4 -1
- package/esm2022/domain/f-selection/select/select.execution.mjs +7 -4
- package/esm2022/domain/f-selection/select-all/select-all.execution.mjs +8 -4
- package/esm2022/domain/f-selection/select-and-update-node-layer/select-and-update-node-layer.execution.mjs +17 -17
- package/esm2022/domain/f-zoom/add-zoom-to-store/add-zoom-to-store.execution.mjs +6 -3
- package/esm2022/domain/f-zoom/providers.mjs +6 -1
- package/esm2022/domain/f-zoom/remove-zoom-from-store/remove-zoom-from-store.execution.mjs +6 -3
- package/esm2022/domain/f-zoom/reset-zoom/reset-zoom.execution.mjs +6 -3
- package/esm2022/domain/f-zoom/set-zoom/set-zoom.execution.mjs +11 -7
- package/esm2022/domain/get-deep-children-nodes-and-groups/get-deep-children-nodes-and-groups.execution.mjs +8 -4
- package/esm2022/domain/get-element-rounded-rect/get-element-rounded-rect.execution.mjs +8 -4
- package/esm2022/domain/get-normalized-connector-rect/get-normalized-connector-rect.execution.mjs +11 -6
- package/esm2022/domain/get-normalized-element-rect/get-normalized-element-rect.execution.mjs +10 -5
- package/esm2022/domain/get-normalized-point/get-normalized-point.execution.mjs +9 -4
- package/esm2022/domain/providers.mjs +7 -1
- package/esm2022/domain/sort-item-layers/sort-item-layers.execution.mjs +15 -8
- package/esm2022/domain/sort-item-layers/sort-items-by-parent/sort-items-by-parent.execution.mjs +13 -8
- package/esm2022/domain/sort-item-layers/sort-node-layers-by-groups/sort-node-layers.execution.mjs +14 -9
- package/esm2022/domain/update-item-and-children-layers/move-front-elements-before-target-element/move-front-elements-before-target-element.execution.mjs +5 -1
- package/esm2022/domain/update-item-and-children-layers/update-item-and-children-layers.execution.mjs +12 -8
- package/esm2022/drag-toolkit/drag-and-drop-base.mjs +55 -1
- package/esm2022/f-canvas/f-canvas.component.mjs +67 -20
- package/esm2022/f-connection/common/domain/f-bezier.path-builder.mjs +7 -2
- package/esm2022/f-connection/common/domain/f-segment.path-builder.mjs +3 -2
- package/esm2022/f-connection/common/domain/f-straight.path-builder.mjs +2 -2
- package/esm2022/f-connection/common/f-connection-base.mjs +16 -12
- package/esm2022/f-connection/common/f-connection-text/f-connection-text-path.directive.mjs +2 -2
- package/esm2022/f-connection/common/f-connection-text/f-connection-text.component.mjs +2 -2
- package/esm2022/f-connection/common/f-gradient/f-connection-gradient.component.mjs +4 -4
- package/esm2022/f-connection/common/f-path/f-connection-path.component.mjs +8 -8
- package/esm2022/f-connection/common/f-selection/f-connection-selection.component.mjs +2 -2
- package/esm2022/f-connection/common/i-has-connection-color.mjs +1 -1
- package/esm2022/f-connection/common/i-has-connection-from-to.mjs +1 -1
- package/esm2022/f-connection/f-connection/f-connection.component.mjs +23 -52
- package/esm2022/f-connection/f-connection-builder/i-f-connection-builder-response.mjs +1 -1
- package/esm2022/f-connection/f-connection-for-create/f-connection-for-create.component.mjs +21 -48
- package/esm2022/f-connection/f-snap-connection/f-snap-connection.component.mjs +21 -48
- package/esm2022/f-connectors/f-node-input/f-node-input.directive.mjs +2 -2
- package/esm2022/f-connectors/f-node-outlet/f-node-outlet.directive.mjs +2 -2
- package/esm2022/f-connectors/f-node-output/f-node-output.directive.mjs +2 -2
- package/esm2022/f-draggable/domain/get-normalized-parent-node-rect/get-normalized-parent-node-rect.execution.mjs +2 -2
- package/esm2022/f-draggable/domain/is-array-has-parent-node/is-array-has-parent-node.execution.mjs +3 -3
- package/esm2022/f-draggable/domain/is-connection-under-node/is-connection-under-node.execution.mjs +6 -6
- package/esm2022/f-draggable/f-connection/f-create-connection/create-finalize/f-create-connection-finalize.execution.mjs +3 -3
- package/esm2022/f-draggable/f-connection/f-create-connection/f-create-connection.drag-handler.mjs +5 -5
- package/esm2022/f-draggable/f-connection/f-reassign-connection/f-reassign-connection.drag-handler.mjs +41 -73
- package/esm2022/f-draggable/f-connection/f-reassign-connection/f-reassign-connection.event.mjs +18 -12
- package/esm2022/f-draggable/f-connection/f-reassign-connection/f-reassign-source.drag-handler.mjs +83 -0
- package/esm2022/f-draggable/f-connection/f-reassign-connection/f-reassign-target.drag-handler.mjs +82 -0
- package/esm2022/f-draggable/f-connection/f-reassign-connection/i-f-reassign-connection-drag-result.mjs +1 -1
- package/esm2022/f-draggable/f-connection/f-reassign-connection/i-f-reassign-handler.mjs +8 -0
- package/esm2022/f-draggable/f-connection/f-reassign-connection/index.mjs +5 -1
- package/esm2022/f-draggable/f-connection/f-reassign-connection/reassign-finalize/f-reassign-connection-finalize.execution.mjs +27 -21
- package/esm2022/f-draggable/f-connection/f-reassign-connection/reassign-preparation/f-reassign-connection-preparation.execution.mjs +8 -11
- package/esm2022/f-draggable/f-connection/f-reassign-connection/reassign-preparation/index.mjs +2 -1
- package/esm2022/f-draggable/f-connection/f-reassign-connection/reassign-preparation/is-pointer-inside-start-or-end-drag-handles.mjs +17 -0
- package/esm2022/f-draggable/f-drop-to-group/drop-to-group-finalize/f-node-drop-to-group-finalize.execution.mjs +3 -3
- package/esm2022/f-draggable/f-node-move/create-move-nodes-drag-model-from-selection/create-move-nodes-drag-model-from-selection.execution.mjs +4 -4
- package/esm2022/f-draggable/f-node-move/create-move-nodes-drag-model-from-selection/domain/put-input-connection-handlers-to-array/put-input-connection-handlers-to-array.execution.mjs +2 -2
- package/esm2022/f-draggable/f-node-move/create-move-nodes-drag-model-from-selection/domain/put-output-connection-handlers-to-array/put-output-connection-handlers-to-array.execution.mjs +2 -2
- package/esm2022/f-draggable/f-node-move/f-summary-node-move.drag-handler.mjs +2 -2
- package/esm2022/f-draggable/f-node-move/move-finalize/f-node-move-finalize.execution.mjs +2 -2
- package/esm2022/f-draggable/f-node-resize/f-node-resize.drag-handler.mjs +2 -2
- package/esm2022/f-draggable/f-node-resize/get-normalized-children-nodes-rect/get-normalized-children-nodes-rect.execution.mjs +2 -2
- package/esm2022/f-draggable/f-node-rotate/f-node-rotate.drag-handler.mjs +2 -2
- package/esm2022/f-draggable/f-single-select/f-single-select.execution.mjs +2 -2
- package/esm2022/f-external-item/domain/finalize/f-external-item-finalize.execution.mjs +2 -2
- package/esm2022/f-flow/f-flow.component.mjs +3 -3
- package/esm2022/f-minimap/domain/f-minimap.drag-handler.mjs +1 -1
- package/esm2022/f-minimap/f-minimap-canvas.directive.mjs +3 -4
- package/esm2022/f-minimap/f-minimap-flow.directive.mjs +7 -9
- package/esm2022/f-minimap/f-minimap-view.directive.mjs +3 -3
- package/esm2022/f-minimap/f-minimap.component.mjs +19 -30
- package/esm2022/f-node/f-group.directive.mjs +6 -9
- package/esm2022/f-node/f-node-base.mjs +1 -1
- package/esm2022/f-node/f-node.directive.mjs +6 -9
- package/esm2022/f-zoom/f-zoom.directive.mjs +8 -2
- package/esm2022/mixins/change-selection/change-selection.mjs +3 -2
- package/esm2022/mixins/change-selection/i-selectable.mjs +1 -1
- package/f-canvas/f-canvas.component.d.ts +49 -1
- package/f-connection/common/f-connection-base.d.ts +15 -12
- package/f-connection/common/i-has-connection-color.d.ts +3 -2
- package/f-connection/common/i-has-connection-from-to.d.ts +2 -1
- package/f-connection/f-connection/f-connection.component.d.ts +17 -15
- package/f-connection/f-connection-builder/i-f-connection-builder-response.d.ts +1 -0
- package/f-connection/f-connection-for-create/f-connection-for-create.component.d.ts +16 -15
- package/f-connection/f-snap-connection/f-snap-connection.component.d.ts +16 -15
- package/f-connection/providers.d.ts +1 -1
- package/f-draggable/domain/is-connection-under-node/is-connection-under-node.execution.d.ts +2 -2
- package/f-draggable/f-connection/f-reassign-connection/f-reassign-connection.drag-handler.d.ts +11 -17
- package/f-draggable/f-connection/f-reassign-connection/f-reassign-connection.event.d.ts +9 -6
- package/f-draggable/f-connection/f-reassign-connection/f-reassign-source.drag-handler.d.ts +27 -0
- package/f-draggable/f-connection/f-reassign-connection/f-reassign-target.drag-handler.d.ts +28 -0
- package/f-draggable/f-connection/f-reassign-connection/i-f-reassign-connection-drag-result.d.ts +4 -2
- package/f-draggable/f-connection/f-reassign-connection/i-f-reassign-handler.d.ts +12 -0
- package/f-draggable/f-connection/f-reassign-connection/index.d.ts +4 -0
- package/f-draggable/f-connection/f-reassign-connection/reassign-finalize/f-reassign-connection-finalize.execution.d.ts +6 -6
- package/f-draggable/f-connection/f-reassign-connection/reassign-preparation/f-reassign-connection-preparation.execution.d.ts +0 -1
- package/f-draggable/f-connection/f-reassign-connection/reassign-preparation/index.d.ts +1 -0
- package/f-draggable/f-connection/f-reassign-connection/reassign-preparation/is-pointer-inside-start-or-end-drag-handles.d.ts +5 -0
- package/f-draggable/f-connection/providers.d.ts +1 -1
- package/f-draggable/f-drop-to-group/providers.d.ts +1 -1
- package/f-draggable/f-node-move/create-move-nodes-drag-model-from-selection/providers.d.ts +1 -1
- package/f-draggable/f-node-move/providers.d.ts +1 -1
- package/f-draggable/f-node-resize/providers.d.ts +1 -1
- package/f-draggable/providers.d.ts +1 -1
- package/f-flow/f-flow.component.d.ts +1 -1
- package/f-minimap/domain/providers.d.ts +1 -1
- package/f-minimap/f-minimap-canvas.directive.d.ts +1 -1
- package/f-minimap/f-minimap-flow.directive.d.ts +4 -4
- package/f-minimap/f-minimap-view.directive.d.ts +1 -1
- package/f-minimap/f-minimap.component.d.ts +8 -8
- package/f-node/f-group.directive.d.ts +2 -2
- package/f-node/f-node-base.d.ts +2 -2
- package/f-node/f-node.directive.d.ts +2 -2
- package/f-node/providers.d.ts +1 -1
- package/f-selection-area/domain/providers.d.ts +1 -1
- package/f-storage/providers.d.ts +1 -1
- package/f-zoom/f-zoom.directive.d.ts +1 -0
- package/fesm2022/foblex-flow.mjs +1331 -732
- package/fesm2022/foblex-flow.mjs.map +1 -1
- package/mixins/change-selection/i-selectable.d.ts +2 -1
- package/package.json +1 -1
- package/domain/f-connectors/calculate-closest-input/calculate-closest-input.execution.d.ts +0 -11
- package/domain/f-connectors/calculate-closest-input/calculate-closest-input.request.d.ts +0 -8
- package/domain/f-connectors/calculate-closest-input/index.d.ts +0 -2
- package/domain/f-connectors/find-input-at-position/find-input-at-position.execution.d.ts +0 -25
- package/domain/f-connectors/find-input-at-position/find-input-at-position.request.d.ts +0 -9
- package/domain/f-connectors/find-input-at-position/index.d.ts +0 -2
- package/domain/f-connectors/mark-all-can-be-connected-inputs/index.d.ts +0 -2
- package/domain/f-connectors/mark-all-can-be-connected-inputs/mark-all-can-be-connected-inputs.execution.d.ts +0 -10
- package/domain/f-connectors/mark-all-can-be-connected-inputs/mark-all-can-be-connected-inputs.request.d.ts +0 -6
- package/domain/f-connectors/unmark-all-can-be-connected-inputs/index.d.ts +0 -2
- package/domain/f-connectors/unmark-all-can-be-connected-inputs/unmark-all-can-be-connected-inputs.execution.d.ts +0 -10
- package/domain/f-connectors/unmark-all-can-be-connected-inputs/unmark-all-can-be-connected-inputs.request.d.ts +0 -6
- package/esm2022/domain/f-connectors/calculate-closest-input/calculate-closest-input.execution.mjs +0 -42
- package/esm2022/domain/f-connectors/calculate-closest-input/calculate-closest-input.request.mjs +0 -10
- package/esm2022/domain/f-connectors/calculate-closest-input/index.mjs +0 -3
- package/esm2022/domain/f-connectors/find-input-at-position/find-input-at-position.execution.mjs +0 -92
- package/esm2022/domain/f-connectors/find-input-at-position/find-input-at-position.request.mjs +0 -12
- package/esm2022/domain/f-connectors/i-closest-input.mjs +0 -2
- package/esm2022/domain/f-connectors/mark-all-can-be-connected-inputs/index.mjs +0 -3
- package/esm2022/domain/f-connectors/mark-all-can-be-connected-inputs/mark-all-can-be-connected-inputs.execution.mjs +0 -27
- package/esm2022/domain/f-connectors/mark-all-can-be-connected-inputs/mark-all-can-be-connected-inputs.request.mjs +0 -8
- package/esm2022/domain/f-connectors/unmark-all-can-be-connected-inputs/index.mjs +0 -3
- package/esm2022/domain/f-connectors/unmark-all-can-be-connected-inputs/unmark-all-can-be-connected-inputs.execution.mjs +0 -27
- package/esm2022/domain/f-connectors/unmark-all-can-be-connected-inputs/unmark-all-can-be-connected-inputs.request.mjs +0 -8
package/fesm2022/foblex-flow.mjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Injectable, effect, Directive, input, computed, DestroyRef, EventEmitter, booleanAttribute, Input, Output, ElementRef, Inject, Component, ChangeDetectionStrategy, ViewChild, Optional,
|
|
2
|
+
import { InjectionToken, inject, Injectable, effect, Directive, input, computed, signal, DestroyRef, EventEmitter, booleanAttribute, Input, Output, ElementRef, Inject, Component, ChangeDetectionStrategy, ViewChild, Optional, viewChild, contentChildren, numberAttribute, Injector, ViewContainerRef, TemplateRef, NgZone, ContentChildren, contentChild, output, Renderer2, NgModule } from '@angular/core';
|
|
3
3
|
import { RectExtensions, RoundedRect, TransformModelExtensions, PointExtensions, SizeExtensions, Point, LineExtensions, GetIntersections, findClosestAlignment, setRectToElement, adjustRectToMinSize, setRectToViewBox } from '@foblex/2d';
|
|
4
4
|
import { __decorate } from 'tslib';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i1$1 from '@foblex/mediator';
|
|
6
6
|
import { FExecutionRegister, FMediator } from '@foblex/mediator';
|
|
7
7
|
import * as i1 from '@foblex/platform';
|
|
8
8
|
import { BrowserService, PlatformService, EOperationSystem } from '@foblex/platform';
|
|
9
9
|
import { normalizeDomElementId, castToEnum, isClosestElementHasClass, flatMap, getOrCreateRootNodeForViewRef, deepCloneNode, disableDragInteractions, extendStyles, getDataAttrValueFromClosestElementWithClass } from '@foblex/utils';
|
|
10
|
-
import * as i2 from '@angular/common';
|
|
11
10
|
import { CommonModule } from '@angular/common';
|
|
12
11
|
|
|
13
12
|
const F_BACKGROUND_PATTERN = new InjectionToken('F_BACKGROUND_PATTERN');
|
|
@@ -20,8 +19,12 @@ class GetElementRoundedRectRequest {
|
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Execution that retrieves the rectangle of an element with its border-radius.
|
|
24
|
+
* It calculates the rectangle based on the element's dimensions and its computed style.
|
|
25
|
+
*/
|
|
23
26
|
let GetElementRoundedRectExecution = class GetElementRoundedRectExecution {
|
|
24
|
-
|
|
27
|
+
_browser = inject(BrowserService);
|
|
25
28
|
handle(request) {
|
|
26
29
|
return this._getRoundedRect(RectExtensions.fromElement(request.element), request.element, this._getComputedStyle(request.element));
|
|
27
30
|
}
|
|
@@ -29,10 +32,10 @@ let GetElementRoundedRectExecution = class GetElementRoundedRectExecution {
|
|
|
29
32
|
return new RoundedRect(rect.x, rect.y, rect.width, rect.height, this._toPixels(styles.borderTopLeftRadius, element, styles.fontSize), this._toPixels(styles.borderTopRightRadius, element, styles.fontSize), this._toPixels(styles.borderBottomRightRadius, element, styles.fontSize), this._toPixels(styles.borderBottomLeftRadius, element, styles.fontSize));
|
|
30
33
|
}
|
|
31
34
|
_getComputedStyle(element) {
|
|
32
|
-
return this.
|
|
35
|
+
return this._browser.window.getComputedStyle(element);
|
|
33
36
|
}
|
|
34
37
|
_toPixels(value, element, fontSize) {
|
|
35
|
-
return this.
|
|
38
|
+
return this._browser.toPixels(value, element.clientWidth, element.clientHeight, fontSize) || 0;
|
|
36
39
|
}
|
|
37
40
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetElementRoundedRectExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
38
41
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetElementRoundedRectExecution });
|
|
@@ -300,10 +303,13 @@ const F_STORAGE_PROVIDERS = [
|
|
|
300
303
|
FComponentsStore,
|
|
301
304
|
];
|
|
302
305
|
|
|
306
|
+
/**
|
|
307
|
+
* Execution that adds a background to the FComponentsStore.
|
|
308
|
+
*/
|
|
303
309
|
let AddBackgroundToStoreExecution = class AddBackgroundToStoreExecution {
|
|
304
|
-
|
|
310
|
+
_store = inject(FComponentsStore);
|
|
305
311
|
handle(request) {
|
|
306
|
-
this.
|
|
312
|
+
this._store.fBackground = request.fBackground;
|
|
307
313
|
}
|
|
308
314
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddBackgroundToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
309
315
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddBackgroundToStoreExecution });
|
|
@@ -324,11 +330,14 @@ class AddPatternToBackgroundRequest {
|
|
|
324
330
|
}
|
|
325
331
|
|
|
326
332
|
let uniqueId$c = 0;
|
|
333
|
+
/**
|
|
334
|
+
* Execution that adds a pattern to the background in the FComponentsStore.
|
|
335
|
+
*/
|
|
327
336
|
let AddPatternToBackgroundExecution = class AddPatternToBackgroundExecution {
|
|
328
|
-
|
|
337
|
+
_store = inject(FComponentsStore);
|
|
329
338
|
_fBrowser = inject(BrowserService);
|
|
330
339
|
get _fBackground() {
|
|
331
|
-
return this.
|
|
340
|
+
return this._store.fBackground;
|
|
332
341
|
}
|
|
333
342
|
handle(request) {
|
|
334
343
|
const children = request.fPattern?.hostElement.getElementsByTagName('pattern') || [];
|
|
@@ -344,7 +353,7 @@ let AddPatternToBackgroundExecution = class AddPatternToBackgroundExecution {
|
|
|
344
353
|
rect.setAttribute('width', '100%');
|
|
345
354
|
rect.setAttribute('height', '100%');
|
|
346
355
|
this._fBackground.hostElement.firstChild?.appendChild(rect);
|
|
347
|
-
const transform = this.
|
|
356
|
+
const transform = this._store.fCanvas?.transform || TransformModelExtensions.default();
|
|
348
357
|
request.fPattern?.setTransform(transform);
|
|
349
358
|
}
|
|
350
359
|
}
|
|
@@ -366,10 +375,13 @@ class RemoveBackgroundFromStoreRequest {
|
|
|
366
375
|
}
|
|
367
376
|
}
|
|
368
377
|
|
|
378
|
+
/**
|
|
379
|
+
* Execution that removes the background from the FComponentsStore.
|
|
380
|
+
*/
|
|
369
381
|
let RemoveBackgroundFromStoreExecution = class RemoveBackgroundFromStoreExecution {
|
|
370
|
-
|
|
382
|
+
_store = inject(FComponentsStore);
|
|
371
383
|
handle(request) {
|
|
372
|
-
this.
|
|
384
|
+
this._store.fBackground = undefined;
|
|
373
385
|
}
|
|
374
386
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveBackgroundFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
375
387
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveBackgroundFromStoreExecution });
|
|
@@ -389,10 +401,13 @@ class SetBackgroundTransformRequest {
|
|
|
389
401
|
}
|
|
390
402
|
}
|
|
391
403
|
|
|
404
|
+
/**
|
|
405
|
+
* Execution that sets the transform for the background when canvas is transformed.
|
|
406
|
+
*/
|
|
392
407
|
let SetBackgroundTransformExecution = class SetBackgroundTransformExecution {
|
|
393
|
-
|
|
408
|
+
_store = inject(FComponentsStore);
|
|
394
409
|
handle(request) {
|
|
395
|
-
this.
|
|
410
|
+
this._store.fBackground?.setTransform(request.fTransform);
|
|
396
411
|
}
|
|
397
412
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SetBackgroundTransformExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
398
413
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SetBackgroundTransformExecution });
|
|
@@ -404,6 +419,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
404
419
|
type: Injectable
|
|
405
420
|
}] });
|
|
406
421
|
|
|
422
|
+
/**
|
|
423
|
+
* This file exports all the background-related features for the F-Flow domain.
|
|
424
|
+
* It includes executions for adding, removing, and setting the background in the FComponentsStore.
|
|
425
|
+
*/
|
|
407
426
|
const F_BACKGROUND_FEATURES = [
|
|
408
427
|
AddBackgroundToStoreExecution,
|
|
409
428
|
AddPatternToBackgroundExecution,
|
|
@@ -419,10 +438,13 @@ class AddCanvasToStoreRequest {
|
|
|
419
438
|
}
|
|
420
439
|
}
|
|
421
440
|
|
|
441
|
+
/**
|
|
442
|
+
* Execution that adds a canvas to the FComponentsStore.
|
|
443
|
+
*/
|
|
422
444
|
let AddCanvasToStoreExecution = class AddCanvasToStoreExecution {
|
|
423
|
-
|
|
445
|
+
_store = inject(FComponentsStore);
|
|
424
446
|
handle(request) {
|
|
425
|
-
this.
|
|
447
|
+
this._store.fCanvas = request.fCanvas;
|
|
426
448
|
}
|
|
427
449
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddCanvasToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
428
450
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddCanvasToStoreExecution });
|
|
@@ -444,11 +466,14 @@ class CenterGroupOrNodeRequest {
|
|
|
444
466
|
}
|
|
445
467
|
}
|
|
446
468
|
|
|
469
|
+
/**
|
|
470
|
+
* Execution that centers a group or a node inside the flow.
|
|
471
|
+
*/
|
|
447
472
|
let CenterGroupOrNodeExecution = class CenterGroupOrNodeExecution {
|
|
448
|
-
|
|
473
|
+
_store = inject(FComponentsStore);
|
|
449
474
|
_fMediator = inject(FMediator);
|
|
450
475
|
get transform() {
|
|
451
|
-
return this.
|
|
476
|
+
return this._store.fCanvas.transform;
|
|
452
477
|
}
|
|
453
478
|
handle(request) {
|
|
454
479
|
const fNode = this.getNode(request.id);
|
|
@@ -463,13 +488,13 @@ let CenterGroupOrNodeExecution = class CenterGroupOrNodeExecution {
|
|
|
463
488
|
this.transform.position = PointExtensions.initialize((fFlowRect.width - fNodeRect.width) / 2 - position.x * this.transform.scale, (fFlowRect.height - fNodeRect.height) / 2 - position.y * this.transform.scale);
|
|
464
489
|
}
|
|
465
490
|
getNode(id) {
|
|
466
|
-
return this.
|
|
491
|
+
return this._store.fNodes.find((x) => x.fId() === id);
|
|
467
492
|
}
|
|
468
493
|
getNodeRect(fNode) {
|
|
469
494
|
return RectExtensions.fromElement(fNode.hostElement);
|
|
470
495
|
}
|
|
471
496
|
getFlowRect() {
|
|
472
|
-
return RectExtensions.fromElement(this.
|
|
497
|
+
return RectExtensions.fromElement(this._store.fFlow.hostElement);
|
|
473
498
|
}
|
|
474
499
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CenterGroupOrNodeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
475
500
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CenterGroupOrNodeExecution });
|
|
@@ -491,10 +516,13 @@ class FitToFlowRequest {
|
|
|
491
516
|
}
|
|
492
517
|
}
|
|
493
518
|
|
|
519
|
+
/**
|
|
520
|
+
* Fits all nodes and groups to the flow by scaling and positioning them
|
|
521
|
+
*/
|
|
494
522
|
let FitToFlowExecution = class FitToFlowExecution {
|
|
495
|
-
|
|
523
|
+
_store = inject(FComponentsStore);
|
|
496
524
|
get transform() {
|
|
497
|
-
return this.
|
|
525
|
+
return this._store.fCanvas.transform;
|
|
498
526
|
}
|
|
499
527
|
_fMediator = inject(FMediator);
|
|
500
528
|
handle(request) {
|
|
@@ -502,7 +530,7 @@ let FitToFlowExecution = class FitToFlowExecution {
|
|
|
502
530
|
if (fNodesRect.width === 0 || fNodesRect.height === 0) {
|
|
503
531
|
return;
|
|
504
532
|
}
|
|
505
|
-
this.fitToParent(fNodesRect, RectExtensions.fromElement(this.
|
|
533
|
+
this.fitToParent(fNodesRect, RectExtensions.fromElement(this._store.fFlow.hostElement), this._store.fNodes.map((x) => x.position), request.toCenter);
|
|
506
534
|
this._fMediator.execute(new RedrawCanvasWithAnimationRequest(request.animated));
|
|
507
535
|
}
|
|
508
536
|
fitToParent(rect, parentRect, points, toCenter) {
|
|
@@ -537,10 +565,13 @@ class GetCanvasRequest {
|
|
|
537
565
|
static fToken = Symbol('GetCanvasRequest');
|
|
538
566
|
}
|
|
539
567
|
|
|
568
|
+
/**
|
|
569
|
+
* Execution that retrieves the canvas from the FComponentsStore.
|
|
570
|
+
*/
|
|
540
571
|
let GetCanvasExecution = class GetCanvasExecution {
|
|
541
|
-
|
|
572
|
+
_store = inject(FComponentsStore);
|
|
542
573
|
handle(request) {
|
|
543
|
-
const result = this.
|
|
574
|
+
const result = this._store.fCanvas;
|
|
544
575
|
if (!result) {
|
|
545
576
|
throw new Error(`Canvas not found in store`);
|
|
546
577
|
}
|
|
@@ -566,8 +597,11 @@ class InputCanvasPositionRequest {
|
|
|
566
597
|
}
|
|
567
598
|
}
|
|
568
599
|
|
|
600
|
+
/**
|
|
601
|
+
* It updates the canvas position and redraws the canvas when the user set a new position using the input.
|
|
602
|
+
*/
|
|
569
603
|
let InputCanvasPositionExecution = class InputCanvasPositionExecution {
|
|
570
|
-
|
|
604
|
+
_store = inject(FComponentsStore);
|
|
571
605
|
handle(request) {
|
|
572
606
|
if (!request.position) {
|
|
573
607
|
return;
|
|
@@ -576,7 +610,7 @@ let InputCanvasPositionExecution = class InputCanvasPositionExecution {
|
|
|
576
610
|
if (!PointExtensions.isEqual(position, request.position)) {
|
|
577
611
|
request.transform.position = request.position;
|
|
578
612
|
request.transform.scaledPosition = PointExtensions.initialize();
|
|
579
|
-
this.
|
|
613
|
+
this._store.fCanvas?.redraw();
|
|
580
614
|
}
|
|
581
615
|
return void 0;
|
|
582
616
|
}
|
|
@@ -600,14 +634,18 @@ class InputCanvasScaleRequest {
|
|
|
600
634
|
}
|
|
601
635
|
}
|
|
602
636
|
|
|
637
|
+
/**
|
|
638
|
+
* Execution that handles the scaling of the input canvas.
|
|
639
|
+
* It updates the scale of the canvas transform and redraws the canvas when the user sets a new scale using the input.
|
|
640
|
+
*/
|
|
603
641
|
let InputCanvasScaleExecution = class InputCanvasScaleExecution {
|
|
604
|
-
|
|
642
|
+
_store = inject(FComponentsStore);
|
|
605
643
|
handle(request) {
|
|
606
644
|
if (!request.scale && request.scale !== 0) {
|
|
607
645
|
return;
|
|
608
646
|
}
|
|
609
647
|
request.transform.scale = request.scale;
|
|
610
|
-
this.
|
|
648
|
+
this._store.fCanvas?.redraw();
|
|
611
649
|
}
|
|
612
650
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InputCanvasScaleExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
613
651
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: InputCanvasScaleExecution });
|
|
@@ -637,22 +675,27 @@ function transitionEnd(element, callback) {
|
|
|
637
675
|
element.addEventListener('transitionend', onTransitionEnd);
|
|
638
676
|
}
|
|
639
677
|
|
|
678
|
+
/**
|
|
679
|
+
* Execution that redraws the canvas with or without animation based on the request.
|
|
680
|
+
* If animated, it will redraw with animation and wait for the transition end to notify data change.
|
|
681
|
+
* If not animated, it will redraw immediately and notify data change.
|
|
682
|
+
*/
|
|
640
683
|
let RedrawCanvasWithAnimationExecution = class RedrawCanvasWithAnimationExecution {
|
|
641
|
-
|
|
684
|
+
_store = inject(FComponentsStore);
|
|
642
685
|
get _fCanvasElement() {
|
|
643
|
-
return this.
|
|
686
|
+
return this._store.fCanvas.hostElement;
|
|
644
687
|
}
|
|
645
688
|
handle(request) {
|
|
646
689
|
request.animated ? this._redrawWithAnimation() : this._redraw();
|
|
647
|
-
this.
|
|
690
|
+
this._store.fCanvas.emitCanvasChangeEvent();
|
|
648
691
|
}
|
|
649
692
|
_redrawWithAnimation() {
|
|
650
|
-
this.
|
|
651
|
-
transitionEnd(this._fCanvasElement, () => this.
|
|
693
|
+
this._store.fCanvas.redrawWithAnimation();
|
|
694
|
+
transitionEnd(this._fCanvasElement, () => this._store.dataChanged());
|
|
652
695
|
}
|
|
653
696
|
_redraw() {
|
|
654
|
-
this.
|
|
655
|
-
this.
|
|
697
|
+
this._store.fCanvas.redraw();
|
|
698
|
+
this._store.dataChanged();
|
|
656
699
|
}
|
|
657
700
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RedrawCanvasWithAnimationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
658
701
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RedrawCanvasWithAnimationExecution });
|
|
@@ -668,10 +711,13 @@ class RemoveCanvasFromStoreRequest {
|
|
|
668
711
|
static fToken = Symbol('RemoveCanvasFromStoreRequest');
|
|
669
712
|
}
|
|
670
713
|
|
|
714
|
+
/**
|
|
715
|
+
* Execution that removes the canvas from the FComponentsStore.
|
|
716
|
+
*/
|
|
671
717
|
let RemoveCanvasFromStoreExecution = class RemoveCanvasFromStoreExecution {
|
|
672
|
-
|
|
718
|
+
_store = inject(FComponentsStore);
|
|
673
719
|
handle(request) {
|
|
674
|
-
this.
|
|
720
|
+
this._store.fCanvas = undefined;
|
|
675
721
|
}
|
|
676
722
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveCanvasFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
677
723
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveCanvasFromStoreExecution });
|
|
@@ -687,10 +733,13 @@ class ResetScaleRequest {
|
|
|
687
733
|
static fToken = Symbol('ResetScaleRequest');
|
|
688
734
|
}
|
|
689
735
|
|
|
736
|
+
/**
|
|
737
|
+
* Execution that resets the scale of the canvas in the FComponentsStore.
|
|
738
|
+
*/
|
|
690
739
|
let ResetScaleExecution = class ResetScaleExecution {
|
|
691
|
-
|
|
740
|
+
_store = inject(FComponentsStore);
|
|
692
741
|
get transform() {
|
|
693
|
-
return this.
|
|
742
|
+
return this._store.fCanvas.transform;
|
|
694
743
|
}
|
|
695
744
|
handle(request) {
|
|
696
745
|
this.transform.scale = 1;
|
|
@@ -714,18 +763,21 @@ class ResetScaleAndCenterRequest {
|
|
|
714
763
|
}
|
|
715
764
|
}
|
|
716
765
|
|
|
766
|
+
/**
|
|
767
|
+
* Execution that resets the scale of the canvas and centers the nodes and groups inside the flow.
|
|
768
|
+
*/
|
|
717
769
|
let ResetScaleAndCenterExecution = class ResetScaleAndCenterExecution {
|
|
718
770
|
_fMediator = inject(FMediator);
|
|
719
|
-
|
|
771
|
+
_store = inject(FComponentsStore);
|
|
720
772
|
get _transform() {
|
|
721
|
-
return this.
|
|
773
|
+
return this._store.fCanvas.transform;
|
|
722
774
|
}
|
|
723
775
|
handle(request) {
|
|
724
776
|
const fNodesRect = this._fMediator.execute(new CalculateNodesBoundingBoxRequest()) || RectExtensions.initialize();
|
|
725
777
|
if (fNodesRect.width === 0 || fNodesRect.height === 0) {
|
|
726
778
|
return;
|
|
727
779
|
}
|
|
728
|
-
this._oneToOneCentering(fNodesRect, RectExtensions.fromElement(this.
|
|
780
|
+
this._oneToOneCentering(fNodesRect, RectExtensions.fromElement(this._store.fFlow.hostElement), this._store.fNodes.map((x) => x.position));
|
|
729
781
|
this._fMediator.execute(new RedrawCanvasWithAnimationRequest(request.animated));
|
|
730
782
|
}
|
|
731
783
|
_oneToOneCentering(rect, parentRect, points) {
|
|
@@ -761,10 +813,14 @@ class UpdateScaleRequest {
|
|
|
761
813
|
}
|
|
762
814
|
}
|
|
763
815
|
|
|
816
|
+
/**
|
|
817
|
+
* Execution that updates the scale of the canvas in the FComponentsStore.
|
|
818
|
+
* Occurs when the fZoom directive or User call the setScale method.
|
|
819
|
+
*/
|
|
764
820
|
let UpdateScaleExecution = class UpdateScaleExecution {
|
|
765
|
-
|
|
821
|
+
_store = inject(FComponentsStore);
|
|
766
822
|
get transform() {
|
|
767
|
-
return this.
|
|
823
|
+
return this._store.fCanvas.transform;
|
|
768
824
|
}
|
|
769
825
|
handle(request) {
|
|
770
826
|
if (request.scale !== this.transform.scale) {
|
|
@@ -785,6 +841,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
785
841
|
type: Injectable
|
|
786
842
|
}] });
|
|
787
843
|
|
|
844
|
+
/**
|
|
845
|
+
* This file exports all the canvas-related executions that can be used in the FCanvas feature.
|
|
846
|
+
*/
|
|
788
847
|
const F_CANVAS_FEATURES = [
|
|
789
848
|
AddCanvasToStoreExecution,
|
|
790
849
|
CenterGroupOrNodeExecution,
|
|
@@ -807,10 +866,13 @@ class AddConnectionForCreateToStoreRequest {
|
|
|
807
866
|
}
|
|
808
867
|
}
|
|
809
868
|
|
|
869
|
+
/**
|
|
870
|
+
* Execution that adds a connection for creation to the FComponentsStore.
|
|
871
|
+
*/
|
|
810
872
|
let AddConnectionForCreateToStoreExecution = class AddConnectionForCreateToStoreExecution {
|
|
811
|
-
|
|
873
|
+
_store = inject(FComponentsStore);
|
|
812
874
|
handle(request) {
|
|
813
|
-
this.
|
|
875
|
+
this._store.fTempConnection = request.fConnection;
|
|
814
876
|
}
|
|
815
877
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddConnectionForCreateToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
816
878
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddConnectionForCreateToStoreExecution });
|
|
@@ -830,10 +892,13 @@ class AddConnectionMarkerToStoreRequest {
|
|
|
830
892
|
}
|
|
831
893
|
}
|
|
832
894
|
|
|
895
|
+
/**
|
|
896
|
+
* Execution that adds a connection marker to the FComponentsStore.
|
|
897
|
+
*/
|
|
833
898
|
let AddConnectionMarkerToStoreExecution = class AddConnectionMarkerToStoreExecution {
|
|
834
|
-
|
|
899
|
+
_store = inject(FComponentsStore);
|
|
835
900
|
handle(request) {
|
|
836
|
-
this.
|
|
901
|
+
this._store.addComponent(this._store.fMarkers, request.fComponent);
|
|
837
902
|
}
|
|
838
903
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddConnectionMarkerToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
839
904
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddConnectionMarkerToStoreExecution });
|
|
@@ -853,11 +918,14 @@ class AddConnectionToStoreRequest {
|
|
|
853
918
|
}
|
|
854
919
|
}
|
|
855
920
|
|
|
921
|
+
/**
|
|
922
|
+
* Execution that adds a connection to the FComponentsStore.
|
|
923
|
+
*/
|
|
856
924
|
let AddConnectionToStoreExecution = class AddConnectionToStoreExecution {
|
|
857
|
-
|
|
925
|
+
_store = inject(FComponentsStore);
|
|
858
926
|
handle(request) {
|
|
859
|
-
this.
|
|
860
|
-
this.
|
|
927
|
+
this._store.fConnections.push(request.fConnection);
|
|
928
|
+
this._store.dataChanged();
|
|
861
929
|
}
|
|
862
930
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddConnectionToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
863
931
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddConnectionToStoreExecution });
|
|
@@ -877,10 +945,13 @@ class AddSnapConnectionToStoreRequest {
|
|
|
877
945
|
}
|
|
878
946
|
}
|
|
879
947
|
|
|
948
|
+
/**
|
|
949
|
+
* Execution that adds a snap connection to the FComponentsStore.
|
|
950
|
+
*/
|
|
880
951
|
let AddSnapConnectionToStoreExecution = class AddSnapConnectionToStoreExecution {
|
|
881
|
-
|
|
952
|
+
_store = inject(FComponentsStore);
|
|
882
953
|
handle(request) {
|
|
883
|
-
this.
|
|
954
|
+
this._store.fSnapConnection = request.fConnection;
|
|
884
955
|
}
|
|
885
956
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddSnapConnectionToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
886
957
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddSnapConnectionToStoreExecution });
|
|
@@ -900,18 +971,17 @@ class CreateConnectionMarkersRequest {
|
|
|
900
971
|
}
|
|
901
972
|
}
|
|
902
973
|
|
|
974
|
+
/**
|
|
975
|
+
* Execution that creates connection markers for a given connection.
|
|
976
|
+
*/
|
|
903
977
|
let CreateConnectionMarkersExecution = class CreateConnectionMarkersExecution {
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
constructor(fBrowser, fComponentsStore) {
|
|
907
|
-
this.fBrowser = fBrowser;
|
|
908
|
-
this.fComponentsStore = fComponentsStore;
|
|
909
|
-
}
|
|
978
|
+
_browser = inject(BrowserService);
|
|
979
|
+
_store = inject(FComponentsStore);
|
|
910
980
|
handle(request) {
|
|
911
|
-
const element = createSVGElement$1('defs', this.
|
|
981
|
+
const element = createSVGElement$1('defs', this._browser);
|
|
912
982
|
const fConnection = request.fConnection;
|
|
913
983
|
this.getMarkers(fConnection).forEach((marker) => {
|
|
914
|
-
const markerElement = this.createMarkerElement(marker, fConnection.fId);
|
|
984
|
+
const markerElement = this.createMarkerElement(marker, fConnection.fId());
|
|
915
985
|
const clone = marker.hostElement.cloneNode(true);
|
|
916
986
|
clone.setAttribute('height', `${marker.height}`);
|
|
917
987
|
clone.setAttribute('width', `${marker.width}`);
|
|
@@ -920,18 +990,21 @@ let CreateConnectionMarkersExecution = class CreateConnectionMarkersExecution {
|
|
|
920
990
|
markerElement.append(clone);
|
|
921
991
|
element.append(markerElement);
|
|
922
992
|
});
|
|
923
|
-
|
|
993
|
+
const defs = fConnection.fDefs();
|
|
994
|
+
if (defs) {
|
|
995
|
+
defs.nativeElement.innerHTML = element.innerHTML;
|
|
996
|
+
}
|
|
924
997
|
this.makeSafariCompatible(fConnection);
|
|
925
998
|
}
|
|
926
999
|
getMarkers(fConnection) {
|
|
927
|
-
return this.
|
|
1000
|
+
return this._store.fMarkers.filter((x) => fConnection.hostElement.contains(x.hostElement));
|
|
928
1001
|
}
|
|
929
1002
|
// Safari does not support markers on path elements if markers are defined after the path element
|
|
930
1003
|
makeSafariCompatible(fConnection) {
|
|
931
|
-
fConnection.fPath.hostElement.replaceWith(fConnection.fPath.hostElement);
|
|
1004
|
+
fConnection.fPath().hostElement.replaceWith(fConnection.fPath().hostElement);
|
|
932
1005
|
}
|
|
933
1006
|
createMarkerElement(marker, fConnectionId) {
|
|
934
|
-
const markerElement = createSVGElement$1('marker', this.
|
|
1007
|
+
const markerElement = createSVGElement$1('marker', this._browser);
|
|
935
1008
|
markerElement.setAttribute('id', normalizeDomElementId(marker.type + '-' + fConnectionId));
|
|
936
1009
|
markerElement.setAttribute('markerHeight', `${marker.height}`);
|
|
937
1010
|
markerElement.setAttribute('markerWidth', `${marker.width}`);
|
|
@@ -941,7 +1014,7 @@ let CreateConnectionMarkersExecution = class CreateConnectionMarkersExecution {
|
|
|
941
1014
|
markerElement.setAttribute('markerUnits', `${marker.markerUnits}`);
|
|
942
1015
|
return markerElement;
|
|
943
1016
|
}
|
|
944
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionMarkersExecution, deps: [
|
|
1017
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionMarkersExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
945
1018
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionMarkersExecution });
|
|
946
1019
|
};
|
|
947
1020
|
CreateConnectionMarkersExecution = __decorate([
|
|
@@ -949,7 +1022,7 @@ CreateConnectionMarkersExecution = __decorate([
|
|
|
949
1022
|
], CreateConnectionMarkersExecution);
|
|
950
1023
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionMarkersExecution, decorators: [{
|
|
951
1024
|
type: Injectable
|
|
952
|
-
}]
|
|
1025
|
+
}] });
|
|
953
1026
|
function createSVGElement$1(tag, fBrowser) {
|
|
954
1027
|
return fBrowser.document.createElementNS('http://www.w3.org/2000/svg', tag);
|
|
955
1028
|
}
|
|
@@ -1147,7 +1220,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1147
1220
|
const F_SELECTED_CLASS = 'f-selected';
|
|
1148
1221
|
function mixinChangeSelection(base) {
|
|
1149
1222
|
return class extends base {
|
|
1150
|
-
fId = '';
|
|
1223
|
+
fId = signal('');
|
|
1151
1224
|
fSelectionDisabled = false;
|
|
1152
1225
|
unmarkAsSelected() {
|
|
1153
1226
|
this.unmarkChildrenAsSelected?.();
|
|
@@ -1244,7 +1317,7 @@ class FGroupDirective extends FNodeBase {
|
|
|
1244
1317
|
fBrowser;
|
|
1245
1318
|
_destroyRef = inject(DestroyRef);
|
|
1246
1319
|
_fMediator = inject(FMediator);
|
|
1247
|
-
fId = `f-group-${uniqueId$b++}
|
|
1320
|
+
fId = input(`f-group-${uniqueId$b++}`, { alias: 'fGroupId' });
|
|
1248
1321
|
fParentId = null;
|
|
1249
1322
|
set position(value) {
|
|
1250
1323
|
if (!PointExtensions.isEqual(this._position, value)) {
|
|
@@ -1322,7 +1395,7 @@ class FGroupDirective extends FNodeBase {
|
|
|
1322
1395
|
this._fMediator.execute(new RemoveNodeFromStoreRequest(this));
|
|
1323
1396
|
}
|
|
1324
1397
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FGroupDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1325
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1398
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: FGroupDirective, selector: "[fGroup]", inputs: { fId: { classPropertyName: "fId", publicName: "fGroupId", isSignal: true, isRequired: false, transformFunction: null }, fParentId: { classPropertyName: "fParentId", publicName: "fGroupParentId", isSignal: false, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "fGroupPosition", isSignal: false, isRequired: false, transformFunction: null }, rotate: { classPropertyName: "rotate", publicName: "fGroupRotate", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "fGroupSize", isSignal: false, isRequired: false, transformFunction: null }, fDraggingDisabled: { classPropertyName: "fDraggingDisabled", publicName: "fGroupDraggingDisabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, fSelectionDisabled: { classPropertyName: "fSelectionDisabled", publicName: "fGroupSelectionDisabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, fIncludePadding: { classPropertyName: "fIncludePadding", publicName: "fIncludePadding", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, fConnectOnNode: { classPropertyName: "fConnectOnNode", publicName: "fConnectOnNode", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, fMinimapClass: { classPropertyName: "fMinimapClass", publicName: "fMinimapClass", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { positionChange: "fGroupPositionChange", rotateChange: "fGroupRotateChange", sizeChange: "fGroupSizeChange" }, host: { properties: { "attr.data-f-group-id": "fId()", "class.f-group-dragging-disabled": "fDraggingDisabled", "class.f-group-selection-disabled": "fSelectionDisabled" }, classAttribute: "f-group f-component" }, providers: [
|
|
1326
1399
|
{ provide: F_NODE, useExisting: FGroupDirective }
|
|
1327
1400
|
], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0 });
|
|
1328
1401
|
}
|
|
@@ -1332,7 +1405,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1332
1405
|
selector: "[fGroup]",
|
|
1333
1406
|
exportAs: "fComponent",
|
|
1334
1407
|
host: {
|
|
1335
|
-
'[attr.data-f-group-id]': 'fId',
|
|
1408
|
+
'[attr.data-f-group-id]': 'fId()',
|
|
1336
1409
|
class: "f-group f-component",
|
|
1337
1410
|
'[class.f-group-dragging-disabled]': 'fDraggingDisabled',
|
|
1338
1411
|
'[class.f-group-selection-disabled]': 'fSelectionDisabled',
|
|
@@ -1341,10 +1414,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1341
1414
|
{ provide: F_NODE, useExisting: FGroupDirective }
|
|
1342
1415
|
],
|
|
1343
1416
|
}]
|
|
1344
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.BrowserService }], propDecorators: {
|
|
1345
|
-
type: Input,
|
|
1346
|
-
args: ['fGroupId']
|
|
1347
|
-
}], fParentId: [{
|
|
1417
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.BrowserService }], propDecorators: { fParentId: [{
|
|
1348
1418
|
type: Input,
|
|
1349
1419
|
args: ['fGroupParentId']
|
|
1350
1420
|
}], position: [{
|
|
@@ -1387,7 +1457,7 @@ class FNodeDirective extends FNodeBase {
|
|
|
1387
1457
|
fBrowser;
|
|
1388
1458
|
_destroyRef = inject(DestroyRef);
|
|
1389
1459
|
_fMediator = inject(FMediator);
|
|
1390
|
-
fId = `f-node-${uniqueId$a++}
|
|
1460
|
+
fId = input(`f-node-${uniqueId$a++}`, { alias: 'fNodeId' });
|
|
1391
1461
|
fParentId = null;
|
|
1392
1462
|
set position(value) {
|
|
1393
1463
|
if (!PointExtensions.isEqual(this._position, value)) {
|
|
@@ -1466,7 +1536,7 @@ class FNodeDirective extends FNodeBase {
|
|
|
1466
1536
|
this._fMediator.execute(new RemoveNodeFromStoreRequest(this));
|
|
1467
1537
|
}
|
|
1468
1538
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FNodeDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1469
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1539
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: FNodeDirective, selector: "[fNode]", inputs: { fId: { classPropertyName: "fId", publicName: "fNodeId", isSignal: true, isRequired: false, transformFunction: null }, fParentId: { classPropertyName: "fParentId", publicName: "fNodeParentId", isSignal: false, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "fNodePosition", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "fNodeSize", isSignal: false, isRequired: false, transformFunction: null }, rotate: { classPropertyName: "rotate", publicName: "fNodeRotate", isSignal: false, isRequired: false, transformFunction: null }, fDraggingDisabled: { classPropertyName: "fDraggingDisabled", publicName: "fNodeDraggingDisabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, fSelectionDisabled: { classPropertyName: "fSelectionDisabled", publicName: "fNodeSelectionDisabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, fIncludePadding: { classPropertyName: "fIncludePadding", publicName: "fIncludePadding", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, fConnectOnNode: { classPropertyName: "fConnectOnNode", publicName: "fConnectOnNode", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, fMinimapClass: { classPropertyName: "fMinimapClass", publicName: "fMinimapClass", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { positionChange: "fNodePositionChange", rotateChange: "fNodeRotateChange", sizeChange: "fNodeSizeChange" }, host: { properties: { "attr.data-f-node-id": "fId()", "class.f-node-dragging-disabled": "fDraggingDisabled", "class.f-node-selection-disabled": "fSelectionDisabled" }, classAttribute: "f-node f-component" }, providers: [
|
|
1470
1540
|
{ provide: F_NODE, useExisting: FNodeDirective }
|
|
1471
1541
|
], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0 });
|
|
1472
1542
|
}
|
|
@@ -1476,7 +1546,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1476
1546
|
selector: "[fNode]",
|
|
1477
1547
|
exportAs: "fComponent",
|
|
1478
1548
|
host: {
|
|
1479
|
-
'[attr.data-f-node-id]': 'fId',
|
|
1549
|
+
'[attr.data-f-node-id]': 'fId()',
|
|
1480
1550
|
class: "f-node f-component",
|
|
1481
1551
|
'[class.f-node-dragging-disabled]': 'fDraggingDisabled',
|
|
1482
1552
|
'[class.f-node-selection-disabled]': 'fSelectionDisabled',
|
|
@@ -1485,10 +1555,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1485
1555
|
{ provide: F_NODE, useExisting: FNodeDirective }
|
|
1486
1556
|
],
|
|
1487
1557
|
}]
|
|
1488
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.BrowserService }], propDecorators: {
|
|
1489
|
-
type: Input,
|
|
1490
|
-
args: ['fNodeId']
|
|
1491
|
-
}], fParentId: [{
|
|
1558
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.BrowserService }], propDecorators: { fParentId: [{
|
|
1492
1559
|
type: Input,
|
|
1493
1560
|
args: ['fNodeParentId']
|
|
1494
1561
|
}], position: [{
|
|
@@ -1547,7 +1614,7 @@ class FNodeInputDirective extends FNodeInputBase {
|
|
|
1547
1614
|
disabled = false;
|
|
1548
1615
|
userFConnectableSide = EFConnectableSide.AUTO;
|
|
1549
1616
|
get fNodeId() {
|
|
1550
|
-
return this._fNode.fId;
|
|
1617
|
+
return this._fNode.fId();
|
|
1551
1618
|
}
|
|
1552
1619
|
get hostElement() {
|
|
1553
1620
|
return this._elementReference.nativeElement;
|
|
@@ -1641,7 +1708,7 @@ class FNodeOutletDirective extends FNodeOutletBase {
|
|
|
1641
1708
|
isConnectionFromOutlet = false;
|
|
1642
1709
|
canBeConnectedInputs = [];
|
|
1643
1710
|
get fNodeId() {
|
|
1644
|
-
return this._fNode.fId;
|
|
1711
|
+
return this._fNode.fId();
|
|
1645
1712
|
}
|
|
1646
1713
|
get hostElement() {
|
|
1647
1714
|
return this._elementReference.nativeElement;
|
|
@@ -1708,7 +1775,7 @@ class FNodeOutputDirective extends FNodeOutputBase {
|
|
|
1708
1775
|
isSelfConnectable = true;
|
|
1709
1776
|
canBeConnectedInputs = [];
|
|
1710
1777
|
get fNodeId() {
|
|
1711
|
-
return this._fNode.fId;
|
|
1778
|
+
return this._fNode.fId();
|
|
1712
1779
|
}
|
|
1713
1780
|
get hostElement() {
|
|
1714
1781
|
return this._elementReference.nativeElement;
|
|
@@ -1812,7 +1879,12 @@ class FBezierPathBuilder {
|
|
|
1812
1879
|
const targetAnglePoint = FBezierPathBuilder.getAnglePoint(targetSide, target, source, offset);
|
|
1813
1880
|
const path = `M ${source.x} ${source.y} C ${sourceAnglePoint.x} ${sourceAnglePoint.y}, ${targetAnglePoint.x} ${targetAnglePoint.y}, ${target.x + 0.0002} ${target.y + 0.0002}`;
|
|
1814
1881
|
const connectionCenter = new CalculateConnectionCenterHandler().handle(new CalculateConnectionCenterRequest([source, sourceAnglePoint, targetAnglePoint, target]));
|
|
1815
|
-
return {
|
|
1882
|
+
return {
|
|
1883
|
+
path,
|
|
1884
|
+
connectionCenter,
|
|
1885
|
+
penultimatePoint: targetAnglePoint,
|
|
1886
|
+
secondPoint: sourceAnglePoint,
|
|
1887
|
+
};
|
|
1816
1888
|
}
|
|
1817
1889
|
}
|
|
1818
1890
|
|
|
@@ -1829,7 +1901,8 @@ class FSegmentPathBuilder {
|
|
|
1829
1901
|
const { points, center } = this.getPathPoints(source, sourceSide, target, targetSide, request.offset);
|
|
1830
1902
|
const path = this.buildPath(points, request.radius);
|
|
1831
1903
|
const penultimatePoint = points.length > 1 ? points[points.length - 2] : source;
|
|
1832
|
-
|
|
1904
|
+
const secondPoint = points.length > 1 ? points[1] : target;
|
|
1905
|
+
return { path, connectionCenter: center, penultimatePoint, secondPoint };
|
|
1833
1906
|
}
|
|
1834
1907
|
getPathPoints(source, sourceSide, target, targetSide, offset) {
|
|
1835
1908
|
const sourceDirection = CONNECTOR_SIDE_POINT[sourceSide];
|
|
@@ -1959,7 +2032,7 @@ class FStraightPathBuilder {
|
|
|
1959
2032
|
const { source, target } = request;
|
|
1960
2033
|
const path = `M ${source.x} ${source.y} L ${target.x + 0.0002} ${target.y + 0.0002}`;
|
|
1961
2034
|
const connectionCenter = new CalculateConnectionCenterHandler().handle(new CalculateConnectionCenterRequest([source, target]));
|
|
1962
|
-
return { path, connectionCenter, penultimatePoint: source };
|
|
2035
|
+
return { path, connectionCenter, penultimatePoint: source, secondPoint: target };
|
|
1963
2036
|
}
|
|
1964
2037
|
}
|
|
1965
2038
|
|
|
@@ -1991,7 +2064,7 @@ class FConnectionTextPathDirective {
|
|
|
1991
2064
|
base;
|
|
1992
2065
|
fBrowser;
|
|
1993
2066
|
get linkToConnection() {
|
|
1994
|
-
return F_CONNECTION_IDENTIFIERS.linkToConnection(this.base.fId + this.base.fOutputId + this.base.fInputId);
|
|
2067
|
+
return F_CONNECTION_IDENTIFIERS.linkToConnection(this.base.fId() + this.base.fOutputId + this.base.fInputId);
|
|
1995
2068
|
}
|
|
1996
2069
|
get hostElement() {
|
|
1997
2070
|
return this.elementReference.nativeElement;
|
|
@@ -2062,7 +2135,7 @@ class FConnectionTextComponent {
|
|
|
2062
2135
|
elementReference;
|
|
2063
2136
|
base;
|
|
2064
2137
|
get textId() {
|
|
2065
|
-
return F_CONNECTION_IDENTIFIERS.textId(this.base.fId + this.base.fOutputId + this.base.fInputId);
|
|
2138
|
+
return F_CONNECTION_IDENTIFIERS.textId(this.base.fId() + this.base.fOutputId + this.base.fInputId);
|
|
2066
2139
|
}
|
|
2067
2140
|
get hostElement() {
|
|
2068
2141
|
return this.elementReference.nativeElement;
|
|
@@ -2130,7 +2203,7 @@ const F_CSS_CLASS = {
|
|
|
2130
2203
|
OUTPUT_NOT_CONNECTABLE: 'f-node-output-not-connectable',
|
|
2131
2204
|
INPUT_CONNECTED: 'f-node-input-connected',
|
|
2132
2205
|
INPUT_NOT_CONNECTABLE: 'f-node-input-not-connectable',
|
|
2133
|
-
|
|
2206
|
+
CONNECTABLE: 'f-connector-connectable',
|
|
2134
2207
|
},
|
|
2135
2208
|
CONNECTION: {
|
|
2136
2209
|
DRAG_HANDLE: 'f-connection-drag-handle',
|
|
@@ -2211,7 +2284,7 @@ class FConnectionGradientComponent {
|
|
|
2211
2284
|
elementReference;
|
|
2212
2285
|
base;
|
|
2213
2286
|
get gradientId() {
|
|
2214
|
-
return F_CONNECTION_IDENTIFIERS.gradientId(this.base.fId + this.base.fOutputId + this.base.fInputId);
|
|
2287
|
+
return F_CONNECTION_IDENTIFIERS.gradientId(this.base.fId() + this.base.fOutputId + this.base.fInputId);
|
|
2215
2288
|
}
|
|
2216
2289
|
get hostElement() {
|
|
2217
2290
|
return this.elementReference.nativeElement;
|
|
@@ -2231,8 +2304,8 @@ class FConnectionGradientComponent {
|
|
|
2231
2304
|
this.stop2Element.setAttribute('offset', '100%');
|
|
2232
2305
|
}
|
|
2233
2306
|
updateGradient() {
|
|
2234
|
-
this.setFromColor(this.base.fStartColor);
|
|
2235
|
-
this.setToColor(this.base.fEndColor);
|
|
2307
|
+
this.setFromColor(this.base.fStartColor());
|
|
2308
|
+
this.setToColor(this.base.fEndColor());
|
|
2236
2309
|
}
|
|
2237
2310
|
setFromColor(color) {
|
|
2238
2311
|
this.stop1Element.setAttribute('stop-color', color || 'transparent');
|
|
@@ -2285,13 +2358,13 @@ class FConnectionPathComponent {
|
|
|
2285
2358
|
elementReference;
|
|
2286
2359
|
base;
|
|
2287
2360
|
get fPathId() {
|
|
2288
|
-
return this.base.fId;
|
|
2361
|
+
return this.base.fId();
|
|
2289
2362
|
}
|
|
2290
2363
|
get linkToGradient() {
|
|
2291
|
-
return F_CONNECTION_IDENTIFIERS.linkToGradient(this.base.fId + this.base.fOutputId + this.base.fInputId);
|
|
2364
|
+
return F_CONNECTION_IDENTIFIERS.linkToGradient(this.base.fId() + this.base.fOutputId + this.base.fInputId);
|
|
2292
2365
|
}
|
|
2293
2366
|
get attrConnectionId() {
|
|
2294
|
-
return F_CONNECTION_IDENTIFIERS.connectionId(this.base.fId + this.base.fOutputId + this.base.fInputId);
|
|
2367
|
+
return F_CONNECTION_IDENTIFIERS.connectionId(this.base.fId() + this.base.fOutputId + this.base.fInputId);
|
|
2295
2368
|
}
|
|
2296
2369
|
get hostElement() {
|
|
2297
2370
|
return this.elementReference.nativeElement;
|
|
@@ -2307,12 +2380,12 @@ class FConnectionPathComponent {
|
|
|
2307
2380
|
this.hostElement.setAttribute("d", `${path}`);
|
|
2308
2381
|
}
|
|
2309
2382
|
select() {
|
|
2310
|
-
this.hostElement.setAttribute('marker-start', `url(#${getMarkerSelectedStartId(this.base.fId)})`);
|
|
2311
|
-
this.hostElement.setAttribute('marker-end', `url(#${getMarkerSelectedEndId(this.base.fId)})`);
|
|
2383
|
+
this.hostElement.setAttribute('marker-start', `url(#${getMarkerSelectedStartId(this.base.fId())})`);
|
|
2384
|
+
this.hostElement.setAttribute('marker-end', `url(#${getMarkerSelectedEndId(this.base.fId())})`);
|
|
2312
2385
|
}
|
|
2313
2386
|
deselect() {
|
|
2314
|
-
this.hostElement.setAttribute('marker-start', `url(#${getMarkerStartId(this.base.fId)})`);
|
|
2315
|
-
this.hostElement.setAttribute('marker-end', `url(#${getMarkerEndId(this.base.fId)})`);
|
|
2387
|
+
this.hostElement.setAttribute('marker-start', `url(#${getMarkerStartId(this.base.fId())})`);
|
|
2388
|
+
this.hostElement.setAttribute('marker-end', `url(#${getMarkerEndId(this.base.fId())})`);
|
|
2316
2389
|
}
|
|
2317
2390
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionPathComponent, deps: [{ token: i0.ElementRef }, { token: F_CONNECTION }], target: i0.ɵɵFactoryTarget.Component });
|
|
2318
2391
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FConnectionPathComponent, selector: "path[f-connection-path]", host: { properties: { "attr.id": "attrConnectionId", "attr.data-f-path-id": "fPathId", "attr.stroke": "linkToGradient" }, classAttribute: "f-component f-connection-path" }, providers: [{ provide: CONNECTION_PATH, useExisting: FConnectionPathComponent }], ngImport: i0, template: '', isInline: true, styles: [":host{fill:none;pointer-events:stroke}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -2334,7 +2407,7 @@ class FConnectionSelectionComponent {
|
|
|
2334
2407
|
elementReference;
|
|
2335
2408
|
base;
|
|
2336
2409
|
get connectionForSelectionId() {
|
|
2337
|
-
return F_CONNECTION_IDENTIFIERS.connectionForSelectionId(this.base.fId + this.base.fOutputId + this.base.fInputId);
|
|
2410
|
+
return F_CONNECTION_IDENTIFIERS.connectionForSelectionId(this.base.fId() + this.base.fOutputId + this.base.fInputId);
|
|
2338
2411
|
}
|
|
2339
2412
|
get hostElement() {
|
|
2340
2413
|
return this.elementReference.nativeElement;
|
|
@@ -2402,14 +2475,16 @@ class FConnectionBase extends MIXIN_BASE {
|
|
|
2402
2475
|
cFactory;
|
|
2403
2476
|
path = '';
|
|
2404
2477
|
line = LineExtensions.initialize();
|
|
2478
|
+
fReassignableStart = signal(false);
|
|
2405
2479
|
penultimatePoint = PointExtensions.initialize();
|
|
2480
|
+
secondPoint = PointExtensions.initialize();
|
|
2406
2481
|
constructor(elementReference, cFactory) {
|
|
2407
2482
|
super(elementReference.nativeElement);
|
|
2408
2483
|
this.cFactory = cFactory;
|
|
2409
2484
|
}
|
|
2410
2485
|
initialize() {
|
|
2411
|
-
this.fPath.initialize();
|
|
2412
|
-
this.fGradient.initialize();
|
|
2486
|
+
this.fPath().initialize();
|
|
2487
|
+
this.fGradient().initialize();
|
|
2413
2488
|
this.redraw();
|
|
2414
2489
|
}
|
|
2415
2490
|
isContains(element) {
|
|
@@ -2420,7 +2495,8 @@ class FConnectionBase extends MIXIN_BASE {
|
|
|
2420
2495
|
const pathResult = this.getPathResult(point1, sourceSide, point2, targetSide);
|
|
2421
2496
|
this.path = pathResult.path;
|
|
2422
2497
|
this.penultimatePoint = pathResult.penultimatePoint || point1;
|
|
2423
|
-
this.
|
|
2498
|
+
this.secondPoint = pathResult.secondPoint || point2;
|
|
2499
|
+
this.fConnectionCenter()?.nativeElement?.setAttribute('style', this.getTransform(pathResult.connectionCenter));
|
|
2424
2500
|
}
|
|
2425
2501
|
getPathResult(source, sourceSide, target, targetSide) {
|
|
2426
2502
|
const radius = this.fRadius > 0 ? this.fRadius : 0;
|
|
@@ -2434,17 +2510,18 @@ class FConnectionBase extends MIXIN_BASE {
|
|
|
2434
2510
|
return `position: absolute; pointerEvents: all; transform: translate(-50%, -50%); left: ${position.x}px; top: ${position.y}px`;
|
|
2435
2511
|
}
|
|
2436
2512
|
markChildrenAsSelected() {
|
|
2437
|
-
this.fPath.select();
|
|
2513
|
+
this.fPath().select();
|
|
2438
2514
|
}
|
|
2439
2515
|
unmarkChildrenAsSelected() {
|
|
2440
|
-
this.fPath.deselect();
|
|
2516
|
+
this.fPath().deselect();
|
|
2441
2517
|
}
|
|
2442
2518
|
redraw() {
|
|
2443
|
-
this.fPath.setPath(this.path);
|
|
2444
|
-
this.fSelection.setPath(this.path);
|
|
2445
|
-
this.fGradient.redraw(this.line);
|
|
2446
|
-
this.
|
|
2447
|
-
this.
|
|
2519
|
+
this.fPath().setPath(this.path);
|
|
2520
|
+
this.fSelection().setPath(this.path);
|
|
2521
|
+
this.fGradient().redraw(this.line);
|
|
2522
|
+
this.fDragHandleEnd().redraw(this.penultimatePoint, this.line.point2);
|
|
2523
|
+
this.fDragHandleStart()?.redraw(this.secondPoint, this.line.point1);
|
|
2524
|
+
this.fTextComponent().redraw(this.line);
|
|
2448
2525
|
}
|
|
2449
2526
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionBase, deps: [{ token: i0.ElementRef }, { token: FConnectionFactory }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2450
2527
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: FConnectionBase, usesInheritance: true, ngImport: i0 });
|
|
@@ -2480,11 +2557,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2480
2557
|
|
|
2481
2558
|
let uniqueId$6 = 0;
|
|
2482
2559
|
class FConnectionForCreateComponent extends FConnectionBase {
|
|
2483
|
-
fId = `f-connection-for-create-${uniqueId$6++}
|
|
2560
|
+
fId = signal(`f-connection-for-create-${uniqueId$6++}`);
|
|
2484
2561
|
fText = '';
|
|
2485
2562
|
fTextStartOffset = '';
|
|
2486
|
-
fStartColor = 'black';
|
|
2487
|
-
fEndColor = 'black';
|
|
2563
|
+
fStartColor = input('black');
|
|
2564
|
+
fEndColor = input('black');
|
|
2488
2565
|
fOutputId;
|
|
2489
2566
|
fInputId;
|
|
2490
2567
|
fRadius = 8;
|
|
@@ -2493,16 +2570,17 @@ class FConnectionForCreateComponent extends FConnectionBase {
|
|
|
2493
2570
|
fType = EFConnectionType.STRAIGHT;
|
|
2494
2571
|
fDraggingDisabled = false;
|
|
2495
2572
|
fSelectionDisabled = false;
|
|
2496
|
-
fDefs;
|
|
2497
|
-
fPath;
|
|
2498
|
-
fGradient;
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2573
|
+
fDefs = viewChild.required('defs');
|
|
2574
|
+
fPath = viewChild.required(CONNECTION_PATH);
|
|
2575
|
+
fGradient = viewChild.required(CONNECTION_GRADIENT);
|
|
2576
|
+
fDragHandleStart = viewChild(FConnectionDragHandleStartComponent);
|
|
2577
|
+
fDragHandleEnd = viewChild.required(FConnectionDragHandleEndComponent);
|
|
2578
|
+
fSelection = viewChild.required(FConnectionSelectionComponent);
|
|
2579
|
+
fTextComponent = viewChild.required(CONNECTION_TEXT);
|
|
2580
|
+
fConnectionCenter = viewChild('fConnectionCenter');
|
|
2581
|
+
fConnectionCenters = contentChildren(FConnectionCenterDirective, { descendants: true });
|
|
2504
2582
|
get boundingElement() {
|
|
2505
|
-
return this.fPath.hostElement;
|
|
2583
|
+
return this.fPath().hostElement;
|
|
2506
2584
|
}
|
|
2507
2585
|
_fMediator = inject(FMediator);
|
|
2508
2586
|
constructor(elementReference, fConnectionFactory) {
|
|
@@ -2521,18 +2599,14 @@ class FConnectionForCreateComponent extends FConnectionBase {
|
|
|
2521
2599
|
this._fMediator.execute(new RemoveConnectionForCreateFromStoreRequest());
|
|
2522
2600
|
}
|
|
2523
2601
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionForCreateComponent, deps: [{ token: i0.ElementRef }, { token: FConnectionFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
2524
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2602
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FConnectionForCreateComponent, selector: "f-connection-for-create", inputs: { fStartColor: { classPropertyName: "fStartColor", publicName: "fStartColor", isSignal: true, isRequired: false, transformFunction: null }, fEndColor: { classPropertyName: "fEndColor", publicName: "fEndColor", 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 } }, host: { classAttribute: "f-component f-connection f-connection-for-create" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionForCreateComponent }], queries: [{ propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, 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, 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\n [attr.d]=\"path\">\n </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", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center{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 });
|
|
2525
2603
|
}
|
|
2526
2604
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionForCreateComponent, decorators: [{
|
|
2527
2605
|
type: Component,
|
|
2528
2606
|
args: [{ selector: "f-connection-for-create", changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2529
2607
|
class: "f-component f-connection f-connection-for-create"
|
|
2530
|
-
}, providers: [{ provide: F_CONNECTION, useExisting: FConnectionForCreateComponent }], 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\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle-end></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\"
|
|
2531
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }], propDecorators: {
|
|
2532
|
-
type: Input
|
|
2533
|
-
}], fEndColor: [{
|
|
2534
|
-
type: Input
|
|
2535
|
-
}], fRadius: [{
|
|
2608
|
+
}, providers: [{ provide: F_CONNECTION, useExisting: FConnectionForCreateComponent }], 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\n [attr.d]=\"path\">\n </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", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center{pointer-events:all}\n"] }]
|
|
2609
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }], propDecorators: { fRadius: [{
|
|
2536
2610
|
type: Input,
|
|
2537
2611
|
args: [{ transform: numberAttribute }]
|
|
2538
2612
|
}], fOffset: [{
|
|
@@ -2543,57 +2617,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2543
2617
|
args: [{ transform: (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior) }]
|
|
2544
2618
|
}], fType: [{
|
|
2545
2619
|
type: Input
|
|
2546
|
-
}], fDefs: [{
|
|
2547
|
-
type: ViewChild,
|
|
2548
|
-
args: ['defs', { static: true }]
|
|
2549
|
-
}], fPath: [{
|
|
2550
|
-
type: ViewChild,
|
|
2551
|
-
args: [CONNECTION_PATH, { static: true }]
|
|
2552
|
-
}], fGradient: [{
|
|
2553
|
-
type: ViewChild,
|
|
2554
|
-
args: [CONNECTION_GRADIENT, { static: true }]
|
|
2555
|
-
}], fDragHandle: [{
|
|
2556
|
-
type: ViewChild,
|
|
2557
|
-
args: [FConnectionDragHandleEndComponent, { static: true }]
|
|
2558
|
-
}], fSelection: [{
|
|
2559
|
-
type: ViewChild,
|
|
2560
|
-
args: [FConnectionSelectionComponent, { static: true }]
|
|
2561
|
-
}], fTextComponent: [{
|
|
2562
|
-
type: ViewChild,
|
|
2563
|
-
args: [CONNECTION_TEXT, { static: true }]
|
|
2564
|
-
}], fConnectionCenter: [{
|
|
2565
|
-
type: ViewChild,
|
|
2566
|
-
args: ['fConnectionCenter', { static: false }]
|
|
2567
|
-
}], fConnectionCenters: [{
|
|
2568
|
-
type: ContentChildren,
|
|
2569
|
-
args: [FConnectionCenterDirective, { descendants: true }]
|
|
2570
2620
|
}] } });
|
|
2571
2621
|
|
|
2572
2622
|
let uniqueId$5 = 0;
|
|
2573
2623
|
class FConnectionComponent extends FConnectionBase {
|
|
2574
|
-
fId = `f-connection-${uniqueId$5++}
|
|
2624
|
+
fId = input(`f-connection-${uniqueId$5++}`, { alias: 'fConnectionId' });
|
|
2575
2625
|
fText = '';
|
|
2576
2626
|
fTextStartOffset = '';
|
|
2577
|
-
fStartColor = 'black';
|
|
2578
|
-
fEndColor = 'black';
|
|
2627
|
+
fStartColor = input('black');
|
|
2628
|
+
fEndColor = input('black');
|
|
2579
2629
|
fOutputId = '';
|
|
2580
2630
|
fInputId = '';
|
|
2581
2631
|
fRadius = 8;
|
|
2582
2632
|
fOffset = 12;
|
|
2583
2633
|
fBehavior = EFConnectionBehavior.FIXED;
|
|
2584
2634
|
fType = EFConnectionType.STRAIGHT;
|
|
2635
|
+
fReassignableStart = input(false);
|
|
2585
2636
|
fDraggingDisabled = false;
|
|
2586
2637
|
fSelectionDisabled = false;
|
|
2587
|
-
fDefs;
|
|
2588
|
-
fPath;
|
|
2589
|
-
fGradient;
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2638
|
+
fDefs = viewChild.required('defs');
|
|
2639
|
+
fPath = viewChild.required(CONNECTION_PATH);
|
|
2640
|
+
fGradient = viewChild.required(CONNECTION_GRADIENT);
|
|
2641
|
+
fDragHandleStart = viewChild(FConnectionDragHandleStartComponent);
|
|
2642
|
+
fDragHandleEnd = viewChild.required(FConnectionDragHandleEndComponent);
|
|
2643
|
+
fSelection = viewChild.required(FConnectionSelectionComponent);
|
|
2644
|
+
fTextComponent = viewChild.required(CONNECTION_TEXT);
|
|
2645
|
+
fConnectionCenter = viewChild('fConnectionCenter');
|
|
2646
|
+
fConnectionCenters = contentChildren(FConnectionCenterDirective, { descendants: true });
|
|
2595
2647
|
get boundingElement() {
|
|
2596
|
-
return this.fPath.hostElement;
|
|
2648
|
+
return this.fPath().hostElement;
|
|
2597
2649
|
}
|
|
2598
2650
|
_fMediator = inject(FMediator);
|
|
2599
2651
|
constructor(elementReference, fConnectionFactory) {
|
|
@@ -2609,27 +2661,20 @@ class FConnectionComponent extends FConnectionBase {
|
|
|
2609
2661
|
this._fMediator.execute(new RemoveConnectionFromStoreRequest(this));
|
|
2610
2662
|
}
|
|
2611
2663
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionComponent, deps: [{ token: i0.ElementRef }, { token: FConnectionFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
2612
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2664
|
+
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 }, fStartColor: { classPropertyName: "fStartColor", publicName: "fStartColor", isSignal: true, isRequired: false, transformFunction: null }, fEndColor: { classPropertyName: "fEndColor", publicName: "fEndColor", isSignal: true, isRequired: false, transformFunction: null }, fOutputId: { classPropertyName: "fOutputId", publicName: "fOutputId", isSignal: false, isRequired: false, transformFunction: null }, fInputId: { classPropertyName: "fInputId", publicName: "fInputId", isSignal: false, 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 }, fReassignableStart: { classPropertyName: "fReassignableStart", publicName: "fReassignableStart", isSignal: true, isRequired: false, transformFunction: null }, fDraggingDisabled: { classPropertyName: "fDraggingDisabled", publicName: "fReassignDisabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, fSelectionDisabled: { classPropertyName: "fSelectionDisabled", publicName: "fSelectionDisabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute } }, 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 }], queries: [{ propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, 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 }], exportAs: ["fComponent"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"overflow: visible; display: block; vertical-align: middle;\">\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", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center{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 });
|
|
2613
2665
|
}
|
|
2614
2666
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectionComponent, decorators: [{
|
|
2615
2667
|
type: Component,
|
|
2616
2668
|
args: [{ selector: "f-connection", exportAs: 'fComponent', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2617
|
-
'[attr.id]': 'fId',
|
|
2669
|
+
'[attr.id]': 'fId()',
|
|
2618
2670
|
class: "f-component f-connection",
|
|
2619
2671
|
'[class.f-connection-selection-disabled]': 'fSelectionDisabled',
|
|
2620
2672
|
'[class.f-connection-reassign-disabled]': 'fDraggingDisabled',
|
|
2621
|
-
}, providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }], template: "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"overflow: visible; display: block; vertical-align: middle;\">\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 <circle f-connection-drag-handle-end></circle>\n </g>\n <text f-connection-text></text>\n </g>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\"
|
|
2622
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }], propDecorators: {
|
|
2623
|
-
type: Input,
|
|
2624
|
-
args: ['fConnectionId']
|
|
2625
|
-
}], fText: [{
|
|
2673
|
+
}, providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }], template: "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"overflow: visible; display: block; vertical-align: middle;\">\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", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center{pointer-events:all}\n"] }]
|
|
2674
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }], propDecorators: { fText: [{
|
|
2626
2675
|
type: Input
|
|
2627
2676
|
}], fTextStartOffset: [{
|
|
2628
2677
|
type: Input
|
|
2629
|
-
}], fStartColor: [{
|
|
2630
|
-
type: Input
|
|
2631
|
-
}], fEndColor: [{
|
|
2632
|
-
type: Input
|
|
2633
2678
|
}], fOutputId: [{
|
|
2634
2679
|
type: Input
|
|
2635
2680
|
}], fInputId: [{
|
|
@@ -2651,30 +2696,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2651
2696
|
}], fSelectionDisabled: [{
|
|
2652
2697
|
type: Input,
|
|
2653
2698
|
args: [{ transform: booleanAttribute }]
|
|
2654
|
-
}], fDefs: [{
|
|
2655
|
-
type: ViewChild,
|
|
2656
|
-
args: ['defs', { static: true }]
|
|
2657
|
-
}], fPath: [{
|
|
2658
|
-
type: ViewChild,
|
|
2659
|
-
args: [CONNECTION_PATH, { static: true }]
|
|
2660
|
-
}], fGradient: [{
|
|
2661
|
-
type: ViewChild,
|
|
2662
|
-
args: [CONNECTION_GRADIENT, { static: true }]
|
|
2663
|
-
}], fDragHandle: [{
|
|
2664
|
-
type: ViewChild,
|
|
2665
|
-
args: [FConnectionDragHandleEndComponent, { static: true }]
|
|
2666
|
-
}], fSelection: [{
|
|
2667
|
-
type: ViewChild,
|
|
2668
|
-
args: [FConnectionSelectionComponent, { static: true }]
|
|
2669
|
-
}], fTextComponent: [{
|
|
2670
|
-
type: ViewChild,
|
|
2671
|
-
args: [CONNECTION_TEXT, { static: true }]
|
|
2672
|
-
}], fConnectionCenter: [{
|
|
2673
|
-
type: ViewChild,
|
|
2674
|
-
args: ['fConnectionCenter', { static: false }]
|
|
2675
|
-
}], fConnectionCenters: [{
|
|
2676
|
-
type: ContentChildren,
|
|
2677
|
-
args: [FConnectionCenterDirective, { descendants: true }]
|
|
2678
2699
|
}] } });
|
|
2679
2700
|
|
|
2680
2701
|
var EFMarkerType;
|
|
@@ -2750,11 +2771,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2750
2771
|
|
|
2751
2772
|
let uniqueId$4 = 0;
|
|
2752
2773
|
class FSnapConnectionComponent extends FConnectionBase {
|
|
2753
|
-
fId = `f-snap-connection-${uniqueId$4++}
|
|
2774
|
+
fId = signal(`f-snap-connection-${uniqueId$4++}`);
|
|
2754
2775
|
fText = '';
|
|
2755
2776
|
fTextStartOffset = '';
|
|
2756
|
-
fStartColor = 'black';
|
|
2757
|
-
fEndColor = 'black';
|
|
2777
|
+
fStartColor = input('black');
|
|
2778
|
+
fEndColor = input('black');
|
|
2758
2779
|
fSnapThreshold = 20;
|
|
2759
2780
|
fOutputId;
|
|
2760
2781
|
fInputId;
|
|
@@ -2764,16 +2785,17 @@ class FSnapConnectionComponent extends FConnectionBase {
|
|
|
2764
2785
|
fType = EFConnectionType.STRAIGHT;
|
|
2765
2786
|
fDraggingDisabled = false;
|
|
2766
2787
|
fSelectionDisabled = false;
|
|
2767
|
-
fDefs;
|
|
2768
|
-
fPath;
|
|
2769
|
-
fGradient;
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2788
|
+
fDefs = viewChild.required('defs');
|
|
2789
|
+
fPath = viewChild.required(CONNECTION_PATH);
|
|
2790
|
+
fGradient = viewChild.required(CONNECTION_GRADIENT);
|
|
2791
|
+
fDragHandleStart = viewChild(FConnectionDragHandleStartComponent);
|
|
2792
|
+
fDragHandleEnd = viewChild.required(FConnectionDragHandleEndComponent);
|
|
2793
|
+
fSelection = viewChild.required(FConnectionSelectionComponent);
|
|
2794
|
+
fTextComponent = viewChild.required(CONNECTION_TEXT);
|
|
2795
|
+
fConnectionCenter = viewChild('fConnectionCenter');
|
|
2796
|
+
fConnectionCenters = contentChildren(FConnectionCenterDirective, { descendants: true });
|
|
2775
2797
|
get boundingElement() {
|
|
2776
|
-
return this.fPath.hostElement;
|
|
2798
|
+
return this.fPath().hostElement;
|
|
2777
2799
|
}
|
|
2778
2800
|
_fMediator = inject(FMediator);
|
|
2779
2801
|
constructor(elementReference, fConnectionFactory) {
|
|
@@ -2792,18 +2814,14 @@ class FSnapConnectionComponent extends FConnectionBase {
|
|
|
2792
2814
|
this._fMediator.execute(new RemoveSnapConnectionFromStoreRequest());
|
|
2793
2815
|
}
|
|
2794
2816
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FSnapConnectionComponent, deps: [{ token: i0.ElementRef }, { token: FConnectionFactory }], target: i0.ɵɵFactoryTarget.Component });
|
|
2795
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2817
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FSnapConnectionComponent, selector: "f-snap-connection", inputs: { fStartColor: { classPropertyName: "fStartColor", publicName: "fStartColor", isSignal: true, isRequired: false, transformFunction: null }, fEndColor: { classPropertyName: "fEndColor", publicName: "fEndColor", isSignal: true, isRequired: false, transformFunction: null }, 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 } }, host: { classAttribute: "f-component f-connection f-snap-connection" }, providers: [{ provide: F_CONNECTION, useExisting: FSnapConnectionComponent }], queries: [{ propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, 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, 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\n [attr.d]=\"path\">\n </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", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center{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 });
|
|
2796
2818
|
}
|
|
2797
2819
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FSnapConnectionComponent, decorators: [{
|
|
2798
2820
|
type: Component,
|
|
2799
2821
|
args: [{ selector: "f-snap-connection", changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2800
2822
|
class: "f-component f-connection f-snap-connection"
|
|
2801
|
-
}, providers: [{ provide: F_CONNECTION, useExisting: FSnapConnectionComponent }], 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\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle-end></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\"
|
|
2802
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }], propDecorators: {
|
|
2803
|
-
type: Input
|
|
2804
|
-
}], fEndColor: [{
|
|
2805
|
-
type: Input
|
|
2806
|
-
}], fSnapThreshold: [{
|
|
2823
|
+
}, providers: [{ provide: F_CONNECTION, useExisting: FSnapConnectionComponent }], 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\n [attr.d]=\"path\">\n </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", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center{pointer-events:all}\n"] }]
|
|
2824
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }], propDecorators: { fSnapThreshold: [{
|
|
2807
2825
|
type: Input,
|
|
2808
2826
|
args: [{ transform: numberAttribute }]
|
|
2809
2827
|
}], fRadius: [{
|
|
@@ -2817,30 +2835,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2817
2835
|
args: [{ transform: (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior) }]
|
|
2818
2836
|
}], fType: [{
|
|
2819
2837
|
type: Input
|
|
2820
|
-
}], fDefs: [{
|
|
2821
|
-
type: ViewChild,
|
|
2822
|
-
args: ['defs', { static: true }]
|
|
2823
|
-
}], fPath: [{
|
|
2824
|
-
type: ViewChild,
|
|
2825
|
-
args: [CONNECTION_PATH, { static: true }]
|
|
2826
|
-
}], fGradient: [{
|
|
2827
|
-
type: ViewChild,
|
|
2828
|
-
args: [CONNECTION_GRADIENT, { static: true }]
|
|
2829
|
-
}], fDragHandle: [{
|
|
2830
|
-
type: ViewChild,
|
|
2831
|
-
args: [FConnectionDragHandleEndComponent, { static: true }]
|
|
2832
|
-
}], fSelection: [{
|
|
2833
|
-
type: ViewChild,
|
|
2834
|
-
args: [FConnectionSelectionComponent, { static: true }]
|
|
2835
|
-
}], fTextComponent: [{
|
|
2836
|
-
type: ViewChild,
|
|
2837
|
-
args: [CONNECTION_TEXT, { static: true }]
|
|
2838
|
-
}], fConnectionCenter: [{
|
|
2839
|
-
type: ViewChild,
|
|
2840
|
-
args: ['fConnectionCenter', { static: false }]
|
|
2841
|
-
}], fConnectionCenters: [{
|
|
2842
|
-
type: ContentChildren,
|
|
2843
|
-
args: [FConnectionCenterDirective, { descendants: true }]
|
|
2844
2838
|
}] } });
|
|
2845
2839
|
|
|
2846
2840
|
const F_CONNECTION_PROVIDERS = [
|
|
@@ -2858,6 +2852,11 @@ const F_CONNECTION_PROVIDERS = [
|
|
|
2858
2852
|
FSnapConnectionComponent
|
|
2859
2853
|
];
|
|
2860
2854
|
|
|
2855
|
+
/**
|
|
2856
|
+
* Floating behavior calculates the connection line
|
|
2857
|
+
* It constructs a line between the intersections of the connectors rectangles and line from the centers of the connector rectangles
|
|
2858
|
+
* @param payload
|
|
2859
|
+
*/
|
|
2861
2860
|
function floatingBehavior(payload) {
|
|
2862
2861
|
return _getIntersectionsLine(_fromRoundedRectIntersections(payload), _toRoundedRectIntersections(payload), payload);
|
|
2863
2862
|
}
|
|
@@ -2874,6 +2873,11 @@ function _getIntersectionsLine(from, to, payload) {
|
|
|
2874
2873
|
};
|
|
2875
2874
|
}
|
|
2876
2875
|
|
|
2876
|
+
/**
|
|
2877
|
+
* Fixed center behavior calculates the connection line
|
|
2878
|
+
* It constructs a line between the gravity centers of the connector rectangles
|
|
2879
|
+
* @param payload
|
|
2880
|
+
*/
|
|
2877
2881
|
function fixedCenterBehavior(payload) {
|
|
2878
2882
|
return {
|
|
2879
2883
|
point1: payload.outputRect.gravityCenter,
|
|
@@ -2881,6 +2885,11 @@ function fixedCenterBehavior(payload) {
|
|
|
2881
2885
|
};
|
|
2882
2886
|
}
|
|
2883
2887
|
|
|
2888
|
+
/**
|
|
2889
|
+
* Fixed outbound behavior calculates the connection line
|
|
2890
|
+
* It constructs a line between the specified sides of the output and input rectangles
|
|
2891
|
+
* @param payload
|
|
2892
|
+
*/
|
|
2884
2893
|
function fixedOutboundBehavior(payload) {
|
|
2885
2894
|
return {
|
|
2886
2895
|
point1: _getPosition(payload.outputRect, payload.outputSide === EFConnectableSide.AUTO ? EFConnectableSide.BOTTOM : payload.outputSide),
|
|
@@ -2902,6 +2911,9 @@ function _getPosition(rect, side) {
|
|
|
2902
2911
|
}
|
|
2903
2912
|
}
|
|
2904
2913
|
|
|
2914
|
+
/**
|
|
2915
|
+
* Execution that calculates the connection line based on the behavior.
|
|
2916
|
+
*/
|
|
2905
2917
|
let CalculateConnectionLineByBehaviorExecution = class CalculateConnectionLineByBehaviorExecution {
|
|
2906
2918
|
_handlers = {
|
|
2907
2919
|
[EFConnectionBehavior.FLOATING.toString()]: floatingBehavior,
|
|
@@ -2941,10 +2953,15 @@ class GetNormalizedPointRequest {
|
|
|
2941
2953
|
}
|
|
2942
2954
|
}
|
|
2943
2955
|
|
|
2956
|
+
/**
|
|
2957
|
+
* Execution that retrieves the normalized point of a position.
|
|
2958
|
+
* It calculates the point based on the position's transformation
|
|
2959
|
+
* and the canvas transformation.
|
|
2960
|
+
*/
|
|
2944
2961
|
let GetNormalizedPointExecution = class GetNormalizedPointExecution {
|
|
2945
|
-
|
|
2962
|
+
_store = inject(FComponentsStore);
|
|
2946
2963
|
get _transform() {
|
|
2947
|
-
return this.
|
|
2964
|
+
return this._store.fCanvas.transform;
|
|
2948
2965
|
}
|
|
2949
2966
|
// BrowserWindow
|
|
2950
2967
|
// +------------------------------------------+
|
|
@@ -2966,7 +2983,7 @@ let GetNormalizedPointExecution = class GetNormalizedPointExecution {
|
|
|
2966
2983
|
// Transform from the browser window to the canvas coordinates:
|
|
2967
2984
|
handle(request) {
|
|
2968
2985
|
return Point.fromPoint(request.position)
|
|
2969
|
-
.elementTransform(this.
|
|
2986
|
+
.elementTransform(this._store.flowHost)
|
|
2970
2987
|
.sub(this._transform.scaledPosition)
|
|
2971
2988
|
.sub(this._transform.position)
|
|
2972
2989
|
.div(this._transform.scale);
|
|
@@ -2981,11 +2998,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2981
2998
|
type: Injectable
|
|
2982
2999
|
}] });
|
|
2983
3000
|
|
|
3001
|
+
/**
|
|
3002
|
+
* Execution that retrieves the normalized rectangle of a connector.
|
|
3003
|
+
* It calculates the rectangle based on the element's position and size,
|
|
3004
|
+
* adjusting for the canvas transformation and element offsets.
|
|
3005
|
+
*/
|
|
2984
3006
|
let GetNormalizedConnectorRectExecution = class GetNormalizedConnectorRectExecution {
|
|
2985
|
-
|
|
2986
|
-
|
|
3007
|
+
_store = inject(FComponentsStore);
|
|
3008
|
+
_mediator = inject(FMediator);
|
|
2987
3009
|
get _transform() {
|
|
2988
|
-
return this.
|
|
3010
|
+
return this._store.fCanvas.transform;
|
|
2989
3011
|
}
|
|
2990
3012
|
handle(request) {
|
|
2991
3013
|
const systemRect = this._getElementRoundedRect(request);
|
|
@@ -2996,10 +3018,10 @@ let GetNormalizedConnectorRectExecution = class GetNormalizedConnectorRectExecut
|
|
|
2996
3018
|
return RoundedRect.fromCenter(unscaledRect, offsetSize.width, offsetSize.height);
|
|
2997
3019
|
}
|
|
2998
3020
|
_getElementRoundedRect(request) {
|
|
2999
|
-
return this.
|
|
3021
|
+
return this._mediator.execute(new GetElementRoundedRectRequest(request.element));
|
|
3000
3022
|
}
|
|
3001
3023
|
_normalizePosition(rect) {
|
|
3002
|
-
return this.
|
|
3024
|
+
return this._mediator.execute(new GetNormalizedPointRequest(rect));
|
|
3003
3025
|
}
|
|
3004
3026
|
_unscaleSize(rect) {
|
|
3005
3027
|
return SizeExtensions.initialize(rect.width / this._transform.scale, rect.height / this._transform.scale);
|
|
@@ -3020,38 +3042,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3020
3042
|
type: Injectable
|
|
3021
3043
|
}] });
|
|
3022
3044
|
|
|
3045
|
+
/**
|
|
3046
|
+
* Execution that redraws connections in the FComponentsStore.
|
|
3047
|
+
* It resets connectors, sets markers for temporary and snap connections,
|
|
3048
|
+
* and sets up connections based on the stored outputs and inputs.
|
|
3049
|
+
*/
|
|
3023
3050
|
let RedrawConnectionsExecution = class RedrawConnectionsExecution {
|
|
3024
3051
|
_fMediator = inject(FMediator);
|
|
3025
|
-
|
|
3052
|
+
_store = inject(FComponentsStore);
|
|
3026
3053
|
handle(request) {
|
|
3027
3054
|
this._resetConnectors();
|
|
3028
|
-
if (this.
|
|
3029
|
-
this._setMarkers(this.
|
|
3055
|
+
if (this._store.fTempConnection) {
|
|
3056
|
+
this._setMarkers(this._store.fTempConnection);
|
|
3030
3057
|
}
|
|
3031
|
-
if (this.
|
|
3032
|
-
this._setMarkers(this.
|
|
3058
|
+
if (this._store.fSnapConnection) {
|
|
3059
|
+
this._setMarkers(this._store.fSnapConnection);
|
|
3033
3060
|
}
|
|
3034
|
-
this.
|
|
3061
|
+
this._store.fConnections.forEach((x) => {
|
|
3035
3062
|
this._setupConnection(this._getOutput(x.fOutputId), this._getInput(x.fInputId), x);
|
|
3036
3063
|
});
|
|
3037
3064
|
}
|
|
3038
3065
|
_getOutput(id) {
|
|
3039
|
-
const result = this.
|
|
3066
|
+
const result = this._store.fOutputs.find((x) => x.fId === id);
|
|
3040
3067
|
if (!result) {
|
|
3041
3068
|
throw new Error(`Output with id ${id} not found`);
|
|
3042
3069
|
}
|
|
3043
3070
|
return result;
|
|
3044
3071
|
}
|
|
3045
3072
|
_getInput(id) {
|
|
3046
|
-
const result = this.
|
|
3073
|
+
const result = this._store.fInputs.find((x) => x.fId === id);
|
|
3047
3074
|
if (!result) {
|
|
3048
3075
|
throw new Error(`Input with id ${id} not found`);
|
|
3049
3076
|
}
|
|
3050
3077
|
return result;
|
|
3051
3078
|
}
|
|
3052
3079
|
_resetConnectors() {
|
|
3053
|
-
this.
|
|
3054
|
-
this.
|
|
3080
|
+
this._store.fOutputs.forEach((x) => x.resetConnected());
|
|
3081
|
+
this._store.fInputs.forEach((x) => x.resetConnected());
|
|
3055
3082
|
}
|
|
3056
3083
|
_setupConnection(fOutput, fInput, fConnection) {
|
|
3057
3084
|
fOutput.setConnected(fInput);
|
|
@@ -3082,10 +3109,13 @@ class RemoveConnectionForCreateFromStoreRequest {
|
|
|
3082
3109
|
static fToken = Symbol('RemoveConnectionForCreateFromStoreRequest');
|
|
3083
3110
|
}
|
|
3084
3111
|
|
|
3112
|
+
/**
|
|
3113
|
+
* Execution that removes a connection for creation from the FComponentsStore.
|
|
3114
|
+
*/
|
|
3085
3115
|
let RemoveConnectionForCreateFromStoreExecution = class RemoveConnectionForCreateFromStoreExecution {
|
|
3086
|
-
|
|
3116
|
+
_store = inject(FComponentsStore);
|
|
3087
3117
|
handle(request) {
|
|
3088
|
-
this.
|
|
3118
|
+
this._store.fTempConnection = undefined;
|
|
3089
3119
|
}
|
|
3090
3120
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveConnectionForCreateFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3091
3121
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveConnectionForCreateFromStoreExecution });
|
|
@@ -3105,14 +3135,17 @@ class RemoveConnectionFromStoreRequest {
|
|
|
3105
3135
|
}
|
|
3106
3136
|
}
|
|
3107
3137
|
|
|
3138
|
+
/**
|
|
3139
|
+
* Execution that removes a connection from the FComponentsStore.
|
|
3140
|
+
*/
|
|
3108
3141
|
let RemoveConnectionFromStoreExecution = class RemoveConnectionFromStoreExecution {
|
|
3109
|
-
|
|
3142
|
+
_store = inject(FComponentsStore);
|
|
3110
3143
|
handle(request) {
|
|
3111
|
-
this.
|
|
3112
|
-
this.
|
|
3144
|
+
this._store.fConnections.splice(this._getIndexOfConnection(request.fConnection), 1);
|
|
3145
|
+
this._store.dataChanged();
|
|
3113
3146
|
}
|
|
3114
3147
|
_getIndexOfConnection(fConnection) {
|
|
3115
|
-
const result = this.
|
|
3148
|
+
const result = this._store.fConnections.indexOf(fConnection);
|
|
3116
3149
|
if (result === -1) {
|
|
3117
3150
|
throw new Error(`Connection not found in store`);
|
|
3118
3151
|
}
|
|
@@ -3136,10 +3169,13 @@ class RemoveConnectionMarkerFromStoreRequest {
|
|
|
3136
3169
|
}
|
|
3137
3170
|
}
|
|
3138
3171
|
|
|
3172
|
+
/**
|
|
3173
|
+
* Execution that removes a connection marker from the FComponentsStore.
|
|
3174
|
+
*/
|
|
3139
3175
|
let RemoveConnectionMarkerFromStoreExecution = class RemoveConnectionMarkerFromStoreExecution {
|
|
3140
|
-
|
|
3176
|
+
_store = inject(FComponentsStore);
|
|
3141
3177
|
handle(request) {
|
|
3142
|
-
this.
|
|
3178
|
+
this._store.removeComponent(this._store.fMarkers, request.fComponent);
|
|
3143
3179
|
}
|
|
3144
3180
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveConnectionMarkerFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3145
3181
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveConnectionMarkerFromStoreExecution });
|
|
@@ -3155,10 +3191,13 @@ class RemoveSnapConnectionFromStoreRequest {
|
|
|
3155
3191
|
static fToken = Symbol('RemoveSnapConnectionFromStoreRequest');
|
|
3156
3192
|
}
|
|
3157
3193
|
|
|
3194
|
+
/**
|
|
3195
|
+
* Execution that removes the snap connection from the FComponentsStore.
|
|
3196
|
+
*/
|
|
3158
3197
|
let RemoveSnapConnectionFromStoreExecution = class RemoveSnapConnectionFromStoreExecution {
|
|
3159
|
-
|
|
3198
|
+
_store = inject(FComponentsStore);
|
|
3160
3199
|
handle(request) {
|
|
3161
|
-
this.
|
|
3200
|
+
this._store.fSnapConnection = undefined;
|
|
3162
3201
|
}
|
|
3163
3202
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveSnapConnectionFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3164
3203
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveSnapConnectionFromStoreExecution });
|
|
@@ -3170,6 +3209,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3170
3209
|
type: Injectable
|
|
3171
3210
|
}] });
|
|
3172
3211
|
|
|
3212
|
+
/**
|
|
3213
|
+
* This file exports all the connection-related features for the F-Flow domain.
|
|
3214
|
+
*/
|
|
3173
3215
|
const F_CONNECTION_FEATURES = [
|
|
3174
3216
|
AddConnectionForCreateToStoreExecution,
|
|
3175
3217
|
AddConnectionMarkerToStoreExecution,
|
|
@@ -3192,10 +3234,13 @@ class AddInputToStoreRequest {
|
|
|
3192
3234
|
}
|
|
3193
3235
|
}
|
|
3194
3236
|
|
|
3237
|
+
/**
|
|
3238
|
+
* Execution that adds an InputConnector to the FComponentsStore.
|
|
3239
|
+
*/
|
|
3195
3240
|
let AddInputToStoreExecution = class AddInputToStoreExecution {
|
|
3196
|
-
|
|
3241
|
+
_store = inject(FComponentsStore);
|
|
3197
3242
|
handle(request) {
|
|
3198
|
-
this.
|
|
3243
|
+
this._store.addComponent(this._store.fInputs, request.fComponent);
|
|
3199
3244
|
}
|
|
3200
3245
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddInputToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3201
3246
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddInputToStoreExecution });
|
|
@@ -3215,6 +3260,9 @@ class AddOutletToStoreRequest {
|
|
|
3215
3260
|
}
|
|
3216
3261
|
}
|
|
3217
3262
|
|
|
3263
|
+
/**
|
|
3264
|
+
* Execution that adds an OutletConnector to the FComponentsStore.
|
|
3265
|
+
*/
|
|
3218
3266
|
let AddOutletToStoreExecution = class AddOutletToStoreExecution {
|
|
3219
3267
|
_fComponentsStore = inject(FComponentsStore);
|
|
3220
3268
|
handle(request) {
|
|
@@ -3238,6 +3286,9 @@ class AddOutputToStoreRequest {
|
|
|
3238
3286
|
}
|
|
3239
3287
|
}
|
|
3240
3288
|
|
|
3289
|
+
/**
|
|
3290
|
+
* Execution that adds an OutputConnector to the FComponentsStore.
|
|
3291
|
+
*/
|
|
3241
3292
|
let AddOutputToStoreExecution = class AddOutputToStoreExecution {
|
|
3242
3293
|
_fComponentsStore = inject(FComponentsStore);
|
|
3243
3294
|
handle(request) {
|
|
@@ -3253,21 +3304,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3253
3304
|
type: Injectable
|
|
3254
3305
|
}] });
|
|
3255
3306
|
|
|
3256
|
-
class
|
|
3307
|
+
class FindClosestConnectorRequest {
|
|
3257
3308
|
position;
|
|
3258
|
-
|
|
3259
|
-
static fToken = Symbol('
|
|
3260
|
-
constructor(position,
|
|
3309
|
+
connectors;
|
|
3310
|
+
static fToken = Symbol('FindClosestConnectorRequest');
|
|
3311
|
+
constructor(position, connectors) {
|
|
3261
3312
|
this.position = position;
|
|
3262
|
-
this.
|
|
3313
|
+
this.connectors = connectors;
|
|
3263
3314
|
}
|
|
3264
3315
|
}
|
|
3265
3316
|
|
|
3266
|
-
|
|
3317
|
+
/**
|
|
3318
|
+
* Execution that finds the closest connector to a given point.
|
|
3319
|
+
* It calculates the distance from the point to each connector's rectangle
|
|
3320
|
+
* and returns the closest one along with its distance.
|
|
3321
|
+
*/
|
|
3322
|
+
let FindClosestConnectorExecution = class FindClosestConnectorExecution {
|
|
3267
3323
|
handle(payload) {
|
|
3268
3324
|
let result;
|
|
3269
3325
|
let minDistance = Infinity;
|
|
3270
|
-
for (const element of payload.
|
|
3326
|
+
for (const element of payload.connectors) {
|
|
3271
3327
|
const distance = this._distanceToRectangle(payload.position, element);
|
|
3272
3328
|
if (distance < minDistance) {
|
|
3273
3329
|
minDistance = distance;
|
|
@@ -3289,63 +3345,68 @@ let CalculateClosestInputExecution = class CalculateClosestInputExecution {
|
|
|
3289
3345
|
_clamp(value, min, max) {
|
|
3290
3346
|
return Math.max(min, Math.min(max, value));
|
|
3291
3347
|
}
|
|
3292
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3293
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3348
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FindClosestConnectorExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3349
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FindClosestConnectorExecution });
|
|
3294
3350
|
};
|
|
3295
|
-
|
|
3296
|
-
FExecutionRegister(
|
|
3297
|
-
],
|
|
3298
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3351
|
+
FindClosestConnectorExecution = __decorate([
|
|
3352
|
+
FExecutionRegister(FindClosestConnectorRequest)
|
|
3353
|
+
], FindClosestConnectorExecution);
|
|
3354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FindClosestConnectorExecution, decorators: [{
|
|
3299
3355
|
type: Injectable
|
|
3300
3356
|
}] });
|
|
3301
3357
|
|
|
3302
|
-
class
|
|
3358
|
+
class FindConnectableConnectorUsingPriorityAndPositionRequest {
|
|
3303
3359
|
pointerPosition;
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
constructor(pointerPosition, toConnectorRect, canBeConnectedInputs) {
|
|
3360
|
+
connectableConnectors;
|
|
3361
|
+
static fToken = Symbol('FindConnectableConnectorUsingPriorityAndPositionRequest');
|
|
3362
|
+
constructor(pointerPosition, connectableConnectors) {
|
|
3308
3363
|
this.pointerPosition = pointerPosition;
|
|
3309
|
-
this.
|
|
3310
|
-
this.canBeConnectedInputs = canBeConnectedInputs;
|
|
3364
|
+
this.connectableConnectors = connectableConnectors;
|
|
3311
3365
|
}
|
|
3312
3366
|
}
|
|
3313
3367
|
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3368
|
+
/**
|
|
3369
|
+
* Execution that finds a connectable connector at a given position with priority.
|
|
3370
|
+
* It checks for connectors at the position, the closest connector if snap connection is enabled,
|
|
3371
|
+
* and the first connectable connector of the node at that position.
|
|
3372
|
+
*/
|
|
3373
|
+
let FindConnectableConnectorUsingPriorityAndPositionExecution = class FindConnectableConnectorUsingPriorityAndPositionExecution {
|
|
3374
|
+
_mediator = inject(FMediator);
|
|
3375
|
+
_store = inject(FComponentsStore);
|
|
3376
|
+
_browser = inject(BrowserService);
|
|
3318
3377
|
get _transform() {
|
|
3319
|
-
return this.
|
|
3378
|
+
return this._store.fCanvas.transform;
|
|
3320
3379
|
}
|
|
3321
3380
|
get _fHost() {
|
|
3322
|
-
return this.
|
|
3381
|
+
return this._store.fFlow.hostElement;
|
|
3323
3382
|
}
|
|
3324
3383
|
get _fNodes() {
|
|
3325
|
-
return this.
|
|
3384
|
+
return this._store.fNodes;
|
|
3326
3385
|
}
|
|
3327
3386
|
get _fSnapConnection() {
|
|
3328
|
-
return this.
|
|
3387
|
+
return this._store.fSnapConnection;
|
|
3329
3388
|
}
|
|
3330
3389
|
handle(payload) {
|
|
3331
|
-
const
|
|
3332
|
-
return
|
|
3390
|
+
const connectors = this._findConnectorAtPosition(payload);
|
|
3391
|
+
return connectors.length > 0 ? connectors[0] : undefined;
|
|
3333
3392
|
}
|
|
3334
|
-
|
|
3393
|
+
_findConnectorAtPosition(request) {
|
|
3335
3394
|
const result = [];
|
|
3336
|
-
result.push(...this.
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3395
|
+
result.push(...this._filterConnectorsThatLocatedAtPosition(request));
|
|
3396
|
+
// Closest connector is only added if snap connection is enabled and there is a closest connector found
|
|
3397
|
+
// Closest connector has more priority than the first connectable input of the node at position
|
|
3398
|
+
const closestConnector = this._isSnapConnectionEnabledAndHasClosestConnector(request);
|
|
3399
|
+
if (closestConnector) {
|
|
3400
|
+
result.unshift(closestConnector.fConnector);
|
|
3401
|
+
}
|
|
3402
|
+
const fInput = this._getFirstConnectableConnectorOfNodeAtPosition(request);
|
|
3342
3403
|
if (fInput) {
|
|
3343
3404
|
result.push(fInput);
|
|
3344
3405
|
}
|
|
3345
3406
|
return result;
|
|
3346
3407
|
}
|
|
3347
|
-
|
|
3348
|
-
return request.
|
|
3408
|
+
_filterConnectorsThatLocatedAtPosition(request) {
|
|
3409
|
+
return request.connectableConnectors.filter((x) => {
|
|
3349
3410
|
return RectExtensions.isIncludePoint(x.fRect, this._getPointInFlow(request.pointerPosition));
|
|
3350
3411
|
}).map((x) => x.fConnector);
|
|
3351
3412
|
}
|
|
@@ -3355,41 +3416,40 @@ let FindInputAtPositionExecution = class FindInputAtPositionExecution {
|
|
|
3355
3416
|
.sub(this._transform.scaledPosition).sub(this._transform.position)
|
|
3356
3417
|
.div(this._transform.scale);
|
|
3357
3418
|
}
|
|
3358
|
-
|
|
3359
|
-
_calculateClosetInput(request) {
|
|
3419
|
+
_isSnapConnectionEnabledAndHasClosestConnector(request) {
|
|
3360
3420
|
if (!this._fSnapConnection) {
|
|
3361
3421
|
return undefined;
|
|
3362
3422
|
}
|
|
3363
|
-
const
|
|
3364
|
-
return this._isValidClosestInput(
|
|
3423
|
+
const closestConnector = this._mediator.execute(new FindClosestConnectorRequest(this._getPointInFlow(request.pointerPosition), request.connectableConnectors));
|
|
3424
|
+
return this._isValidClosestInput(closestConnector) ? closestConnector : undefined;
|
|
3365
3425
|
}
|
|
3366
|
-
_isValidClosestInput(
|
|
3367
|
-
return !!
|
|
3426
|
+
_isValidClosestInput(closestConnector) {
|
|
3427
|
+
return !!closestConnector && closestConnector.distance < this._fSnapConnection.fSnapThreshold;
|
|
3368
3428
|
}
|
|
3369
|
-
//if node placed in position and fConnectOnNode is true, return the first connectable
|
|
3370
|
-
|
|
3429
|
+
//if node placed in position and fConnectOnNode is true, return the first connectable connector of the node
|
|
3430
|
+
_getFirstConnectableConnectorOfNodeAtPosition(request) {
|
|
3371
3431
|
return this._getElementsFromPoint(request.pointerPosition)
|
|
3372
3432
|
.map((x) => this._findConnectableNode(x))
|
|
3373
3433
|
.filter((x) => !!x)
|
|
3374
|
-
.map((x) => this.
|
|
3434
|
+
.map((x) => this._findFirstConnectableConnectorOfNode(request.connectableConnectors, x))
|
|
3375
3435
|
.find((x) => !!x);
|
|
3376
3436
|
}
|
|
3377
3437
|
_getElementsFromPoint(position) {
|
|
3378
|
-
return this.
|
|
3438
|
+
return this._browser.document.elementsFromPoint(position.x, position.y);
|
|
3379
3439
|
}
|
|
3380
3440
|
_findConnectableNode(element) {
|
|
3381
3441
|
return this._fNodes.find((x) => x.isContains(element) && x.fConnectOnNode);
|
|
3382
3442
|
}
|
|
3383
|
-
|
|
3384
|
-
return connectableInputs.find((x) => x.fConnector.fNodeId === fNode.fId)?.fConnector;
|
|
3443
|
+
_findFirstConnectableConnectorOfNode(connectableInputs, fNode) {
|
|
3444
|
+
return connectableInputs.find((x) => x.fConnector.fNodeId === fNode.fId())?.fConnector;
|
|
3385
3445
|
}
|
|
3386
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3387
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3446
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FindConnectableConnectorUsingPriorityAndPositionExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3447
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FindConnectableConnectorUsingPriorityAndPositionExecution });
|
|
3388
3448
|
};
|
|
3389
|
-
|
|
3390
|
-
FExecutionRegister(
|
|
3391
|
-
],
|
|
3392
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3449
|
+
FindConnectableConnectorUsingPriorityAndPositionExecution = __decorate([
|
|
3450
|
+
FExecutionRegister(FindConnectableConnectorUsingPriorityAndPositionRequest)
|
|
3451
|
+
], FindConnectableConnectorUsingPriorityAndPositionExecution);
|
|
3452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FindConnectableConnectorUsingPriorityAndPositionExecution, decorators: [{
|
|
3393
3453
|
type: Injectable
|
|
3394
3454
|
}] });
|
|
3395
3455
|
|
|
@@ -3409,8 +3469,11 @@ class GetConnectorAndRectRequest {
|
|
|
3409
3469
|
}
|
|
3410
3470
|
}
|
|
3411
3471
|
|
|
3472
|
+
/**
|
|
3473
|
+
* Execution that retrieves a connector and its rectangle.
|
|
3474
|
+
*/
|
|
3412
3475
|
let GetConnectorAndRectExecution = class GetConnectorAndRectExecution {
|
|
3413
|
-
|
|
3476
|
+
_mediator = inject(FMediator);
|
|
3414
3477
|
handle(request) {
|
|
3415
3478
|
return {
|
|
3416
3479
|
fConnector: request.fConnector,
|
|
@@ -3418,7 +3481,7 @@ let GetConnectorAndRectExecution = class GetConnectorAndRectExecution {
|
|
|
3418
3481
|
};
|
|
3419
3482
|
}
|
|
3420
3483
|
_getConnectorRect(fConnector) {
|
|
3421
|
-
return this.
|
|
3484
|
+
return this._mediator.execute(new GetNormalizedConnectorRectRequest(fConnector.hostElement));
|
|
3422
3485
|
}
|
|
3423
3486
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetConnectorAndRectExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3424
3487
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetConnectorAndRectExecution });
|
|
@@ -3430,15 +3493,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3430
3493
|
type: Injectable
|
|
3431
3494
|
}] });
|
|
3432
3495
|
|
|
3496
|
+
/**
|
|
3497
|
+
* Execution that retrieves all input connectors that can be connected to a given output or outlet connector,
|
|
3498
|
+
*/
|
|
3433
3499
|
let GetAllCanBeConnectedInputsAndRectsExecution = class GetAllCanBeConnectedInputsAndRectsExecution {
|
|
3434
|
-
|
|
3500
|
+
_mediator = inject(FMediator);
|
|
3435
3501
|
_fComponentsStore = inject(FComponentsStore);
|
|
3436
3502
|
get _fInputs() {
|
|
3437
3503
|
return this._fComponentsStore.fInputs;
|
|
3438
3504
|
}
|
|
3439
3505
|
handle(payload) {
|
|
3440
3506
|
return this._getCanBeConnectedInputs(payload.fOutputOrOutlet).map((x) => {
|
|
3441
|
-
return this.
|
|
3507
|
+
return this._mediator.execute(new GetConnectorAndRectRequest(x));
|
|
3442
3508
|
});
|
|
3443
3509
|
}
|
|
3444
3510
|
_getCanBeConnectedInputs(fOutputOrOutlet) {
|
|
@@ -3467,30 +3533,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3467
3533
|
type: Injectable
|
|
3468
3534
|
}] });
|
|
3469
3535
|
|
|
3470
|
-
class
|
|
3471
|
-
|
|
3472
|
-
static fToken = Symbol('
|
|
3473
|
-
constructor(
|
|
3474
|
-
this.
|
|
3536
|
+
class GetAllCanBeConnectedSourceConnectorsAndRectsRequest {
|
|
3537
|
+
fTargetConnector;
|
|
3538
|
+
static fToken = Symbol('GetAllCanBeConnectedSourceConnectorsAndRectsRequest');
|
|
3539
|
+
constructor(fTargetConnector) {
|
|
3540
|
+
this.fTargetConnector = fTargetConnector;
|
|
3475
3541
|
}
|
|
3476
3542
|
}
|
|
3477
3543
|
|
|
3478
|
-
|
|
3544
|
+
/**
|
|
3545
|
+
* Execution that retrieves all source connectors that can be connected to a given target connector,
|
|
3546
|
+
* along with their rectangles.
|
|
3547
|
+
* Source - Output or Outlet connectors.
|
|
3548
|
+
*/
|
|
3549
|
+
let GetAllCanBeConnectedSourceConnectorsAndRectsExecution = class GetAllCanBeConnectedSourceConnectorsAndRectsExecution {
|
|
3550
|
+
_mediator = inject(FMediator);
|
|
3479
3551
|
_fComponentsStore = inject(FComponentsStore);
|
|
3552
|
+
get _fSourceConnectors() {
|
|
3553
|
+
return this._fComponentsStore.fOutputs;
|
|
3554
|
+
}
|
|
3480
3555
|
handle(payload) {
|
|
3481
|
-
this.
|
|
3482
|
-
|
|
3556
|
+
return this._getCanBeConnectedSourceConnectors(payload.fTargetConnector).map((x) => {
|
|
3557
|
+
return this._mediator.execute(new GetConnectorAndRectRequest(x));
|
|
3558
|
+
});
|
|
3483
3559
|
}
|
|
3484
|
-
|
|
3485
|
-
|
|
3560
|
+
_getCanBeConnectedSourceConnectors(fTargetConnector) {
|
|
3561
|
+
return this._fSourceConnectors.filter((x) => {
|
|
3562
|
+
let result = x.canBeConnected;
|
|
3563
|
+
if (result && x.canBeConnectedInputs?.length) {
|
|
3564
|
+
result = x.canBeConnectedInputs?.includes(fTargetConnector.fId);
|
|
3565
|
+
}
|
|
3566
|
+
return result;
|
|
3567
|
+
});
|
|
3486
3568
|
}
|
|
3487
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3488
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3569
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetAllCanBeConnectedSourceConnectorsAndRectsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3570
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetAllCanBeConnectedSourceConnectorsAndRectsExecution });
|
|
3489
3571
|
};
|
|
3490
|
-
|
|
3491
|
-
FExecutionRegister(
|
|
3492
|
-
],
|
|
3493
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3572
|
+
GetAllCanBeConnectedSourceConnectorsAndRectsExecution = __decorate([
|
|
3573
|
+
FExecutionRegister(GetAllCanBeConnectedSourceConnectorsAndRectsRequest)
|
|
3574
|
+
], GetAllCanBeConnectedSourceConnectorsAndRectsExecution);
|
|
3575
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetAllCanBeConnectedSourceConnectorsAndRectsExecution, decorators: [{
|
|
3576
|
+
type: Injectable
|
|
3577
|
+
}] });
|
|
3578
|
+
|
|
3579
|
+
class MarkConnectableConnectorsRequest {
|
|
3580
|
+
fConnectors;
|
|
3581
|
+
static fToken = Symbol('MarkConnectableConnectorsRequest');
|
|
3582
|
+
constructor(fConnectors) {
|
|
3583
|
+
this.fConnectors = fConnectors;
|
|
3584
|
+
}
|
|
3585
|
+
}
|
|
3586
|
+
|
|
3587
|
+
/**
|
|
3588
|
+
* Execution that marks connectors as connectable.
|
|
3589
|
+
*/
|
|
3590
|
+
let MarkConnectableConnectorsExecution = class MarkConnectableConnectorsExecution {
|
|
3591
|
+
_store = inject(FComponentsStore);
|
|
3592
|
+
handle(payload) {
|
|
3593
|
+
this._store.flowHost.classList.add(F_CSS_CLASS.DRAG_AND_DROP.CONNECTIONS_DRAGGING);
|
|
3594
|
+
payload.fConnectors.forEach((fConnector) => this._markConnector(fConnector));
|
|
3595
|
+
}
|
|
3596
|
+
_markConnector(fConnector) {
|
|
3597
|
+
fConnector.hostElement.classList.add(F_CSS_CLASS.CONNECTOR.CONNECTABLE);
|
|
3598
|
+
}
|
|
3599
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MarkConnectableConnectorsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3600
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MarkConnectableConnectorsExecution });
|
|
3601
|
+
};
|
|
3602
|
+
MarkConnectableConnectorsExecution = __decorate([
|
|
3603
|
+
FExecutionRegister(MarkConnectableConnectorsRequest)
|
|
3604
|
+
], MarkConnectableConnectorsExecution);
|
|
3605
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MarkConnectableConnectorsExecution, decorators: [{
|
|
3494
3606
|
type: Injectable
|
|
3495
3607
|
}] });
|
|
3496
3608
|
|
|
@@ -3502,10 +3614,13 @@ class RemoveInputFromStoreRequest {
|
|
|
3502
3614
|
}
|
|
3503
3615
|
}
|
|
3504
3616
|
|
|
3617
|
+
/**
|
|
3618
|
+
* Execution that removes an inputConnector from the FComponentsStore.
|
|
3619
|
+
*/
|
|
3505
3620
|
let RemoveInputFromStoreExecution = class RemoveInputFromStoreExecution {
|
|
3506
|
-
|
|
3621
|
+
_store = inject(FComponentsStore);
|
|
3507
3622
|
handle(request) {
|
|
3508
|
-
this.
|
|
3623
|
+
this._store.removeComponent(this._store.fInputs, request.fComponent);
|
|
3509
3624
|
}
|
|
3510
3625
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveInputFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3511
3626
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveInputFromStoreExecution });
|
|
@@ -3525,10 +3640,13 @@ class RemoveOutletFromStoreRequest {
|
|
|
3525
3640
|
}
|
|
3526
3641
|
}
|
|
3527
3642
|
|
|
3643
|
+
/**
|
|
3644
|
+
* Execution that removes an outlet connector from the FComponentsStore.
|
|
3645
|
+
*/
|
|
3528
3646
|
let RemoveOutletFromStoreExecution = class RemoveOutletFromStoreExecution {
|
|
3529
|
-
|
|
3647
|
+
_store = inject(FComponentsStore);
|
|
3530
3648
|
handle(request) {
|
|
3531
|
-
this.
|
|
3649
|
+
this._store.removeComponent(this._store.fOutlets, request.fComponent);
|
|
3532
3650
|
}
|
|
3533
3651
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutletFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3534
3652
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutletFromStoreExecution });
|
|
@@ -3548,10 +3666,13 @@ class RemoveOutputFromStoreRequest {
|
|
|
3548
3666
|
}
|
|
3549
3667
|
}
|
|
3550
3668
|
|
|
3669
|
+
/**
|
|
3670
|
+
* Execution that removes an outlet connector from the FComponentsStore.
|
|
3671
|
+
*/
|
|
3551
3672
|
let RemoveOutputFromStoreExecution = class RemoveOutputFromStoreExecution {
|
|
3552
|
-
|
|
3673
|
+
_store = inject(FComponentsStore);
|
|
3553
3674
|
handle(request) {
|
|
3554
|
-
this.
|
|
3675
|
+
this._store.removeComponent(this._store.fOutputs, request.fComponent);
|
|
3555
3676
|
}
|
|
3556
3677
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutputFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3557
3678
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutputFromStoreExecution });
|
|
@@ -3563,46 +3684,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3563
3684
|
type: Injectable
|
|
3564
3685
|
}] });
|
|
3565
3686
|
|
|
3566
|
-
class
|
|
3567
|
-
|
|
3568
|
-
static fToken = Symbol('
|
|
3569
|
-
constructor(
|
|
3570
|
-
this.
|
|
3687
|
+
class UnmarkConnectableConnectorsRequest {
|
|
3688
|
+
fConnectors;
|
|
3689
|
+
static fToken = Symbol('UnmarkConnectableConnectorsRequest');
|
|
3690
|
+
constructor(fConnectors) {
|
|
3691
|
+
this.fConnectors = fConnectors;
|
|
3571
3692
|
}
|
|
3572
3693
|
}
|
|
3573
3694
|
|
|
3574
|
-
|
|
3575
|
-
|
|
3695
|
+
/**
|
|
3696
|
+
* Execution that unmarks connectors as connectable.
|
|
3697
|
+
*/
|
|
3698
|
+
let UnmarkConnectableConnectorsExecution = class UnmarkConnectableConnectorsExecution {
|
|
3699
|
+
_store = inject(FComponentsStore);
|
|
3576
3700
|
handle(payload) {
|
|
3577
|
-
this.
|
|
3578
|
-
payload.
|
|
3701
|
+
this._store.flowHost.classList.remove(F_CSS_CLASS.DRAG_AND_DROP.CONNECTIONS_DRAGGING);
|
|
3702
|
+
payload.fConnectors.forEach((fConnector) => this._unmarkConnector(fConnector));
|
|
3579
3703
|
}
|
|
3580
|
-
|
|
3581
|
-
|
|
3704
|
+
_unmarkConnector(fConnector) {
|
|
3705
|
+
fConnector.hostElement.classList.remove(F_CSS_CLASS.CONNECTOR.CONNECTABLE);
|
|
3582
3706
|
}
|
|
3583
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3584
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3707
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UnmarkConnectableConnectorsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3708
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UnmarkConnectableConnectorsExecution });
|
|
3585
3709
|
};
|
|
3586
|
-
|
|
3587
|
-
FExecutionRegister(
|
|
3588
|
-
],
|
|
3589
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
3710
|
+
UnmarkConnectableConnectorsExecution = __decorate([
|
|
3711
|
+
FExecutionRegister(UnmarkConnectableConnectorsRequest)
|
|
3712
|
+
], UnmarkConnectableConnectorsExecution);
|
|
3713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UnmarkConnectableConnectorsExecution, decorators: [{
|
|
3590
3714
|
type: Injectable
|
|
3591
3715
|
}] });
|
|
3592
3716
|
|
|
3717
|
+
/*
|
|
3718
|
+
* This file exports all the connector-related executions that can be used in the FFlow domain.
|
|
3719
|
+
*/
|
|
3593
3720
|
const F_CONNECTORS_FEATURES = [
|
|
3594
3721
|
AddInputToStoreExecution,
|
|
3595
3722
|
AddOutletToStoreExecution,
|
|
3596
3723
|
AddOutputToStoreExecution,
|
|
3597
|
-
|
|
3598
|
-
|
|
3724
|
+
FindClosestConnectorExecution,
|
|
3725
|
+
FindConnectableConnectorUsingPriorityAndPositionExecution,
|
|
3726
|
+
GetAllCanBeConnectedSourceConnectorsAndRectsExecution,
|
|
3599
3727
|
GetAllCanBeConnectedInputsAndRectsExecution,
|
|
3600
3728
|
GetConnectorAndRectExecution,
|
|
3601
|
-
|
|
3729
|
+
MarkConnectableConnectorsExecution,
|
|
3602
3730
|
RemoveInputFromStoreExecution,
|
|
3603
3731
|
RemoveOutletFromStoreExecution,
|
|
3604
3732
|
RemoveOutputFromStoreExecution,
|
|
3605
|
-
|
|
3733
|
+
UnmarkConnectableConnectorsExecution
|
|
3606
3734
|
];
|
|
3607
3735
|
|
|
3608
3736
|
class AddDndToStoreRequest {
|
|
@@ -3613,10 +3741,13 @@ class AddDndToStoreRequest {
|
|
|
3613
3741
|
}
|
|
3614
3742
|
}
|
|
3615
3743
|
|
|
3744
|
+
/**
|
|
3745
|
+
* Execution that adds a drag and drop directive to the FComponentsStore.
|
|
3746
|
+
*/
|
|
3616
3747
|
let AddDndToStoreExecution = class AddDndToStoreExecution {
|
|
3617
|
-
|
|
3748
|
+
_store = inject(FComponentsStore);
|
|
3618
3749
|
handle(request) {
|
|
3619
|
-
this.
|
|
3750
|
+
this._store.fDraggable = request.fComponent;
|
|
3620
3751
|
}
|
|
3621
3752
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddDndToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3622
3753
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddDndToStoreExecution });
|
|
@@ -3652,7 +3783,7 @@ let GetNormalizedParentNodeRectExecution = class GetNormalizedParentNodeRectExec
|
|
|
3652
3783
|
return result;
|
|
3653
3784
|
}
|
|
3654
3785
|
_getNode(fId) {
|
|
3655
|
-
return this._fComponentsStore.fNodes.find((x) => x.fId === fId);
|
|
3786
|
+
return this._fComponentsStore.fNodes.find((x) => x.fId() === fId);
|
|
3656
3787
|
}
|
|
3657
3788
|
// Parent Node
|
|
3658
3789
|
// +----------------------------------------+
|
|
@@ -3712,10 +3843,10 @@ let IsArrayHasParentNodeExecution = class IsArrayHasParentNodeExecution {
|
|
|
3712
3843
|
return this._isParentNodeInArray(this._getParentNodeIds(request.fParentNodes), request.fDraggedNodes);
|
|
3713
3844
|
}
|
|
3714
3845
|
_getParentNodeIds(fParentNodes) {
|
|
3715
|
-
return fParentNodes.map((x) => x.fId);
|
|
3846
|
+
return fParentNodes.map((x) => x.fId());
|
|
3716
3847
|
}
|
|
3717
3848
|
_isParentNodeInArray(parentNodeIds, fDraggedNodes) {
|
|
3718
|
-
return fDraggedNodes.some((x) => parentNodeIds.includes(x.fId));
|
|
3849
|
+
return fDraggedNodes.some((x) => parentNodeIds.includes(x.fId()));
|
|
3719
3850
|
}
|
|
3720
3851
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IsArrayHasParentNodeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3721
3852
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IsArrayHasParentNodeExecution });
|
|
@@ -3756,7 +3887,7 @@ let IsConnectionUnderNodeExecution = class IsConnectionUnderNodeExecution {
|
|
|
3756
3887
|
const fOutputConnections = this._getOutputConnectionsId(fOutputConnectors);
|
|
3757
3888
|
const fInputConnections = this._getInputConnectionsId(fInputConnectors);
|
|
3758
3889
|
const fConnectionsUnderNode = this._calculateConnectionsUnderNode(request.fNode).filter((x) => {
|
|
3759
|
-
return !fOutputConnections.includes(x.fId) && !fInputConnections.includes(x.fId);
|
|
3890
|
+
return !fOutputConnections.includes(x.fId()) && !fInputConnections.includes(x.fId());
|
|
3760
3891
|
});
|
|
3761
3892
|
if (!fConnectionsUnderNode.length) {
|
|
3762
3893
|
return;
|
|
@@ -3777,13 +3908,13 @@ let IsConnectionUnderNodeExecution = class IsConnectionUnderNodeExecution {
|
|
|
3777
3908
|
const connectorsId = this._getConnectorsId(connectors);
|
|
3778
3909
|
return this._fComponentsStore.fConnections
|
|
3779
3910
|
.filter((x) => connectorsId.includes(x.fOutputId))
|
|
3780
|
-
.map((x) => x.fId);
|
|
3911
|
+
.map((x) => x.fId());
|
|
3781
3912
|
}
|
|
3782
3913
|
_getInputConnectionsId(connectors) {
|
|
3783
3914
|
const connectorsId = this._getConnectorsId(connectors);
|
|
3784
3915
|
return this._fComponentsStore.fConnections
|
|
3785
3916
|
.filter((x) => connectorsId.includes(x.fInputId))
|
|
3786
|
-
.map((x) => x.fId);
|
|
3917
|
+
.map((x) => x.fId());
|
|
3787
3918
|
}
|
|
3788
3919
|
_getConnectorsId(connectors) {
|
|
3789
3920
|
return connectors.map((x) => x.fId);
|
|
@@ -3793,10 +3924,10 @@ let IsConnectionUnderNodeExecution = class IsConnectionUnderNodeExecution {
|
|
|
3793
3924
|
return this._fComponentsStore.fConnections.filter((x) => this._isConnectionHasIntersectionsWithNode(x, fNodeRect));
|
|
3794
3925
|
}
|
|
3795
3926
|
_isConnectionHasIntersectionsWithNode(fConnection, fNodeRect) {
|
|
3796
|
-
return GetIntersections.getRoundedRectIntersectionsWithSVGPath(fConnection.fPath.hostElement, fNodeRect).length > 0;
|
|
3927
|
+
return GetIntersections.getRoundedRectIntersectionsWithSVGPath(fConnection.fPath().hostElement, fNodeRect).length > 0;
|
|
3797
3928
|
}
|
|
3798
3929
|
_emitNodeIntersectedWithConnections(fNode, fConnections) {
|
|
3799
|
-
this._fComponentsStore.fDraggable?.fNodeIntersectedWithConnections.emit(new FNodeIntersectedWithConnections(fNode.fId, fConnections.map((x) => x.fId)));
|
|
3930
|
+
this._fComponentsStore.fDraggable?.fNodeIntersectedWithConnections.emit(new FNodeIntersectedWithConnections(fNode.fId(), fConnections.map((x) => x.fId())));
|
|
3800
3931
|
}
|
|
3801
3932
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IsConnectionUnderNodeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3802
3933
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IsConnectionUnderNodeExecution });
|
|
@@ -4083,7 +4214,7 @@ class FCreateConnectionDragHandler {
|
|
|
4083
4214
|
}
|
|
4084
4215
|
_getAndMarkCanBeConnectedInputs() {
|
|
4085
4216
|
this._canBeConnectedInputs = this._fMediator.execute(new GetAllCanBeConnectedInputsAndRectsRequest(this._fOutputOrOutlet));
|
|
4086
|
-
this._fMediator.execute(new
|
|
4217
|
+
this._fMediator.execute(new MarkConnectableConnectorsRequest(this._canBeConnectedInputs.map((x) => x.fConnector)));
|
|
4087
4218
|
}
|
|
4088
4219
|
_initializeSnapConnection() {
|
|
4089
4220
|
if (!this._fSnapConnection) {
|
|
@@ -4120,7 +4251,7 @@ class FCreateConnectionDragHandler {
|
|
|
4120
4251
|
}
|
|
4121
4252
|
}
|
|
4122
4253
|
_findClosestInput(difference) {
|
|
4123
|
-
return this._fMediator.execute(new
|
|
4254
|
+
return this._fMediator.execute(new FindClosestConnectorRequest(this._toConnectorRect.addPoint(difference), this._canBeConnectedInputs));
|
|
4124
4255
|
}
|
|
4125
4256
|
_getClosestInputForSnapConnection(fClosestInput) {
|
|
4126
4257
|
return fClosestInput && fClosestInput.distance < this._fSnapConnection.fSnapThreshold ? fClosestInput : undefined;
|
|
@@ -4129,7 +4260,7 @@ class FCreateConnectionDragHandler {
|
|
|
4129
4260
|
this._fConnection.redraw();
|
|
4130
4261
|
this._fConnection.hide();
|
|
4131
4262
|
this._fSnapConnection?.hide();
|
|
4132
|
-
this._fMediator.execute(new
|
|
4263
|
+
this._fMediator.execute(new UnmarkConnectableConnectorsRequest(this._canBeConnectedInputs.map((x) => x.fConnector)));
|
|
4133
4264
|
}
|
|
4134
4265
|
}
|
|
4135
4266
|
|
|
@@ -4167,7 +4298,7 @@ let FCreateConnectionFinalizeExecution = class FCreateConnectionFinalizeExecutio
|
|
|
4167
4298
|
this._fComponentsStore.fDraggable?.fCreateConnection.emit(new FCreateConnectionEvent(this.getTargetOutput(this.getOutput() || this.getOutlet()).fId, this._getInputUnderPointer(event)?.fId, event.getPosition()));
|
|
4168
4299
|
}
|
|
4169
4300
|
_getInputUnderPointer(event) {
|
|
4170
|
-
return this._fMediator.execute(new
|
|
4301
|
+
return this._fMediator.execute(new FindConnectableConnectorUsingPriorityAndPositionRequest(event.getPosition(), this._fResult.getData().canBeConnectedInputs));
|
|
4171
4302
|
}
|
|
4172
4303
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FCreateConnectionFinalizeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4173
4304
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FCreateConnectionFinalizeExecution });
|
|
@@ -4383,133 +4514,273 @@ class FReassignConnectionFinalizeRequest {
|
|
|
4383
4514
|
}
|
|
4384
4515
|
}
|
|
4385
4516
|
|
|
4517
|
+
function isClosestConnectorInsideSnapThreshold(fClosestConnector, snapConnection) {
|
|
4518
|
+
return fClosestConnector && fClosestConnector.distance < snapConnection.fSnapThreshold ? fClosestConnector : undefined;
|
|
4519
|
+
}
|
|
4520
|
+
function roundedRectFromPoint(point) {
|
|
4521
|
+
return RoundedRect.fromRect(RectExtensions.initialize(point.x, point.y));
|
|
4522
|
+
}
|
|
4523
|
+
|
|
4524
|
+
class FReassignTargetDragHandler {
|
|
4525
|
+
_mediator;
|
|
4526
|
+
_connection;
|
|
4527
|
+
_sourceConnectorAndRect;
|
|
4528
|
+
_targetConnectorAndRect;
|
|
4529
|
+
_connectableConnectors = [];
|
|
4530
|
+
get _sourceConnector() {
|
|
4531
|
+
return this._sourceConnectorAndRect.fConnector;
|
|
4532
|
+
}
|
|
4533
|
+
get _sourceConnectorRect() {
|
|
4534
|
+
return this._sourceConnectorAndRect.fRect;
|
|
4535
|
+
}
|
|
4536
|
+
get _targetConnector() {
|
|
4537
|
+
return this._targetConnectorAndRect.fConnector;
|
|
4538
|
+
}
|
|
4539
|
+
_connectorRect;
|
|
4540
|
+
_snapConnection;
|
|
4541
|
+
constructor(_mediator, _connection, _sourceConnectorAndRect, _targetConnectorAndRect) {
|
|
4542
|
+
this._mediator = _mediator;
|
|
4543
|
+
this._connection = _connection;
|
|
4544
|
+
this._sourceConnectorAndRect = _sourceConnectorAndRect;
|
|
4545
|
+
this._targetConnectorAndRect = _targetConnectorAndRect;
|
|
4546
|
+
this._connectorRect = roundedRectFromPoint(this._connection.line.point2);
|
|
4547
|
+
}
|
|
4548
|
+
getConnectableConnectors() {
|
|
4549
|
+
return this._connectableConnectors;
|
|
4550
|
+
}
|
|
4551
|
+
markConnectableConnector() {
|
|
4552
|
+
this._connectableConnectors = this._mediator.execute(new GetAllCanBeConnectedInputsAndRectsRequest(this._sourceConnector));
|
|
4553
|
+
this._mediator.execute(new MarkConnectableConnectorsRequest(this._connectableConnectors.map((x) => x.fConnector)));
|
|
4554
|
+
}
|
|
4555
|
+
initializeSnapConnection(snapConnection) {
|
|
4556
|
+
this._snapConnection = snapConnection;
|
|
4557
|
+
if (!snapConnection) {
|
|
4558
|
+
return;
|
|
4559
|
+
}
|
|
4560
|
+
snapConnection.fOutputId = this._connection.fOutputId;
|
|
4561
|
+
snapConnection.initialize();
|
|
4562
|
+
}
|
|
4563
|
+
onPointerMove(difference) {
|
|
4564
|
+
const newPoint = this._connectorRect.addPoint(difference);
|
|
4565
|
+
const fClosestConnector = this._findClosestConnector(newPoint, this._connectableConnectors);
|
|
4566
|
+
this._drawConnection(newPoint, fClosestConnector?.fConnector.fConnectableSide || this._targetConnector.fConnectableSide);
|
|
4567
|
+
if (this._snapConnection) {
|
|
4568
|
+
this._drawSnapConnection(isClosestConnectorInsideSnapThreshold(fClosestConnector, this._snapConnection));
|
|
4569
|
+
}
|
|
4570
|
+
}
|
|
4571
|
+
_findClosestConnector(point, connectors) {
|
|
4572
|
+
return this._mediator.execute(new FindClosestConnectorRequest(point, connectors));
|
|
4573
|
+
}
|
|
4574
|
+
_drawConnection(newPoint, fSide) {
|
|
4575
|
+
const line = this._calculateNewLine(newPoint, fSide);
|
|
4576
|
+
this._connection.setLine(line, this._sourceConnectorAndRect.fConnector.fConnectableSide, fSide);
|
|
4577
|
+
this._connection.redraw();
|
|
4578
|
+
}
|
|
4579
|
+
_calculateNewLine(targetPoint, fSide) {
|
|
4580
|
+
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(this._sourceConnectorRect, roundedRectFromPoint(targetPoint), this._connection.fBehavior, this._sourceConnector.fConnectableSide, fSide));
|
|
4581
|
+
}
|
|
4582
|
+
_drawSnapConnection(fClosestConnector) {
|
|
4583
|
+
const snapConnection = this._snapConnection;
|
|
4584
|
+
if (fClosestConnector) {
|
|
4585
|
+
const line = this._getLineToClosestTargetConnector(fClosestConnector, snapConnection);
|
|
4586
|
+
snapConnection.show();
|
|
4587
|
+
snapConnection.setLine(line, this._sourceConnector.fConnectableSide, fClosestConnector.fConnector.fConnectableSide);
|
|
4588
|
+
snapConnection.redraw();
|
|
4589
|
+
}
|
|
4590
|
+
else {
|
|
4591
|
+
snapConnection.hide();
|
|
4592
|
+
}
|
|
4593
|
+
}
|
|
4594
|
+
_getLineToClosestTargetConnector(fClosestInput, snapConnection) {
|
|
4595
|
+
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(this._sourceConnectorRect, fClosestInput.fRect, snapConnection.fBehavior, this._sourceConnector.fConnectableSide, fClosestInput.fConnector.fConnectableSide));
|
|
4596
|
+
}
|
|
4597
|
+
onPointerUp() {
|
|
4598
|
+
this._drawConnection(this._connectorRect, this._targetConnectorAndRect.fConnector.fConnectableSide);
|
|
4599
|
+
this._snapConnection?.hide();
|
|
4600
|
+
this._mediator.execute(new UnmarkConnectableConnectorsRequest(this._connectableConnectors.map((x) => x.fConnector)));
|
|
4601
|
+
}
|
|
4602
|
+
}
|
|
4603
|
+
|
|
4604
|
+
class FReassignSourceDragHandler {
|
|
4605
|
+
_mediator;
|
|
4606
|
+
_connection;
|
|
4607
|
+
_sourceConnectorAndRect;
|
|
4608
|
+
_targetConnectorAndRect;
|
|
4609
|
+
_connectableConnectors = [];
|
|
4610
|
+
get _sourceConnector() {
|
|
4611
|
+
return this._sourceConnectorAndRect.fConnector;
|
|
4612
|
+
}
|
|
4613
|
+
get _targetConnector() {
|
|
4614
|
+
return this._targetConnectorAndRect.fConnector;
|
|
4615
|
+
}
|
|
4616
|
+
_connectorRect;
|
|
4617
|
+
_snapConnection;
|
|
4618
|
+
constructor(_mediator, _connection, _sourceConnectorAndRect, _targetConnectorAndRect) {
|
|
4619
|
+
this._mediator = _mediator;
|
|
4620
|
+
this._connection = _connection;
|
|
4621
|
+
this._sourceConnectorAndRect = _sourceConnectorAndRect;
|
|
4622
|
+
this._targetConnectorAndRect = _targetConnectorAndRect;
|
|
4623
|
+
this._connectorRect = roundedRectFromPoint(this._connection.line.point1);
|
|
4624
|
+
}
|
|
4625
|
+
getConnectableConnectors() {
|
|
4626
|
+
return this._connectableConnectors;
|
|
4627
|
+
}
|
|
4628
|
+
markConnectableConnector() {
|
|
4629
|
+
this._connectableConnectors = this._mediator.execute(new GetAllCanBeConnectedSourceConnectorsAndRectsRequest(this._targetConnector));
|
|
4630
|
+
const isExistCurrentSourceConnector = this._connectableConnectors.some((x) => x.fConnector.fId === this._sourceConnector.fId);
|
|
4631
|
+
if (!isExistCurrentSourceConnector) {
|
|
4632
|
+
this._connectableConnectors.push(this._sourceConnectorAndRect);
|
|
4633
|
+
}
|
|
4634
|
+
this._mediator.execute(new MarkConnectableConnectorsRequest(this._connectableConnectors.map((x) => x.fConnector)));
|
|
4635
|
+
}
|
|
4636
|
+
initializeSnapConnection(snapConnection) {
|
|
4637
|
+
this._snapConnection = snapConnection;
|
|
4638
|
+
if (!snapConnection) {
|
|
4639
|
+
return;
|
|
4640
|
+
}
|
|
4641
|
+
snapConnection.fInputId = this._connection.fInputId;
|
|
4642
|
+
snapConnection.initialize();
|
|
4643
|
+
}
|
|
4644
|
+
onPointerMove(difference) {
|
|
4645
|
+
const newPoint = this._connectorRect.addPoint(difference);
|
|
4646
|
+
const fClosestConnector = this._findClosestConnector(newPoint, this._connectableConnectors);
|
|
4647
|
+
this._drawConnection(newPoint, fClosestConnector?.fConnector.fConnectableSide || this._sourceConnector.fConnectableSide);
|
|
4648
|
+
if (this._snapConnection) {
|
|
4649
|
+
this._drawSnapConnection(isClosestConnectorInsideSnapThreshold(fClosestConnector, this._snapConnection));
|
|
4650
|
+
}
|
|
4651
|
+
}
|
|
4652
|
+
_findClosestConnector(point, connectors) {
|
|
4653
|
+
return this._mediator.execute(new FindClosestConnectorRequest(point, connectors));
|
|
4654
|
+
}
|
|
4655
|
+
_drawConnection(newPoint, fSide) {
|
|
4656
|
+
const line = this._calculateNewLine(newPoint, fSide);
|
|
4657
|
+
this._connection.setLine(line, fSide, this._targetConnectorAndRect.fConnector.fConnectableSide);
|
|
4658
|
+
this._connection.redraw();
|
|
4659
|
+
}
|
|
4660
|
+
_calculateNewLine(sourcePoint, fSide) {
|
|
4661
|
+
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(roundedRectFromPoint(sourcePoint), this._targetConnectorAndRect.fRect, this._connection.fBehavior, fSide, this._targetConnectorAndRect.fConnector.fConnectableSide));
|
|
4662
|
+
}
|
|
4663
|
+
_drawSnapConnection(fClosestConnector) {
|
|
4664
|
+
const snapConnection = this._snapConnection;
|
|
4665
|
+
if (fClosestConnector) {
|
|
4666
|
+
const line = this._getLineToClosestSourceConnector(fClosestConnector, snapConnection);
|
|
4667
|
+
snapConnection.show();
|
|
4668
|
+
snapConnection.setLine(line, fClosestConnector.fConnector.fConnectableSide, this._targetConnector.fConnectableSide);
|
|
4669
|
+
snapConnection.redraw();
|
|
4670
|
+
}
|
|
4671
|
+
else {
|
|
4672
|
+
snapConnection.hide();
|
|
4673
|
+
}
|
|
4674
|
+
}
|
|
4675
|
+
_getLineToClosestSourceConnector(fClosestInput, snapConnection) {
|
|
4676
|
+
return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(fClosestInput.fRect, this._targetConnectorAndRect.fRect, snapConnection.fBehavior, fClosestInput.fConnector.fConnectableSide, this._targetConnector.fConnectableSide));
|
|
4677
|
+
}
|
|
4678
|
+
onPointerUp() {
|
|
4679
|
+
this._drawConnection(this._connectorRect, this._sourceConnectorAndRect.fConnector.fConnectableSide);
|
|
4680
|
+
this._snapConnection?.hide();
|
|
4681
|
+
this._mediator.execute(new UnmarkConnectableConnectorsRequest(this._connectableConnectors.map((x) => x.fConnector)));
|
|
4682
|
+
}
|
|
4683
|
+
}
|
|
4684
|
+
|
|
4386
4685
|
class FReassignConnectionDragHandler {
|
|
4387
|
-
|
|
4686
|
+
_connection;
|
|
4687
|
+
_isTargetDragHandle;
|
|
4388
4688
|
fEventType = 'reassign-connection';
|
|
4389
4689
|
fData;
|
|
4390
4690
|
_fResult;
|
|
4391
4691
|
_fMediator;
|
|
4392
|
-
|
|
4393
|
-
_toConnectorRect = new RoundedRect();
|
|
4692
|
+
_store;
|
|
4394
4693
|
get _fSnapConnection() {
|
|
4395
|
-
return this.
|
|
4694
|
+
return this._store.fSnapConnection;
|
|
4396
4695
|
}
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
_canBeConnectedInputs = [];
|
|
4400
|
-
get _fOutput() {
|
|
4401
|
-
const result = this._fComponentsStore.fOutputs.find((x) => x.fId === this._fConnection.fOutputId);
|
|
4696
|
+
get _sourceConnector() {
|
|
4697
|
+
const result = this._store.fOutputs.find((x) => x.fId === this._connection.fOutputId);
|
|
4402
4698
|
if (!result) {
|
|
4403
4699
|
throw new Error('Connection output not found');
|
|
4404
4700
|
}
|
|
4405
4701
|
return result;
|
|
4406
4702
|
}
|
|
4407
|
-
get
|
|
4408
|
-
const result = this.
|
|
4703
|
+
get _targetConnector() {
|
|
4704
|
+
const result = this._store.fInputs.find((x) => x.fId === this._connection.fInputId);
|
|
4409
4705
|
if (!result) {
|
|
4410
4706
|
throw new Error('Connection input not found');
|
|
4411
4707
|
}
|
|
4412
4708
|
return result;
|
|
4413
4709
|
}
|
|
4414
|
-
|
|
4415
|
-
this.
|
|
4710
|
+
get _sourceConnectorAndRect() {
|
|
4711
|
+
return this._fMediator.execute(new GetConnectorAndRectRequest(this._sourceConnector));
|
|
4712
|
+
}
|
|
4713
|
+
get _targetConnectorAndRect() {
|
|
4714
|
+
return this._fMediator.execute(new GetConnectorAndRectRequest(this._targetConnector));
|
|
4715
|
+
}
|
|
4716
|
+
_reassignHandler;
|
|
4717
|
+
constructor(_injector, _connection, _isTargetDragHandle) {
|
|
4718
|
+
this._connection = _connection;
|
|
4719
|
+
this._isTargetDragHandle = _isTargetDragHandle;
|
|
4416
4720
|
this._fResult = _injector.get(FDragHandlerResult);
|
|
4417
4721
|
this._fMediator = _injector.get(FMediator);
|
|
4418
|
-
this.
|
|
4419
|
-
this._toConnectorRect = RoundedRect.fromRect(RectExtensions.initialize(this._fConnection.line.point2.x, this._fConnection.line.point2.y));
|
|
4722
|
+
this._store = _injector.get(FComponentsStore);
|
|
4420
4723
|
this.fData = {
|
|
4421
|
-
fConnectionId: this.
|
|
4724
|
+
fConnectionId: this._connection.fId()
|
|
4422
4725
|
};
|
|
4726
|
+
this._reassignHandler = this._isTargetDragHandle ? this._targetDragHandler() : this._sourceDragHandler();
|
|
4727
|
+
}
|
|
4728
|
+
_sourceDragHandler() {
|
|
4729
|
+
return new FReassignSourceDragHandler(this._fMediator, this._connection, this._sourceConnectorAndRect, this._targetConnectorAndRect);
|
|
4730
|
+
}
|
|
4731
|
+
_targetDragHandler() {
|
|
4732
|
+
return new FReassignTargetDragHandler(this._fMediator, this._connection, this._sourceConnectorAndRect, this._targetConnectorAndRect);
|
|
4423
4733
|
}
|
|
4424
4734
|
prepareDragSequence() {
|
|
4425
|
-
this.
|
|
4426
|
-
this.
|
|
4427
|
-
this._fOutputWithRect = this._fMediator.execute(new GetConnectorAndRectRequest(this._fOutput));
|
|
4428
|
-
this._fInputWithRect = this._fMediator.execute(new GetConnectorAndRectRequest(this._fInput));
|
|
4735
|
+
this._reassignHandler.markConnectableConnector();
|
|
4736
|
+
this._reassignHandler.initializeSnapConnection(this._fSnapConnection);
|
|
4429
4737
|
this._fResult.setData({
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4738
|
+
isTargetDragHandle: this._isTargetDragHandle,
|
|
4739
|
+
sourceConnectorRect: roundedRectFromPoint(this._connection.line.point1),
|
|
4740
|
+
targetConnectorRect: roundedRectFromPoint(this._connection.line.point2),
|
|
4741
|
+
connectableConnectors: this._reassignHandler.getConnectableConnectors(),
|
|
4742
|
+
fConnection: this._connection
|
|
4433
4743
|
});
|
|
4434
4744
|
}
|
|
4435
|
-
_getAndMarkCanBeConnectedInputs() {
|
|
4436
|
-
this._canBeConnectedInputs = this._fMediator.execute(new GetAllCanBeConnectedInputsAndRectsRequest(this._fOutput));
|
|
4437
|
-
this._fMediator.execute(new MarkAllCanBeConnectedInputsRequest(this._canBeConnectedInputs.map((x) => x.fConnector)));
|
|
4438
|
-
}
|
|
4439
|
-
_initializeSnapConnection() {
|
|
4440
|
-
if (!this._fSnapConnection) {
|
|
4441
|
-
return;
|
|
4442
|
-
}
|
|
4443
|
-
this._fSnapConnection.fOutputId = this._fConnection.fOutputId;
|
|
4444
|
-
this._fSnapConnection.initialize();
|
|
4445
|
-
}
|
|
4446
4745
|
onPointerMove(difference) {
|
|
4447
|
-
|
|
4448
|
-
this._drawConnection(this._toConnectorRect.addPoint(difference), fClosestInput?.fConnector.fConnectableSide || this._fInputWithRect.fConnector.fConnectableSide);
|
|
4449
|
-
if (this._fSnapConnection) {
|
|
4450
|
-
this._drawSnapConnection(this._getClosestInputForSnapConnection(fClosestInput));
|
|
4451
|
-
}
|
|
4452
|
-
}
|
|
4453
|
-
_drawConnection(difference, fSide) {
|
|
4454
|
-
const line = this._getLineToPointer(difference, fSide);
|
|
4455
|
-
this._fConnection.setLine(line, this._fOutputWithRect.fConnector.fConnectableSide, fSide);
|
|
4456
|
-
this._fConnection.redraw();
|
|
4457
|
-
}
|
|
4458
|
-
_getLineToPointer(difference, fSide) {
|
|
4459
|
-
return this._fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this._fOutputWithRect.fRect, RoundedRect.fromRect(RectExtensions.initialize(difference.x, difference.y)), this._fConnection.fBehavior, this._fOutputWithRect.fConnector.fConnectableSide, fSide));
|
|
4460
|
-
}
|
|
4461
|
-
_drawSnapConnection(fClosestInput) {
|
|
4462
|
-
if (fClosestInput) {
|
|
4463
|
-
const line = this._getLineToClosestInput(fClosestInput);
|
|
4464
|
-
this._fSnapConnection.show();
|
|
4465
|
-
this._fSnapConnection.setLine(line, this._fOutputWithRect.fConnector.fConnectableSide, fClosestInput.fConnector.fConnectableSide);
|
|
4466
|
-
this._fSnapConnection.redraw();
|
|
4467
|
-
}
|
|
4468
|
-
else {
|
|
4469
|
-
this._fSnapConnection?.hide();
|
|
4470
|
-
}
|
|
4471
|
-
}
|
|
4472
|
-
_getLineToClosestInput(fClosestInput) {
|
|
4473
|
-
return this._fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this._fOutputWithRect.fRect, fClosestInput.fRect, this._fSnapConnection.fBehavior, this._fOutputWithRect.fConnector.fConnectableSide, fClosestInput.fConnector.fConnectableSide));
|
|
4474
|
-
}
|
|
4475
|
-
_findClosestInput(difference) {
|
|
4476
|
-
return this._fMediator.execute(new CalculateClosestInputRequest(this._toConnectorRect.addPoint(difference), this._canBeConnectedInputs));
|
|
4477
|
-
}
|
|
4478
|
-
_getClosestInputForSnapConnection(fClosestInput) {
|
|
4479
|
-
return fClosestInput && fClosestInput.distance < this._fSnapConnection.fSnapThreshold ? fClosestInput : undefined;
|
|
4746
|
+
this._reassignHandler.onPointerMove(difference);
|
|
4480
4747
|
}
|
|
4481
4748
|
onPointerUp() {
|
|
4482
|
-
this.
|
|
4483
|
-
this._fSnapConnection?.hide();
|
|
4484
|
-
this._fMediator.execute(new UnmarkAllCanBeConnectedInputsRequest(this._canBeConnectedInputs.map((x) => x.fConnector)));
|
|
4749
|
+
this._reassignHandler.onPointerUp();
|
|
4485
4750
|
}
|
|
4486
4751
|
}
|
|
4487
4752
|
|
|
4488
4753
|
class FReassignConnectionEvent {
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
this.
|
|
4499
|
-
this.
|
|
4754
|
+
connectionId;
|
|
4755
|
+
isSourceReassign;
|
|
4756
|
+
isTargetReassign;
|
|
4757
|
+
oldSourceId;
|
|
4758
|
+
newSourceId;
|
|
4759
|
+
oldTargetId;
|
|
4760
|
+
newTargetId;
|
|
4761
|
+
dropPoint;
|
|
4762
|
+
constructor(connectionId, isSourceReassign, isTargetReassign, oldSourceId, newSourceId, oldTargetId, newTargetId, dropPoint) {
|
|
4763
|
+
this.connectionId = connectionId;
|
|
4764
|
+
this.isSourceReassign = isSourceReassign;
|
|
4765
|
+
this.isTargetReassign = isTargetReassign;
|
|
4766
|
+
this.oldSourceId = oldSourceId;
|
|
4767
|
+
this.newSourceId = newSourceId;
|
|
4768
|
+
this.oldTargetId = oldTargetId;
|
|
4769
|
+
this.newTargetId = newTargetId;
|
|
4770
|
+
this.dropPoint = dropPoint;
|
|
4500
4771
|
}
|
|
4501
4772
|
}
|
|
4502
4773
|
|
|
4503
4774
|
let FReassignConnectionFinalizeExecution = class FReassignConnectionFinalizeExecution {
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4775
|
+
_dragResult = inject(FDragHandlerResult);
|
|
4776
|
+
_mediator = inject(FMediator);
|
|
4777
|
+
_store = inject(FComponentsStore);
|
|
4778
|
+
_draggableContext = inject(FDraggableDataContext);
|
|
4508
4779
|
get _fDraggable() {
|
|
4509
|
-
return this.
|
|
4780
|
+
return this._store.fDraggable;
|
|
4510
4781
|
}
|
|
4511
4782
|
get _fDragHandler() {
|
|
4512
|
-
return this.
|
|
4783
|
+
return this._draggableContext.draggableItems[0];
|
|
4513
4784
|
}
|
|
4514
4785
|
handle(request) {
|
|
4515
4786
|
if (!this._isDroppedConnectionReassignEvent()) {
|
|
@@ -4519,27 +4790,33 @@ let FReassignConnectionFinalizeExecution = class FReassignConnectionFinalizeExec
|
|
|
4519
4790
|
this._fDragHandler.onPointerUp();
|
|
4520
4791
|
}
|
|
4521
4792
|
_isDroppedConnectionReassignEvent() {
|
|
4522
|
-
return this.
|
|
4793
|
+
return this._draggableContext.draggableItems.some((x) => x instanceof FReassignConnectionDragHandler);
|
|
4523
4794
|
}
|
|
4524
4795
|
_applyReassignEvent(event) {
|
|
4525
|
-
const
|
|
4526
|
-
if (!!
|
|
4796
|
+
const fConnector = this._findConnectableConnectorUsingPriorityAndPosition(event);
|
|
4797
|
+
if (!!fConnector && !this._isReassignToDifferentConnector(fConnector)) {
|
|
4527
4798
|
return;
|
|
4528
4799
|
}
|
|
4529
|
-
this._emitReassignConnectionEvent(event,
|
|
4800
|
+
this._emitReassignConnectionEvent(event, fConnector);
|
|
4530
4801
|
}
|
|
4531
|
-
|
|
4532
|
-
return this.
|
|
4802
|
+
_findConnectableConnectorUsingPriorityAndPosition(event) {
|
|
4803
|
+
return this._mediator.execute(new FindConnectableConnectorUsingPriorityAndPositionRequest(event.getPosition(), this._dragResult.getData().connectableConnectors));
|
|
4533
4804
|
}
|
|
4534
|
-
|
|
4535
|
-
|
|
4805
|
+
_isReassignToDifferentConnector(fConnector) {
|
|
4806
|
+
if (!this._dragResult.getData().isTargetDragHandle) {
|
|
4807
|
+
return this._dragResult.getData().fConnection.fInputId !== fConnector.fId;
|
|
4808
|
+
}
|
|
4809
|
+
else {
|
|
4810
|
+
return this._dragResult.getData().fConnection.fOutputId !== fConnector.fId;
|
|
4811
|
+
}
|
|
4536
4812
|
}
|
|
4537
|
-
_emitReassignConnectionEvent(event,
|
|
4538
|
-
this._fDraggable.fReassignConnection.emit(this._getEventData(event,
|
|
4813
|
+
_emitReassignConnectionEvent(event, fConnector) {
|
|
4814
|
+
this._fDraggable.fReassignConnection.emit(this._getEventData(event, fConnector));
|
|
4539
4815
|
}
|
|
4540
|
-
_getEventData(event,
|
|
4541
|
-
const fConnection = this.
|
|
4542
|
-
|
|
4816
|
+
_getEventData(event, fConnector) {
|
|
4817
|
+
const fConnection = this._dragResult.getData().fConnection;
|
|
4818
|
+
const isTargetDragHandle = this._dragResult.getData().isTargetDragHandle;
|
|
4819
|
+
return new FReassignConnectionEvent(fConnection.fId(), !isTargetDragHandle, isTargetDragHandle, fConnection.fOutputId, !isTargetDragHandle ? fConnector?.fId : undefined, fConnection.fInputId, isTargetDragHandle ? fConnector?.fId : undefined, event.getPosition());
|
|
4543
4820
|
}
|
|
4544
4821
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FReassignConnectionFinalizeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4545
4822
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FReassignConnectionFinalizeExecution });
|
|
@@ -4561,6 +4838,23 @@ class FReassignConnectionPreparationRequest {
|
|
|
4561
4838
|
}
|
|
4562
4839
|
}
|
|
4563
4840
|
|
|
4841
|
+
function isPointerInsideStartOrEndDragHandles(connection, position) {
|
|
4842
|
+
return isDragHandleEnd(connection, position) || isDragHandleStart(connection, position);
|
|
4843
|
+
}
|
|
4844
|
+
function isDragHandleEnd(connection, position) {
|
|
4845
|
+
return connection.fDragHandleEnd()?.point
|
|
4846
|
+
&& _isPointInsideCircle(position, connection.fDragHandleEnd().point)
|
|
4847
|
+
&& !connection.fDraggingDisabled;
|
|
4848
|
+
}
|
|
4849
|
+
function isDragHandleStart(connection, position) {
|
|
4850
|
+
return !!connection.fDragHandleStart()?.point
|
|
4851
|
+
&& _isPointInsideCircle(position, connection.fDragHandleStart().point)
|
|
4852
|
+
&& !connection.fDraggingDisabled && connection.fReassignableStart();
|
|
4853
|
+
}
|
|
4854
|
+
function _isPointInsideCircle(point, circleCenter) {
|
|
4855
|
+
return (point.x - circleCenter.x) ** 2 + (point.y - circleCenter.y) ** 2 <= 8 ** 2;
|
|
4856
|
+
}
|
|
4857
|
+
|
|
4564
4858
|
let FReassignConnectionPreparationExecution = class FReassignConnectionPreparationExecution {
|
|
4565
4859
|
_fMediator = inject(FMediator);
|
|
4566
4860
|
_fComponentsStore = inject(FComponentsStore);
|
|
@@ -4577,19 +4871,20 @@ let FReassignConnectionPreparationExecution = class FReassignConnectionPreparati
|
|
|
4577
4871
|
return this._fComponentsStore.fConnections;
|
|
4578
4872
|
}
|
|
4579
4873
|
handle(request) {
|
|
4580
|
-
|
|
4874
|
+
const position = this._getPointInFlow(request);
|
|
4875
|
+
if (!this._isValid(position) || !this._isValidTrigger(request)) {
|
|
4581
4876
|
return;
|
|
4582
4877
|
}
|
|
4583
4878
|
this._fDraggableDataContext.onPointerDownScale = this._transform.scale;
|
|
4584
4879
|
this._fDraggableDataContext.onPointerDownPosition = Point.fromPoint(request.event.getPosition())
|
|
4585
4880
|
.elementTransform(this._fHost).div(this._transform.scale);
|
|
4586
4881
|
this._fDraggableDataContext.draggableItems = [
|
|
4587
|
-
new FReassignConnectionDragHandler(this._injector, this._fConnection)
|
|
4882
|
+
new FReassignConnectionDragHandler(this._injector, this._fConnection, isDragHandleEnd(this._fConnection, position))
|
|
4588
4883
|
];
|
|
4589
4884
|
setTimeout(() => this._updateConnectionLayer());
|
|
4590
4885
|
}
|
|
4591
|
-
_isValid(
|
|
4592
|
-
this._fConnection = this._getConnectionToReassign(
|
|
4886
|
+
_isValid(position) {
|
|
4887
|
+
this._fConnection = this._getConnectionToReassign(position);
|
|
4593
4888
|
return !!this._fConnection && !this._fDraggableDataContext.draggableItems.length;
|
|
4594
4889
|
}
|
|
4595
4890
|
_isValidTrigger(request) {
|
|
@@ -4606,12 +4901,7 @@ let FReassignConnectionPreparationExecution = class FReassignConnectionPreparati
|
|
|
4606
4901
|
return connections.length ? connections[0] : undefined;
|
|
4607
4902
|
}
|
|
4608
4903
|
_getConnectionsFromPoint(position) {
|
|
4609
|
-
return this._fConnections.filter((x) =>
|
|
4610
|
-
return x.fDragHandle?.point && this._isPointInsideCircle(position, x.fDragHandle.point) && !x.fDraggingDisabled;
|
|
4611
|
-
});
|
|
4612
|
-
}
|
|
4613
|
-
_isPointInsideCircle(point, circleCenter) {
|
|
4614
|
-
return (point.x - circleCenter.x) ** 2 + (point.y - circleCenter.y) ** 2 <= 8 ** 2;
|
|
4904
|
+
return this._fConnections.filter((x) => isPointerInsideStartOrEndDragHandles(x, position));
|
|
4615
4905
|
}
|
|
4616
4906
|
_updateConnectionLayer() {
|
|
4617
4907
|
this._fMediator.execute(new UpdateItemAndChildrenLayersRequest(this._fConnection, this._fComponentsStore.fCanvas.fConnectionsContainer().nativeElement));
|
|
@@ -4912,7 +5202,7 @@ let PutInputConnectionHandlersToArrayExecution = class PutInputConnectionHandler
|
|
|
4912
5202
|
request.fDragHandler.fTargetHandlers.push(fHandler);
|
|
4913
5203
|
}
|
|
4914
5204
|
_getExistingConnectionHandler(fHandlers, fConnection) {
|
|
4915
|
-
return fHandlers.find((x) => x.fConnection.fId === fConnection.fId);
|
|
5205
|
+
return fHandlers.find((x) => x.fConnection.fId() === fConnection.fId());
|
|
4916
5206
|
}
|
|
4917
5207
|
_createConnectionHandler(outputIds, fConnection) {
|
|
4918
5208
|
let result;
|
|
@@ -4975,7 +5265,7 @@ let PutOutputConnectionHandlersToArrayExecution = class PutOutputConnectionHandl
|
|
|
4975
5265
|
request.fDragHandler.fSourceHandlers.push(fHandler);
|
|
4976
5266
|
}
|
|
4977
5267
|
_getExistingConnectionHandler(fHandlers, fConnection) {
|
|
4978
|
-
return fHandlers.find((x) => x.fConnection.fId === fConnection.fId);
|
|
5268
|
+
return fHandlers.find((x) => x.fConnection.fId() === fConnection.fId());
|
|
4979
5269
|
}
|
|
4980
5270
|
_createConnectionHandler(inputIds, fConnection) {
|
|
4981
5271
|
let result;
|
|
@@ -5144,7 +5434,7 @@ class FSummaryNodeMoveDragHandler {
|
|
|
5144
5434
|
this._fComponentStore = _injector.get(FComponentsStore);
|
|
5145
5435
|
this._fBoundsLimiter = new PointBoundsLimiter(_injector, this.commonRect, limits);
|
|
5146
5436
|
this.fData = {
|
|
5147
|
-
fNodeIds: this.fHandlers.map((x) => x.fNode.fId)
|
|
5437
|
+
fNodeIds: this.fHandlers.map((x) => x.fNode.fId())
|
|
5148
5438
|
};
|
|
5149
5439
|
}
|
|
5150
5440
|
onPointerMove(difference) {
|
|
@@ -5192,7 +5482,7 @@ let CreateMoveNodesDragModelFromSelectionExecution = class CreateMoveNodesDragMo
|
|
|
5192
5482
|
_getNodesToDragWithCommonLimits(fDraggedNodes) {
|
|
5193
5483
|
return fDraggedNodes.reduce((result, x) => {
|
|
5194
5484
|
result.push(x);
|
|
5195
|
-
return result.concat(this._getChildrenNodes(x.fId));
|
|
5485
|
+
return result.concat(this._getChildrenNodes(x.fId()));
|
|
5196
5486
|
}, []);
|
|
5197
5487
|
}
|
|
5198
5488
|
_getNodesMoveLimits(fNodes, fParentNodes, fDraggedNodes) {
|
|
@@ -5217,14 +5507,14 @@ let CreateMoveNodesDragModelFromSelectionExecution = class CreateMoveNodesDragMo
|
|
|
5217
5507
|
return flatMap(fNodes, (fNode) => this._getNodeOutputIds(fNode));
|
|
5218
5508
|
}
|
|
5219
5509
|
_getNodeOutputIds(fNode) {
|
|
5220
|
-
return this._fComponentsStore.fOutputs.filter((x) => fNode.fId === x.fNodeId)
|
|
5510
|
+
return this._fComponentsStore.fOutputs.filter((x) => fNode.fId() === x.fNodeId)
|
|
5221
5511
|
.map((x) => x.fId);
|
|
5222
5512
|
}
|
|
5223
5513
|
_getAllInputIds(fNodes) {
|
|
5224
5514
|
return flatMap(fNodes, (fNode) => this._getNodeInputIds(fNode));
|
|
5225
5515
|
}
|
|
5226
5516
|
_getNodeInputIds(fNode) {
|
|
5227
|
-
return this._fComponentsStore.fInputs.filter((x) => fNode.fId === x.fNodeId)
|
|
5517
|
+
return this._fComponentsStore.fInputs.filter((x) => fNode.fId() === x.fNodeId)
|
|
5228
5518
|
.map((x) => x.fId);
|
|
5229
5519
|
}
|
|
5230
5520
|
_mapToNodeDragHandlers(items) {
|
|
@@ -5597,7 +5887,7 @@ let FNodeMoveFinalizeExecution = class FNodeMoveFinalizeExecution {
|
|
|
5597
5887
|
const event = this._getItems()[0].fData.fNodeIds.map((id) => {
|
|
5598
5888
|
return {
|
|
5599
5889
|
id,
|
|
5600
|
-
position: this._fComponentsStore.fNodes.find(x => x.fId === id).position,
|
|
5890
|
+
position: this._fComponentsStore.fNodes.find(x => x.fId() === id).position,
|
|
5601
5891
|
};
|
|
5602
5892
|
});
|
|
5603
5893
|
this._fComponentsStore.fDraggable?.fMoveNodes.emit(new FMoveNodesEvent(event));
|
|
@@ -5679,7 +5969,7 @@ let FNodeDropToGroupFinalizeExecution = class FNodeDropToGroupFinalizeExecution
|
|
|
5679
5969
|
}
|
|
5680
5970
|
const item = this._getDragHandleItem();
|
|
5681
5971
|
if (item.fNodeWithRect) {
|
|
5682
|
-
this._emitDroppedChildrenEvent(item.fNodeWithRect.node.fId, request.event);
|
|
5972
|
+
this._emitDroppedChildrenEvent(item.fNodeWithRect.node.fId(), request.event);
|
|
5683
5973
|
}
|
|
5684
5974
|
item.onPointerUp?.();
|
|
5685
5975
|
}
|
|
@@ -5704,7 +5994,7 @@ let FNodeDropToGroupFinalizeExecution = class FNodeDropToGroupFinalizeExecution
|
|
|
5704
5994
|
_getDraggedNodeIds() {
|
|
5705
5995
|
return this._fDraggableDataContext.draggableItems
|
|
5706
5996
|
.find((x) => x instanceof FSummaryNodeMoveDragHandler)?.fHandlers
|
|
5707
|
-
.map((x) => x.fNode.fId) || [];
|
|
5997
|
+
.map((x) => x.fNode.fId()) || [];
|
|
5708
5998
|
}
|
|
5709
5999
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FNodeDropToGroupFinalizeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5710
6000
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FNodeDropToGroupFinalizeExecution });
|
|
@@ -5956,7 +6246,7 @@ let FExternalItemFinalizeExecution = class FExternalItemFinalizeExecution {
|
|
|
5956
6246
|
}
|
|
5957
6247
|
_getDestinationNodeOrGroupId() {
|
|
5958
6248
|
const dropToGroupHandler = this._getDropToGroupHandler();
|
|
5959
|
-
let result = dropToGroupHandler.fNodeWithRect?.node.fId;
|
|
6249
|
+
let result = dropToGroupHandler.fNodeWithRect?.node.fId();
|
|
5960
6250
|
dropToGroupHandler.onPointerUp?.();
|
|
5961
6251
|
return result;
|
|
5962
6252
|
}
|
|
@@ -6527,7 +6817,7 @@ let GetNormalizedChildrenNodesRectExecution = class GetNormalizedChildrenNodesRe
|
|
|
6527
6817
|
this.fMediator = fMediator;
|
|
6528
6818
|
}
|
|
6529
6819
|
handle(request) {
|
|
6530
|
-
const childNodeRect = RectExtensions.union(this.getChildrenNodes(request.fNode.fId).map((x) => this.normalizeRect(x)));
|
|
6820
|
+
const childNodeRect = RectExtensions.union(this.getChildrenNodes(request.fNode.fId()).map((x) => this.normalizeRect(x)));
|
|
6531
6821
|
return childNodeRect ?
|
|
6532
6822
|
this.concatRectWithParentPadding(childNodeRect, request.paddings) : null;
|
|
6533
6823
|
}
|
|
@@ -6540,7 +6830,7 @@ let GetNormalizedChildrenNodesRectExecution = class GetNormalizedChildrenNodesRe
|
|
|
6540
6830
|
concatRectWithParentPadding(rect, padding) {
|
|
6541
6831
|
return RectExtensions.initialize(rect.x - padding[0], rect.y - padding[1], rect.width + padding[0] + padding[2], rect.height + +padding[1] + padding[3]);
|
|
6542
6832
|
}
|
|
6543
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedChildrenNodesRectExecution, deps: [{ token:
|
|
6833
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedChildrenNodesRectExecution, deps: [{ token: i1$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6544
6834
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedChildrenNodesRectExecution });
|
|
6545
6835
|
};
|
|
6546
6836
|
GetNormalizedChildrenNodesRectExecution = __decorate([
|
|
@@ -6548,7 +6838,7 @@ GetNormalizedChildrenNodesRectExecution = __decorate([
|
|
|
6548
6838
|
], GetNormalizedChildrenNodesRectExecution);
|
|
6549
6839
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedChildrenNodesRectExecution, decorators: [{
|
|
6550
6840
|
type: Injectable
|
|
6551
|
-
}], ctorParameters: () => [{ type:
|
|
6841
|
+
}], ctorParameters: () => [{ type: i1$1.FMediator }] });
|
|
6552
6842
|
|
|
6553
6843
|
class GetNodeResizeRestrictionsRequest {
|
|
6554
6844
|
fNode;
|
|
@@ -6609,7 +6899,7 @@ class FNodeResizeDragHandler {
|
|
|
6609
6899
|
this._fNode = _fNode;
|
|
6610
6900
|
this._fResizeHandleType = _fResizeHandleType;
|
|
6611
6901
|
this.fData = {
|
|
6612
|
-
fNodeId: _fNode.fId,
|
|
6902
|
+
fNodeId: _fNode.fId(),
|
|
6613
6903
|
};
|
|
6614
6904
|
this._fMediator = _injector.get(FMediator);
|
|
6615
6905
|
}
|
|
@@ -6815,7 +7105,7 @@ class FNodeRotateDragHandler {
|
|
|
6815
7105
|
this._fTargetHandlers = _fTargetHandlers;
|
|
6816
7106
|
this._startRotation = this._fNode.rotate;
|
|
6817
7107
|
this.fData = {
|
|
6818
|
-
fNodeId: _fNode.fId,
|
|
7108
|
+
fNodeId: _fNode.fId(),
|
|
6819
7109
|
};
|
|
6820
7110
|
this._fComponentsStore = _injector.get(FComponentsStore);
|
|
6821
7111
|
this._fMediator = _injector.get(FMediator);
|
|
@@ -7040,7 +7330,7 @@ let FSingleSelectExecution = class FSingleSelectExecution {
|
|
|
7040
7330
|
}
|
|
7041
7331
|
_getConnection(element) {
|
|
7042
7332
|
return this._fComponentsStore.fConnections
|
|
7043
|
-
.find(c => c.isContains(element) || c.fConnectionCenter?.nativeElement?.contains(element));
|
|
7333
|
+
.find(c => c.isContains(element) || c.fConnectionCenter()?.nativeElement?.contains(element));
|
|
7044
7334
|
}
|
|
7045
7335
|
_updateItemAndChildrenLayers(fItem) {
|
|
7046
7336
|
if (fItem) {
|
|
@@ -7252,6 +7542,11 @@ class EventExtensions {
|
|
|
7252
7542
|
}
|
|
7253
7543
|
|
|
7254
7544
|
const MOUSE_EVENT_IGNORE_TIME = 800;
|
|
7545
|
+
/**
|
|
7546
|
+
* Base class for implementing drag and drop functionality.
|
|
7547
|
+
* It handles mouse and touch events, manages the drag start sequence,
|
|
7548
|
+
* and provides abstract methods for derived classes to implement specific behaviors.
|
|
7549
|
+
*/
|
|
7255
7550
|
class DragAndDropBase {
|
|
7256
7551
|
ngZone;
|
|
7257
7552
|
document;
|
|
@@ -7273,6 +7568,12 @@ class DragAndDropBase {
|
|
|
7273
7568
|
constructor(ngZone) {
|
|
7274
7569
|
this.ngZone = ngZone;
|
|
7275
7570
|
}
|
|
7571
|
+
/**
|
|
7572
|
+
* Handles the mouse down event to initiate the drag sequence.
|
|
7573
|
+
* It checks if the event is synthetic or fake, and if the drag is already started.
|
|
7574
|
+
* If not, it sets up the drag start sequence by adding necessary event listeners.
|
|
7575
|
+
* @param event - The mouse event that triggered the drag.
|
|
7576
|
+
*/
|
|
7276
7577
|
onMouseDown = (event) => {
|
|
7277
7578
|
const isSyntheticEvent = this.isSyntheticEvent(event);
|
|
7278
7579
|
const isFakeEvent = isFakeMousedownFromScreenReader(event);
|
|
@@ -7301,6 +7602,12 @@ class DragAndDropBase {
|
|
|
7301
7602
|
};
|
|
7302
7603
|
}
|
|
7303
7604
|
};
|
|
7605
|
+
/**
|
|
7606
|
+
* Handles the touch down event to initiate the drag sequence.
|
|
7607
|
+
* It checks if the event is synthetic or fake, and if the drag is already started.
|
|
7608
|
+
* If not, it sets up the drag start sequence by adding necessary event listeners.
|
|
7609
|
+
* @param event - The touch event that triggered the drag.
|
|
7610
|
+
*/
|
|
7304
7611
|
onTouchDown = (event) => {
|
|
7305
7612
|
const isFakeEvent = isFakeTouchstartFromScreenReader(event);
|
|
7306
7613
|
const touchEvent = new ITouchDownEvent(event);
|
|
@@ -7328,15 +7635,39 @@ class DragAndDropBase {
|
|
|
7328
7635
|
};
|
|
7329
7636
|
}
|
|
7330
7637
|
};
|
|
7638
|
+
/**
|
|
7639
|
+
* Handles the select start event.
|
|
7640
|
+
* This method is called when the user starts selecting text or elements.
|
|
7641
|
+
* It prevents the default behavior and calls the onSelect method to handle the selection.
|
|
7642
|
+
* @param event - The event that triggered the select start.
|
|
7643
|
+
*/
|
|
7331
7644
|
onSelectStart = (event) => {
|
|
7332
7645
|
this.onSelect(event);
|
|
7333
7646
|
};
|
|
7647
|
+
/**
|
|
7648
|
+
* Handles the mouse move event during the drag sequence.
|
|
7649
|
+
* It checks if the drag sequence should start and calls the move handler accordingly.
|
|
7650
|
+
* @param event - The mouse event that triggered the move.
|
|
7651
|
+
*/
|
|
7334
7652
|
onMouseMove = (event) => {
|
|
7335
7653
|
this.moveHandler(new IMouseEvent(event));
|
|
7336
7654
|
};
|
|
7655
|
+
/**
|
|
7656
|
+
* Handles the touch move event during the drag sequence.
|
|
7657
|
+
* It checks if the drag sequence should start and calls the move handler accordingly.
|
|
7658
|
+
* @param event - The touch event that triggered the move.
|
|
7659
|
+
*/
|
|
7337
7660
|
onTouchMove = (event) => {
|
|
7338
7661
|
this.moveHandler(new ITouchMoveEvent(event));
|
|
7339
7662
|
};
|
|
7663
|
+
/**
|
|
7664
|
+
* Checks if the drag sequence should start based on the pointer position.
|
|
7665
|
+
* It compares the current pointer position with the initial drag start position
|
|
7666
|
+
* and checks if the distance exceeds the drag start threshold.
|
|
7667
|
+
* If the threshold is exceeded and the delay has passed,
|
|
7668
|
+
* it prepares the drag sequence and sets the move handler to onPointerMove.
|
|
7669
|
+
* @param event - The pointer event that triggered the check.
|
|
7670
|
+
*/
|
|
7340
7671
|
checkDragSequenceToStart(event) {
|
|
7341
7672
|
const pointerPosition = event.getPosition();
|
|
7342
7673
|
if (!this.isDragStarted && this.pointerDownElement) {
|
|
@@ -7360,12 +7691,25 @@ class DragAndDropBase {
|
|
|
7360
7691
|
}
|
|
7361
7692
|
}
|
|
7362
7693
|
}
|
|
7694
|
+
/**
|
|
7695
|
+
* Handles the pointer up event at the end of the drag sequence.
|
|
7696
|
+
* It checks if the drag has started and calls the onPointerUp method.
|
|
7697
|
+
* It also ends the drag sequence by resetting the state and removing event listeners.
|
|
7698
|
+
* This method is called when the user releases the mouse button or lifts their finger from the touch screen.
|
|
7699
|
+
* @param event - The pointer event that triggered the up action.
|
|
7700
|
+
*/
|
|
7363
7701
|
onPointerUpEvent = (event) => {
|
|
7364
7702
|
if (this.isDragStarted) {
|
|
7365
7703
|
this.onPointerUp(new IPointerUpEvent(event));
|
|
7366
7704
|
}
|
|
7367
7705
|
this.endDragSequence();
|
|
7368
7706
|
};
|
|
7707
|
+
/**
|
|
7708
|
+
* Ends the drag sequence by resetting the state and removing event listeners.
|
|
7709
|
+
* It sets the isDragStarted flag to false, clears the pointerDownElement,
|
|
7710
|
+
* and resets the moveHandler to checkDragSequenceToStart.
|
|
7711
|
+
* It also removes all mouse and touch event listeners that were added during the drag sequence.
|
|
7712
|
+
*/
|
|
7369
7713
|
endDragSequence() {
|
|
7370
7714
|
this.isDragStarted = false;
|
|
7371
7715
|
this.pointerDownElement = null;
|
|
@@ -7807,7 +8151,7 @@ let MinimapDragPreparationExecution = class MinimapDragPreparationExecution {
|
|
|
7807
8151
|
getFlowRect() {
|
|
7808
8152
|
return RectExtensions.fromElement(this.flowHost);
|
|
7809
8153
|
}
|
|
7810
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MinimapDragPreparationExecution, deps: [{ token: FComponentsStore }, { token:
|
|
8154
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MinimapDragPreparationExecution, deps: [{ token: FComponentsStore }, { token: i1$1.FMediator }, { token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7811
8155
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MinimapDragPreparationExecution });
|
|
7812
8156
|
};
|
|
7813
8157
|
MinimapDragPreparationExecution = __decorate([
|
|
@@ -7815,7 +8159,7 @@ MinimapDragPreparationExecution = __decorate([
|
|
|
7815
8159
|
], MinimapDragPreparationExecution);
|
|
7816
8160
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MinimapDragPreparationExecution, decorators: [{
|
|
7817
8161
|
type: Injectable
|
|
7818
|
-
}], ctorParameters: () => [{ type: FComponentsStore }, { type:
|
|
8162
|
+
}], ctorParameters: () => [{ type: FComponentsStore }, { type: i1$1.FMediator }, { type: FDraggableDataContext }] });
|
|
7819
8163
|
|
|
7820
8164
|
const MINIMAP_DRAG_PREPARATION_PROVIDERS = [
|
|
7821
8165
|
MinimapDragPreparationExecution,
|
|
@@ -8251,6 +8595,9 @@ class ClearSelectionRequest {
|
|
|
8251
8595
|
static fToken = Symbol('ClearSelectionRequest');
|
|
8252
8596
|
}
|
|
8253
8597
|
|
|
8598
|
+
/**
|
|
8599
|
+
* Execution that clears the selection of items in the FDraggableDataContext.
|
|
8600
|
+
*/
|
|
8254
8601
|
let ClearSelectionExecution = class ClearSelectionExecution {
|
|
8255
8602
|
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
8256
8603
|
handle(request) {
|
|
@@ -8280,11 +8627,16 @@ class GetNormalizedElementRectRequest {
|
|
|
8280
8627
|
}
|
|
8281
8628
|
}
|
|
8282
8629
|
|
|
8630
|
+
/**
|
|
8631
|
+
* Execution that retrieves the normalized rectangle of an element.
|
|
8632
|
+
* It calculates the rectangle based on the element's position and size,
|
|
8633
|
+
* adjusting for the canvas transformation and element offsets.
|
|
8634
|
+
*/
|
|
8283
8635
|
let GetNormalizedElementRectExecution = class GetNormalizedElementRectExecution {
|
|
8284
|
-
|
|
8285
|
-
|
|
8636
|
+
_store = inject(FComponentsStore);
|
|
8637
|
+
_mediator = inject(FMediator);
|
|
8286
8638
|
get _transform() {
|
|
8287
|
-
return this.
|
|
8639
|
+
return this._store.fCanvas.transform;
|
|
8288
8640
|
}
|
|
8289
8641
|
handle(request) {
|
|
8290
8642
|
const systemRect = this._getElementRoundedRect(request);
|
|
@@ -8310,7 +8662,7 @@ let GetNormalizedElementRectExecution = class GetNormalizedElementRectExecution
|
|
|
8310
8662
|
return RoundedRect.fromRect(RectExtensions.fromElement(request.element));
|
|
8311
8663
|
}
|
|
8312
8664
|
_normalizePosition(rect) {
|
|
8313
|
-
return this.
|
|
8665
|
+
return this._mediator.execute(new GetNormalizedPointRequest(rect));
|
|
8314
8666
|
}
|
|
8315
8667
|
_unscaleSize(rect) {
|
|
8316
8668
|
return SizeExtensions.initialize(rect.width / this._transform.scale, rect.height / this._transform.scale);
|
|
@@ -8331,37 +8683,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8331
8683
|
type: Injectable
|
|
8332
8684
|
}] });
|
|
8333
8685
|
|
|
8686
|
+
/**
|
|
8687
|
+
* Execution that retrieves elements that can be selected in the Flow, along with their bounding rectangles.
|
|
8688
|
+
* It filters out elements that are already selected in the FDraggableDataContext.
|
|
8689
|
+
*/
|
|
8334
8690
|
let GetCanBeSelectedItemsExecution = class GetCanBeSelectedItemsExecution {
|
|
8335
|
-
|
|
8336
|
-
|
|
8691
|
+
_mediator = inject(FMediator);
|
|
8692
|
+
_store = inject(FComponentsStore);
|
|
8337
8693
|
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
8338
8694
|
get fNodes() {
|
|
8339
|
-
return this.
|
|
8695
|
+
return this._store.fNodes;
|
|
8340
8696
|
}
|
|
8341
8697
|
get fConnections() {
|
|
8342
|
-
return this.
|
|
8698
|
+
return this._store.fConnections;
|
|
8343
8699
|
}
|
|
8344
8700
|
get transform() {
|
|
8345
|
-
return this.
|
|
8701
|
+
return this._store.fCanvas.transform;
|
|
8346
8702
|
}
|
|
8347
8703
|
handle() {
|
|
8348
8704
|
return [...this.getNodesWithRects(), ...this.getConnectionsWithRects()].filter((x) => {
|
|
8349
8705
|
return !this._fDraggableDataContext.selectedItems.includes(x.element);
|
|
8350
8706
|
});
|
|
8351
8707
|
}
|
|
8708
|
+
/**
|
|
8709
|
+
* Retrieves nodes with their bounding rectangles that can be selected.
|
|
8710
|
+
* @private
|
|
8711
|
+
*/
|
|
8352
8712
|
getNodesWithRects() {
|
|
8353
8713
|
return this.fNodes.filter((x) => !x.fSelectionDisabled).map((x) => {
|
|
8354
8714
|
return {
|
|
8355
8715
|
element: x,
|
|
8356
|
-
fRect: RectExtensions.mult(this.
|
|
8716
|
+
fRect: RectExtensions.mult(this._mediator.execute(new GetNormalizedElementRectRequest(x.hostElement)), this.transform.scale)
|
|
8357
8717
|
};
|
|
8358
8718
|
});
|
|
8359
8719
|
}
|
|
8720
|
+
/**
|
|
8721
|
+
* Retrieves connections with their bounding rectangles that can be selected.
|
|
8722
|
+
* @private
|
|
8723
|
+
*/
|
|
8360
8724
|
getConnectionsWithRects() {
|
|
8361
8725
|
return this.fConnections.filter((x) => !x.fSelectionDisabled).map((x) => {
|
|
8362
8726
|
return {
|
|
8363
8727
|
element: x,
|
|
8364
|
-
fRect: RectExtensions.mult(this.
|
|
8728
|
+
fRect: RectExtensions.mult(this._mediator.execute(new GetNormalizedElementRectRequest(x.boundingElement)), this.transform.scale)
|
|
8365
8729
|
};
|
|
8366
8730
|
});
|
|
8367
8731
|
}
|
|
@@ -8379,6 +8743,9 @@ class GetCurrentSelectionRequest {
|
|
|
8379
8743
|
static fToken = Symbol('GetCurrentSelectionRequest');
|
|
8380
8744
|
}
|
|
8381
8745
|
|
|
8746
|
+
/**
|
|
8747
|
+
* Execution that retrieves the current selection of items in the FDraggableDataContext.
|
|
8748
|
+
*/
|
|
8382
8749
|
let GetCurrentSelectionExecution = class GetCurrentSelectionExecution {
|
|
8383
8750
|
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
8384
8751
|
handle() {
|
|
@@ -8425,23 +8792,26 @@ class SelectRequest {
|
|
|
8425
8792
|
}
|
|
8426
8793
|
}
|
|
8427
8794
|
|
|
8795
|
+
/**
|
|
8796
|
+
* Execution that handles the selection of nodes and connections in the FFlow.
|
|
8797
|
+
*/
|
|
8428
8798
|
let SelectExecution = class SelectExecution {
|
|
8429
8799
|
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
8430
|
-
|
|
8800
|
+
_store = inject(FComponentsStore);
|
|
8431
8801
|
handle(request) {
|
|
8432
8802
|
this._fDraggableDataContext.selectedItems.forEach((x) => {
|
|
8433
8803
|
x.unmarkAsSelected();
|
|
8434
8804
|
});
|
|
8435
8805
|
this._fDraggableDataContext.selectedItems = [];
|
|
8436
8806
|
request.nodes.forEach((key) => {
|
|
8437
|
-
const node = this.
|
|
8807
|
+
const node = this._store.fNodes.find((x) => x.fId() === key);
|
|
8438
8808
|
if (node) {
|
|
8439
8809
|
node.markAsSelected();
|
|
8440
8810
|
this._fDraggableDataContext.selectedItems.push(node);
|
|
8441
8811
|
}
|
|
8442
8812
|
});
|
|
8443
8813
|
request.connections.forEach((key) => {
|
|
8444
|
-
const connection = this.
|
|
8814
|
+
const connection = this._store.fConnections.find((x) => x.fId() === key);
|
|
8445
8815
|
if (connection) {
|
|
8446
8816
|
connection.markAsSelected();
|
|
8447
8817
|
this._fDraggableDataContext.selectedItems.push(connection);
|
|
@@ -8463,19 +8833,23 @@ class SelectAllRequest {
|
|
|
8463
8833
|
static fToken = Symbol('SelectAllRequest');
|
|
8464
8834
|
}
|
|
8465
8835
|
|
|
8836
|
+
/**
|
|
8837
|
+
* Execution that selects all components in the FComponentsStore.
|
|
8838
|
+
* It marks all nodes and connections as selected and updates the selected items in the FDraggableDataContext.
|
|
8839
|
+
*/
|
|
8466
8840
|
let SelectAllExecution = class SelectAllExecution {
|
|
8467
8841
|
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
8468
|
-
|
|
8842
|
+
_store = inject(FComponentsStore);
|
|
8469
8843
|
handle(request) {
|
|
8470
8844
|
this._fDraggableDataContext.selectedItems.forEach((x) => {
|
|
8471
8845
|
x.unmarkAsSelected();
|
|
8472
8846
|
});
|
|
8473
8847
|
this._fDraggableDataContext.selectedItems = [];
|
|
8474
|
-
this.
|
|
8848
|
+
this._store.fNodes.forEach((x) => {
|
|
8475
8849
|
x.markAsSelected();
|
|
8476
8850
|
this._fDraggableDataContext.selectedItems.push(x);
|
|
8477
8851
|
});
|
|
8478
|
-
this.
|
|
8852
|
+
this._store.fConnections.forEach((x) => {
|
|
8479
8853
|
x.markAsSelected();
|
|
8480
8854
|
this._fDraggableDataContext.selectedItems.push(x);
|
|
8481
8855
|
});
|
|
@@ -8514,6 +8888,10 @@ class MoveFrontElementsBeforeTargetElementRequest {
|
|
|
8514
8888
|
}
|
|
8515
8889
|
}
|
|
8516
8890
|
|
|
8891
|
+
/**
|
|
8892
|
+
* Execution that moves elements in the FItemsContainer before a target element.
|
|
8893
|
+
* It removes elements that should not be in front and inserts them before the target element.
|
|
8894
|
+
*/
|
|
8517
8895
|
let MoveFrontElementsBeforeTargetElementExecution = class MoveFrontElementsBeforeTargetElementExecution {
|
|
8518
8896
|
handle(request) {
|
|
8519
8897
|
const elementsToMove = [];
|
|
@@ -8556,8 +8934,12 @@ class GetDeepChildrenNodesAndGroupsRequest {
|
|
|
8556
8934
|
}
|
|
8557
8935
|
}
|
|
8558
8936
|
|
|
8937
|
+
/**
|
|
8938
|
+
* Execution that retrieves all deep children nodes and groups from the FComponentsStore.
|
|
8939
|
+
* It traverses the node hierarchy to find all descendants of a given node.
|
|
8940
|
+
*/
|
|
8559
8941
|
let GetDeepChildrenNodesAndGroupsExecution = class GetDeepChildrenNodesAndGroupsExecution {
|
|
8560
|
-
|
|
8942
|
+
_store = inject(FComponentsStore);
|
|
8561
8943
|
handle(request) {
|
|
8562
8944
|
return this._getChildrenNodes(request.fId);
|
|
8563
8945
|
}
|
|
@@ -8566,9 +8948,9 @@ let GetDeepChildrenNodesAndGroupsExecution = class GetDeepChildrenNodesAndGroups
|
|
|
8566
8948
|
throw new Error('Circular reference detected in the node hierarchy. Node id: ' + fId);
|
|
8567
8949
|
}
|
|
8568
8950
|
visited.add(fId);
|
|
8569
|
-
const directChildren = this.
|
|
8951
|
+
const directChildren = this._store.fNodes.filter((x) => x.fParentId === fId);
|
|
8570
8952
|
return directChildren.reduce((result, x) => {
|
|
8571
|
-
return result.concat(this._getChildrenNodes(x.fId, visited));
|
|
8953
|
+
return result.concat(this._getChildrenNodes(x.fId(), visited));
|
|
8572
8954
|
}, directChildren);
|
|
8573
8955
|
}
|
|
8574
8956
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetDeepChildrenNodesAndGroupsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -8581,11 +8963,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8581
8963
|
type: Injectable
|
|
8582
8964
|
}] });
|
|
8583
8965
|
|
|
8966
|
+
/**
|
|
8967
|
+
* Execution that updates the layers of an item and its children in the FCanvas.
|
|
8968
|
+
* It handles different item containers (groups, nodes, connections) and updates their layers accordingly.
|
|
8969
|
+
*/
|
|
8584
8970
|
let UpdateItemAndChildrenLayersExecution = class UpdateItemAndChildrenLayersExecution {
|
|
8585
|
-
|
|
8586
|
-
|
|
8971
|
+
_store = inject(FComponentsStore);
|
|
8972
|
+
_mediator = inject(FMediator);
|
|
8587
8973
|
get _fCanvas() {
|
|
8588
|
-
return this.
|
|
8974
|
+
return this._store.fCanvas;
|
|
8589
8975
|
}
|
|
8590
8976
|
get _fGroupsContainer() {
|
|
8591
8977
|
return this._fCanvas.fGroupsContainer().nativeElement;
|
|
@@ -8612,7 +8998,7 @@ let UpdateItemAndChildrenLayersExecution = class UpdateItemAndChildrenLayersExec
|
|
|
8612
8998
|
}
|
|
8613
8999
|
}
|
|
8614
9000
|
_handleGroup(request) {
|
|
8615
|
-
const childrenNodesAndGroups = this._getChildrenNodesAndGroups(request.item.fId);
|
|
9001
|
+
const childrenNodesAndGroups = this._getChildrenNodesAndGroups(request.item.fId());
|
|
8616
9002
|
const childrenGroups = this._getChildrenGroups(childrenNodesAndGroups);
|
|
8617
9003
|
this._updateLayers(this._fGroupsContainer, request.item.hostElement, childrenGroups);
|
|
8618
9004
|
const childrenNodes = this._getChildrenNodes(childrenNodesAndGroups);
|
|
@@ -8621,7 +9007,7 @@ let UpdateItemAndChildrenLayersExecution = class UpdateItemAndChildrenLayersExec
|
|
|
8621
9007
|
}
|
|
8622
9008
|
}
|
|
8623
9009
|
_handleNode(request) {
|
|
8624
|
-
const childrenNodesAndGroups = this._getChildrenNodesAndGroups(request.item.fId);
|
|
9010
|
+
const childrenNodesAndGroups = this._getChildrenNodesAndGroups(request.item.fId());
|
|
8625
9011
|
const childrenNodes = this._getChildrenNodes(childrenNodesAndGroups);
|
|
8626
9012
|
this._updateLayers(request.itemContainer, request.item.hostElement, childrenNodes);
|
|
8627
9013
|
}
|
|
@@ -8632,7 +9018,7 @@ let UpdateItemAndChildrenLayersExecution = class UpdateItemAndChildrenLayersExec
|
|
|
8632
9018
|
const allElements = Array.from(itemContainer.children);
|
|
8633
9019
|
const targetIndex = allElements.findIndex((x) => x === item);
|
|
8634
9020
|
if (this._isAnythingNeedToBeMoved(allElements, targetIndex, elementsThatShouldBeInFront)) {
|
|
8635
|
-
this.
|
|
9021
|
+
this._mediator.execute(new MoveFrontElementsBeforeTargetElementRequest(itemContainer, allElements, elementsThatShouldBeInFront, targetIndex));
|
|
8636
9022
|
}
|
|
8637
9023
|
}
|
|
8638
9024
|
_isAnythingNeedToBeMoved(allElements, targetIndex, elementsThatShouldBeInFront) {
|
|
@@ -8654,7 +9040,7 @@ let UpdateItemAndChildrenLayersExecution = class UpdateItemAndChildrenLayersExec
|
|
|
8654
9040
|
.sort((a, b) => allElements.indexOf(a) - allElements.indexOf(b));
|
|
8655
9041
|
}
|
|
8656
9042
|
_getChildrenNodesAndGroups(fId) {
|
|
8657
|
-
return this.
|
|
9043
|
+
return this._mediator.execute(new GetDeepChildrenNodesAndGroupsRequest(fId)).map((x) => x.hostElement);
|
|
8658
9044
|
}
|
|
8659
9045
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UpdateItemAndChildrenLayersExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8660
9046
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UpdateItemAndChildrenLayersExecution });
|
|
@@ -8666,25 +9052,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8666
9052
|
type: Injectable
|
|
8667
9053
|
}] });
|
|
8668
9054
|
|
|
9055
|
+
/**
|
|
9056
|
+
* Execution that selects a node and updates its layer along with its children.
|
|
9057
|
+
* It checks if the node is already selected, and if not, it marks it as selected
|
|
9058
|
+
* and updates the layers of the node and its children.
|
|
9059
|
+
*/
|
|
8669
9060
|
let SelectAndUpdateNodeLayerExecution = class SelectAndUpdateNodeLayerExecution {
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
constructor(fDraggableDataContext, fMediator) {
|
|
8673
|
-
this.fDraggableDataContext = fDraggableDataContext;
|
|
8674
|
-
this.fMediator = fMediator;
|
|
8675
|
-
}
|
|
9061
|
+
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
9062
|
+
_mediator = inject(FMediator);
|
|
8676
9063
|
handle(request) {
|
|
8677
9064
|
this.selectNodeIfNotSelected(request.fNode);
|
|
8678
|
-
this.
|
|
9065
|
+
this._mediator.execute(new UpdateItemAndChildrenLayersRequest(request.fNode, request.fNode.hostElement.parentElement));
|
|
8679
9066
|
}
|
|
8680
9067
|
selectNodeIfNotSelected(fNode) {
|
|
8681
|
-
if (!this.
|
|
8682
|
-
this.
|
|
9068
|
+
if (!this._fDraggableDataContext.selectedItems.includes(fNode) && !fNode.fSelectionDisabled) {
|
|
9069
|
+
this._fDraggableDataContext.selectedItems.push(fNode);
|
|
8683
9070
|
fNode.markAsSelected();
|
|
8684
|
-
this.
|
|
9071
|
+
this._fDraggableDataContext.isSelectedChanged = true;
|
|
8685
9072
|
}
|
|
8686
9073
|
}
|
|
8687
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SelectAndUpdateNodeLayerExecution, deps: [
|
|
9074
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SelectAndUpdateNodeLayerExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8688
9075
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SelectAndUpdateNodeLayerExecution });
|
|
8689
9076
|
};
|
|
8690
9077
|
SelectAndUpdateNodeLayerExecution = __decorate([
|
|
@@ -8692,8 +9079,11 @@ SelectAndUpdateNodeLayerExecution = __decorate([
|
|
|
8692
9079
|
], SelectAndUpdateNodeLayerExecution);
|
|
8693
9080
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SelectAndUpdateNodeLayerExecution, decorators: [{
|
|
8694
9081
|
type: Injectable
|
|
8695
|
-
}]
|
|
9082
|
+
}] });
|
|
8696
9083
|
|
|
9084
|
+
/**
|
|
9085
|
+
* This module provides a collection of executions related to selection features in the FFlow domain.
|
|
9086
|
+
*/
|
|
8697
9087
|
const F_SELECTION_FEATURES = [
|
|
8698
9088
|
ClearSelectionExecution,
|
|
8699
9089
|
GetCanBeSelectedItemsExecution,
|
|
@@ -8703,11 +9093,15 @@ const F_SELECTION_FEATURES = [
|
|
|
8703
9093
|
SelectAndUpdateNodeLayerExecution
|
|
8704
9094
|
];
|
|
8705
9095
|
|
|
9096
|
+
/**
|
|
9097
|
+
* Execution that emits a selection change event when the selection changes.
|
|
9098
|
+
* It retrieves the current selection and emits it through the FSelectionChangeEvent.
|
|
9099
|
+
*/
|
|
8706
9100
|
let EmitSelectionChangeEventExecution = class EmitSelectionChangeEventExecution {
|
|
8707
|
-
|
|
8708
|
-
|
|
9101
|
+
_mediator = inject(FMediator);
|
|
9102
|
+
_store = inject(FComponentsStore);
|
|
8709
9103
|
get _fSelectionChange() {
|
|
8710
|
-
return this.
|
|
9104
|
+
return this._store.fDraggable.fSelectionChange;
|
|
8711
9105
|
}
|
|
8712
9106
|
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
8713
9107
|
handle(request) {
|
|
@@ -8716,10 +9110,10 @@ let EmitSelectionChangeEventExecution = class EmitSelectionChangeEventExecution
|
|
|
8716
9110
|
}
|
|
8717
9111
|
this._emitSelectionChange(this._getSelection());
|
|
8718
9112
|
this._fDraggableDataContext.isSelectedChanged = false;
|
|
8719
|
-
this.
|
|
9113
|
+
this._mediator.execute(new NotifyTransformChangedRequest());
|
|
8720
9114
|
}
|
|
8721
9115
|
_getSelection() {
|
|
8722
|
-
return this.
|
|
9116
|
+
return this._mediator.execute(new GetCurrentSelectionRequest());
|
|
8723
9117
|
}
|
|
8724
9118
|
_emitSelectionChange(selection) {
|
|
8725
9119
|
this._fSelectionChange.emit(new FSelectionChangeEvent(selection.fNodeIds, selection.fGroupIds, selection.fConnectionIds));
|
|
@@ -8738,10 +9132,13 @@ class EndDragSequenceRequest {
|
|
|
8738
9132
|
static fToken = Symbol('EndDragSequenceRequest');
|
|
8739
9133
|
}
|
|
8740
9134
|
|
|
9135
|
+
/**
|
|
9136
|
+
* Execution that handles the end of a drag sequence.
|
|
9137
|
+
*/
|
|
8741
9138
|
let EndDragSequenceExecution = class EndDragSequenceExecution {
|
|
8742
|
-
|
|
9139
|
+
_store = inject(FComponentsStore);
|
|
8743
9140
|
get _hostElement() {
|
|
8744
|
-
return this.
|
|
9141
|
+
return this._store.fDraggable.hostElement;
|
|
8745
9142
|
}
|
|
8746
9143
|
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
8747
9144
|
handle(request) {
|
|
@@ -8750,7 +9147,7 @@ let EndDragSequenceExecution = class EndDragSequenceExecution {
|
|
|
8750
9147
|
this._emitDragEnded();
|
|
8751
9148
|
}
|
|
8752
9149
|
_emitDragEnded() {
|
|
8753
|
-
this.
|
|
9150
|
+
this._store.fDraggable?.fDragEnded?.emit();
|
|
8754
9151
|
}
|
|
8755
9152
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EndDragSequenceExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8756
9153
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EndDragSequenceExecution });
|
|
@@ -8770,10 +9167,15 @@ class OnPointerMoveRequest {
|
|
|
8770
9167
|
}
|
|
8771
9168
|
}
|
|
8772
9169
|
|
|
9170
|
+
/**
|
|
9171
|
+
* Execution that handles pointer move events during a drag operation.
|
|
9172
|
+
* It calculates the difference between the current pointer position and the position
|
|
9173
|
+
* when the drag started, and updates the draggable items accordingly.
|
|
9174
|
+
*/
|
|
8773
9175
|
let OnPointerMoveExecution = class OnPointerMoveExecution {
|
|
8774
|
-
|
|
9176
|
+
_store = inject(FComponentsStore);
|
|
8775
9177
|
get _hostElement() {
|
|
8776
|
-
return this.
|
|
9178
|
+
return this._store.fDraggable.hostElement;
|
|
8777
9179
|
}
|
|
8778
9180
|
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
8779
9181
|
handle(request) {
|
|
@@ -8806,6 +9208,9 @@ class InitializeDragSequenceRequest {
|
|
|
8806
9208
|
static fToken = Symbol('InitializeDragSequenceRequest');
|
|
8807
9209
|
}
|
|
8808
9210
|
|
|
9211
|
+
/**
|
|
9212
|
+
* Execution that initializes the drag sequence by resetting the FDraggableDataContext.
|
|
9213
|
+
*/
|
|
8809
9214
|
let InitializeDragSequenceExecution = class InitializeDragSequenceExecution {
|
|
8810
9215
|
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
8811
9216
|
handle(request) {
|
|
@@ -8825,10 +9230,13 @@ class IsDragStartedRequest {
|
|
|
8825
9230
|
static fToken = Symbol('IsDragStartedRequest');
|
|
8826
9231
|
}
|
|
8827
9232
|
|
|
9233
|
+
/**
|
|
9234
|
+
* Execution that checks if a drag operation has started.
|
|
9235
|
+
*/
|
|
8828
9236
|
let IsDragStartedExecution = class IsDragStartedExecution {
|
|
8829
|
-
|
|
9237
|
+
_store = inject(FComponentsStore);
|
|
8830
9238
|
handle(request) {
|
|
8831
|
-
return !!this.
|
|
9239
|
+
return !!this._store.fDraggable?.isDragStarted;
|
|
8832
9240
|
}
|
|
8833
9241
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IsDragStartedExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8834
9242
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IsDragStartedExecution });
|
|
@@ -8848,22 +9256,25 @@ class StartDragSequenceRequest {
|
|
|
8848
9256
|
static fToken = Symbol('StartDragSequenceRequest');
|
|
8849
9257
|
}
|
|
8850
9258
|
|
|
9259
|
+
/**
|
|
9260
|
+
* Execution that starts the drag sequence by adding a dragging class to the host element
|
|
9261
|
+
*/
|
|
8851
9262
|
let StartDragSequenceExecution = class StartDragSequenceExecution {
|
|
8852
|
-
|
|
8853
|
-
|
|
9263
|
+
_mediator = inject(FMediator);
|
|
9264
|
+
_store = inject(FComponentsStore);
|
|
8854
9265
|
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
8855
9266
|
get _hostElement() {
|
|
8856
|
-
return this.
|
|
9267
|
+
return this._store.fDraggable.hostElement;
|
|
8857
9268
|
}
|
|
8858
9269
|
handle(request) {
|
|
8859
9270
|
if (this._fDraggableDataContext.draggableItems.length > 0) {
|
|
8860
9271
|
this._hostElement.classList.add(F_CSS_CLASS.DRAG_AND_DROP.DRAGGING);
|
|
8861
|
-
this.
|
|
9272
|
+
this._mediator.execute(new EmitSelectionChangeEventRequest());
|
|
8862
9273
|
this._emitDragStarted();
|
|
8863
9274
|
}
|
|
8864
9275
|
}
|
|
8865
9276
|
_emitDragStarted() {
|
|
8866
|
-
this.
|
|
9277
|
+
this._store.fDraggable?.fDragStarted?.emit({
|
|
8867
9278
|
fEventType: this._fDraggableDataContext.draggableItems[0].fEventType,
|
|
8868
9279
|
fData: { ...this._fDraggableDataContext.draggableItems[0].fData }
|
|
8869
9280
|
});
|
|
@@ -8878,12 +9289,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8878
9289
|
type: Injectable
|
|
8879
9290
|
}] });
|
|
8880
9291
|
|
|
9292
|
+
/**
|
|
9293
|
+
* Execution that prepares the drag sequence by invoking the prepareDragSequence method on each draggable item.
|
|
9294
|
+
*/
|
|
8881
9295
|
let PrepareDragSequenceExecution = class PrepareDragSequenceExecution {
|
|
8882
|
-
|
|
9296
|
+
_mediator = inject(FMediator);
|
|
8883
9297
|
_fDraggableDataContext = inject(FDraggableDataContext);
|
|
8884
9298
|
handle(request) {
|
|
8885
9299
|
this._callPrepareDragSequence();
|
|
8886
|
-
this.
|
|
9300
|
+
this._mediator.execute(new StartDragSequenceRequest());
|
|
8887
9301
|
}
|
|
8888
9302
|
_callPrepareDragSequence() {
|
|
8889
9303
|
this._fDraggableDataContext.draggableItems.forEach((item) => {
|
|
@@ -8904,10 +9318,13 @@ class RemoveDndFromStoreRequest {
|
|
|
8904
9318
|
static fToken = Symbol('RemoveDndFromStoreRequest');
|
|
8905
9319
|
}
|
|
8906
9320
|
|
|
9321
|
+
/**
|
|
9322
|
+
* Execution that removes the drag and drop directive from the FComponentsStore.
|
|
9323
|
+
*/
|
|
8907
9324
|
let RemoveDndFromStoreExecution = class RemoveDndFromStoreExecution {
|
|
8908
|
-
|
|
9325
|
+
_store = inject(FComponentsStore);
|
|
8909
9326
|
handle(request) {
|
|
8910
|
-
this.
|
|
9327
|
+
this._store.fDraggable = undefined;
|
|
8911
9328
|
}
|
|
8912
9329
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveDndFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8913
9330
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveDndFromStoreExecution });
|
|
@@ -8919,6 +9336,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8919
9336
|
type: Injectable
|
|
8920
9337
|
}] });
|
|
8921
9338
|
|
|
9339
|
+
/**
|
|
9340
|
+
* Collection of all FDraggable feature executions.
|
|
9341
|
+
*/
|
|
8922
9342
|
const F_DRAGGABLE_FEATURES = [
|
|
8923
9343
|
AddDndToStoreExecution,
|
|
8924
9344
|
EmitSelectionChangeEventExecution,
|
|
@@ -8939,10 +9359,13 @@ class AddFlowToStoreRequest {
|
|
|
8939
9359
|
}
|
|
8940
9360
|
}
|
|
8941
9361
|
|
|
9362
|
+
/**
|
|
9363
|
+
* Execution that adds a Flow to the FComponentsStore.
|
|
9364
|
+
*/
|
|
8942
9365
|
let AddFlowToStoreExecution = class AddFlowToStoreExecution {
|
|
8943
|
-
|
|
9366
|
+
_store = inject(FComponentsStore);
|
|
8944
9367
|
handle(request) {
|
|
8945
|
-
this.
|
|
9368
|
+
this._store.fFlow = request.fComponent;
|
|
8946
9369
|
}
|
|
8947
9370
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddFlowToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8948
9371
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddFlowToStoreExecution });
|
|
@@ -8958,10 +9381,13 @@ class GetFlowRequest {
|
|
|
8958
9381
|
static fToken = Symbol('GetFlowRequest');
|
|
8959
9382
|
}
|
|
8960
9383
|
|
|
9384
|
+
/**
|
|
9385
|
+
* Execution that retrieves the current Flow from the FComponentsStore.
|
|
9386
|
+
*/
|
|
8961
9387
|
let GetFlowExecution = class GetFlowExecution {
|
|
8962
|
-
|
|
9388
|
+
_store = inject(FComponentsStore);
|
|
8963
9389
|
handle(request) {
|
|
8964
|
-
const result = this.
|
|
9390
|
+
const result = this._store.fFlow;
|
|
8965
9391
|
if (!result) {
|
|
8966
9392
|
throw new Error(`Flow not found in store`);
|
|
8967
9393
|
}
|
|
@@ -8981,10 +9407,13 @@ class GetFlowHostElementRequest {
|
|
|
8981
9407
|
static fToken = Symbol('GetFlowHostElementRequest');
|
|
8982
9408
|
}
|
|
8983
9409
|
|
|
9410
|
+
/**
|
|
9411
|
+
* Execution that retrieves the Flow host element from the FComponentsStore.
|
|
9412
|
+
*/
|
|
8984
9413
|
let GetFlowHostElementExecution = class GetFlowHostElementExecution {
|
|
8985
|
-
|
|
9414
|
+
_store = inject(FComponentsStore);
|
|
8986
9415
|
handle() {
|
|
8987
|
-
return this.
|
|
9416
|
+
return this._store.flowHost;
|
|
8988
9417
|
}
|
|
8989
9418
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowHostElementExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8990
9419
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowHostElementExecution });
|
|
@@ -9000,14 +9429,17 @@ class GetFlowStateConnectionsRequest {
|
|
|
9000
9429
|
static fToken = Symbol('GetFlowStateConnectionsRequest');
|
|
9001
9430
|
}
|
|
9002
9431
|
|
|
9432
|
+
/**
|
|
9433
|
+
* Execution that retrieves the current Flow state connections from the FComponentsStore.
|
|
9434
|
+
*/
|
|
9003
9435
|
let GetFlowStateConnectionsExecution = class GetFlowStateConnectionsExecution {
|
|
9004
|
-
|
|
9436
|
+
_store = inject(FComponentsStore);
|
|
9005
9437
|
handle(request) {
|
|
9006
|
-
return this.
|
|
9438
|
+
return this._store.fConnections.map(this._mapToConnectionState);
|
|
9007
9439
|
}
|
|
9008
9440
|
_mapToConnectionState(x) {
|
|
9009
9441
|
return {
|
|
9010
|
-
id: x.fId,
|
|
9442
|
+
id: x.fId(),
|
|
9011
9443
|
fOutputId: x.fOutputId,
|
|
9012
9444
|
fInputId: x.fInputId,
|
|
9013
9445
|
fType: x.fType,
|
|
@@ -9033,15 +9465,15 @@ class GetFlowStateNodesRequest {
|
|
|
9033
9465
|
}
|
|
9034
9466
|
}
|
|
9035
9467
|
|
|
9468
|
+
/**
|
|
9469
|
+
* Execution that retrieves the state of Flow nodes, including their position, size, inputs, outputs, and selection status.
|
|
9470
|
+
*/
|
|
9036
9471
|
let GetFlowStateNodesExecution = class GetFlowStateNodesExecution {
|
|
9037
|
-
|
|
9038
|
-
constructor(fComponentsStore) {
|
|
9039
|
-
this.fComponentsStore = fComponentsStore;
|
|
9040
|
-
}
|
|
9472
|
+
_store = inject(FComponentsStore);
|
|
9041
9473
|
handle(request) {
|
|
9042
|
-
return this.
|
|
9474
|
+
return this._store.fNodes.filter((x) => x instanceof request.type).map((x) => {
|
|
9043
9475
|
return {
|
|
9044
|
-
id: x.fId,
|
|
9476
|
+
id: x.fId(),
|
|
9045
9477
|
parent: x.fParentId,
|
|
9046
9478
|
position: x.position,
|
|
9047
9479
|
size: x.size,
|
|
@@ -9052,7 +9484,7 @@ let GetFlowStateNodesExecution = class GetFlowStateNodesExecution {
|
|
|
9052
9484
|
});
|
|
9053
9485
|
}
|
|
9054
9486
|
_getOutputs(hostElement) {
|
|
9055
|
-
return this.
|
|
9487
|
+
return this._store.fOutputs.filter((x) => hostElement.contains(x.hostElement)).map((x) => {
|
|
9056
9488
|
return {
|
|
9057
9489
|
id: x.fId,
|
|
9058
9490
|
fConnectableSide: x.fConnectableSide
|
|
@@ -9060,14 +9492,14 @@ let GetFlowStateNodesExecution = class GetFlowStateNodesExecution {
|
|
|
9060
9492
|
});
|
|
9061
9493
|
}
|
|
9062
9494
|
_getInputs(hostElement) {
|
|
9063
|
-
return this.
|
|
9495
|
+
return this._store.fInputs.filter((x) => hostElement.contains(x.hostElement)).map((x) => {
|
|
9064
9496
|
return {
|
|
9065
9497
|
id: x.fId,
|
|
9066
9498
|
fConnectableSide: x.fConnectableSide
|
|
9067
9499
|
};
|
|
9068
9500
|
});
|
|
9069
9501
|
}
|
|
9070
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateNodesExecution, deps: [
|
|
9502
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateNodesExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9071
9503
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateNodesExecution });
|
|
9072
9504
|
};
|
|
9073
9505
|
GetFlowStateNodesExecution = __decorate([
|
|
@@ -9075,22 +9507,25 @@ GetFlowStateNodesExecution = __decorate([
|
|
|
9075
9507
|
], GetFlowStateNodesExecution);
|
|
9076
9508
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateNodesExecution, decorators: [{
|
|
9077
9509
|
type: Injectable
|
|
9078
|
-
}]
|
|
9510
|
+
}] });
|
|
9079
9511
|
|
|
9080
9512
|
class GetFlowStateRequest {
|
|
9081
9513
|
static fToken = Symbol('GetFlowStateRequest');
|
|
9082
9514
|
}
|
|
9083
9515
|
|
|
9516
|
+
/**
|
|
9517
|
+
* Execution that retrieves the current state of the Flow, including its position, scale, nodes, groups, and connections.
|
|
9518
|
+
*/
|
|
9084
9519
|
let GetFlowStateExecution = class GetFlowStateExecution {
|
|
9085
|
-
|
|
9086
|
-
|
|
9520
|
+
_mediator = inject(FMediator);
|
|
9521
|
+
_store = inject(FComponentsStore);
|
|
9087
9522
|
handle(payload) {
|
|
9088
9523
|
return {
|
|
9089
|
-
position: this._getCanvasPosition(this.
|
|
9090
|
-
scale: this.
|
|
9091
|
-
nodes: this.
|
|
9092
|
-
groups: this.
|
|
9093
|
-
connections: this.
|
|
9524
|
+
position: this._getCanvasPosition(this._store.fCanvas.transform),
|
|
9525
|
+
scale: this._store.fCanvas.transform.scale,
|
|
9526
|
+
nodes: this._mediator.execute(new GetFlowStateNodesRequest(FNodeDirective)),
|
|
9527
|
+
groups: this._mediator.execute(new GetFlowStateNodesRequest(FGroupDirective)),
|
|
9528
|
+
connections: this._mediator.execute(new GetFlowStateConnectionsRequest())
|
|
9094
9529
|
};
|
|
9095
9530
|
}
|
|
9096
9531
|
_getCanvasPosition(transform) {
|
|
@@ -9106,6 +9541,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
9106
9541
|
type: Injectable
|
|
9107
9542
|
}] });
|
|
9108
9543
|
|
|
9544
|
+
/**
|
|
9545
|
+
* Providers for retrieving the current Flow state, including nodes, groups, and connections.
|
|
9546
|
+
*/
|
|
9109
9547
|
const GET_FLOW_STATE_PROVIDERS = [
|
|
9110
9548
|
GetFlowStateExecution,
|
|
9111
9549
|
GetFlowStateNodesExecution,
|
|
@@ -9116,10 +9554,13 @@ class RemoveFlowFromStoreRequest {
|
|
|
9116
9554
|
static fToken = Symbol('RemoveFlowFromStoreRequest');
|
|
9117
9555
|
}
|
|
9118
9556
|
|
|
9557
|
+
/**
|
|
9558
|
+
* Execution that removes a Flow from the FComponentsStore.
|
|
9559
|
+
*/
|
|
9119
9560
|
let RemoveFlowFromStoreExecution = class RemoveFlowFromStoreExecution {
|
|
9120
|
-
|
|
9561
|
+
_store = inject(FComponentsStore);
|
|
9121
9562
|
handle(request) {
|
|
9122
|
-
this.
|
|
9563
|
+
this._store.fFlow = undefined;
|
|
9123
9564
|
}
|
|
9124
9565
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveFlowFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9125
9566
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveFlowFromStoreExecution });
|
|
@@ -9131,6 +9572,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
9131
9572
|
type: Injectable
|
|
9132
9573
|
}] });
|
|
9133
9574
|
|
|
9575
|
+
/**
|
|
9576
|
+
* Providers for managing the Flow in the FComponentsStore.
|
|
9577
|
+
* This includes adding, retrieving, and removing the Flow,
|
|
9578
|
+
* as well as getting the Flow host element and its state.
|
|
9579
|
+
*/
|
|
9134
9580
|
const F_FLOW_FEATURES = [
|
|
9135
9581
|
AddFlowToStoreExecution,
|
|
9136
9582
|
GetFlowExecution,
|
|
@@ -9147,10 +9593,13 @@ class AddLineAlignmentToStoreRequest {
|
|
|
9147
9593
|
}
|
|
9148
9594
|
}
|
|
9149
9595
|
|
|
9596
|
+
/**
|
|
9597
|
+
* Execution that adds a line alignment to the FComponentsStore.
|
|
9598
|
+
*/
|
|
9150
9599
|
let AddLineAlignmentToStoreExecution = class AddLineAlignmentToStoreExecution {
|
|
9151
|
-
|
|
9600
|
+
_store = inject(FComponentsStore);
|
|
9152
9601
|
handle(request) {
|
|
9153
|
-
this.
|
|
9602
|
+
this._store.fLineAlignment = request.fComponent;
|
|
9154
9603
|
}
|
|
9155
9604
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddLineAlignmentToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9156
9605
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddLineAlignmentToStoreExecution });
|
|
@@ -9166,10 +9615,13 @@ class RemoveLineAlignmentFromStoreRequest {
|
|
|
9166
9615
|
static fToken = Symbol('RemoveLineAlignmentFromStoreRequest');
|
|
9167
9616
|
}
|
|
9168
9617
|
|
|
9618
|
+
/**
|
|
9619
|
+
* Execution that removes a line alignment from the FComponentsStore.
|
|
9620
|
+
*/
|
|
9169
9621
|
let RemoveLineAlignmentFromStoreExecution = class RemoveLineAlignmentFromStoreExecution {
|
|
9170
|
-
|
|
9622
|
+
_store = inject(FComponentsStore);
|
|
9171
9623
|
handle(request) {
|
|
9172
|
-
this.
|
|
9624
|
+
this._store.fLineAlignment = undefined;
|
|
9173
9625
|
}
|
|
9174
9626
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveLineAlignmentFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9175
9627
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveLineAlignmentFromStoreExecution });
|
|
@@ -9181,6 +9633,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
9181
9633
|
type: Injectable
|
|
9182
9634
|
}] });
|
|
9183
9635
|
|
|
9636
|
+
/**
|
|
9637
|
+
* Collection of all FLineAlignment feature executions.
|
|
9638
|
+
* These executions handle the addition and removal of line alignments
|
|
9639
|
+
* in the FComponentsStore.
|
|
9640
|
+
*/
|
|
9184
9641
|
const F_LINE_ALIGNMENT_FEATURES = [
|
|
9185
9642
|
AddLineAlignmentToStoreExecution,
|
|
9186
9643
|
RemoveLineAlignmentFromStoreExecution
|
|
@@ -9194,10 +9651,13 @@ class AddNodeToStoreRequest {
|
|
|
9194
9651
|
}
|
|
9195
9652
|
}
|
|
9196
9653
|
|
|
9654
|
+
/**
|
|
9655
|
+
* Execution that adds a Node to the FComponentsStore.
|
|
9656
|
+
*/
|
|
9197
9657
|
let AddNodeToStoreExecution = class AddNodeToStoreExecution {
|
|
9198
|
-
|
|
9658
|
+
_store = inject(FComponentsStore);
|
|
9199
9659
|
handle(request) {
|
|
9200
|
-
this.
|
|
9660
|
+
this._store.addComponent(this._store.fNodes, request.fComponent);
|
|
9201
9661
|
}
|
|
9202
9662
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddNodeToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9203
9663
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddNodeToStoreExecution });
|
|
@@ -9217,18 +9677,21 @@ class CalculateInputConnectionsRequest {
|
|
|
9217
9677
|
}
|
|
9218
9678
|
}
|
|
9219
9679
|
|
|
9680
|
+
/**
|
|
9681
|
+
* Execution that calculates input connections for a given FNode.
|
|
9682
|
+
*/
|
|
9220
9683
|
let CalculateInputConnectionsExecution = class CalculateInputConnectionsExecution {
|
|
9221
|
-
|
|
9684
|
+
_store = inject(FComponentsStore);
|
|
9222
9685
|
handle(request) {
|
|
9223
9686
|
return this._calculateConnections(new Set(this._calculateConnectors(request.fNode)));
|
|
9224
9687
|
}
|
|
9225
9688
|
_calculateConnectors(fNode) {
|
|
9226
|
-
return this.
|
|
9689
|
+
return this._store.fInputs
|
|
9227
9690
|
.filter((x) => fNode.isContains(x.hostElement))
|
|
9228
9691
|
.map((x) => x.fId);
|
|
9229
9692
|
}
|
|
9230
9693
|
_calculateConnections(ids) {
|
|
9231
|
-
return this.
|
|
9694
|
+
return this._store.fConnections
|
|
9232
9695
|
.filter((x) => ids.has(x.fInputId));
|
|
9233
9696
|
}
|
|
9234
9697
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateInputConnectionsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -9245,13 +9708,17 @@ class CalculateNodesBoundingBoxRequest {
|
|
|
9245
9708
|
static fToken = Symbol('CalculateNodesBoundingBoxRequest');
|
|
9246
9709
|
}
|
|
9247
9710
|
|
|
9711
|
+
/**
|
|
9712
|
+
* Execution that calculates the bounding box of all nodes in the FComponentsStore.
|
|
9713
|
+
* It retrieves the rectangles of each node's host element and computes their union.
|
|
9714
|
+
*/
|
|
9248
9715
|
let CalculateNodesBoundingBoxExecution = class CalculateNodesBoundingBoxExecution {
|
|
9249
|
-
|
|
9716
|
+
_store = inject(FComponentsStore);
|
|
9250
9717
|
handle(request) {
|
|
9251
9718
|
return RectExtensions.union(this._getNodesRects());
|
|
9252
9719
|
}
|
|
9253
9720
|
_getNodesRects() {
|
|
9254
|
-
return this.
|
|
9721
|
+
return this._store.fNodes.map((x) => {
|
|
9255
9722
|
return this._getElementRect(x.hostElement);
|
|
9256
9723
|
});
|
|
9257
9724
|
}
|
|
@@ -9276,10 +9743,15 @@ class CalculateNodesBoundingBoxNormalizedPositionRequest {
|
|
|
9276
9743
|
}
|
|
9277
9744
|
}
|
|
9278
9745
|
|
|
9746
|
+
/**
|
|
9747
|
+
* Execution that calculates the bounding box of all nodes in the FComponentsStore
|
|
9748
|
+
* and returns their normalized positions.
|
|
9749
|
+
* It retrieves the rectangles of each node's host element and computes their union.
|
|
9750
|
+
*/
|
|
9279
9751
|
let CalculateNodesBoundingBoxNormalizedPositionExecution = class CalculateNodesBoundingBoxNormalizedPositionExecution {
|
|
9280
|
-
|
|
9752
|
+
_store = inject(FComponentsStore);
|
|
9281
9753
|
handle(request) {
|
|
9282
|
-
return RectExtensions.union(this._getNodesRects(request.fNodes || this.
|
|
9754
|
+
return RectExtensions.union(this._getNodesRects(request.fNodes || this._store.fNodes));
|
|
9283
9755
|
}
|
|
9284
9756
|
_getNodesRects(fNodes) {
|
|
9285
9757
|
return fNodes.map((x) => {
|
|
@@ -9307,18 +9779,21 @@ class CalculateOutputConnectionsRequest {
|
|
|
9307
9779
|
}
|
|
9308
9780
|
}
|
|
9309
9781
|
|
|
9782
|
+
/**
|
|
9783
|
+
* Execution that calculates output connections for a given FNode.
|
|
9784
|
+
*/
|
|
9310
9785
|
let CalculateOutputConnectionsExecution = class CalculateOutputConnectionsExecution {
|
|
9311
|
-
|
|
9786
|
+
_store = inject(FComponentsStore);
|
|
9312
9787
|
handle(request) {
|
|
9313
9788
|
return this._calculateConnections(new Set(this._calculateConnectors(request.fNode)));
|
|
9314
9789
|
}
|
|
9315
9790
|
_calculateConnectors(fNode) {
|
|
9316
|
-
return this.
|
|
9791
|
+
return this._store.fOutputs
|
|
9317
9792
|
.filter((x) => fNode.isContains(x.hostElement))
|
|
9318
9793
|
.map((x) => x.fId);
|
|
9319
9794
|
}
|
|
9320
9795
|
_calculateConnections(ids) {
|
|
9321
|
-
return this.
|
|
9796
|
+
return this._store.fConnections
|
|
9322
9797
|
.filter((x) => ids.has(x.fOutputId));
|
|
9323
9798
|
}
|
|
9324
9799
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateOutputConnectionsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -9341,6 +9816,10 @@ class GetNodePaddingRequest {
|
|
|
9341
9816
|
}
|
|
9342
9817
|
}
|
|
9343
9818
|
|
|
9819
|
+
/**
|
|
9820
|
+
* Execution that retrieves the padding data of a Node.
|
|
9821
|
+
* If the Node does not include padding, it returns [0, 0, 0, 0].
|
|
9822
|
+
*/
|
|
9344
9823
|
let GetNodePaddingExecution = class GetNodePaddingExecution {
|
|
9345
9824
|
_browser = inject(BrowserService);
|
|
9346
9825
|
handle(request) {
|
|
@@ -9369,10 +9848,13 @@ class GetNodesRequest {
|
|
|
9369
9848
|
static fToken = Symbol('GetNodesRequest');
|
|
9370
9849
|
}
|
|
9371
9850
|
|
|
9851
|
+
/**
|
|
9852
|
+
* Execution that retrieves all nodes from the FComponentsStore.
|
|
9853
|
+
*/
|
|
9372
9854
|
let GetNodesExecution = class GetNodesExecution {
|
|
9373
|
-
|
|
9855
|
+
_store = inject(FComponentsStore);
|
|
9374
9856
|
handle(request) {
|
|
9375
|
-
return this.
|
|
9857
|
+
return this._store.fNodes;
|
|
9376
9858
|
}
|
|
9377
9859
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodesExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9378
9860
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodesExecution });
|
|
@@ -9392,17 +9874,20 @@ class GetParentNodesRequest {
|
|
|
9392
9874
|
}
|
|
9393
9875
|
}
|
|
9394
9876
|
|
|
9877
|
+
/**
|
|
9878
|
+
* Execution that retrieves all parent nodes of a given node from the FComponentsStore.
|
|
9879
|
+
*/
|
|
9395
9880
|
let GetParentNodesExecution = class GetParentNodesExecution {
|
|
9396
|
-
|
|
9881
|
+
_store = inject(FComponentsStore);
|
|
9397
9882
|
handle(request) {
|
|
9398
9883
|
return this._getParentNodes(request.fNode, new Set(), []);
|
|
9399
9884
|
}
|
|
9400
9885
|
_getParentNodes(fNode, visited, result) {
|
|
9401
|
-
if (visited.has(fNode.fId)) {
|
|
9402
|
-
throw new Error('Circular reference detected in the node hierarchy. Node id: ' + fNode.fId);
|
|
9886
|
+
if (visited.has(fNode.fId())) {
|
|
9887
|
+
throw new Error('Circular reference detected in the node hierarchy. Node id: ' + fNode.fId());
|
|
9403
9888
|
}
|
|
9404
|
-
visited.add(fNode.fId);
|
|
9405
|
-
const parent = this.
|
|
9889
|
+
visited.add(fNode.fId());
|
|
9890
|
+
const parent = this._store.fNodes.find((x) => x.fId() === fNode.fParentId);
|
|
9406
9891
|
if (!parent) {
|
|
9407
9892
|
return result;
|
|
9408
9893
|
}
|
|
@@ -9429,20 +9914,41 @@ class UpdateNodeWhenStateOrSizeChangedRequest {
|
|
|
9429
9914
|
}
|
|
9430
9915
|
}
|
|
9431
9916
|
|
|
9917
|
+
/**
|
|
9918
|
+
* Execution that updates a node's connectors when its state or size changes.
|
|
9919
|
+
*/
|
|
9432
9920
|
let UpdateNodeWhenStateOrSizeChangedExecution = class UpdateNodeWhenStateOrSizeChangedExecution {
|
|
9433
|
-
|
|
9921
|
+
_mediator = inject(FMediator);
|
|
9922
|
+
/**
|
|
9923
|
+
* Handles the request to update the node's connectors based on state or size changes.
|
|
9924
|
+
* It listens for resize events and recalculates the connectable sides of the connectors.
|
|
9925
|
+
* @param request
|
|
9926
|
+
*/
|
|
9434
9927
|
handle(request) {
|
|
9435
9928
|
const { hostElement, connectors, stateChanges } = request.fComponent;
|
|
9436
9929
|
new FChannelHub(new FResizeChannel(hostElement), stateChanges).pipe(notifyOnStart(), debounceTime(10)).listen(request.destroyRef, () => {
|
|
9437
9930
|
this._calculateConnectorsConnectableSide(connectors, hostElement);
|
|
9438
|
-
this.
|
|
9931
|
+
this._mediator.execute(new NotifyDataChangedRequest());
|
|
9439
9932
|
});
|
|
9440
9933
|
}
|
|
9934
|
+
/**
|
|
9935
|
+
* Calculates the connectable side for each connector based on its position relative to the node host.
|
|
9936
|
+
* @param fConnectors
|
|
9937
|
+
* @param fNodeHost
|
|
9938
|
+
* @private
|
|
9939
|
+
*/
|
|
9441
9940
|
_calculateConnectorsConnectableSide(fConnectors, fNodeHost) {
|
|
9442
9941
|
fConnectors.forEach((x) => {
|
|
9443
9942
|
x.fConnectableSide = this._calculateConnectorConnectableSide(x, fNodeHost);
|
|
9444
9943
|
});
|
|
9445
9944
|
}
|
|
9945
|
+
/**
|
|
9946
|
+
* Calculates the connectable side of a connector based on its user-defined side or its position relative to the node host.
|
|
9947
|
+
* @param fConnector
|
|
9948
|
+
* @param fNodeHost
|
|
9949
|
+
* @returns {EFConnectableSide}
|
|
9950
|
+
* @private
|
|
9951
|
+
*/
|
|
9446
9952
|
_calculateConnectorConnectableSide(fConnector, fNodeHost) {
|
|
9447
9953
|
let result;
|
|
9448
9954
|
if (fConnector.userFConnectableSide === EFConnectableSide.AUTO) {
|
|
@@ -9453,6 +9959,12 @@ let UpdateNodeWhenStateOrSizeChangedExecution = class UpdateNodeWhenStateOrSizeC
|
|
|
9453
9959
|
}
|
|
9454
9960
|
return result;
|
|
9455
9961
|
}
|
|
9962
|
+
/**
|
|
9963
|
+
* Determines the side of the connector relative to the node host based on the minimum distance.
|
|
9964
|
+
* @param fConnectorHost
|
|
9965
|
+
* @param fNodeHost
|
|
9966
|
+
* @private
|
|
9967
|
+
*/
|
|
9456
9968
|
_getSideByDelta(fConnectorHost, fNodeHost) {
|
|
9457
9969
|
let result;
|
|
9458
9970
|
const childRect = RectExtensions.fromElement(fConnectorHost);
|
|
@@ -9494,10 +10006,13 @@ class RemoveNodeFromStoreRequest {
|
|
|
9494
10006
|
}
|
|
9495
10007
|
}
|
|
9496
10008
|
|
|
10009
|
+
/**
|
|
10010
|
+
* Execution that removes a node from the FComponentsStore.
|
|
10011
|
+
*/
|
|
9497
10012
|
let RemoveNodeFromStoreExecution = class RemoveNodeFromStoreExecution {
|
|
9498
|
-
|
|
10013
|
+
_store = inject(FComponentsStore);
|
|
9499
10014
|
handle(request) {
|
|
9500
|
-
this.
|
|
10015
|
+
this._store.removeComponent(this._store.fNodes, request.fComponent);
|
|
9501
10016
|
}
|
|
9502
10017
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveNodeFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9503
10018
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveNodeFromStoreExecution });
|
|
@@ -9509,6 +10024,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
9509
10024
|
type: Injectable
|
|
9510
10025
|
}] });
|
|
9511
10026
|
|
|
10027
|
+
/**
|
|
10028
|
+
* This file exports all the node-related executions that can be used in the F-Flow domain.
|
|
10029
|
+
*/
|
|
9512
10030
|
const F_NODE_FEATURES = [
|
|
9513
10031
|
AddNodeToStoreExecution,
|
|
9514
10032
|
CalculateInputConnectionsExecution,
|
|
@@ -9532,10 +10050,13 @@ class AddZoomToStoreRequest {
|
|
|
9532
10050
|
|
|
9533
10051
|
const F_ZOOM_TAG = 'F_ZOOM';
|
|
9534
10052
|
|
|
10053
|
+
/**
|
|
10054
|
+
* Execution that adds a Zoom to the FComponentsStore.
|
|
10055
|
+
*/
|
|
9535
10056
|
let AddZoomToStoreExecution = class AddZoomToStoreExecution {
|
|
9536
|
-
|
|
10057
|
+
_store = inject(FComponentsStore);
|
|
9537
10058
|
handle(request) {
|
|
9538
|
-
this.
|
|
10059
|
+
this._store.fComponents = {
|
|
9539
10060
|
[F_ZOOM_TAG]: request.fComponent
|
|
9540
10061
|
};
|
|
9541
10062
|
}
|
|
@@ -9553,10 +10074,13 @@ class RemoveZoomFromStoreRequest {
|
|
|
9553
10074
|
static fToken = Symbol('RemoveZoomFromStoreRequest');
|
|
9554
10075
|
}
|
|
9555
10076
|
|
|
10077
|
+
/**
|
|
10078
|
+
* Execution that removes a Zoom from the FComponentsStore.
|
|
10079
|
+
*/
|
|
9556
10080
|
let RemoveZoomFromStoreExecution = class RemoveZoomFromStoreExecution {
|
|
9557
|
-
|
|
10081
|
+
_store = inject(FComponentsStore);
|
|
9558
10082
|
handle(request) {
|
|
9559
|
-
this.
|
|
10083
|
+
this._store.fComponents = {
|
|
9560
10084
|
[F_ZOOM_TAG]: undefined
|
|
9561
10085
|
};
|
|
9562
10086
|
}
|
|
@@ -9574,10 +10098,13 @@ class ResetZoomRequest {
|
|
|
9574
10098
|
static fToken = Symbol('ResetZoomRequest');
|
|
9575
10099
|
}
|
|
9576
10100
|
|
|
10101
|
+
/**
|
|
10102
|
+
* Execution that resets the zoom level of the FCanvas.
|
|
10103
|
+
*/
|
|
9577
10104
|
let ResetZoomExecution = class ResetZoomExecution {
|
|
9578
|
-
|
|
10105
|
+
_store = inject(FComponentsStore);
|
|
9579
10106
|
get _fCanvas() {
|
|
9580
|
-
return this.
|
|
10107
|
+
return this._store.fCanvas;
|
|
9581
10108
|
}
|
|
9582
10109
|
handle(request) {
|
|
9583
10110
|
this._fCanvas.resetScale();
|
|
@@ -9608,20 +10135,24 @@ class SetZoomRequest {
|
|
|
9608
10135
|
}
|
|
9609
10136
|
}
|
|
9610
10137
|
|
|
10138
|
+
/**
|
|
10139
|
+
* Execution that sets the zoom level of the FCanvas based on the provided request.
|
|
10140
|
+
* It adjusts the zoom level by a specified step and direction, ensuring it stays within defined limits.
|
|
10141
|
+
*/
|
|
9611
10142
|
let SetZoomExecution = class SetZoomExecution {
|
|
9612
|
-
|
|
9613
|
-
|
|
10143
|
+
_mediator = inject(FMediator);
|
|
10144
|
+
_store = inject(FComponentsStore);
|
|
9614
10145
|
get _fHost() {
|
|
9615
|
-
return this.
|
|
10146
|
+
return this._store.fFlow?.hostElement;
|
|
9616
10147
|
}
|
|
9617
10148
|
get _fCanvas() {
|
|
9618
|
-
return this.
|
|
10149
|
+
return this._store.fCanvas;
|
|
9619
10150
|
}
|
|
9620
10151
|
get _fZoomComponent() {
|
|
9621
|
-
return this.
|
|
10152
|
+
return this._store.fComponents[F_ZOOM_TAG];
|
|
9622
10153
|
}
|
|
9623
10154
|
get _isDragStarted() {
|
|
9624
|
-
return this.
|
|
10155
|
+
return this._mediator.execute(new IsDragStartedRequest());
|
|
9625
10156
|
}
|
|
9626
10157
|
handle(request) {
|
|
9627
10158
|
if (this._isDragStarted || !this._fZoomComponent) {
|
|
@@ -9648,6 +10179,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
9648
10179
|
type: Injectable
|
|
9649
10180
|
}] });
|
|
9650
10181
|
|
|
10182
|
+
/**
|
|
10183
|
+
* Collection of all FZoom feature executions.
|
|
10184
|
+
* These executions handle the addition, removal, and resetting of zoom levels
|
|
10185
|
+
* in the FComponentsStore.
|
|
10186
|
+
*/
|
|
9651
10187
|
const F_ZOOM_FEATURES = [
|
|
9652
10188
|
AddZoomToStoreExecution,
|
|
9653
10189
|
RemoveZoomFromStoreExecution,
|
|
@@ -9659,12 +10195,17 @@ class SortNodeLayersRequest {
|
|
|
9659
10195
|
static fToken = Symbol('SortNodeLayersRequest');
|
|
9660
10196
|
}
|
|
9661
10197
|
|
|
10198
|
+
/**
|
|
10199
|
+
* Execution that sorts node layers by their parent nodes in the FCanvas.
|
|
10200
|
+
* It retrieves all groups, sorts their children nodes based on their current order,
|
|
10201
|
+
* and moves them to maintain the correct hierarchy.
|
|
10202
|
+
*/
|
|
9662
10203
|
let SortNodeLayersExecution = class SortNodeLayersExecution {
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
10204
|
+
_store = inject(FComponentsStore);
|
|
10205
|
+
_mediator = inject(FMediator);
|
|
10206
|
+
_browser = inject(BrowserService);
|
|
9666
10207
|
get _fCanvas() {
|
|
9667
|
-
return this.
|
|
10208
|
+
return this._store.fCanvas;
|
|
9668
10209
|
}
|
|
9669
10210
|
get _fGroupsContainer() {
|
|
9670
10211
|
return this._fCanvas.fGroupsContainer().nativeElement;
|
|
@@ -9681,20 +10222,20 @@ let SortNodeLayersExecution = class SortNodeLayersExecution {
|
|
|
9681
10222
|
});
|
|
9682
10223
|
}
|
|
9683
10224
|
_getGroups() {
|
|
9684
|
-
return this.
|
|
10225
|
+
return this._store.fNodes
|
|
9685
10226
|
.filter((x) => this._fGroupsContainer.contains(x.hostElement));
|
|
9686
10227
|
}
|
|
9687
10228
|
_getSortedChildrenNodes(parent) {
|
|
9688
10229
|
const allElements = this._fNodeElements;
|
|
9689
|
-
return this._getChildrenNodes(parent.fId)
|
|
10230
|
+
return this._getChildrenNodes(parent.fId())
|
|
9690
10231
|
.sort((a, b) => allElements.indexOf(a) - allElements.indexOf(b));
|
|
9691
10232
|
}
|
|
9692
10233
|
_getChildrenNodes(fId) {
|
|
9693
|
-
return this.
|
|
10234
|
+
return this._mediator.execute(new GetDeepChildrenNodesAndGroupsRequest(fId))
|
|
9694
10235
|
.filter((x) => this._fNodesContainer.contains(x.hostElement)).map((x) => x.hostElement);
|
|
9695
10236
|
}
|
|
9696
10237
|
_moveChildrenNodes(sortedChildrenGroups) {
|
|
9697
|
-
const fragment = this.
|
|
10238
|
+
const fragment = this._browser.document.createDocumentFragment();
|
|
9698
10239
|
sortedChildrenGroups.forEach((childGroup) => {
|
|
9699
10240
|
fragment.appendChild(childGroup); // Append automatically removes the element from its current position
|
|
9700
10241
|
});
|
|
@@ -9719,10 +10260,15 @@ class SortItemsByParentRequest {
|
|
|
9719
10260
|
}
|
|
9720
10261
|
}
|
|
9721
10262
|
|
|
10263
|
+
/**
|
|
10264
|
+
* Execution that sorts items by their parent nodes in the FItemsContainer.
|
|
10265
|
+
* It retrieves all items within the container, sorts their children based on their current order,
|
|
10266
|
+
* and moves them to maintain the correct hierarchy.
|
|
10267
|
+
*/
|
|
9722
10268
|
let SortItemsByParentExecution = class SortItemsByParentExecution {
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
10269
|
+
_store = inject(FComponentsStore);
|
|
10270
|
+
_mediator = inject(FMediator);
|
|
10271
|
+
_browser = inject(BrowserService);
|
|
9726
10272
|
_fItemsContainer;
|
|
9727
10273
|
get _fItemElements() {
|
|
9728
10274
|
return Array.from(this._fItemsContainer.children);
|
|
@@ -9734,22 +10280,22 @@ let SortItemsByParentExecution = class SortItemsByParentExecution {
|
|
|
9734
10280
|
});
|
|
9735
10281
|
}
|
|
9736
10282
|
_getItemsOfContainer() {
|
|
9737
|
-
return this.
|
|
10283
|
+
return this._store.fNodes
|
|
9738
10284
|
.filter((x) => this._fItemsContainer.contains(x.hostElement));
|
|
9739
10285
|
}
|
|
9740
10286
|
_getSortedChildrenItems(fItem) {
|
|
9741
10287
|
const indexInContainer = this._fItemElements.indexOf(fItem.hostElement);
|
|
9742
|
-
return this._getChildrenItems(fItem.fId)
|
|
10288
|
+
return this._getChildrenItems(fItem.fId())
|
|
9743
10289
|
.filter((child) => this._fItemElements.indexOf(child) < indexInContainer)
|
|
9744
10290
|
.sort((a, b) => this._fItemElements.indexOf(a) - this._fItemElements.indexOf(b));
|
|
9745
10291
|
}
|
|
9746
10292
|
_getChildrenItems(fId) {
|
|
9747
|
-
return this.
|
|
10293
|
+
return this._mediator.execute(new GetDeepChildrenNodesAndGroupsRequest(fId))
|
|
9748
10294
|
.filter((x) => this._fItemsContainer.contains(x.hostElement)).map((x) => x.hostElement);
|
|
9749
10295
|
}
|
|
9750
10296
|
_moveChildrenItems(sortedChildrenItems, parent) {
|
|
9751
10297
|
let nextSibling = parent.hostElement.nextElementSibling;
|
|
9752
|
-
const fragment = this.
|
|
10298
|
+
const fragment = this._browser.document.createDocumentFragment();
|
|
9753
10299
|
sortedChildrenItems.forEach((child) => {
|
|
9754
10300
|
fragment.appendChild(child); // Append automatically removes the element from its current position
|
|
9755
10301
|
});
|
|
@@ -9769,19 +10315,26 @@ class SortItemLayersRequest {
|
|
|
9769
10315
|
static fToken = Symbol('SortItemLayersRequest');
|
|
9770
10316
|
}
|
|
9771
10317
|
|
|
10318
|
+
/**
|
|
10319
|
+
* Execution that sorts item layers in the FCanvas by their parent nodes.
|
|
10320
|
+
* This execution is registered to handle SortItemLayersRequest and
|
|
10321
|
+
* ensures that items are sorted correctly within their parent nodes.
|
|
10322
|
+
* It first sorts items by their parent nodes in the groups container,
|
|
10323
|
+
* then sorts the node layers, and finally sorts items by their parent nodes in the nodes container.
|
|
10324
|
+
*/
|
|
9772
10325
|
let SortItemLayersExecution = class SortItemLayersExecution {
|
|
9773
|
-
|
|
9774
|
-
|
|
10326
|
+
_store = inject(FComponentsStore);
|
|
10327
|
+
_mediator = inject(FMediator);
|
|
9775
10328
|
get _fCanvas() {
|
|
9776
|
-
return this.
|
|
10329
|
+
return this._store.fCanvas;
|
|
9777
10330
|
}
|
|
9778
10331
|
handle(request) {
|
|
9779
|
-
if (!this.
|
|
10332
|
+
if (!this._store.fCanvas) {
|
|
9780
10333
|
return;
|
|
9781
10334
|
}
|
|
9782
|
-
this.
|
|
9783
|
-
this.
|
|
9784
|
-
this.
|
|
10335
|
+
this._mediator.execute(new SortItemsByParentRequest(this._fCanvas.fGroupsContainer().nativeElement));
|
|
10336
|
+
this._mediator.execute(new SortNodeLayersRequest());
|
|
10337
|
+
this._mediator.execute(new SortItemsByParentRequest(this._fCanvas.fNodesContainer().nativeElement));
|
|
9785
10338
|
}
|
|
9786
10339
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SortItemLayersExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9787
10340
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SortItemLayersExecution });
|
|
@@ -9836,6 +10389,12 @@ function LogExecutionTime(label) {
|
|
|
9836
10389
|
};
|
|
9837
10390
|
}
|
|
9838
10391
|
|
|
10392
|
+
/**
|
|
10393
|
+
* This module provides a collection of common providers for the FFlow domain.
|
|
10394
|
+
* It includes features related to canvas, connections, background, connectors,
|
|
10395
|
+
* draggable elements, flow, line alignment, nodes, selection, zoom,
|
|
10396
|
+
* and various utility executions.
|
|
10397
|
+
*/
|
|
9839
10398
|
const COMMON_PROVIDERS = [
|
|
9840
10399
|
...F_CANVAS_FEATURES,
|
|
9841
10400
|
...F_CONNECTION_FEATURES,
|
|
@@ -10121,8 +10680,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
10121
10680
|
type: Directive
|
|
10122
10681
|
}] });
|
|
10123
10682
|
|
|
10683
|
+
/**
|
|
10684
|
+
* Component representing a canvas in the F-Flow framework.
|
|
10685
|
+
* It handles the rendering of nodes, connections, and groups,
|
|
10686
|
+
* as well as user interactions such as zooming and panning.
|
|
10687
|
+
* It extends the FCanvasBase class and implements OnInit and OnDestroy lifecycle hooks.
|
|
10688
|
+
* It provides methods to manipulate the canvas, such as centering nodes or groups,
|
|
10689
|
+
* fitting the canvas to the screen, and resetting the scale.
|
|
10690
|
+
* It also emits events when the canvas changes, allowing other components to react to these changes.
|
|
10691
|
+
*/
|
|
10124
10692
|
class FCanvasComponent extends FCanvasBase {
|
|
10125
|
-
|
|
10693
|
+
_mediator = inject(FMediator);
|
|
10126
10694
|
_elementReference = inject(ElementRef);
|
|
10127
10695
|
_injector = inject(Injector);
|
|
10128
10696
|
_flowId;
|
|
@@ -10141,41 +10709,69 @@ class FCanvasComponent extends FCanvasBase {
|
|
|
10141
10709
|
return this._flowId;
|
|
10142
10710
|
}
|
|
10143
10711
|
ngOnInit() {
|
|
10144
|
-
this._flowId = this.
|
|
10145
|
-
this.
|
|
10712
|
+
this._flowId = this._mediator.execute(new GetFlowRequest()).fId();
|
|
10713
|
+
this._mediator.execute(new AddCanvasToStoreRequest(this));
|
|
10146
10714
|
this._positionChange();
|
|
10147
10715
|
this._scaleChange();
|
|
10148
10716
|
super.subscribeOnCanvasChange();
|
|
10149
10717
|
}
|
|
10150
10718
|
_positionChange() {
|
|
10151
10719
|
effect(() => {
|
|
10152
|
-
this.
|
|
10720
|
+
this._mediator.execute(new InputCanvasPositionRequest(this.transform, this.position()));
|
|
10153
10721
|
}, { injector: this._injector });
|
|
10154
10722
|
}
|
|
10155
10723
|
_scaleChange() {
|
|
10156
10724
|
effect(() => {
|
|
10157
|
-
this.
|
|
10725
|
+
this._mediator.execute(new InputCanvasScaleRequest(this.transform, this.scale()));
|
|
10158
10726
|
}, { injector: this._injector });
|
|
10159
10727
|
}
|
|
10728
|
+
/**
|
|
10729
|
+
* Redraws the canvas by applying the current transformation.
|
|
10730
|
+
*/
|
|
10160
10731
|
redraw() {
|
|
10161
|
-
this.
|
|
10732
|
+
this._mediator.execute(new SetBackgroundTransformRequest(this.transform));
|
|
10162
10733
|
this.hostElement.setAttribute("style", `transform: ${TransformModelExtensions.toString(this.transform)}`);
|
|
10163
|
-
this.
|
|
10734
|
+
this._mediator.execute(new NotifyTransformChangedRequest());
|
|
10164
10735
|
}
|
|
10736
|
+
/**
|
|
10737
|
+
* Redraws the canvas with an animation effect.
|
|
10738
|
+
* This method applies a CSS transition to the canvas element,
|
|
10739
|
+
* allowing for a smooth visual update of the canvas's transformation.
|
|
10740
|
+
*/
|
|
10165
10741
|
redrawWithAnimation() {
|
|
10166
|
-
this.
|
|
10742
|
+
this._mediator.execute(new SetBackgroundTransformRequest(this.transform));
|
|
10167
10743
|
this.hostElement.setAttribute("style", `transition: transform ${isMobile() ? 80 : 150}ms ease-in-out; transform: ${TransformModelExtensions.toString(this.transform)}`);
|
|
10168
10744
|
transitionEnd(this.hostElement, () => this.redraw());
|
|
10169
10745
|
}
|
|
10746
|
+
/**
|
|
10747
|
+
* Centers the specified group or node on the canvas.
|
|
10748
|
+
* @param id - The ID of the group or node to center.
|
|
10749
|
+
* @param animated - If true, the centering will be animated; otherwise, it will be instantaneous.
|
|
10750
|
+
*/
|
|
10170
10751
|
centerGroupOrNode(id, animated = true) {
|
|
10171
|
-
setTimeout(() => this.
|
|
10752
|
+
setTimeout(() => this._mediator.execute(new CenterGroupOrNodeRequest(id, animated)));
|
|
10172
10753
|
}
|
|
10754
|
+
/**
|
|
10755
|
+
* Fits the canvas to the screen by adjusting the scale and position.
|
|
10756
|
+
* @param toCenter - paddings from the bounds of the canvas
|
|
10757
|
+
* @param animated - If true, the fit will be animated; otherwise, it will be instantaneous.
|
|
10758
|
+
*/
|
|
10173
10759
|
fitToScreen(toCenter = PointExtensions.initialize(), animated = true) {
|
|
10174
|
-
setTimeout(() => this.
|
|
10760
|
+
setTimeout(() => this._mediator.execute(new FitToFlowRequest(toCenter, animated)));
|
|
10175
10761
|
}
|
|
10762
|
+
/**
|
|
10763
|
+
* Resets the scale and center all nodes and groups on the canvas.
|
|
10764
|
+
* This method is used to restore the canvas to its default scale and position,
|
|
10765
|
+
* allowing users to quickly return to a standard view of the canvas content.
|
|
10766
|
+
* @param animated - If true, the reset will be animated; otherwise, it will be instantaneous.
|
|
10767
|
+
* This is useful for providing a smooth user experience when resetting the view.
|
|
10768
|
+
*/
|
|
10176
10769
|
resetScaleAndCenter(animated = true) {
|
|
10177
|
-
setTimeout(() => this.
|
|
10770
|
+
setTimeout(() => this._mediator.execute(new ResetScaleAndCenterRequest(animated)));
|
|
10178
10771
|
}
|
|
10772
|
+
/**
|
|
10773
|
+
* Gets the current scale of the canvas.
|
|
10774
|
+
*/
|
|
10179
10775
|
getScale() {
|
|
10180
10776
|
return this.transform.scale || 1;
|
|
10181
10777
|
}
|
|
@@ -10185,8 +10781,15 @@ class FCanvasComponent extends FCanvasBase {
|
|
|
10185
10781
|
setZoom(scale, toPosition = PointExtensions.initialize()) {
|
|
10186
10782
|
this.setScale(scale, toPosition);
|
|
10187
10783
|
}
|
|
10784
|
+
/**
|
|
10785
|
+
* Sets the scale of the canvas to a specified value.
|
|
10786
|
+
* This method is used to zoom in or out of the canvas,
|
|
10787
|
+
* allowing users to adjust the view of the canvas content.
|
|
10788
|
+
* @param scale - The scale factor to set for the canvas.
|
|
10789
|
+
* @param toPosition - The position to which the canvas should be centered after scaling.
|
|
10790
|
+
*/
|
|
10188
10791
|
setScale(scale, toPosition = PointExtensions.initialize()) {
|
|
10189
|
-
this.
|
|
10792
|
+
this._mediator.execute(new UpdateScaleRequest(scale, toPosition));
|
|
10190
10793
|
}
|
|
10191
10794
|
/**
|
|
10192
10795
|
* @deprecated Method "resetZoom" is deprecated. Use "resetScale" instead. This method will be removed in version 18.0.0.`,
|
|
@@ -10194,16 +10797,20 @@ class FCanvasComponent extends FCanvasBase {
|
|
|
10194
10797
|
resetZoom() {
|
|
10195
10798
|
this.resetScale();
|
|
10196
10799
|
}
|
|
10800
|
+
/**
|
|
10801
|
+
* Resets the scale of the canvas to its default value.
|
|
10802
|
+
* This method is used to restore the canvas to its original scale.
|
|
10803
|
+
*/
|
|
10197
10804
|
resetScale() {
|
|
10198
|
-
this.
|
|
10805
|
+
this._mediator.execute(new ResetScaleRequest());
|
|
10199
10806
|
}
|
|
10200
10807
|
ngOnDestroy() {
|
|
10201
|
-
this.
|
|
10808
|
+
this._mediator.execute(new RemoveCanvasFromStoreRequest());
|
|
10202
10809
|
}
|
|
10203
10810
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FCanvasComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
10204
10811
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: FCanvasComponent, isStandalone: true, selector: "f-canvas", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, scale: { classPropertyName: "scale", publicName: "scale", isSignal: true, isRequired: false, transformFunction: null }, debounceTime: { classPropertyName: "debounceTime", publicName: "debounceTime", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fCanvasChange: "fCanvasChange" }, host: { classAttribute: "f-component f-canvas" }, providers: [
|
|
10205
10812
|
{ provide: F_CANVAS, useExisting: FCanvasComponent }
|
|
10206
|
-
], viewQueries: [{ propertyName: "fGroupsContainer", first: true, predicate: ["fGroupsContainer"], descendants: true, isSignal: true }, { propertyName: "fNodesContainer", first: true, predicate: ["fNodesContainer"], descendants: true, isSignal: true }, { propertyName: "fConnectionsContainer", first: true, predicate: ["fConnectionsContainer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-container>\n <div #fGroupsContainer>\n <ng-content select=\"[fGroup]\"></ng-content>\n </div>\n <div #fConnectionsContainer>\n <ng-content select=\"f-snap-connection\"></ng-content>\n <ng-content select=\"f-connection\"></ng-content>\n <ng-content select=\"f-connection-for-create\"></ng-content>\n </div>\n\n <div #fNodesContainer>\n <ng-content select=\"[fNode]\"></ng-content>\n </div>\n</ng-container>\n", styles: [":host{position:absolute;overflow:visible;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}
|
|
10813
|
+
], viewQueries: [{ propertyName: "fGroupsContainer", first: true, predicate: ["fGroupsContainer"], descendants: true, isSignal: true }, { propertyName: "fNodesContainer", first: true, predicate: ["fNodesContainer"], descendants: true, isSignal: true }, { propertyName: "fConnectionsContainer", first: true, predicate: ["fConnectionsContainer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-container>\n <div #fGroupsContainer>\n <ng-content select=\"[fGroup]\"></ng-content>\n </div>\n <div #fConnectionsContainer>\n <ng-content select=\"f-snap-connection\"></ng-content>\n <ng-content select=\"f-connection\"></ng-content>\n <ng-content select=\"f-connection-for-create\"></ng-content>\n </div>\n\n <div #fNodesContainer>\n <ng-content select=\"[fNode]\"></ng-content>\n </div>\n</ng-container>\n", styles: [":host{position:absolute;overflow:visible;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10207
10814
|
}
|
|
10208
10815
|
__decorate([
|
|
10209
10816
|
Deprecated('setScale')
|
|
@@ -10217,7 +10824,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
10217
10824
|
'class': 'f-component f-canvas',
|
|
10218
10825
|
}, providers: [
|
|
10219
10826
|
{ provide: F_CANVAS, useExisting: FCanvasComponent }
|
|
10220
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container>\n <div #fGroupsContainer>\n <ng-content select=\"[fGroup]\"></ng-content>\n </div>\n <div #fConnectionsContainer>\n <ng-content select=\"f-snap-connection\"></ng-content>\n <ng-content select=\"f-connection\"></ng-content>\n <ng-content select=\"f-connection-for-create\"></ng-content>\n </div>\n\n <div #fNodesContainer>\n <ng-content select=\"[fNode]\"></ng-content>\n </div>\n</ng-container>\n", styles: [":host{position:absolute;overflow:visible;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}
|
|
10827
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container>\n <div #fGroupsContainer>\n <ng-content select=\"[fGroup]\"></ng-content>\n </div>\n <div #fConnectionsContainer>\n <ng-content select=\"f-snap-connection\"></ng-content>\n <ng-content select=\"f-connection\"></ng-content>\n <ng-content select=\"f-connection-for-create\"></ng-content>\n </div>\n\n <div #fNodesContainer>\n <ng-content select=\"[fNode]\"></ng-content>\n </div>\n</ng-container>\n", styles: [":host{position:absolute;overflow:visible;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}\n"] }]
|
|
10221
10828
|
}], propDecorators: { setZoom: [], resetZoom: [] } });
|
|
10222
10829
|
|
|
10223
10830
|
const F_CANVAS_PROVIDERS = [
|
|
@@ -10236,40 +10843,37 @@ class FMinimapData {
|
|
|
10236
10843
|
}
|
|
10237
10844
|
|
|
10238
10845
|
class FMinimapFlowDirective {
|
|
10239
|
-
fMinSize = 1000;
|
|
10240
|
-
|
|
10846
|
+
fMinSize = input(1000);
|
|
10847
|
+
_mediator = inject(FMediator);
|
|
10241
10848
|
_elementReference = inject(ElementRef);
|
|
10242
10849
|
get hostElement() {
|
|
10243
10850
|
return this._elementReference.nativeElement;
|
|
10244
10851
|
}
|
|
10245
10852
|
model = new FMinimapData(this.hostElement);
|
|
10246
10853
|
redraw() {
|
|
10247
|
-
const { scale, viewBox } = this.
|
|
10854
|
+
const { scale, viewBox } = this._mediator.execute(new MinimapCalculateSvgScaleAndViewBoxRequest(this.hostElement, this.fMinSize()));
|
|
10248
10855
|
this.model = new FMinimapData(this.hostElement, scale, viewBox);
|
|
10249
10856
|
setRectToViewBox(viewBox, this.hostElement);
|
|
10250
10857
|
}
|
|
10251
10858
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FMinimapFlowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
10252
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
10859
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: FMinimapFlowDirective, selector: "svg[fMinimapFlow]", inputs: { fMinSize: { classPropertyName: "fMinSize", publicName: "fMinSize", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
10253
10860
|
}
|
|
10254
10861
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FMinimapFlowDirective, decorators: [{
|
|
10255
10862
|
type: Directive,
|
|
10256
10863
|
args: [{
|
|
10257
10864
|
selector: 'svg[fMinimapFlow]'
|
|
10258
10865
|
}]
|
|
10259
|
-
}]
|
|
10260
|
-
type: Input
|
|
10261
|
-
}] } });
|
|
10866
|
+
}] });
|
|
10262
10867
|
|
|
10263
10868
|
class FMinimapCanvasDirective {
|
|
10264
|
-
|
|
10869
|
+
_mediator = inject(FMediator);
|
|
10265
10870
|
_elementReference = inject(ElementRef);
|
|
10266
10871
|
get hostElement() {
|
|
10267
10872
|
return this._elementReference.nativeElement;
|
|
10268
10873
|
}
|
|
10269
10874
|
redraw() {
|
|
10270
10875
|
this._clearCanvas();
|
|
10271
|
-
this.
|
|
10272
|
-
.forEach((x) => {
|
|
10876
|
+
this._mediator.execute(new MinimapDrawNodesRequest()).forEach((x) => {
|
|
10273
10877
|
this.hostElement.appendChild(x);
|
|
10274
10878
|
});
|
|
10275
10879
|
}
|
|
@@ -10287,13 +10891,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
10287
10891
|
}] });
|
|
10288
10892
|
|
|
10289
10893
|
class FMinimapViewDirective {
|
|
10290
|
-
|
|
10894
|
+
_mediator = inject(FMediator);
|
|
10291
10895
|
_elementReference = inject(ElementRef);
|
|
10292
10896
|
get hostElement() {
|
|
10293
10897
|
return this._elementReference.nativeElement;
|
|
10294
10898
|
}
|
|
10295
10899
|
redraw() {
|
|
10296
|
-
setRectToElement(this.
|
|
10900
|
+
setRectToElement(this._mediator.execute(new MinimapCalculateViewBoxRequest()), this.hostElement);
|
|
10297
10901
|
}
|
|
10298
10902
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FMinimapViewDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
10299
10903
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: FMinimapViewDirective, selector: "rect[fMinimapView]", host: { classAttribute: "f-component f-minimap-view" }, ngImport: i0 });
|
|
@@ -10310,38 +10914,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
10310
10914
|
|
|
10311
10915
|
class FMinimapComponent {
|
|
10312
10916
|
_destroyRef = inject(DestroyRef);
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
fMinSize = 1000;
|
|
10917
|
+
_mediator = inject(FMediator);
|
|
10918
|
+
_browser = inject(BrowserService);
|
|
10919
|
+
_canvas = viewChild.required(FMinimapCanvasDirective);
|
|
10920
|
+
_flow = viewChild.required(FMinimapFlowDirective);
|
|
10921
|
+
_minimapView = viewChild.required(FMinimapViewDirective);
|
|
10922
|
+
fMinSize = input(1000);
|
|
10319
10923
|
ngAfterViewInit() {
|
|
10320
10924
|
this._listenTransformChanges();
|
|
10321
10925
|
}
|
|
10322
10926
|
_listenTransformChanges() {
|
|
10323
|
-
this.
|
|
10927
|
+
this._mediator.execute(new ListenTransformChangesRequest()).pipe(notifyOnStart(), debounceTime(2)).listen(this._destroyRef, () => {
|
|
10324
10928
|
this._redraw();
|
|
10325
10929
|
});
|
|
10326
10930
|
}
|
|
10327
10931
|
_redraw() {
|
|
10328
|
-
if (!this.
|
|
10932
|
+
if (!this._browser.isBrowser()) {
|
|
10329
10933
|
return;
|
|
10330
10934
|
}
|
|
10331
|
-
this.
|
|
10332
|
-
this.
|
|
10333
|
-
this.
|
|
10935
|
+
this._flow().redraw();
|
|
10936
|
+
this._minimapView().redraw();
|
|
10937
|
+
this._canvas().redraw();
|
|
10334
10938
|
}
|
|
10335
10939
|
onPointerDown(event) {
|
|
10336
|
-
this.
|
|
10940
|
+
this._mediator.execute(new MinimapDragPreparationRequest(event, this._flow().model));
|
|
10337
10941
|
}
|
|
10338
10942
|
onPointerUp(event) {
|
|
10339
|
-
this.
|
|
10943
|
+
this._mediator.execute(new MinimapDragFinalizeRequest(event));
|
|
10340
10944
|
}
|
|
10341
10945
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FMinimapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10342
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
10946
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: FMinimapComponent, selector: "f-minimap", inputs: { fMinSize: { classPropertyName: "fMinSize", publicName: "fMinSize", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "f-component f-minimap" }, providers: [
|
|
10343
10947
|
{ provide: F_BEFORE_MAIN_PLUGIN, useExisting: FMinimapComponent },
|
|
10344
|
-
], viewQueries: [{ propertyName: "
|
|
10948
|
+
], viewQueries: [{ propertyName: "_canvas", first: true, predicate: FMinimapCanvasDirective, descendants: true, isSignal: true }, { propertyName: "_flow", first: true, predicate: FMinimapFlowDirective, descendants: true, isSignal: true }, { propertyName: "_minimapView", first: true, predicate: FMinimapViewDirective, descendants: true, isSignal: true }], exportAs: ["fComponent"], ngImport: i0, template: "<svg fMinimapFlow width=\"100%\" height=\"100%\" fLockedContext [fMinSize]=\"fMinSize()\">\n <g fMinimapCanvas></g>\n <rect fMinimapView x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" stroke=\"none\"/>\n</svg>\n\n", styles: [":host{display:block;position:absolute}:host svg{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: FMinimapCanvasDirective, selector: "g[fMinimapCanvas]" }, { kind: "directive", type: FMinimapViewDirective, selector: "rect[fMinimapView]" }, { kind: "directive", type: FMinimapFlowDirective, selector: "svg[fMinimapFlow]", inputs: ["fMinSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10345
10949
|
}
|
|
10346
10950
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FMinimapComponent, decorators: [{
|
|
10347
10951
|
type: Component,
|
|
@@ -10349,19 +10953,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
10349
10953
|
'class': 'f-component f-minimap',
|
|
10350
10954
|
}, providers: [
|
|
10351
10955
|
{ provide: F_BEFORE_MAIN_PLUGIN, useExisting: FMinimapComponent },
|
|
10352
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg fMinimapFlow width=\"100%\" height=\"100%\" fLockedContext [fMinSize]=\"fMinSize\">\n <g fMinimapCanvas></g>\n <rect fMinimapView x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" stroke=\"none\"/>\n</svg>\n\n", styles: [":host{display:block;position:absolute}:host svg{overflow:hidden}\n"] }]
|
|
10353
|
-
}]
|
|
10354
|
-
type: ViewChild,
|
|
10355
|
-
args: [FMinimapCanvasDirective, { static: true }]
|
|
10356
|
-
}], fMinimapFlow: [{
|
|
10357
|
-
type: ViewChild,
|
|
10358
|
-
args: [FMinimapFlowDirective, { static: true }]
|
|
10359
|
-
}], fMinimapView: [{
|
|
10360
|
-
type: ViewChild,
|
|
10361
|
-
args: [FMinimapViewDirective, { static: true }]
|
|
10362
|
-
}], fMinSize: [{
|
|
10363
|
-
type: Input
|
|
10364
|
-
}] } });
|
|
10956
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg fMinimapFlow width=\"100%\" height=\"100%\" fLockedContext [fMinSize]=\"fMinSize()\">\n <g fMinimapCanvas></g>\n <rect fMinimapView x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" stroke=\"none\"/>\n</svg>\n\n", styles: [":host{display:block;position:absolute}:host svg{overflow:hidden}\n"] }]
|
|
10957
|
+
}] });
|
|
10365
10958
|
|
|
10366
10959
|
const F_MINIMAP_PROVIDERS = [
|
|
10367
10960
|
FMinimapComponent,
|
|
@@ -10468,7 +11061,7 @@ class FFlowComponent extends FFlowBase {
|
|
|
10468
11061
|
...COMMON_PROVIDERS,
|
|
10469
11062
|
...F_DRAGGABLE_PROVIDERS,
|
|
10470
11063
|
{ provide: F_FLOW, useExisting: FFlowComponent },
|
|
10471
|
-
], 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
|
|
11064
|
+
], 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 });
|
|
10472
11065
|
}
|
|
10473
11066
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FFlowComponent, decorators: [{
|
|
10474
11067
|
type: Component,
|
|
@@ -10483,7 +11076,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
10483
11076
|
...COMMON_PROVIDERS,
|
|
10484
11077
|
...F_DRAGGABLE_PROVIDERS,
|
|
10485
11078
|
{ provide: F_FLOW, useExisting: FFlowComponent },
|
|
10486
|
-
], 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
|
|
11079
|
+
], 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"] }]
|
|
10487
11080
|
}] });
|
|
10488
11081
|
|
|
10489
11082
|
const F_FLOW_PROVIDERS = [
|
|
@@ -10548,8 +11141,14 @@ class FZoomDirective extends FZoomBase {
|
|
|
10548
11141
|
if (targetElement?.closest('[fLockedContext]')) {
|
|
10549
11142
|
return;
|
|
10550
11143
|
}
|
|
10551
|
-
|
|
11144
|
+
const step = this._normalizeWheelStep(event.deltaY);
|
|
11145
|
+
this.setZoom(PointExtensions.initialize(event.clientX, event.clientY), step, this._calculateDirection(event.deltaY), false);
|
|
10552
11146
|
};
|
|
11147
|
+
_normalizeWheelStep(deltaY) {
|
|
11148
|
+
const intensity = Math.abs(deltaY) / 100;
|
|
11149
|
+
const normalized = Math.max(0.1, Math.min(intensity, 1));
|
|
11150
|
+
return this.step * normalized;
|
|
11151
|
+
}
|
|
10553
11152
|
_calculateDirection(deltaY) {
|
|
10554
11153
|
return deltaY > 0 ? EFZoomDirection.ZOOM_OUT : EFZoomDirection.ZOOM_IN;
|
|
10555
11154
|
}
|
|
@@ -10691,5 +11290,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
10691
11290
|
* Generated bundle index. Do not edit.
|
|
10692
11291
|
*/
|
|
10693
11292
|
|
|
10694
|
-
export { AddBackgroundToStoreExecution, AddBackgroundToStoreRequest, AddCanvasToStoreExecution, AddCanvasToStoreRequest, AddConnectionForCreateToStoreExecution, AddConnectionForCreateToStoreRequest, AddConnectionMarkerToStoreExecution, AddConnectionMarkerToStoreRequest, AddConnectionToStoreExecution, AddConnectionToStoreRequest, AddDndToStoreExecution, AddDndToStoreRequest, AddFlowToStoreExecution, AddFlowToStoreRequest, AddInputToStoreExecution, AddInputToStoreRequest, AddLineAlignmentToStoreExecution, AddLineAlignmentToStoreRequest, AddNodeToStoreExecution, AddNodeToStoreRequest, AddOutletToStoreExecution, AddOutletToStoreRequest, AddOutputToStoreExecution, AddOutputToStoreRequest, AddPatternToBackgroundExecution, AddPatternToBackgroundRequest, AddSnapConnectionToStoreExecution, AddSnapConnectionToStoreRequest, AddZoomToStoreExecution, AddZoomToStoreRequest, ApplyChildResizeRestrictionsExecution, ApplyChildResizeRestrictionsRequest, ApplyParentResizeRestrictionsExecution, ApplyParentResizeRestrictionsRequest, BaseConnectionDragHandler, CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CREATE_MOVE_NODE_DRAG_MODEL_FROM_SELECTION_PROVIDERS, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateChangedPositionExecution, CalculateChangedPositionRequest, CalculateChangedSizeExecution, CalculateChangedSizeRequest, CalculateClosestInputExecution, CalculateClosestInputRequest, CalculateCommonNodeMoveLimitsExecution, CalculateCommonNodeMoveLimitsRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectionLineByBehaviorExecution, CalculateConnectionLineByBehaviorRequest, CalculateFlowPointFromMinimapPointExecution, CalculateFlowPointFromMinimapPointRequest, CalculateInputConnectionsExecution, CalculateInputConnectionsRequest, CalculateNodeMoveLimitsExecution, CalculateNodeMoveLimitsRequest, CalculateNodesBoundingBoxExecution, CalculateNodesBoundingBoxNormalizedPositionExecution, CalculateNodesBoundingBoxNormalizedPositionRequest, CalculateNodesBoundingBoxRequest, CalculateOutputConnectionsExecution, CalculateOutputConnectionsRequest, CenterGroupOrNodeExecution, CenterGroupOrNodeRequest, ClearSelectionExecution, ClearSelectionRequest, CreateConnectionMarkersExecution, CreateConnectionMarkersRequest, CreateMoveNodesDragModelFromSelectionExecution, CreateMoveNodesDragModelFromSelectionRequest, DRAG_AND_DROP_COMMON_PROVIDERS, Deprecated, DragAndDropBase, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFMarkerType, EFResizeHandleType, EFZoomDirection, EmitSelectionChangeEventExecution, EmitSelectionChangeEventRequest, EndDragSequenceExecution, EndDragSequenceRequest, EventExtensions, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FCanvasDragHandler, FCanvasMoveFinalizeExecution, FCanvasMoveFinalizeRequest, FCanvasMovePreparationExecution, FCanvasMovePreparationRequest, FChannel, FChannelHub, FCirclePatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, 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, FLineAlignmentDragHandler, FMarkerBase, FMarkerDirective, FMinimapCanvasDirective, FMinimapComponent, FMinimapData, FMinimapDragHandler, FMinimapFlowDirective, FMinimapViewDirective, FMoveNodesEvent, FNodeBase, FNodeDirective, FNodeDropToGroupDragHandler, FNodeDropToGroupFinalizeExecution, FNodeDropToGroupFinalizeRequest, FNodeDropToGroupPreparationExecution, FNodeDropToGroupPreparationRequest, FNodeInputBase, FNodeInputDirective, FNodeIntersectedWithConnections, FNodeMoveDragHandler, FNodeMoveFinalizeExecution, FNodeMoveFinalizeRequest, FNodeMovePreparationExecution, FNodeMovePreparationRequest, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FNodeResizeDragHandler, FNodeResizeFinalizeExecution, FNodeResizeFinalizeRequest, FNodeResizePreparationExecution, FNodeResizePreparationRequest, FNodeRotateDragHandler, FNodeRotateFinalizeExecution, FNodeRotateFinalizeRequest, FNodeRotatePreparationExecution, FNodeRotatePreparationRequest, FReassignConnectionDragHandler, FReassignConnectionEvent, FReassignConnectionFinalizeExecution, FReassignConnectionFinalizeRequest, FReassignConnectionPreparationExecution, FReassignConnectionPreparationRequest, FRectPatternComponent, FResizeChannel, FResizeHandleDirective, FRotateHandleDirective, FSegmentPathBuilder, FSelectionAreaBase, FSelectionAreaComponent, FSelectionChangeEvent, FSingleSelectExecution, FSingleSelectRequest, FSnapConnectionComponent, FStraightPathBuilder, FSummaryNodeMoveDragHandler, 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, FindInputAtPositionExecution, FindInputAtPositionRequest, FitToFlowExecution, FitToFlowRequest, GET_FLOW_STATE_PROVIDERS, GetAllCanBeConnectedInputsAndRectsExecution, GetAllCanBeConnectedInputsAndRectsRequest, GetCanBeSelectedItemsExecution, GetCanBeSelectedItemsRequest, GetCanvasExecution, GetCanvasRequest, GetConnectorAndRectExecution, GetConnectorAndRectRequest, GetCurrentSelectionExecution, GetCurrentSelectionRequest, GetDeepChildrenNodesAndGroupsExecution, GetDeepChildrenNodesAndGroupsRequest, GetElementRoundedRectExecution, GetElementRoundedRectRequest, GetFirstConnectableOutputExecution, GetFirstConnectableOutputRequest, GetFlowExecution, GetFlowHostElementExecution, GetFlowHostElementRequest, GetFlowRequest, GetFlowStateConnectionsExecution, GetFlowStateConnectionsRequest, GetFlowStateExecution, GetFlowStateNodesExecution, GetFlowStateNodesRequest, GetFlowStateRequest, GetNodePaddingExecution, GetNodePaddingRequest, GetNodeResizeRestrictionsExecution, GetNodeResizeRestrictionsRequest, GetNodesExecution, GetNodesRequest, GetNormalizedChildrenNodesRectExecution, GetNormalizedChildrenNodesRectRequest, GetNormalizedConnectorRectExecution, GetNormalizedConnectorRectRequest, GetNormalizedElementRectExecution, GetNormalizedElementRectRequest, GetNormalizedParentNodeRectExecution, GetNormalizedParentNodeRectRequest, GetNormalizedPointExecution, GetNormalizedPointRequest, GetParentNodesExecution, GetParentNodesRequest, IMouseEvent, IPointerEvent, IPointerUpEvent, ITouchDownEvent, ITouchMoveEvent, InitializeDragSequenceExecution, InitializeDragSequenceRequest, InputCanvasPositionExecution, InputCanvasPositionRequest, InputCanvasScaleExecution, InputCanvasScaleRequest, IsArrayHasParentNodeExecution, IsArrayHasParentNodeRequest, IsConnectionUnderNodeExecution, IsConnectionUnderNodeRequest, IsDragStartedExecution, IsDragStartedRequest, LineAlignmentPreparationExecution, LineAlignmentPreparationRequest, LineElement, LineService, ListenCountChangesExecution, ListenCountChangesRequest, ListenDataChangesExecution, ListenDataChangesRequest, ListenTransformChangesExecution, ListenTransformChangesRequest, LogExecutionTime, MINIMAP_DRAG_FINALIZE_PROVIDERS, MINIMAP_DRAG_PREPARATION_PROVIDERS, MOUSE_EVENT_IGNORE_TIME, MarkAllCanBeConnectedInputsExecution, MarkAllCanBeConnectedInputsRequest, MinimapCalculateSvgScaleAndViewBoxExecution, MinimapCalculateSvgScaleAndViewBoxRequest, MinimapCalculateViewBoxExecution, MinimapCalculateViewBoxRequest, MinimapDragFinalizeExecution, MinimapDragFinalizeRequest, MinimapDragPreparationExecution, MinimapDragPreparationRequest, MinimapDrawNodesExecution, MinimapDrawNodesRequest, MoveFrontElementsBeforeTargetElementExecution, MoveFrontElementsBeforeTargetElementRequest, NODE_DROP_TO_GROUP_PROVIDERS, NODE_PROVIDERS, NODE_RESIZE_PROVIDERS, NODE_ROTATE_PROVIDERS, NotifyDataChangedExecution, NotifyDataChangedRequest, NotifyTransformChangedExecution, NotifyTransformChangedRequest, OnPointerMoveExecution, OnPointerMoveRequest, PointBoundsLimiter, PrepareDragSequenceExecution, PrepareDragSequenceRequest, PreventDefaultIsExternalItemExecution, PreventDefaultIsExternalItemRequest, PutInputConnectionHandlersToArrayExecution, PutInputConnectionHandlersToArrayRequest, PutOutputConnectionHandlersToArrayExecution, PutOutputConnectionHandlersToArrayRequest, RESIZE_DIRECTIONS, RedrawCanvasWithAnimationExecution, RedrawCanvasWithAnimationRequest, RedrawConnectionsExecution, RedrawConnectionsRequest, RemoveBackgroundFromStoreExecution, RemoveBackgroundFromStoreRequest, RemoveCanvasFromStoreExecution, RemoveCanvasFromStoreRequest, RemoveConnectionForCreateFromStoreExecution, RemoveConnectionForCreateFromStoreRequest, RemoveConnectionFromStoreExecution, RemoveConnectionFromStoreRequest, RemoveConnectionMarkerFromStoreExecution, RemoveConnectionMarkerFromStoreRequest, RemoveDndFromStoreExecution, RemoveDndFromStoreRequest, RemoveFlowFromStoreExecution, RemoveFlowFromStoreRequest, RemoveInputFromStoreExecution, RemoveInputFromStoreRequest, RemoveLineAlignmentFromStoreExecution, RemoveLineAlignmentFromStoreRequest, RemoveNodeFromStoreExecution, RemoveNodeFromStoreRequest, RemoveOutletFromStoreExecution, RemoveOutletFromStoreRequest, RemoveOutputFromStoreExecution, RemoveOutputFromStoreRequest, RemoveSnapConnectionFromStoreExecution, RemoveSnapConnectionFromStoreRequest, 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, SortItemLayersExecution, SortItemLayersRequest, SortItemsByParentExecution, SortItemsByParentRequest, SortNodeLayersExecution, SortNodeLayersRequest, SourceConnectionDragHandler, SourceTargetConnectionDragHandler, StartDragSequenceExecution, StartDragSequenceRequest, TargetConnectionDragHandler, UnmarkAllCanBeConnectedInputsExecution, UnmarkAllCanBeConnectedInputsRequest, UpdateItemAndChildrenLayersExecution, UpdateItemAndChildrenLayersRequest, UpdateNodeWhenStateOrSizeChangedExecution, UpdateNodeWhenStateOrSizeChangedRequest, UpdateScaleExecution, UpdateScaleRequest, createSVGElement, debounceTime, defaultEventTrigger, fixedCenterBehavior, fixedOutboundBehavior, floatingBehavior, getExternalItem, getMarkerEndId, getMarkerSelectedEndId, getMarkerSelectedStartId, getMarkerStartId, infinityMinMax, isDragBlocker, isExternalItem, isMobile, isNode, isNodeOutlet, isNodeOutput, isRotateHandle, isValidEventTrigger, mediatorEffect, mixinChangeSelection, mixinChangeVisibility, notifyOnStart, transitionEnd };
|
|
11293
|
+
export { AddBackgroundToStoreExecution, AddBackgroundToStoreRequest, AddCanvasToStoreExecution, AddCanvasToStoreRequest, AddConnectionForCreateToStoreExecution, AddConnectionForCreateToStoreRequest, AddConnectionMarkerToStoreExecution, AddConnectionMarkerToStoreRequest, AddConnectionToStoreExecution, AddConnectionToStoreRequest, AddDndToStoreExecution, AddDndToStoreRequest, AddFlowToStoreExecution, AddFlowToStoreRequest, AddInputToStoreExecution, AddInputToStoreRequest, AddLineAlignmentToStoreExecution, AddLineAlignmentToStoreRequest, AddNodeToStoreExecution, AddNodeToStoreRequest, AddOutletToStoreExecution, AddOutletToStoreRequest, AddOutputToStoreExecution, AddOutputToStoreRequest, AddPatternToBackgroundExecution, AddPatternToBackgroundRequest, AddSnapConnectionToStoreExecution, AddSnapConnectionToStoreRequest, AddZoomToStoreExecution, AddZoomToStoreRequest, ApplyChildResizeRestrictionsExecution, ApplyChildResizeRestrictionsRequest, ApplyParentResizeRestrictionsExecution, ApplyParentResizeRestrictionsRequest, BaseConnectionDragHandler, CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CREATE_MOVE_NODE_DRAG_MODEL_FROM_SELECTION_PROVIDERS, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateChangedPositionExecution, CalculateChangedPositionRequest, CalculateChangedSizeExecution, CalculateChangedSizeRequest, CalculateCommonNodeMoveLimitsExecution, CalculateCommonNodeMoveLimitsRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectionLineByBehaviorExecution, CalculateConnectionLineByBehaviorRequest, CalculateFlowPointFromMinimapPointExecution, CalculateFlowPointFromMinimapPointRequest, CalculateInputConnectionsExecution, CalculateInputConnectionsRequest, CalculateNodeMoveLimitsExecution, CalculateNodeMoveLimitsRequest, CalculateNodesBoundingBoxExecution, CalculateNodesBoundingBoxNormalizedPositionExecution, CalculateNodesBoundingBoxNormalizedPositionRequest, CalculateNodesBoundingBoxRequest, CalculateOutputConnectionsExecution, CalculateOutputConnectionsRequest, CenterGroupOrNodeExecution, CenterGroupOrNodeRequest, ClearSelectionExecution, ClearSelectionRequest, CreateConnectionMarkersExecution, CreateConnectionMarkersRequest, CreateMoveNodesDragModelFromSelectionExecution, CreateMoveNodesDragModelFromSelectionRequest, DRAG_AND_DROP_COMMON_PROVIDERS, Deprecated, DragAndDropBase, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFMarkerType, EFResizeHandleType, EFZoomDirection, EmitSelectionChangeEventExecution, EmitSelectionChangeEventRequest, EndDragSequenceExecution, EndDragSequenceRequest, EventExtensions, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FCanvasDragHandler, FCanvasMoveFinalizeExecution, FCanvasMoveFinalizeRequest, FCanvasMovePreparationExecution, FCanvasMovePreparationRequest, FChannel, FChannelHub, FCirclePatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, 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, FLineAlignmentDragHandler, FMarkerBase, FMarkerDirective, FMinimapCanvasDirective, FMinimapComponent, FMinimapData, FMinimapDragHandler, FMinimapFlowDirective, FMinimapViewDirective, FMoveNodesEvent, FNodeBase, FNodeDirective, FNodeDropToGroupDragHandler, FNodeDropToGroupFinalizeExecution, FNodeDropToGroupFinalizeRequest, FNodeDropToGroupPreparationExecution, FNodeDropToGroupPreparationRequest, FNodeInputBase, FNodeInputDirective, FNodeIntersectedWithConnections, FNodeMoveDragHandler, FNodeMoveFinalizeExecution, FNodeMoveFinalizeRequest, FNodeMovePreparationExecution, FNodeMovePreparationRequest, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FNodeResizeDragHandler, FNodeResizeFinalizeExecution, FNodeResizeFinalizeRequest, FNodeResizePreparationExecution, FNodeResizePreparationRequest, FNodeRotateDragHandler, FNodeRotateFinalizeExecution, FNodeRotateFinalizeRequest, FNodeRotatePreparationExecution, FNodeRotatePreparationRequest, FReassignConnectionDragHandler, FReassignConnectionEvent, FReassignConnectionFinalizeExecution, FReassignConnectionFinalizeRequest, FReassignConnectionPreparationExecution, FReassignConnectionPreparationRequest, FReassignSourceDragHandler, FReassignTargetDragHandler, FRectPatternComponent, FResizeChannel, FResizeHandleDirective, FRotateHandleDirective, FSegmentPathBuilder, FSelectionAreaBase, FSelectionAreaComponent, FSelectionChangeEvent, FSingleSelectExecution, FSingleSelectRequest, FSnapConnectionComponent, FStraightPathBuilder, FSummaryNodeMoveDragHandler, 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, FindClosestConnectorExecution, FindClosestConnectorRequest, FindConnectableConnectorUsingPriorityAndPositionExecution, FindConnectableConnectorUsingPriorityAndPositionRequest, FitToFlowExecution, FitToFlowRequest, GET_FLOW_STATE_PROVIDERS, GetAllCanBeConnectedInputsAndRectsExecution, GetAllCanBeConnectedInputsAndRectsRequest, GetAllCanBeConnectedSourceConnectorsAndRectsExecution, GetAllCanBeConnectedSourceConnectorsAndRectsRequest, GetCanBeSelectedItemsExecution, GetCanBeSelectedItemsRequest, GetCanvasExecution, GetCanvasRequest, GetConnectorAndRectExecution, GetConnectorAndRectRequest, GetCurrentSelectionExecution, GetCurrentSelectionRequest, GetDeepChildrenNodesAndGroupsExecution, GetDeepChildrenNodesAndGroupsRequest, GetElementRoundedRectExecution, GetElementRoundedRectRequest, GetFirstConnectableOutputExecution, GetFirstConnectableOutputRequest, GetFlowExecution, GetFlowHostElementExecution, GetFlowHostElementRequest, GetFlowRequest, GetFlowStateConnectionsExecution, GetFlowStateConnectionsRequest, GetFlowStateExecution, GetFlowStateNodesExecution, GetFlowStateNodesRequest, GetFlowStateRequest, GetNodePaddingExecution, GetNodePaddingRequest, GetNodeResizeRestrictionsExecution, GetNodeResizeRestrictionsRequest, GetNodesExecution, GetNodesRequest, GetNormalizedChildrenNodesRectExecution, GetNormalizedChildrenNodesRectRequest, GetNormalizedConnectorRectExecution, GetNormalizedConnectorRectRequest, GetNormalizedElementRectExecution, GetNormalizedElementRectRequest, GetNormalizedParentNodeRectExecution, GetNormalizedParentNodeRectRequest, GetNormalizedPointExecution, GetNormalizedPointRequest, GetParentNodesExecution, GetParentNodesRequest, IMouseEvent, IPointerEvent, IPointerUpEvent, ITouchDownEvent, ITouchMoveEvent, InitializeDragSequenceExecution, InitializeDragSequenceRequest, InputCanvasPositionExecution, InputCanvasPositionRequest, InputCanvasScaleExecution, InputCanvasScaleRequest, IsArrayHasParentNodeExecution, IsArrayHasParentNodeRequest, IsConnectionUnderNodeExecution, IsConnectionUnderNodeRequest, IsDragStartedExecution, IsDragStartedRequest, LineAlignmentPreparationExecution, LineAlignmentPreparationRequest, LineElement, LineService, ListenCountChangesExecution, ListenCountChangesRequest, ListenDataChangesExecution, ListenDataChangesRequest, ListenTransformChangesExecution, ListenTransformChangesRequest, LogExecutionTime, MINIMAP_DRAG_FINALIZE_PROVIDERS, MINIMAP_DRAG_PREPARATION_PROVIDERS, MOUSE_EVENT_IGNORE_TIME, MarkConnectableConnectorsExecution, MarkConnectableConnectorsRequest, MinimapCalculateSvgScaleAndViewBoxExecution, MinimapCalculateSvgScaleAndViewBoxRequest, MinimapCalculateViewBoxExecution, MinimapCalculateViewBoxRequest, MinimapDragFinalizeExecution, MinimapDragFinalizeRequest, MinimapDragPreparationExecution, MinimapDragPreparationRequest, MinimapDrawNodesExecution, MinimapDrawNodesRequest, MoveFrontElementsBeforeTargetElementExecution, MoveFrontElementsBeforeTargetElementRequest, NODE_DROP_TO_GROUP_PROVIDERS, NODE_PROVIDERS, NODE_RESIZE_PROVIDERS, NODE_ROTATE_PROVIDERS, NotifyDataChangedExecution, NotifyDataChangedRequest, NotifyTransformChangedExecution, NotifyTransformChangedRequest, OnPointerMoveExecution, OnPointerMoveRequest, PointBoundsLimiter, PrepareDragSequenceExecution, PrepareDragSequenceRequest, PreventDefaultIsExternalItemExecution, PreventDefaultIsExternalItemRequest, PutInputConnectionHandlersToArrayExecution, PutInputConnectionHandlersToArrayRequest, PutOutputConnectionHandlersToArrayExecution, PutOutputConnectionHandlersToArrayRequest, RESIZE_DIRECTIONS, RedrawCanvasWithAnimationExecution, RedrawCanvasWithAnimationRequest, RedrawConnectionsExecution, RedrawConnectionsRequest, RemoveBackgroundFromStoreExecution, RemoveBackgroundFromStoreRequest, RemoveCanvasFromStoreExecution, RemoveCanvasFromStoreRequest, RemoveConnectionForCreateFromStoreExecution, RemoveConnectionForCreateFromStoreRequest, RemoveConnectionFromStoreExecution, RemoveConnectionFromStoreRequest, RemoveConnectionMarkerFromStoreExecution, RemoveConnectionMarkerFromStoreRequest, RemoveDndFromStoreExecution, RemoveDndFromStoreRequest, RemoveFlowFromStoreExecution, RemoveFlowFromStoreRequest, RemoveInputFromStoreExecution, RemoveInputFromStoreRequest, RemoveLineAlignmentFromStoreExecution, RemoveLineAlignmentFromStoreRequest, RemoveNodeFromStoreExecution, RemoveNodeFromStoreRequest, RemoveOutletFromStoreExecution, RemoveOutletFromStoreRequest, RemoveOutputFromStoreExecution, RemoveOutputFromStoreRequest, RemoveSnapConnectionFromStoreExecution, RemoveSnapConnectionFromStoreRequest, 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, SortItemLayersExecution, SortItemLayersRequest, SortItemsByParentExecution, SortItemsByParentRequest, SortNodeLayersExecution, SortNodeLayersRequest, SourceConnectionDragHandler, SourceTargetConnectionDragHandler, StartDragSequenceExecution, StartDragSequenceRequest, TargetConnectionDragHandler, UnmarkConnectableConnectorsExecution, UnmarkConnectableConnectorsRequest, UpdateItemAndChildrenLayersExecution, UpdateItemAndChildrenLayersRequest, UpdateNodeWhenStateOrSizeChangedExecution, UpdateNodeWhenStateOrSizeChangedRequest, UpdateScaleExecution, UpdateScaleRequest, createSVGElement, debounceTime, defaultEventTrigger, fixedCenterBehavior, fixedOutboundBehavior, floatingBehavior, getExternalItem, getMarkerEndId, getMarkerSelectedEndId, getMarkerSelectedStartId, getMarkerStartId, infinityMinMax, isClosestConnectorInsideSnapThreshold, isDragBlocker, isDragHandleEnd, isDragHandleStart, isExternalItem, isMobile, isNode, isNodeOutlet, isNodeOutput, isPointerInsideStartOrEndDragHandles, isRotateHandle, isValidEventTrigger, mediatorEffect, mixinChangeSelection, mixinChangeVisibility, notifyOnStart, roundedRectFromPoint, transitionEnd };
|
|
10695
11294
|
//# sourceMappingURL=foblex-flow.mjs.map
|