Skip to content
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

Upgrade react to latest stable version (18.3.1) #5596

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@
"lodash.set": "^4.3.2",
"monaco-editor": "^0.45.0",
"polished": "^4.1.3",
"react": "^17.0.1",
"react": "^18.3.1",
"react-ace": "^9.4.3",
"react-chartjs-2": "^4.0.1",
"react-color": "^2.19.3",
"react-css-theme-switcher": "^0.3.0",
"react-custom-scrollbars": "^4.2.1",
"react-dom": "^17.0.1",
"react-dom": "^18.3.1",
"react-editor-js": "^1.9.0",
"react-error-boundary": "^3.1.4",
"react-flow-renderer": "^10.2.2",
Expand Down
32 changes: 15 additions & 17 deletions apps/web/src/components/layout/components/ListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,21 @@ export const ListPage = <TRow extends object>({
<PageHeader title={title} />
{children}
{paginationInfo && (
<>
<StickyFooter>
<PaginationWrapper>
<Pagination
totalItemCount={paginationInfo.totalItemCount}
totalPageCount={paginationInfo.totalPageCount}
currentPageNumber={paginationInfo.currentPageNumber}
pageSize={paginationInfo.pageSize}
onPageChange={paginationInfo.onPageChange}
>
<Pagination.PageSizeSelect onPageSizeChange={paginationInfo.onPageSizeChange} />
<Pagination.ControlBar />
<Pagination.GoToPageInput label={'Go to'} placeholder={'page'} />
</Pagination>
</PaginationWrapper>
</StickyFooter>
</>
<StickyFooter>
<PaginationWrapper>
<Pagination
totalItemCount={paginationInfo.totalItemCount}
totalPageCount={paginationInfo.totalPageCount}
currentPageNumber={paginationInfo.currentPageNumber}
pageSize={paginationInfo.pageSize}
onPageChange={paginationInfo.onPageChange}
>
<Pagination.PageSizeSelect onPageSizeChange={paginationInfo.onPageSizeChange} />
<Pagination.ControlBar />
<Pagination.GoToPageInput label={'Go to'} placeholder={'page'} />
</Pagination>
</PaginationWrapper>
</StickyFooter>
)}
</PageContainer>
);
Expand Down
10 changes: 6 additions & 4 deletions apps/web/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import App from './App';
import { initializeApp } from './initializeApp';
import reportWebVitals from './reportWebVitals';
Expand All @@ -8,11 +8,13 @@ import './styled-system/styles.css';

initializeApp();

ReactDOM.render(
const container = document.getElementById('root');
const root = createRoot(container);

root.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
</React.StrictMode>
);

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ const CenterDiv = styled.div`
line-height: 20px;
`;

const SelectProviderBodyContainer = styled.form`
const SelectProviderBodyContainer = styled.div`
flex: 1;
display: flex;
flex-direction: column;
Expand Down
4 changes: 2 additions & 2 deletions apps/widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"iframe-resizer": "^4.3.1",
"jwt-decode": "^3.1.2",
"polished": "^4.1.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-infinite-scroll-component": "^6.0.0",
"react-infinite-scroller": "^1.2.4",
"react-is": "^18.2.0",
Expand Down
8 changes: 4 additions & 4 deletions enterprise/packages/billing-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
"@types/node": "^18.11.12",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rimraf": "^3.0.2",
"ts-loader": "~9.4.0",
"tslib": "^2.3.1",
"typescript": "4.9.5"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
}
8 changes: 4 additions & 4 deletions enterprise/packages/echo/echo-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
"@types/react-dom": "^17.0.0",
"eslint": "^8.33.0",
"eslint-plugin-react-hooks": "^4.4.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rimraf": "^3.0.2",
"ts-loader": "~9.4.0",
"tslib": "^2.3.1",
"typescript": "4.9.5"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
}
8 changes: 4 additions & 4 deletions enterprise/packages/translation-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
"@types/node": "^18.11.12",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rimraf": "^3.0.2",
"ts-loader": "~9.4.0",
"tslib": "^2.3.1",
"typescript": "4.9.5"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
}
8 changes: 4 additions & 4 deletions libs/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
"acorn": "^8.7.1",
"eslint-plugin-storybook": "^0.6.13",
"jsdom": "^24.0.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "6.2.2",
"react-scanner": "^1.1.0",
"rimraf": "^3.0.2",
Expand All @@ -89,8 +89,8 @@
"vitest": "^1.2.1"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"nx": {
"targets": {
Expand Down
13 changes: 4 additions & 9 deletions libs/design-system/src/search-input/SearchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ const StyledInput = styled(Input)<InputProps & ISearchInputProps>`
}
`;

const IconCloseStyled = styled(IconClose)<{ isVisible: boolean }>`
const IconCloseStyled = styled(IconClose)`
cursor: pointer;
display: ${({ isVisible }) => (isVisible ? 'initial' : 'none')};
`;

export const SearchInput = forwardRef<HTMLInputElement, ISearchInputProps>(
Expand All @@ -47,13 +46,9 @@ export const SearchInput = forwardRef<HTMLInputElement, ISearchInputProps>(
value={value}
icon={<IconSearch title="search" />}
rightSection={
<IconCloseStyled
isVisible={!!value}
title="clear"
onClick={onClearClick}
data-test-id="search-input-clear"
role="button"
/>
!!value && (
<IconCloseStyled title="clear" onClick={onClearClick} data-test-id="search-input-clear" role="button" />
)
}
/>
);
Expand Down
47 changes: 30 additions & 17 deletions libs/design-system/src/table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,19 @@ export function Table<T extends object>({
<MantineTable className={classes.root} {...defaultDesign} {...getTableProps()} {...props}>
<thead>
{headerGroups.map((headerGroup, i) => {
const { key: trKey, ...trRest } = headerGroup.getHeaderGroupProps();

return (
<tr {...headerGroup.getHeaderGroupProps()}>
{headerGroup.headers.map((column) => (
<th {...column.getHeaderProps()}>{column.render('Header')}</th>
))}
<tr key={trKey} {...trRest}>
{headerGroup.headers.map((column) => {
const { key: thKey, ...thRest } = column.getHeaderProps();

return (
<th key={thKey} {...thRest}>
{column.render('Header')}
</th>
);
})}
</tr>
);
})}
Expand All @@ -196,30 +204,35 @@ export function Table<T extends object>({
{rows.map((row) => {
prepareRow(row);

const { key: trKey, ...trRest } = row.getRowProps();

return (
<tr
key={trKey}
onClick={(e) => {
e.stopPropagation();
if (!loading && onRowClick) {
onRowClick(row);
}
}}
{...row.getRowProps()}
{...trRest}
className={classes.tableRow}
data-disabled={loading || !onRowClick}
>
{row.cells.map((cell, i) => (
<td
{...cell.getCellProps({
style: {
maxWidth: cell.column.maxWidth,
width: cell.column.width,
},
})}
>
{cell.render('Cell', { isLoading: loading })}
</td>
))}
{row.cells.map((cell, i) => {
const { key: tdKey, ...tdRest } = cell.getCellProps({
style: {
maxWidth: cell.column.maxWidth,
width: cell.column.width,
},
});

return (
<td key={tdKey} {...tdRest}>
{cell.render('Cell', { isLoading: loading })}
</td>
);
})}
</tr>
);
})}
Expand Down
8 changes: 4 additions & 4 deletions libs/shared-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
"@types/node": "^18.11.12",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rimraf": "^3.0.2",
"tslib": "^2.3.1",
"typescript": "4.9.5"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"dependencies": {
"@novu/notification-center": "^0.24.2",
"@types/react": "^17.0.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tslib": "^2.3.0"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/notification-center-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"@emotion/css": "^11.10.5",
"@novu/floating-vue": "^2.0.3",
"@novu/notification-center": "^0.24.2",
"react": "^17.0.1",
"react-dom": "^17.0.1"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"peerDependencies": {
"vue": ">=3.0.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/notification-center/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"jest-transform-stub": "^2.0.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rimraf": "^3.0.2",
"storybook": "^7.4.2",
"terser-webpack-plugin": "^5.3.9",
Expand All @@ -71,8 +71,8 @@
"webpack-cli": "^5.1.4"
},
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"dependencies": {
"@emotion/css": "^11.10.5",
Expand Down
Loading
Loading