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

View File

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

View File

@ -284,7 +284,6 @@ function StyledTable<T>() {
[data-display='table-body'] > [data-display='table-row'] {
> [data-display='table-cell']:first-child {
padding-left: 15px;
width: 6%;
}
> [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/node": "^18.18.6",
"@types/node-ipc": "9.2.2",
"@types/react": "16.14.34",
"@types/react-dom": "16.9.17",
"@types/react": "17.0.2",
"@types/react-dom": "17.0.2",
"@types/semver": "7.5.4",
"@types/sinon": "10.0.20",
"@types/terser-webpack-plugin": "5.0.4",
@ -99,11 +99,11 @@
"pkg": "^5.8.1",
"pnp-webpack-plugin": "1.7.0",
"pretty-bytes": "6.1.1",
"react": "16.8.5",
"react-dom": "16.8.5",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-i18next": "13.3.0",
"redux": "4.2.1",
"rendition": "19.3.2",
"rendition": "35.1.0",
"semver": "7.5.4",
"sinon": "16.1.3",
"style-loader": "2.0.0",