@visuallyjs/browser-ui 1.0.3 → 1.1.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/js/visuallyjs.browser-ui.cjs.js +57 -57
- package/js/visuallyjs.browser-ui.esm.js +57 -57
- package/package.json +1 -1
- package/types/browser-ui/browser-ui.d.ts +4 -7
- package/types/browser-ui/browser-util.d.ts +1 -0
- package/types/browser-ui/browser-visuallyjs-instance.d.ts +13 -6
- package/types/browser-ui/components/controls/css-classes.d.ts +24 -0
- package/types/browser-ui/components/inspector/color-picker-tag.d.ts +6 -0
- package/types/browser-ui/components/palette/palette.d.ts +1 -0
- package/types/browser-ui/connector-editors/editor-base.d.ts +0 -1
- package/types/browser-ui/connector-editors/util.d.ts +0 -2
- package/types/browser-ui/connector-editors-bezier/css-constants.d.ts +0 -12
- package/types/browser-ui/constants.d.ts +4 -10
- package/types/browser-ui/css-constants.d.ts +57 -8
- package/types/browser-ui/definitions.d.ts +27 -6
- package/types/browser-ui/dialogs/binder.d.ts +0 -11
- package/types/browser-ui/edge-handler-base.d.ts +9 -16
- package/types/browser-ui/edge-input-handler.d.ts +3 -10
- package/types/browser-ui/edge-mappings/flowchart-basic.d.ts +2 -1
- package/types/browser-ui/element-drag-handler-2.d.ts +0 -3
- package/types/browser-ui/html-element-overlay.d.ts +3 -0
- package/types/browser-ui/icons/definitions.d.ts +20 -0
- package/types/browser-ui/pan-zoom-options.d.ts +10 -21
- package/types/browser-ui/pan-zoom.d.ts +29 -114
- package/types/browser-ui/paper-renderer/definitions.d.ts +2 -0
- package/types/browser-ui/paper-renderer/paper.d.ts +1 -0
- package/types/browser-ui/plugins/background/background-options.d.ts +4 -0
- package/types/browser-ui/plugins/background/tiled-background.d.ts +2 -0
- package/types/browser-ui/plugins/browser-ui-plugin.d.ts +6 -1
- package/types/browser-ui/positioning-and-sizing-utils.d.ts +21 -1
- package/types/browser-ui/shape-library/shape-library-definitions.d.ts +26 -11
- package/types/browser-ui/shape-library/shape-library.d.ts +14 -3
- package/types/browser-ui/shape-library/shapes-basic.d.ts +1 -1
- package/types/browser-ui/shape-library/shapes-flowchart.d.ts +1 -1
- package/types/browser-ui/surface-renderer/anim/definitions.d.ts +13 -4
- package/types/browser-ui/surface-renderer/anim/path-transport.d.ts +0 -1
- package/types/browser-ui/surface-renderer/definitions.d.ts +14 -3
- package/types/browser-ui/surface-renderer/diagrams/definitions.d.ts +12 -2
- package/types/browser-ui/surface-renderer/diagrams/diagram-link.d.ts +2 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-tools.d.ts +4 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram.d.ts +4 -1
- package/types/browser-ui/surface-renderer/diagrams/index.d.ts +4 -2
- package/types/browser-ui/surface-renderer/diagrams/mediator.d.ts +14 -0
- package/types/browser-ui/surface-renderer/plugins/controls/controls-plugin.d.ts +2 -0
- package/types/browser-ui/surface-renderer/plugins/export-controls/export-controls-plugin.d.ts +3 -1
- package/types/browser-ui/surface-renderer/plugins/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/list-manager/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/list-manager/list-manager-plugin.d.ts +34 -0
- package/types/browser-ui/surface-renderer/plugins/palette/palette-plugin.d.ts +2 -0
- package/types/browser-ui/surface-renderer/plugins/pan-buttons/pan-buttons-plugin.d.ts +1 -2
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/definitions.d.ts +9 -0
- package/types/browser-ui/surface-renderer/plugins/snaplines/snaplines-plugin.d.ts +12 -0
- package/types/browser-ui/surface-renderer/plugins/vertex-drawing/vertex-drawing-plugin.d.ts +0 -2
- package/types/browser-ui/surface-renderer/shape-palette-options.d.ts +5 -2
- package/types/browser-ui/surface-renderer/shape-palette.d.ts +1 -1
- package/types/browser-ui/surface-renderer/surface-render-options.d.ts +0 -30
- package/types/browser-ui/surface-renderer/surface.d.ts +47 -38
- package/types/browser-ui/svg-element-overlay.d.ts +1 -0
- package/types/browser-ui/svg-export/definitions.d.ts +12 -0
- package/types/browser-ui/svg-export/image-exporter.d.ts +2 -0
- package/types/browser-ui/svg-export/svg-exporter.d.ts +3 -0
- package/types/browser-ui/templating/custom-tag-definition.d.ts +1 -2
- package/types/browser-ui/util.d.ts +2 -0
- package/types/charts/bar-and-column/bar-plot.d.ts +2 -0
- package/types/charts/base-chart.d.ts +62 -6
- package/types/charts/chart-exporter.d.ts +3 -0
- package/types/charts/datasource.d.ts +11 -0
- package/types/charts/definitions.d.ts +10 -0
- package/types/charts/domain_scale_utilities.d.ts +4 -0
- package/types/charts/legend.d.ts +2 -0
- package/types/charts/pie/pie-chart.d.ts +2 -0
- package/types/charts/sankey/sankey.d.ts +1 -0
- package/types/charts/scatter/definitions.d.ts +1 -0
- package/types/charts/series/array-based-series.d.ts +2 -0
- package/types/charts/series/definitions.d.ts +1 -0
- package/types/charts/series/series.d.ts +2 -0
- package/types/charts/series-based-chart.d.ts +1 -0
- package/types/charts/tooltip.d.ts +7 -2
- package/types/charts/util.d.ts +10 -3
- package/types/core/autosaver.d.ts +2 -1
- package/types/core/csv-loader.d.ts +8 -2
- package/types/core/event-constants.d.ts +44 -2
- package/types/core/geom.d.ts +1 -0
- package/types/core/io.d.ts +31 -7
- package/types/core/layout/abstract-layout.d.ts +1 -0
- package/types/core/layout/grid/definitions.d.ts +10 -19
- package/types/core/layout/grid/grid-layout.d.ts +2 -2
- package/types/core/layout/hierarchy/util.d.ts +1 -7
- package/types/core/magnetizer.d.ts +1 -0
- package/types/core/model/anchor.d.ts +1 -0
- package/types/core/model/graph.d.ts +3 -11
- package/types/core/model/group-template.d.ts +15 -0
- package/types/core/params.d.ts +2 -2
- package/types/core/renderer.d.ts +3 -0
- package/types/core/rtree/rtree.d.ts +15 -0
- package/types/core/selection.d.ts +2 -6
- package/types/core/templates/core.d.ts +1 -1
- package/types/core/toolkit.d.ts +30 -10
- package/types/core/undo-redo/undo-redo.d.ts +0 -22
- package/types/core/util.d.ts +4 -1
- package/types/ui/common/overlay.d.ts +7 -1
- package/types/ui/common/paint-style.d.ts +2 -0
- package/types/ui/connector-orthogonal/operations.d.ts +1 -18
- package/types/ui/connector-orthogonal/utils.d.ts +0 -6
- package/types/ui/connector-straight/straight-connector.d.ts +2 -5
- package/types/ui/core/component/component.d.ts +1 -4
- package/types/ui/core/connector/connection-impl.d.ts +1 -0
- package/types/ui/core/connector/connections.d.ts +0 -29
- package/types/ui/core/connector/straight-segment.d.ts +0 -6
- package/types/ui/core/constants.d.ts +0 -4
- package/types/ui/core/core-events.d.ts +5 -3
- package/types/ui/core/core.d.ts +19 -21
- package/types/ui/core/defaults.d.ts +43 -9
- package/types/ui/core/definitions.d.ts +39 -20
- package/types/ui/core/event-constants.d.ts +1 -0
- package/types/ui/core/factory/continuous-anchors.d.ts +0 -6
- package/types/ui/core/grid-profile.d.ts +3 -1
- package/types/ui/core/magnetize-profile.d.ts +1 -3
- package/types/ui/core/overlay/custom-overlay.d.ts +28 -9
- package/types/ui/core/overlay/label-overlay.d.ts +3 -2
- package/types/ui/core/overlay/overlay.d.ts +5 -3
- package/types/ui/core/params.d.ts +12 -99
- package/types/ui/core/router/default-router.d.ts +89 -18
- package/types/ui/core/router/index.d.ts +0 -1
- package/types/ui/core/router/router-utils.d.ts +0 -24
- package/types/ui/core/router/router.d.ts +29 -20
- package/types/ui/core/type-descriptors.d.ts +2 -0
- package/types/ui/core/ui-model.d.ts +3 -0
- package/types/ui/core/view/edge-options.d.ts +5 -0
- package/types/ui/core/view/events.d.ts +22 -0
- package/types/ui/core/view/node-or-port-options.d.ts +6 -0
- package/types/ui/core/view/vertex-options.d.ts +2 -0
- package/types/ui/core/viewport.d.ts +7 -1
- package/types/ui/plugins/definitions.d.ts +6 -1
- package/types/ui/plugins/plugins.d.ts +4 -0
- package/types/ui/property-mappings/definitions.d.ts +6 -0
- package/types/ui/util/util.d.ts +3 -16
- package/types/version.d.ts +1 -1
- package/types/ui/core/router/base-router.d.ts +0 -100
|
@@ -2,6 +2,8 @@ import { EdgeMapping } from "../core";
|
|
|
2
2
|
/**
|
|
3
3
|
* A mapping of some property/properties to a set of appearance values. Currently only used by edges.
|
|
4
4
|
* @typeParam D Identifies the type that each mapping has. For instance, for {@link EdgePropertyMappings}, this type is {@link EdgeDefinition}.
|
|
5
|
+
* @group UI
|
|
6
|
+
* @category Definitions
|
|
5
7
|
*/
|
|
6
8
|
export interface PropertyMapping<D> {
|
|
7
9
|
/**
|
|
@@ -15,10 +17,14 @@ export interface PropertyMapping<D> {
|
|
|
15
17
|
}
|
|
16
18
|
/**
|
|
17
19
|
* A set of property mappings for edges.
|
|
20
|
+
* @group UI
|
|
21
|
+
* @category Definitions
|
|
18
22
|
*/
|
|
19
23
|
export type EdgePropertyMappings = Array<PropertyMapping<EdgeMapping>>;
|
|
20
24
|
/**
|
|
21
25
|
* A set of {@link PropertyMapping}s - currently only edges are supported, but future versions will support nodes, groups and ports
|
|
26
|
+
* @group UI
|
|
27
|
+
* @category Definitions
|
|
22
28
|
*/
|
|
23
29
|
export interface PropertyMappings {
|
|
24
30
|
/**
|
package/types/ui/util/util.d.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
8
|
import { PointXY, Size } from "../../core";
|
|
9
|
-
export declare function filterList(list: Array<any> | string, value: any, missingIsFalse?: boolean): boolean;
|
|
10
9
|
/**
|
|
11
10
|
* Equivalent of Object.assign, which IE11 does not support.
|
|
12
11
|
* @param o1
|
|
@@ -23,13 +22,6 @@ export interface RotatedPointXY extends PointXY {
|
|
|
23
22
|
cr: number;
|
|
24
23
|
sr: number;
|
|
25
24
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Internal method used to rotate an anchor orientation.
|
|
28
|
-
* @param orientation
|
|
29
|
-
* @param rotation
|
|
30
|
-
* @internal
|
|
31
|
-
*/
|
|
32
|
-
export declare function rotateAnchorOrientation(orientation: [number, number], rotation: any): [number, number];
|
|
33
25
|
/**
|
|
34
26
|
* Iterates through the given `obj` and applies the given function. if `obj` is not ArrayLike then the function is
|
|
35
27
|
* executed directly on `obj`.
|
|
@@ -46,24 +38,19 @@ export declare function each(obj: any, fn: Function): void;
|
|
|
46
38
|
* @internal
|
|
47
39
|
*/
|
|
48
40
|
export declare function wrap(wrappedFunction: Function, newFunction: Function, returnOnThisValue?: any): () => any;
|
|
49
|
-
/**
|
|
50
|
-
* A copy of a concept from a later version of Typescript than jsPlumb can currently use.
|
|
51
|
-
* @internal
|
|
52
|
-
*/
|
|
53
41
|
/**
|
|
54
42
|
* Defines a function that can be used to sort an array.
|
|
55
43
|
* @internal
|
|
56
44
|
*/
|
|
57
45
|
export type SortFunction<T> = (a: T, b: T) => number;
|
|
58
46
|
/**
|
|
59
|
-
* Definition of a function that can be used to constrain the movement of an element that is being dragged. The function is
|
|
60
|
-
* given the "desiredLoc", which is the location the element would be moved to if not constrained, and it is expected to return
|
|
61
|
-
* either some other value, meaning place the element at that position, or null, meaning for the given desired location there
|
|
62
|
-
* is no preferred position and the element should not be moved.
|
|
47
|
+
* Definition of a function that can be used to constrain the movement of an element that is being dragged. The function is given the "desiredLoc", which is the location the element would be moved to if not constrained, and it is expected to return either some other value, meaning place the element at that position, or null, meaning for the given desired location there is no preferred position and the element should not be moved.
|
|
63
48
|
*
|
|
64
49
|
* @param desiredLoc - Position the element will be placed at if unconstrained
|
|
65
50
|
* @param dragEl - the element that is being dragged
|
|
66
51
|
* @param size - The size of the element being dragged
|
|
67
52
|
* @param e - The event associated with this tick of the drag lifecycle.
|
|
53
|
+
* @group UI
|
|
54
|
+
* @category Definitions
|
|
68
55
|
*/
|
|
69
56
|
export type ConstrainFunction<EL, E> = (desiredLoc: PointXY, dragEl: EL, constrainRect: Size, size: Size, currentPos: PointXY, e: E) => PointXY;
|
package/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.1.1";
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { AnchorPlacement, Geometry, Edge } from "../../../core";
|
|
2
|
-
import { ConnectionDetachedParams } from "../callbacks";
|
|
3
|
-
import { RedrawResult, Router } from "./router";
|
|
4
|
-
import { Connection } from "../connector/connection-impl";
|
|
5
|
-
import { UICore } from "../core";
|
|
6
|
-
import { ViewportElement } from "../viewport";
|
|
7
|
-
import { AnchorSpec, Connector, AnchorComputeParams, LightweightAnchor, LightweightContinuousAnchor } from "../../common";
|
|
8
|
-
import { AStarGrid } from "../../../core";
|
|
9
|
-
import { ConnectorComputeParams } from "../connector/abstract-connector";
|
|
10
|
-
import { AnchorLists } from "./router-utils";
|
|
11
|
-
/**
|
|
12
|
-
* Base router options. Placeholder interface for subclasses.
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
export interface BaseRouterOptions {
|
|
16
|
-
gridCellSize?: number;
|
|
17
|
-
avoidVertices?: boolean;
|
|
18
|
-
vertexBuffer?: number;
|
|
19
|
-
vertexBorder?: number;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
export declare abstract class BaseRouter<EL> implements Router<EL, LightweightAnchor> {
|
|
25
|
-
instance: UICore<any, any>;
|
|
26
|
-
anchorLists: Map<string, AnchorLists>;
|
|
27
|
-
protected _avoidVertices: boolean;
|
|
28
|
-
protected _gridCellSize: number;
|
|
29
|
-
protected _vertexBuffer: number;
|
|
30
|
-
protected _vertexBorder: number;
|
|
31
|
-
protected _grid: AStarGrid;
|
|
32
|
-
protected constructor(instance: UICore<any, any>, options?: BaseRouterOptions);
|
|
33
|
-
/**
|
|
34
|
-
* Notification that a connection was removed.
|
|
35
|
-
* @param params
|
|
36
|
-
*/
|
|
37
|
-
$connectionRemoved(params: ConnectionDetachedParams<any>): void;
|
|
38
|
-
elementRemoved(el: ViewportElement<EL>): void;
|
|
39
|
-
private _removeConnection;
|
|
40
|
-
$connectionDetachedFromElement(connection: Connection<EL>, el: ViewportElement<any>): void;
|
|
41
|
-
/**
|
|
42
|
-
* Sets the current anchor index in an anchor that has more than one location
|
|
43
|
-
* @internal
|
|
44
|
-
* @param anchor
|
|
45
|
-
* @param idx
|
|
46
|
-
* @param connection
|
|
47
|
-
*/
|
|
48
|
-
$setCurrentLocation(anchor: LightweightAnchor, idx: number, connection?: Connection<any>): void;
|
|
49
|
-
/**
|
|
50
|
-
* Computes the position for an anchor that is neither floating nor continuous, or is currently fixed. This case
|
|
51
|
-
* covers what was previously both DynamicAnchor and Anchor, since those concepts have now been folded into
|
|
52
|
-
* a single concept - any given anchor has one or more locations.
|
|
53
|
-
* @param anchor
|
|
54
|
-
* @param params
|
|
55
|
-
*/
|
|
56
|
-
private _defaultAnchorCompute;
|
|
57
|
-
private _placeContinuousAnchors;
|
|
58
|
-
private _updateContinuousAnchorList;
|
|
59
|
-
/**
|
|
60
|
-
* Remove the given anchor from the continuous anchor lists. This method is invoked when a connection is detached.
|
|
61
|
-
* @param elementId
|
|
62
|
-
* @param anchor
|
|
63
|
-
* @private
|
|
64
|
-
* @internal
|
|
65
|
-
*/
|
|
66
|
-
$_removeAnchorFromAnchorLists(elementId: string, anchor: LightweightContinuousAnchor): void;
|
|
67
|
-
computeAnchorLocation(anchor: LightweightAnchor, params: AnchorComputeParams): AnchorPlacement;
|
|
68
|
-
computePath(connection: Connection<any>, timestamp: string): void;
|
|
69
|
-
abstract _doComputePath(connection: Connection<EL>, connector: Connector, params: ConnectorComputeParams, timestamp: string): Geometry;
|
|
70
|
-
abstract _doUpdatePath(connection: Connection<EL>, connector: Connector, params: ConnectorComputeParams, timestamp: string, sourceMoved: boolean, targetMoved: boolean): Geometry;
|
|
71
|
-
prepareAnchor(params: AnchorSpec | Array<AnchorSpec>): LightweightAnchor;
|
|
72
|
-
private _orientationCache;
|
|
73
|
-
private _orientationCacheTimestamp;
|
|
74
|
-
/**
|
|
75
|
-
* @internal
|
|
76
|
-
* @param c
|
|
77
|
-
* @private
|
|
78
|
-
*/
|
|
79
|
-
protected _computeObstaclePadding(c: Connector): number;
|
|
80
|
-
private _calculateOrientation;
|
|
81
|
-
/**
|
|
82
|
-
* Redraws every connection. Does not update element positions.
|
|
83
|
-
* @internal
|
|
84
|
-
*/
|
|
85
|
-
$redrawEveryConnection(): RedrawResult;
|
|
86
|
-
$redrawConnection(edge: Edge, timestamp?: string): RedrawResult;
|
|
87
|
-
/**
|
|
88
|
-
* Redraws connections for the given element. Does not update element positions.
|
|
89
|
-
* @internal
|
|
90
|
-
*/
|
|
91
|
-
$redraw(viewportElement: ViewportElement<EL>, timestamp?: string): RedrawResult;
|
|
92
|
-
/**
|
|
93
|
-
* Redraws a list of connections. Does not update element positions.
|
|
94
|
-
* @internal
|
|
95
|
-
*/
|
|
96
|
-
private _redrawConnections;
|
|
97
|
-
reset(): void;
|
|
98
|
-
setConnectionAnchors(conn: Connection<any>, anchors: [LightweightAnchor, LightweightAnchor]): void;
|
|
99
|
-
private _anchorSelector;
|
|
100
|
-
}
|