@angflow/angular 0.0.13 → 0.0.14
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/README.md +14 -4
- package/dist/base.css +416 -411
- package/dist/esm/lib/components/a11y-descriptions/a11y-descriptions.component.d.ts +4 -0
- package/dist/esm/lib/components/a11y-descriptions/a11y-descriptions.component.d.ts.map +1 -1
- package/dist/esm/lib/components/a11y-descriptions/a11y-descriptions.component.js +24 -20
- package/dist/esm/lib/components/a11y-descriptions/a11y-descriptions.component.js.map +1 -1
- package/dist/esm/lib/components/attribution/attribution.component.d.ts +4 -0
- package/dist/esm/lib/components/attribution/attribution.component.d.ts.map +1 -1
- package/dist/esm/lib/components/attribution/attribution.component.js +22 -18
- package/dist/esm/lib/components/attribution/attribution.component.js.map +1 -1
- package/dist/esm/lib/components/background/background.component.d.ts +20 -0
- package/dist/esm/lib/components/background/background.component.d.ts.map +1 -1
- package/dist/esm/lib/components/background/background.component.js +159 -140
- package/dist/esm/lib/components/background/background.component.js.map +1 -1
- package/dist/esm/lib/components/connection-line/connection-line.component.d.ts +7 -0
- package/dist/esm/lib/components/connection-line/connection-line.component.d.ts.map +1 -1
- package/dist/esm/lib/components/connection-line/connection-line.component.js +7 -0
- package/dist/esm/lib/components/connection-line/connection-line.component.js.map +1 -1
- package/dist/esm/lib/components/controls/controls.component.d.ts +21 -0
- package/dist/esm/lib/components/controls/controls.component.d.ts.map +1 -1
- package/dist/esm/lib/components/controls/controls.component.js +21 -1
- package/dist/esm/lib/components/controls/controls.component.js.map +1 -1
- package/dist/esm/lib/components/edge-label-renderer/edge-label-renderer.component.d.ts +4 -0
- package/dist/esm/lib/components/edge-label-renderer/edge-label-renderer.component.d.ts.map +1 -1
- package/dist/esm/lib/components/edge-label-renderer/edge-label-renderer.component.js +4 -0
- package/dist/esm/lib/components/edge-label-renderer/edge-label-renderer.component.js.map +1 -1
- package/dist/esm/lib/components/edge-toolbar/edge-toolbar.component.d.ts +12 -0
- package/dist/esm/lib/components/edge-toolbar/edge-toolbar.component.d.ts.map +1 -1
- package/dist/esm/lib/components/edge-toolbar/edge-toolbar.component.js +12 -0
- package/dist/esm/lib/components/edge-toolbar/edge-toolbar.component.js.map +1 -1
- package/dist/esm/lib/components/edges/base-edge.component.d.ts +23 -0
- package/dist/esm/lib/components/edges/base-edge.component.d.ts.map +1 -1
- package/dist/esm/lib/components/edges/base-edge.component.js +63 -40
- package/dist/esm/lib/components/edges/base-edge.component.js.map +1 -1
- package/dist/esm/lib/components/edges/bezier-edge.component.d.ts +4 -0
- package/dist/esm/lib/components/edges/bezier-edge.component.d.ts.map +1 -1
- package/dist/esm/lib/components/edges/bezier-edge.component.js +4 -0
- package/dist/esm/lib/components/edges/bezier-edge.component.js.map +1 -1
- package/dist/esm/lib/components/edges/edge-text.component.d.ts +4 -0
- package/dist/esm/lib/components/edges/edge-text.component.d.ts.map +1 -1
- package/dist/esm/lib/components/edges/edge-text.component.js +30 -26
- package/dist/esm/lib/components/edges/edge-text.component.js.map +1 -1
- package/dist/esm/lib/components/edges/simple-bezier-edge.component.d.ts +4 -0
- package/dist/esm/lib/components/edges/simple-bezier-edge.component.d.ts.map +1 -1
- package/dist/esm/lib/components/edges/simple-bezier-edge.component.js +4 -0
- package/dist/esm/lib/components/edges/simple-bezier-edge.component.js.map +1 -1
- package/dist/esm/lib/components/edges/smooth-step-edge.component.d.ts +1 -0
- package/dist/esm/lib/components/edges/smooth-step-edge.component.d.ts.map +1 -1
- package/dist/esm/lib/components/edges/smooth-step-edge.component.js +1 -0
- package/dist/esm/lib/components/edges/smooth-step-edge.component.js.map +1 -1
- package/dist/esm/lib/components/edges/step-edge.component.d.ts +1 -0
- package/dist/esm/lib/components/edges/step-edge.component.d.ts.map +1 -1
- package/dist/esm/lib/components/edges/step-edge.component.js +1 -0
- package/dist/esm/lib/components/edges/step-edge.component.js.map +1 -1
- package/dist/esm/lib/components/edges/straight-edge.component.d.ts +1 -0
- package/dist/esm/lib/components/edges/straight-edge.component.d.ts.map +1 -1
- package/dist/esm/lib/components/edges/straight-edge.component.js +1 -0
- package/dist/esm/lib/components/edges/straight-edge.component.js.map +1 -1
- package/dist/esm/lib/components/handle/handle.component.d.ts +20 -1
- package/dist/esm/lib/components/handle/handle.component.d.ts.map +1 -1
- package/dist/esm/lib/components/handle/handle.component.js +25 -2
- package/dist/esm/lib/components/handle/handle.component.js.map +1 -1
- package/dist/esm/lib/components/minimap/minimap.component.d.ts +34 -0
- package/dist/esm/lib/components/minimap/minimap.component.d.ts.map +1 -1
- package/dist/esm/lib/components/minimap/minimap.component.js +30 -4
- package/dist/esm/lib/components/minimap/minimap.component.js.map +1 -1
- package/dist/esm/lib/components/ng-flow-provider/ng-flow-provider.component.d.ts +14 -0
- package/dist/esm/lib/components/ng-flow-provider/ng-flow-provider.component.d.ts.map +1 -1
- package/dist/esm/lib/components/ng-flow-provider/ng-flow-provider.component.js +14 -0
- package/dist/esm/lib/components/ng-flow-provider/ng-flow-provider.component.js.map +1 -1
- package/dist/esm/lib/components/node-resizer/node-resizer.component.d.ts +29 -0
- package/dist/esm/lib/components/node-resizer/node-resizer.component.d.ts.map +1 -1
- package/dist/esm/lib/components/node-resizer/node-resizer.component.js +153 -124
- package/dist/esm/lib/components/node-resizer/node-resizer.component.js.map +1 -1
- package/dist/esm/lib/components/node-toolbar/node-toolbar.component.d.ts +21 -1
- package/dist/esm/lib/components/node-toolbar/node-toolbar.component.d.ts.map +1 -1
- package/dist/esm/lib/components/node-toolbar/node-toolbar.component.js +21 -1
- package/dist/esm/lib/components/node-toolbar/node-toolbar.component.js.map +1 -1
- package/dist/esm/lib/components/nodes/default-node.component.d.ts +4 -0
- package/dist/esm/lib/components/nodes/default-node.component.d.ts.map +1 -1
- package/dist/esm/lib/components/nodes/default-node.component.js +13 -9
- package/dist/esm/lib/components/nodes/default-node.component.js.map +1 -1
- package/dist/esm/lib/components/nodes/group-node.component.d.ts +5 -0
- package/dist/esm/lib/components/nodes/group-node.component.d.ts.map +1 -1
- package/dist/esm/lib/components/nodes/group-node.component.js +5 -0
- package/dist/esm/lib/components/nodes/group-node.component.js.map +1 -1
- package/dist/esm/lib/components/nodes/input-node.component.d.ts +4 -0
- package/dist/esm/lib/components/nodes/input-node.component.d.ts.map +1 -1
- package/dist/esm/lib/components/nodes/input-node.component.js +11 -7
- package/dist/esm/lib/components/nodes/input-node.component.js.map +1 -1
- package/dist/esm/lib/components/nodes/output-node.component.d.ts +4 -0
- package/dist/esm/lib/components/nodes/output-node.component.d.ts.map +1 -1
- package/dist/esm/lib/components/nodes/output-node.component.js +11 -7
- package/dist/esm/lib/components/nodes/output-node.component.js.map +1 -1
- package/dist/esm/lib/components/panel/panel.component.d.ts +12 -0
- package/dist/esm/lib/components/panel/panel.component.d.ts.map +1 -1
- package/dist/esm/lib/components/panel/panel.component.js +12 -0
- package/dist/esm/lib/components/panel/panel.component.js.map +1 -1
- package/dist/esm/lib/components/viewport-portal/viewport-portal.component.d.ts +5 -0
- package/dist/esm/lib/components/viewport-portal/viewport-portal.component.d.ts.map +1 -1
- package/dist/esm/lib/components/viewport-portal/viewport-portal.component.js +5 -0
- package/dist/esm/lib/components/viewport-portal/viewport-portal.component.js.map +1 -1
- package/dist/esm/lib/container/edge-renderer/edge-renderer.component.d.ts.map +1 -1
- package/dist/esm/lib/container/edge-renderer/edge-renderer.component.js +35 -3
- package/dist/esm/lib/container/edge-renderer/edge-renderer.component.js.map +1 -1
- package/dist/esm/lib/container/ng-flow/ng-flow.component.d.ts +154 -1
- package/dist/esm/lib/container/ng-flow/ng-flow.component.d.ts.map +1 -1
- package/dist/esm/lib/container/ng-flow/ng-flow.component.js +162 -23
- package/dist/esm/lib/container/ng-flow/ng-flow.component.js.map +1 -1
- package/dist/esm/lib/container/node-renderer/node-renderer.component.d.ts +2 -0
- package/dist/esm/lib/container/node-renderer/node-renderer.component.d.ts.map +1 -1
- package/dist/esm/lib/container/node-renderer/node-renderer.component.js +40 -2
- package/dist/esm/lib/container/node-renderer/node-renderer.component.js.map +1 -1
- package/dist/esm/lib/container/pane/pane.component.d.ts +0 -1
- package/dist/esm/lib/container/pane/pane.component.d.ts.map +1 -1
- package/dist/esm/lib/container/pane/pane.component.js +18 -25
- package/dist/esm/lib/container/pane/pane.component.js.map +1 -1
- package/dist/esm/lib/container/viewport/viewport.component.d.ts +4 -0
- package/dist/esm/lib/container/viewport/viewport.component.d.ts.map +1 -1
- package/dist/esm/lib/container/viewport/viewport.component.js +4 -0
- package/dist/esm/lib/container/viewport/viewport.component.js.map +1 -1
- package/dist/esm/lib/directives/drag.directive.d.ts +17 -0
- package/dist/esm/lib/directives/drag.directive.d.ts.map +1 -1
- package/dist/esm/lib/directives/drag.directive.js +17 -0
- package/dist/esm/lib/directives/drag.directive.js.map +1 -1
- package/dist/esm/lib/directives/key-handler.directive.d.ts +13 -0
- package/dist/esm/lib/directives/key-handler.directive.d.ts.map +1 -1
- package/dist/esm/lib/directives/key-handler.directive.js +13 -0
- package/dist/esm/lib/directives/key-handler.directive.js.map +1 -1
- package/dist/esm/lib/public-api.d.ts +1 -0
- package/dist/esm/lib/public-api.d.ts.map +1 -1
- package/dist/esm/lib/public-api.js +2 -0
- package/dist/esm/lib/public-api.js.map +1 -1
- package/dist/esm/lib/services/flow-store.service.d.ts +3 -0
- package/dist/esm/lib/services/flow-store.service.d.ts.map +1 -1
- package/dist/esm/lib/services/flow-store.service.js +3 -0
- package/dist/esm/lib/services/flow-store.service.js.map +1 -1
- package/dist/esm/lib/services/ng-flow.service.d.ts +82 -0
- package/dist/esm/lib/services/ng-flow.service.d.ts.map +1 -1
- package/dist/esm/lib/services/ng-flow.service.js +82 -0
- package/dist/esm/lib/services/ng-flow.service.js.map +1 -1
- package/dist/esm/lib/services/tokens.d.ts +23 -0
- package/dist/esm/lib/services/tokens.d.ts.map +1 -1
- package/dist/esm/lib/services/tokens.js +22 -0
- package/dist/esm/lib/services/tokens.js.map +1 -1
- package/dist/esm/lib/types/nodes.d.ts +36 -2
- package/dist/esm/lib/types/nodes.d.ts.map +1 -1
- package/dist/esm/lib/utils/changes.d.ts +20 -0
- package/dist/esm/lib/utils/changes.d.ts.map +1 -1
- package/dist/esm/lib/utils/changes.js +20 -0
- package/dist/esm/lib/utils/changes.js.map +1 -1
- package/dist/esm/lib/utils/index.d.ts +1 -0
- package/dist/esm/lib/utils/index.d.ts.map +1 -1
- package/dist/esm/lib/utils/index.js +1 -0
- package/dist/esm/lib/utils/index.js.map +1 -1
- package/dist/esm/lib/utils/inject-ng-flow-node.d.ts +20 -0
- package/dist/esm/lib/utils/inject-ng-flow-node.d.ts.map +1 -0
- package/dist/esm/lib/utils/inject-ng-flow-node.js +28 -0
- package/dist/esm/lib/utils/inject-ng-flow-node.js.map +1 -0
- package/dist/style.css +416 -411
- package/package.json +6 -6
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Screen-reader-only descriptions referenced by node, edge, and handle
|
|
4
|
+
* `aria-describedby` attributes. Rendered internally by `<ng-flow>`.
|
|
5
|
+
*/
|
|
2
6
|
export declare class A11yDescriptionsComponent {
|
|
3
7
|
private store;
|
|
4
8
|
get rfId(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y-descriptions.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/a11y-descriptions/a11y-descriptions.component.ts"],"names":[],"mappings":";AAGA,qBAmBa,yBAAyB;IACpC,OAAO,CAAC,KAAK,CAAqB;IAElC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;OAA8B;yCAPlC,yBAAyB;2CAAzB,yBAAyB;CAQrC"}
|
|
1
|
+
{"version":3,"file":"a11y-descriptions.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/a11y-descriptions/a11y-descriptions.component.ts"],"names":[],"mappings":";AAGA;;;GAGG;AACH,qBAmBa,yBAAyB;IACpC,OAAO,CAAC,KAAK,CAAqB;IAElC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;OAA8B;yCAPlC,yBAAyB;2CAAzB,yBAAyB;CAQrC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy, inject } from '@angular/core';
|
|
2
2
|
import { FlowStore } from '../../services/flow-store.service';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Screen-reader-only descriptions referenced by node, edge, and handle
|
|
6
|
+
* `aria-describedby` attributes. Rendered internally by `<ng-flow>`.
|
|
7
|
+
*/
|
|
4
8
|
export class A11yDescriptionsComponent {
|
|
5
9
|
constructor() {
|
|
6
10
|
this.store = inject(FlowStore);
|
|
@@ -10,16 +14,16 @@ export class A11yDescriptionsComponent {
|
|
|
10
14
|
return this.store.rfId();
|
|
11
15
|
}
|
|
12
16
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: A11yDescriptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: A11yDescriptionsComponent, isStandalone: true, selector: "ng-flow-a11y-descriptions", host: { styleAttribute: "position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0;" }, ngImport: i0, template: `
|
|
14
|
-
<div [id]="rfId + '-node-desc'" class="xy-flow__sr-only">
|
|
15
|
-
{{ config()['node.a11yDescription.default'] }}
|
|
16
|
-
</div>
|
|
17
|
-
<div [id]="rfId + '-handle-desc'" class="xy-flow__sr-only">
|
|
18
|
-
{{ config()['handle.ariaLabel'] }}
|
|
19
|
-
</div>
|
|
20
|
-
<div [id]="rfId + '-edge-desc'" class="xy-flow__sr-only">
|
|
21
|
-
Edge connection
|
|
22
|
-
</div>
|
|
17
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: A11yDescriptionsComponent, isStandalone: true, selector: "ng-flow-a11y-descriptions", host: { styleAttribute: "position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0;" }, ngImport: i0, template: `
|
|
18
|
+
<div [id]="rfId + '-node-desc'" class="xy-flow__sr-only">
|
|
19
|
+
{{ config()['node.a11yDescription.default'] }}
|
|
20
|
+
</div>
|
|
21
|
+
<div [id]="rfId + '-handle-desc'" class="xy-flow__sr-only">
|
|
22
|
+
{{ config()['handle.ariaLabel'] }}
|
|
23
|
+
</div>
|
|
24
|
+
<div [id]="rfId + '-edge-desc'" class="xy-flow__sr-only">
|
|
25
|
+
Edge connection
|
|
26
|
+
</div>
|
|
23
27
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24
28
|
}
|
|
25
29
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: A11yDescriptionsComponent, decorators: [{
|
|
@@ -28,16 +32,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
28
32
|
selector: 'ng-flow-a11y-descriptions',
|
|
29
33
|
standalone: true,
|
|
30
34
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
31
|
-
template: `
|
|
32
|
-
<div [id]="rfId + '-node-desc'" class="xy-flow__sr-only">
|
|
33
|
-
{{ config()['node.a11yDescription.default'] }}
|
|
34
|
-
</div>
|
|
35
|
-
<div [id]="rfId + '-handle-desc'" class="xy-flow__sr-only">
|
|
36
|
-
{{ config()['handle.ariaLabel'] }}
|
|
37
|
-
</div>
|
|
38
|
-
<div [id]="rfId + '-edge-desc'" class="xy-flow__sr-only">
|
|
39
|
-
Edge connection
|
|
40
|
-
</div>
|
|
35
|
+
template: `
|
|
36
|
+
<div [id]="rfId + '-node-desc'" class="xy-flow__sr-only">
|
|
37
|
+
{{ config()['node.a11yDescription.default'] }}
|
|
38
|
+
</div>
|
|
39
|
+
<div [id]="rfId + '-handle-desc'" class="xy-flow__sr-only">
|
|
40
|
+
{{ config()['handle.ariaLabel'] }}
|
|
41
|
+
</div>
|
|
42
|
+
<div [id]="rfId + '-edge-desc'" class="xy-flow__sr-only">
|
|
43
|
+
Edge connection
|
|
44
|
+
</div>
|
|
41
45
|
`,
|
|
42
46
|
host: {
|
|
43
47
|
'style': 'position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0;',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y-descriptions.component.js","sourceRoot":"","sources":["../../../../../src/lib/components/a11y-descriptions/a11y-descriptions.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;;
|
|
1
|
+
{"version":3,"file":"a11y-descriptions.component.js","sourceRoot":"","sources":["../../../../../src/lib/components/a11y-descriptions/a11y-descriptions.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;;AAE9D;;;GAGG;AAoBH,MAAM,OAAO,yBAAyB;IAnBtC;QAoBU,UAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAMzB,WAAM,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;KAC9C;IALC,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IAC3B,CAAC;8GALU,yBAAyB;kGAAzB,yBAAyB,2OAf1B;;;;;;;;;;GAUT;;2FAKU,yBAAyB;kBAnBrC,SAAS;mBAAC;oBACT,QAAQ,EAAE,2BAA2B;oBACrC,UAAU,EAAE,IAAI;oBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,QAAQ,EAAE;;;;;;;;;;GAUT;oBACD,IAAI,EAAE;wBACJ,OAAO,EAAE,0HAA0H;qBACpI;iBACF"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Small library-attribution badge rendered in the bottom-right corner.
|
|
4
|
+
* Rendered internally by `<ng-flow>`; hide via `[hideAttribution]="true"`.
|
|
5
|
+
*/
|
|
2
6
|
export declare class AttributionComponent {
|
|
3
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<AttributionComponent, never>;
|
|
4
8
|
static ɵcmp: i0.ɵɵComponentDeclaration<AttributionComponent, "ng-flow-attribution", never, {}, {}, never, never, true, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribution.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/attribution/attribution.component.ts"],"names":[],"mappings":";AAGA,qBAgBa,oBAAoB;yCAApB,oBAAoB;2CAApB,oBAAoB;CAAG"}
|
|
1
|
+
{"version":3,"file":"attribution.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/attribution/attribution.component.ts"],"names":[],"mappings":";AAGA;;;GAGG;AACH,qBAgBa,oBAAoB;yCAApB,oBAAoB;2CAApB,oBAAoB;CAAG"}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
2
|
import { PanelComponent } from '../panel/panel.component';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Small library-attribution badge rendered in the bottom-right corner.
|
|
6
|
+
* Rendered internally by `<ng-flow>`; hide via `[hideAttribution]="true"`.
|
|
7
|
+
*/
|
|
4
8
|
export class AttributionComponent {
|
|
5
9
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: AttributionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: AttributionComponent, isStandalone: true, selector: "ng-flow-attribution", ngImport: i0, template: `
|
|
7
|
-
<ng-flow-panel position="bottom-right">
|
|
8
|
-
<span
|
|
9
|
-
class="ng-flow__attribution xy-flow__attribution"
|
|
10
|
-
style="font-size: 10px; color: #999; pointer-events: all;"
|
|
11
|
-
>
|
|
12
|
-
angflow
|
|
13
|
-
</span>
|
|
14
|
-
</ng-flow-panel>
|
|
10
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: AttributionComponent, isStandalone: true, selector: "ng-flow-attribution", ngImport: i0, template: `
|
|
11
|
+
<ng-flow-panel position="bottom-right">
|
|
12
|
+
<span
|
|
13
|
+
class="ng-flow__attribution xy-flow__attribution"
|
|
14
|
+
style="font-size: 10px; color: #999; pointer-events: all;"
|
|
15
|
+
>
|
|
16
|
+
angflow
|
|
17
|
+
</span>
|
|
18
|
+
</ng-flow-panel>
|
|
15
19
|
`, isInline: true, dependencies: [{ kind: "component", type: PanelComponent, selector: "ng-flow-panel", inputs: ["position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
16
20
|
}
|
|
17
21
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: AttributionComponent, decorators: [{
|
|
@@ -21,15 +25,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
21
25
|
standalone: true,
|
|
22
26
|
imports: [PanelComponent],
|
|
23
27
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
24
|
-
template: `
|
|
25
|
-
<ng-flow-panel position="bottom-right">
|
|
26
|
-
<span
|
|
27
|
-
class="ng-flow__attribution xy-flow__attribution"
|
|
28
|
-
style="font-size: 10px; color: #999; pointer-events: all;"
|
|
29
|
-
>
|
|
30
|
-
angflow
|
|
31
|
-
</span>
|
|
32
|
-
</ng-flow-panel>
|
|
28
|
+
template: `
|
|
29
|
+
<ng-flow-panel position="bottom-right">
|
|
30
|
+
<span
|
|
31
|
+
class="ng-flow__attribution xy-flow__attribution"
|
|
32
|
+
style="font-size: 10px; color: #999; pointer-events: all;"
|
|
33
|
+
>
|
|
34
|
+
angflow
|
|
35
|
+
</span>
|
|
36
|
+
</ng-flow-panel>
|
|
33
37
|
`,
|
|
34
38
|
}]
|
|
35
39
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attribution.component.js","sourceRoot":"","sources":["../../../../../src/lib/components/attribution/attribution.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;;
|
|
1
|
+
{"version":3,"file":"attribution.component.js","sourceRoot":"","sources":["../../../../../src/lib/components/attribution/attribution.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;;AAE1D;;;GAGG;AAiBH,MAAM,OAAO,oBAAoB;8GAApB,oBAAoB;kGAApB,oBAAoB,+EAXrB;;;;;;;;;GAST,4DAXS,cAAc;;2FAab,oBAAoB;kBAhBhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,qBAAqB;oBAC/B,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,QAAQ,EAAE;;;;;;;;;GAST;iBACF"}
|
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
/** Visual pattern rendered behind the canvas. */
|
|
2
3
|
export type BackgroundVariant = 'dots' | 'lines' | 'cross';
|
|
4
|
+
/**
|
|
5
|
+
* Tiled SVG background rendered behind nodes and edges. Pattern tracks the
|
|
6
|
+
* viewport so it stays aligned while panning and zooming.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```html
|
|
10
|
+
* <ng-flow-background variant="dots" [gap]="20" />
|
|
11
|
+
* <ng-flow-background variant="lines" color="#ddd" />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
3
14
|
export declare class BackgroundComponent {
|
|
4
15
|
private store;
|
|
16
|
+
/** Pattern shape. */
|
|
5
17
|
readonly variant: import("@angular/core").InputSignal<BackgroundVariant>;
|
|
18
|
+
/** Distance between pattern elements. Accepts a single number or `[x, y]`. */
|
|
6
19
|
readonly gap: import("@angular/core").InputSignal<number | [number, number]>;
|
|
20
|
+
/** Dot radius (for `dots`) or cross arm length (for `cross`). */
|
|
7
21
|
readonly size: import("@angular/core").InputSignal<number>;
|
|
22
|
+
/** Stroke width for `lines` and `cross` variants. Defaults match `size` for dots. */
|
|
8
23
|
readonly lineWidth: import("@angular/core").InputSignal<number | undefined>;
|
|
24
|
+
/** Offset of the pattern origin from the viewport origin. */
|
|
9
25
|
readonly offset: import("@angular/core").InputSignal<number | [number, number]>;
|
|
26
|
+
/** Pattern stroke/fill color. */
|
|
10
27
|
readonly color: import("@angular/core").InputSignal<string | undefined>;
|
|
28
|
+
/** Solid fill drawn behind the pattern. Leave unset for transparent. */
|
|
11
29
|
readonly bgColor: import("@angular/core").InputSignal<string | undefined>;
|
|
30
|
+
/** Extra CSS class applied to each generated pattern shape. */
|
|
12
31
|
readonly patternClassName: import("@angular/core").InputSignal<string | undefined>;
|
|
32
|
+
/** Override the generated SVG pattern id. Aliased as `id`. */
|
|
13
33
|
readonly bgId: import("@angular/core").InputSignal<string | undefined>;
|
|
14
34
|
readonly patternId: import("@angular/core").Signal<string>;
|
|
15
35
|
readonly zoom: import("@angular/core").Signal<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/background/background.component.ts"],"names":[],"mappings":";AAGA,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAE3D,qBAgFa,mBAAmB;IAC9B,OAAO,CAAC,KAAK,CAAqB;IAElC,QAAQ,CAAC,OAAO,yDAAoC;IACpD,QAAQ,CAAC,GAAG,iEAAwC;IACpD,QAAQ,CAAC,IAAI,8CAAY;IACzB,QAAQ,CAAC,SAAS,0DAAmB;IACrC,QAAQ,CAAC,MAAM,iEAAuC;IACtD,QAAQ,CAAC,KAAK,0DAAmB;IACjC,QAAQ,CAAC,OAAO,0DAAmB;IACnC,QAAQ,CAAC,gBAAgB,0DAAmB;IAC5C,QAAQ,CAAC,IAAI,0DAAyD;IAEtE,QAAQ,CAAC,SAAS,yCAGf;IAEH,QAAQ,CAAC,IAAI,yCAA6C;IAE1D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAGlB;IAEH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAGlB;IAEH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAGrB;IAEH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAGrB;IAEH,QAAQ,CAAC,UAAU,yCAA6C;IAChE,QAAQ,CAAC,UAAU,yCAA6C;IAEhE,QAAQ,CAAC,iBAAiB,yCAIvB;IAEH,QAAQ,CAAC,aAAa;;;OAMnB;IAEH,QAAQ,CAAC,SAAS,yCAOf;
|
|
1
|
+
{"version":3,"file":"background.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/background/background.component.ts"],"names":[],"mappings":";AAGA,iDAAiD;AACjD,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAE3D;;;;;;;;;GASG;AACH,qBAgFa,mBAAmB;IAC9B,OAAO,CAAC,KAAK,CAAqB;IAElC,qBAAqB;IACrB,QAAQ,CAAC,OAAO,yDAAoC;IACpD,8EAA8E;IAC9E,QAAQ,CAAC,GAAG,iEAAwC;IACpD,iEAAiE;IACjE,QAAQ,CAAC,IAAI,8CAAY;IACzB,qFAAqF;IACrF,QAAQ,CAAC,SAAS,0DAAmB;IACrC,6DAA6D;IAC7D,QAAQ,CAAC,MAAM,iEAAuC;IACtD,iCAAiC;IACjC,QAAQ,CAAC,KAAK,0DAAmB;IACjC,wEAAwE;IACxE,QAAQ,CAAC,OAAO,0DAAmB;IACnC,+DAA+D;IAC/D,QAAQ,CAAC,gBAAgB,0DAAmB;IAC5C,8DAA8D;IAC9D,QAAQ,CAAC,IAAI,0DAAyD;IAEtE,QAAQ,CAAC,SAAS,yCAGf;IAEH,QAAQ,CAAC,IAAI,yCAA6C;IAE1D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAGlB;IAEH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAGlB;IAEH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAGrB;IAEH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAGrB;IAEH,QAAQ,CAAC,UAAU,yCAA6C;IAChE,QAAQ,CAAC,UAAU,yCAA6C;IAEhE,QAAQ,CAAC,iBAAiB,yCAIvB;IAEH,QAAQ,CAAC,aAAa;;;OAMnB;IAEH,QAAQ,CAAC,SAAS,yCAOf;yCAzEQ,mBAAmB;2CAAnB,mBAAmB;CA0E/B"}
|
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy, input, inject, computed } from '@angular/core';
|
|
2
2
|
import { FlowStore } from '../../services/flow-store.service';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Tiled SVG background rendered behind nodes and edges. Pattern tracks the
|
|
6
|
+
* viewport so it stays aligned while panning and zooming.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```html
|
|
10
|
+
* <ng-flow-background variant="dots" [gap]="20" />
|
|
11
|
+
* <ng-flow-background variant="lines" color="#ddd" />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
4
14
|
export class BackgroundComponent {
|
|
5
15
|
constructor() {
|
|
6
16
|
this.store = inject(FlowStore);
|
|
17
|
+
/** Pattern shape. */
|
|
7
18
|
this.variant = input('dots', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
19
|
+
/** Distance between pattern elements. Accepts a single number or `[x, y]`. */
|
|
8
20
|
this.gap = input(20, ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
|
|
21
|
+
/** Dot radius (for `dots`) or cross arm length (for `cross`). */
|
|
9
22
|
this.size = input(1, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
23
|
+
/** Stroke width for `lines` and `cross` variants. Defaults match `size` for dots. */
|
|
10
24
|
this.lineWidth = input(...(ngDevMode ? [undefined, { debugName: "lineWidth" }] : /* istanbul ignore next */ []));
|
|
25
|
+
/** Offset of the pattern origin from the viewport origin. */
|
|
11
26
|
this.offset = input(0, ...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
27
|
+
/** Pattern stroke/fill color. */
|
|
12
28
|
this.color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
29
|
+
/** Solid fill drawn behind the pattern. Leave unset for transparent. */
|
|
13
30
|
this.bgColor = input(...(ngDevMode ? [undefined, { debugName: "bgColor" }] : /* istanbul ignore next */ []));
|
|
31
|
+
/** Extra CSS class applied to each generated pattern shape. */
|
|
14
32
|
this.patternClassName = input(...(ngDevMode ? [undefined, { debugName: "patternClassName" }] : /* istanbul ignore next */ []));
|
|
33
|
+
/** Override the generated SVG pattern id. Aliased as `id`. */
|
|
15
34
|
this.bgId = input(undefined, { ...(ngDevMode ? { debugName: "bgId" } : /* istanbul ignore next */ {}), alias: 'id' });
|
|
16
35
|
this.patternId = computed(() => {
|
|
17
36
|
const customId = this.bgId();
|
|
@@ -59,76 +78,76 @@ export class BackgroundComponent {
|
|
|
59
78
|
}, ...(ngDevMode ? [{ debugName: "crossPath" }] : /* istanbul ignore next */ []));
|
|
60
79
|
}
|
|
61
80
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: BackgroundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
62
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: BackgroundComponent, isStandalone: true, selector: "ng-flow-background", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, lineWidth: { classPropertyName: "lineWidth", publicName: "lineWidth", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, patternClassName: { classPropertyName: "patternClassName", publicName: "patternClassName", isSignal: true, isRequired: false, transformFunction: null }, bgId: { classPropertyName: "bgId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: block; position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; z-index: -1;", classAttribute: "ng-flow__background xy-flow__background xy-flow__container" }, ngImport: i0, template: `
|
|
63
|
-
<svg
|
|
64
|
-
class="ng-flow__background-svg"
|
|
65
|
-
[style.width]="'100%'"
|
|
66
|
-
[style.height]="'100%'"
|
|
67
|
-
>
|
|
68
|
-
@if (bgColor()) {
|
|
69
|
-
<rect x="0" y="0" width="100%" height="100%" [attr.fill]="bgColor()" />
|
|
70
|
-
}
|
|
71
|
-
<defs>
|
|
72
|
-
@switch (variant()) {
|
|
73
|
-
@case ('dots') {
|
|
74
|
-
<pattern
|
|
75
|
-
[attr.id]="patternId()"
|
|
76
|
-
[attr.x]="patternOffset().x"
|
|
77
|
-
[attr.y]="patternOffset().y"
|
|
78
|
-
[attr.width]="scaledGapX()"
|
|
79
|
-
[attr.height]="scaledGapY()"
|
|
80
|
-
patternUnits="userSpaceOnUse"
|
|
81
|
-
>
|
|
82
|
-
<circle
|
|
83
|
-
[class]="'xy-flow__background-pattern dots ' + (patternClassName() ?? '')"
|
|
84
|
-
[attr.cx]="size() * zoom()"
|
|
85
|
-
[attr.cy]="size() * zoom()"
|
|
86
|
-
[attr.r]="size() * zoom()"
|
|
87
|
-
[attr.fill]="color()"
|
|
88
|
-
/>
|
|
89
|
-
</pattern>
|
|
90
|
-
}
|
|
91
|
-
@case ('lines') {
|
|
92
|
-
<pattern
|
|
93
|
-
[attr.id]="patternId()"
|
|
94
|
-
[attr.x]="patternOffset().x"
|
|
95
|
-
[attr.y]="patternOffset().y"
|
|
96
|
-
[attr.width]="scaledGapX()"
|
|
97
|
-
[attr.height]="scaledGapY()"
|
|
98
|
-
patternUnits="userSpaceOnUse"
|
|
99
|
-
>
|
|
100
|
-
<path
|
|
101
|
-
[class]="'xy-flow__background-pattern lines ' + (patternClassName() ?? '')"
|
|
102
|
-
[attr.stroke]="color()"
|
|
103
|
-
[attr.stroke-width]="resolvedLineWidth() * zoom()"
|
|
104
|
-
[attr.d]="'M ' + scaledGapX() + ' 0 L 0 0 0 ' + scaledGapY()"
|
|
105
|
-
/>
|
|
106
|
-
</pattern>
|
|
107
|
-
}
|
|
108
|
-
@case ('cross') {
|
|
109
|
-
<pattern
|
|
110
|
-
[attr.id]="patternId()"
|
|
111
|
-
[attr.x]="patternOffset().x"
|
|
112
|
-
[attr.y]="patternOffset().y"
|
|
113
|
-
[attr.width]="scaledGapX()"
|
|
114
|
-
[attr.height]="scaledGapY()"
|
|
115
|
-
patternUnits="userSpaceOnUse"
|
|
116
|
-
>
|
|
117
|
-
<path
|
|
118
|
-
[class]="'xy-flow__background-pattern cross ' + (patternClassName() ?? '')"
|
|
119
|
-
[attr.stroke]="color()"
|
|
120
|
-
[attr.stroke-width]="resolvedLineWidth() * zoom()"
|
|
121
|
-
[attr.d]="crossPath()"
|
|
122
|
-
/>
|
|
123
|
-
</pattern>
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
</defs>
|
|
127
|
-
<rect
|
|
128
|
-
x="0" y="0" width="100%" height="100%"
|
|
129
|
-
[attr.fill]="'url(#' + patternId() + ')'"
|
|
130
|
-
/>
|
|
131
|
-
</svg>
|
|
81
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: BackgroundComponent, isStandalone: true, selector: "ng-flow-background", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, lineWidth: { classPropertyName: "lineWidth", publicName: "lineWidth", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, patternClassName: { classPropertyName: "patternClassName", publicName: "patternClassName", isSignal: true, isRequired: false, transformFunction: null }, bgId: { classPropertyName: "bgId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: block; position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; z-index: -1;", classAttribute: "ng-flow__background xy-flow__background xy-flow__container" }, ngImport: i0, template: `
|
|
82
|
+
<svg
|
|
83
|
+
class="ng-flow__background-svg"
|
|
84
|
+
[style.width]="'100%'"
|
|
85
|
+
[style.height]="'100%'"
|
|
86
|
+
>
|
|
87
|
+
@if (bgColor()) {
|
|
88
|
+
<rect x="0" y="0" width="100%" height="100%" [attr.fill]="bgColor()" />
|
|
89
|
+
}
|
|
90
|
+
<defs>
|
|
91
|
+
@switch (variant()) {
|
|
92
|
+
@case ('dots') {
|
|
93
|
+
<pattern
|
|
94
|
+
[attr.id]="patternId()"
|
|
95
|
+
[attr.x]="patternOffset().x"
|
|
96
|
+
[attr.y]="patternOffset().y"
|
|
97
|
+
[attr.width]="scaledGapX()"
|
|
98
|
+
[attr.height]="scaledGapY()"
|
|
99
|
+
patternUnits="userSpaceOnUse"
|
|
100
|
+
>
|
|
101
|
+
<circle
|
|
102
|
+
[class]="'xy-flow__background-pattern dots ' + (patternClassName() ?? '')"
|
|
103
|
+
[attr.cx]="size() * zoom()"
|
|
104
|
+
[attr.cy]="size() * zoom()"
|
|
105
|
+
[attr.r]="size() * zoom()"
|
|
106
|
+
[attr.fill]="color()"
|
|
107
|
+
/>
|
|
108
|
+
</pattern>
|
|
109
|
+
}
|
|
110
|
+
@case ('lines') {
|
|
111
|
+
<pattern
|
|
112
|
+
[attr.id]="patternId()"
|
|
113
|
+
[attr.x]="patternOffset().x"
|
|
114
|
+
[attr.y]="patternOffset().y"
|
|
115
|
+
[attr.width]="scaledGapX()"
|
|
116
|
+
[attr.height]="scaledGapY()"
|
|
117
|
+
patternUnits="userSpaceOnUse"
|
|
118
|
+
>
|
|
119
|
+
<path
|
|
120
|
+
[class]="'xy-flow__background-pattern lines ' + (patternClassName() ?? '')"
|
|
121
|
+
[attr.stroke]="color()"
|
|
122
|
+
[attr.stroke-width]="resolvedLineWidth() * zoom()"
|
|
123
|
+
[attr.d]="'M ' + scaledGapX() + ' 0 L 0 0 0 ' + scaledGapY()"
|
|
124
|
+
/>
|
|
125
|
+
</pattern>
|
|
126
|
+
}
|
|
127
|
+
@case ('cross') {
|
|
128
|
+
<pattern
|
|
129
|
+
[attr.id]="patternId()"
|
|
130
|
+
[attr.x]="patternOffset().x"
|
|
131
|
+
[attr.y]="patternOffset().y"
|
|
132
|
+
[attr.width]="scaledGapX()"
|
|
133
|
+
[attr.height]="scaledGapY()"
|
|
134
|
+
patternUnits="userSpaceOnUse"
|
|
135
|
+
>
|
|
136
|
+
<path
|
|
137
|
+
[class]="'xy-flow__background-pattern cross ' + (patternClassName() ?? '')"
|
|
138
|
+
[attr.stroke]="color()"
|
|
139
|
+
[attr.stroke-width]="resolvedLineWidth() * zoom()"
|
|
140
|
+
[attr.d]="crossPath()"
|
|
141
|
+
/>
|
|
142
|
+
</pattern>
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
</defs>
|
|
146
|
+
<rect
|
|
147
|
+
x="0" y="0" width="100%" height="100%"
|
|
148
|
+
[attr.fill]="'url(#' + patternId() + ')'"
|
|
149
|
+
/>
|
|
150
|
+
</svg>
|
|
132
151
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
133
152
|
}
|
|
134
153
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: BackgroundComponent, decorators: [{
|
|
@@ -141,76 +160,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
141
160
|
'class': 'ng-flow__background xy-flow__background xy-flow__container',
|
|
142
161
|
'style': 'display: block; position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; z-index: -1;',
|
|
143
162
|
},
|
|
144
|
-
template: `
|
|
145
|
-
<svg
|
|
146
|
-
class="ng-flow__background-svg"
|
|
147
|
-
[style.width]="'100%'"
|
|
148
|
-
[style.height]="'100%'"
|
|
149
|
-
>
|
|
150
|
-
@if (bgColor()) {
|
|
151
|
-
<rect x="0" y="0" width="100%" height="100%" [attr.fill]="bgColor()" />
|
|
152
|
-
}
|
|
153
|
-
<defs>
|
|
154
|
-
@switch (variant()) {
|
|
155
|
-
@case ('dots') {
|
|
156
|
-
<pattern
|
|
157
|
-
[attr.id]="patternId()"
|
|
158
|
-
[attr.x]="patternOffset().x"
|
|
159
|
-
[attr.y]="patternOffset().y"
|
|
160
|
-
[attr.width]="scaledGapX()"
|
|
161
|
-
[attr.height]="scaledGapY()"
|
|
162
|
-
patternUnits="userSpaceOnUse"
|
|
163
|
-
>
|
|
164
|
-
<circle
|
|
165
|
-
[class]="'xy-flow__background-pattern dots ' + (patternClassName() ?? '')"
|
|
166
|
-
[attr.cx]="size() * zoom()"
|
|
167
|
-
[attr.cy]="size() * zoom()"
|
|
168
|
-
[attr.r]="size() * zoom()"
|
|
169
|
-
[attr.fill]="color()"
|
|
170
|
-
/>
|
|
171
|
-
</pattern>
|
|
172
|
-
}
|
|
173
|
-
@case ('lines') {
|
|
174
|
-
<pattern
|
|
175
|
-
[attr.id]="patternId()"
|
|
176
|
-
[attr.x]="patternOffset().x"
|
|
177
|
-
[attr.y]="patternOffset().y"
|
|
178
|
-
[attr.width]="scaledGapX()"
|
|
179
|
-
[attr.height]="scaledGapY()"
|
|
180
|
-
patternUnits="userSpaceOnUse"
|
|
181
|
-
>
|
|
182
|
-
<path
|
|
183
|
-
[class]="'xy-flow__background-pattern lines ' + (patternClassName() ?? '')"
|
|
184
|
-
[attr.stroke]="color()"
|
|
185
|
-
[attr.stroke-width]="resolvedLineWidth() * zoom()"
|
|
186
|
-
[attr.d]="'M ' + scaledGapX() + ' 0 L 0 0 0 ' + scaledGapY()"
|
|
187
|
-
/>
|
|
188
|
-
</pattern>
|
|
189
|
-
}
|
|
190
|
-
@case ('cross') {
|
|
191
|
-
<pattern
|
|
192
|
-
[attr.id]="patternId()"
|
|
193
|
-
[attr.x]="patternOffset().x"
|
|
194
|
-
[attr.y]="patternOffset().y"
|
|
195
|
-
[attr.width]="scaledGapX()"
|
|
196
|
-
[attr.height]="scaledGapY()"
|
|
197
|
-
patternUnits="userSpaceOnUse"
|
|
198
|
-
>
|
|
199
|
-
<path
|
|
200
|
-
[class]="'xy-flow__background-pattern cross ' + (patternClassName() ?? '')"
|
|
201
|
-
[attr.stroke]="color()"
|
|
202
|
-
[attr.stroke-width]="resolvedLineWidth() * zoom()"
|
|
203
|
-
[attr.d]="crossPath()"
|
|
204
|
-
/>
|
|
205
|
-
</pattern>
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
</defs>
|
|
209
|
-
<rect
|
|
210
|
-
x="0" y="0" width="100%" height="100%"
|
|
211
|
-
[attr.fill]="'url(#' + patternId() + ')'"
|
|
212
|
-
/>
|
|
213
|
-
</svg>
|
|
163
|
+
template: `
|
|
164
|
+
<svg
|
|
165
|
+
class="ng-flow__background-svg"
|
|
166
|
+
[style.width]="'100%'"
|
|
167
|
+
[style.height]="'100%'"
|
|
168
|
+
>
|
|
169
|
+
@if (bgColor()) {
|
|
170
|
+
<rect x="0" y="0" width="100%" height="100%" [attr.fill]="bgColor()" />
|
|
171
|
+
}
|
|
172
|
+
<defs>
|
|
173
|
+
@switch (variant()) {
|
|
174
|
+
@case ('dots') {
|
|
175
|
+
<pattern
|
|
176
|
+
[attr.id]="patternId()"
|
|
177
|
+
[attr.x]="patternOffset().x"
|
|
178
|
+
[attr.y]="patternOffset().y"
|
|
179
|
+
[attr.width]="scaledGapX()"
|
|
180
|
+
[attr.height]="scaledGapY()"
|
|
181
|
+
patternUnits="userSpaceOnUse"
|
|
182
|
+
>
|
|
183
|
+
<circle
|
|
184
|
+
[class]="'xy-flow__background-pattern dots ' + (patternClassName() ?? '')"
|
|
185
|
+
[attr.cx]="size() * zoom()"
|
|
186
|
+
[attr.cy]="size() * zoom()"
|
|
187
|
+
[attr.r]="size() * zoom()"
|
|
188
|
+
[attr.fill]="color()"
|
|
189
|
+
/>
|
|
190
|
+
</pattern>
|
|
191
|
+
}
|
|
192
|
+
@case ('lines') {
|
|
193
|
+
<pattern
|
|
194
|
+
[attr.id]="patternId()"
|
|
195
|
+
[attr.x]="patternOffset().x"
|
|
196
|
+
[attr.y]="patternOffset().y"
|
|
197
|
+
[attr.width]="scaledGapX()"
|
|
198
|
+
[attr.height]="scaledGapY()"
|
|
199
|
+
patternUnits="userSpaceOnUse"
|
|
200
|
+
>
|
|
201
|
+
<path
|
|
202
|
+
[class]="'xy-flow__background-pattern lines ' + (patternClassName() ?? '')"
|
|
203
|
+
[attr.stroke]="color()"
|
|
204
|
+
[attr.stroke-width]="resolvedLineWidth() * zoom()"
|
|
205
|
+
[attr.d]="'M ' + scaledGapX() + ' 0 L 0 0 0 ' + scaledGapY()"
|
|
206
|
+
/>
|
|
207
|
+
</pattern>
|
|
208
|
+
}
|
|
209
|
+
@case ('cross') {
|
|
210
|
+
<pattern
|
|
211
|
+
[attr.id]="patternId()"
|
|
212
|
+
[attr.x]="patternOffset().x"
|
|
213
|
+
[attr.y]="patternOffset().y"
|
|
214
|
+
[attr.width]="scaledGapX()"
|
|
215
|
+
[attr.height]="scaledGapY()"
|
|
216
|
+
patternUnits="userSpaceOnUse"
|
|
217
|
+
>
|
|
218
|
+
<path
|
|
219
|
+
[class]="'xy-flow__background-pattern cross ' + (patternClassName() ?? '')"
|
|
220
|
+
[attr.stroke]="color()"
|
|
221
|
+
[attr.stroke-width]="resolvedLineWidth() * zoom()"
|
|
222
|
+
[attr.d]="crossPath()"
|
|
223
|
+
/>
|
|
224
|
+
</pattern>
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
</defs>
|
|
228
|
+
<rect
|
|
229
|
+
x="0" y="0" width="100%" height="100%"
|
|
230
|
+
[attr.fill]="'url(#' + patternId() + ')'"
|
|
231
|
+
/>
|
|
232
|
+
</svg>
|
|
214
233
|
`,
|
|
215
234
|
}]
|
|
216
235
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], lineWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineWidth", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], bgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgColor", required: false }] }], patternClassName: [{ type: i0.Input, args: [{ isSignal: true, alias: "patternClassName", required: false }] }], bgId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background.component.js","sourceRoot":"","sources":["../../../../../src/lib/components/background/background.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;;
|
|
1
|
+
{"version":3,"file":"background.component.js","sourceRoot":"","sources":["../../../../../src/lib/components/background/background.component.ts"],"names":[],"mappings":"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"}
|
|
@@ -2,9 +2,16 @@ import { Type } from '@angular/core';
|
|
|
2
2
|
import { ConnectionLineType, Position } from '@angflow/system';
|
|
3
3
|
import { FlowStore } from '../../services/flow-store.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Renders the in-progress connection line while the user drags from a handle.
|
|
7
|
+
* Rendered internally by `<ng-flow>`; you don't normally place this yourself —
|
|
8
|
+
* configure via `[connectionLineType]` and `[connectionLineComponent]`.
|
|
9
|
+
*/
|
|
5
10
|
export declare class ConnectionLineComponent {
|
|
6
11
|
readonly store: FlowStore<import("../../types").Node, import("../../types").Edge>;
|
|
12
|
+
/** Optional Angular component used instead of the default SVG path. */
|
|
7
13
|
readonly customComponent: import("@angular/core").InputSignal<Type<unknown> | null>;
|
|
14
|
+
/** Path shape when the default renderer is used. */
|
|
8
15
|
readonly connectionLineType: import("@angular/core").InputSignal<ConnectionLineType>;
|
|
9
16
|
readonly isConnecting: import("@angular/core").Signal<boolean>;
|
|
10
17
|
readonly connectionProps: import("@angular/core").Signal<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-line.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/connection-line/connection-line.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+D,IAAI,EAAE,MAAM,eAAe,CAAC;AAElG,OAAO,EAAqD,kBAAkB,EAAE,QAAQ,EAA6B,MAAM,iBAAiB,CAAC;AAC7I,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;;AAE9D,qBA6Ba,uBAAuB;IAClC,QAAQ,CAAC,KAAK,oEAAqB;IAEnC,QAAQ,CAAC,eAAe,4DAAqC;IAC7D,QAAQ,CAAC,kBAAkB,0DAAwD;IAEnF,QAAQ,CAAC,YAAY,0CAIlB;IAEH,QAAQ,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;OAcrB;IAEH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAiC9B;IAEH,QAAQ,CAAC,cAAc,yCA0BpB;
|
|
1
|
+
{"version":3,"file":"connection-line.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/connection-line/connection-line.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+D,IAAI,EAAE,MAAM,eAAe,CAAC;AAElG,OAAO,EAAqD,kBAAkB,EAAE,QAAQ,EAA6B,MAAM,iBAAiB,CAAC;AAC7I,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;;AAE9D;;;;GAIG;AACH,qBA6Ba,uBAAuB;IAClC,QAAQ,CAAC,KAAK,oEAAqB;IAEnC,uEAAuE;IACvE,QAAQ,CAAC,eAAe,4DAAqC;IAC7D,oDAAoD;IACpD,QAAQ,CAAC,kBAAkB,0DAAwD;IAEnF,QAAQ,CAAC,YAAY,0CAIlB;IAEH,QAAQ,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;OAcrB;IAEH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAiC9B;IAEH,QAAQ,CAAC,cAAc,yCA0BpB;yCA3FQ,uBAAuB;2CAAvB,uBAAuB;CA4FnC"}
|
|
@@ -4,10 +4,17 @@ import { getBezierPath, getSmoothStepPath, getStraightPath, ConnectionLineType,
|
|
|
4
4
|
import { FlowStore } from '../../services/flow-store.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
import * as i1 from "@angular/common";
|
|
7
|
+
/**
|
|
8
|
+
* Renders the in-progress connection line while the user drags from a handle.
|
|
9
|
+
* Rendered internally by `<ng-flow>`; you don't normally place this yourself —
|
|
10
|
+
* configure via `[connectionLineType]` and `[connectionLineComponent]`.
|
|
11
|
+
*/
|
|
7
12
|
export class ConnectionLineComponent {
|
|
8
13
|
constructor() {
|
|
9
14
|
this.store = inject(FlowStore);
|
|
15
|
+
/** Optional Angular component used instead of the default SVG path. */
|
|
10
16
|
this.customComponent = input(null, ...(ngDevMode ? [{ debugName: "customComponent" }] : /* istanbul ignore next */ []));
|
|
17
|
+
/** Path shape when the default renderer is used. */
|
|
11
18
|
this.connectionLineType = input(ConnectionLineType.Bezier, ...(ngDevMode ? [{ debugName: "connectionLineType" }] : /* istanbul ignore next */ []));
|
|
12
19
|
this.isConnecting = computed(() => {
|
|
13
20
|
this.store.version();
|