From 1a34b71e4853e787e1baeafa1751f5647225d669 Mon Sep 17 00:00:00 2001 From: Georgina Serra Date: Tue, 3 Nov 2020 19:09:25 +0100 Subject: [PATCH 1/6] Changing the package name in the package.json file --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 88a690a4..d5b15a44 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "@georginaso/react-flow-chart", + "name": "@futureworkshops/react-flow-chart", "version": "0.0.13", "description": "A flexible, stateless flow chart library for react.", "main": "src/index.js", - "repository": "git@github.com:georginaso/react-flow-chart.git", + "repository": "git@github.com:FutureWorkshops/react-flow-chart.git", "author": "Georgina Serra ", "license": "MIT", "devDependencies": { From 5e6c8fe7057148a0219b9d16afd43992e2742fd7 Mon Sep 17 00:00:00 2001 From: Georgina Serra Date: Tue, 3 Nov 2020 19:21:14 +0100 Subject: [PATCH 2/6] Set initial version --- package-lock.json | 4 ++-- package.json | 2 +- src/container/utils/mapValues.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9fb26ea4..0201c0c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "@mrblenny/react-flow-chart", - "version": "0.0.13", + "name": "@futureworkshops/react-flow-chart", + "version": "0.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d5b15a44..5127a9ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@futureworkshops/react-flow-chart", - "version": "0.0.13", + "version": "0.0.0", "description": "A flexible, stateless flow chart library for react.", "main": "src/index.js", "repository": "git@github.com:FutureWorkshops/react-flow-chart.git", diff --git a/src/container/utils/mapValues.ts b/src/container/utils/mapValues.ts index 9f3609b5..154adc94 100644 --- a/src/container/utils/mapValues.ts +++ b/src/container/utils/mapValues.ts @@ -1,7 +1,7 @@ export default function mapValues< Obj extends object, Res extends { [key in keyof Obj]: any } -> (o: Obj, func: (value: Obj[keyof Obj]) => Res[keyof Obj]) { +> (o: Obj, func: (value: Obj[keyof Obj]) => any) { const res: Res = {} as any for (const key in o) { if (o.hasOwnProperty(key)) { From 1b5058cd92e8e648950ed814d8bc0a5c1a2e5deb Mon Sep 17 00:00:00 2001 From: Georgina Serra Date: Mon, 10 May 2021 14:20:57 +0200 Subject: [PATCH 3/6] Adding the atribute linkStrokeDasharray --- src/components/Link/Link.default.tsx | 9 +- stories/LinkStrokeDasharray.tsx | 138 +++++++++++++++++++++++++++ stories/index.tsx | 2 + 3 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 stories/LinkStrokeDasharray.tsx diff --git a/src/components/Link/Link.default.tsx b/src/components/Link/Link.default.tsx index 90f5f1fc..d0dcd9cd 100644 --- a/src/components/Link/Link.default.tsx +++ b/src/components/Link/Link.default.tsx @@ -47,10 +47,10 @@ export const LinkDefault = ({ : generateRightAnglePath(startPos, endPos) : generateCurvePath(startPos, endPos); - const linkColor: string = - (fromPort.properties && fromPort.properties.linkColor) || "cornflowerblue"; - const linkStrokeWidth: string = - (fromPort.properties && fromPort.properties.linkStrokeWidth) || "3"; + const linkColor: string = fromPort?.properties?.linkColor || "cornflowerblue"; + const linkStrokeWidth: string = fromPort?.properties?.linkStrokeWidth || "3"; + const linkStrokeDasharray: string = + fromPort?.properties?.linkStrokeDasharray || "none"; return ( {/* Thick line to make selection easier */} { + return ( + + + + ); +}; diff --git a/stories/index.tsx b/stories/index.tsx index 31c43c4d..61a9d51e 100644 --- a/stories/index.tsx +++ b/stories/index.tsx @@ -13,6 +13,7 @@ import { ExternalReactState } from "./ExternalReactState"; import { InternalReactState } from "./InternalReactState"; import { LinkColors } from "./LinkColors"; import { LinkStrokeWidths } from "./LinkStrokeWidths"; +import { LinkStrokeDasharray } from "./LinkStrokeDasharray"; import { ReadonlyMode } from "./ReadonlyMode"; import { SelectedSidebar } from "./SelectedSidebar"; import { SmartRouting } from "./SmartRouting"; @@ -30,6 +31,7 @@ storiesOf("Custom Components", module) .add("Canvas Outer", CustomCanvasOuterDemo) .add("Canvas Link", () => ) .add("Link Colors", () => ) + .add("Link Dotted", () => ) .add("Link Stroke Widths", () => ); storiesOf("Stress Testing", module).add("default", StressTestDemo); From a9205da8654477ab56352bfc240ef5b7d90d57c8 Mon Sep 17 00:00:00 2001 From: Georgina Serra Date: Mon, 10 May 2021 14:57:47 +0200 Subject: [PATCH 4/6] Update the package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5127a9ec..f7877591 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@futureworkshops/react-flow-chart", - "version": "0.0.0", + "version": "0.1.0", "description": "A flexible, stateless flow chart library for react.", "main": "src/index.js", "repository": "git@github.com:FutureWorkshops/react-flow-chart.git", From c7e08be46fa2f4bf7242bbb5eb39f7936a16593f Mon Sep 17 00:00:00 2001 From: Georgina Serra Date: Mon, 10 May 2021 16:37:38 +0200 Subject: [PATCH 5/6] Fix build error --- package.json | 2 +- src/components/Link/Link.default.tsx | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index f7877591..4f36a0d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@futureworkshops/react-flow-chart", - "version": "0.1.0", + "version": "0.1.1", "description": "A flexible, stateless flow chart library for react.", "main": "src/index.js", "repository": "git@github.com:FutureWorkshops/react-flow-chart.git", diff --git a/src/components/Link/Link.default.tsx b/src/components/Link/Link.default.tsx index d0dcd9cd..740fb425 100644 --- a/src/components/Link/Link.default.tsx +++ b/src/components/Link/Link.default.tsx @@ -47,10 +47,12 @@ export const LinkDefault = ({ : generateRightAnglePath(startPos, endPos) : generateCurvePath(startPos, endPos); - const linkColor: string = fromPort?.properties?.linkColor || "cornflowerblue"; - const linkStrokeWidth: string = fromPort?.properties?.linkStrokeWidth || "3"; + const linkColor: string = + (fromPort.properties && fromPort.properties.linkColor) || "cornflowerblue"; + const linkStrokeWidth: string = + (fromPort.properties && fromPort.properties.linkStrokeWidth) || "3"; const linkStrokeDasharray: string = - fromPort?.properties?.linkStrokeDasharray || "none"; + (fromPort.properties && fromPort.properties.linkStrokeDasharray) || "none"; return ( Date: Mon, 10 May 2021 16:38:57 +0200 Subject: [PATCH 6/6] Change version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4f36a0d1..e9c11979 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@futureworkshops/react-flow-chart", - "version": "0.1.1", + "version": "0.1.2", "description": "A flexible, stateless flow chart library for react.", "main": "src/index.js", "repository": "git@github.com:FutureWorkshops/react-flow-chart.git",