Skip to content

Commit

Permalink
Merge branch 'develop' into arthur/ui/dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
panaC committed Oct 30, 2023
2 parents 82bbacc + f8da522 commit ce731fa
Show file tree
Hide file tree
Showing 22 changed files with 2,260 additions and 2,531 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ See: https://github.com/edrlab/thorium-reader/wiki/Localization-(l10n)-language-

## Prerequisites

1) NodeJS 16 (check with `node --version`)
2) NPM 8 (check with `npm --version`)
1) NodeJS 18 (check with `node --version`)
2) NPM 9 (check with `npm --version`)

## Technologies

Expand Down
4,554 changes: 2,131 additions & 2,423 deletions package-lock.json

Large diffs are not rendered by default.

137 changes: 67 additions & 70 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"postinstall": "npm run pinCompromisedColorPackage && npm run electron-build",
"pinCompromisedColorPackage": "(npm ls colors || echo \"NPM LS?\") && rimraf node_modules/electron-rebuild/node_modules/colors && rimraf node_modules/dir-compare/node_modules/colors",
"pinCompromisedColorPackage_": "find node_modules -maxdepth 100 -type d -name \"colors\" && npm ls colors",
"electron-build_": "npm rebuild --runtime=electron --target=25.4.0 --disturl=https://electronjs.org/headers --build-from-source",
"electron-build": "electron-rebuild --version=25.4.0 --disturl=https://electronjs.org/headers",
"electron-build_": "npm rebuild --runtime=electron --target=27.0.2 --disturl=https://electronjs.org/headers --build-from-source",
"electron-build": "electron-rebuild --version=27.0.2 --disturl=https://electronjs.org/headers",
"rmDupeReactReduxTypes": "rimraf \"./node_modules/@types/react-redux/node_modules/@types/react\"",
"build": "cross-env NODE_ENV=production webpack --config webpack.config.js && ncp src/package.json dist/package.json",
"build:prod": "npm run lint && npm run build",
Expand Down Expand Up @@ -258,36 +258,35 @@
"debounce": "^1.2.1",
"debug": "^4.3.4",
"divina-player-js": "git+https://github.com/readium/divina-player-js.git#4e1f859afb14b916923ec136af0284a72e22a990",
"dompurify": "^3.0.5",
"dompurify": "^3.0.6",
"fetch-cookie": "^2.1.0",
"glob": "^10.3.3",
"glob": "^10.3.10",
"history": "^5.3.0",
"i18next": "^23.4.4",
"inversify": "^6.0.1",
"i18next": "^23.6.0",
"inversify": "^6.0.2",
"inversify-inject-decorators": "^3.1.0",
"jsdom": "^22.1.0",
"lunr": "^2.3.9",
"lunr-languages": "^1.12.0",
"lunr-languages": "^1.14.0",
"match-sorter": "^6.3.1",
"mathjax": "^3.2.2",
"mime-types": "^2.1.35",
"nanoid": "^4.0.2",
"nanoid": "^5.0.2",
"node-fetch": "^3.3.2",
"r2-lcp-js": "^1.0.38",
"r2-navigator-js": "^1.13.9",
"r2-opds-js": "^1.0.42",
"r2-shared-js": "^1.0.69",
"r2-shared-js": "^1.0.70",
"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",
"ramda": "^0.29.1",
"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",
"react-router": "^6.14.2",
"react-router-dom": "^6.14.2",
"react-focus-lock": "^2.9.6",
"react-redux": "^8.1.3",
"react-router": "^6.17.0",
"react-router-dom": "^6.17.0",
"react-table": "^7.8.0",
"redux": "^4.2.1",
"redux-first-history": "^5.1.1",
Expand All @@ -300,108 +299,106 @@
"tmp": "^0.2.1",
"typed-redux-saga": "^1.5.0",
"use-sync-external-store": "^1.2.0",
"uuid": "^9.0.0",
"uuid": "^9.0.1",
"validator": "^13.11.0",
"xml-js": "^1.6.11",
"yargs": "^17.7.2",
"yauzl": "^2.10.0",
"yazl": "^2.5.1"
},
"devDependencies": {
"@babel/generator": "^7.22.10",
"@axe-core/react": "^4.8.1",
"@babel/generator": "^7.23.0",
"@electron/notarize": "^2.1.0",
"@electron/rebuild": "^3.2.13",
"@electron/rebuild": "^3.3.0",
"@kogai/typed_i18n": "^0.6.0",
"@octokit/rest": "^20.0.1",
"@octokit/rest": "^20.0.2",
"@redux-devtools/extension": "^3.2.5",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-terser": "^0.4.4",
"@types/classnames": "^2.3.1",
"@types/commonmark": "^0.27.6",
"@types/debounce": "^1.2.1",
"@types/dompurify": "^3.0.2",
"@types/commonmark": "^0.27.8",
"@types/debounce": "^1.2.3",
"@types/dompurify": "^3.0.4",
"@types/glob": "^8.1.0",
"@types/jest": "^29.5.3",
"@types/jsdom": "^21.1.1",
"@types/lunr": "^2.3.4",
"@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-redux": "^7.1.25",
"@types/jest": "^29.5.6",
"@types/jsdom": "^21.1.4",
"@types/lunr": "^2.3.6",
"@types/mime-types": "^2.1.3",
"@types/node": "^18.18.7",
"@types/ramda": "^0.29.7",
"@types/react": "^18.2.33",
"@types/react-dom": "^18.2.14",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@types/react-table": "^7.7.14",
"@types/react-table": "^7.7.17",
"@types/redux": "^3.6.31",
"@types/remote-redux-devtools": "^0.5.5",
"@types/tmp": "^0.2.3",
"@types/urijs": "^1.19.19",
"@types/use-sync-external-store": "^0.0.4",
"@types/uuid": "^9.0.2",
"@types/validator": "^13.11.1",
"@types/xmldom": "^0.1.31",
"@types/yargs": "^17.0.24",
"@types/yauzl": "^2.10.0",
"@types/yazl": "^2.4.2",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@typescript-eslint/parser": "^6.3.0",
"@types/remote-redux-devtools": "^0.5.7",
"@types/tmp": "^0.2.5",
"@types/urijs": "^1.19.22",
"@types/use-sync-external-store": "^0.0.5",
"@types/uuid": "^9.0.6",
"@types/validator": "^13.11.5",
"@types/xmldom": "^0.1.33",
"@types/yargs": "^17.0.29",
"@types/yauzl": "^2.10.2",
"@types/yazl": "^2.4.4",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@vanilla-extract/babel-plugin": "^1.2.0",
"@vanilla-extract/css": "^1.12.0",
"@vanilla-extract/webpack-plugin": "^2.2.0",
"@vanilla-extract/css": "^1.13.0",
"@vanilla-extract/webpack-plugin": "^2.3.1",
"babel-loader": "^9.1.3",
"babel-plugin-macros": "^3.1.0",
"concurrently": "^8.2.0",
"concurrently": "^8.2.2",
"copy-webpack-plugin": "^11.0.0",
"cross-env": "^7.0.3",
"css-hot-loader": "^1.4.4",
"css-loader": "^6.8.1",
"devtron": "^1.4.0",
"eclint": "^2.8.1",
"electron": "^25.5.0",
"electron-builder": "^24.6.3",
"electron": "^27.0.2",
"electron-builder": "^24.6.4",
"electron-devtools-installer": "^3.2.0",
"eslint": "^8.46.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-local-rules": "^1.3.2",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.33.1",
"eslint-plugin-local-rules": "^2.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2",
"file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^8.0.0",
"fork-ts-checker-webpack-plugin": "^9.0.0",
"git-rev-sync": "^3.0.2",
"html-loader": "^4.2.0",
"html-webpack-plugin": "^5.5.3",
"i18next-json-sync": "^3.1.2",
"jest": "^29.6.2",
"jest": "^29.7.0",
"json-diff": "^1.0.6",
"markdown-loader": "^8.0.0",
"mini-css-extract-plugin": "^2.7.6",
"ncp": "^2.0.0",
"node-loader": "^2.0.0",
"postcss": "^8.4.27",
"postcss": "^8.4.31",
"postcss-import": "^15.1.0",
"postcss-loader": "^7.3.3",
"postcss-mixins": "^9.0.4",
"postcss-nesting": "^12.0.1",
"prettier": "^3.0.1",
"react-axe": "^3.5.4",
"prettier": "^3.0.3",
"react-svg-loader": "^3.0.3",
"remote-redux-devtools": "^0.5.16",
"rimraf": "^5.0.1",
"rimraf": "^5.0.5",
"style-loader": "^3.3.3",
"stylelint": "^15.10.2",
"stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0",
"svg-sprite-loader": "^6.0.11",
"terser-webpack-plugin": "^5.3.9",
"ts-jest": "^29.1.1",
"ts-loader": "^9.4.4",
"ts-loader": "^9.5.0",
"ts-prune": "^0.10.3",
"ts-unused-exports": "^10.0.0",
"ts-unused-exports": "^10.0.1",
"tsconfig-paths": "^4.2.0",
"typed-css-modules": "^0.7.2",
"typescript": "^5.1.6",
"webpack": "^5.88.2",
"webpack-bundle-analyzer": "^4.9.0",
"typed-css-modules": "^0.8.0",
"typescript": "^5.2.2",
"webpack": "^5.89.0",
"webpack-bundle-analyzer": "^4.9.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"webpack-node-externals": "^3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"postinstall": "npm run pinCompromisedColorPackage && npm run electron-build",
"pinCompromisedColorPackage": "(npm ls colors || echo \"NPM LS?\") && rimraf node_modules/electron-rebuild/node_modules/colors && rimraf node_modules/dir-compare/node_modules/colors",
"pinCompromisedColorPackage_": "find node_modules -maxdepth 100 -type d -name \"colors\" && npm ls colors",
"electron-build_": "npm rebuild --runtime=electron --target=25.4.0 --disturl=https://electronjs.org/headers --build-from-source",
"electron-build": "electron-rebuild --version=25.4.0 --disturl=https://electronjs.org/headers"
"electron-build_": "npm rebuild --runtime=electron --target=27.0.2 --disturl=https://electronjs.org/headers --build-from-source",
"electron-build": "electron-rebuild --version=27.0.2 --disturl=https://electronjs.org/headers"
},
"repository": {
"type": "git",
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 @@ -21,7 +21,7 @@ interface IBaseProps {
interface IProps extends IBaseProps {
}

export default class OutsideClickAlerter extends React.Component<IProps, undefined> {
export default class OutsideClickAlerter extends React.Component<React.PropsWithChildren<IProps>, undefined> {
private wrapperRef: React.RefObject<HTMLDivElement>;

constructor(props: IProps) {
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/common/components/dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface IBaseProps extends TranslatorProps {
interface IProps extends IBaseProps, ReturnType<typeof mapDispatchToProps> {
}

class Dialog extends React.Component<IProps, undefined> {
class Dialog extends React.Component<React.PropsWithChildren<IProps>, undefined> {
private appElement: HTMLElement;
private appOverlayElement: HTMLElement;
private rootElement: HTMLElement;
Expand Down Expand Up @@ -73,7 +73,7 @@ class Dialog extends React.Component<IProps, undefined> {
this.appOverlayElement.removeChild(this.rootElement);
}

public render(): React.ReactElement<{}> {
public render(): React.ReactNode {
const content = this.props.children;
// const dialogTitle = this.props.children;
const className = this.props.className;
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<React.PropsWithChildren<IProps>> = (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 @@ -23,7 +23,7 @@ export interface IProps extends TranslatorProps {
closeDialogCb: () => void;
}

const PublicationInfoManager: React.FC<IProps> = (props) => {
const PublicationInfoManager: React.FC<React.PropsWithChildren<IProps>> = (props) => {

const { publicationViewMaybeOpds, coverZoom, toggleCoverZoomCb, closeDialogCb } = props;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface IProps {
onClickLinkCb?: (tag: IOpdsTagView) => () => void | undefined;
}

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

const { tag, index, __, pubId, onClickDeleteCb, onClickLinkCb } = props;

Expand Down
6 changes: 3 additions & 3 deletions src/renderer/common/components/hoc/translator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export interface TranslatorProps {
translator?: Translator;
}

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

export function withTranslator<Props>(WrappedComponent: TComponentConstructor<Props & TranslatorProps>) {
const WrapperComponent = class extends React.Component<Props & TranslatorProps, undefined> {
export function withTranslator<Props>(WrappedComponent: TComponentConstructor<React.PropsWithChildren<Props & TranslatorProps>>) {
const WrapperComponent = class extends React.Component<React.PropsWithChildren<Props & TranslatorProps>, undefined> {
public static displayName: string;

public render() {
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 @@ -31,7 +31,7 @@ interface IState {
triggerElem: HTMLElement | undefined;
}

export default class AccessibleMenu extends React.Component<IProps, IState> {
export default class AccessibleMenu extends React.Component<React.PropsWithChildren<IProps>, IState> {
private containerRef: React.RefObject<HTMLDivElement>;
private ismounted = false;

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 @@ -23,7 +23,7 @@ interface IBaseProps {
interface IProps extends IBaseProps {
}

export default class MenuButton extends React.Component<IProps, undefined> {
export default class MenuButton extends React.Component<React.PropsWithChildren<IProps>, undefined> {
private backFocusMenuButtonRef: React.RefObject<HTMLButtonElement>;

constructor(props: IProps) {
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 @@ -29,7 +29,7 @@ interface IBaseProps {
interface IProps extends IBaseProps {
}

export default class MenuContent extends React.Component<IProps, undefined> {
export default class MenuContent extends React.Component<React.PropsWithChildren<IProps>, undefined> {
private appElement: HTMLElement;
private appOverlayElement: HTMLElement;
private rootElement: HTMLElement;
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/library/components/SecondaryHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface IBaseProps extends TranslatorProps {
interface IProps extends IBaseProps {
}

export class SecondaryHeader extends React.Component<IProps, undefined> {
export class SecondaryHeader extends React.Component<React.PropsWithChildren<IProps>, undefined> {

constructor(props: IProps) {
super(props);
Expand Down
Loading

0 comments on commit ce731fa

Please sign in to comment.