patch: bump react, react-dom + related @types to 17.0.2 and rendition to 35.1.0

This commit is contained in:
Edwin Joassart 2023-10-19 14:06:57 +02:00
parent da7c6854c7
commit ed5b9ecacd
5 changed files with 6742 additions and 1408 deletions

View File

@ -76,26 +76,26 @@ function isDrivelistDrive(drive: Drive): drive is DrivelistDrive {
const DrivesTable = styled((props: GenericTableProps<Drive>) => ( const DrivesTable = styled((props: GenericTableProps<Drive>) => (
<Table<Drive> {...props} /> <Table<Drive> {...props} />
))` ))`
[data-display="table-head"], // [data-display="table-head"],
[data-display="table-body"] { // [data-display="table-body"] {
> [data-display="table-row"] > [data-display="table-cell"] { // > [data-display="table-row"] > [data-display="table-cell"] {
&:nth-child(2) { // &:nth-child(2) {
width: 32%; // width: 32%;
} // }
&:nth-child(3) { // &:nth-child(3) {
width: 15%; // width: 15%;
} // }
&:nth-child(4) { // &:nth-child(4) {
width: 15%; // width: 15%;
} // }
&:nth-child(5) { // &:nth-child(5) {
width: 32%; // width: 32%;
} // }
} // }
} // }
`; `;
function badgeShadeFromStatus(status: string) { function badgeShadeFromStatus(status: string) {
@ -428,11 +428,13 @@ export class DriveSelector extends React.Component<
) : ( ) : (
<> <>
<DrivesTable <DrivesTable
refFn={(t) => { // refFn={(t) => {
if (t !== null) { // if (t !== null) {
t.setRowSelection(selectedList);
} // // t.setRowSelection(selectedList);
}} // }
// }}
checkedItems={selectedList}
checkedRowsNumber={selectedList.length} checkedRowsNumber={selectedList.length}
multipleSelection={this.props.multipleSelection} multipleSelection={this.props.multipleSelection}
columns={this.tableColumns} columns={this.tableColumns}

View File

@ -14,18 +14,18 @@
* limitations under the License. * limitations under the License.
*/ */
import GithubSvg from '@fortawesome/fontawesome-free/svgs/brands/github.svg'; import GithubSvg from "@fortawesome/fontawesome-free/svgs/brands/github.svg";
import * as _ from 'lodash'; import * as _ from "lodash";
import * as React from 'react'; import * as React from "react";
import { Box, Checkbox, Flex, TextWithCopy, Txt } from 'rendition'; import { Box, Checkbox, Flex, Txt } from "rendition";
import { version, packageType } from '../../../../../package.json'; import { version, packageType } from "../../../../../package.json";
import * as settings from '../../models/settings'; import * as settings from "../../models/settings";
import * as analytics from '../../modules/analytics'; import * as analytics from "../../modules/analytics";
import { open as openExternal } from '../../os/open-external/services/open-external'; import { open as openExternal } from "../../os/open-external/services/open-external";
import { Modal } from '../../styled-components'; import { Modal } from "../../styled-components";
import * as i18next from 'i18next'; import * as i18next from "i18next";
import { etcherProInfo } from '../../utils/etcher-pro-specific'; import { etcherProInfo } from "../../utils/etcher-pro-specific";
interface Setting { interface Setting {
name: string; name: string;
@ -35,18 +35,18 @@ interface Setting {
async function getSettingsList(): Promise<Setting[]> { async function getSettingsList(): Promise<Setting[]> {
const list: Setting[] = [ const list: Setting[] = [
{ {
name: 'errorReporting', name: "errorReporting",
label: i18next.t('settings.errorReporting'), label: i18next.t("settings.errorReporting"),
}, },
{ {
name: 'autoBlockmapping', name: "autoBlockmapping",
label: i18next.t('settings.trimExtPartitions'), label: i18next.t("settings.trimExtPartitions"),
}, },
]; ];
if (['appimage', 'nsis', 'dmg'].includes(packageType)) { if (["appimage", "nsis", "dmg"].includes(packageType)) {
list.push({ list.push({
name: 'updatesEnabled', name: "updatesEnabled",
label: i18next.t('settings.autoUpdate'), label: i18next.t("settings.autoUpdate"),
}); });
} }
return list; return list;
@ -61,7 +61,9 @@ const EPInfo = etcherProInfo();
const InfoBox = (props: any) => ( const InfoBox = (props: any) => (
<Box fontSize={14}> <Box fontSize={14}>
<Txt>{props.label}</Txt> <Txt>{props.label}</Txt>
<TextWithCopy code text={props.value} copy={props.value} /> <Txt code copy={props.value}>
{props.value}{" "}
</Txt>
</Box> </Box>
); );
@ -87,7 +89,7 @@ export function SettingsModal({ toggleModal }: SettingsModalProps) {
const toggleSetting = async (setting: string) => { const toggleSetting = async (setting: string) => {
const value = currentSettings[setting]; const value = currentSettings[setting];
analytics.logEvent('Toggle setting', { setting, value }); analytics.logEvent("Toggle setting", { setting, value });
await settings.set(setting, !value); await settings.set(setting, !value);
setCurrentSettings({ setCurrentSettings({
...currentSettings, ...currentSettings,
@ -99,7 +101,7 @@ export function SettingsModal({ toggleModal }: SettingsModalProps) {
<Modal <Modal
titleElement={ titleElement={
<Txt fontSize={24} mb={24}> <Txt fontSize={24} mb={24}>
{i18next.t('settings.settings')} {i18next.t("settings.settings")}
</Txt> </Txt>
} }
done={() => toggleModal(false)} done={() => toggleModal(false)}
@ -120,7 +122,7 @@ export function SettingsModal({ toggleModal }: SettingsModalProps) {
})} })}
{EPInfo !== undefined && ( {EPInfo !== undefined && (
<Flex flexDirection="column"> <Flex flexDirection="column">
<Txt fontSize={24}>{i18next.t('settings.systemInformation')}</Txt> <Txt fontSize={24}>{i18next.t("settings.systemInformation")}</Txt>
{EPInfo.get_serial() === undefined ? ( {EPInfo.get_serial() === undefined ? (
<InfoBox label="UUID" value={EPInfo.uuid} /> <InfoBox label="UUID" value={EPInfo.uuid} />
) : ( ) : (
@ -133,13 +135,13 @@ export function SettingsModal({ toggleModal }: SettingsModalProps) {
alignItems="center" alignItems="center"
color="#00aeef" color="#00aeef"
style={{ style={{
width: 'fit-content', width: "fit-content",
cursor: 'pointer', cursor: "pointer",
fontSize: 14, fontSize: 14,
}} }}
onClick={() => onClick={() =>
openExternal( openExternal(
'https://github.com/balena-io/etcher/blob/master/CHANGELOG.md', "https://github.com/balena-io/etcher/blob/master/CHANGELOG.md"
) )
} }
> >
@ -148,7 +150,7 @@ export function SettingsModal({ toggleModal }: SettingsModalProps) {
fill="currentColor" fill="currentColor"
style={{ marginRight: 8 }} style={{ marginRight: 8 }}
/> />
<Txt style={{ borderBottom: '1px solid #00aeef' }}>{version}</Txt> <Txt style={{ borderBottom: "1px solid #00aeef" }}>{version}</Txt>
</Flex> </Flex>
</Flex> </Flex>
</Modal> </Modal>

View File

@ -284,7 +284,6 @@ function StyledTable<T>() {
[data-display='table-body'] > [data-display='table-row'] { [data-display='table-body'] > [data-display='table-row'] {
> [data-display='table-cell']:first-child { > [data-display='table-cell']:first-child {
padding-left: 15px; padding-left: 15px;
width: 6%;
} }
> [data-display='table-cell']:last-child { > [data-display='table-cell']:last-child {

8039
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -65,8 +65,8 @@
"@types/mocha": "^10.0.3", "@types/mocha": "^10.0.3",
"@types/node": "^18.18.6", "@types/node": "^18.18.6",
"@types/node-ipc": "9.2.2", "@types/node-ipc": "9.2.2",
"@types/react": "16.14.34", "@types/react": "17.0.2",
"@types/react-dom": "16.9.17", "@types/react-dom": "17.0.2",
"@types/semver": "7.5.4", "@types/semver": "7.5.4",
"@types/sinon": "10.0.20", "@types/sinon": "10.0.20",
"@types/terser-webpack-plugin": "5.0.4", "@types/terser-webpack-plugin": "5.0.4",
@ -99,11 +99,11 @@
"pkg": "^5.8.1", "pkg": "^5.8.1",
"pnp-webpack-plugin": "1.7.0", "pnp-webpack-plugin": "1.7.0",
"pretty-bytes": "6.1.1", "pretty-bytes": "6.1.1",
"react": "16.8.5", "react": "17.0.2",
"react-dom": "16.8.5", "react-dom": "17.0.2",
"react-i18next": "13.3.0", "react-i18next": "13.3.0",
"redux": "4.2.1", "redux": "4.2.1",
"rendition": "19.3.2", "rendition": "35.1.0",
"semver": "7.5.4", "semver": "7.5.4",
"sinon": "16.1.3", "sinon": "16.1.3",
"style-loader": "2.0.0", "style-loader": "2.0.0",