From 386d6bea898e448383f49b9df0f0707d65ae7042 Mon Sep 17 00:00:00 2001 From: Nick Grosenbacher Date: Wed, 28 Aug 2024 17:06:52 -0400 Subject: [PATCH] SWC-6882 - Rename ReactNode to ReactElement ReactElement describes the object explicitly returned by React.createElement, while ReactNode describes anything that React can render (including ReactElement). For our purposes, ReactElement is more appropriate to use. --- devdocs/ReactIntegration.md | 5 +-- .../client/GlobalApplicationStateImpl.java | 4 +-- .../web/client/jsinterop/React.java | 31 ++++++++++--------- .../client/jsinterop/ReactComponentProps.java | 6 ++-- .../web/client/jsinterop/ReactDOMRoot.java | 2 +- .../{ReactNode.java => ReactElement.java} | 2 +- .../view/DataAccessManagementViewImpl.java | 4 +-- .../web/client/view/DownViewImpl.java | 5 ++- .../client/view/DownloadCartPageViewImpl.java | 4 +-- .../client/view/FollowingPageViewImpl.java | 4 +-- .../web/client/view/HomeViewImpl.java | 6 ++-- .../web/client/view/LoginViewImpl.java | 4 +-- .../web/client/view/ProfileViewImpl.java | 4 +-- .../web/client/widget/EntityTypeIconImpl.java | 4 +-- .../web/client/widget/FullWidthAlert.java | 4 +-- .../web/client/widget/HelpWidget.java | 4 +-- .../web/client/widget/IconSvg.java | 4 +-- .../web/client/widget/OrientationBanner.java | 4 +-- .../web/client/widget/ReactComponent.java | 22 ++++++------- .../AccessRequirementRelatedProjectsList.java | 4 +-- .../EntitySubjectsWidgetViewImpl.java | 4 +-- ...agedACTAccessRequirementStep3ViewImpl.java | 4 +-- ...CreateOrUpdateAccessRequirementWizard.java | 6 ++-- .../widget/breadcrumb/BreadcrumbViewImpl.java | 4 +-- .../widget/discussion/ForumSearchWrapper.java | 4 +-- .../widget/entity/EntityBadgeViewImpl.java | 6 ++-- .../entity/EntityModalWidgetViewImpl.java | 4 +-- ...ityViewScopeEditorModalWidgetViewImpl.java | 6 ++-- .../ModifiedCreatedByWidgetViewImpl.java | 4 +-- .../SqlDefinedEditorModalWidgetViewImpl.java | 6 ++-- .../browse/EntityFinderWidgetViewImpl.java | 4 +-- .../entity/controller/StuAlertViewImpl.java | 4 +-- .../entity/file/AddToDownloadListV2Impl.java | 4 +-- .../entity/file/BasicTitleBarViewImpl.java | 6 ++-- .../menu/v3/EntityActionMenuViewImpl.java | 6 ++-- .../entity/renderer/HtmlPreviewViewImpl.java | 4 +-- .../IntendedDataUseReportWidgetViewImpl.java | 4 +-- .../entity/renderer/PlotlyWidgetViewImpl.java | 2 +- .../v2/RestrictionWidgetViewImpl.java | 4 +-- .../AdministerEvaluationsListViewImpl.java | 4 +-- .../EvaluationEditorReactComponentPage.java | 4 +-- .../evaluation/EvaluationListViewImpl.java | 4 +-- .../EvaluationSubmitterViewImpl.java | 2 +- ...ionViewScopeEditorModalWidgetViewImpl.java | 6 ++-- .../client/widget/footer/FooterViewImpl.java | 4 +-- .../client/widget/header/HeaderViewImpl.java | 8 ++--- .../widget/login/LoginWidgetViewImpl.java | 4 +-- .../PageProgressWidgetViewImpl.java | 4 +-- .../profile/UserProfileWidgetViewImpl.java | 6 ++-- .../v2/ProvenanceWidgetViewImpl.java | 4 +-- ...ntityAccessControlListModalWidgetImpl.java | 4 +-- .../StatisticsPlotWidgetViewImpl.java | 2 +- .../table/explore/QueryWrapperPlotNav.java | 4 +-- .../table/explore/StandaloneQueryWrapper.java | 4 +-- .../modal/fileview/CreateTableViewWizard.java | 6 ++-- .../table/v2/TableEntityWidgetViewImpl.java | 4 +-- .../ColumnModelsEditorWidgetViewImpl.java | 6 ++-- .../web/client/widget/trash/TrashCanList.java | 4 +-- .../client/widget/user/UserBadgeViewImpl.java | 4 +-- 59 files changed, 150 insertions(+), 151 deletions(-) rename src/main/java/org/sagebionetworks/web/client/jsinterop/{ReactNode.java => ReactElement.java} (84%) diff --git a/devdocs/ReactIntegration.md b/devdocs/ReactIntegration.md index 413c3c0f48..a1fb0959f5 100644 --- a/devdocs/ReactIntegration.md +++ b/devdocs/ReactIntegration.md @@ -49,6 +49,7 @@ How you manage updating your widget's view will vary based on the scenario, but ```java import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.React; +import org.sagebionetworks.web.client.jsinterop.ReactElement; class MyView { @@ -57,12 +58,12 @@ class MyView { void renderComponent() { MyProps props = props.create(/**/); - ReactNode reactNode = React.createElementWithSynapseContext( + ReactElement reactElement = React.createElementWithSynapseContext( SRC.SynapseComponents.MyComponent, props, propsProvider.getJsInteropContextProps() ); - reactComponent.render(reactNode); + reactComponent.render(reactElement); } } diff --git a/src/main/java/org/sagebionetworks/web/client/GlobalApplicationStateImpl.java b/src/main/java/org/sagebionetworks/web/client/GlobalApplicationStateImpl.java index 1af9eafaf7..e54ddc471d 100644 --- a/src/main/java/org/sagebionetworks/web/client/GlobalApplicationStateImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/GlobalApplicationStateImpl.java @@ -27,7 +27,7 @@ import org.sagebionetworks.web.client.cookie.CookieProvider; import org.sagebionetworks.web.client.jsinterop.React; import org.sagebionetworks.web.client.jsinterop.ReactDOM; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.mvp.AppActivityMapper; import org.sagebionetworks.web.client.mvp.AppPlaceHistoryMapper; @@ -467,7 +467,7 @@ public void initializeToastContainer() { isToastContainerInitialized = true; Element toastContainer = RootPanel.get("toastContainer").getElement(); - ReactNode component = React.createElementWithThemeContext( + ReactElement component = React.createElementWithThemeContext( SRC.SynapseComponents.SynapseToastContainer, null ); diff --git a/src/main/java/org/sagebionetworks/web/client/jsinterop/React.java b/src/main/java/org/sagebionetworks/web/client/jsinterop/React.java index bbef3e304c..56c55605ae 100644 --- a/src/main/java/org/sagebionetworks/web/client/jsinterop/React.java +++ b/src/main/java/org/sagebionetworks/web/client/jsinterop/React.java @@ -8,15 +8,16 @@ @JsType(isNative = true, namespace = JsPackage.GLOBAL) public class React { - public static native

ReactNode createElement( - ReactComponentType

component, - P props - ); + public static native < + P extends ReactComponentProps + > ReactElement createElement(ReactComponentType

component, P props); - public static native

ReactNode createElement( + public static native < + P extends ReactComponentProps + > ReactElement createElement( ReactComponentType

component, P props, - ReactNode... children + ReactElement... children ); public static native T createRef(); @@ -28,7 +29,7 @@ public static native

ReactNode createElement( @JsOverlay public static < P extends ReactComponentProps - > ReactNode createElementWithThemeContext( + > ReactElement createElementWithThemeContext( ReactComponentType

component, P props ) { @@ -54,12 +55,12 @@ > ReactNode createElementWithThemeContext( @JsOverlay public static < P extends ReactComponentProps - > ReactNode createElementWithSynapseContext( + > ReactElement createElementWithSynapseContext( ReactComponentType

component, P props, SynapseReactClientFullContextProviderProps wrapperProps ) { - ReactNode componentElement = createElement(component, props); + ReactElement componentElement = createElement(component, props); return createElement( SRC.SynapseContext.FullContextProvider, wrapperProps, @@ -67,16 +68,16 @@ > ReactNode createElementWithSynapseContext( ); } - public static native ReactNode cloneElement(ReactNode element); + public static native ReactElement cloneElement(ReactElement element); - public static native ReactNode cloneElement( - ReactNode element, + public static native ReactElement cloneElement( + ReactElement element, ReactComponentProps props ); - public static native ReactNode cloneElement( - ReactNode element, + public static native ReactElement cloneElement( + ReactElement element, ReactComponentProps props, - ReactNode... children + ReactElement... children ); } diff --git a/src/main/java/org/sagebionetworks/web/client/jsinterop/ReactComponentProps.java b/src/main/java/org/sagebionetworks/web/client/jsinterop/ReactComponentProps.java index db92fb74cc..33c001237a 100644 --- a/src/main/java/org/sagebionetworks/web/client/jsinterop/ReactComponentProps.java +++ b/src/main/java/org/sagebionetworks/web/client/jsinterop/ReactComponentProps.java @@ -18,13 +18,13 @@ public interface CallbackRef { void run(Element element); } - public JsArray> children; + public JsArray> children; // Either a ComponentRef or CallbackRef may be passed. A CallbackRef will be invoked when the ref is set. public Object ref; @JsOverlay - public final void addChild(ReactNode child) { + public final void addChild(ReactElement child) { if (children == null) { children = new JsArray<>(); } @@ -37,7 +37,7 @@ public final void clearChildren() { } @JsOverlay - public final JsArray> getChildren() { + public final JsArray> getChildren() { if (children == null) { children = new JsArray<>(); } diff --git a/src/main/java/org/sagebionetworks/web/client/jsinterop/ReactDOMRoot.java b/src/main/java/org/sagebionetworks/web/client/jsinterop/ReactDOMRoot.java index 98e12b3e70..c366c0e9fa 100644 --- a/src/main/java/org/sagebionetworks/web/client/jsinterop/ReactDOMRoot.java +++ b/src/main/java/org/sagebionetworks/web/client/jsinterop/ReactDOMRoot.java @@ -6,7 +6,7 @@ @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") public class ReactDOMRoot { - public native void render(ReactNode element); + public native void render(ReactElement element); public native void unmount(); } diff --git a/src/main/java/org/sagebionetworks/web/client/jsinterop/ReactNode.java b/src/main/java/org/sagebionetworks/web/client/jsinterop/ReactElement.java similarity index 84% rename from src/main/java/org/sagebionetworks/web/client/jsinterop/ReactNode.java rename to src/main/java/org/sagebionetworks/web/client/jsinterop/ReactElement.java index d1a53229ca..ed9e6aa197 100644 --- a/src/main/java/org/sagebionetworks/web/client/jsinterop/ReactNode.java +++ b/src/main/java/org/sagebionetworks/web/client/jsinterop/ReactElement.java @@ -5,7 +5,7 @@ import jsinterop.annotations.JsType; @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") -public class ReactNode { +public class ReactElement { @JsNullable public T props; diff --git a/src/main/java/org/sagebionetworks/web/client/view/DataAccessManagementViewImpl.java b/src/main/java/org/sagebionetworks/web/client/view/DataAccessManagementViewImpl.java index bafc9f902e..a5ad3b1707 100644 --- a/src/main/java/org/sagebionetworks/web/client/view/DataAccessManagementViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/view/DataAccessManagementViewImpl.java @@ -7,7 +7,7 @@ import com.google.inject.Inject; import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; import org.sagebionetworks.web.client.widget.header.Header; @@ -43,7 +43,7 @@ public void render() { headerWidget.refresh(); Window.scrollTo(0, 0); - ReactNode node = React.createElementWithSynapseContext( + ReactElement node = React.createElementWithSynapseContext( SRC.SynapseComponents.ReviewerDashboard, null, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/view/DownViewImpl.java b/src/main/java/org/sagebionetworks/web/client/view/DownViewImpl.java index b1e2f772c9..e4ee7ed119 100644 --- a/src/main/java/org/sagebionetworks/web/client/view/DownViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/view/DownViewImpl.java @@ -5,11 +5,10 @@ import com.google.gwt.user.client.ui.Widget; import com.google.inject.Inject; import org.sagebionetworks.web.client.GlobalApplicationState; -import org.sagebionetworks.web.client.PlaceChanger; import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.ErrorPageProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; import org.sagebionetworks.web.client.widget.header.Header; @@ -90,7 +89,7 @@ public void renderMaintenancePage() { globalAppState.handleRelativePathClick(href); } ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.ErrorPage, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/view/DownloadCartPageViewImpl.java b/src/main/java/org/sagebionetworks/web/client/view/DownloadCartPageViewImpl.java index 99542a4e1c..6b558a536b 100644 --- a/src/main/java/org/sagebionetworks/web/client/view/DownloadCartPageViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/view/DownloadCartPageViewImpl.java @@ -6,7 +6,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.DownloadCartPageProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.security.AuthenticationController; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -43,7 +43,7 @@ public void render() { DownloadCartPageProps props = DownloadCartPageProps.create(entityId -> { presenter.onViewSharingSettingsClicked(entityId); }); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.DownloadCartPage, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/view/FollowingPageViewImpl.java b/src/main/java/org/sagebionetworks/web/client/view/FollowingPageViewImpl.java index 9d36edfd2a..d61e4c5efe 100644 --- a/src/main/java/org/sagebionetworks/web/client/view/FollowingPageViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/view/FollowingPageViewImpl.java @@ -9,7 +9,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.EmptyProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; import org.sagebionetworks.web.client.widget.header.Header; @@ -61,7 +61,7 @@ public void clear() { private void configure() { headerWidget.configure(); - ReactNode element = React.createElementWithSynapseContext( + ReactElement element = React.createElementWithSynapseContext( SRC.SynapseComponents.SubscriptionPage, EmptyProps.create(), propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/view/HomeViewImpl.java b/src/main/java/org/sagebionetworks/web/client/view/HomeViewImpl.java index 872dc0c89a..563f1507d7 100644 --- a/src/main/java/org/sagebionetworks/web/client/view/HomeViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/view/HomeViewImpl.java @@ -6,14 +6,12 @@ import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.Widget; import com.google.inject.Inject; -import org.sagebionetworks.web.client.DisplayUtils; import org.sagebionetworks.web.client.FeatureFlagConfig; import org.sagebionetworks.web.client.FeatureFlagKey; import org.sagebionetworks.web.client.GlobalApplicationState; import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; -import org.sagebionetworks.web.client.cookie.CookieProvider; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.jsinterop.SynapseHomepageProps; import org.sagebionetworks.web.client.jsinterop.SynapseHomepageV2Props; @@ -54,7 +52,7 @@ public HomeViewImpl( @Override public void render() { scrollToTop(); - ReactNode component; + ReactElement component; if (featureFlagConfig.isFeatureEnabled(FeatureFlagKey.HOMEPAGE_V2)) { SynapseHomepageV2Props props = SynapseHomepageV2Props.create(href -> { diff --git a/src/main/java/org/sagebionetworks/web/client/view/LoginViewImpl.java b/src/main/java/org/sagebionetworks/web/client/view/LoginViewImpl.java index 1552ae15c5..4599f2e733 100644 --- a/src/main/java/org/sagebionetworks/web/client/view/LoginViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/view/LoginViewImpl.java @@ -14,7 +14,7 @@ import org.sagebionetworks.web.client.SynapseJSNIUtils; import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.jsinterop.TermsAndConditionsProps; import org.sagebionetworks.web.client.utils.Callback; @@ -168,7 +168,7 @@ public void showTermsOfUse(boolean hasAccepted) { TermsAndConditionsProps props = TermsAndConditionsProps.create( this::onFormChange ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.TermsAndConditions, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/view/ProfileViewImpl.java b/src/main/java/org/sagebionetworks/web/client/view/ProfileViewImpl.java index 578c015d37..3b1c29a13a 100644 --- a/src/main/java/org/sagebionetworks/web/client/view/ProfileViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/view/ProfileViewImpl.java @@ -34,7 +34,7 @@ import org.sagebionetworks.web.client.cookie.CookieProvider; import org.sagebionetworks.web.client.jsinterop.EmptyProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.place.Search; import org.sagebionetworks.web.client.place.Synapse; @@ -603,7 +603,7 @@ public void onClick(ClickEvent event) { "https://help.synapse.org/docs/Navigating-Synapse.2048557182.html#NavigatingSynapse-Favorites" ); EmptyProps props = EmptyProps.create(); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.FavoritesPage, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/EntityTypeIconImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/EntityTypeIconImpl.java index 1157027718..3e42baeb44 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/EntityTypeIconImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/EntityTypeIconImpl.java @@ -4,7 +4,7 @@ import org.sagebionetworks.repo.model.EntityType; import org.sagebionetworks.web.client.jsinterop.EntityTypeIconProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; public class EntityTypeIconImpl @@ -23,7 +23,7 @@ public EntityTypeIconImpl(EntityType type) { @Override public void configure(EntityType type) { EntityTypeIconProps props = EntityTypeIconProps.create(type); - ReactNode component = React.createElementWithThemeContext( + ReactElement component = React.createElementWithThemeContext( SRC.SynapseComponents.EntityTypeIcon, props ); diff --git a/src/main/java/org/sagebionetworks/web/client/widget/FullWidthAlert.java b/src/main/java/org/sagebionetworks/web/client/widget/FullWidthAlert.java index 0904d70824..b2a8c4d924 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/FullWidthAlert.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/FullWidthAlert.java @@ -8,7 +8,7 @@ import org.sagebionetworks.web.client.jsinterop.AlertButtonConfig; import org.sagebionetworks.web.client.jsinterop.FullWidthAlertProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; public class FullWidthAlert implements IsWidget { @@ -60,7 +60,7 @@ private void rerender() { isGlobal, alertType ); - ReactNode component = React.createElementWithThemeContext( + ReactElement component = React.createElementWithThemeContext( SRC.SynapseComponents.FullWidthAlert, props ); diff --git a/src/main/java/org/sagebionetworks/web/client/widget/HelpWidget.java b/src/main/java/org/sagebionetworks/web/client/widget/HelpWidget.java index 8676e4d04f..2b92515cb4 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/HelpWidget.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/HelpWidget.java @@ -7,7 +7,7 @@ import org.gwtbootstrap3.client.ui.html.Span; import org.sagebionetworks.web.client.jsinterop.HelpPopoverProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; /** @@ -54,7 +54,7 @@ protected void updateContent() { showCloseButton, className ); - ReactNode component = React.createElementWithThemeContext( + ReactElement component = React.createElementWithThemeContext( SRC.SynapseComponents.HelpPopover, props ); diff --git a/src/main/java/org/sagebionetworks/web/client/widget/IconSvg.java b/src/main/java/org/sagebionetworks/web/client/widget/IconSvg.java index 522c3ba561..9352be14e1 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/IconSvg.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/IconSvg.java @@ -3,7 +3,7 @@ import com.google.gwt.dom.client.SpanElement; import org.sagebionetworks.web.client.jsinterop.IconSvgProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; public class IconSvg extends ReactComponent { @@ -24,7 +24,7 @@ public void configure(String icon, String label) { private void renderComponent() { IconSvgProps props = IconSvgProps.create(icon, label); - ReactNode component = React.createElementWithThemeContext( + ReactElement component = React.createElementWithThemeContext( SRC.SynapseComponents.IconSvg, props ); diff --git a/src/main/java/org/sagebionetworks/web/client/widget/OrientationBanner.java b/src/main/java/org/sagebionetworks/web/client/widget/OrientationBanner.java index f1e73bdd0c..9f1bc4e0a1 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/OrientationBanner.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/OrientationBanner.java @@ -7,7 +7,7 @@ import org.sagebionetworks.web.client.jsinterop.AlertButtonConfig; import org.sagebionetworks.web.client.jsinterop.OrientationBannerProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; public class OrientationBanner implements IsWidget { @@ -43,7 +43,7 @@ private void rerender() { primaryButtonConfig, secondaryButtonConfig ); - ReactNode component = React.createElementWithThemeContext( + ReactElement component = React.createElementWithThemeContext( SRC.SynapseComponents.OrientationBanner, props ); diff --git a/src/main/java/org/sagebionetworks/web/client/widget/ReactComponent.java b/src/main/java/org/sagebionetworks/web/client/widget/ReactComponent.java index 592448665a..d125fbdca8 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/ReactComponent.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/ReactComponent.java @@ -18,14 +18,14 @@ import org.sagebionetworks.web.client.jsinterop.ReactComponentType; import org.sagebionetworks.web.client.jsinterop.ReactDOM; import org.sagebionetworks.web.client.jsinterop.ReactDOMRoot; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; /** - * Widget that manages the lifecycle of a React component. To use this widget, create a {@link ReactNode} using the - * {@link React} API and call {@link #render(ReactNode)} to render the React component. + * Widget that manages the lifecycle of a React component. To use this widget, create a {@link ReactElement} using the + * {@link React} API and call {@link #render(ReactElement)} to render the React component. *

* This widget also manages appending child elements if the associated React component can contain children. If all - * child widgets use this class, then the child {@link ReactNode}s will be cloned and passed as children to the React + * child widgets use this class, then the child {@link ReactElement}s will be cloned and passed as children to the React * component. If any child of this component is a non-ReactComponent widget, then the child widgets will be injected * into the node found using the component's `ref`. *

@@ -41,7 +41,7 @@ public class ReactComponent private ReactComponentType reactComponentType; public T props; - private ReactNode reactElement; + private ReactElement reactElement; public ReactComponent() { this(DivElement.TAG); @@ -107,14 +107,14 @@ public void overrideProps(T props) { */ private void injectChildWidgetsIntoComponent() { if (this.allChildrenAreReactComponents()) { - // If all widget children are ReactNodes, clone the React component and add them as children + // If all widget children are ReactElements, clone the React component and add them as children List> childWidgets = new ArrayList<>(); getChildren().forEach(w -> childWidgets.add(((ReactComponent) w))); - ReactNode[] childReactElements = childWidgets + ReactElement[] childReactElements = childWidgets .stream() .map(ReactComponent::getReactElement) - .toArray(ReactNode[]::new); + .toArray(ReactElement[]::new); this.reactElement = React.cloneElement(reactElement, this.props, childReactElements); @@ -141,8 +141,8 @@ private void injectChildWidgetsIntoComponent() { } } - public void render(ReactNode reactNode) { - this.reactElement = reactNode; + public void render(ReactElement reactElement) { + this.reactElement = reactElement; maybeCreateRoot(); injectChildWidgetsIntoComponent(); @@ -240,7 +240,7 @@ public boolean remove(Widget w) { return true; } - public ReactNode getReactElement() { + public ReactElement getReactElement() { return reactElement; } diff --git a/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/AccessRequirementRelatedProjectsList.java b/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/AccessRequirementRelatedProjectsList.java index 3a97730d27..199c10a521 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/AccessRequirementRelatedProjectsList.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/AccessRequirementRelatedProjectsList.java @@ -6,7 +6,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.AccessRequirementRelatedProjectsListProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.utils.CallbackP; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -32,7 +32,7 @@ public AccessRequirementRelatedProjectsList( public void configure(String accessRequirementId) { AccessRequirementRelatedProjectsListProps props = AccessRequirementRelatedProjectsListProps.create(accessRequirementId); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.AccessRequirementRelatedProjectsList, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/EntitySubjectsWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/EntitySubjectsWidgetViewImpl.java index 093999f74e..b9b14ccc02 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/EntitySubjectsWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/EntitySubjectsWidgetViewImpl.java @@ -6,7 +6,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.EntityHeaderTableProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -44,7 +44,7 @@ public void showEntityHeadersTable( ReferenceList entityReferences, boolean isEditable ) { - ReactNode element = React.createElementWithSynapseContext( + ReactElement element = React.createElementWithSynapseContext( SRC.SynapseComponents.EntityHeaderTable, EntityHeaderTableProps.create( entityReferences.getReferences(), diff --git a/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/createaccessrequirement/CreateManagedACTAccessRequirementStep3ViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/createaccessrequirement/CreateManagedACTAccessRequirementStep3ViewImpl.java index 487547669e..c5c7dc5082 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/createaccessrequirement/CreateManagedACTAccessRequirementStep3ViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/createaccessrequirement/CreateManagedACTAccessRequirementStep3ViewImpl.java @@ -8,7 +8,7 @@ import org.sagebionetworks.web.client.jsinterop.AccessRequirementAclEditorHandler; import org.sagebionetworks.web.client.jsinterop.AccessRequirementAclEditorProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.ReactRef; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -42,7 +42,7 @@ public CreateManagedACTAccessRequirementStep3ViewImpl( public void configure(String accessRequirementId) { componentRef = React.createRef(); reactContainer.clear(); - ReactNode element = React.createElementWithSynapseContext( + ReactElement element = React.createElementWithSynapseContext( SRC.SynapseComponents.AccessRequirementAclEditor, AccessRequirementAclEditorProps.create( accessRequirementId, diff --git a/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/createaccessrequirement/CreateOrUpdateAccessRequirementWizard.java b/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/createaccessrequirement/CreateOrUpdateAccessRequirementWizard.java index 13d3ea4f52..24740a17c7 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/createaccessrequirement/CreateOrUpdateAccessRequirementWizard.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/accessrequirements/createaccessrequirement/CreateOrUpdateAccessRequirementWizard.java @@ -8,7 +8,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.CreateOrUpdateAccessRequirementWizardProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -43,12 +43,12 @@ private void renderComponent() { this.onCancel ); - ReactNode reactNode = React.createElementWithSynapseContext( + ReactElement reactElement = React.createElementWithSynapseContext( SRC.SynapseComponents.CreateOrUpdateAccessRequirementWizard, props, propsProvider.getJsInteropContextProps() ); - reactComponent.render(reactNode); + reactComponent.render(reactElement); } public void configure( diff --git a/src/main/java/org/sagebionetworks/web/client/widget/breadcrumb/BreadcrumbViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/breadcrumb/BreadcrumbViewImpl.java index 1d532d79f3..8c7b801311 100755 --- a/src/main/java/org/sagebionetworks/web/client/widget/breadcrumb/BreadcrumbViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/breadcrumb/BreadcrumbViewImpl.java @@ -9,7 +9,7 @@ import org.sagebionetworks.web.client.jsinterop.BreadcrumbItem; import org.sagebionetworks.web.client.jsinterop.EntityPageBreadcrumbsProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.place.Synapse; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -81,7 +81,7 @@ public void setLinksList(List breadcrumbs, String current) { items.toArray(new BreadcrumbItem[0]) ); - ReactNode element = React.createElementWithSynapseContext( + ReactElement element = React.createElementWithSynapseContext( SRC.SynapseComponents.EntityPageBreadcrumbs, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/discussion/ForumSearchWrapper.java b/src/main/java/org/sagebionetworks/web/client/widget/discussion/ForumSearchWrapper.java index ab1927b2ec..884f4aefca 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/discussion/ForumSearchWrapper.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/discussion/ForumSearchWrapper.java @@ -4,7 +4,7 @@ import org.sagebionetworks.web.client.jsinterop.ForumSearchProps; import org.sagebionetworks.web.client.jsinterop.ForumSearchProps.OnSearchResultsVisibleHandler; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -21,7 +21,7 @@ public ForumSearchWrapper( projectId, onSearchResultsVisible ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.ForumSearch, props, contextPropsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityBadgeViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityBadgeViewImpl.java index a30651e2a7..ec4f387337 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityBadgeViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityBadgeViewImpl.java @@ -33,7 +33,7 @@ import org.sagebionetworks.web.client.SynapseJSNIUtils; import org.sagebionetworks.web.client.jsinterop.EntityBadgeIconsProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.jsinterop.SynapseReactClientFullContextProviderProps; import org.sagebionetworks.web.client.place.Synapse; @@ -285,13 +285,13 @@ public void setIcons( EntityBadgeIconsProps props, SynapseReactClientFullContextProviderProps providerProps ) { - ReactNode reactNode = React.createElementWithSynapseContext( + ReactElement reactElement = React.createElementWithSynapseContext( SRC.SynapseComponents.EntityBadgeIcons, props, providerProps ); - iconsContainer.render(reactNode); + iconsContainer.render(reactElement); } @Override diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityModalWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityModalWidgetViewImpl.java index 93e66dc388..10028d6466 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityModalWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityModalWidgetViewImpl.java @@ -22,12 +22,12 @@ public EntityModalWidgetViewImpl( @Override public void renderComponent(EntityModalProps props) { - ReactNode reactNode = React.createElementWithSynapseContext( + ReactElement reactElement = React.createElementWithSynapseContext( SRC.SynapseComponents.EntityModal, props, propsProvider.getJsInteropContextProps() ); - reactComponent.render(reactNode); + reactComponent.render(reactElement); } @Override diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityViewScopeEditorModalWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityViewScopeEditorModalWidgetViewImpl.java index d93cb399a8..f0e297f495 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityViewScopeEditorModalWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/EntityViewScopeEditorModalWidgetViewImpl.java @@ -5,7 +5,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.EntityViewScopeEditorModalProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -26,12 +26,12 @@ public EntityViewScopeEditorModalWidgetViewImpl( @Override public void renderComponent(EntityViewScopeEditorModalProps props) { - ReactNode reactNode = React.createElementWithSynapseContext( + ReactElement reactElement = React.createElementWithSynapseContext( SRC.SynapseComponents.EntityViewScopeEditorModal, props, propsProvider.getJsInteropContextProps() ); - reactComponent.render(reactNode); + reactComponent.render(reactElement); } @Override diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/ModifiedCreatedByWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/ModifiedCreatedByWidgetViewImpl.java index 51c01a8ab7..669185058a 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/ModifiedCreatedByWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/ModifiedCreatedByWidgetViewImpl.java @@ -7,7 +7,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.CreatedByModifiedByProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -40,7 +40,7 @@ public Widget asWidget() { @Override public void setProps(CreatedByModifiedByProps props) { - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.CreatedByModifiedBy, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/SqlDefinedEditorModalWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/SqlDefinedEditorModalWidgetViewImpl.java index 9da8deded2..d9014ee45a 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/SqlDefinedEditorModalWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/SqlDefinedEditorModalWidgetViewImpl.java @@ -4,7 +4,7 @@ import com.google.inject.Inject; import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.jsinterop.SqlDefinedTableEditorModalProps; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -26,12 +26,12 @@ public SqlDefinedEditorModalWidgetViewImpl( @Override public void renderComponent(SqlDefinedTableEditorModalProps props) { - ReactNode reactNode = React.createElementWithSynapseContext( + ReactElement reactElement = React.createElementWithSynapseContext( SRC.SynapseComponents.SqlDefinedTableEditorModal, props, propsProvider.getJsInteropContextProps() ); - reactComponent.render(reactNode); + reactComponent.render(reactElement); } @Override diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/browse/EntityFinderWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/browse/EntityFinderWidgetViewImpl.java index e6511b4e2c..5da8889535 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/browse/EntityFinderWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/browse/EntityFinderWidgetViewImpl.java @@ -21,7 +21,7 @@ import org.sagebionetworks.web.client.jsinterop.EntityFinderProps; import org.sagebionetworks.web.client.jsinterop.EntityFinderScope; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.jsni.ReferenceJSNIObject; import org.sagebionetworks.web.client.widget.HelpWidget; @@ -158,7 +158,7 @@ public void renderComponent( treeOnly ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.EntityFinder, props, contextPropsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/controller/StuAlertViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/controller/StuAlertViewImpl.java index f1b3284320..1b0eaf581e 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/controller/StuAlertViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/controller/StuAlertViewImpl.java @@ -11,7 +11,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.ErrorPageProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.view.DownViewImpl.ErrorPageType; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -92,7 +92,7 @@ private void renderErrorPage(ErrorPageType type) { globalAppState.handleRelativePathClick(href); } ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.ErrorPage, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/file/AddToDownloadListV2Impl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/file/AddToDownloadListV2Impl.java index 104b7ccc21..4cb25c1cad 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/file/AddToDownloadListV2Impl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/file/AddToDownloadListV2Impl.java @@ -9,7 +9,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.DownloadConfirmationProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -72,7 +72,7 @@ public void run() { folderId, onClose ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.DownloadConfirmation, editorProps, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/file/BasicTitleBarViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/file/BasicTitleBarViewImpl.java index 41d26f5f02..e373934b9b 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/file/BasicTitleBarViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/file/BasicTitleBarViewImpl.java @@ -9,7 +9,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.EntityPageTitleBarProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -22,12 +22,12 @@ public class BasicTitleBarViewImpl implements BasicTitleBarView { @Override public void setProps(EntityPageTitleBarProps props) { - ReactNode reactNode = React.createElementWithSynapseContext( + ReactElement reactElement = React.createElementWithSynapseContext( SRC.SynapseComponents.EntityPageTitleBar, props, propsProvider.getJsInteropContextProps() ); - reactComponentContainer.render(reactNode); + reactComponentContainer.render(reactElement); } interface BasicTitleBarViewImplUiBinder diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/menu/v3/EntityActionMenuViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/menu/v3/EntityActionMenuViewImpl.java index 318af58c01..f7da208715 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/menu/v3/EntityActionMenuViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/menu/v3/EntityActionMenuViewImpl.java @@ -7,7 +7,7 @@ import com.google.inject.Inject; import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.jsinterop.SkeletonButtonProps; import org.sagebionetworks.web.client.jsinterop.entity.actionmenu.EntityActionMenuPropsJsInterop; @@ -52,7 +52,7 @@ public void setIsLoading(boolean isLoading) { } private void renderMenuComponent(EntityActionMenuPropsJsInterop props) { - ReactNode node = React.createElementWithSynapseContext( + ReactElement node = React.createElementWithSynapseContext( SRC.SynapseComponents.EntityActionMenu, props, propsProvider.getJsInteropContextProps() @@ -61,7 +61,7 @@ private void renderMenuComponent(EntityActionMenuPropsJsInterop props) { } private void renderLoaderComponent() { - ReactNode node = React.createElementWithSynapseContext( + ReactElement node = React.createElementWithSynapseContext( SRC.SynapseComponents.SkeletonButton, SkeletonButtonProps.create("Tools Menu Placeholder"), propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/HtmlPreviewViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/HtmlPreviewViewImpl.java index dce6dc9b01..ad90c961ee 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/HtmlPreviewViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/HtmlPreviewViewImpl.java @@ -9,7 +9,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.HtmlPreviewProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -47,7 +47,7 @@ public Widget asWidget() { public void configure(String createdBy, String rawHtml) { HtmlPreviewProps props = HtmlPreviewProps.create(createdBy, rawHtml); - ReactNode element = React.createElementWithSynapseContext( + ReactElement element = React.createElementWithSynapseContext( SRC.SynapseComponents.HtmlPreview, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/IntendedDataUseReportWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/IntendedDataUseReportWidgetViewImpl.java index 296f0d398c..0a35738ab2 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/IntendedDataUseReportWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/IntendedDataUseReportWidgetViewImpl.java @@ -5,7 +5,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.IDUReportProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -28,7 +28,7 @@ public IntendedDataUseReportWidgetViewImpl( public void render(String accessRequirementId) { IDUReportProps props = IDUReportProps.create(accessRequirementId); - ReactNode node = React.createElementWithSynapseContext( + ReactElement node = React.createElementWithSynapseContext( SRC.SynapseComponents.IDUReport, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/PlotlyWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/PlotlyWidgetViewImpl.java index 59e6729c9a..cdac949d5a 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/PlotlyWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/renderer/PlotlyWidgetViewImpl.java @@ -165,7 +165,7 @@ private static native void _showChart( }; var component = $wnd.React.createElement(plot, props) - reactComponent.@org.sagebionetworks.web.client.widget.ReactComponent::render(Lorg/sagebionetworks/web/client/jsinterop/ReactNode;)(component); + reactComponent.@org.sagebionetworks.web.client.widget.ReactComponent::render(Lorg/sagebionetworks/web/client/jsinterop/ReactElement;)(component); } catch (err) { console.error(err); } diff --git a/src/main/java/org/sagebionetworks/web/client/widget/entity/restriction/v2/RestrictionWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/entity/restriction/v2/RestrictionWidgetViewImpl.java index ec096ab353..f5e70e3714 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/entity/restriction/v2/RestrictionWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/entity/restriction/v2/RestrictionWidgetViewImpl.java @@ -13,7 +13,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.HasAccessProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -194,7 +194,7 @@ public void configureCurrentAccessComponent( null, null ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.HasAccess, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/evaluation/AdministerEvaluationsListViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/evaluation/AdministerEvaluationsListViewImpl.java index a3b38fe739..b3594e8dc8 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/evaluation/AdministerEvaluationsListViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/evaluation/AdministerEvaluationsListViewImpl.java @@ -11,7 +11,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.EvaluationCardProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; import org.sagebionetworks.web.client.widget.evaluation.EvaluationRowWidget.EvaluationActionHandler; @@ -81,7 +81,7 @@ public void addReactComponent( container.addStyleName("margin-top-50"); rows.add(container); - ReactNode element = React.createElementWithSynapseContext( + ReactElement element = React.createElementWithSynapseContext( SRC.SynapseComponents.EvaluationCard, props, contextPropsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/evaluation/EvaluationEditorReactComponentPage.java b/src/main/java/org/sagebionetworks/web/client/widget/evaluation/EvaluationEditorReactComponentPage.java index a7d8e759de..c1bb4b45ed 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/evaluation/EvaluationEditorReactComponentPage.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/evaluation/EvaluationEditorReactComponentPage.java @@ -12,7 +12,7 @@ import org.sagebionetworks.web.client.jsinterop.EvaluationEditorPageProps; import org.sagebionetworks.web.client.jsinterop.React; import org.sagebionetworks.web.client.jsinterop.ReactDOM; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -66,7 +66,7 @@ protected void onLoad() { entityId, this.onPageBack ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.EvaluationEditorPage, editorProps, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/evaluation/EvaluationListViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/evaluation/EvaluationListViewImpl.java index 6d78e324fd..ab1c8c28b3 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/evaluation/EvaluationListViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/evaluation/EvaluationListViewImpl.java @@ -8,7 +8,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.AvailableEvaluationQueueListProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -28,7 +28,7 @@ public EvaluationListViewImpl( @Override public void configure(List list, boolean isSelectable) { - ReactNode element = React.createElementWithSynapseContext( + ReactElement element = React.createElementWithSynapseContext( SRC.SynapseComponents.AvailableEvaluationQueueList, AvailableEvaluationQueueListProps.create( list, diff --git a/src/main/java/org/sagebionetworks/web/client/widget/evaluation/EvaluationSubmitterViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/evaluation/EvaluationSubmitterViewImpl.java index 092697ab39..3013ce76c6 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/evaluation/EvaluationSubmitterViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/evaluation/EvaluationSubmitterViewImpl.java @@ -452,7 +452,7 @@ function synIdCallbackFunction(synId) { var component = $wnd.React.createElement($wnd.SRC.SynapseComponents.EntityForm, props, null); var wrapper = $wnd.React.createElement($wnd.SRC.SynapseContext.FullContextProvider, wrapperProps, component); - reactComponent.@org.sagebionetworks.web.client.widget.ReactComponent::render(Lorg/sagebionetworks/web/client/jsinterop/ReactNode;)(wrapper); + reactComponent.@org.sagebionetworks.web.client.widget.ReactComponent::render(Lorg/sagebionetworks/web/client/jsinterop/ReactElement;)(wrapper); } catch (err) { console.error(err); } diff --git a/src/main/java/org/sagebionetworks/web/client/widget/evaluation/SubmissionViewScopeEditorModalWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/evaluation/SubmissionViewScopeEditorModalWidgetViewImpl.java index 443b079275..2b67fbd201 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/evaluation/SubmissionViewScopeEditorModalWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/evaluation/SubmissionViewScopeEditorModalWidgetViewImpl.java @@ -4,7 +4,7 @@ import com.google.inject.Inject; import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.jsinterop.SubmissionViewScopeEditorModalProps; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -26,12 +26,12 @@ public SubmissionViewScopeEditorModalWidgetViewImpl( @Override public void renderComponent(SubmissionViewScopeEditorModalProps props) { - ReactNode reactNode = React.createElementWithSynapseContext( + ReactElement reactElement = React.createElementWithSynapseContext( SRC.SynapseComponents.SubmissionViewScopeEditorModal, props, propsProvider.getJsInteropContextProps() ); - reactComponent.render(reactNode); + reactComponent.render(reactElement); } @Override diff --git a/src/main/java/org/sagebionetworks/web/client/widget/footer/FooterViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/footer/FooterViewImpl.java index 032584342a..5198e4e30a 100755 --- a/src/main/java/org/sagebionetworks/web/client/widget/footer/FooterViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/footer/FooterViewImpl.java @@ -10,7 +10,7 @@ import org.sagebionetworks.web.client.PortalGinInjector; import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.jsinterop.SynapseFooterProps; import org.sagebionetworks.web.client.utils.Callback; @@ -91,7 +91,7 @@ public void refresh() { globalAppState.refreshPage(); } ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.SynapseFooter, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/header/HeaderViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/header/HeaderViewImpl.java index fba67f45e5..59c1463d69 100755 --- a/src/main/java/org/sagebionetworks/web/client/widget/header/HeaderViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/header/HeaderViewImpl.java @@ -23,7 +23,7 @@ import org.sagebionetworks.web.client.jsinterop.CookieNotificationProps; import org.sagebionetworks.web.client.jsinterop.EmptyProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.jsinterop.SynapseNavDrawerProps; import org.sagebionetworks.web.client.place.Home; @@ -110,7 +110,7 @@ public HeaderViewImpl( CookieNotificationProps props = CookieNotificationProps.create(prefs -> { rerenderGoogleAnalytics(); }); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.CookiesNotification, props, propsProvider.getJsInteropContextProps() @@ -125,7 +125,7 @@ public void clear() {} private void rerenderGoogleAnalytics() { EmptyProps props = EmptyProps.create(); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.GoogleAnalytics, props, propsProvider.getJsInteropContextProps() @@ -144,7 +144,7 @@ public void rerenderNavBar() { globalAppState.handleRelativePathClick(href); } ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.SynapseNavDrawer, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/login/LoginWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/login/LoginWidgetViewImpl.java index 5485bb0ac1..adc8ad0ae8 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/login/LoginWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/login/LoginWidgetViewImpl.java @@ -12,7 +12,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.LoginPageProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.place.Profile; import org.sagebionetworks.web.client.place.Synapse.ProfileArea; @@ -58,7 +58,7 @@ public LoginWidgetViewImpl( null, () -> this.postLogin() ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.LoginPage, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/pageprogress/PageProgressWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/pageprogress/PageProgressWidgetViewImpl.java index 522ca20cb2..a43afdc1a9 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/pageprogress/PageProgressWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/pageprogress/PageProgressWidgetViewImpl.java @@ -10,7 +10,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.PageProgressProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.utils.Callback; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -60,7 +60,7 @@ public void configure( () -> forwardBtnCallback.invoke(), isForwardActive ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.PageProgress, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/profile/UserProfileWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/profile/UserProfileWidgetViewImpl.java index 6b56777a6f..6262b909b2 100755 --- a/src/main/java/org/sagebionetworks/web/client/widget/profile/UserProfileWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/profile/UserProfileWidgetViewImpl.java @@ -28,7 +28,7 @@ import org.sagebionetworks.web.client.cookie.CookieProvider; import org.sagebionetworks.web.client.jsinterop.AccountLevelBadgesProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.jsinterop.UserProfileLinksProps; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -249,7 +249,7 @@ public void setSynAlert(IsWidget w) { @Override public void setOwnerId(String userId) { - ReactNode accountLevelBadgesComponent = + ReactElement accountLevelBadgesComponent = React.createElementWithSynapseContext( SRC.SynapseComponents.AccountLevelBadges, AccountLevelBadgesProps.create(userId), @@ -259,7 +259,7 @@ public void setOwnerId(String userId) { setAccountTypeVisibility(Long.parseLong(userId)); UserProfileLinksProps props = UserProfileLinksProps.create(userId); - ReactNode profileLinksComponent = React.createElementWithSynapseContext( + ReactElement profileLinksComponent = React.createElementWithSynapseContext( SRC.SynapseComponents.UserProfileLinks, props, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/provenance/v2/ProvenanceWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/provenance/v2/ProvenanceWidgetViewImpl.java index 0685dca9e9..cf44fa65ac 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/provenance/v2/ProvenanceWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/provenance/v2/ProvenanceWidgetViewImpl.java @@ -8,7 +8,7 @@ import org.sagebionetworks.web.client.jsinterop.ProvenanceGraphProps; import org.sagebionetworks.web.client.jsinterop.ProvenanceGraphProps.OnUpdateJavaScriptObject; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -57,7 +57,7 @@ public void renderComponent() { nodesListener, edgesListener ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.ProvenanceGraph, props, contextPropsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/sharing/EntityAccessControlListModalWidgetImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/sharing/EntityAccessControlListModalWidgetImpl.java index 1248e5ba48..8803e99e86 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/sharing/EntityAccessControlListModalWidgetImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/sharing/EntityAccessControlListModalWidgetImpl.java @@ -7,7 +7,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.EntityAclEditorModalProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.widget.ReactComponent; public class EntityAccessControlListModalWidgetImpl @@ -54,7 +54,7 @@ public Widget asWidget() { } private void renderComponent() { - ReactNode node = React.createElementWithSynapseContext( + ReactElement node = React.createElementWithSynapseContext( EntityAclEditorModal, componentProps, propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/statistics/StatisticsPlotWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/statistics/StatisticsPlotWidgetViewImpl.java index c653782c98..1b9665952d 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/statistics/StatisticsPlotWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/statistics/StatisticsPlotWidgetViewImpl.java @@ -96,7 +96,7 @@ private static native void _createSRCWidget( var component = $wnd.React.createElement($wnd.SRC.SynapseComponents.StatisticsPlot, props, null) var wrapper = $wnd.React.createElement($wnd.SRC.SynapseContext.FullContextProvider, wrapperProps, component) - reactComponent.@org.sagebionetworks.web.client.widget.ReactComponent::render(Lorg/sagebionetworks/web/client/jsinterop/ReactNode;)(wrapper); + reactComponent.@org.sagebionetworks.web.client.widget.ReactComponent::render(Lorg/sagebionetworks/web/client/jsinterop/ReactElement;)(wrapper); } catch (err) { console.error(err); } diff --git a/src/main/java/org/sagebionetworks/web/client/widget/table/explore/QueryWrapperPlotNav.java b/src/main/java/org/sagebionetworks/web/client/widget/table/explore/QueryWrapperPlotNav.java index 609811226b..949aa987f7 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/table/explore/QueryWrapperPlotNav.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/table/explore/QueryWrapperPlotNav.java @@ -6,7 +6,7 @@ import org.sagebionetworks.web.client.jsinterop.QueryWrapperPlotNavProps.OnQueryResultBundleCallback; import org.sagebionetworks.web.client.jsinterop.QueryWrapperPlotNavProps.OnViewSharingSettingsHandler; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -30,7 +30,7 @@ public QueryWrapperPlotNav( hideSqlEditorControl ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.QueryWrapperPlotNav, props, contextPropsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/table/explore/StandaloneQueryWrapper.java b/src/main/java/org/sagebionetworks/web/client/widget/table/explore/StandaloneQueryWrapper.java index 8390dff9af..84fa7730e5 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/table/explore/StandaloneQueryWrapper.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/table/explore/StandaloneQueryWrapper.java @@ -2,7 +2,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.jsinterop.StandaloneQueryWrapperProps; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -14,7 +14,7 @@ public StandaloneQueryWrapper( String sql ) { StandaloneQueryWrapperProps props = StandaloneQueryWrapperProps.create(sql); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.StandaloneQueryWrapper, props, contextPropsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/table/modal/fileview/CreateTableViewWizard.java b/src/main/java/org/sagebionetworks/web/client/widget/table/modal/fileview/CreateTableViewWizard.java index 7dde69737f..79f02d9401 100755 --- a/src/main/java/org/sagebionetworks/web/client/widget/table/modal/fileview/CreateTableViewWizard.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/table/modal/fileview/CreateTableViewWizard.java @@ -6,7 +6,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.CreateTableViewWizardProps; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -29,12 +29,12 @@ public CreateTableViewWizard( } private void renderComponent(CreateTableViewWizardProps props) { - ReactNode reactNode = React.createElementWithSynapseContext( + ReactElement reactElement = React.createElementWithSynapseContext( SRC.SynapseComponents.CreateTableViewWizard, props, propsProvider.getJsInteropContextProps() ); - reactComponent.render(reactNode); + reactComponent.render(reactElement); } public void configure( diff --git a/src/main/java/org/sagebionetworks/web/client/widget/table/v2/TableEntityWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/table/v2/TableEntityWidgetViewImpl.java index b23b246d51..40ae6eff47 100755 --- a/src/main/java/org/sagebionetworks/web/client/widget/table/v2/TableEntityWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/table/v2/TableEntityWidgetViewImpl.java @@ -19,7 +19,7 @@ import org.sagebionetworks.web.client.jsinterop.QueryWrapperPlotNavProps.OnQueryResultBundleCallback; import org.sagebionetworks.web.client.jsinterop.QueryWrapperPlotNavProps.OnViewSharingSettingsHandler; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.utils.Callback; import org.sagebionetworks.web.client.widget.FullWidthAlert; @@ -188,7 +188,7 @@ public void setAddToDownloadList(IsWidget w) { public void setItemsEditorVisible(boolean visible) { itemsEditorContainer.setVisible(visible); if (visible) { - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.DatasetItemsEditor, this.presenter.getItemsEditorProps(), propsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/table/v2/schema/ColumnModelsEditorWidgetViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/table/v2/schema/ColumnModelsEditorWidgetViewImpl.java index 17ecb94cc3..d64020ecd9 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/table/v2/schema/ColumnModelsEditorWidgetViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/table/v2/schema/ColumnModelsEditorWidgetViewImpl.java @@ -4,7 +4,7 @@ import com.google.inject.Inject; import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.jsinterop.TableColumnSchemaEditorProps; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -27,12 +27,12 @@ public ColumnModelsEditorWidgetViewImpl( @Override public void renderComponent(TableColumnSchemaEditorProps props) { - ReactNode reactNode = React.createElementWithSynapseContext( + ReactElement reactElement = React.createElementWithSynapseContext( SRC.SynapseComponents.TableColumnSchemaEditor, props, propsProvider.getJsInteropContextProps() ); - reactComponent.render(reactNode); + reactComponent.render(reactElement); } @Override diff --git a/src/main/java/org/sagebionetworks/web/client/widget/trash/TrashCanList.java b/src/main/java/org/sagebionetworks/web/client/widget/trash/TrashCanList.java index 28cdb0295d..f18e3519e9 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/trash/TrashCanList.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/trash/TrashCanList.java @@ -2,7 +2,7 @@ import org.sagebionetworks.web.client.context.SynapseReactClientFullContextPropsProvider; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.widget.ReactComponent; @@ -11,7 +11,7 @@ public class TrashCanList extends ReactComponent { public TrashCanList( SynapseReactClientFullContextPropsProvider contextPropsProvider ) { - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.TrashCanList, null, contextPropsProvider.getJsInteropContextProps() diff --git a/src/main/java/org/sagebionetworks/web/client/widget/user/UserBadgeViewImpl.java b/src/main/java/org/sagebionetworks/web/client/widget/user/UserBadgeViewImpl.java index 04810381a7..3be89c7b48 100644 --- a/src/main/java/org/sagebionetworks/web/client/widget/user/UserBadgeViewImpl.java +++ b/src/main/java/org/sagebionetworks/web/client/widget/user/UserBadgeViewImpl.java @@ -23,7 +23,7 @@ import org.sagebionetworks.web.client.jsinterop.JSON; import org.sagebionetworks.web.client.jsinterop.MenuAction; import org.sagebionetworks.web.client.jsinterop.React; -import org.sagebionetworks.web.client.jsinterop.ReactNode; +import org.sagebionetworks.web.client.jsinterop.ReactElement; import org.sagebionetworks.web.client.jsinterop.SRC; import org.sagebionetworks.web.client.jsinterop.UserCardProps; import org.sagebionetworks.web.client.place.Profile; @@ -118,7 +118,7 @@ public void configure( extraCssClassStrings ); - ReactNode component = React.createElementWithSynapseContext( + ReactElement component = React.createElementWithSynapseContext( SRC.SynapseComponents.UserCard, props, propsProvider.getJsInteropContextProps()