chore: Remove `react-keydown` (#2713)
* First steps of remove react-keydown, replace with hook * RegisterKeyDown component to aid transition away from react-keydown
This commit is contained in:
parent
5f00e1394d
commit
57fa1305a6
|
@ -1,20 +1,17 @@
|
|||
// @flow
|
||||
import { observable } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import { SearchIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import { withTranslation, type TFunction } from "react-i18next";
|
||||
import keydown from "react-keydown";
|
||||
import { withRouter, type RouterHistory } from "react-router-dom";
|
||||
import styled, { withTheme } from "styled-components";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import styled, { useTheme } from "styled-components";
|
||||
import Input from "./Input";
|
||||
import { type Theme } from "types";
|
||||
import { meta } from "utils/keyboard";
|
||||
import useBoolean from "hooks/useBoolean";
|
||||
import useKeyDown from "hooks/useKeyDown";
|
||||
import { isModKey } from "utils/keyboard";
|
||||
import { searchUrl } from "utils/routeHelpers";
|
||||
|
||||
type Props = {
|
||||
history: RouterHistory,
|
||||
theme: Theme,
|
||||
type Props = {|
|
||||
source: string,
|
||||
placeholder?: string,
|
||||
label?: string,
|
||||
|
@ -23,78 +20,77 @@ type Props = {
|
|||
value: string,
|
||||
onChange: (event: SyntheticInputEvent<>) => mixed,
|
||||
onKeyDown: (event: SyntheticKeyboardEvent<HTMLInputElement>) => mixed,
|
||||
t: TFunction,
|
||||
};
|
||||
|};
|
||||
|
||||
@observer
|
||||
class InputSearchPage extends React.Component<Props> {
|
||||
input: ?Input;
|
||||
@observable focused: boolean = false;
|
||||
function InputSearchPage({
|
||||
onKeyDown,
|
||||
value,
|
||||
onChange,
|
||||
placeholder,
|
||||
label,
|
||||
collectionId,
|
||||
source,
|
||||
}: Props) {
|
||||
const inputRef = React.useRef();
|
||||
const theme = useTheme();
|
||||
const history = useHistory();
|
||||
const { t } = useTranslation();
|
||||
const [isFocused, setFocused, setUnfocused] = useBoolean(false);
|
||||
|
||||
@keydown(`${meta}+f`)
|
||||
focus(ev: SyntheticEvent<>) {
|
||||
ev.preventDefault();
|
||||
const focus = React.useCallback(() => {
|
||||
inputRef.current?.focus();
|
||||
}, []);
|
||||
|
||||
if (this.input) {
|
||||
this.input.focus();
|
||||
}
|
||||
}
|
||||
|
||||
handleKeyDown = (ev: SyntheticKeyboardEvent<HTMLInputElement>) => {
|
||||
if (ev.key === "Enter") {
|
||||
useKeyDown("f", (ev: KeyboardEvent) => {
|
||||
if (isModKey(ev)) {
|
||||
ev.preventDefault();
|
||||
this.props.history.push(
|
||||
searchUrl(ev.currentTarget.value, {
|
||||
collectionId: this.props.collectionId,
|
||||
ref: this.props.source,
|
||||
})
|
||||
);
|
||||
focus();
|
||||
}
|
||||
});
|
||||
|
||||
if (this.props.onKeyDown) {
|
||||
this.props.onKeyDown(ev);
|
||||
}
|
||||
};
|
||||
const handleKeyDown = React.useCallback(
|
||||
(ev: SyntheticKeyboardEvent<HTMLInputElement>) => {
|
||||
if (ev.key === "Enter") {
|
||||
ev.preventDefault();
|
||||
history.push(
|
||||
searchUrl(ev.currentTarget.value, {
|
||||
collectionId,
|
||||
ref: source,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
handleFocus = () => {
|
||||
this.focused = true;
|
||||
};
|
||||
if (onKeyDown) {
|
||||
onKeyDown(ev);
|
||||
}
|
||||
},
|
||||
[history, collectionId, source, onKeyDown]
|
||||
);
|
||||
|
||||
handleBlur = () => {
|
||||
this.focused = false;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { t, value, onChange } = this.props;
|
||||
const { theme, placeholder = `${t("Search")}…` } = this.props;
|
||||
|
||||
return (
|
||||
<InputMaxWidth
|
||||
ref={(ref) => (this.input = ref)}
|
||||
type="search"
|
||||
placeholder={placeholder}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
onKeyDown={this.handleKeyDown}
|
||||
icon={
|
||||
<SearchIcon
|
||||
color={this.focused ? theme.inputBorderFocused : theme.inputBorder}
|
||||
/>
|
||||
}
|
||||
label={this.props.label}
|
||||
onFocus={this.handleFocus}
|
||||
onBlur={this.handleBlur}
|
||||
margin={0}
|
||||
labelHidden
|
||||
/>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<InputMaxWidth
|
||||
ref={inputRef}
|
||||
type="search"
|
||||
placeholder={placeholder || `${t("Search")}…`}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
onKeyDown={handleKeyDown}
|
||||
icon={
|
||||
<SearchIcon
|
||||
color={isFocused ? theme.inputBorderFocused : theme.inputBorder}
|
||||
/>
|
||||
}
|
||||
label={label}
|
||||
onFocus={setFocused}
|
||||
onBlur={setUnfocused}
|
||||
margin={0}
|
||||
labelHidden
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const InputMaxWidth = styled(Input)`
|
||||
max-width: 30vw;
|
||||
`;
|
||||
|
||||
export default withTranslation()<InputSearchPage>(
|
||||
withTheme(withRouter(InputSearchPage))
|
||||
);
|
||||
export default observer(InputSearchPage);
|
||||
|
|
|
@ -5,7 +5,6 @@ import { MenuIcon } from "outline-icons";
|
|||
import * as React from "react";
|
||||
import { Helmet } from "react-helmet";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import keydown from "react-keydown";
|
||||
import {
|
||||
Switch,
|
||||
Route,
|
||||
|
@ -22,11 +21,12 @@ import ErrorSuspended from "scenes/ErrorSuspended";
|
|||
import Button from "components/Button";
|
||||
import Flex from "components/Flex";
|
||||
import { LoadingIndicatorBar } from "components/LoadingIndicator";
|
||||
import RegisterKeyDown from "components/RegisterKeyDown";
|
||||
import Sidebar from "components/Sidebar";
|
||||
import SettingsSidebar from "components/Sidebar/Settings";
|
||||
import SkipNavContent from "components/SkipNavContent";
|
||||
import SkipNavLink from "components/SkipNavLink";
|
||||
import { meta } from "utils/keyboard";
|
||||
import { isModKey } from "utils/keyboard";
|
||||
import {
|
||||
searchUrl,
|
||||
matchDocumentSlug as slug,
|
||||
|
@ -64,20 +64,13 @@ class Layout extends React.Component<Props> {
|
|||
scrollable: ?HTMLDivElement;
|
||||
@observable keyboardShortcutsOpen: boolean = false;
|
||||
|
||||
@keydown(`${meta}+.`)
|
||||
handleToggleSidebar() {
|
||||
this.props.ui.toggleCollapsedSidebar();
|
||||
}
|
||||
|
||||
@keydown(["t", "/"])
|
||||
goToSearch(ev: SyntheticEvent<>) {
|
||||
goToSearch = (ev: KeyboardEvent) => {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
this.props.history.push(searchUrl());
|
||||
}
|
||||
};
|
||||
|
||||
@keydown("n")
|
||||
goToNewDocument() {
|
||||
goToNewDocument = () => {
|
||||
const { activeCollectionId } = this.props.ui;
|
||||
if (!activeCollectionId) return;
|
||||
|
||||
|
@ -85,7 +78,7 @@ class Layout extends React.Component<Props> {
|
|||
if (!can.update) return;
|
||||
|
||||
this.props.history.push(newDocumentPath(activeCollectionId));
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { auth, ui } = this.props;
|
||||
|
@ -97,6 +90,17 @@ class Layout extends React.Component<Props> {
|
|||
|
||||
return (
|
||||
<Container column auto>
|
||||
<RegisterKeyDown trigger="n" handler={this.goToNewDocument} />
|
||||
<RegisterKeyDown trigger="t" handler={this.goToSearch} />
|
||||
<RegisterKeyDown trigger="/" handler={this.goToSearch} />
|
||||
<RegisterKeyDown
|
||||
trigger="."
|
||||
handler={(event) => {
|
||||
if (isModKey(event)) {
|
||||
ui.toggleCollapsedSidebar();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Helmet>
|
||||
<title>{team && team.name ? team.name : "Outline"}</title>
|
||||
<meta
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// @flow
|
||||
import useKeyDown, { type KeyFilter } from "hooks/useKeyDown";
|
||||
|
||||
type Props = {
|
||||
trigger: KeyFilter,
|
||||
handler: (event: KeyboardEvent) => void,
|
||||
};
|
||||
|
||||
/**
|
||||
* This method is a wrapper around the useKeyDown hook to allow easier use in
|
||||
* class components that have not yet been converted to functions. Do not use
|
||||
* this method in functional components.
|
||||
*/
|
||||
export default function RegisterKeyDown({ trigger, handler }: Props) {
|
||||
useKeyDown(trigger, handler);
|
||||
return null;
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
// @flow
|
||||
import * as React from "react";
|
||||
import isTextInput from "utils/isTextInput";
|
||||
|
||||
export type KeyFilter = ((event: KeyboardEvent) => boolean) | string;
|
||||
|
||||
// Registered keyboard event callbacks
|
||||
let callbacks = [];
|
||||
|
||||
// Track if IME input suggestions are open so we can ignore keydown shortcuts
|
||||
// in this case, they should never be triggered from mobile keyboards.
|
||||
let imeOpen = false;
|
||||
|
||||
// Based on implementation in react-use
|
||||
// https://github.com/streamich/react-use/blob/master/src/useKey.ts#L15-L22
|
||||
const createKeyPredicate = (keyFilter: KeyFilter) =>
|
||||
typeof keyFilter === "function"
|
||||
? keyFilter
|
||||
: typeof keyFilter === "string"
|
||||
? (event: KeyboardEvent) => event.key === keyFilter
|
||||
: keyFilter
|
||||
? (_event) => true
|
||||
: (_event) => false;
|
||||
|
||||
export default function useKeyDown(
|
||||
key: KeyFilter,
|
||||
fn: (event: KeyboardEvent) => void
|
||||
): void {
|
||||
const predicate = createKeyPredicate(key);
|
||||
|
||||
React.useEffect(() => {
|
||||
const handler = (event: KeyboardEvent) => {
|
||||
if (predicate(event)) {
|
||||
fn(event);
|
||||
}
|
||||
};
|
||||
|
||||
callbacks.push(handler);
|
||||
|
||||
return () => {
|
||||
callbacks = callbacks.filter((cb) => cb !== handler);
|
||||
};
|
||||
}, []);
|
||||
}
|
||||
|
||||
window.addEventListener("keydown", (event) => {
|
||||
if (imeOpen) {
|
||||
return;
|
||||
}
|
||||
|
||||
// reverse so that the last registered callbacks get executed first
|
||||
for (const callback of callbacks.reverse()) {
|
||||
if (event.defaultPrevented === true) {
|
||||
break;
|
||||
}
|
||||
if (!isTextInput(event.target) || event.ctrlKey || event.metaKey) {
|
||||
callback(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener("compositionstart", () => {
|
||||
imeOpen = true;
|
||||
});
|
||||
window.addEventListener("compositionend", () => {
|
||||
imeOpen = false;
|
||||
});
|
|
@ -1,7 +1,7 @@
|
|||
// @flow
|
||||
import * as React from "react";
|
||||
|
||||
export default function usePrevious(value: any) {
|
||||
export default function usePrevious<T>(value: T): T | void {
|
||||
const ref = React.useRef();
|
||||
React.useEffect(() => {
|
||||
ref.current = value;
|
||||
|
|
|
@ -6,7 +6,6 @@ import { InputIcon } from "outline-icons";
|
|||
import { AllSelection } from "prosemirror-state";
|
||||
import * as React from "react";
|
||||
import { type TFunction, Trans, withTranslation } from "react-i18next";
|
||||
import keydown from "react-keydown";
|
||||
import { Prompt, Route, withRouter } from "react-router-dom";
|
||||
import type { RouterHistory, Match } from "react-router-dom";
|
||||
import styled from "styled-components";
|
||||
|
@ -27,6 +26,7 @@ import Modal from "components/Modal";
|
|||
import Notice from "components/Notice";
|
||||
import PageTitle from "components/PageTitle";
|
||||
import PlaceholderDocument from "components/PlaceholderDocument";
|
||||
import RegisterKeyDown from "components/RegisterKeyDown";
|
||||
import Time from "components/Time";
|
||||
import Container from "./Container";
|
||||
import Contents from "./Contents";
|
||||
|
@ -39,7 +39,7 @@ import References from "./References";
|
|||
import { type LocationWithState, type NavigationNode, type Theme } from "types";
|
||||
import { isCustomDomain } from "utils/domains";
|
||||
import { emojiToUrl } from "utils/emoji";
|
||||
import { meta } from "utils/keyboard";
|
||||
import { isModKey } from "utils/keyboard";
|
||||
import {
|
||||
documentMoveUrl,
|
||||
documentHistoryUrl,
|
||||
|
@ -148,8 +148,7 @@ class DocumentScene extends React.Component<Props> {
|
|||
this.updateIsDirty();
|
||||
};
|
||||
|
||||
@keydown("m")
|
||||
goToMove(ev) {
|
||||
goToMove = (ev) => {
|
||||
if (!this.props.readOnly) return;
|
||||
|
||||
ev.preventDefault();
|
||||
|
@ -158,10 +157,9 @@ class DocumentScene extends React.Component<Props> {
|
|||
if (abilities.move) {
|
||||
this.props.history.push(documentMoveUrl(document));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@keydown("e")
|
||||
goToEdit(ev) {
|
||||
goToEdit = (ev) => {
|
||||
if (!this.props.readOnly) return;
|
||||
|
||||
ev.preventDefault();
|
||||
|
@ -170,18 +168,16 @@ class DocumentScene extends React.Component<Props> {
|
|||
if (abilities.update) {
|
||||
this.props.history.push(editDocumentUrl(document));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@keydown("esc")
|
||||
goBack(ev) {
|
||||
goBack = (ev) => {
|
||||
if (this.props.readOnly) return;
|
||||
|
||||
ev.preventDefault();
|
||||
this.props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
@keydown("h")
|
||||
goToHistory(ev) {
|
||||
goToHistory = (ev) => {
|
||||
if (!this.props.readOnly) return;
|
||||
|
||||
ev.preventDefault();
|
||||
|
@ -192,18 +188,16 @@ class DocumentScene extends React.Component<Props> {
|
|||
} else {
|
||||
this.props.history.push(documentHistoryUrl(document));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@keydown(`${meta}+shift+p`)
|
||||
onPublish(ev) {
|
||||
onPublish = (ev) => {
|
||||
ev.preventDefault();
|
||||
const { document } = this.props;
|
||||
if (document.publishedAt) return;
|
||||
this.onSave({ publish: true, done: true });
|
||||
}
|
||||
};
|
||||
|
||||
@keydown("ctrl+alt+h")
|
||||
onToggleTableOfContents(ev) {
|
||||
onToggleTableOfContents = (ev) => {
|
||||
if (!this.props.readOnly) return;
|
||||
|
||||
ev.preventDefault();
|
||||
|
@ -214,7 +208,7 @@ class DocumentScene extends React.Component<Props> {
|
|||
} else {
|
||||
ui.showTableOfContents();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onSave = async (
|
||||
options: {
|
||||
|
@ -381,6 +375,26 @@ class DocumentScene extends React.Component<Props> {
|
|||
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<RegisterKeyDown trigger="m" handler={this.goToMove} />
|
||||
<RegisterKeyDown trigger="e" handler={this.goToEdit} />
|
||||
<RegisterKeyDown trigger="Escape" handler={this.goBack} />
|
||||
<RegisterKeyDown trigger="h" handler={this.goToHistory} />
|
||||
<RegisterKeyDown
|
||||
trigger="p"
|
||||
handler={(event) => {
|
||||
if (isModKey(event) && event.shiftKey) {
|
||||
this.onPublish(event);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<RegisterKeyDown
|
||||
trigger="h"
|
||||
handler={(event) => {
|
||||
if (event.ctrlKey && event.altKey) {
|
||||
this.onToggleTableOfContents(event);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<Background
|
||||
key={revision ? revision.id : document.id}
|
||||
isShare={isShare}
|
||||
|
|
|
@ -7,7 +7,6 @@ import { PlusIcon } from "outline-icons";
|
|||
import queryString from "query-string";
|
||||
import * as React from "react";
|
||||
import { withTranslation, Trans, type TFunction } from "react-i18next";
|
||||
import keydown from "react-keydown";
|
||||
import { withRouter, Link } from "react-router-dom";
|
||||
import type { RouterHistory, Match } from "react-router-dom";
|
||||
import { Waypoint } from "react-waypoint";
|
||||
|
@ -29,6 +28,7 @@ import Flex from "components/Flex";
|
|||
import HelpText from "components/HelpText";
|
||||
import LoadingIndicator from "components/LoadingIndicator";
|
||||
import PageTitle from "components/PageTitle";
|
||||
import RegisterKeyDown from "components/RegisterKeyDown";
|
||||
import CollectionFilter from "./components/CollectionFilter";
|
||||
import DateFilter from "./components/DateFilter";
|
||||
import SearchInput from "./components/SearchInput";
|
||||
|
@ -82,10 +82,9 @@ class Search extends React.Component<Props> {
|
|||
}
|
||||
}
|
||||
|
||||
@keydown("esc")
|
||||
goBack() {
|
||||
goBack = () => {
|
||||
this.props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
handleKeyDown = (ev: SyntheticKeyboardEvent<HTMLInputElement>) => {
|
||||
if (ev.key === "Enter") {
|
||||
|
@ -269,6 +268,7 @@ class Search extends React.Component<Props> {
|
|||
return (
|
||||
<Container auto>
|
||||
<PageTitle title={this.title} />
|
||||
<RegisterKeyDown trigger="Escape" handler={this.goBack} />
|
||||
{this.isLoading && <LoadingIndicator />}
|
||||
{notFound && (
|
||||
<div>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// @flow
|
||||
const inputs = ["input", "select", "button", "textarea"];
|
||||
|
||||
// detect if node is a text input element
|
||||
export default function isTextInput(element: HTMLElement): boolean {
|
||||
return (
|
||||
element &&
|
||||
(inputs.indexOf(element.tagName.toLowerCase()) !== -1 ||
|
||||
element.attributes.getNamedItem("role")?.value === "textbox" ||
|
||||
element.attributes.getNamedItem("contenteditable")?.value === "true")
|
||||
);
|
||||
}
|
|
@ -1,447 +0,0 @@
|
|||
// flow-typed signature: 83d11d74aafca79519887b934bf9ec86
|
||||
// flow-typed version: <<STUB>>/react-keydown_v^1.7.3/flow_v0.104.0
|
||||
|
||||
/**
|
||||
* This is an autogenerated libdef stub for:
|
||||
*
|
||||
* 'react-keydown'
|
||||
*
|
||||
* Fill this stub out by replacing all the `any` types.
|
||||
*
|
||||
* Once filled out, we encourage you to share your work with the
|
||||
* community by sending a pull request to:
|
||||
* https://github.com/flowtype/flow-typed
|
||||
*/
|
||||
|
||||
declare module 'react-keydown' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* We include stubs for each file inside this npm package in case you need to
|
||||
* require those files directly. Feel free to delete any files that aren't
|
||||
* needed.
|
||||
*/
|
||||
declare module 'react-keydown/dist/decorators/class_decorator' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/dist/decorators' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/dist/decorators/method_decorator_scoped' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/dist/decorators/method_decorator' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/dist/event_handlers' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/dist' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/dist/lib/array.from' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/dist/lib/dom_helpers' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/dist/lib/keys' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/dist/lib/listeners' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/dist/lib/match_keys' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/dist/lib/parse_keys' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/dist/lib/uuid' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/dist/store' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es/decorators/class_decorator' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es/decorators' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es/decorators/method_decorator_scoped' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es/decorators/method_decorator' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es/event_handlers' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es/lib/array.from' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es/lib/dom_helpers' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es/lib/keys' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es/lib/listeners' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es/lib/match_keys' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es/lib/parse_keys' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es/lib/uuid' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/es/store' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/example/public/js/app' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/example/public/prism' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/example/src/app/class_decorator/code' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/example/src/app/class_decorator' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/example/src/app' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/example/src/app/method_decorator/code' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/example/src/app/method_decorator' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/example/src' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src/decorators/class_decorator' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src/decorators' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src/decorators/method_decorator_scoped' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src/decorators/method_decorator' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src/event_handlers' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src/lib/array.from' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src/lib/dom_helpers' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src/lib/keys' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src/lib/listeners' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src/lib/match_keys' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src/lib/parse_keys' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src/lib/uuid' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/src/store' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/tests/event_handlers-test' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/tests/fixtures/event' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/tests/match_keys-test' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/tests/parse_keys-test' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/tests/store-test' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-keydown/webpack.config' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
// Filename aliases
|
||||
declare module 'react-keydown/dist/decorators/class_decorator.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/decorators/class_decorator'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/decorators/index' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/decorators'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/decorators/index.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/decorators'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/decorators/method_decorator_scoped.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/decorators/method_decorator_scoped'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/decorators/method_decorator.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/decorators/method_decorator'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/event_handlers.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/event_handlers'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/index' {
|
||||
declare module.exports: $Exports<'react-keydown/dist'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/index.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/lib/array.from.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/lib/array.from'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/lib/dom_helpers.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/lib/dom_helpers'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/lib/keys.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/lib/keys'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/lib/listeners.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/lib/listeners'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/lib/match_keys.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/lib/match_keys'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/lib/parse_keys.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/lib/parse_keys'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/lib/uuid.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/lib/uuid'>;
|
||||
}
|
||||
declare module 'react-keydown/dist/store.js' {
|
||||
declare module.exports: $Exports<'react-keydown/dist/store'>;
|
||||
}
|
||||
declare module 'react-keydown/es/decorators/class_decorator.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es/decorators/class_decorator'>;
|
||||
}
|
||||
declare module 'react-keydown/es/decorators/index' {
|
||||
declare module.exports: $Exports<'react-keydown/es/decorators'>;
|
||||
}
|
||||
declare module 'react-keydown/es/decorators/index.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es/decorators'>;
|
||||
}
|
||||
declare module 'react-keydown/es/decorators/method_decorator_scoped.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es/decorators/method_decorator_scoped'>;
|
||||
}
|
||||
declare module 'react-keydown/es/decorators/method_decorator.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es/decorators/method_decorator'>;
|
||||
}
|
||||
declare module 'react-keydown/es/event_handlers.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es/event_handlers'>;
|
||||
}
|
||||
declare module 'react-keydown/es/index' {
|
||||
declare module.exports: $Exports<'react-keydown/es'>;
|
||||
}
|
||||
declare module 'react-keydown/es/index.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es'>;
|
||||
}
|
||||
declare module 'react-keydown/es/lib/array.from.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es/lib/array.from'>;
|
||||
}
|
||||
declare module 'react-keydown/es/lib/dom_helpers.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es/lib/dom_helpers'>;
|
||||
}
|
||||
declare module 'react-keydown/es/lib/keys.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es/lib/keys'>;
|
||||
}
|
||||
declare module 'react-keydown/es/lib/listeners.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es/lib/listeners'>;
|
||||
}
|
||||
declare module 'react-keydown/es/lib/match_keys.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es/lib/match_keys'>;
|
||||
}
|
||||
declare module 'react-keydown/es/lib/parse_keys.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es/lib/parse_keys'>;
|
||||
}
|
||||
declare module 'react-keydown/es/lib/uuid.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es/lib/uuid'>;
|
||||
}
|
||||
declare module 'react-keydown/es/store.js' {
|
||||
declare module.exports: $Exports<'react-keydown/es/store'>;
|
||||
}
|
||||
declare module 'react-keydown/example/public/js/app.js' {
|
||||
declare module.exports: $Exports<'react-keydown/example/public/js/app'>;
|
||||
}
|
||||
declare module 'react-keydown/example/public/prism.js' {
|
||||
declare module.exports: $Exports<'react-keydown/example/public/prism'>;
|
||||
}
|
||||
declare module 'react-keydown/example/src/app/class_decorator/code.js' {
|
||||
declare module.exports: $Exports<'react-keydown/example/src/app/class_decorator/code'>;
|
||||
}
|
||||
declare module 'react-keydown/example/src/app/class_decorator/index' {
|
||||
declare module.exports: $Exports<'react-keydown/example/src/app/class_decorator'>;
|
||||
}
|
||||
declare module 'react-keydown/example/src/app/class_decorator/index.js' {
|
||||
declare module.exports: $Exports<'react-keydown/example/src/app/class_decorator'>;
|
||||
}
|
||||
declare module 'react-keydown/example/src/app/index' {
|
||||
declare module.exports: $Exports<'react-keydown/example/src/app'>;
|
||||
}
|
||||
declare module 'react-keydown/example/src/app/index.js' {
|
||||
declare module.exports: $Exports<'react-keydown/example/src/app'>;
|
||||
}
|
||||
declare module 'react-keydown/example/src/app/method_decorator/code.js' {
|
||||
declare module.exports: $Exports<'react-keydown/example/src/app/method_decorator/code'>;
|
||||
}
|
||||
declare module 'react-keydown/example/src/app/method_decorator/index' {
|
||||
declare module.exports: $Exports<'react-keydown/example/src/app/method_decorator'>;
|
||||
}
|
||||
declare module 'react-keydown/example/src/app/method_decorator/index.js' {
|
||||
declare module.exports: $Exports<'react-keydown/example/src/app/method_decorator'>;
|
||||
}
|
||||
declare module 'react-keydown/example/src/index' {
|
||||
declare module.exports: $Exports<'react-keydown/example/src'>;
|
||||
}
|
||||
declare module 'react-keydown/example/src/index.js' {
|
||||
declare module.exports: $Exports<'react-keydown/example/src'>;
|
||||
}
|
||||
declare module 'react-keydown/src/decorators/class_decorator.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src/decorators/class_decorator'>;
|
||||
}
|
||||
declare module 'react-keydown/src/decorators/index' {
|
||||
declare module.exports: $Exports<'react-keydown/src/decorators'>;
|
||||
}
|
||||
declare module 'react-keydown/src/decorators/index.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src/decorators'>;
|
||||
}
|
||||
declare module 'react-keydown/src/decorators/method_decorator_scoped.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src/decorators/method_decorator_scoped'>;
|
||||
}
|
||||
declare module 'react-keydown/src/decorators/method_decorator.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src/decorators/method_decorator'>;
|
||||
}
|
||||
declare module 'react-keydown/src/event_handlers.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src/event_handlers'>;
|
||||
}
|
||||
declare module 'react-keydown/src/index' {
|
||||
declare module.exports: $Exports<'react-keydown/src'>;
|
||||
}
|
||||
declare module 'react-keydown/src/index.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src'>;
|
||||
}
|
||||
declare module 'react-keydown/src/lib/array.from.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src/lib/array.from'>;
|
||||
}
|
||||
declare module 'react-keydown/src/lib/dom_helpers.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src/lib/dom_helpers'>;
|
||||
}
|
||||
declare module 'react-keydown/src/lib/keys.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src/lib/keys'>;
|
||||
}
|
||||
declare module 'react-keydown/src/lib/listeners.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src/lib/listeners'>;
|
||||
}
|
||||
declare module 'react-keydown/src/lib/match_keys.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src/lib/match_keys'>;
|
||||
}
|
||||
declare module 'react-keydown/src/lib/parse_keys.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src/lib/parse_keys'>;
|
||||
}
|
||||
declare module 'react-keydown/src/lib/uuid.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src/lib/uuid'>;
|
||||
}
|
||||
declare module 'react-keydown/src/store.js' {
|
||||
declare module.exports: $Exports<'react-keydown/src/store'>;
|
||||
}
|
||||
declare module 'react-keydown/tests/event_handlers-test.js' {
|
||||
declare module.exports: $Exports<'react-keydown/tests/event_handlers-test'>;
|
||||
}
|
||||
declare module 'react-keydown/tests/fixtures/event.js' {
|
||||
declare module.exports: $Exports<'react-keydown/tests/fixtures/event'>;
|
||||
}
|
||||
declare module 'react-keydown/tests/match_keys-test.js' {
|
||||
declare module.exports: $Exports<'react-keydown/tests/match_keys-test'>;
|
||||
}
|
||||
declare module 'react-keydown/tests/parse_keys-test.js' {
|
||||
declare module.exports: $Exports<'react-keydown/tests/parse_keys-test'>;
|
||||
}
|
||||
declare module 'react-keydown/tests/store-test.js' {
|
||||
declare module.exports: $Exports<'react-keydown/tests/store-test'>;
|
||||
}
|
||||
declare module 'react-keydown/webpack.config.js' {
|
||||
declare module.exports: $Exports<'react-keydown/webpack.config'>;
|
||||
}
|
|
@ -141,7 +141,6 @@
|
|||
"react-helmet": "^6.1.0",
|
||||
"react-i18next": "^11.7.3",
|
||||
"react-is": "^17.0.2",
|
||||
"react-keydown": "^1.7.3",
|
||||
"react-portal": "^4.2.0",
|
||||
"react-router-dom": "^5.2.0",
|
||||
"react-table": "^7.7.0",
|
||||
|
|
|
@ -5090,7 +5090,7 @@ core-js@^2.4.0:
|
|||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c"
|
||||
integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==
|
||||
|
||||
core-js@^3.1.2, core-js@^3.10.2, core-js@^3.6.4:
|
||||
core-js@^3.10.2, core-js@^3.6.4:
|
||||
version "3.10.2"
|
||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.10.2.tgz#17cb038ce084522a717d873b63f2b3ee532e2cd5"
|
||||
integrity sha512-W+2oVYeNghuBr3yTzZFQ5rfmjZtYB/Ubg87R5YOmlGrIb+Uw9f7qjUbhsj+/EkXhcV7eOD3jiM4+sgraX3FZUw==
|
||||
|
@ -12144,13 +12144,6 @@ react-is@^17.0.1, react-is@^17.0.2:
|
|||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
|
||||
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
|
||||
|
||||
react-keydown@^1.7.3:
|
||||
version "1.9.12"
|
||||
resolved "https://registry.yarnpkg.com/react-keydown/-/react-keydown-1.9.12.tgz#9e10157775c9e3f21e124987e14af45a2ed52384"
|
||||
integrity sha512-KnQdVCTlPeJJ5FcnaqT4LJFHFUWbr/P+KnUtKA3xOc2JuJy738LyNM8jdnkWNkexHWEXt/021ufR5l9e3fzUCQ==
|
||||
dependencies:
|
||||
core-js "^3.1.2"
|
||||
|
||||
react-medium-image-zoom@^3.1.3:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/react-medium-image-zoom/-/react-medium-image-zoom-3.1.3.tgz#b1470abc5a342d65c23021c01bafa8c731821478"
|
||||
|
|
Reference in New Issue