Skip to content

Commit 1cc4d99

Browse files
committed
...
1 parent 3181f06 commit 1cc4d99

File tree

23 files changed

+16
-116
lines changed

23 files changed

+16
-116
lines changed

packages/graph/src/store/block/BlocksList.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { Graph } from "../../graph";
77
import { MultipleSelectionBucket } from "../../services/selection/MultipleSelectionBucket";
88
import { SingleSelectionBucket } from "../../services/selection/SingleSelectionBucket";
99
import { ESelectionStrategy } from "../../services/selection/types";
10-
import { isNonEmpty } from "../../utils/functions";
1110
import { AnchorState } from "../anchor/Anchor";
1211
import { RootStore } from "../index";
1312

packages/graph/src/store/settings.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import merge from "lodash/merge";
55
import { Block } from "../components/canvas/blocks/Block";
66
import { BaseConnection } from "../components/canvas/connections";
77
import { Component } from "../lib";
8-
import { Constructor } from "../utils";
8+
import { ComponentConstructor } from "../lib/CoreComponent";
99

1010
import { RootStore } from "./index";
1111

@@ -41,8 +41,8 @@ export type TGraphSettingsConfig = {
4141
* Please use connection component instead
4242
*/
4343
showConnectionLabels: boolean;
44-
blockComponents: Record<string, Constructor<Block>>;
45-
connection?: Constructor<BaseConnection>;
44+
blockComponents: Record<string, ComponentConstructor<Block>>;
45+
connection?: ComponentConstructor<BaseConnection>;
4646
background?: typeof Component;
4747
/**
4848
* Constrain camera movement and zoom to keep the graph content visible.

packages/react/src/BlocksList.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
TBlock,
1111
debounce,
1212
} from "@gravity-ui/graph";
13+
1314
import { useSignal } from "./hooks";
1415
import { useGraphEvent } from "./hooks/useGraphEvents";
1516
import { useCompareState } from "./utils/hooks/useCompareState";

packages/stories/src/Playground/GraphPlayground.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ const config: HookGraphParams = {
9797
useBlocksAnchors: true,
9898
showConnectionLabels: false,
9999
blockComponents: {
100-
[GravityActionBlockIS]: ActionBlock,
101-
[GravityTextBlockIS]: TextBlock,
100+
[GravityActionBlockIS]: ActionBlock as any,
101+
[GravityTextBlockIS]: TextBlock as any,
102102
},
103103
},
104104
};

packages/stories/src/api/startStopGraph/startStop.stories.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ let initialized = false;
1616
const GraphApp = () => {
1717
const exampleGraph = useMemo(() => {
1818
return new Graph({
19-
configurationName: "start-stop",
2019
blocks: config.blocks,
2120
connections: config.connections,
2221
settings: config.settings,

packages/stories/src/api/updateConnection/config.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { TGraphConfig } from "@gravity-ui/graph";
33
import { storiesSettings } from "../../configurations/definitions";
44

55
export const graphConfig: TGraphConfig = {
6-
configurationName: "simple",
76
blocks: [
87
{
98
x: 265,
@@ -64,11 +63,4 @@ export const graphConfig: TGraphConfig = {
6463
...storiesSettings,
6564
useBezierConnections: true,
6665
},
67-
cameraScale: 0.5,
68-
rect: {
69-
x: -156,
70-
y: 0,
71-
width: 631,
72-
height: 494,
73-
},
7466
};

src/stories/api/zoomToElements/zoomToElements.stories.tsx renamed to packages/stories/src/api/zoomToElements/zoomToElements.stories.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import React, { useCallback, useEffect, useRef, useState } from "react";
22

3+
import { Graph, GraphComponent } from "@gravity-ui/graph";
34
import { Button, ButtonButtonProps, Flex, Text, TextInput, ThemeProvider } from "@gravity-ui/uikit";
45
import type { Meta, StoryFn } from "@storybook/react-webpack5";
56

6-
import { GraphComponent } from "../../../components/canvas/GraphComponent";
7-
import { Graph } from "../../../graph";
87
import { generatePrettyBlocks } from "../../configurations/generatePretty";
98
import { GraphComponentStory } from "../../main/GraphEditor";
109

packages/stories/src/configurations/CustomLayerConfig.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { ToolboxLayer } from "../main/ToolboxLayer";
55
import { storiesSettings } from "./definitions";
66

77
export const CustomLayerConfig: TGraphConfig = {
8-
configurationName: "simple",
98
blocks: [
109
{
1110
x: 265,
@@ -20,13 +19,6 @@ export const CustomLayerConfig: TGraphConfig = {
2019
},
2120
],
2221
connections: [],
23-
cameraScale: 0.9,
24-
rect: {
25-
x: -156,
26-
y: 0,
27-
width: 631,
28-
height: 494,
29-
},
3022
settings: storiesSettings,
3123
layers: [[ToolboxLayer, {}]],
3224
};

packages/stories/src/configurations/bezierConnection.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { TGraphConfig } from "@gravity-ui/graph";
33
import { storiesSettings } from "./definitions";
44

55
export const oneBezierConnectionConfig: TGraphConfig = {
6-
configurationName: "simple",
76
blocks: [
87
{
98
x: 265,
@@ -38,11 +37,4 @@ export const oneBezierConnectionConfig: TGraphConfig = {
3837
...storiesSettings,
3938
useBezierConnections: true,
4039
},
41-
cameraScale: 0.5,
42-
rect: {
43-
x: -156,
44-
y: 0,
45-
width: 631,
46-
height: 494,
47-
},
4840
};

packages/stories/src/configurations/coloredConnections.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { TGraphConfig } from "@gravity-ui/graph";
33
import { storiesSettings } from "./definitions";
44

55
export const coloredConnections: TGraphConfig = {
6-
configurationName: "simple",
76
blocks: [
87
{
98
x: 265,
@@ -95,11 +94,4 @@ export const coloredConnections: TGraphConfig = {
9594
...storiesSettings,
9695
useBezierConnections: true,
9796
},
98-
cameraScale: 0.5,
99-
rect: {
100-
x: -156,
101-
y: 0,
102-
width: 631,
103-
height: 494,
104-
},
10597
};

0 commit comments

Comments
 (0)