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

[DEV] REACT18 #1999

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
152 changes: 44 additions & 108 deletions package-lock.json

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

12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,8 @@
"r2-streamer-js": "^1.0.46",
"r2-utils-js": "^1.0.35",
"ramda": "^0.29.0",
"react": "^17.0.2",
"react-beautiful-dnd": "^13.1.1",
"react-dom": "^17.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
"react-focus-lock": "^2.9.5",
"react-redux": "^7.2.9",
Expand All @@ -306,6 +305,7 @@
"yazl": "^2.5.1"
},
"devDependencies": {
"@axe-core/react": "^4.7.3",
"@babel/generator": "^7.22.10",
"@electron/notarize": "^2.1.0",
"@electron/rebuild": "^3.2.13",
Expand All @@ -324,9 +324,8 @@
"@types/mime-types": "^2.1.1",
"@types/node": "^18.17.1",
"@types/ramda": "^0.29.3",
"@types/react": "^17.0.62",
"@types/react-beautiful-dnd": "^13.1.4",
"@types/react-dom": "^17.0.20",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"@types/react-redux": "^7.1.25",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
Expand Down Expand Up @@ -381,7 +380,6 @@
"postcss-mixins": "^9.0.4",
"postcss-nesting": "^12.0.1",
"prettier": "^3.0.1",
"react-axe": "^3.5.4",
"react-svg-loader": "^3.0.3",
"remote-redux-devtools": "^0.5.16",
"rimraf": "^5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/common/components/OutsideClickAlerter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import * as React from "react";

// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface IBaseProps {
interface IBaseProps extends React.PropsWithChildren {
onClickOutside: () => void;
disabled?: boolean;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ const Progression = (props: {
return (<></>);
};

export const PublicationInfoContent: React.FC<IProps> = (props) => {
export const PublicationInfoContent: React.FC<IProps & React.PropsWithChildren> = (props) => {

// tslint:disable-next-line: max-line-length
const { closeDialogCb, readerReadingLocation, pdfPlayerNumberOfPages, divinaNumberOfPages, divinaContinousEqualTrue, r2Publication: r2Publication_, manifestUrlR2Protocol, handleLinkUrl, publicationViewMaybeOpds, toggleCoverZoomCb, ControlComponent, TagManagerComponent, coverZoom, translator, onClikLinkCb, focusWhereAmI } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Cover from "../../Cover";
import Loader from "../../Loader";
import Dialog from "../Dialog";

export interface IProps extends TranslatorProps {
export interface IProps extends TranslatorProps, React.PropsWithChildren {
publicationViewMaybeOpds: TPublication;
coverZoom: boolean;
toggleCoverZoomCb: (coverZoom: boolean) => void;
Expand Down Expand Up @@ -52,8 +52,7 @@ const PublicationInfoManager: React.FC<IProps> = (props) => {
(e: React.KeyboardEvent<HTMLImageElement>) =>
e.key === "Enter" && toggleCoverZoomCb(coverZoom)
}
>
</Cover>
/>
:
<>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { IOpdsTagView } from "readium-desktop/common/views/opds";
import * as CrossIcon from "readium-desktop/renderer/assets/icons/baseline-close-24px-blue.svg";
import SVG from "readium-desktop/renderer/common/components/SVG";

export interface IProps {
export interface IProps extends React.PropsWithChildren {
tag: string | IOpdsTagView;
index?: number;
__?: I18nTyped;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/common/components/hoc/translator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface TranslatorProps {
translator?: Translator;
}

type TComponentConstructor<P> = React.ComponentClass<P> | React.StatelessComponent<P>;
type TComponentConstructor<P> = React.ComponentClass<P> | React.FunctionComponent<P>; // React.StatelessComponent<P>;

export function withTranslator<Props>(WrappedComponent: TComponentConstructor<Props & TranslatorProps>) {
const WrapperComponent = class extends React.Component<Props & TranslatorProps, undefined> {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/common/components/menu/AccessibleMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import FocusLock from "react-focus-lock";
import OutsideClickAlerter from "readium-desktop/renderer/common/components/OutsideClickAlerter";

// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface IBaseProps {
interface IBaseProps extends React.PropsWithChildren {
className?: string;
visible: boolean;
toggleMenu: () => void;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/common/components/menu/MenuButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import * as React from "react";

// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface IBaseProps {
interface IBaseProps extends React.PropsWithChildren {
menuId: string;
open: boolean;
toggle: () => void;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/common/components/menu/MenuContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as ReactDOM from "react-dom";
import AccessibleMenu from "./AccessibleMenu";

// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface IBaseProps {
interface IBaseProps extends React.PropsWithChildren {
id: string;
open: boolean;
dir: string;
Expand Down
Loading