@angflow/angular 0.0.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/README.md +187 -0
- package/dist/base.css +1204 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/components/a11y-descriptions/a11y-descriptions.component.d.ts +25 -0
- package/dist/esm/lib/components/a11y-descriptions/a11y-descriptions.component.d.ts.map +1 -0
- package/dist/esm/lib/components/a11y-descriptions/a11y-descriptions.component.js +58 -0
- package/dist/esm/lib/components/a11y-descriptions/a11y-descriptions.component.js.map +1 -0
- package/dist/esm/lib/components/attribution/attribution.component.d.ts +6 -0
- package/dist/esm/lib/components/attribution/attribution.component.d.ts.map +1 -0
- package/dist/esm/lib/components/attribution/attribution.component.js +32 -0
- package/dist/esm/lib/components/attribution/attribution.component.js.map +1 -0
- package/dist/esm/lib/components/background/background.component.d.ts +31 -0
- package/dist/esm/lib/components/background/background.component.d.ts.map +1 -0
- package/dist/esm/lib/components/background/background.component.js +209 -0
- package/dist/esm/lib/components/background/background.component.js.map +1 -0
- package/dist/esm/lib/components/connection-line/connection-line.component.d.ts +36 -0
- package/dist/esm/lib/components/connection-line/connection-line.component.d.ts.map +1 -0
- package/dist/esm/lib/components/connection-line/connection-line.component.js +146 -0
- package/dist/esm/lib/components/connection-line/connection-line.component.js.map +1 -0
- package/dist/esm/lib/components/controls/controls.component.d.ts +25 -0
- package/dist/esm/lib/components/controls/controls.component.d.ts.map +1 -0
- package/dist/esm/lib/components/controls/controls.component.js +174 -0
- package/dist/esm/lib/components/controls/controls.component.js.map +1 -0
- package/dist/esm/lib/components/edge-label-renderer/edge-label-renderer.component.d.ts +6 -0
- package/dist/esm/lib/components/edge-label-renderer/edge-label-renderer.component.d.ts.map +1 -0
- package/dist/esm/lib/components/edge-label-renderer/edge-label-renderer.component.js +24 -0
- package/dist/esm/lib/components/edge-label-renderer/edge-label-renderer.component.js.map +1 -0
- package/dist/esm/lib/components/edge-toolbar/edge-toolbar.component.d.ts +22 -0
- package/dist/esm/lib/components/edge-toolbar/edge-toolbar.component.d.ts.map +1 -0
- package/dist/esm/lib/components/edge-toolbar/edge-toolbar.component.js +64 -0
- package/dist/esm/lib/components/edge-toolbar/edge-toolbar.component.js.map +1 -0
- package/dist/esm/lib/components/edges/base-edge.component.d.ts +11 -0
- package/dist/esm/lib/components/edges/base-edge.component.d.ts.map +1 -0
- package/dist/esm/lib/components/edges/base-edge.component.js +56 -0
- package/dist/esm/lib/components/edges/base-edge.component.js.map +1 -0
- package/dist/esm/lib/components/edges/bezier-edge.component.d.ts +30 -0
- package/dist/esm/lib/components/edges/bezier-edge.component.d.ts.map +1 -0
- package/dist/esm/lib/components/edges/bezier-edge.component.js +68 -0
- package/dist/esm/lib/components/edges/bezier-edge.component.js.map +1 -0
- package/dist/esm/lib/components/edges/edge-text.component.d.ts +11 -0
- package/dist/esm/lib/components/edges/edge-text.component.d.ts.map +1 -0
- package/dist/esm/lib/components/edges/edge-text.component.js +48 -0
- package/dist/esm/lib/components/edges/edge-text.component.js.map +1 -0
- package/dist/esm/lib/components/edges/simple-bezier-edge.component.d.ts +21 -0
- package/dist/esm/lib/components/edges/simple-bezier-edge.component.d.ts.map +1 -0
- package/dist/esm/lib/components/edges/simple-bezier-edge.component.js +57 -0
- package/dist/esm/lib/components/edges/simple-bezier-edge.component.js.map +1 -0
- package/dist/esm/lib/components/edges/smooth-step-edge.component.d.ts +22 -0
- package/dist/esm/lib/components/edges/smooth-step-edge.component.d.ts.map +1 -0
- package/dist/esm/lib/components/edges/smooth-step-edge.component.js +59 -0
- package/dist/esm/lib/components/edges/smooth-step-edge.component.js.map +1 -0
- package/dist/esm/lib/components/edges/step-edge.component.d.ts +22 -0
- package/dist/esm/lib/components/edges/step-edge.component.d.ts.map +1 -0
- package/dist/esm/lib/components/edges/step-edge.component.js +60 -0
- package/dist/esm/lib/components/edges/step-edge.component.js.map +1 -0
- package/dist/esm/lib/components/edges/straight-edge.component.d.ts +18 -0
- package/dist/esm/lib/components/edges/straight-edge.component.d.ts.map +1 -0
- package/dist/esm/lib/components/edges/straight-edge.component.js +53 -0
- package/dist/esm/lib/components/edges/straight-edge.component.js.map +1 -0
- package/dist/esm/lib/components/handle/handle.component.d.ts +28 -0
- package/dist/esm/lib/components/handle/handle.component.d.ts.map +1 -0
- package/dist/esm/lib/components/handle/handle.component.js +162 -0
- package/dist/esm/lib/components/handle/handle.component.js.map +1 -0
- package/dist/esm/lib/components/minimap/minimap.component.d.ts +75 -0
- package/dist/esm/lib/components/minimap/minimap.component.d.ts.map +1 -0
- package/dist/esm/lib/components/minimap/minimap.component.js +319 -0
- package/dist/esm/lib/components/minimap/minimap.component.js.map +1 -0
- package/dist/esm/lib/components/ng-flow-provider/ng-flow-provider.component.d.ts +6 -0
- package/dist/esm/lib/components/ng-flow-provider/ng-flow-provider.component.d.ts.map +1 -0
- package/dist/esm/lib/components/ng-flow-provider/ng-flow-provider.component.js +24 -0
- package/dist/esm/lib/components/ng-flow-provider/ng-flow-provider.component.js.map +1 -0
- package/dist/esm/lib/components/node-resizer/node-resizer.component.d.ts +44 -0
- package/dist/esm/lib/components/node-resizer/node-resizer.component.d.ts.map +1 -0
- package/dist/esm/lib/components/node-resizer/node-resizer.component.js +198 -0
- package/dist/esm/lib/components/node-resizer/node-resizer.component.js.map +1 -0
- package/dist/esm/lib/components/node-toolbar/node-toolbar.component.d.ts +19 -0
- package/dist/esm/lib/components/node-toolbar/node-toolbar.component.d.ts.map +1 -0
- package/dist/esm/lib/components/node-toolbar/node-toolbar.component.js +101 -0
- package/dist/esm/lib/components/node-toolbar/node-toolbar.component.js.map +1 -0
- package/dist/esm/lib/components/nodes/default-node.component.d.ts +20 -0
- package/dist/esm/lib/components/nodes/default-node.component.d.ts.map +1 -0
- package/dist/esm/lib/components/nodes/default-node.component.js +52 -0
- package/dist/esm/lib/components/nodes/default-node.component.js.map +1 -0
- package/dist/esm/lib/components/nodes/group-node.component.d.ts +19 -0
- package/dist/esm/lib/components/nodes/group-node.component.d.ts.map +1 -0
- package/dist/esm/lib/components/nodes/group-node.component.js +34 -0
- package/dist/esm/lib/components/nodes/group-node.component.js.map +1 -0
- package/dist/esm/lib/components/nodes/input-node.component.d.ts +20 -0
- package/dist/esm/lib/components/nodes/input-node.component.d.ts.map +1 -0
- package/dist/esm/lib/components/nodes/input-node.component.js +49 -0
- package/dist/esm/lib/components/nodes/input-node.component.js.map +1 -0
- package/dist/esm/lib/components/nodes/output-node.component.d.ts +20 -0
- package/dist/esm/lib/components/nodes/output-node.component.d.ts.map +1 -0
- package/dist/esm/lib/components/nodes/output-node.component.js +48 -0
- package/dist/esm/lib/components/nodes/output-node.component.js.map +1 -0
- package/dist/esm/lib/components/panel/panel.component.d.ts +13 -0
- package/dist/esm/lib/components/panel/panel.component.d.ts.map +1 -0
- package/dist/esm/lib/components/panel/panel.component.js +39 -0
- package/dist/esm/lib/components/panel/panel.component.js.map +1 -0
- package/dist/esm/lib/components/selection-box/selection-box.component.d.ts +12 -0
- package/dist/esm/lib/components/selection-box/selection-box.component.d.ts.map +1 -0
- package/dist/esm/lib/components/selection-box/selection-box.component.js +56 -0
- package/dist/esm/lib/components/selection-box/selection-box.component.js.map +1 -0
- package/dist/esm/lib/components/viewport-portal/viewport-portal.component.d.ts +8 -0
- package/dist/esm/lib/components/viewport-portal/viewport-portal.component.d.ts.map +1 -0
- package/dist/esm/lib/components/viewport-portal/viewport-portal.component.js +35 -0
- package/dist/esm/lib/components/viewport-portal/viewport-portal.component.js.map +1 -0
- package/dist/esm/lib/container/edge-renderer/edge-renderer.component.d.ts +70 -0
- package/dist/esm/lib/container/edge-renderer/edge-renderer.component.d.ts.map +1 -0
- package/dist/esm/lib/container/edge-renderer/edge-renderer.component.js +503 -0
- package/dist/esm/lib/container/edge-renderer/edge-renderer.component.js.map +1 -0
- package/dist/esm/lib/container/ng-flow/ng-flow.component.d.ts +281 -0
- package/dist/esm/lib/container/ng-flow/ng-flow.component.d.ts.map +1 -0
- package/dist/esm/lib/container/ng-flow/ng-flow.component.js +644 -0
- package/dist/esm/lib/container/ng-flow/ng-flow.component.js.map +1 -0
- package/dist/esm/lib/container/node-renderer/node-renderer.component.d.ts +56 -0
- package/dist/esm/lib/container/node-renderer/node-renderer.component.d.ts.map +1 -0
- package/dist/esm/lib/container/node-renderer/node-renderer.component.js +312 -0
- package/dist/esm/lib/container/node-renderer/node-renderer.component.js.map +1 -0
- package/dist/esm/lib/container/pane/pane.component.d.ts +35 -0
- package/dist/esm/lib/container/pane/pane.component.d.ts.map +1 -0
- package/dist/esm/lib/container/pane/pane.component.js +161 -0
- package/dist/esm/lib/container/pane/pane.component.js.map +1 -0
- package/dist/esm/lib/container/viewport/viewport.component.d.ts +9 -0
- package/dist/esm/lib/container/viewport/viewport.component.d.ts.map +1 -0
- package/dist/esm/lib/container/viewport/viewport.component.js +35 -0
- package/dist/esm/lib/container/viewport/viewport.component.js.map +1 -0
- package/dist/esm/lib/directives/drag.directive.d.ts +21 -0
- package/dist/esm/lib/directives/drag.directive.d.ts.map +1 -0
- package/dist/esm/lib/directives/drag.directive.js +69 -0
- package/dist/esm/lib/directives/drag.directive.js.map +1 -0
- package/dist/esm/lib/directives/drop-zone.directive.d.ts +30 -0
- package/dist/esm/lib/directives/drop-zone.directive.d.ts.map +1 -0
- package/dist/esm/lib/directives/drop-zone.directive.js +58 -0
- package/dist/esm/lib/directives/drop-zone.directive.js.map +1 -0
- package/dist/esm/lib/directives/key-handler.directive.d.ts +29 -0
- package/dist/esm/lib/directives/key-handler.directive.d.ts.map +1 -0
- package/dist/esm/lib/directives/key-handler.directive.js +176 -0
- package/dist/esm/lib/directives/key-handler.directive.js.map +1 -0
- package/dist/esm/lib/directives/node-type.directive.d.ts +21 -0
- package/dist/esm/lib/directives/node-type.directive.d.ts.map +1 -0
- package/dist/esm/lib/directives/node-type.directive.js +32 -0
- package/dist/esm/lib/directives/node-type.directive.js.map +1 -0
- package/dist/esm/lib/public-api.d.ts +40 -0
- package/dist/esm/lib/public-api.d.ts.map +1 -0
- package/dist/esm/lib/public-api.js +67 -0
- package/dist/esm/lib/public-api.js.map +1 -0
- package/dist/esm/lib/services/flow-store.service.d.ts +227 -0
- package/dist/esm/lib/services/flow-store.service.d.ts.map +1 -0
- package/dist/esm/lib/services/flow-store.service.js +542 -0
- package/dist/esm/lib/services/flow-store.service.js.map +1 -0
- package/dist/esm/lib/services/ng-flow.service.d.ts +186 -0
- package/dist/esm/lib/services/ng-flow.service.d.ts.map +1 -0
- package/dist/esm/lib/services/ng-flow.service.js +501 -0
- package/dist/esm/lib/services/ng-flow.service.js.map +1 -0
- package/dist/esm/lib/services/tokens.d.ts +4 -0
- package/dist/esm/lib/services/tokens.d.ts.map +1 -0
- package/dist/esm/lib/services/tokens.js +4 -0
- package/dist/esm/lib/services/tokens.js.map +1 -0
- package/dist/esm/lib/types/edges.d.ts +83 -0
- package/dist/esm/lib/types/edges.d.ts.map +1 -0
- package/dist/esm/lib/types/edges.js +2 -0
- package/dist/esm/lib/types/edges.js.map +1 -0
- package/dist/esm/lib/types/general.d.ts +128 -0
- package/dist/esm/lib/types/general.d.ts.map +1 -0
- package/dist/esm/lib/types/general.js +2 -0
- package/dist/esm/lib/types/general.js.map +1 -0
- package/dist/esm/lib/types/index.d.ts +5 -0
- package/dist/esm/lib/types/index.d.ts.map +1 -0
- package/dist/esm/lib/types/index.js +5 -0
- package/dist/esm/lib/types/index.js.map +1 -0
- package/dist/esm/lib/types/nodes.d.ts +53 -0
- package/dist/esm/lib/types/nodes.d.ts.map +1 -0
- package/dist/esm/lib/types/nodes.js +2 -0
- package/dist/esm/lib/types/nodes.js.map +1 -0
- package/dist/esm/lib/types/store.d.ts +71 -0
- package/dist/esm/lib/types/store.d.ts.map +1 -0
- package/dist/esm/lib/types/store.js +2 -0
- package/dist/esm/lib/types/store.js.map +1 -0
- package/dist/esm/lib/utils/changes.d.ts +12 -0
- package/dist/esm/lib/utils/changes.d.ts.map +1 -0
- package/dist/esm/lib/utils/changes.js +134 -0
- package/dist/esm/lib/utils/changes.js.map +1 -0
- package/dist/esm/lib/utils/index.d.ts +2 -0
- package/dist/esm/lib/utils/index.d.ts.map +1 -0
- package/dist/esm/lib/utils/index.js +2 -0
- package/dist/esm/lib/utils/index.js.map +1 -0
- package/dist/esm/lib/utils/type-guards.d.ts +12 -0
- package/dist/esm/lib/utils/type-guards.d.ts.map +1 -0
- package/dist/esm/lib/utils/type-guards.js +16 -0
- package/dist/esm/lib/utils/type-guards.js.map +1 -0
- package/dist/style.css +1392 -0
- package/package.json +60 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class A11yDescriptionsComponent {
|
|
3
|
+
private store;
|
|
4
|
+
get rfId(): string;
|
|
5
|
+
readonly config: import("@angular/core").WritableSignal<{
|
|
6
|
+
'node.a11yDescription.default': string;
|
|
7
|
+
'node.a11yDescription.keyboardDisabled': string;
|
|
8
|
+
'node.a11yDescription.ariaLiveMessage': ({ direction, x, y }: {
|
|
9
|
+
direction: string;
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
}) => string;
|
|
13
|
+
'edge.a11yDescription.default': string;
|
|
14
|
+
'controls.ariaLabel': string;
|
|
15
|
+
'controls.zoomIn.ariaLabel': string;
|
|
16
|
+
'controls.zoomOut.ariaLabel': string;
|
|
17
|
+
'controls.fitView.ariaLabel': string;
|
|
18
|
+
'controls.interactive.ariaLabel': string;
|
|
19
|
+
'minimap.ariaLabel': string;
|
|
20
|
+
'handle.ariaLabel': string;
|
|
21
|
+
}>;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<A11yDescriptionsComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<A11yDescriptionsComponent, "ng-flow-a11y-descriptions", never, {}, {}, never, never, true, never>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=a11y-descriptions.component.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy, inject } from '@angular/core';
|
|
2
|
+
import { FlowStore } from '../../services/flow-store.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class A11yDescriptionsComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.store = inject(FlowStore);
|
|
7
|
+
this.config = this.store.ariaLabelConfig;
|
|
8
|
+
}
|
|
9
|
+
get rfId() {
|
|
10
|
+
return this.store.rfId();
|
|
11
|
+
}
|
|
12
|
+
static { this.ɵfac = function A11yDescriptionsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || A11yDescriptionsComponent)(); }; }
|
|
13
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: A11yDescriptionsComponent, selectors: [["ng-flow-a11y-descriptions"]], hostAttrs: [2, "position", "absolute", "width", "1px", "height", "1px", "margin", "-1px", "padding", "0", "overflow", "hidden", "clip", "rect(0,0,0,0)", "border", "0"], decls: 6, vars: 5, consts: [[1, "xy-flow__sr-only", 3, "id"]], template: function A11yDescriptionsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
+
i0.ɵɵdomElementStart(0, "div", 0);
|
|
15
|
+
i0.ɵɵtext(1);
|
|
16
|
+
i0.ɵɵdomElementEnd();
|
|
17
|
+
i0.ɵɵdomElementStart(2, "div", 0);
|
|
18
|
+
i0.ɵɵtext(3);
|
|
19
|
+
i0.ɵɵdomElementEnd();
|
|
20
|
+
i0.ɵɵdomElementStart(4, "div", 0);
|
|
21
|
+
i0.ɵɵtext(5, " Edge connection ");
|
|
22
|
+
i0.ɵɵdomElementEnd();
|
|
23
|
+
} if (rf & 2) {
|
|
24
|
+
i0.ɵɵdomProperty("id", ctx.rfId + "-node-desc");
|
|
25
|
+
i0.ɵɵadvance();
|
|
26
|
+
i0.ɵɵtextInterpolate1(" ", ctx.config()["node.a11yDescription.default"], " ");
|
|
27
|
+
i0.ɵɵadvance();
|
|
28
|
+
i0.ɵɵdomProperty("id", ctx.rfId + "-handle-desc");
|
|
29
|
+
i0.ɵɵadvance();
|
|
30
|
+
i0.ɵɵtextInterpolate1(" ", ctx.config()["handle.ariaLabel"], " ");
|
|
31
|
+
i0.ɵɵadvance();
|
|
32
|
+
i0.ɵɵdomProperty("id", ctx.rfId + "-edge-desc");
|
|
33
|
+
} }, encapsulation: 2, changeDetection: 0 }); }
|
|
34
|
+
}
|
|
35
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(A11yDescriptionsComponent, [{
|
|
36
|
+
type: Component,
|
|
37
|
+
args: [{
|
|
38
|
+
selector: 'ng-flow-a11y-descriptions',
|
|
39
|
+
standalone: true,
|
|
40
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
41
|
+
template: `
|
|
42
|
+
<div [id]="rfId + '-node-desc'" class="xy-flow__sr-only">
|
|
43
|
+
{{ config()['node.a11yDescription.default'] }}
|
|
44
|
+
</div>
|
|
45
|
+
<div [id]="rfId + '-handle-desc'" class="xy-flow__sr-only">
|
|
46
|
+
{{ config()['handle.ariaLabel'] }}
|
|
47
|
+
</div>
|
|
48
|
+
<div [id]="rfId + '-edge-desc'" class="xy-flow__sr-only">
|
|
49
|
+
Edge connection
|
|
50
|
+
</div>
|
|
51
|
+
`,
|
|
52
|
+
host: {
|
|
53
|
+
'style': 'position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0;',
|
|
54
|
+
},
|
|
55
|
+
}]
|
|
56
|
+
}], null, null); })();
|
|
57
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(A11yDescriptionsComponent, { className: "A11yDescriptionsComponent", filePath: "lib/components/a11y-descriptions/a11y-descriptions.component.ts", lineNumber: 23 }); })();
|
|
58
|
+
//# sourceMappingURL=a11y-descriptions.component.js.map
|
|
@@ -0,0 +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;;AAqB9D,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;0HALU,yBAAyB;oEAAzB,yBAAyB;YAdlC,iCAAyD;YACvD,YACF;YAAA,oBAAM;YACN,iCAA2D;YACzD,YACF;YAAA,oBAAM;YACN,iCAAyD;YACvD,iCACF;YAAA,oBAAM;;YARD,+CAA0B;YAC7B,cACF;YADE,6EACF;YACK,cAA4B;YAA5B,iDAA4B;YAC/B,cACF;YADE,iEACF;YACK,cAA0B;YAA1B,+CAA0B;;;iFAQtB,yBAAyB;cAnBrC,SAAS;eAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,QAAQ,EAAE;;;;;;;;;;GAUT;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,0HAA0H;iBACpI;aACF;;kFACY,yBAAyB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class AttributionComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AttributionComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AttributionComponent, "ng-flow-attribution", never, {}, {}, never, never, true, never>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=attribution.component.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { PanelComponent } from '../panel/panel.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class AttributionComponent {
|
|
5
|
+
static { this.ɵfac = function AttributionComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AttributionComponent)(); }; }
|
|
6
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AttributionComponent, selectors: [["ng-flow-attribution"]], decls: 3, vars: 0, consts: [["position", "bottom-right"], [1, "ng-flow__attribution", "xy-flow__attribution", 2, "font-size", "10px", "color", "#999", "pointer-events", "all"]], template: function AttributionComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7
|
+
i0.ɵɵelementStart(0, "ng-flow-panel", 0)(1, "span", 1);
|
|
8
|
+
i0.ɵɵtext(2, " ngflow ");
|
|
9
|
+
i0.ɵɵelementEnd()();
|
|
10
|
+
} }, dependencies: [PanelComponent], encapsulation: 2, changeDetection: 0 }); }
|
|
11
|
+
}
|
|
12
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AttributionComponent, [{
|
|
13
|
+
type: Component,
|
|
14
|
+
args: [{
|
|
15
|
+
selector: 'ng-flow-attribution',
|
|
16
|
+
standalone: true,
|
|
17
|
+
imports: [PanelComponent],
|
|
18
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
|
+
template: `
|
|
20
|
+
<ng-flow-panel position="bottom-right">
|
|
21
|
+
<span
|
|
22
|
+
class="ng-flow__attribution xy-flow__attribution"
|
|
23
|
+
style="font-size: 10px; color: #999; pointer-events: all;"
|
|
24
|
+
>
|
|
25
|
+
ngflow
|
|
26
|
+
</span>
|
|
27
|
+
</ng-flow-panel>
|
|
28
|
+
`,
|
|
29
|
+
}]
|
|
30
|
+
}], null, null); })();
|
|
31
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AttributionComponent, { className: "AttributionComponent", filePath: "lib/components/attribution/attribution.component.ts", lineNumber: 20 }); })();
|
|
32
|
+
//# sourceMappingURL=attribution.component.js.map
|
|
@@ -0,0 +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;;AAkB1D,MAAM,OAAO,oBAAoB;qHAApB,oBAAoB;oEAApB,oBAAoB;YAT3B,AADF,wCAAuC,cAIpC;YACC,wBACF;YACF,AADE,iBAAO,EACO;4BAVR,cAAc;;iFAab,oBAAoB;cAhBhC,SAAS;eAAC;gBACT,QAAQ,EAAE,qBAAqB;gBAC/B,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,cAAc,CAAC;gBACzB,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,QAAQ,EAAE;;;;;;;;;GAST;aACF;;kFACY,oBAAoB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export type BackgroundVariant = 'dots' | 'lines' | 'cross';
|
|
3
|
+
export declare class BackgroundComponent {
|
|
4
|
+
private store;
|
|
5
|
+
readonly variant: import("@angular/core").InputSignal<BackgroundVariant>;
|
|
6
|
+
readonly gap: import("@angular/core").InputSignal<number | [number, number]>;
|
|
7
|
+
readonly size: import("@angular/core").InputSignal<number>;
|
|
8
|
+
readonly lineWidth: import("@angular/core").InputSignal<number | undefined>;
|
|
9
|
+
readonly offset: import("@angular/core").InputSignal<number | [number, number]>;
|
|
10
|
+
readonly color: import("@angular/core").InputSignal<string | undefined>;
|
|
11
|
+
readonly bgColor: import("@angular/core").InputSignal<string | undefined>;
|
|
12
|
+
readonly patternClassName: import("@angular/core").InputSignal<string | undefined>;
|
|
13
|
+
readonly bgId: import("@angular/core").InputSignal<string | undefined>;
|
|
14
|
+
readonly patternId: import("@angular/core").Signal<string>;
|
|
15
|
+
readonly zoom: import("@angular/core").Signal<number>;
|
|
16
|
+
private readonly gapX;
|
|
17
|
+
private readonly gapY;
|
|
18
|
+
private readonly offsetX;
|
|
19
|
+
private readonly offsetY;
|
|
20
|
+
readonly scaledGapX: import("@angular/core").Signal<number>;
|
|
21
|
+
readonly scaledGapY: import("@angular/core").Signal<number>;
|
|
22
|
+
readonly resolvedLineWidth: import("@angular/core").Signal<number>;
|
|
23
|
+
readonly patternOffset: import("@angular/core").Signal<{
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
}>;
|
|
27
|
+
readonly crossPath: import("@angular/core").Signal<string>;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BackgroundComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BackgroundComponent, "ng-flow-background", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "lineWidth": { "alias": "lineWidth"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "bgColor": { "alias": "bgColor"; "required": false; "isSignal": true; }; "patternClassName": { "alias": "patternClassName"; "required": false; "isSignal": true; }; "bgId": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=background.component.d.ts.map
|
|
@@ -0,0 +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;yCAhEQ,mBAAmB;2CAAnB,mBAAmB;CAiE/B"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy, input, inject, computed } from '@angular/core';
|
|
2
|
+
import { FlowStore } from '../../services/flow-store.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
function BackgroundComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
5
|
+
i0.ɵɵnamespaceSVG();
|
|
6
|
+
i0.ɵɵdomElement(0, "rect", 1);
|
|
7
|
+
} if (rf & 2) {
|
|
8
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
9
|
+
i0.ɵɵattribute("fill", ctx_r0.bgColor());
|
|
10
|
+
} }
|
|
11
|
+
function BackgroundComponent_Case_3_Template(rf, ctx) { if (rf & 1) {
|
|
12
|
+
i0.ɵɵnamespaceSVG();
|
|
13
|
+
i0.ɵɵdomElementStart(0, "pattern", 2);
|
|
14
|
+
i0.ɵɵdomElement(1, "circle");
|
|
15
|
+
i0.ɵɵdomElementEnd();
|
|
16
|
+
} if (rf & 2) {
|
|
17
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
18
|
+
i0.ɵɵattribute("id", ctx_r0.patternId())("x", ctx_r0.patternOffset().x)("y", ctx_r0.patternOffset().y)("width", ctx_r0.scaledGapX())("height", ctx_r0.scaledGapY());
|
|
19
|
+
i0.ɵɵadvance();
|
|
20
|
+
i0.ɵɵclassMap("xy-flow__background-pattern dots " + (ctx_r0.patternClassName() ?? ""));
|
|
21
|
+
i0.ɵɵattribute("cx", ctx_r0.size() * ctx_r0.zoom())("cy", ctx_r0.size() * ctx_r0.zoom())("r", ctx_r0.size() * ctx_r0.zoom())("fill", ctx_r0.color());
|
|
22
|
+
} }
|
|
23
|
+
function BackgroundComponent_Case_4_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
+
i0.ɵɵnamespaceSVG();
|
|
25
|
+
i0.ɵɵdomElementStart(0, "pattern", 2);
|
|
26
|
+
i0.ɵɵdomElement(1, "path");
|
|
27
|
+
i0.ɵɵdomElementEnd();
|
|
28
|
+
} if (rf & 2) {
|
|
29
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
30
|
+
i0.ɵɵattribute("id", ctx_r0.patternId())("x", ctx_r0.patternOffset().x)("y", ctx_r0.patternOffset().y)("width", ctx_r0.scaledGapX())("height", ctx_r0.scaledGapY());
|
|
31
|
+
i0.ɵɵadvance();
|
|
32
|
+
i0.ɵɵclassMap("xy-flow__background-pattern lines " + (ctx_r0.patternClassName() ?? ""));
|
|
33
|
+
i0.ɵɵattribute("stroke", ctx_r0.color())("stroke-width", ctx_r0.resolvedLineWidth() * ctx_r0.zoom())("d", "M " + ctx_r0.scaledGapX() + " 0 L 0 0 0 " + ctx_r0.scaledGapY());
|
|
34
|
+
} }
|
|
35
|
+
function BackgroundComponent_Case_5_Template(rf, ctx) { if (rf & 1) {
|
|
36
|
+
i0.ɵɵnamespaceSVG();
|
|
37
|
+
i0.ɵɵdomElementStart(0, "pattern", 2);
|
|
38
|
+
i0.ɵɵdomElement(1, "path");
|
|
39
|
+
i0.ɵɵdomElementEnd();
|
|
40
|
+
} if (rf & 2) {
|
|
41
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
42
|
+
i0.ɵɵattribute("id", ctx_r0.patternId())("x", ctx_r0.patternOffset().x)("y", ctx_r0.patternOffset().y)("width", ctx_r0.scaledGapX())("height", ctx_r0.scaledGapY());
|
|
43
|
+
i0.ɵɵadvance();
|
|
44
|
+
i0.ɵɵclassMap("xy-flow__background-pattern cross " + (ctx_r0.patternClassName() ?? ""));
|
|
45
|
+
i0.ɵɵattribute("stroke", ctx_r0.color())("stroke-width", ctx_r0.resolvedLineWidth() * ctx_r0.zoom())("d", ctx_r0.crossPath());
|
|
46
|
+
} }
|
|
47
|
+
export class BackgroundComponent {
|
|
48
|
+
constructor() {
|
|
49
|
+
this.store = inject(FlowStore);
|
|
50
|
+
this.variant = input('dots', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
51
|
+
this.gap = input(20, ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
|
|
52
|
+
this.size = input(1, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
53
|
+
this.lineWidth = input(...(ngDevMode ? [undefined, { debugName: "lineWidth" }] : /* istanbul ignore next */ []));
|
|
54
|
+
this.offset = input(0, ...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
55
|
+
this.color = input(...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
|
|
56
|
+
this.bgColor = input(...(ngDevMode ? [undefined, { debugName: "bgColor" }] : /* istanbul ignore next */ []));
|
|
57
|
+
this.patternClassName = input(...(ngDevMode ? [undefined, { debugName: "patternClassName" }] : /* istanbul ignore next */ []));
|
|
58
|
+
this.bgId = input(undefined, { ...(ngDevMode ? { debugName: "bgId" } : /* istanbul ignore next */ {}), alias: 'id' });
|
|
59
|
+
this.patternId = computed(() => {
|
|
60
|
+
const customId = this.bgId();
|
|
61
|
+
return customId ?? `ng-flow-bg-${this.store.rfId()}`;
|
|
62
|
+
}, ...(ngDevMode ? [{ debugName: "patternId" }] : /* istanbul ignore next */ []));
|
|
63
|
+
this.zoom = computed(() => this.store.transform()[2], ...(ngDevMode ? [{ debugName: "zoom" }] : /* istanbul ignore next */ []));
|
|
64
|
+
this.gapX = computed(() => {
|
|
65
|
+
const g = this.gap();
|
|
66
|
+
return Array.isArray(g) ? g[0] : g;
|
|
67
|
+
}, ...(ngDevMode ? [{ debugName: "gapX" }] : /* istanbul ignore next */ []));
|
|
68
|
+
this.gapY = computed(() => {
|
|
69
|
+
const g = this.gap();
|
|
70
|
+
return Array.isArray(g) ? g[1] : g;
|
|
71
|
+
}, ...(ngDevMode ? [{ debugName: "gapY" }] : /* istanbul ignore next */ []));
|
|
72
|
+
this.offsetX = computed(() => {
|
|
73
|
+
const o = this.offset();
|
|
74
|
+
return Array.isArray(o) ? o[0] : o;
|
|
75
|
+
}, ...(ngDevMode ? [{ debugName: "offsetX" }] : /* istanbul ignore next */ []));
|
|
76
|
+
this.offsetY = computed(() => {
|
|
77
|
+
const o = this.offset();
|
|
78
|
+
return Array.isArray(o) ? o[1] : o;
|
|
79
|
+
}, ...(ngDevMode ? [{ debugName: "offsetY" }] : /* istanbul ignore next */ []));
|
|
80
|
+
this.scaledGapX = computed(() => this.gapX() * this.zoom(), ...(ngDevMode ? [{ debugName: "scaledGapX" }] : /* istanbul ignore next */ []));
|
|
81
|
+
this.scaledGapY = computed(() => this.gapY() * this.zoom(), ...(ngDevMode ? [{ debugName: "scaledGapY" }] : /* istanbul ignore next */ []));
|
|
82
|
+
this.resolvedLineWidth = computed(() => {
|
|
83
|
+
const lw = this.lineWidth();
|
|
84
|
+
if (lw !== undefined)
|
|
85
|
+
return lw;
|
|
86
|
+
return this.variant() === 'dots' ? this.size() : 1;
|
|
87
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedLineWidth" }] : /* istanbul ignore next */ []));
|
|
88
|
+
this.patternOffset = computed(() => {
|
|
89
|
+
const t = this.store.transform();
|
|
90
|
+
return {
|
|
91
|
+
x: t[0] % this.scaledGapX() + this.offsetX() * this.zoom(),
|
|
92
|
+
y: t[1] % this.scaledGapY() + this.offsetY() * this.zoom(),
|
|
93
|
+
};
|
|
94
|
+
}, ...(ngDevMode ? [{ debugName: "patternOffset" }] : /* istanbul ignore next */ []));
|
|
95
|
+
this.crossPath = computed(() => {
|
|
96
|
+
const gx = this.scaledGapX();
|
|
97
|
+
const gy = this.scaledGapY();
|
|
98
|
+
const s = this.size() * this.zoom();
|
|
99
|
+
const halfGX = gx / 2;
|
|
100
|
+
const halfGY = gy / 2;
|
|
101
|
+
return `M ${halfGX - s} ${halfGY} L ${halfGX + s} ${halfGY} M ${halfGX} ${halfGY - s} L ${halfGX} ${halfGY + s}`;
|
|
102
|
+
}, ...(ngDevMode ? [{ debugName: "crossPath" }] : /* istanbul ignore next */ []));
|
|
103
|
+
}
|
|
104
|
+
static { this.ɵfac = function BackgroundComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || BackgroundComponent)(); }; }
|
|
105
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BackgroundComponent, selectors: [["ng-flow-background"]], hostAttrs: [1, "ng-flow__background", "xy-flow__background", "xy-flow__container", 2, "display", "block", "position", "absolute", "width", "100%", "height", "100%", "top", "0", "left", "0", "pointer-events", "none", "z-index", "-1"], inputs: { variant: [1, "variant"], gap: [1, "gap"], size: [1, "size"], lineWidth: [1, "lineWidth"], offset: [1, "offset"], color: [1, "color"], bgColor: [1, "bgColor"], patternClassName: [1, "patternClassName"], bgId: [1, "id", "bgId"] }, decls: 7, vars: 7, consts: [[1, "ng-flow__background-svg"], ["x", "0", "y", "0", "width", "100%", "height", "100%"], ["patternUnits", "userSpaceOnUse"]], template: function BackgroundComponent_Template(rf, ctx) { if (rf & 1) {
|
|
106
|
+
i0.ɵɵnamespaceSVG();
|
|
107
|
+
i0.ɵɵdomElementStart(0, "svg", 0);
|
|
108
|
+
i0.ɵɵconditionalCreate(1, BackgroundComponent_Conditional_1_Template, 1, 1, ":svg:rect", 1);
|
|
109
|
+
i0.ɵɵdomElementStart(2, "defs");
|
|
110
|
+
i0.ɵɵconditionalCreate(3, BackgroundComponent_Case_3_Template, 2, 11, ":svg:pattern", 2)(4, BackgroundComponent_Case_4_Template, 2, 10, ":svg:pattern", 2)(5, BackgroundComponent_Case_5_Template, 2, 10, ":svg:pattern", 2);
|
|
111
|
+
i0.ɵɵdomElementEnd();
|
|
112
|
+
i0.ɵɵdomElement(6, "rect", 1);
|
|
113
|
+
i0.ɵɵdomElementEnd();
|
|
114
|
+
} if (rf & 2) {
|
|
115
|
+
let tmp_3_0;
|
|
116
|
+
i0.ɵɵstyleProp("width", "100%")("height", "100%");
|
|
117
|
+
i0.ɵɵadvance();
|
|
118
|
+
i0.ɵɵconditional(ctx.bgColor() ? 1 : -1);
|
|
119
|
+
i0.ɵɵadvance(2);
|
|
120
|
+
i0.ɵɵconditional((tmp_3_0 = ctx.variant()) === "dots" ? 3 : tmp_3_0 === "lines" ? 4 : tmp_3_0 === "cross" ? 5 : -1);
|
|
121
|
+
i0.ɵɵadvance(3);
|
|
122
|
+
i0.ɵɵattribute("fill", "url(#" + ctx.patternId() + ")");
|
|
123
|
+
} }, encapsulation: 2, changeDetection: 0 }); }
|
|
124
|
+
}
|
|
125
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BackgroundComponent, [{
|
|
126
|
+
type: Component,
|
|
127
|
+
args: [{
|
|
128
|
+
selector: 'ng-flow-background',
|
|
129
|
+
standalone: true,
|
|
130
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
131
|
+
host: {
|
|
132
|
+
'class': 'ng-flow__background xy-flow__background xy-flow__container',
|
|
133
|
+
'style': 'display: block; position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; z-index: -1;',
|
|
134
|
+
},
|
|
135
|
+
template: `
|
|
136
|
+
<svg
|
|
137
|
+
class="ng-flow__background-svg"
|
|
138
|
+
[style.width]="'100%'"
|
|
139
|
+
[style.height]="'100%'"
|
|
140
|
+
>
|
|
141
|
+
@if (bgColor()) {
|
|
142
|
+
<rect x="0" y="0" width="100%" height="100%" [attr.fill]="bgColor()" />
|
|
143
|
+
}
|
|
144
|
+
<defs>
|
|
145
|
+
@switch (variant()) {
|
|
146
|
+
@case ('dots') {
|
|
147
|
+
<pattern
|
|
148
|
+
[attr.id]="patternId()"
|
|
149
|
+
[attr.x]="patternOffset().x"
|
|
150
|
+
[attr.y]="patternOffset().y"
|
|
151
|
+
[attr.width]="scaledGapX()"
|
|
152
|
+
[attr.height]="scaledGapY()"
|
|
153
|
+
patternUnits="userSpaceOnUse"
|
|
154
|
+
>
|
|
155
|
+
<circle
|
|
156
|
+
[class]="'xy-flow__background-pattern dots ' + (patternClassName() ?? '')"
|
|
157
|
+
[attr.cx]="size() * zoom()"
|
|
158
|
+
[attr.cy]="size() * zoom()"
|
|
159
|
+
[attr.r]="size() * zoom()"
|
|
160
|
+
[attr.fill]="color()"
|
|
161
|
+
/>
|
|
162
|
+
</pattern>
|
|
163
|
+
}
|
|
164
|
+
@case ('lines') {
|
|
165
|
+
<pattern
|
|
166
|
+
[attr.id]="patternId()"
|
|
167
|
+
[attr.x]="patternOffset().x"
|
|
168
|
+
[attr.y]="patternOffset().y"
|
|
169
|
+
[attr.width]="scaledGapX()"
|
|
170
|
+
[attr.height]="scaledGapY()"
|
|
171
|
+
patternUnits="userSpaceOnUse"
|
|
172
|
+
>
|
|
173
|
+
<path
|
|
174
|
+
[class]="'xy-flow__background-pattern lines ' + (patternClassName() ?? '')"
|
|
175
|
+
[attr.stroke]="color()"
|
|
176
|
+
[attr.stroke-width]="resolvedLineWidth() * zoom()"
|
|
177
|
+
[attr.d]="'M ' + scaledGapX() + ' 0 L 0 0 0 ' + scaledGapY()"
|
|
178
|
+
/>
|
|
179
|
+
</pattern>
|
|
180
|
+
}
|
|
181
|
+
@case ('cross') {
|
|
182
|
+
<pattern
|
|
183
|
+
[attr.id]="patternId()"
|
|
184
|
+
[attr.x]="patternOffset().x"
|
|
185
|
+
[attr.y]="patternOffset().y"
|
|
186
|
+
[attr.width]="scaledGapX()"
|
|
187
|
+
[attr.height]="scaledGapY()"
|
|
188
|
+
patternUnits="userSpaceOnUse"
|
|
189
|
+
>
|
|
190
|
+
<path
|
|
191
|
+
[class]="'xy-flow__background-pattern cross ' + (patternClassName() ?? '')"
|
|
192
|
+
[attr.stroke]="color()"
|
|
193
|
+
[attr.stroke-width]="resolvedLineWidth() * zoom()"
|
|
194
|
+
[attr.d]="crossPath()"
|
|
195
|
+
/>
|
|
196
|
+
</pattern>
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
</defs>
|
|
200
|
+
<rect
|
|
201
|
+
x="0" y="0" width="100%" height="100%"
|
|
202
|
+
[attr.fill]="'url(#' + patternId() + ')'"
|
|
203
|
+
/>
|
|
204
|
+
</svg>
|
|
205
|
+
`,
|
|
206
|
+
}]
|
|
207
|
+
}], null, { 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 }] }] }); })();
|
|
208
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BackgroundComponent, { className: "BackgroundComponent", filePath: "lib/components/background/background.component.ts", lineNumber: 86 }); })();
|
|
209
|
+
//# sourceMappingURL=background.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"background.component.js","sourceRoot":"","sources":["../../../../../src/lib/components/background/background.component.ts"],"names":[],"mappings":"AAAA,OAAO,EA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AC;KACJ;oHAjEY,mBAAmB;oEAAnB,mBAAmB;;YAvE5B,iCAIC;YACC,2FAAiB;YAGjB,+BAAM;YAqCF,AAjBA,AAlBA,wFAAgB,kEAkBC,kEAiBA;YAkBrB,oBAAO;YACP,6BAGE;YACJ,oBAAM;;;YAjEJ,AADA,+BAAsB,kBACC;YAEvB,cAEC;YAFD,wCAEC;YAEC,eAqDC;YArDD,+CAAA,MAAM,mBAAN,OAAO,mBAAP,OAAO,UAqDN;YAID,eAAyC;;;;iFAKpC,mBAAmB;cAhF/B,SAAS;eAAC;gBACT,QAAQ,EAAE,oBAAoB;gBAC9B,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,IAAI,EAAE;oBACJ,OAAO,EAAE,4DAA4D;oBACrE,OAAO,EAAE,oHAAoH;iBAC9H;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsET;aACF;;kFACY,mBAAmB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { ConnectionLineType, Position } from '@angflow/system';
|
|
3
|
+
import { FlowStore } from '../../services/flow-store.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ConnectionLineComponent {
|
|
6
|
+
readonly store: FlowStore<import("../../types").Node, import("../../types").Edge>;
|
|
7
|
+
readonly customComponent: import("@angular/core").InputSignal<Type<unknown> | null>;
|
|
8
|
+
readonly connectionLineType: import("@angular/core").InputSignal<ConnectionLineType>;
|
|
9
|
+
readonly isConnecting: import("@angular/core").Signal<boolean>;
|
|
10
|
+
readonly connectionProps: import("@angular/core").Signal<{
|
|
11
|
+
fromX?: undefined;
|
|
12
|
+
fromY?: undefined;
|
|
13
|
+
toX?: undefined;
|
|
14
|
+
toY?: undefined;
|
|
15
|
+
fromPosition?: undefined;
|
|
16
|
+
toPosition?: undefined;
|
|
17
|
+
connectionLineType?: undefined;
|
|
18
|
+
fromNode?: undefined;
|
|
19
|
+
fromHandle?: undefined;
|
|
20
|
+
} | {
|
|
21
|
+
fromX: number;
|
|
22
|
+
fromY: number;
|
|
23
|
+
toX: number;
|
|
24
|
+
toY: number;
|
|
25
|
+
fromPosition: Position;
|
|
26
|
+
toPosition: Position;
|
|
27
|
+
connectionLineType: ConnectionLineType;
|
|
28
|
+
fromNode: import("@angflow/system").InternalNodeBase;
|
|
29
|
+
fromHandle: import("@angflow/system").Handle;
|
|
30
|
+
}>;
|
|
31
|
+
private readonly connectionCoords;
|
|
32
|
+
readonly connectionPath: import("@angular/core").Signal<string>;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConnectionLineComponent, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConnectionLineComponent, "ng-flow-connection-line", never, { "customComponent": { "alias": "customComponent"; "required": false; "isSignal": true; }; "connectionLineType": { "alias": "connectionLineType"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=connection-line.component.d.ts.map
|
|
@@ -0,0 +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,CAwB9B;IAEH,QAAQ,CAAC,cAAc,yCA0BpB;yCAhFQ,uBAAuB;2CAAvB,uBAAuB;CAiFnC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy, inject, computed, input } from '@angular/core';
|
|
2
|
+
import { CommonModule, NgComponentOutlet } from '@angular/common';
|
|
3
|
+
import { getBezierPath, getSmoothStepPath, getStraightPath, ConnectionLineType, Position } from '@angflow/system';
|
|
4
|
+
import { FlowStore } from '../../services/flow-store.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@angular/common";
|
|
7
|
+
function ConnectionLineComponent_Conditional_0_Conditional_0_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
8
|
+
i0.ɵɵelementContainer(0);
|
|
9
|
+
} }
|
|
10
|
+
function ConnectionLineComponent_Conditional_0_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
11
|
+
i0.ɵɵtemplate(0, ConnectionLineComponent_Conditional_0_Conditional_0_ng_container_0_Template, 1, 0, "ng-container", 1);
|
|
12
|
+
} if (rf & 2) {
|
|
13
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
14
|
+
i0.ɵɵproperty("ngComponentOutlet", ctx_r0.customComponent())("ngComponentOutletInputs", ctx_r0.connectionProps());
|
|
15
|
+
} }
|
|
16
|
+
function ConnectionLineComponent_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
17
|
+
i0.ɵɵnamespaceSVG();
|
|
18
|
+
i0.ɵɵelementStart(0, "svg", 0)(1, "g");
|
|
19
|
+
i0.ɵɵelement(2, "path", 2);
|
|
20
|
+
i0.ɵɵelementEnd()();
|
|
21
|
+
} if (rf & 2) {
|
|
22
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
23
|
+
i0.ɵɵadvance(2);
|
|
24
|
+
i0.ɵɵattribute("d", ctx_r0.connectionPath());
|
|
25
|
+
} }
|
|
26
|
+
function ConnectionLineComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
27
|
+
i0.ɵɵconditionalCreate(0, ConnectionLineComponent_Conditional_0_Conditional_0_Template, 1, 2, "ng-container")(1, ConnectionLineComponent_Conditional_0_Conditional_1_Template, 3, 1, ":svg:svg", 0);
|
|
28
|
+
} if (rf & 2) {
|
|
29
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
30
|
+
i0.ɵɵconditional(ctx_r0.customComponent() ? 0 : 1);
|
|
31
|
+
} }
|
|
32
|
+
export class ConnectionLineComponent {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.store = inject(FlowStore);
|
|
35
|
+
this.customComponent = input(null, ...(ngDevMode ? [{ debugName: "customComponent" }] : /* istanbul ignore next */ []));
|
|
36
|
+
this.connectionLineType = input(ConnectionLineType.Bezier, ...(ngDevMode ? [{ debugName: "connectionLineType" }] : /* istanbul ignore next */ []));
|
|
37
|
+
this.isConnecting = computed(() => {
|
|
38
|
+
this.store.version();
|
|
39
|
+
const conn = this.store.connection();
|
|
40
|
+
return conn?.inProgress ?? false;
|
|
41
|
+
}, ...(ngDevMode ? [{ debugName: "isConnecting" }] : /* istanbul ignore next */ []));
|
|
42
|
+
this.connectionProps = computed(() => {
|
|
43
|
+
const coords = this.connectionCoords();
|
|
44
|
+
if (!coords)
|
|
45
|
+
return {};
|
|
46
|
+
return {
|
|
47
|
+
fromX: coords.fromX,
|
|
48
|
+
fromY: coords.fromY,
|
|
49
|
+
toX: coords.toX,
|
|
50
|
+
toY: coords.toY,
|
|
51
|
+
fromPosition: coords.fromPosition,
|
|
52
|
+
toPosition: coords.toPosition,
|
|
53
|
+
connectionLineType: this.connectionLineType(),
|
|
54
|
+
fromNode: coords.fromNode,
|
|
55
|
+
fromHandle: coords.fromHandle,
|
|
56
|
+
};
|
|
57
|
+
}, ...(ngDevMode ? [{ debugName: "connectionProps" }] : /* istanbul ignore next */ []));
|
|
58
|
+
this.connectionCoords = computed(() => {
|
|
59
|
+
this.store.version();
|
|
60
|
+
const conn = this.store.connection();
|
|
61
|
+
if (!conn?.inProgress)
|
|
62
|
+
return null;
|
|
63
|
+
const activeConn = conn;
|
|
64
|
+
const fromX = activeConn.from?.x ?? 0;
|
|
65
|
+
const fromY = activeConn.from?.y ?? 0;
|
|
66
|
+
const fromPosition = activeConn.fromPosition ?? Position.Bottom;
|
|
67
|
+
const toScreenX = activeConn.to?.x ?? 0;
|
|
68
|
+
const toScreenY = activeConn.to?.y ?? 0;
|
|
69
|
+
const transform = this.store.transform();
|
|
70
|
+
const toX = (toScreenX - transform[0]) / transform[2];
|
|
71
|
+
const toY = (toScreenY - transform[1]) / transform[2];
|
|
72
|
+
const toPosition = activeConn.toPosition ?? Position.Top;
|
|
73
|
+
return {
|
|
74
|
+
fromX, fromY, fromPosition,
|
|
75
|
+
toX, toY, toPosition,
|
|
76
|
+
fromNode: activeConn.fromNode ?? null,
|
|
77
|
+
fromHandle: activeConn.fromHandle ?? null,
|
|
78
|
+
};
|
|
79
|
+
}, ...(ngDevMode ? [{ debugName: "connectionCoords" }] : /* istanbul ignore next */ []));
|
|
80
|
+
this.connectionPath = computed(() => {
|
|
81
|
+
const coords = this.connectionCoords();
|
|
82
|
+
if (!coords)
|
|
83
|
+
return '';
|
|
84
|
+
const params = {
|
|
85
|
+
sourceX: coords.fromX,
|
|
86
|
+
sourceY: coords.fromY,
|
|
87
|
+
targetX: coords.toX,
|
|
88
|
+
targetY: coords.toY,
|
|
89
|
+
sourcePosition: coords.fromPosition,
|
|
90
|
+
targetPosition: coords.toPosition,
|
|
91
|
+
};
|
|
92
|
+
const lineType = this.connectionLineType();
|
|
93
|
+
switch (lineType) {
|
|
94
|
+
case ConnectionLineType.Straight:
|
|
95
|
+
return getStraightPath(params)[0];
|
|
96
|
+
case ConnectionLineType.Step:
|
|
97
|
+
return getSmoothStepPath({ ...params, borderRadius: 0 })[0];
|
|
98
|
+
case ConnectionLineType.SmoothStep:
|
|
99
|
+
return getSmoothStepPath(params)[0];
|
|
100
|
+
case ConnectionLineType.Bezier:
|
|
101
|
+
default:
|
|
102
|
+
return getBezierPath(params)[0];
|
|
103
|
+
}
|
|
104
|
+
}, ...(ngDevMode ? [{ debugName: "connectionPath" }] : /* istanbul ignore next */ []));
|
|
105
|
+
}
|
|
106
|
+
static { this.ɵfac = function ConnectionLineComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ConnectionLineComponent)(); }; }
|
|
107
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConnectionLineComponent, selectors: [["ng-flow-connection-line"]], hostAttrs: [2, "display", "contents"], inputs: { customComponent: [1, "customComponent"], connectionLineType: [1, "connectionLineType"] }, decls: 1, vars: 1, consts: [[1, "ng-flow__connectionline", "xy-flow__connectionline", 2, "overflow", "visible", "position", "absolute", "width", "100%", "height", "100%", "pointer-events", "none"], [4, "ngComponentOutlet", "ngComponentOutletInputs"], ["fill", "none", 1, "ng-flow__connection-path", "xy-flow__connection-path"]], template: function ConnectionLineComponent_Template(rf, ctx) { if (rf & 1) {
|
|
108
|
+
i0.ɵɵconditionalCreate(0, ConnectionLineComponent_Conditional_0_Template, 2, 1);
|
|
109
|
+
} if (rf & 2) {
|
|
110
|
+
i0.ɵɵconditional(ctx.isConnecting() ? 0 : -1);
|
|
111
|
+
} }, dependencies: [CommonModule, i1.NgComponentOutlet], encapsulation: 2, changeDetection: 0 }); }
|
|
112
|
+
}
|
|
113
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConnectionLineComponent, [{
|
|
114
|
+
type: Component,
|
|
115
|
+
args: [{
|
|
116
|
+
selector: 'ng-flow-connection-line',
|
|
117
|
+
standalone: true,
|
|
118
|
+
imports: [CommonModule, NgComponentOutlet],
|
|
119
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
120
|
+
host: {
|
|
121
|
+
'style': 'display: contents;',
|
|
122
|
+
},
|
|
123
|
+
template: `
|
|
124
|
+
@if (isConnecting()) {
|
|
125
|
+
@if (customComponent()) {
|
|
126
|
+
<ng-container
|
|
127
|
+
*ngComponentOutlet="customComponent(); inputs: connectionProps()"
|
|
128
|
+
/>
|
|
129
|
+
} @else {
|
|
130
|
+
<svg class="ng-flow__connectionline xy-flow__connectionline"
|
|
131
|
+
style="overflow: visible; position: absolute; width: 100%; height: 100%; pointer-events: none;">
|
|
132
|
+
<g>
|
|
133
|
+
<path
|
|
134
|
+
class="ng-flow__connection-path xy-flow__connection-path"
|
|
135
|
+
[attr.d]="connectionPath()"
|
|
136
|
+
fill="none"
|
|
137
|
+
/>
|
|
138
|
+
</g>
|
|
139
|
+
</svg>
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
`,
|
|
143
|
+
}]
|
|
144
|
+
}], null, { customComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "customComponent", required: false }] }], connectionLineType: [{ type: i0.Input, args: [{ isSignal: true, alias: "connectionLineType", required: false }] }] }); })();
|
|
145
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConnectionLineComponent, { className: "ConnectionLineComponent", filePath: "lib/components/connection-line/connection-line.component.ts", lineNumber: 35 }); })();
|
|
146
|
+
//# sourceMappingURL=connection-line.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-line.component.js","sourceRoot":"","sources":["../../../../../src/lib/components/connection-line/connection-line.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAQ,MAAM,eAAe,CAAC;AAClG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAAE,QAAQ,EAA6B,MAAM,iBAAiB,CAAC;AAC7I,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