Skip to content

Commit

Permalink
React downgraded to version 17 (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
tumms2021389 authored Oct 10, 2024
1 parent 4e228d7 commit 6d3fc77
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 69 deletions.
124 changes: 77 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pega/react-sdk-components",
"version": "24.1.10",
"version": "0.242.2",
"description": "React SDK packaging: bridge and components, overrides",
"main": "index.ts",
"scripts": {
Expand Down Expand Up @@ -62,12 +62,12 @@
"downloadjs": "^1.4.7",
"fast-deep-equal": "^3.1.3",
"lodash.difference": "^4.5.0",
"material-ui-phone-number-2": "^1.3.0",
"react": "^18.2.0",
"material-ui-phone-number": "^3.0.0",
"react": "^17.0.2",
"react-datepicker": "^4.25.0",
"react-dom": "^18.2.0",
"react-dom": "^17.0.2",
"react-number-format": "^5.4.2",
"react-redux": "^9.1.0",
"react-redux": "^8.1.3",
"react-router-dom": "^6.22.3",
"throttle-debounce": "^5.0.2"
},
Expand All @@ -82,7 +82,7 @@
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.1.2",
"@types/jest": "^29.5.11",
"@types/react": "^18.2.73",
"@types/react": "^17.0.83",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"babel-loader": "^9.1.3",
"clean-webpack-plugin": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-sdk-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pega/react-sdk-components",
"version": "24.1.10",
"version": "0.242.2",
"description": "React SDK Infrastructure: bridge and components",
"_filesComment": "During packing, npm ignores everything NOT in the files list",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@

.psdk-case-summary-fields {
padding: calc(2 * 0.5rem);
display: grid;
grid-row-gap: calc(2 * 0.5rem);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import MuiPhoneNumber from 'material-ui-phone-number-2';
import MuiPhoneNumber from 'material-ui-phone-number';

import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
import { PConnFieldProps } from '../../../types/PConnProps';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ interface LeftAlignVerticalTabsProps {
const LeftAlignVerticalTabs: any = withStyles((/* theme */) => ({
root: {
width: '100%',
maxWidth: '100%'
maxWidth: '100%',
alignItems: 'flex-start'
},
wrapper: {
display: 'block',
Expand Down
8 changes: 4 additions & 4 deletions packages/react-sdk-components/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// from react_root.js
import { createRoot } from 'react-dom/client';
import { render } from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import TopLevelApp from '../src/samples/TopLevelApp';
import './common.css';

const outletElement = document.getElementById('outlet');

if (outletElement) {
const root = createRoot(outletElement);
root.render(
render(
<BrowserRouter>
<TopLevelApp />
</BrowserRouter>
</BrowserRouter>,
document.getElementById('outlet')
);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable react/button-has-type */
import { useState, useEffect } from 'react';
import { createRoot } from 'react-dom/client';
import ReactDOM from 'react-dom';
import Typography from '@mui/material/Typography';
import CssBaseline from '@mui/material/CssBaseline';
import { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';
Expand Down Expand Up @@ -335,10 +335,9 @@ export default function EmbeddedTopLevel() {
</ThemeProvider>
</StyledEngineProvider>
);
const root = createRoot(target);

// Initial render of component passed in (which should be a RootContainer)
root.render(<>{theComponent}</>);
ReactDOM.render(<>{theComponent}</>, target);

// Initial render to show that we have a PConnect and can render in the target location
// render( <div>EmbeddedTopLevel initialRender in {domContainerID} with PConn of {componentName}</div>, target);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useMemo, useState } from 'react';
import { createRoot } from 'react-dom/client';
import ReactDOM from 'react-dom';
import { useLocation, useNavigate } from 'react-router-dom';
import CssBaseline from '@mui/material/CssBaseline';
import { ThemeProvider, StyledEngineProvider } from '@mui/material/styles';
Expand Down Expand Up @@ -106,10 +106,10 @@ export default function FullPortal() {
</StyledEngineProvider>
);

const root = createRoot(target || document.getElementById('pega-root') || document.getElementsByTagName(domContainerID)[0]);
root.render(
ReactDOM.render(
// was <Component
theComponent
theComponent,
target || document.getElementById('pega-root') || document.getElementsByTagName(domContainerID)[0]
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/react-sdk-overrides/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pega/react-sdk-overrides",
"version": "24.1.10",
"version": "0.242.2",
"description": "React SDK - Code for overriding components",
"_filesComment": "During packing, npm ignores everything NOT in the files list",
"files": [
Expand Down

0 comments on commit 6d3fc77

Please sign in to comment.