@visuallyjs/browser-ui-angular 1.2.4 → 1.2.5

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 { Diagram, DiagramCell, Size, PaletteMode, OnVertexAddedCallback, PreparedShape } from "@visuallyjs/browser-ui";
1
+ import { Diagram, DiagramCell, Size, PaletteMode, OnVertexAddedCallback, PreparedShape, AutoEdgeConnectOptions, CanDropOnEdgeFilter } from "@visuallyjs/browser-ui";
2
2
  import { AfterViewInit, ElementRef } from "@angular/core";
3
3
  import { VisuallyJsService } from "./vjs-service";
4
4
  import * as i0 from "@angular/core";
@@ -23,10 +23,15 @@ export declare class DiagramPaletteComponent implements AfterViewInit {
23
23
  */
24
24
  dragSize?: Size;
25
25
  /**
26
- * Indicates that when one or more vertices are selected, clicking on an entry in the palette will change the type of the selected vertices to that type. Defaults to true.
26
+ * When `true`, selecting an element in the canvas will cause its related shape to be selected in the palette. Defaults to true.
27
27
  * @input
28
28
  */
29
29
  inspector?: boolean;
30
+ /**
31
+ * When `true`, clicking on an entry in the palette will change the type of any selected vertices to that type. Defaults to `false`. This is a potentially destructive operation if the properties of the new shape type are not compatible with the old one.
32
+ * @input
33
+ */
34
+ updateTypeOnPaletteTap?: boolean;
30
35
  /**
31
36
  * Optional size to use for icons. Defaults to 150x100 pixels. If you provide this but not `dragSize` this size will also be used for an icon that is being dragged.
32
37
  * @input
@@ -87,6 +92,31 @@ export declare class DiagramPaletteComponent implements AfterViewInit {
87
92
  * @input
88
93
  */
89
94
  preparedShapes?: Array<PreparedShape>;
95
+ /**
96
+ * Whether or not to allow drop on edge. Defaults to false.
97
+ * @input
98
+ */
99
+ allowDropOnEdge?: boolean | CanDropOnEdgeFilter<any>;
100
+ /**
101
+ * Whether or not to allow rotation of elements being dragged. Defaults to true.
102
+ * @input
103
+ */
104
+ allowRotation?: boolean;
105
+ /**
106
+ * The number of milliseconds required to complete a full rotation of an element when the trigger key is held down. Defaults to 2000.
107
+ * @input
108
+ */
109
+ rotationSpeed?: number;
110
+ /**
111
+ * Controls whether the palette will automatically connect a new vertex being dragged onto the canvas to existing vertices, if the shape definitions for the new vertex and/or the existing vertices have source/target elements. You can set this to simply 'true', and use defaults, or you can provide values for various options.
112
+ * @input
113
+ */
114
+ autoEdgeConnect?: boolean | AutoEdgeConnectOptions;
115
+ /**
116
+ * Whether or not to show groups in the palette. Defaults to true.
117
+ * @input
118
+ */
119
+ showGroups?: boolean;
90
120
  $el: ElementRef<any>;
91
121
  $vjs: VisuallyJsService;
92
122
  initialized: boolean;
@@ -94,5 +124,5 @@ export declare class DiagramPaletteComponent implements AfterViewInit {
94
124
  constructor();
95
125
  ngAfterViewInit(): void;
96
126
  static ɵfac: i0.ɵɵFactoryDeclaration<DiagramPaletteComponent, never>;
97
- static ɵcmp: i0.ɵɵComponentDeclaration<DiagramPaletteComponent, "vjs-diagram-palette", never, { "fill": { "alias": "fill"; "required": false; }; "outline": { "alias": "outline"; "required": false; }; "dragSize": { "alias": "dragSize"; "required": false; }; "inspector": { "alias": "inspector"; "required": false; }; "iconSize": { "alias": "iconSize"; "required": false; }; "showLabels": { "alias": "showLabels"; "required": false; }; "paletteStrokeWidth": { "alias": "paletteStrokeWidth"; "required": false; }; "showAllMessage": { "alias": "showAllMessage"; "required": false; }; "onCellAdded": { "alias": "onCellAdded"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "allowClickToAdd": { "alias": "allowClickToAdd"; "required": false; }; "autoExitDrawMode": { "alias": "autoExitDrawMode"; "required": false; }; "selectAfterAdd": { "alias": "selectAfterAdd"; "required": false; }; "inputDiagram": { "alias": "diagram"; "required": false; }; "onVertexAdded": { "alias": "onVertexAdded"; "required": false; }; "preparedShapes": { "alias": "preparedShapes"; "required": false; }; }, {}, never, never, false, never>;
127
+ static ɵcmp: i0.ɵɵComponentDeclaration<DiagramPaletteComponent, "vjs-diagram-palette", never, { "fill": { "alias": "fill"; "required": false; }; "outline": { "alias": "outline"; "required": false; }; "dragSize": { "alias": "dragSize"; "required": false; }; "inspector": { "alias": "inspector"; "required": false; }; "updateTypeOnPaletteTap": { "alias": "updateTypeOnPaletteTap"; "required": false; }; "iconSize": { "alias": "iconSize"; "required": false; }; "showLabels": { "alias": "showLabels"; "required": false; }; "paletteStrokeWidth": { "alias": "paletteStrokeWidth"; "required": false; }; "showAllMessage": { "alias": "showAllMessage"; "required": false; }; "onCellAdded": { "alias": "onCellAdded"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "allowClickToAdd": { "alias": "allowClickToAdd"; "required": false; }; "autoExitDrawMode": { "alias": "autoExitDrawMode"; "required": false; }; "selectAfterAdd": { "alias": "selectAfterAdd"; "required": false; }; "inputDiagram": { "alias": "diagram"; "required": false; }; "onVertexAdded": { "alias": "onVertexAdded"; "required": false; }; "preparedShapes": { "alias": "preparedShapes"; "required": false; }; "allowDropOnEdge": { "alias": "allowDropOnEdge"; "required": false; }; "allowRotation": { "alias": "allowRotation"; "required": false; }; "rotationSpeed": { "alias": "rotationSpeed"; "required": false; }; "autoEdgeConnect": { "alias": "autoEdgeConnect"; "required": false; }; "showGroups": { "alias": "showGroups"; "required": false; }; }, {}, never, never, false, never>;
98
128
  }
@@ -1,5 +1,5 @@
1
1
  import { ElementRef } from "@angular/core";
2
- import { DataGeneratorFunction, GroupIdentifierFunction, OnVertexAddedCallback, Palette, Size, TypeGeneratorFunction, CanvasDropFilter, PaletteMode } from "@visuallyjs/browser-ui";
2
+ import { DataGeneratorFunction, GroupIdentifierFunction, OnVertexAddedCallback, Palette, Size, TypeGeneratorFunction, CanvasDropFilter, PaletteMode, AutoEdgeConnectOptions, CanDropOnEdgeFilter } from "@visuallyjs/browser-ui";
3
3
  import { VisuallyJsService } from "./vjs-service";
4
4
  import * as i0 from "@angular/core";
5
5
  /**
@@ -38,7 +38,7 @@ export declare class PaletteComponent<T> {
38
38
  * Defaults to true. Allows items to be dropped onto edges in the canvas.
39
39
  * @input
40
40
  */
41
- allowDropOnEdge?: boolean;
41
+ allowDropOnEdge?: boolean | CanDropOnEdgeFilter<any>;
42
42
  /**
43
43
  * Defaults to true. Allows items to be dropped onto groups in the canvas.
44
44
  * @input
@@ -87,7 +87,20 @@ export declare class PaletteComponent<T> {
87
87
  * This flag relates to "draw" mode, and defaults to false. When true, the palette only supports click to draw new vertices, not drag. This flag is forced to true if the associated UI does not have `useModelForSizes` set, since there is no point in allowing a user to drag a vertex to some size if its not going to be honoured. When you set this flag and associated UI does have `useModelForSizes` set, the palette will use default sizes for new nodes/groups.
88
88
  */
89
89
  clickToAddOnly?: boolean;
90
+ /**
91
+ * Whether or not to allow rotation of elements being dragged. Defaults to true.
92
+ */
93
+ allowRotation?: boolean;
94
+ /**
95
+ * The number of milliseconds required to complete a full rotation of an element when the trigger key is held down. Defaults to 2000.
96
+ */
97
+ rotationSpeed?: number;
98
+ /**
99
+ * Controls whether the palette will automatically connect a new vertex being dragged onto the canvas to existing vertices, if the shape definitions for the new vertex and/or the existing vertices have source/target elements. You can set this to simply 'true', and use defaults, or you can provide values for various options.
100
+ * @input
101
+ */
102
+ autoEdgeConnect?: boolean | AutoEdgeConnectOptions;
90
103
  constructor();
91
104
  static ɵfac: i0.ɵɵFactoryDeclaration<PaletteComponent<any>, never>;
92
- static ɵdir: i0.ɵɵDirectiveDeclaration<PaletteComponent<any>, "[vjs-palette]", never, { "selector": { "alias": "selector"; "required": false; }; "dataGenerator": { "alias": "dataGenerator"; "required": false; }; "typeGenerator": { "alias": "typeGenerator"; "required": false; }; "groupIdentifier": { "alias": "groupIdentifier"; "required": false; }; "allowDropOnEdge": { "alias": "allowDropOnEdge"; "required": false; }; "allowDropOnGroup": { "alias": "allowDropOnGroup"; "required": false; }; "allowDropOnCanvas": { "alias": "allowDropOnCanvas"; "required": false; }; "allowDropOnNode": { "alias": "allowDropOnNode"; "required": false; }; "onVertexAdded": { "alias": "onVertexAdded"; "required": false; }; "dragSize": { "alias": "dragSize"; "required": false; }; "canvasDropFilter": { "alias": "canvasDropFilter"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "selectAfterAdd": { "alias": "selectAfterAdd"; "required": false; }; "allowClickToAdd": { "alias": "allowClickToAdd"; "required": false; }; "clickToAddOnly": { "alias": "clickToAddOnly"; "required": false; }; }, {}, never, never, false, never>;
105
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PaletteComponent<any>, "[vjs-palette]", never, { "selector": { "alias": "selector"; "required": false; }; "dataGenerator": { "alias": "dataGenerator"; "required": false; }; "typeGenerator": { "alias": "typeGenerator"; "required": false; }; "groupIdentifier": { "alias": "groupIdentifier"; "required": false; }; "allowDropOnEdge": { "alias": "allowDropOnEdge"; "required": false; }; "allowDropOnGroup": { "alias": "allowDropOnGroup"; "required": false; }; "allowDropOnCanvas": { "alias": "allowDropOnCanvas"; "required": false; }; "allowDropOnNode": { "alias": "allowDropOnNode"; "required": false; }; "onVertexAdded": { "alias": "onVertexAdded"; "required": false; }; "dragSize": { "alias": "dragSize"; "required": false; }; "canvasDropFilter": { "alias": "canvasDropFilter"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "selectAfterAdd": { "alias": "selectAfterAdd"; "required": false; }; "allowClickToAdd": { "alias": "allowClickToAdd"; "required": false; }; "clickToAddOnly": { "alias": "clickToAddOnly"; "required": false; }; "allowRotation": { "alias": "allowRotation"; "required": false; }; "rotationSpeed": { "alias": "rotationSpeed"; "required": false; }; "autoEdgeConnect": { "alias": "autoEdgeConnect"; "required": false; }; }, {}, never, never, false, never>;
93
106
  }
@@ -1,5 +1,5 @@
1
1
  import { ElementRef } from "@angular/core";
2
- import { ObjectData, Size, DataGeneratorFunction, OnVertexAddedCallback, PreparedShape } from "@visuallyjs/browser-ui";
2
+ import { ObjectData, Size, DataGeneratorFunction, OnVertexAddedCallback, PreparedShape, AutoEdgeConnectOptions, CanDropOnEdgeFilter } from "@visuallyjs/browser-ui";
3
3
  import { VisuallyJsService } from "./vjs-service";
4
4
  import * as i0 from "@angular/core";
5
5
  /**
@@ -62,11 +62,46 @@ export declare class ShapePaletteComponent {
62
62
  * @input
63
63
  */
64
64
  preparedShapes?: Array<PreparedShape>;
65
+ /**
66
+ * Whether or not to allow drop on edge. Defaults to false.
67
+ * @input
68
+ */
69
+ allowDropOnEdge?: boolean | CanDropOnEdgeFilter<any>;
70
+ /**
71
+ * Whether or not to allow rotation of elements being dragged. Defaults to true.
72
+ * @input
73
+ */
74
+ allowRotation?: boolean;
75
+ /**
76
+ * The number of milliseconds required to complete a full rotation of an element when the trigger key is held down. Defaults to 2000.
77
+ * @input
78
+ */
79
+ rotationSpeed?: number;
80
+ /**
81
+ * Controls whether the palette will automatically connect a new vertex being dragged onto the canvas to existing vertices, if the shape definitions for the new vertex and/or the existing vertices have source/target elements. You can set this to simply 'true', and use defaults, or you can provide values for various options.
82
+ * @input
83
+ */
84
+ autoEdgeConnect?: boolean | AutoEdgeConnectOptions;
85
+ /**
86
+ * Whether or not to show groups in the palette. Defaults to true.
87
+ * @input
88
+ */
89
+ showGroups?: boolean;
90
+ /**
91
+ * When `true`, selecting an element in the canvas will cause its related shape to be selected in the palette. Defaults to true.
92
+ * @input
93
+ */
94
+ inspector?: boolean;
95
+ /**
96
+ * When `true`, clicking on an entry in the palette will change the type of any selected vertices to that type. Defaults to `false`. This is a potentially destructive operation if the properties of the new shape type are not compatible with the old one.
97
+ * @input
98
+ */
99
+ updateTypeOnPaletteTap?: boolean;
65
100
  $el: ElementRef<any>;
66
101
  $vjs: VisuallyJsService;
67
102
  ui: import("@angular/core").WritableSignal<import("@visuallyjs/browser-ui").BrowserUI<any>>;
68
103
  initialized: boolean;
69
104
  constructor();
70
105
  static ɵfac: i0.ɵɵFactoryDeclaration<ShapePaletteComponent, never>;
71
- static ɵcmp: i0.ɵɵComponentDeclaration<ShapePaletteComponent, "vjs-shape-palette", never, { "initialSet": { "alias": "initialSet"; "required": false; }; "dragSize": { "alias": "dragSize"; "required": false; }; "iconSize": { "alias": "iconSize"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "outline": { "alias": "outline"; "required": false; }; "showAllMessage": { "alias": "showAllMessage"; "required": false; }; "selectAfterDrop": { "alias": "selectAfterDrop"; "required": false; }; "paletteStrokeWidth": { "alias": "paletteStrokeWidth"; "required": false; }; "onVertexAdded": { "alias": "onVertexAdded"; "required": false; }; "dataGenerator": { "alias": "dataGenerator"; "required": false; }; "preparedShapes": { "alias": "preparedShapes"; "required": false; }; }, {}, never, never, false, never>;
106
+ static ɵcmp: i0.ɵɵComponentDeclaration<ShapePaletteComponent, "vjs-shape-palette", never, { "initialSet": { "alias": "initialSet"; "required": false; }; "dragSize": { "alias": "dragSize"; "required": false; }; "iconSize": { "alias": "iconSize"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "outline": { "alias": "outline"; "required": false; }; "showAllMessage": { "alias": "showAllMessage"; "required": false; }; "selectAfterDrop": { "alias": "selectAfterDrop"; "required": false; }; "paletteStrokeWidth": { "alias": "paletteStrokeWidth"; "required": false; }; "onVertexAdded": { "alias": "onVertexAdded"; "required": false; }; "dataGenerator": { "alias": "dataGenerator"; "required": false; }; "preparedShapes": { "alias": "preparedShapes"; "required": false; }; "allowDropOnEdge": { "alias": "allowDropOnEdge"; "required": false; }; "allowRotation": { "alias": "allowRotation"; "required": false; }; "rotationSpeed": { "alias": "rotationSpeed"; "required": false; }; "autoEdgeConnect": { "alias": "autoEdgeConnect"; "required": false; }; "showGroups": { "alias": "showGroups"; "required": false; }; "inspector": { "alias": "inspector"; "required": false; }; "updateTypeOnPaletteTap": { "alias": "updateTypeOnPaletteTap"; "required": false; }; }, {}, never, never, false, never>;
72
107
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@visuallyjs/browser-ui-angular",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "*",
6
6
  "@angular/core": "*"
7
7
  },
8
8
  "dependencies": {
9
9
  "tslib": "^2.0.0",
10
- "@visuallyjs/browser-ui": "1.2.4"
10
+ "@visuallyjs/browser-ui": "1.2.5"
11
11
  },
12
12
  "exports": {
13
13
  "./css/visuallyjs-angular.css": {
Binary file