mirror of
https://github.com/outline/outline.git
synced 2026-11-22 22:02:35 +03:00
wip
This commit is contained in:
1 parent
891c487a31
commit
5a68f542e8
110 files changed
+219
-217
No files matched your search
@@ -2,6 +2,7 @@
|
||||
"presets": [
|
||||
"@babel/preset-react",
|
||||
"@babel/preset-flow",
|
||||
"@babel/preset-typescript",
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
|
||||
@@ -4,11 +4,11 @@ import { useTranslation } from "react-i18next";
|
||||
import { Redirect } from "react-router-dom";
|
||||
import { isCustomSubdomain } from "shared/utils/domains";
|
||||
import LoadingIndicator from "components/LoadingIndicator";
|
||||
import useStores from "../hooks/useStores";
|
||||
import env from "env";
|
||||
import useStores from "hooks/useStores";
|
||||
|
||||
type Props = {
|
||||
children: React.ReactNode;
|
||||
children: JSX.Element;
|
||||
};
|
||||
|
||||
const Authenticated = ({ children }: Props) => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { observer } from "mobx-react";
|
||||
import { EditIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import type { TFunction } from "react-i18next";
|
||||
import { TFunction } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
import User from "models/User";
|
||||
import UserProfile from "scenes/UserProfile";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ExpandedIcon } from "outline-icons";
|
||||
import { darken } from "polished";
|
||||
import * as React from "react";
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
import styled from "styled-components";
|
||||
|
||||
const RealButton = styled.button`
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import * as React from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
import styled from "styled-components";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
onClick: (ev: SyntheticEvent) => void;
|
||||
children: React.ReactNode;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { VisuallyHidden } from "reakit/VisuallyHidden";
|
||||
import styled from "styled-components";
|
||||
import HelpText from "components/HelpText";
|
||||
|
||||
import type { ChangeEvent } from "react";
|
||||
import { ChangeEvent } from "react";
|
||||
|
||||
export type Props = {
|
||||
checked?: boolean;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { MenuItem as BaseMenuItem } from "reakit/Menu";
|
||||
import styled from "styled-components";
|
||||
import breakpoint from "styled-components-breakpoint";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
onClick?: (a: SyntheticEvent) => void | Promise<void>;
|
||||
|
||||
@@ -12,7 +12,7 @@ import MenuItem, { MenuAnchor } from "./MenuItem";
|
||||
import Separator from "./Separator";
|
||||
import ContextMenu from ".";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type TMenuItem =
|
||||
| {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import copy from "copy-to-clipboard";
|
||||
import * as React from "react";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
text: string;
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as React from "react";
|
||||
|
||||
type Props = {
|
||||
delay?: number;
|
||||
children: React.ReactNode;
|
||||
children: JSX.Element;
|
||||
};
|
||||
|
||||
export default function DelayedMount({ delay = 250, children }: Props) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { inject, observer } from "mobx-react";
|
||||
import { CloseIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import { Redirect } from "react-router-dom";
|
||||
import type { Match, RouterHistory } from "react-router-dom";
|
||||
import { Match, RouterHistory } from "react-router-dom";
|
||||
import { Waypoint } from "react-waypoint";
|
||||
import styled from "styled-components";
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import Avatar from "components/Avatar";
|
||||
import Flex from "components/Flex";
|
||||
import Time from "components/Time";
|
||||
import RevisionMenu from "menus/RevisionMenu";
|
||||
import type { Theme } from "types";
|
||||
import { Theme } from "types";
|
||||
|
||||
import { documentHistoryUrl } from "utils/routeHelpers";
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import Document from "models/Document";
|
||||
import DocumentMeta from "components/DocumentMeta";
|
||||
import DocumentViews from "components/DocumentViews";
|
||||
import Popover from "components/Popover";
|
||||
import useStores from "../hooks/useStores";
|
||||
import useStores from "hooks/useStores";
|
||||
|
||||
type Props = {
|
||||
document: Document;
|
||||
@@ -61,7 +61,7 @@ function DocumentMetaWithViews({ to, isDraft, document, ...rest }: Props) {
|
||||
);
|
||||
}
|
||||
|
||||
const Meta = styled(DocumentMeta)`
|
||||
const Meta = styled(DocumentMeta)<{ rtl: boolean }>`
|
||||
justify-content: ${(props) => (props.rtl ? "flex-end" : "flex-start")};
|
||||
margin: -12px 0 2em 0;
|
||||
font-size: 14px;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { lighten } from "polished";
|
||||
import * as React from "react";
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import type { RouterHistory } from "react-router-dom";
|
||||
import { withRouter, RouterHistory } from "react-router-dom";
|
||||
|
||||
import styled, { withTheme } from "styled-components";
|
||||
import { light } from "shared/styles/theme";
|
||||
import UiStore from "stores/UiStore";
|
||||
@@ -11,7 +11,7 @@ import ErrorBoundary from "components/ErrorBoundary";
|
||||
import Tooltip from "components/Tooltip";
|
||||
import embeds from "../embeds";
|
||||
import useMediaQuery from "hooks/useMediaQuery";
|
||||
import type { Theme } from "types";
|
||||
import { Theme } from "types";
|
||||
import { isModKey } from "utils/keyboard";
|
||||
import { uploadFile } from "utils/uploadFile";
|
||||
import { isInternalUrl } from "utils/urls";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
children: React.ReactNode;
|
||||
|
||||
@@ -5,7 +5,7 @@ import User from "models/User";
|
||||
import Avatar from "components/Avatar";
|
||||
import Flex from "components/Flex";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
users: User[];
|
||||
|
||||
+1
-11
@@ -26,17 +26,7 @@ type Props = {
|
||||
gap?: number;
|
||||
};
|
||||
|
||||
const Flex = React.forwardRef<HTMLDivElement>((props: Props, ref) => {
|
||||
const { children, ...restProps } = props;
|
||||
|
||||
return (
|
||||
<Container ref={ref} {...restProps}>
|
||||
{children}
|
||||
</Container>
|
||||
);
|
||||
});
|
||||
|
||||
const Container = styled.div`
|
||||
const Flex = styled.div<Props>`
|
||||
display: flex;
|
||||
flex: ${({ auto }) => (auto ? "1 1 auto" : "initial")};
|
||||
flex-direction: ${({ column }) => (column ? "column" : "row")};
|
||||
|
||||
@@ -6,7 +6,7 @@ import styled from "styled-components";
|
||||
import breakpoint from "styled-components-breakpoint";
|
||||
import Flex from "components/Flex";
|
||||
|
||||
import type { SyntheticEvent, ChangeEvent, KeyboardEvent } from "react";
|
||||
import { SyntheticEvent, ChangeEvent, KeyboardEvent } from "react";
|
||||
|
||||
const RealTextarea = styled.textarea`
|
||||
border: 0;
|
||||
|
||||
@@ -4,9 +4,9 @@ import { useTranslation } from "react-i18next";
|
||||
import { useTheme } from "styled-components";
|
||||
import Input from "./Input";
|
||||
|
||||
import type { Props as InputProps } from "./Input";
|
||||
import { Props as InputProps } from "./Input";
|
||||
|
||||
import type { ChangeEvent, KeyboardEvent } from "react";
|
||||
import { ChangeEvent, KeyboardEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
placeholder?: string;
|
||||
|
||||
@@ -2,21 +2,17 @@ import { observable } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import { SearchIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import type { TFunction } from "react-i18next";
|
||||
import { SyntheticEvent, ChangeEvent, KeyboardEvent } from "react";
|
||||
import { withTranslation, TFunction } from "react-i18next";
|
||||
import keydown from "react-keydown";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import type { RouterHistory } from "react-router-dom";
|
||||
import { withRouter, RouteComponentProps } from "react-router-dom";
|
||||
import styled, { withTheme } from "styled-components";
|
||||
import Input from "./Input";
|
||||
import type { Theme } from "types";
|
||||
import { Theme } from "types";
|
||||
import { meta } from "utils/keyboard";
|
||||
import { searchUrl } from "utils/routeHelpers";
|
||||
|
||||
import type { SyntheticEvent, ChangeEvent, KeyboardEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
history: RouterHistory;
|
||||
type Props = RouteComponentProps & {
|
||||
theme: Theme;
|
||||
source: string;
|
||||
placeholder?: string;
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import InputSelect from "./InputSelect";
|
||||
|
||||
import type { Props, Option } from "./InputSelect";
|
||||
import { Props, Option } from "./InputSelect";
|
||||
|
||||
export default function InputSelectPermission(props: Omit<Props, "options">) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -2,12 +2,19 @@ import { observable } from "mobx";
|
||||
import { observer, inject } from "mobx-react";
|
||||
import { MenuIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
import { Helmet } from "react-helmet";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import type { TFunction } from "react-i18next";
|
||||
import { withTranslation, TFunction } from "react-i18next";
|
||||
|
||||
import keydown from "react-keydown";
|
||||
import { Switch, Route, Redirect, withRouter } from "react-router-dom";
|
||||
import type { RouterHistory } from "react-router-dom";
|
||||
import {
|
||||
Switch,
|
||||
Route,
|
||||
Redirect,
|
||||
withRouter,
|
||||
RouterHistory,
|
||||
} from "react-router-dom";
|
||||
|
||||
import styled from "styled-components";
|
||||
import breakpoint from "styled-components-breakpoint";
|
||||
import AuthStore from "stores/AuthStore";
|
||||
@@ -33,8 +40,6 @@ import {
|
||||
newDocumentUrl,
|
||||
} from "utils/routeHelpers";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
documents: DocumentsStore;
|
||||
children?: React.ReactNode | null;
|
||||
|
||||
@@ -1,24 +1,16 @@
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import UiStore from "stores/UiStore";
|
||||
import useStores from "hooks/useStores";
|
||||
|
||||
type Props = {
|
||||
ui: UiStore;
|
||||
};
|
||||
function LoadingIndicator() {
|
||||
const { ui } = useStores();
|
||||
|
||||
@observer
|
||||
class LoadingIndicator extends React.Component<Props> {
|
||||
componentDidMount() {
|
||||
this.props.ui.enableProgressBar();
|
||||
}
|
||||
React.useEffect(() => {
|
||||
ui.enableProgressBar();
|
||||
return () => ui.disableProgressBar();
|
||||
}, [ui]);
|
||||
|
||||
componentWillUnmount() {
|
||||
this.props.ui.disableProgressBar();
|
||||
}
|
||||
|
||||
render() {
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export default inject("ui")(LoadingIndicator);
|
||||
export default observer(LoadingIndicator);
|
||||
@@ -1,5 +1,6 @@
|
||||
import { format, formatDistanceToNow } from "date-fns";
|
||||
import {
|
||||
format,
|
||||
formatDistanceToNow,
|
||||
enUS,
|
||||
de,
|
||||
fr,
|
||||
@@ -11,7 +12,8 @@ import {
|
||||
zhCN,
|
||||
zhTW,
|
||||
ru,
|
||||
} from "date-fns/locale";
|
||||
} from "date-fns";
|
||||
|
||||
import * as React from "react";
|
||||
import Tooltip from "components/Tooltip";
|
||||
import useUserLocale from "hooks/useUserLocale";
|
||||
@@ -63,7 +65,7 @@ function LocaleTime({
|
||||
}: Props) {
|
||||
const userLocale = useUserLocale();
|
||||
const [_, setMinutesMounted] = React.useState(0); // eslint-disable-line no-unused-vars
|
||||
const callback = React.useRef();
|
||||
const callback = React.useRef<Function>();
|
||||
|
||||
React.useEffect(() => {
|
||||
callback.current = eachMinute(() => {
|
||||
|
||||
@@ -19,7 +19,7 @@ class Mask extends React.Component<Props> {
|
||||
}
|
||||
|
||||
constructor(props: Props) {
|
||||
super();
|
||||
super(props);
|
||||
this.width = randomInteger(props.minWidth || 75, props.maxWidth || 100);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@ import { observer } from "mobx-react";
|
||||
import { GoToIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import styled from "styled-components";
|
||||
import type { DocumentPath } from "stores/CollectionsStore";
|
||||
import { DocumentPath } from "stores/CollectionsStore";
|
||||
import Collection from "models/Collection";
|
||||
import Document from "models/Document";
|
||||
import CollectionIcon from "components/CollectionIcon";
|
||||
import Flex from "components/Flex";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
result: DocumentPath;
|
||||
|
||||
@@ -4,6 +4,7 @@ import styled from "styled-components";
|
||||
import { fadeAndScaleIn } from "shared/styles/animations";
|
||||
|
||||
type Props = {
|
||||
tabIndex?: number;
|
||||
children: React.ReactNode;
|
||||
width?: number;
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// based on: https://reacttraining.com/react-router/web/guides/scroll-restoration
|
||||
import * as React from "react";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import type { Location } from "react-router-dom";
|
||||
import { Location } from "react-router-dom";
|
||||
|
||||
type Props = {
|
||||
location: Location;
|
||||
|
||||
@@ -8,6 +8,7 @@ type Props = {
|
||||
topShadow?: boolean;
|
||||
bottomShadow?: boolean;
|
||||
flex?: boolean;
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
function Scrollable({ shadow, topShadow, bottomShadow, flex, ...rest }: Props) {
|
||||
|
||||
@@ -29,7 +29,7 @@ import TeamButton from "./components/TeamButton";
|
||||
import useStores from "hooks/useStores";
|
||||
import AccountMenu from "menus/AccountMenu";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
function MainSidebar() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -19,7 +19,7 @@ type Props = {
|
||||
collection: Collection;
|
||||
canUpdate: boolean;
|
||||
activeDocument: Document | undefined | null;
|
||||
prefetchDocument: (id: string) => Promise<void>;
|
||||
prefetchDocument: (id: string) => Promise<any>;
|
||||
belowCollection: Collection | void;
|
||||
isDraggingAnyCollection: boolean;
|
||||
onChangeDragging: (dragging: boolean) => void;
|
||||
@@ -204,7 +204,7 @@ function CollectionLink({
|
||||
);
|
||||
}
|
||||
|
||||
const Draggable = styled("div")`
|
||||
const Draggable = styled.div`
|
||||
opacity: ${(props) => (props.$isDragging || props.$isMoving ? 0.5 : 1)};
|
||||
pointer-events: ${(props) => (props.$isMoving ? "none" : "auto")};
|
||||
`;
|
||||
|
||||
@@ -27,8 +27,9 @@ function Collections({ onCreateCollection }: Props) {
|
||||
const team = useCurrentTeam();
|
||||
const orderedCollections = collections.orderedData;
|
||||
const can = policies.abilities(team.id);
|
||||
const [isDraggingAnyCollection, setIsDraggingAnyCollection] =
|
||||
React.useState(false);
|
||||
const [isDraggingAnyCollection, setIsDraggingAnyCollection] = React.useState(
|
||||
false
|
||||
);
|
||||
|
||||
React.useEffect(() => {
|
||||
async function load() {
|
||||
|
||||
@@ -13,9 +13,9 @@ import EditableTitle from "./EditableTitle";
|
||||
import SidebarLink from "./SidebarLink";
|
||||
import useStores from "hooks/useStores";
|
||||
import DocumentMenu from "menus/DocumentMenu";
|
||||
import type { NavigationNode } from "types";
|
||||
import { NavigationNode } from "types";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
node: NavigationNode;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import styled, { withTheme } from "styled-components";
|
||||
import type { Theme } from "types";
|
||||
import { Theme } from "types";
|
||||
|
||||
function DropCursor({
|
||||
isActiveDrop,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { createLocation } from "history";
|
||||
import * as React from "react";
|
||||
import { __RouterContext as RouterContext, matchPath } from "react-router";
|
||||
import type { Location } from "react-router";
|
||||
import { Location } from "react-router";
|
||||
import { Link } from "react-router-dom";
|
||||
import scrollIntoView from "smooth-scroll-into-view-if-needed";
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import * as React from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import type { RouterHistory, Match } from "react-router-dom";
|
||||
import styled, { withTheme } from "styled-components";
|
||||
import breakpoint from "styled-components-breakpoint";
|
||||
import EventBoundary from "components/EventBoundary";
|
||||
import NavLink from "./NavLink";
|
||||
import type { Theme } from "types";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { Theme } from "types";
|
||||
|
||||
type Props = {
|
||||
to?: string | any;
|
||||
@@ -16,7 +14,6 @@ type Props = {
|
||||
onClick?: (a: SyntheticEvent) => void;
|
||||
onMouseEnter?: (a: SyntheticEvent) => void;
|
||||
className?: string;
|
||||
children?: React.ReactNode;
|
||||
icon?: React.ReactNode;
|
||||
label?: React.ReactNode;
|
||||
menu?: React.ReactNode;
|
||||
@@ -24,8 +21,6 @@ type Props = {
|
||||
iconColor?: string;
|
||||
active?: boolean;
|
||||
isActiveDrop?: boolean;
|
||||
history: RouterHistory;
|
||||
match: Match;
|
||||
theme: Theme;
|
||||
exact?: boolean;
|
||||
depth?: number;
|
||||
@@ -34,7 +29,6 @@ type Props = {
|
||||
function SidebarLink(
|
||||
{
|
||||
icon,
|
||||
children,
|
||||
onClick,
|
||||
onMouseEnter,
|
||||
to,
|
||||
@@ -47,8 +41,6 @@ function SidebarLink(
|
||||
exact,
|
||||
href,
|
||||
depth,
|
||||
history,
|
||||
match,
|
||||
className,
|
||||
}: Props,
|
||||
ref
|
||||
@@ -125,7 +117,7 @@ const Actions = styled(EventBoundary)`
|
||||
}
|
||||
`;
|
||||
|
||||
const Link = styled(NavLink)`
|
||||
const Link = styled(NavLink)<{ $isActiveDrop: boolean }>`
|
||||
display: flex;
|
||||
position: relative;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ExpandedIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
import styled from "styled-components";
|
||||
import Flex from "components/Flex";
|
||||
import TeamLogo from "components/TeamLogo";
|
||||
@@ -13,10 +13,10 @@ type Props = {
|
||||
logoUrl: string;
|
||||
};
|
||||
|
||||
const TeamButton = React.forwardRef<any>(
|
||||
const TeamButton = React.forwardRef<HTMLButtonElement, Props>(
|
||||
({ showDisclosure, teamName, subheading, logoUrl, ...rest }: Props, ref) => (
|
||||
<Wrapper>
|
||||
<Header justify="flex-start" align="center" ref={ref} {...rest}>
|
||||
<Header ref={ref} {...rest}>
|
||||
<TeamLogo
|
||||
alt={`${teamName} logo`}
|
||||
src={logoUrl}
|
||||
@@ -24,7 +24,7 @@ const TeamButton = React.forwardRef<any>(
|
||||
height={38}
|
||||
/>
|
||||
<Flex align="flex-start" column>
|
||||
<TeamName showDisclosure>
|
||||
<TeamName>
|
||||
{teamName} {showDisclosure && <Disclosure color="currentColor" />}
|
||||
</TeamName>
|
||||
<Subheading>{subheading}</Subheading>
|
||||
|
||||
@@ -5,7 +5,7 @@ import styled from "styled-components";
|
||||
import Document from "models/Document";
|
||||
import NudeButton from "./NudeButton";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
document: Document;
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as React from "react";
|
||||
import styled from "styled-components";
|
||||
import { LabelText } from "components/Input";
|
||||
|
||||
import type { ChangeEvent } from "react";
|
||||
import { ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
width?: number;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "react";
|
||||
import { NavLink } from "react-router-dom";
|
||||
import styled, { withTheme } from "styled-components";
|
||||
import type { Theme } from "types";
|
||||
import { Theme } from "types";
|
||||
|
||||
type Props = {
|
||||
theme: Theme;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { darken } from "polished";
|
||||
import * as React from "react";
|
||||
import styled, { css } from "styled-components";
|
||||
import { fadeAndScaleIn, pulse } from "shared/styles/animations";
|
||||
import type { Toast as TToast } from "types";
|
||||
import { Toast as TToast } from "types";
|
||||
|
||||
type Props = {
|
||||
onRequestClose: () => void;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { useMenuState, MenuButton } from "reakit/Menu";
|
||||
@@ -17,8 +18,6 @@ import useStores from "hooks/useStores";
|
||||
import getDataTransferFiles from "utils/getDataTransferFiles";
|
||||
import { newDocumentUrl } from "utils/routeHelpers";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
collection: Collection;
|
||||
placement?: string;
|
||||
@@ -43,8 +42,10 @@ function CollectionMenu({
|
||||
const history = useHistory();
|
||||
|
||||
const file = React.useRef<HTMLInputElement | undefined | null>();
|
||||
const [showCollectionPermissions, setShowCollectionPermissions] =
|
||||
React.useState(false);
|
||||
const [
|
||||
showCollectionPermissions,
|
||||
setShowCollectionPermissions,
|
||||
] = React.useState(false);
|
||||
const [showCollectionEdit, setShowCollectionEdit] = React.useState(false);
|
||||
const [showCollectionDelete, setShowCollectionDelete] = React.useState(false);
|
||||
const [showCollectionExport, setShowCollectionExport] = React.useState(false);
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
newDocumentUrl,
|
||||
} from "utils/routeHelpers";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
document: Document;
|
||||
|
||||
@@ -13,7 +13,7 @@ import CopyToClipboard from "components/CopyToClipboard";
|
||||
import useStores from "hooks/useStores";
|
||||
import { documentHistoryUrl } from "utils/routeHelpers";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
document: Document;
|
||||
|
||||
@@ -10,7 +10,7 @@ import OverflowMenuButton from "components/ContextMenu/OverflowMenuButton";
|
||||
import CopyToClipboard from "components/CopyToClipboard";
|
||||
import useStores from "hooks/useStores";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
share: Share;
|
||||
|
||||
@@ -8,7 +8,7 @@ import OverflowMenuButton from "components/ContextMenu/OverflowMenuButton";
|
||||
import Template from "components/ContextMenu/Template";
|
||||
import useStores from "hooks/useStores";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
user: User;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { pick, trim } from "lodash";
|
||||
import { action, computed, observable } from "mobx";
|
||||
import BaseModel from "models/BaseModel";
|
||||
import Document from "models/Document";
|
||||
import type { NavigationNode } from "types";
|
||||
import { NavigationNode } from "types";
|
||||
import { client } from "utils/ApiClient";
|
||||
|
||||
export default class Collection extends BaseModel {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { computed } from "mobx";
|
||||
import type { Rank } from "shared/types";
|
||||
import { Rank } from "shared/types";
|
||||
import BaseModel from "./BaseModel";
|
||||
|
||||
class User extends BaseModel {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { observable } from "mobx";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import type { RouterHistory } from "react-router-dom";
|
||||
import { RouterHistory } from "react-router-dom";
|
||||
import CollectionsStore from "stores/CollectionsStore";
|
||||
import UiStore from "stores/UiStore";
|
||||
import Collection from "models/Collection";
|
||||
@@ -11,7 +11,7 @@ import Flex from "components/Flex";
|
||||
import HelpText from "components/HelpText";
|
||||
import { homeUrl } from "utils/routeHelpers";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
history: RouterHistory;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { observable } from "mobx";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { withTranslation, Trans } from "react-i18next";
|
||||
import type { TFunction } from "react-i18next";
|
||||
import { TFunction } from "react-i18next";
|
||||
import AuthStore from "stores/AuthStore";
|
||||
import UiStore from "stores/UiStore";
|
||||
import Collection from "models/Collection";
|
||||
@@ -14,7 +14,7 @@ import Input from "components/Input";
|
||||
import InputSelect from "components/InputSelect";
|
||||
import Switch from "components/Switch";
|
||||
|
||||
import type { SyntheticEvent, ChangeEvent } from "react";
|
||||
import { SyntheticEvent, ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
collection: Collection;
|
||||
|
||||
@@ -8,7 +8,7 @@ import Button from "components/Button";
|
||||
import Flex from "components/Flex";
|
||||
import HelpText from "components/HelpText";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
collection: Collection;
|
||||
|
||||
@@ -3,9 +3,9 @@ import { observable } from "mobx";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { withTranslation, Trans } from "react-i18next";
|
||||
import type { TFunction } from "react-i18next";
|
||||
import { TFunction } from "react-i18next";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import type { RouterHistory } from "react-router-dom";
|
||||
import { RouterHistory } from "react-router-dom";
|
||||
import AuthStore from "stores/AuthStore";
|
||||
import CollectionsStore from "stores/CollectionsStore";
|
||||
import UiStore from "stores/UiStore";
|
||||
@@ -18,7 +18,7 @@ import Input from "components/Input";
|
||||
import InputSelectPermission from "components/InputSelectPermission";
|
||||
import Switch from "components/Switch";
|
||||
|
||||
import type { SyntheticEvent, ChangeEvent } from "react";
|
||||
import { SyntheticEvent, ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
history: RouterHistory;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { observable } from "mobx";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import type { TFunction } from "react-i18next";
|
||||
import { TFunction } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
import AuthStore from "stores/AuthStore";
|
||||
import CollectionGroupMembershipsStore from "stores/CollectionGroupMembershipsStore";
|
||||
@@ -22,7 +22,7 @@ import Input from "components/Input";
|
||||
import Modal from "components/Modal";
|
||||
import PaginatedList from "components/PaginatedList";
|
||||
|
||||
import type { ChangeEvent } from "react";
|
||||
import { ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
ui: UiStore;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { observable } from "mobx";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import type { TFunction } from "react-i18next";
|
||||
import { TFunction } from "react-i18next";
|
||||
import AuthStore from "stores/AuthStore";
|
||||
import MembershipsStore from "stores/MembershipsStore";
|
||||
import UiStore from "stores/UiStore";
|
||||
@@ -20,7 +20,7 @@ import Modal from "components/Modal";
|
||||
import PaginatedList from "components/PaginatedList";
|
||||
import MemberListItem from "./components/MemberListItem";
|
||||
|
||||
import type { ChangeEvent } from "react";
|
||||
import { ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
ui: UiStore;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { deburr, sortBy } from "lodash";
|
||||
import { observable } from "mobx";
|
||||
import { observer, inject } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import type { RouterHistory, Match } from "react-router-dom";
|
||||
import { RouterHistory, Match } from "react-router-dom";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import parseDocumentSlug from "shared/utils/parseDocumentSlug";
|
||||
import AuthStore from "stores/AuthStore";
|
||||
@@ -21,7 +21,7 @@ import DocumentComponent from "./Document";
|
||||
import HideSidebar from "./HideSidebar";
|
||||
import Loading from "./Loading";
|
||||
import SocketPresence from "./SocketPresence";
|
||||
import type { LocationWithState, NavigationNode } from "types";
|
||||
import { LocationWithState, NavigationNode } from "types";
|
||||
import { NotFoundError, OfflineError } from "utils/errors";
|
||||
import { matchDocumentEdit, updateDocumentUrl } from "utils/routeHelpers";
|
||||
import { isInternalUrl } from "utils/urls";
|
||||
|
||||
@@ -5,7 +5,7 @@ import { InputIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import keydown from "react-keydown";
|
||||
import { Prompt, Route, withRouter } from "react-router-dom";
|
||||
import type { RouterHistory, Match } from "react-router-dom";
|
||||
import { RouterHistory, Match } from "react-router-dom";
|
||||
import styled from "styled-components";
|
||||
import breakpoint from "styled-components-breakpoint";
|
||||
import AuthStore from "stores/AuthStore";
|
||||
@@ -30,7 +30,7 @@ import KeyboardShortcutsButton from "./KeyboardShortcutsButton";
|
||||
import MarkAsViewed from "./MarkAsViewed";
|
||||
import PublicReferences from "./PublicReferences";
|
||||
import References from "./References";
|
||||
import type { LocationWithState, NavigationNode, Theme } from "types";
|
||||
import { LocationWithState, NavigationNode, Theme } from "types";
|
||||
import { isCustomDomain } from "utils/domains";
|
||||
import { emojiToUrl } from "utils/emoji";
|
||||
import { meta } from "utils/keyboard";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { observable } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import type { ChangeEvent, KeyboardEvent } from "react";
|
||||
import { ChangeEvent, KeyboardEvent } from "react";
|
||||
import Textarea from "react-autosize-textarea";
|
||||
import styled from "styled-components";
|
||||
import breakpoint from "styled-components-breakpoint";
|
||||
@@ -12,7 +12,7 @@ import Document from "models/Document";
|
||||
import ClickablePadding from "components/ClickablePadding";
|
||||
import DocumentMetaWithViews from "components/DocumentMetaWithViews";
|
||||
import Editor from "components/Editor";
|
||||
import type { Props as EditorProps } from "components/Editor";
|
||||
import { Props as EditorProps } from "components/Editor";
|
||||
import Flex from "components/Flex";
|
||||
import HoverPreview from "components/HoverPreview";
|
||||
import Star, { AnimatedStar } from "components/Star";
|
||||
|
||||
@@ -24,7 +24,7 @@ import useStores from "hooks/useStores";
|
||||
import DocumentMenu from "menus/DocumentMenu";
|
||||
import NewChildDocumentMenu from "menus/NewChildDocumentMenu";
|
||||
import TemplatesMenu from "menus/TemplatesMenu";
|
||||
import type { NavigationNode } from "types";
|
||||
import { NavigationNode } from "types";
|
||||
import { metaDisplay } from "utils/keyboard";
|
||||
import { newDocumentUrl, editDocumentUrl } from "utils/routeHelpers";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import CenteredContent from "components/CenteredContent";
|
||||
import LoadingPlaceholder from "components/LoadingPlaceholder";
|
||||
import PageTitle from "components/PageTitle";
|
||||
import Container from "./Container";
|
||||
import type { LocationWithState } from "types";
|
||||
import { LocationWithState } from "types";
|
||||
|
||||
type Props = {
|
||||
location: LocationWithState;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import Breadcrumb from "components/Breadcrumb";
|
||||
import type { NavigationNode } from "types";
|
||||
import { NavigationNode } from "types";
|
||||
|
||||
type Props = {
|
||||
documentId: string;
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import Subheading from "components/Subheading";
|
||||
import ReferenceListItem from "./ReferenceListItem";
|
||||
import type { NavigationNode } from "types";
|
||||
import { NavigationNode } from "types";
|
||||
|
||||
type Props = {
|
||||
shareId: string;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Link } from "react-router-dom";
|
||||
import styled from "styled-components";
|
||||
import Document from "models/Document";
|
||||
import DocumentMeta from "components/DocumentMeta";
|
||||
import type { NavigationNode } from "types";
|
||||
import { NavigationNode } from "types";
|
||||
|
||||
type Props = {
|
||||
shareId?: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { observer, inject } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import type { Location } from "react-router-dom";
|
||||
import { Location } from "react-router-dom";
|
||||
import CollectionsStore from "stores/CollectionsStore";
|
||||
import DocumentsStore from "stores/DocumentsStore";
|
||||
import Document from "models/Document";
|
||||
|
||||
@@ -9,7 +9,7 @@ import HelpText from "components/HelpText";
|
||||
import useStores from "hooks/useStores";
|
||||
import { collectionUrl, documentUrl } from "utils/routeHelpers";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
document: Document;
|
||||
|
||||
@@ -7,7 +7,7 @@ import AutoSizer from "react-virtualized-auto-sizer";
|
||||
import { FixedSizeList as List } from "react-window";
|
||||
import styled from "styled-components";
|
||||
import CollectionsStore from "stores/CollectionsStore";
|
||||
import type { DocumentPath } from "stores/CollectionsStore";
|
||||
import { DocumentPath } from "stores/CollectionsStore";
|
||||
import DocumentsStore from "stores/DocumentsStore";
|
||||
import UiStore from "stores/UiStore";
|
||||
import Document from "models/Document";
|
||||
@@ -16,7 +16,7 @@ import { Outline } from "components/Input";
|
||||
import Labeled from "components/Labeled";
|
||||
import PathToDocument from "components/PathToDocument";
|
||||
|
||||
import type { ChangeEvent } from "react";
|
||||
import { ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
document: Document;
|
||||
|
||||
@@ -8,7 +8,7 @@ import Flex from "components/Flex";
|
||||
import HelpText from "components/HelpText";
|
||||
import useStores from "hooks/useStores";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
document: Document;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { observable } from "mobx";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import type { RouterHistory } from "react-router-dom";
|
||||
import { RouterHistory } from "react-router-dom";
|
||||
import UiStore from "stores/UiStore";
|
||||
import Document from "models/Document";
|
||||
import Button from "components/Button";
|
||||
@@ -10,7 +10,7 @@ import Flex from "components/Flex";
|
||||
import HelpText from "components/HelpText";
|
||||
import { documentUrl } from "utils/routeHelpers";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
ui: UiStore;
|
||||
|
||||
@@ -4,8 +4,8 @@ import { EditIcon } from "outline-icons";
|
||||
import queryString from "query-string";
|
||||
import * as React from "react";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import type { TFunction } from "react-i18next";
|
||||
import type { RouterHistory } from "react-router-dom";
|
||||
import { TFunction } from "react-i18next";
|
||||
import { RouterHistory } from "react-router-dom";
|
||||
import styled from "styled-components";
|
||||
import DocumentsStore from "stores/DocumentsStore";
|
||||
import CollectionFilter from "scenes/Search/components/CollectionFilter";
|
||||
@@ -19,7 +19,7 @@ import PaginatedDocumentList from "components/PaginatedDocumentList";
|
||||
import Scene from "components/Scene";
|
||||
import Subheading from "components/Subheading";
|
||||
import NewDocumentMenu from "menus/NewDocumentMenu";
|
||||
import type { LocationWithState } from "types";
|
||||
import { LocationWithState } from "types";
|
||||
|
||||
type Props = {
|
||||
documents: DocumentsStore;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { useTranslation, Trans } from "react-i18next";
|
||||
|
||||
import AuthStore from "stores/AuthStore";
|
||||
import CenteredContent from "components/CenteredContent";
|
||||
import PageTitle from "components/PageTitle";
|
||||
import useStores from "hooks/useStores";
|
||||
|
||||
const ErrorSuspended = ({ auth }: { auth: AuthStore }) => {
|
||||
const ErrorSuspended = () => {
|
||||
const { auth } = useStores();
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
@@ -30,4 +30,4 @@ const ErrorSuspended = ({ auth }: { auth: AuthStore }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default inject("auth")(observer(ErrorSuspended));
|
||||
export default observer(ErrorSuspended);
|
||||
@@ -2,7 +2,7 @@ import { observable } from "mobx";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import type { RouterHistory } from "react-router-dom";
|
||||
import { RouterHistory } from "react-router-dom";
|
||||
import { groupSettings } from "shared/utils/routeHelpers";
|
||||
import UiStore from "stores/UiStore";
|
||||
import Group from "models/Group";
|
||||
@@ -10,7 +10,7 @@ import Button from "components/Button";
|
||||
import Flex from "components/Flex";
|
||||
import HelpText from "components/HelpText";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
history: RouterHistory;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { observable } from "mobx";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import type { RouterHistory } from "react-router-dom";
|
||||
import { RouterHistory } from "react-router-dom";
|
||||
import UiStore from "stores/UiStore";
|
||||
import Group from "models/Group";
|
||||
import Button from "components/Button";
|
||||
@@ -10,7 +10,7 @@ import Flex from "components/Flex";
|
||||
import HelpText from "components/HelpText";
|
||||
import Input from "components/Input";
|
||||
|
||||
import type { SyntheticEvent, ChangeEvent } from "react";
|
||||
import { SyntheticEvent, ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
history: RouterHistory;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { observable } from "mobx";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import type { TFunction } from "react-i18next";
|
||||
import { TFunction } from "react-i18next";
|
||||
import AuthStore from "stores/AuthStore";
|
||||
import GroupMembershipsStore from "stores/GroupMembershipsStore";
|
||||
import UiStore from "stores/UiStore";
|
||||
@@ -20,7 +20,7 @@ import Modal from "components/Modal";
|
||||
import PaginatedList from "components/PaginatedList";
|
||||
import GroupMemberListItem from "./components/GroupMemberListItem";
|
||||
|
||||
import type { ChangeEvent } from "react";
|
||||
import { ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
ui: UiStore;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { inject, observer } from "mobx-react";
|
||||
import { PlusIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import type { TFunction } from "react-i18next";
|
||||
import { TFunction } from "react-i18next";
|
||||
import AuthStore from "stores/AuthStore";
|
||||
import GroupMembershipsStore from "stores/GroupMembershipsStore";
|
||||
import PoliciesStore from "stores/PoliciesStore";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { observable } from "mobx";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import type { RouterHistory } from "react-router-dom";
|
||||
import { RouterHistory } from "react-router-dom";
|
||||
import GroupsStore from "stores/GroupsStore";
|
||||
import UiStore from "stores/UiStore";
|
||||
import Group from "models/Group";
|
||||
@@ -13,7 +13,7 @@ import HelpText from "components/HelpText";
|
||||
import Input from "components/Input";
|
||||
import Modal from "components/Modal";
|
||||
|
||||
import type { SyntheticEvent, ChangeEvent } from "react";
|
||||
import { SyntheticEvent, ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
history: RouterHistory;
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import Scene from "components/Scene";
|
||||
import Tab from "components/Tab";
|
||||
import Tabs from "components/Tabs";
|
||||
import PaginatedDocumentList from "../components/PaginatedDocumentList";
|
||||
import useStores from "../hooks/useStores";
|
||||
import useStores from "hooks/useStores";
|
||||
import NewDocumentMenu from "menus/NewDocumentMenu";
|
||||
|
||||
function Home() {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { inject, observer } from "mobx-react";
|
||||
import { LinkIcon, CloseIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import { Link, withRouter } from "react-router-dom";
|
||||
import type { RouterHistory } from "react-router-dom";
|
||||
import { RouterHistory } from "react-router-dom";
|
||||
import styled from "styled-components";
|
||||
import AuthStore from "stores/AuthStore";
|
||||
import PoliciesStore from "stores/PoliciesStore";
|
||||
@@ -17,7 +17,7 @@ import Input from "components/Input";
|
||||
import NudeButton from "components/NudeButton";
|
||||
import Tooltip from "components/Tooltip";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
const MAX_INVITES = 20;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import ButtonLarge from "components/ButtonLarge";
|
||||
import InputLarge from "components/InputLarge";
|
||||
import { client } from "utils/ApiClient";
|
||||
|
||||
import type { SyntheticEvent, ChangeEvent } from "react";
|
||||
import { SyntheticEvent, ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
id: string;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { observer } from "mobx-react";
|
||||
import { BackIcon, EmailIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import { Redirect, Link } from "react-router-dom";
|
||||
import type { Location } from "react-router-dom";
|
||||
import { Location } from "react-router-dom";
|
||||
import styled from "styled-components";
|
||||
import { setCookie } from "tiny-cookie";
|
||||
import ButtonLarge from "components/ButtonLarge";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import { Redirect } from "react-router-dom";
|
||||
import useStores from "../hooks/useStores";
|
||||
import useStores from "hooks/useStores";
|
||||
|
||||
const Logout = () => {
|
||||
const { auth } = useStores();
|
||||
|
||||
@@ -6,10 +6,10 @@ import { PlusIcon } from "outline-icons";
|
||||
import queryString from "query-string";
|
||||
import * as React from "react";
|
||||
import { withTranslation, Trans } from "react-i18next";
|
||||
import type { TFunction } from "react-i18next";
|
||||
import { 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 { RouterHistory, Match } from "react-router-dom";
|
||||
import { Waypoint } from "react-waypoint";
|
||||
import styled from "styled-components";
|
||||
import breakpoint from "styled-components-breakpoint";
|
||||
@@ -35,12 +35,12 @@ import SearchField from "./components/SearchField";
|
||||
import StatusFilter from "./components/StatusFilter";
|
||||
import UserFilter from "./components/UserFilter";
|
||||
import NewDocumentMenu from "menus/NewDocumentMenu";
|
||||
import type { LocationWithState } from "types";
|
||||
import { LocationWithState } from "types";
|
||||
import { metaDisplay } from "utils/keyboard";
|
||||
import { newDocumentUrl, searchUrl } from "utils/routeHelpers";
|
||||
import { decodeURIComponentSafe } from "utils/urls";
|
||||
|
||||
import type { KeyboardEvent } from "react";
|
||||
import { KeyboardEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
history: RouterHistory;
|
||||
|
||||
@@ -2,9 +2,9 @@ import { SearchIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import styled, { withTheme } from "styled-components";
|
||||
import Flex from "components/Flex";
|
||||
import type { Theme } from "types";
|
||||
import { Theme } from "types";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
onChange: (a: string) => void;
|
||||
|
||||
@@ -14,7 +14,7 @@ import Scene from "components/Scene";
|
||||
import ImageUpload from "./components/ImageUpload";
|
||||
import env from "env";
|
||||
|
||||
import type { SyntheticEvent, ChangeEvent } from "react";
|
||||
import { SyntheticEvent, ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
auth: AuthStore;
|
||||
|
||||
@@ -16,7 +16,7 @@ import useStores from "hooks/useStores";
|
||||
import getDataTransferFiles from "utils/getDataTransferFiles";
|
||||
import { uploadFile } from "utils/uploadFile";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
function ImportExport() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -15,7 +15,7 @@ import Subheading from "components/Subheading";
|
||||
|
||||
import NotificationListItem from "./components/NotificationListItem";
|
||||
|
||||
import type { ChangeEvent } from "react";
|
||||
import { ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
ui: UiStore;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { observer, inject } from "mobx-react";
|
||||
import { ProfileIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import { Trans, withTranslation } from "react-i18next";
|
||||
import type { TFunction } from "react-i18next";
|
||||
import { TFunction } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
import { languageOptions } from "shared/i18n";
|
||||
import AuthStore from "stores/AuthStore";
|
||||
@@ -18,7 +18,7 @@ import InputSelect from "components/InputSelect";
|
||||
import Scene from "components/Scene";
|
||||
import ImageUpload from "./components/ImageUpload";
|
||||
|
||||
import type { SyntheticEvent, ChangeEvent } from "react";
|
||||
import { SyntheticEvent, ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
auth: AuthStore;
|
||||
|
||||
@@ -10,7 +10,7 @@ import Heading from "components/Heading";
|
||||
import HelpText from "components/HelpText";
|
||||
import Scene from "components/Scene";
|
||||
|
||||
import type { ChangeEvent } from "react";
|
||||
import { ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
auth: AuthStore;
|
||||
|
||||
@@ -12,7 +12,7 @@ import Modal from "components/Modal";
|
||||
import { compressImage } from "utils/compressImage";
|
||||
import { uploadFile, dataUrlToBlob } from "utils/uploadFile";
|
||||
|
||||
import type { DragEvent } from "react";
|
||||
import { DragEvent } from "react";
|
||||
|
||||
const EMPTY_OBJECT = {};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as React from "react";
|
||||
import NotificationSetting from "models/NotificationSetting";
|
||||
import Checkbox from "components/Checkbox";
|
||||
|
||||
import type { ChangeEvent } from "react";
|
||||
import { ChangeEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
setting?: NotificationSetting;
|
||||
|
||||
@@ -6,7 +6,7 @@ import User from "models/User";
|
||||
import Avatar from "components/Avatar";
|
||||
import Badge from "components/Badge";
|
||||
import Flex from "components/Flex";
|
||||
import type { Props as TableProps } from "components/Table";
|
||||
import { Props as TableProps } from "components/Table";
|
||||
import Time from "components/Time";
|
||||
import useCurrentUser from "hooks/useCurrentUser";
|
||||
import UserMenu from "menus/UserMenu";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { observer } from "mobx-react";
|
||||
import { StarredIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import type { Match } from "react-router-dom";
|
||||
import { Match } from "react-router-dom";
|
||||
import { Action } from "components/Actions";
|
||||
import Empty from "components/Empty";
|
||||
import Heading from "components/Heading";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { observer } from "mobx-react";
|
||||
import { TemplateIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import type { Match } from "react-router-dom";
|
||||
import { Match } from "react-router-dom";
|
||||
import { Action } from "components/Actions";
|
||||
import Empty from "components/Empty";
|
||||
import Heading from "components/Heading";
|
||||
|
||||
@@ -8,7 +8,7 @@ import Flex from "components/Flex";
|
||||
import HelpText from "components/HelpText";
|
||||
import Modal from "components/Modal";
|
||||
|
||||
import type { SyntheticEvent } from "react";
|
||||
import { SyntheticEvent } from "react";
|
||||
|
||||
type Props = {
|
||||
auth: AuthStore;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { EditIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { withRouter } from "react-router-dom";
|
||||
import type { RouterHistory } from "react-router-dom";
|
||||
import { RouterHistory } from "react-router-dom";
|
||||
import styled from "styled-components";
|
||||
import { settings } from "shared/utils/routeHelpers";
|
||||
import User from "models/User";
|
||||
|
||||
@@ -3,7 +3,7 @@ import { orderBy } from "lodash";
|
||||
import { observable, set, action, computed, runInAction } from "mobx";
|
||||
import RootStore from "stores/RootStore";
|
||||
import BaseModel from "../models/BaseModel";
|
||||
import type { PaginationParams } from "types";
|
||||
import { PaginationParams } from "types";
|
||||
import { client } from "utils/ApiClient";
|
||||
|
||||
type Action = "list" | "info" | "create" | "update" | "delete" | "count";
|
||||
|
||||
@@ -3,7 +3,7 @@ import { action, runInAction } from "mobx";
|
||||
import CollectionGroupMembership from "models/CollectionGroupMembership";
|
||||
import BaseStore from "./BaseStore";
|
||||
import RootStore from "./RootStore";
|
||||
import type { PaginationParams } from "types";
|
||||
import { PaginationParams } from "types";
|
||||
import { client } from "utils/ApiClient";
|
||||
|
||||
export default class CollectionGroupMembershipsStore extends BaseStore<CollectionGroupMembership> {
|
||||
|
||||
@@ -9,7 +9,7 @@ import BaseStore from "stores/BaseStore";
|
||||
import RootStore from "stores/RootStore";
|
||||
import Document from "models/Document";
|
||||
import env from "env";
|
||||
import type {
|
||||
import {
|
||||
NavigationNode,
|
||||
FetchOptions,
|
||||
PaginationParams,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { action, runInAction } from "mobx";
|
||||
import GroupMembership from "models/GroupMembership";
|
||||
import BaseStore from "./BaseStore";
|
||||
import RootStore from "./RootStore";
|
||||
import type { PaginationParams } from "types";
|
||||
import { PaginationParams } from "types";
|
||||
import { client } from "utils/ApiClient";
|
||||
|
||||
export default class GroupMembershipsStore extends BaseStore<GroupMembership> {
|
||||
|
||||
@@ -5,7 +5,7 @@ import naturalSort from "shared/utils/naturalSort";
|
||||
import Group from "models/Group";
|
||||
import BaseStore from "./BaseStore";
|
||||
import RootStore from "./RootStore";
|
||||
import type { PaginationParams } from "types";
|
||||
import { PaginationParams } from "types";
|
||||
import { client } from "utils/ApiClient";
|
||||
|
||||
export default class GroupsStore extends BaseStore<Group> {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { action, runInAction } from "mobx";
|
||||
import Membership from "models/Membership";
|
||||
import BaseStore from "./BaseStore";
|
||||
import RootStore from "./RootStore";
|
||||
import type { PaginationParams } from "types";
|
||||
import { PaginationParams } from "types";
|
||||
import { client } from "utils/ApiClient";
|
||||
|
||||
export default class MembershipsStore extends BaseStore<Membership> {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { action, runInAction } from "mobx";
|
||||
import BaseStore from "stores/BaseStore";
|
||||
import RootStore from "stores/RootStore";
|
||||
import Revision from "models/Revision";
|
||||
import type { FetchOptions, PaginationParams } from "types";
|
||||
import { FetchOptions, PaginationParams } from "types";
|
||||
import { client } from "utils/ApiClient";
|
||||
|
||||
export default class RevisionsStore extends BaseStore<Revision> {
|
||||
|
||||
Loaded 100 of 110 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user