ngx-vflow 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ import { Background } from '../../types/background.type';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "../../types/background.type";
4
+ export declare class BackgroundComponent {
5
+ private viewportService;
6
+ private rootSvg;
7
+ set background(value: Background);
8
+ protected backgroundSignal: import("@angular/core").WritableSignal<Background>;
9
+ protected scaledGap: import("@angular/core").Signal<number>;
10
+ protected x: import("@angular/core").Signal<number>;
11
+ protected y: import("@angular/core").Signal<number>;
12
+ protected patternColor: import("@angular/core").Signal<string>;
13
+ protected patternSize: import("@angular/core").Signal<number>;
14
+ protected patternId: string;
15
+ protected patternUrl: string;
16
+ constructor();
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<BackgroundComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<BackgroundComponent, "g[background]", never, { "background": { "alias": "background"; "required": true; }; }, {}, never, never, false, never>;
19
+ static ngAcceptInputType_background: i1.Background | string;
20
+ }
@@ -7,7 +7,6 @@ export type HandleState = 'valid' | 'invalid' | 'idle';
7
7
  export declare class NodeComponent implements OnInit, AfterViewInit, OnDestroy, WithInjector {
8
8
  injector: Injector;
9
9
  private handleService;
10
- private zone;
11
10
  private draggableService;
12
11
  private flowStatusService;
13
12
  private flowEntitiesService;
@@ -11,6 +11,7 @@ import { ViewportState } from '../../interfaces/viewport.interface';
11
11
  import { ConnectionModel } from '../../models/connection.model';
12
12
  import { NodeChange } from '../../types/node-change.type';
13
13
  import { EdgeChange } from '../../types/edge-change.type';
14
+ import { Background } from '../../types/background.type';
14
15
  import * as i0 from "@angular/core";
15
16
  import * as i1 from "../../directives/connection-controller.directive";
16
17
  import * as i2 from "../../directives/changes-controller.directive";
@@ -53,9 +54,9 @@ export declare class VflowComponent {
53
54
  */
54
55
  set handlePositions(handlePositions: HandlePositions);
55
56
  /**
56
- * Background color for flow
57
+ * Background for flow
57
58
  */
58
- background: string;
59
+ background: Background | string;
59
60
  /**
60
61
  * Global rule if you can or can't select entities
61
62
  */
@@ -14,23 +14,7 @@ export declare class EdgeModel implements FlowEntity {
14
14
  selected$: import("rxjs").Observable<boolean>;
15
15
  detached: import("@angular/core").Signal<boolean>;
16
16
  detached$: import("rxjs").Observable<boolean>;
17
- path: import("@angular/core").Signal<{
18
- path: string;
19
- points: {
20
- start: {
21
- x: number;
22
- y: number;
23
- };
24
- center: {
25
- x: number;
26
- y: number;
27
- };
28
- end: {
29
- x: number;
30
- y: number;
31
- };
32
- };
33
- }>;
17
+ path: import("@angular/core").Signal<import("../interfaces/path-data.interface").PathData>;
34
18
  edgeLabels: {
35
19
  [position in EdgeLabelPosition]?: EdgeLabelModel;
36
20
  };
@@ -0,0 +1,24 @@
1
+ export type Background = ColorBackground | DotsBackground;
2
+ export interface ColorBackground {
3
+ type: 'solid';
4
+ color: string;
5
+ }
6
+ export interface DotsBackground {
7
+ type: 'dots';
8
+ /**
9
+ * Gap between dots
10
+ */
11
+ gap?: number;
12
+ /**
13
+ * Color of the dot
14
+ */
15
+ color?: string;
16
+ /**
17
+ * Diameter of the dot
18
+ */
19
+ size?: number;
20
+ /**
21
+ * Color behind tha dot pattern
22
+ */
23
+ backgroundColor?: string;
24
+ }
@@ -0,0 +1 @@
1
+ export declare function id(): string;
@@ -1,3 +1,2 @@
1
- import { NgZone } from "@angular/core";
2
1
  import { Observable } from "rxjs";
3
- export declare function resizable(elems: Element[], zone: NgZone): Observable<ResizeObserverEntry[]>;
2
+ export declare function resizable(elems: Element[]): Observable<ResizeObserverEntry[]>;
@@ -6,18 +6,19 @@ import * as i4 from "./components/edge-label/edge-label.component";
6
6
  import * as i5 from "./components/connection/connection.component";
7
7
  import * as i6 from "./components/handle/handle.component";
8
8
  import * as i7 from "./components/defs/defs.component";
9
- import * as i8 from "./directives/space-point-context.directive";
10
- import * as i9 from "./directives/map-context.directive";
11
- import * as i10 from "./directives/reference.directive";
12
- import * as i11 from "./directives/root-svg-context.directive";
13
- import * as i12 from "./directives/handle-size-controller.directive";
14
- import * as i13 from "./directives/selectable.directive";
15
- import * as i14 from "./directives/pointer.directive";
16
- import * as i15 from "./directives/root-pointer.directive";
17
- import * as i16 from "./directives/template.directive";
18
- import * as i17 from "@angular/common";
9
+ import * as i8 from "./components/background/background.component";
10
+ import * as i9 from "./directives/space-point-context.directive";
11
+ import * as i10 from "./directives/map-context.directive";
12
+ import * as i11 from "./directives/reference.directive";
13
+ import * as i12 from "./directives/root-svg-context.directive";
14
+ import * as i13 from "./directives/handle-size-controller.directive";
15
+ import * as i14 from "./directives/selectable.directive";
16
+ import * as i15 from "./directives/pointer.directive";
17
+ import * as i16 from "./directives/root-pointer.directive";
18
+ import * as i17 from "./directives/template.directive";
19
+ import * as i18 from "@angular/common";
19
20
  export declare class VflowModule {
20
21
  static ɵfac: i0.ɵɵFactoryDeclaration<VflowModule, never>;
21
- static ɵmod: i0.ɵɵNgModuleDeclaration<VflowModule, [typeof i1.VflowComponent, typeof i2.NodeComponent, typeof i3.EdgeComponent, typeof i4.EdgeLabelComponent, typeof i5.ConnectionComponent, typeof i6.HandleComponent, typeof i7.DefsComponent, typeof i8.SpacePointContextDirective, typeof i9.MapContextDirective, typeof i10.RootSvgReferenceDirective, typeof i11.RootSvgContextDirective, typeof i12.HandleSizeControllerDirective, typeof i13.SelectableDirective, typeof i14.PointerDirective, typeof i15.RootPointerDirective, typeof i16.NodeHtmlTemplateDirective, typeof i16.EdgeLabelHtmlTemplateDirective, typeof i16.EdgeTemplateDirective, typeof i16.ConnectionTemplateDirective, typeof i16.HandleTemplateDirective], [typeof i17.CommonModule], [typeof i1.VflowComponent, typeof i6.HandleComponent, typeof i13.SelectableDirective, typeof i16.NodeHtmlTemplateDirective, typeof i16.EdgeLabelHtmlTemplateDirective, typeof i16.EdgeTemplateDirective, typeof i16.ConnectionTemplateDirective, typeof i16.HandleTemplateDirective]>;
22
+ static ɵmod: i0.ɵɵNgModuleDeclaration<VflowModule, [typeof i1.VflowComponent, typeof i2.NodeComponent, typeof i3.EdgeComponent, typeof i4.EdgeLabelComponent, typeof i5.ConnectionComponent, typeof i6.HandleComponent, typeof i7.DefsComponent, typeof i8.BackgroundComponent, typeof i9.SpacePointContextDirective, typeof i10.MapContextDirective, typeof i11.RootSvgReferenceDirective, typeof i12.RootSvgContextDirective, typeof i13.HandleSizeControllerDirective, typeof i14.SelectableDirective, typeof i15.PointerDirective, typeof i16.RootPointerDirective, typeof i17.NodeHtmlTemplateDirective, typeof i17.EdgeLabelHtmlTemplateDirective, typeof i17.EdgeTemplateDirective, typeof i17.ConnectionTemplateDirective, typeof i17.HandleTemplateDirective], [typeof i18.CommonModule], [typeof i1.VflowComponent, typeof i6.HandleComponent, typeof i14.SelectableDirective, typeof i17.NodeHtmlTemplateDirective, typeof i17.EdgeLabelHtmlTemplateDirective, typeof i17.EdgeTemplateDirective, typeof i17.ConnectionTemplateDirective, typeof i17.HandleTemplateDirective]>;
22
23
  static ɵinj: i0.ɵɵInjectorDeclaration<VflowModule>;
23
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-vflow",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://www.ngx-vflow.org/",
6
6
  "author": "Artem Mangilev",
package/public-api.d.ts CHANGED
@@ -13,6 +13,7 @@ export * from './lib/vflow/interfaces/component-node-event.interface';
13
13
  export * from './lib/vflow/types/node-change.type';
14
14
  export * from './lib/vflow/types/edge-change.type';
15
15
  export * from './lib/vflow/types/position.type';
16
+ export * from './lib/vflow/types/background.type';
16
17
  export * from './lib/vflow/components/vflow/vflow.component';
17
18
  export * from './lib/vflow/components/handle/handle.component';
18
19
  export * from './lib/vflow/public-components/custom-node.component';