@mindfusion/graphs 4.0.5-beta.3 → 4.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/graphs.d.mts CHANGED
@@ -830,6 +830,7 @@ declare module "Graphs/PathFinder" {
830
830
  static findPaths(graph: any, from: any, to: any, shortestOnly: any, maxPaths: any): Path[];
831
831
  static findShortestPath(graph: any, from: any, to: any, useNodeWeights: any, useLinkWeights: any): Path;
832
832
  static findLongestPath(graph: any, from: any, to: any): Path;
833
+ static findLongUndirectedPath(graph: any, timeLimit: any): any;
833
834
  static findCycle(graph: any, participant: any): Path;
834
835
  static enumAllCycles(graph: any): any[];
835
836
  static enumAllCyclesDirected(graph: any, callbackEnum: any): void;
@@ -1188,6 +1189,8 @@ declare module "Graphs/LayeredLayout" {
1188
1189
  */
1189
1190
  arrange(graph: any): void;
1190
1191
  graph: any;
1192
+ reversedEdges: any;
1193
+ assignLayers(): void;
1191
1194
  layers: any[];
1192
1195
  /**
1193
1196
  * @private
@@ -1344,6 +1347,22 @@ declare module "Graphs/LayeredLayout" {
1344
1347
  _layerDistance: number;
1345
1348
  _direction: number;
1346
1349
  _siftingRounds: number;
1350
+ set startNode(arg: any);
1351
+ /**
1352
+ * Gets or sets the node that should be placed in the first layer of the arranged graph.
1353
+ * @type {DiagramNode}
1354
+ * @summary A DiagramNode object representing the start node.
1355
+ */
1356
+ get startNode(): any;
1357
+ _startNode: any;
1358
+ set endNode(arg: any);
1359
+ /**
1360
+ * Gets or sets the node that should be placed in the last layer of the arranged graph.
1361
+ * @type {DiagramNode}
1362
+ * @summary A DiagramNode object representing the end node.
1363
+ */
1364
+ get endNode(): any;
1365
+ _endNode: any;
1347
1366
  }
1348
1367
  import { Layout } from "Graphs/Layout";
1349
1368
  }
@@ -1980,6 +1999,93 @@ declare module "Graphs/RadialTreeLayout" {
1980
1999
  import { Layout } from "Graphs/Layout";
1981
2000
  import TreeHelper from "Graphs/TreeHelper";
1982
2001
  }
2002
+ declare module "Graphs/AdjacencyMatrix" {
2003
+ export default AdjacencyMatrix;
2004
+ class AdjacencyMatrix {
2005
+ constructor(graph: any);
2006
+ adjacent: Grid;
2007
+ edge: Grid;
2008
+ }
2009
+ import { Grid } from "@mindfusion/collections";
2010
+ }
2011
+ declare module "Graphs/GridLayout" {
2012
+ /**
2013
+ * @class Implements a grid graph layout algorithm.
2014
+ * @augments Layout
2015
+ */
2016
+ export class GridLayout extends Layout {
2017
+ set startNode(arg: any);
2018
+ /**
2019
+ * Gets or sets the node that is placed at the upper left corner of the grid.
2020
+ * @type {DiagramNode}
2021
+ * @summary An instance of the DiagramNode class. The default is null.
2022
+ */
2023
+ get startNode(): any;
2024
+ set endNode(arg: any);
2025
+ /**
2026
+ * Gets or sets the node that is placed at the lower right corner of the grid.
2027
+ * @type {DiagramNode}
2028
+ * @summary An instance of the DiagramNode class. Default value is null.
2029
+ */
2030
+ get endNode(): any;
2031
+ set iterations(arg: number);
2032
+ /**
2033
+ * Gets or sets for how many iterations to run the grid layout algorithm.
2034
+ * @type {Number}
2035
+ * @summary An integer number specifying the number of iterations. The default is 3000.
2036
+ */
2037
+ get iterations(): number;
2038
+ set gridSize(arg: number);
2039
+ /**
2040
+ * Gets or sets the desired distance between adjacent grid points.
2041
+ * @type {Number}
2042
+ * @summary A number specifying the grid size. The default is 25.
2043
+ */
2044
+ get gridSize(): number;
2045
+ set timeLimit(arg: number);
2046
+ /**
2047
+ * Gets or sets a time-out value for the path-finding part of the grid layout algorithm.
2048
+ * @type {Number}
2049
+ * @summary An integer value specifying time-out in milliseconds. The default is 10000 (10 seconds).
2050
+ */
2051
+ get timeLimit(): number;
2052
+ set useLongestPath(arg: boolean);
2053
+ /**
2054
+ * Gets or sets a value indicating whether the algorithm should arrange nodes around the longest path in the graph.
2055
+ * @type {Boolean}
2056
+ * @summary true to look for the longest path in the graph and arrange nodes around it; otherwise, false.
2057
+ */
2058
+ get useLongestPath(): boolean;
2059
+ /**
2060
+ * Applies the layout to the specified graph.
2061
+ * @param {Graph} graph The graph to arrange.
2062
+ */
2063
+ arrange(graph: any): void;
2064
+ graph: any;
2065
+ adjacencyMatrix: AdjacencyMatrix;
2066
+ backbone: any[];
2067
+ countIterations(maxShift: any): number;
2068
+ initGrid(): Grid;
2069
+ gridWidth: number;
2070
+ gridHeight: number;
2071
+ scrambleGrid(grid: any, maxShift: any, iter: any): any;
2072
+ calcLinkDir(node: any): Vector;
2073
+ scrambleGridStep(newGrid: any, maxShift: any, iter: any, i: any, j: any): void;
2074
+ evaluateGrid(grid: any, maxShift: any): number;
2075
+ applyGrid(grid: any): void;
2076
+ placeObjects(grid: any): void;
2077
+ _startNode: any;
2078
+ _endNode: any;
2079
+ _iterations: number;
2080
+ _gridSize: number;
2081
+ _timeLimit: number;
2082
+ _useLongestPath: boolean;
2083
+ }
2084
+ import { Layout } from "Graphs/Layout";
2085
+ import AdjacencyMatrix from "Graphs/AdjacencyMatrix";
2086
+ import { Grid } from "@mindfusion/collections";
2087
+ import { Vector } from "@mindfusion/drawing";
2088
+ }
1983
2089
  declare module "@mindfusion/graphs" {
1984
2090
  import { AssistantPosition, AssistantType, Anchoring, LayoutDirection, TreeLayoutLinkType, MultipleGraphsPlacement, Orientation } from "Graphs/Enum";
1985
2091
  export { AssistantPosition, AssistantType, Anchoring, LayoutDirection, TreeLayoutLinkType, MultipleGraphsPlacement, Orientation };
@@ -1995,4 +2101,5 @@ declare module "@mindfusion/graphs" {
1995
2101
  export { TreeMapLayout } from "Graphs/TreeMapLayout";
1996
2102
  export { OrthogonalLayout } from "Graphs/OrthogonalLayout";
1997
2103
  export { RadialTreeLayout } from "Graphs/RadialTreeLayout";
2104
+ export { GridLayout } from "Graphs/GridLayout";
1998
2105
  }
package/graphs.d.ts CHANGED
@@ -830,6 +830,7 @@ declare module "Graphs/PathFinder" {
830
830
  static findPaths(graph: any, from: any, to: any, shortestOnly: any, maxPaths: any): Path[];
831
831
  static findShortestPath(graph: any, from: any, to: any, useNodeWeights: any, useLinkWeights: any): Path;
832
832
  static findLongestPath(graph: any, from: any, to: any): Path;
833
+ static findLongUndirectedPath(graph: any, timeLimit: any): any;
833
834
  static findCycle(graph: any, participant: any): Path;
834
835
  static enumAllCycles(graph: any): any[];
835
836
  static enumAllCyclesDirected(graph: any, callbackEnum: any): void;
@@ -1188,6 +1189,8 @@ declare module "Graphs/LayeredLayout" {
1188
1189
  */
1189
1190
  arrange(graph: any): void;
1190
1191
  graph: any;
1192
+ reversedEdges: any;
1193
+ assignLayers(): void;
1191
1194
  layers: any[];
1192
1195
  /**
1193
1196
  * @private
@@ -1344,6 +1347,22 @@ declare module "Graphs/LayeredLayout" {
1344
1347
  _layerDistance: number;
1345
1348
  _direction: number;
1346
1349
  _siftingRounds: number;
1350
+ set startNode(arg: any);
1351
+ /**
1352
+ * Gets or sets the node that should be placed in the first layer of the arranged graph.
1353
+ * @type {DiagramNode}
1354
+ * @summary A DiagramNode object representing the start node.
1355
+ */
1356
+ get startNode(): any;
1357
+ _startNode: any;
1358
+ set endNode(arg: any);
1359
+ /**
1360
+ * Gets or sets the node that should be placed in the last layer of the arranged graph.
1361
+ * @type {DiagramNode}
1362
+ * @summary A DiagramNode object representing the end node.
1363
+ */
1364
+ get endNode(): any;
1365
+ _endNode: any;
1347
1366
  }
1348
1367
  import { Layout } from "Graphs/Layout";
1349
1368
  }
@@ -1980,6 +1999,93 @@ declare module "Graphs/RadialTreeLayout" {
1980
1999
  import { Layout } from "Graphs/Layout";
1981
2000
  import TreeHelper from "Graphs/TreeHelper";
1982
2001
  }
2002
+ declare module "Graphs/AdjacencyMatrix" {
2003
+ export default AdjacencyMatrix;
2004
+ class AdjacencyMatrix {
2005
+ constructor(graph: any);
2006
+ adjacent: Grid;
2007
+ edge: Grid;
2008
+ }
2009
+ import { Grid } from "@mindfusion/collections";
2010
+ }
2011
+ declare module "Graphs/GridLayout" {
2012
+ /**
2013
+ * @class Implements a grid graph layout algorithm.
2014
+ * @augments Layout
2015
+ */
2016
+ export class GridLayout extends Layout {
2017
+ set startNode(arg: any);
2018
+ /**
2019
+ * Gets or sets the node that is placed at the upper left corner of the grid.
2020
+ * @type {DiagramNode}
2021
+ * @summary An instance of the DiagramNode class. The default is null.
2022
+ */
2023
+ get startNode(): any;
2024
+ set endNode(arg: any);
2025
+ /**
2026
+ * Gets or sets the node that is placed at the lower right corner of the grid.
2027
+ * @type {DiagramNode}
2028
+ * @summary An instance of the DiagramNode class. Default value is null.
2029
+ */
2030
+ get endNode(): any;
2031
+ set iterations(arg: number);
2032
+ /**
2033
+ * Gets or sets for how many iterations to run the grid layout algorithm.
2034
+ * @type {Number}
2035
+ * @summary An integer number specifying the number of iterations. The default is 3000.
2036
+ */
2037
+ get iterations(): number;
2038
+ set gridSize(arg: number);
2039
+ /**
2040
+ * Gets or sets the desired distance between adjacent grid points.
2041
+ * @type {Number}
2042
+ * @summary A number specifying the grid size. The default is 25.
2043
+ */
2044
+ get gridSize(): number;
2045
+ set timeLimit(arg: number);
2046
+ /**
2047
+ * Gets or sets a time-out value for the path-finding part of the grid layout algorithm.
2048
+ * @type {Number}
2049
+ * @summary An integer value specifying time-out in milliseconds. The default is 10000 (10 seconds).
2050
+ */
2051
+ get timeLimit(): number;
2052
+ set useLongestPath(arg: boolean);
2053
+ /**
2054
+ * Gets or sets a value indicating whether the algorithm should arrange nodes around the longest path in the graph.
2055
+ * @type {Boolean}
2056
+ * @summary true to look for the longest path in the graph and arrange nodes around it; otherwise, false.
2057
+ */
2058
+ get useLongestPath(): boolean;
2059
+ /**
2060
+ * Applies the layout to the specified graph.
2061
+ * @param {Graph} graph The graph to arrange.
2062
+ */
2063
+ arrange(graph: any): void;
2064
+ graph: any;
2065
+ adjacencyMatrix: AdjacencyMatrix;
2066
+ backbone: any[];
2067
+ countIterations(maxShift: any): number;
2068
+ initGrid(): Grid;
2069
+ gridWidth: number;
2070
+ gridHeight: number;
2071
+ scrambleGrid(grid: any, maxShift: any, iter: any): any;
2072
+ calcLinkDir(node: any): Vector;
2073
+ scrambleGridStep(newGrid: any, maxShift: any, iter: any, i: any, j: any): void;
2074
+ evaluateGrid(grid: any, maxShift: any): number;
2075
+ applyGrid(grid: any): void;
2076
+ placeObjects(grid: any): void;
2077
+ _startNode: any;
2078
+ _endNode: any;
2079
+ _iterations: number;
2080
+ _gridSize: number;
2081
+ _timeLimit: number;
2082
+ _useLongestPath: boolean;
2083
+ }
2084
+ import { Layout } from "Graphs/Layout";
2085
+ import AdjacencyMatrix from "Graphs/AdjacencyMatrix";
2086
+ import { Grid } from "@mindfusion/collections";
2087
+ import { Vector } from "@mindfusion/drawing";
2088
+ }
1983
2089
  declare module "@mindfusion/graphs" {
1984
2090
  import { AssistantPosition, AssistantType, Anchoring, LayoutDirection, TreeLayoutLinkType, MultipleGraphsPlacement, Orientation } from "Graphs/Enum";
1985
2091
  export { AssistantPosition, AssistantType, Anchoring, LayoutDirection, TreeLayoutLinkType, MultipleGraphsPlacement, Orientation };
@@ -1995,4 +2101,5 @@ declare module "@mindfusion/graphs" {
1995
2101
  export { TreeMapLayout } from "Graphs/TreeMapLayout";
1996
2102
  export { OrthogonalLayout } from "Graphs/OrthogonalLayout";
1997
2103
  export { RadialTreeLayout } from "Graphs/RadialTreeLayout";
2104
+ export { GridLayout } from "Graphs/GridLayout";
1998
2105
  }
package/package.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "author": {
3
3
  "name": "MindFusion LLC",
4
4
  "email": "info@mindfusion.eu",
5
- "url": "https://mindfusion.eu"
5
+ "url": "https://mindfusion.dev"
6
6
  },
7
- "version": "4.0.5-beta.3",
7
+ "version": "4.1.1",
8
8
  "description": "Graphs for @mindfusion/diagramming",
9
9
  "keywords": [
10
10
  "graphs library"
@@ -35,7 +35,7 @@
35
35
  "license": "SEE LICENSE IN LICENSE.txt",
36
36
  "types": "graphs.d.ts",
37
37
  "dependencies": {
38
- "@mindfusion/collections": "^4.0.0",
39
- "@mindfusion/drawing": "4.1.1-beta.3"
38
+ "@mindfusion/collections": "^4.1.0",
39
+ "@mindfusion/drawing": "^4.3.0"
40
40
  }
41
41
  }