@foblex/flow 12.2.0 → 12.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/domain/index.d.ts +1 -2
  2. package/domain/providers.d.ts +2 -3
  3. package/domain/update-item-layer/index.d.ts +2 -0
  4. package/domain/update-item-layer/update-item-layer.handler.d.ts +8 -0
  5. package/domain/update-item-layer/update-item-layer.request.d.ts +6 -0
  6. package/esm2022/domain/get-element-rect-in-flow/get-element-rect-in-flow.handler.mjs +1 -1
  7. package/esm2022/domain/index.mjs +2 -3
  8. package/esm2022/domain/providers.mjs +6 -5
  9. package/esm2022/domain/redraw-connections/redraw-connections.handler.mjs +2 -2
  10. package/esm2022/domain/update-item-layer/index.mjs +3 -0
  11. package/esm2022/domain/update-item-layer/update-item-layer.handler.mjs +29 -0
  12. package/esm2022/domain/update-item-layer/update-item-layer.request.mjs +7 -0
  13. package/esm2022/f-components-store.mjs +10 -1
  14. package/esm2022/f-connection/common/f-connection-base.mjs +1 -1
  15. package/esm2022/f-connection/common/mixins/change-connection-selection.mixin.mjs +2 -1
  16. package/esm2022/f-connection/f-connection/f-connection.component.mjs +3 -3
  17. package/esm2022/f-draggable/connections/create-connection/create-connection.on-pointer-up.mjs +13 -15
  18. package/esm2022/f-draggable/connections/create-connection/f-create-connection.event.mjs +3 -2
  19. package/esm2022/f-draggable/connections/reassign-connection/reassign-connection.prepare-drag-sequence.mjs +6 -6
  20. package/esm2022/f-draggable/f-draggable-data-context.mjs +4 -1
  21. package/esm2022/f-draggable/node/node.prepare-drag-sequence.mjs +6 -6
  22. package/esm2022/f-draggable/single-select/single-select.on-pointer-down.mjs +45 -55
  23. package/esm2022/f-flow.module.mjs +4 -1
  24. package/esm2022/f-group/f-group-base.mjs +13 -0
  25. package/esm2022/f-group/f-group.directive.mjs +57 -0
  26. package/esm2022/f-group/index.mjs +4 -0
  27. package/esm2022/f-group/is-group.mjs +4 -0
  28. package/esm2022/public-api.mjs +2 -1
  29. package/f-components-store.d.ts +4 -0
  30. package/f-connection/common/mixins/change-connection-selection.mixin.d.ts +1 -0
  31. package/f-draggable/canvas/providers.d.ts +1 -1
  32. package/f-draggable/connections/create-connection/f-create-connection.event.d.ts +4 -2
  33. package/f-draggable/connections/providers.d.ts +1 -1
  34. package/f-draggable/connections/reassign-connection/reassign-connection.prepare-drag-sequence.d.ts +2 -3
  35. package/f-draggable/external-item/providers.d.ts +1 -1
  36. package/f-draggable/f-draggable-data-context.d.ts +1 -0
  37. package/f-draggable/node/node.prepare-drag-sequence.d.ts +2 -3
  38. package/f-draggable/node/providers.d.ts +1 -1
  39. package/f-draggable/selection-area/providers.d.ts +1 -1
  40. package/f-draggable/single-select/single-select.on-pointer-down.d.ts +11 -6
  41. package/f-flow.module.d.ts +14 -13
  42. package/f-group/f-group-base.d.ts +12 -0
  43. package/f-group/f-group.directive.d.ts +21 -0
  44. package/f-group/index.d.ts +3 -0
  45. package/f-group/is-group.d.ts +1 -0
  46. package/fesm2022/foblex-flow.mjs +205 -156
  47. package/fesm2022/foblex-flow.mjs.map +1 -1
  48. package/package.json +1 -1
  49. package/public-api.d.ts +1 -0
  50. package/domain/update-connection-layer.handler.d.ts +0 -12
  51. package/domain/update-node-layer.handler.d.ts +0 -12
  52. package/esm2022/domain/update-connection-layer.handler.mjs +0 -29
  53. package/esm2022/domain/update-node-layer.handler.mjs +0 -29
@@ -1,7 +1,7 @@
1
1
  import { IHandler, IPointerEvent } from '@foblex/core';
2
2
  import { FComponentsStore } from '../../../f-components-store';
3
3
  import { FDraggableDataContext } from '../../f-draggable-data-context';
4
- import { GetConnectionHandler, UpdateConnectionLayerHandler } from '../../../domain';
4
+ import { GetConnectionHandler } from '../../../domain';
5
5
  import { FFlowMediator } from '../../../f-mediator';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class ReassignConnectionPrepareDragSequence implements IHandler<IPointerEvent, void> {
@@ -9,10 +9,9 @@ export declare class ReassignConnectionPrepareDragSequence implements IHandler<I
9
9
  private fDraggableDataContext;
10
10
  private getConnectionHandler;
11
11
  private fMediator;
12
- private updateConnectionLayerHandler;
13
12
  private get transform();
14
13
  private get flowHost();
15
- constructor(fComponentsStore: FComponentsStore, fDraggableDataContext: FDraggableDataContext, getConnectionHandler: GetConnectionHandler, fMediator: FFlowMediator, updateConnectionLayerHandler: UpdateConnectionLayerHandler);
14
+ constructor(fComponentsStore: FComponentsStore, fDraggableDataContext: FDraggableDataContext, getConnectionHandler: GetConnectionHandler, fMediator: FFlowMediator);
16
15
  handle(event: IPointerEvent): void;
17
16
  static ɵfac: i0.ɵɵFactoryDeclaration<ReassignConnectionPrepareDragSequence, never>;
18
17
  static ɵprov: i0.ɵɵInjectableDeclaration<ReassignConnectionPrepareDragSequence>;
@@ -1,3 +1,3 @@
1
1
  import { ExternalItemOnPointerUp } from './external-item.on-pointer-up';
2
2
  import { ExternalItemPrepareDragSequence } from './external-item.prepare-drag-sequence';
3
- export declare const EXTERNAL_ITEM_PROVIDERS: (typeof ExternalItemOnPointerUp | typeof ExternalItemPrepareDragSequence)[];
3
+ export declare const EXTERNAL_ITEM_PROVIDERS: (typeof ExternalItemPrepareDragSequence | typeof ExternalItemOnPointerUp)[];
@@ -13,6 +13,7 @@ export declare class FDraggableDataContext {
13
13
  fSelectionArea: FSelectionAreaBase | undefined;
14
14
  fLineAlignment: FLineAlignmentBase | undefined;
15
15
  reset(): void;
16
+ markSelectionAsChanged(): void;
16
17
  static ɵfac: i0.ɵɵFactoryDeclaration<FDraggableDataContext, never>;
17
18
  static ɵprov: i0.ɵɵInjectableDeclaration<FDraggableDataContext>;
18
19
  }
@@ -1,19 +1,18 @@
1
1
  import { IHandler, IPointerEvent } from '@foblex/core';
2
2
  import { FComponentsStore } from '../../f-components-store';
3
3
  import { FDraggableDataContext } from '../f-draggable-data-context';
4
- import { GetIncomingConnectionsHandler, GetOutgoingConnectionsHandler, UpdateNodeLayerHandler } from '../../domain';
4
+ import { GetIncomingConnectionsHandler, GetOutgoingConnectionsHandler } from '../../domain';
5
5
  import { FFlowMediator } from '../../f-mediator';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class NodePrepareDragSequence implements IHandler<IPointerEvent, void> {
8
8
  private fComponentsStore;
9
9
  private fDraggableDataContext;
10
- private updateNodeLayerHandler;
11
10
  private getOutgoingConnectionsHandler;
12
11
  private getIncomingConnectionsHandler;
13
12
  private fMediator;
14
13
  private get transform();
15
14
  private get flowHost();
16
- constructor(fComponentsStore: FComponentsStore, fDraggableDataContext: FDraggableDataContext, updateNodeLayerHandler: UpdateNodeLayerHandler, getOutgoingConnectionsHandler: GetOutgoingConnectionsHandler, getIncomingConnectionsHandler: GetIncomingConnectionsHandler, fMediator: FFlowMediator);
15
+ constructor(fComponentsStore: FComponentsStore, fDraggableDataContext: FDraggableDataContext, getOutgoingConnectionsHandler: GetOutgoingConnectionsHandler, getIncomingConnectionsHandler: GetIncomingConnectionsHandler, fMediator: FFlowMediator);
17
16
  handle(event: IPointerEvent): void;
18
17
  private calculateDraggableConnectionsAndNodes;
19
18
  private getInputsForNode;
@@ -1,4 +1,4 @@
1
1
  import { NodeOnPointerUp } from './node.on-pointer-up';
2
2
  import { NodePrepareDragSequence } from './node.prepare-drag-sequence';
3
3
  import { IsConnectionUnderNodeHandler } from './domain/is-connection-under-node';
4
- export declare const NODE_PROVIDERS: (typeof NodeOnPointerUp | typeof NodePrepareDragSequence | typeof IsConnectionUnderNodeHandler)[];
4
+ export declare const NODE_PROVIDERS: (typeof NodePrepareDragSequence | typeof NodeOnPointerUp | typeof IsConnectionUnderNodeHandler)[];
@@ -1,4 +1,4 @@
1
1
  import { SelectionAreaPrepareDragSequence } from './selection-area.prepare-drag-sequence';
2
2
  import { SelectionAreaOnPointerUp } from './selection-area.on-pointer-up';
3
3
  import { GetCanBeSelectedItemsHandler } from './get-can-be-selected-items';
4
- export declare const SELECTION_AREA_PROVIDERS: (typeof GetCanBeSelectedItemsHandler | typeof SelectionAreaPrepareDragSequence | typeof SelectionAreaOnPointerUp)[];
4
+ export declare const SELECTION_AREA_PROVIDERS: (typeof SelectionAreaPrepareDragSequence | typeof SelectionAreaOnPointerUp | typeof GetCanBeSelectedItemsHandler)[];
@@ -1,18 +1,23 @@
1
1
  import { IHandler, IPointerEvent } from '@foblex/core';
2
2
  import { FComponentsStore } from '../../f-components-store';
3
3
  import { FDraggableDataContext } from '../f-draggable-data-context';
4
- import { GetConnectionHandler, UpdateConnectionLayerHandler } from '../../domain';
4
+ import { GetConnectionHandler } from '../../domain';
5
+ import { FFlowMediator } from '../../f-mediator';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class SingleSelectOnPointerDown implements IHandler<IPointerEvent, void> {
7
8
  private fComponentsStore;
8
9
  private fDraggableDataContext;
9
10
  private getConnectionHandler;
10
- private updateConnectionLayerHandler;
11
- constructor(fComponentsStore: FComponentsStore, fDraggableDataContext: FDraggableDataContext, getConnectionHandler: GetConnectionHandler, updateConnectionLayerHandler: UpdateConnectionLayerHandler);
11
+ private fMediator;
12
+ constructor(fComponentsStore: FComponentsStore, fDraggableDataContext: FDraggableDataContext, getConnectionHandler: GetConnectionHandler, fMediator: FFlowMediator);
12
13
  handle(event: IPointerEvent): void;
13
- private deselectAll;
14
- private resetSelectionIfNotMultiselect;
15
- private selectIfNotSelected;
14
+ private getSelectableItem;
15
+ private isMultiselectEnabled;
16
+ private singleSelect;
17
+ private multiSelect;
18
+ private deselectItem;
19
+ private selectItem;
20
+ private clearSelection;
16
21
  static ɵfac: i0.ɵɵFactoryDeclaration<SingleSelectOnPointerDown, never>;
17
22
  static ɵprov: i0.ɵɵInjectableDeclaration<SingleSelectOnPointerDown>;
18
23
  }
@@ -12,20 +12,21 @@ import * as i10 from "./f-backgroud/f-background.component";
12
12
  import * as i11 from "./f-backgroud/f-cell-pattern/f-cell-pattern.component";
13
13
  import * as i12 from "./f-canvas/f-canvas.component";
14
14
  import * as i13 from "./f-node/f-node.directive";
15
- import * as i14 from "./f-node/f-drag-handle/f-drag-handle.directive";
16
- import * as i15 from "./f-connection/f-connection/f-connection.component";
17
- import * as i16 from "./f-connection/f-connection-for-create/f-connection-for-create.component";
18
- import * as i17 from "./f-canvas/f-zoom/f-zoom.directive";
19
- import * as i18 from "./f-connectors/f-node-input/f-node-input.directive";
20
- import * as i19 from "./f-connectors/f-node-outlet/f-node-outlet.directive";
21
- import * as i20 from "./f-connectors/f-node-output/f-node-output.directive";
22
- import * as i21 from "./f-draggable/f-draggable.directive";
23
- import * as i22 from "./f-external-item/f-external-item.directive";
24
- import * as i23 from "./f-selection-area/f-selection-area.component";
25
- import * as i24 from "./f-line-alignment/f-line-alignment.component";
26
- import * as i25 from "@angular/common";
15
+ import * as i14 from "./f-group/f-group.directive";
16
+ import * as i15 from "./f-node/f-drag-handle/f-drag-handle.directive";
17
+ import * as i16 from "./f-connection/f-connection/f-connection.component";
18
+ import * as i17 from "./f-connection/f-connection-for-create/f-connection-for-create.component";
19
+ import * as i18 from "./f-canvas/f-zoom/f-zoom.directive";
20
+ import * as i19 from "./f-connectors/f-node-input/f-node-input.directive";
21
+ import * as i20 from "./f-connectors/f-node-outlet/f-node-outlet.directive";
22
+ import * as i21 from "./f-connectors/f-node-output/f-node-output.directive";
23
+ import * as i22 from "./f-draggable/f-draggable.directive";
24
+ import * as i23 from "./f-external-item/f-external-item.directive";
25
+ import * as i24 from "./f-selection-area/f-selection-area.component";
26
+ import * as i25 from "./f-line-alignment/f-line-alignment.component";
27
+ import * as i26 from "@angular/common";
27
28
  export declare class FFlowModule {
28
29
  static ɵfac: i0.ɵɵFactoryDeclaration<FFlowModule, never>;
29
- static ɵmod: i0.ɵɵNgModuleDeclaration<FFlowModule, [typeof i1.FConnectionDragHandleComponent, typeof i2.FConnectionGradientComponent, typeof i3.FConnectionPathComponent, typeof i4.FConnectionTextComponent, typeof i5.FConnectionTextPathDirective, typeof i6.FConnectionSelectionComponent, typeof i7.FConnectionCenterDirective, typeof i8.FMarkerDirective, typeof i9.FFlowComponent, typeof i10.FBackgroundComponent, typeof i11.FCellPatternComponent, typeof i12.FCanvasComponent, typeof i13.FNodeDirective, typeof i14.FDragHandleDirective, typeof i15.FConnectionComponent, typeof i16.FConnectionForCreateComponent, typeof i17.FZoomDirective, typeof i18.FNodeInputDirective, typeof i19.FNodeOutletDirective, typeof i20.FNodeOutputDirective, typeof i21.FDraggableDirective, typeof i22.FExternalItemDirective, typeof i23.FSelectionAreaComponent, typeof i24.FLineAlignmentComponent], [typeof i25.CommonModule], [typeof i9.FFlowComponent, typeof i10.FBackgroundComponent, typeof i11.FCellPatternComponent, typeof i12.FCanvasComponent, typeof i13.FNodeDirective, typeof i14.FDragHandleDirective, typeof i15.FConnectionComponent, typeof i16.FConnectionForCreateComponent, typeof i7.FConnectionCenterDirective, typeof i8.FMarkerDirective, typeof i17.FZoomDirective, typeof i18.FNodeInputDirective, typeof i19.FNodeOutletDirective, typeof i20.FNodeOutputDirective, typeof i21.FDraggableDirective, typeof i22.FExternalItemDirective, typeof i23.FSelectionAreaComponent, typeof i24.FLineAlignmentComponent]>;
30
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FFlowModule, [typeof i1.FConnectionDragHandleComponent, typeof i2.FConnectionGradientComponent, typeof i3.FConnectionPathComponent, typeof i4.FConnectionTextComponent, typeof i5.FConnectionTextPathDirective, typeof i6.FConnectionSelectionComponent, typeof i7.FConnectionCenterDirective, typeof i8.FMarkerDirective, typeof i9.FFlowComponent, typeof i10.FBackgroundComponent, typeof i11.FCellPatternComponent, typeof i12.FCanvasComponent, typeof i13.FNodeDirective, typeof i14.FGroupDirective, typeof i15.FDragHandleDirective, typeof i16.FConnectionComponent, typeof i17.FConnectionForCreateComponent, typeof i18.FZoomDirective, typeof i19.FNodeInputDirective, typeof i20.FNodeOutletDirective, typeof i21.FNodeOutputDirective, typeof i22.FDraggableDirective, typeof i23.FExternalItemDirective, typeof i24.FSelectionAreaComponent, typeof i25.FLineAlignmentComponent], [typeof i26.CommonModule], [typeof i9.FFlowComponent, typeof i10.FBackgroundComponent, typeof i11.FCellPatternComponent, typeof i12.FCanvasComponent, typeof i13.FNodeDirective, typeof i15.FDragHandleDirective, typeof i16.FConnectionComponent, typeof i17.FConnectionForCreateComponent, typeof i7.FConnectionCenterDirective, typeof i8.FMarkerDirective, typeof i18.FZoomDirective, typeof i19.FNodeInputDirective, typeof i20.FNodeOutletDirective, typeof i21.FNodeOutputDirective, typeof i22.FDraggableDirective, typeof i23.FExternalItemDirective, typeof i24.FSelectionAreaComponent, typeof i25.FLineAlignmentComponent]>;
30
31
  static ɵinj: i0.ɵɵInjectorDeclaration<FFlowModule>;
31
32
  }
@@ -0,0 +1,12 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { IHasHostElement, IPoint, ISize } from '@foblex/core';
3
+ export declare const F_GROUP: InjectionToken<FGroupBase>;
4
+ export declare abstract class FGroupBase implements IHasHostElement {
5
+ abstract fGroupId: string;
6
+ abstract hostElement: HTMLElement;
7
+ abstract position: IPoint;
8
+ abstract size: ISize;
9
+ protected abstract setStyle(name: string, value: string): void;
10
+ isContains(element: HTMLElement | SVGElement): boolean;
11
+ redraw(): void;
12
+ }
@@ -0,0 +1,21 @@
1
+ import { ElementRef, OnDestroy, OnInit, Renderer2 } from "@angular/core";
2
+ import { IHasHostElement, IPoint, ISize } from '@foblex/core';
3
+ import { FGroupBase } from './f-group-base';
4
+ import { FComponentsStore } from '../f-components-store';
5
+ import * as i0 from "@angular/core";
6
+ export declare class FGroupDirective extends FGroupBase implements OnInit, IHasHostElement, OnDestroy {
7
+ private elementReference;
8
+ private renderer;
9
+ private fComponentsStore;
10
+ private subscriptions$;
11
+ fGroupId: string;
12
+ position: IPoint;
13
+ size: ISize;
14
+ get hostElement(): HTMLElement;
15
+ constructor(elementReference: ElementRef<HTMLElement>, renderer: Renderer2, fComponentsStore: FComponentsStore);
16
+ ngOnInit(): void;
17
+ protected setStyle(styleName: string, value: string): void;
18
+ ngOnDestroy(): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<FGroupDirective, never>;
20
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FGroupDirective, "[fGroup]", ["fComponent"], { "fGroupId": { "alias": "fGroupId"; "required": false; }; }, {}, never, never, false, never>;
21
+ }
@@ -0,0 +1,3 @@
1
+ export * from './f-group.directive';
2
+ export * from './f-group-base';
3
+ export * from './is-group';
@@ -0,0 +1 @@
1
+ export declare function isGroup(element: HTMLElement | SVGElement): boolean;