@angflow/angular 0.0.8 → 0.0.10

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.
@@ -1,4 +1,4 @@
1
- import { Component, ChangeDetectionStrategy, input, output, inject, signal } from '@angular/core';
1
+ import { Component, ChangeDetectionStrategy, input, output, inject, computed } from '@angular/core';
2
2
  import { FlowStore } from '../../services/flow-store.service';
3
3
  import { NgFlowService } from '../../services/ng-flow.service';
4
4
  import { PanelComponent } from '../panel/panel.component';
@@ -12,6 +12,7 @@ export class ControlsComponent {
12
12
  this.showFitView = input(true, ...(ngDevMode ? [{ debugName: "showFitView" }] : /* istanbul ignore next */ []));
13
13
  this.showInteractive = input(true, ...(ngDevMode ? [{ debugName: "showInteractive" }] : /* istanbul ignore next */ []));
14
14
  this.fitViewOptions = input(...(ngDevMode ? [undefined, { debugName: "fitViewOptions" }] : /* istanbul ignore next */ []));
15
+ this.fitViewFn = input(undefined, ...(ngDevMode ? [{ debugName: "fitViewFn" }] : /* istanbul ignore next */ []));
15
16
  this.orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
16
17
  this.ariaLabel = input('Angular Flow controls', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
17
18
  // Callback outputs
@@ -19,7 +20,16 @@ export class ControlsComponent {
19
20
  this.zoomOutClick = output();
20
21
  this.fitViewClick = output();
21
22
  this.interactiveChange = output();
22
- this.isLocked = signal(false, ...(ngDevMode ? [{ debugName: "isLocked" }] : /* istanbul ignore next */ []));
23
+ // Derive interactive/locked state directly from the store so external
24
+ // mutations of nodesDraggable/nodesConnectable/elementsSelectable stay
25
+ // in sync with the lock icon. Mirrors React Flow's Controls selector.
26
+ this.isInteractive = computed(() => this.store.nodesDraggable() ||
27
+ this.store.nodesConnectable() ||
28
+ this.store.elementsSelectable(), ...(ngDevMode ? [{ debugName: "isInteractive" }] : /* istanbul ignore next */ []));
29
+ this.isLocked = computed(() => !this.isInteractive(), ...(ngDevMode ? [{ debugName: "isLocked" }] : /* istanbul ignore next */ []));
30
+ // Disable zoom buttons at min/max extent, matching React Flow's behaviour.
31
+ this.maxZoomReached = computed(() => this.store.transform()[2] >= this.store.maxZoom(), ...(ngDevMode ? [{ debugName: "maxZoomReached" }] : /* istanbul ignore next */ []));
32
+ this.minZoomReached = computed(() => this.store.transform()[2] <= this.store.minZoom(), ...(ngDevMode ? [{ debugName: "minZoomReached" }] : /* istanbul ignore next */ []));
23
33
  }
24
34
  onZoomIn() {
25
35
  this.ngFlowService.zoomIn();
@@ -30,75 +40,82 @@ export class ControlsComponent {
30
40
  this.zoomOutClick.emit();
31
41
  }
32
42
  onFitView() {
33
- this.ngFlowService.fitView(this.fitViewOptions());
43
+ const fn = this.fitViewFn();
44
+ if (fn) {
45
+ fn();
46
+ }
47
+ else {
48
+ this.ngFlowService.fitView(this.fitViewOptions());
49
+ }
34
50
  this.fitViewClick.emit();
35
51
  }
36
52
  onToggleLock() {
37
- const locked = !this.isLocked();
38
- this.isLocked.set(locked);
39
- this.store.nodesDraggable.set(!locked);
40
- this.store.nodesConnectable.set(!locked);
41
- this.store.elementsSelectable.set(!locked);
42
- this.interactiveChange.emit(!locked);
53
+ const nextInteractive = !this.isInteractive();
54
+ this.store.nodesDraggable.set(nextInteractive);
55
+ this.store.nodesConnectable.set(nextInteractive);
56
+ this.store.elementsSelectable.set(nextInteractive);
57
+ this.interactiveChange.emit(nextInteractive);
43
58
  }
44
59
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
45
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: ControlsComponent, isStandalone: true, selector: "ng-flow-controls", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, showZoom: { classPropertyName: "showZoom", publicName: "showZoom", isSignal: true, isRequired: false, transformFunction: null }, showFitView: { classPropertyName: "showFitView", publicName: "showFitView", isSignal: true, isRequired: false, transformFunction: null }, showInteractive: { classPropertyName: "showInteractive", publicName: "showInteractive", isSignal: true, isRequired: false, transformFunction: null }, fitViewOptions: { classPropertyName: "fitViewOptions", publicName: "fitViewOptions", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zoomInClick: "zoomInClick", zoomOutClick: "zoomOutClick", fitViewClick: "fitViewClick", interactiveChange: "interactiveChange" }, ngImport: i0, template: `
46
- <ng-flow-panel [position]="position()">
47
- <div
48
- class="ng-flow__controls xy-flow__controls"
49
- [class.horizontal]="orientation() === 'horizontal'"
50
- [attr.aria-label]="ariaLabel()"
51
- >
52
- @if (showZoom()) {
53
- <button
54
- type="button"
55
- class="ng-flow__controls-button xy-flow__controls-button"
56
- title="zoom in"
57
- aria-label="zoom in"
58
- (click)="onZoomIn()"
59
- >
60
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true"><path d="M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"/></svg>
61
- </button>
62
- <button
63
- type="button"
64
- class="ng-flow__controls-button xy-flow__controls-button"
65
- title="zoom out"
66
- aria-label="zoom out"
67
- (click)="onZoomOut()"
68
- >
69
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true"><path d="M0 13.867h32v4.266H0z"/></svg>
70
- </button>
71
- }
72
- @if (showFitView()) {
73
- <button
74
- type="button"
75
- class="ng-flow__controls-button xy-flow__controls-button"
76
- title="fit view"
77
- aria-label="fit view"
78
- (click)="onFitView()"
79
- >
80
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true"><path d="M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 01-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"/></svg>
81
- </button>
82
- }
83
- @if (showInteractive()) {
84
- <button
85
- type="button"
86
- class="ng-flow__controls-button xy-flow__controls-button"
87
- title="toggle interactivity"
88
- aria-label="toggle interactivity"
89
- [attr.aria-pressed]="isLocked()"
90
- (click)="onToggleLock()"
91
- >
92
- @if (isLocked()) {
93
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 32" aria-hidden="true"><path d="M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"/></svg>
94
- } @else {
95
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 32" aria-hidden="true"><path d="M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"/></svg>
96
- }
97
- </button>
98
- }
99
- <ng-content />
100
- </div>
101
- </ng-flow-panel>
60
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: ControlsComponent, isStandalone: true, selector: "ng-flow-controls", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, showZoom: { classPropertyName: "showZoom", publicName: "showZoom", isSignal: true, isRequired: false, transformFunction: null }, showFitView: { classPropertyName: "showFitView", publicName: "showFitView", isSignal: true, isRequired: false, transformFunction: null }, showInteractive: { classPropertyName: "showInteractive", publicName: "showInteractive", isSignal: true, isRequired: false, transformFunction: null }, fitViewOptions: { classPropertyName: "fitViewOptions", publicName: "fitViewOptions", isSignal: true, isRequired: false, transformFunction: null }, fitViewFn: { classPropertyName: "fitViewFn", publicName: "fitViewFn", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zoomInClick: "zoomInClick", zoomOutClick: "zoomOutClick", fitViewClick: "fitViewClick", interactiveChange: "interactiveChange" }, ngImport: i0, template: `
61
+ <ng-flow-panel [position]="position()">
62
+ <div
63
+ class="ng-flow__controls xy-flow__controls"
64
+ [class.horizontal]="orientation() === 'horizontal'"
65
+ [attr.aria-label]="ariaLabel()"
66
+ >
67
+ @if (showZoom()) {
68
+ <button
69
+ type="button"
70
+ class="ng-flow__controls-button xy-flow__controls-button"
71
+ title="zoom in"
72
+ aria-label="zoom in"
73
+ [disabled]="maxZoomReached()"
74
+ (click)="onZoomIn()"
75
+ >
76
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true"><path d="M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"/></svg>
77
+ </button>
78
+ <button
79
+ type="button"
80
+ class="ng-flow__controls-button xy-flow__controls-button"
81
+ title="zoom out"
82
+ aria-label="zoom out"
83
+ [disabled]="minZoomReached()"
84
+ (click)="onZoomOut()"
85
+ >
86
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true"><path d="M0 13.867h32v4.266H0z"/></svg>
87
+ </button>
88
+ }
89
+ @if (showFitView()) {
90
+ <button
91
+ type="button"
92
+ class="ng-flow__controls-button xy-flow__controls-button"
93
+ title="fit view"
94
+ aria-label="fit view"
95
+ (click)="onFitView()"
96
+ >
97
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true"><path d="M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 01-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"/></svg>
98
+ </button>
99
+ }
100
+ @if (showInteractive()) {
101
+ <button
102
+ type="button"
103
+ class="ng-flow__controls-button xy-flow__controls-button"
104
+ title="toggle interactivity"
105
+ aria-label="toggle interactivity"
106
+ [attr.aria-pressed]="isLocked()"
107
+ (click)="onToggleLock()"
108
+ >
109
+ @if (isLocked()) {
110
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 32" aria-hidden="true"><path d="M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"/></svg>
111
+ } @else {
112
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 32" aria-hidden="true"><path d="M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"/></svg>
113
+ }
114
+ </button>
115
+ }
116
+ <ng-content />
117
+ </div>
118
+ </ng-flow-panel>
102
119
  `, isInline: true, dependencies: [{ kind: "component", type: PanelComponent, selector: "ng-flow-panel", inputs: ["position"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
103
120
  }
104
121
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ControlsComponent, decorators: [{
@@ -108,64 +125,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
108
125
  standalone: true,
109
126
  imports: [PanelComponent],
110
127
  changeDetection: ChangeDetectionStrategy.OnPush,
111
- template: `
112
- <ng-flow-panel [position]="position()">
113
- <div
114
- class="ng-flow__controls xy-flow__controls"
115
- [class.horizontal]="orientation() === 'horizontal'"
116
- [attr.aria-label]="ariaLabel()"
117
- >
118
- @if (showZoom()) {
119
- <button
120
- type="button"
121
- class="ng-flow__controls-button xy-flow__controls-button"
122
- title="zoom in"
123
- aria-label="zoom in"
124
- (click)="onZoomIn()"
125
- >
126
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true"><path d="M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"/></svg>
127
- </button>
128
- <button
129
- type="button"
130
- class="ng-flow__controls-button xy-flow__controls-button"
131
- title="zoom out"
132
- aria-label="zoom out"
133
- (click)="onZoomOut()"
134
- >
135
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true"><path d="M0 13.867h32v4.266H0z"/></svg>
136
- </button>
137
- }
138
- @if (showFitView()) {
139
- <button
140
- type="button"
141
- class="ng-flow__controls-button xy-flow__controls-button"
142
- title="fit view"
143
- aria-label="fit view"
144
- (click)="onFitView()"
145
- >
146
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true"><path d="M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 01-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"/></svg>
147
- </button>
148
- }
149
- @if (showInteractive()) {
150
- <button
151
- type="button"
152
- class="ng-flow__controls-button xy-flow__controls-button"
153
- title="toggle interactivity"
154
- aria-label="toggle interactivity"
155
- [attr.aria-pressed]="isLocked()"
156
- (click)="onToggleLock()"
157
- >
158
- @if (isLocked()) {
159
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 32" aria-hidden="true"><path d="M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"/></svg>
160
- } @else {
161
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 32" aria-hidden="true"><path d="M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"/></svg>
162
- }
163
- </button>
164
- }
165
- <ng-content />
166
- </div>
167
- </ng-flow-panel>
128
+ template: `
129
+ <ng-flow-panel [position]="position()">
130
+ <div
131
+ class="ng-flow__controls xy-flow__controls"
132
+ [class.horizontal]="orientation() === 'horizontal'"
133
+ [attr.aria-label]="ariaLabel()"
134
+ >
135
+ @if (showZoom()) {
136
+ <button
137
+ type="button"
138
+ class="ng-flow__controls-button xy-flow__controls-button"
139
+ title="zoom in"
140
+ aria-label="zoom in"
141
+ [disabled]="maxZoomReached()"
142
+ (click)="onZoomIn()"
143
+ >
144
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true"><path d="M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"/></svg>
145
+ </button>
146
+ <button
147
+ type="button"
148
+ class="ng-flow__controls-button xy-flow__controls-button"
149
+ title="zoom out"
150
+ aria-label="zoom out"
151
+ [disabled]="minZoomReached()"
152
+ (click)="onZoomOut()"
153
+ >
154
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true"><path d="M0 13.867h32v4.266H0z"/></svg>
155
+ </button>
156
+ }
157
+ @if (showFitView()) {
158
+ <button
159
+ type="button"
160
+ class="ng-flow__controls-button xy-flow__controls-button"
161
+ title="fit view"
162
+ aria-label="fit view"
163
+ (click)="onFitView()"
164
+ >
165
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true"><path d="M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 01-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"/></svg>
166
+ </button>
167
+ }
168
+ @if (showInteractive()) {
169
+ <button
170
+ type="button"
171
+ class="ng-flow__controls-button xy-flow__controls-button"
172
+ title="toggle interactivity"
173
+ aria-label="toggle interactivity"
174
+ [attr.aria-pressed]="isLocked()"
175
+ (click)="onToggleLock()"
176
+ >
177
+ @if (isLocked()) {
178
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 32" aria-hidden="true"><path d="M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"/></svg>
179
+ } @else {
180
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 32" aria-hidden="true"><path d="M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"/></svg>
181
+ }
182
+ </button>
183
+ }
184
+ <ng-content />
185
+ </div>
186
+ </ng-flow-panel>
168
187
  `,
169
188
  }]
170
- }], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], showZoom: [{ type: i0.Input, args: [{ isSignal: true, alias: "showZoom", required: false }] }], showFitView: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFitView", required: false }] }], showInteractive: [{ type: i0.Input, args: [{ isSignal: true, alias: "showInteractive", required: false }] }], fitViewOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "fitViewOptions", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], zoomInClick: [{ type: i0.Output, args: ["zoomInClick"] }], zoomOutClick: [{ type: i0.Output, args: ["zoomOutClick"] }], fitViewClick: [{ type: i0.Output, args: ["fitViewClick"] }], interactiveChange: [{ type: i0.Output, args: ["interactiveChange"] }] } });
189
+ }], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], showZoom: [{ type: i0.Input, args: [{ isSignal: true, alias: "showZoom", required: false }] }], showFitView: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFitView", required: false }] }], showInteractive: [{ type: i0.Input, args: [{ isSignal: true, alias: "showInteractive", required: false }] }], fitViewOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "fitViewOptions", required: false }] }], fitViewFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "fitViewFn", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], zoomInClick: [{ type: i0.Output, args: ["zoomInClick"] }], zoomOutClick: [{ type: i0.Output, args: ["zoomOutClick"] }], fitViewClick: [{ type: i0.Output, args: ["fitViewClick"] }], interactiveChange: [{ type: i0.Output, args: ["interactiveChange"] }] } });
171
190
  //# sourceMappingURL=controls.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"controls.component.js","sourceRoot":"","sources":["../../../../../src/lib/components/controls/controls.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAElG,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;;AAkE1D,MAAM,OAAO,iBAAiB;IAhE9B;QAiEU,UAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAC1B,kBAAa,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;QAErC,aAAQ,GAAG,KAAK,CAAgB,aAAa,+EAAC,CAAC;QAC/C,aAAQ,GAAG,KAAK,CAAC,IAAI,+EAAC,CAAC;QACvB,gBAAW,GAAG,KAAK,CAAC,IAAI,kFAAC,CAAC;QAC1B,oBAAe,GAAG,KAAK,CAAC,IAAI,sFAA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IAAI,EAAE,EAAE,CAAC;YACP,EAAE,EAAE,CAAC;QACP,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC3B,CAAC;IAED,YAAY;QACV,MAAM,eAAe,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;QAC9C,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QAC/C,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QACnD,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC/C,CAAC;8GA5DU,iBAAiB;kGAAjB,iBAAiB,4yCA7DlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DT,4DA7DS,cAAc;;2FA+Db,iBAAiB;kBAlE7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,kBAAkB;oBAC5B,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,cAAc,CAAC;oBACzB,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DT;iBACF"}
@@ -40,6 +40,7 @@ export declare class MiniMapComponent implements AfterViewInit, OnDestroy {
40
40
  private xyMinimap;
41
41
  private animationFrameId;
42
42
  private isDragging;
43
+ private dragMoved;
43
44
  private boundOnMouseMove;
44
45
  private boundOnMouseUp;
45
46
  readonly minimapNodes: import("@angular/core").Signal<{
@@ -1 +1 @@
1
- {"version":3,"file":"minimap.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