-
Notifications
You must be signed in to change notification settings - Fork 3
Change/upgraded to react18 CMEM-6639 #335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
ad360d9
f8a22eb
919bca3
ef6fede
f8edf61
e7ab6a0
2491c21
67bb694
47395f9
80161ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,7 @@ import { EdgeStep } from "./../../../extensions/react-flow/edges/EdgeStep"; | |
| import { NodeDefault } from "./../../../extensions/react-flow/nodes/NodeDefault"; | ||
| import { StickyNoteNode } from "./../nodes/StickyNoteNode"; | ||
| import { LINKING_NODE_TYPES } from "./typing"; | ||
| //import {ComponentType} from "react"; | ||
| //import {NodeProps} from "react-flow-renderer-lts"; | ||
| import {NodeProps} from "react-flow-renderer"; | ||
|
|
||
| const edgeTypes = { | ||
| default: EdgeStep, | ||
|
|
@@ -14,7 +13,7 @@ const edgeTypes = { | |
| danger: EdgeStep, | ||
| }; | ||
|
|
||
| const nodeTypes: Record<LINKING_NODE_TYPES, React.ReactNode /*& ComponentType<NodeProps>*/> = { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here. |
||
| const nodeTypes: Record<LINKING_NODE_TYPES, React.ComponentType<NodeProps> /*& ComponentType<NodeProps>*/> = { | ||
| default: NodeDefault, | ||
| sourcepath: NodeDefault, | ||
| targetpath: NodeDefault, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,7 @@ import { EdgeStep } from "./../../../extensions/react-flow/edges/EdgeStep"; | |
| import { NodeDefault } from "./../../../extensions/react-flow/nodes/NodeDefault"; | ||
| import { StickyNoteNode } from "./../nodes/StickyNoteNode"; | ||
| import { WORKFLOW_NODE_TYPES } from "./typing"; | ||
| //import {ComponentType} from "react"; | ||
| //import {NodeProps} from "react-flow-renderer-lts"; | ||
| import {NodeProps} from "react-flow-renderer"; | ||
|
|
||
| const edgeTypes = { | ||
| default: EdgeStep, | ||
|
|
@@ -12,7 +11,7 @@ const edgeTypes = { | |
| danger: EdgeStep, | ||
| }; | ||
|
|
||
| const nodeTypes: Record<WORKFLOW_NODE_TYPES, React.ReactNode /*& ComponentType<NodeProps>*/> = { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here. |
||
| const nodeTypes: Record<WORKFLOW_NODE_TYPES, React.ComponentType<NodeProps>> = { | ||
| default: NodeDefault, | ||
| dataset: NodeDefault, | ||
| linking: NodeDefault, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,14 +4,18 @@ import { SideNav as CarbonSideNav, SideNavProps as CarbonSideNavProps } from "@c | |
| import { CLASSPREFIX as eccgui } from "../../configuration/constants"; | ||
|
|
||
| export interface ApplicationSidebarNavigationProps | ||
| extends Omit<CarbonSideNavProps, "ref" | "defaultExpanded" | "isPersistent" | "isFixedNav" | "isChildOfHeader">, | ||
| React.HTMLAttributes<HTMLElement> {} | ||
| extends Omit<CarbonSideNavProps, "ref" | "defaultExpanded" | "isPersistent" | "isFixedNav" | "isChildOfHeader"| "onToggle"> { | ||
| children: React.ReactNode; | ||
| className?: string; | ||
| onToggle?: any //todo change later | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like a hack, also |
||
|
|
||
| export const ApplicationSidebarNavigation = ({ | ||
| children, | ||
| className = "", | ||
| ...otherCarbonSideNavProps | ||
| }: ApplicationSidebarNavigationProps) => { | ||
|
|
||
| return ( | ||
| <CarbonSideNav | ||
| className={`${eccgui}-application__menu__sidebar ${className}`} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,7 +60,13 @@ export const ApplicationTitle = ({ | |
| <span className={`${eccgui}-application__title--content`}> | ||
| {!!depiction && ( | ||
| <> | ||
| <span className={`${eccgui}-application__title--depiction`}>{depiction}</span> | ||
| <span className={`${eccgui}-application__title--depiction`}> | ||
| {React.isValidElement(depiction) | ||
| ? depiction | ||
| : depiction instanceof HTMLElement | ||
| ? <>{depiction.outerHTML}</> | ||
| : depiction} | ||
| </span> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why should land a HTMLElement here? |
||
| </> | ||
| )} | ||
| {!!prefix && ( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to check this change from the LTS version because this is used for both supported react flow versions.