@yworks/react-yfiles-company-ownership 2.0.0 → 2.1.0
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
CHANGED
|
@@ -26,12 +26,12 @@ You can learn how to work with the yFiles npm module in our [Developer’s Guide
|
|
|
26
26
|
In addition to yFiles, the Company Ownership component requires React to be installed in your project.
|
|
27
27
|
If you want to start your project from scratch, we recommend using vite:
|
|
28
28
|
```
|
|
29
|
-
npm create vite@
|
|
29
|
+
npm create vite@latest my-company-ownership-app -- --template react-ts
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Add the yFiles dependency:
|
|
33
33
|
```
|
|
34
|
-
npm install <yFiles package path>/lib/yfiles-30.0.
|
|
34
|
+
npm install <yFiles package path>/lib-dev/yfiles-30.0.4+dev.tgz
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
<details>
|
|
@@ -41,9 +41,9 @@ You can learn how to work with the yFiles npm module in our [Developer’s Guide
|
|
|
41
41
|
|
|
42
42
|
```json
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"react": "^
|
|
45
|
-
"react-dom": "^
|
|
46
|
-
"@yfiles/yfiles": "./lib/yfiles-30.0.
|
|
44
|
+
"react": "^19.2.0",
|
|
45
|
+
"react-dom": "^19.2.0",
|
|
46
|
+
"@yfiles/yfiles": "./lib-dev/yfiles-30.0.4+dev.tgz"
|
|
47
47
|
}
|
|
48
48
|
```
|
|
49
49
|
</details>
|
|
@@ -154,7 +154,7 @@ type CompanyOwnershipData<TEntity extends Entity = Entity, TConnection extends C
|
|
|
154
154
|
type LayoutDirection = 'left-to-right' | 'right-to-left' | 'top-to-bottom' | 'bottom-to-top';
|
|
155
155
|
/**
|
|
156
156
|
* Style describing the visual representation of an edge in the graph.
|
|
157
|
-
* See {@link https://docs.yworks.com/yfileshtml/#/api/
|
|
157
|
+
* See {@link https://docs.yworks.com/yfileshtml/#/api/HierarchicalLayoutEdgeRoutingStyle}
|
|
158
158
|
*/
|
|
159
159
|
type EdgeRoutingStyle = 'orthogonal' | 'curved' | 'octilinear' | 'polyline';
|
|
160
160
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@yfiles/yfiles';
|
|
2
|
-
export { r as createLayout, i as initializeWebWorker } from './WebWorkerSupport
|
|
2
|
+
export { r as createLayout, i as initializeWebWorker } from './WebWorkerSupport-Dx-6m29c.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@yworks/react-yfiles-core';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
3
|
import { GraphComponent } from '@yfiles/yfiles';
|
|
4
|
-
import { JSX
|
|
4
|
+
import { JSX } from 'react';
|
|
5
5
|
import { PropsWithChildren } from 'react';
|
|
6
6
|
import * as react from 'react';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -451,7 +451,7 @@ export declare interface ControlButton {
|
|
|
451
451
|
/**
|
|
452
452
|
* The url or element to be used as the button icon.
|
|
453
453
|
*/
|
|
454
|
-
icon?: string |
|
|
454
|
+
icon?: string | JSX.Element;
|
|
455
455
|
/**
|
|
456
456
|
* The class name to style the control button.
|
|
457
457
|
*/
|
|
@@ -554,7 +554,7 @@ export declare function DefaultControlButtons(): ControlButton[];
|
|
|
554
554
|
|
|
555
555
|
/**
|
|
556
556
|
* Style describing the visual representation of an edge in the graph.
|
|
557
|
-
* See {@link https://docs.yworks.com/yfileshtml/#/api/
|
|
557
|
+
* See {@link https://docs.yworks.com/yfileshtml/#/api/HierarchicalLayoutEdgeRoutingStyle}
|
|
558
558
|
*/
|
|
559
559
|
export declare type EdgeRoutingStyle = 'orthogonal' | 'curved' | 'octilinear' | 'polyline';
|
|
560
560
|
|
package/dist/index.js
CHANGED
|
@@ -945,6 +945,10 @@ var CompanyOwnershipProvider = withGraphComponentProvider(
|
|
|
945
945
|
return children;
|
|
946
946
|
}
|
|
947
947
|
const CompanyOwnership2 = useMemo(() => {
|
|
948
|
+
const previousModel = graphComponent.htmlElement["companyOwnerhsip"];
|
|
949
|
+
if (previousModel) {
|
|
950
|
+
return previousModel;
|
|
951
|
+
}
|
|
948
952
|
const fullGraph = new Graph2();
|
|
949
953
|
graphComponent.htmlElement.style.backgroundColor = componentBackgroundColor;
|
|
950
954
|
graphComponent.viewportLimiter.policy = ViewportLimitingPolicy.WITHIN_MARGINS;
|
|
@@ -954,7 +958,13 @@ var CompanyOwnershipProvider = withGraphComponentProvider(
|
|
|
954
958
|
const layoutSupport = new LayoutSupport(graphComponent);
|
|
955
959
|
const collapsibleTree = new CollapsibleTree(graphComponent, fullGraph, layoutSupport);
|
|
956
960
|
graphComponent.graph = collapsibleTree.filteredGraph;
|
|
957
|
-
|
|
961
|
+
const companyOwnerShipModel = createCompanyOwnershipModel(
|
|
962
|
+
graphComponent,
|
|
963
|
+
collapsibleTree,
|
|
964
|
+
layoutSupport
|
|
965
|
+
);
|
|
966
|
+
graphComponent.htmlElement["companyOwnerhsip"] = companyOwnerShipModel;
|
|
967
|
+
return companyOwnerShipModel;
|
|
958
968
|
}, []);
|
|
959
969
|
return /* @__PURE__ */ jsx(CompanyOwnershipContext.Provider, { value: CompanyOwnership2, children });
|
|
960
970
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yworks/react-yfiles-company-ownership",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "yFiles for HTML team @ yWorks GmbH",
|
|
6
6
|
"email": "yfileshtml@yworks.com"
|
|
@@ -43,19 +43,19 @@
|
|
|
43
43
|
"build": "tsup --clean --dts --format esm --entry.index src/index.ts --entry.WebWorkerSupport src/core/WebWorkerSupport.ts && api-extractor run --local"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"react": "
|
|
47
|
-
"react-dom": "
|
|
46
|
+
"react": ">=18",
|
|
47
|
+
"react-dom": ">=18",
|
|
48
48
|
"@yfiles/yfiles": ">=30"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@microsoft/api-extractor": "^7.
|
|
52
|
-
"@types/react": "
|
|
53
|
-
"@types/react-dom": "
|
|
54
|
-
"tsup": "^8.
|
|
55
|
-
"typescript": "^5.3
|
|
51
|
+
"@microsoft/api-extractor": "^7.55.2",
|
|
52
|
+
"@types/react": ">=18",
|
|
53
|
+
"@types/react-dom": ">=18",
|
|
54
|
+
"tsup": "^8.5.1",
|
|
55
|
+
"typescript": "^5.9.3"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@yworks/react-yfiles-core": "^3.
|
|
58
|
+
"@yworks/react-yfiles-core": "^3.1.0"
|
|
59
59
|
},
|
|
60
60
|
"files": [
|
|
61
61
|
"LICENSE",
|