mirror of https://github.com/fantasticit/think.git
root: fix eslint
This commit is contained in:
parent
e1d52607e1
commit
1d0356d4f5
|
@ -1,19 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
parser: '@typescript-eslint/parser',
|
|
||||||
parserOptions: {
|
|
||||||
project: './packages/server/tsconfig.json',
|
|
||||||
sourceType: 'module',
|
|
||||||
},
|
|
||||||
plugins: ['@typescript-eslint/eslint-plugin'],
|
|
||||||
extends: ['plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
|
|
||||||
root: true,
|
|
||||||
env: {
|
|
||||||
node: true,
|
|
||||||
jest: true,
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
'@typescript-eslint/interface-name-prefix': 'off',
|
|
||||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
|
||||||
},
|
|
||||||
};
|
|
18
package.json
18
package.json
|
@ -21,8 +21,8 @@
|
||||||
"pm2:server": "pnpm run --dir packages/server pm2",
|
"pm2:server": "pnpm run --dir packages/server pm2",
|
||||||
"pm2:client": "pnpm run --dir packages/client pm2",
|
"pm2:client": "pnpm run --dir packages/client pm2",
|
||||||
"lint": "concurrently 'pnpm:lint:*'",
|
"lint": "concurrently 'pnpm:lint:*'",
|
||||||
"lint:client": "eslint --fix './packages/client/**/*.{ts,tsx,js,jsx}' -c '.eslintrc.client.js'",
|
"lint:client": "eslint --fix './packages/client/**/*.{ts,tsx,js,jsx}'",
|
||||||
"lint:server": "eslint --fix './packages/server/src/*.{ts,js}' -c '.eslintrc.server.js'",
|
"lint:server": "eslint --fix './packages/server/**/*.{ts,js}'",
|
||||||
"format": "concurrently 'pnpm:format:*'",
|
"format": "concurrently 'pnpm:format:*'",
|
||||||
"format:ts": "prettier --write --parser typescript 'packages/**/*.{ts,tsx,js,jsx}'",
|
"format:ts": "prettier --write --parser typescript 'packages/**/*.{ts,tsx,js,jsx}'",
|
||||||
"format:css": "stylelint --fix --formatter verbose --allow-empty-input 'packages/**/*.{css,scss,sass}'",
|
"format:css": "stylelint --fix --formatter verbose --allow-empty-input 'packages/**/*.{css,scss,sass}'",
|
||||||
|
@ -39,16 +39,6 @@
|
||||||
"node": ">=16.5.0"
|
"node": ">=16.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
|
||||||
"@typescript-eslint/parser": "^5.21.0",
|
|
||||||
"eslint": "^8.14.0",
|
|
||||||
"eslint-config-prettier": "^8.5.0",
|
|
||||||
"eslint-plugin-import": "^2.26.0",
|
|
||||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
|
||||||
"eslint-plugin-react": "^7.29.4",
|
|
||||||
"eslint-plugin-react-hooks": "^4.5.0",
|
|
||||||
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
||||||
"husky": "^7.0.4",
|
"husky": "^7.0.4",
|
||||||
"lint-staged": "^12.4.1",
|
"lint-staged": "^12.4.1",
|
||||||
"prettier": "^2.3.2",
|
"prettier": "^2.3.2",
|
||||||
|
@ -64,10 +54,10 @@
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{ts,tsx,js,jsx}": "prettier --write",
|
"*.{ts,tsx,js,jsx}": "prettier --write",
|
||||||
"./packages/client/**/*.{ts,tsx,js,jsx}": [
|
"./packages/client/**/*.{ts,tsx,js,jsx}": [
|
||||||
"eslint --fix -c '.eslintrc.client.js'"
|
"eslint --fix"
|
||||||
],
|
],
|
||||||
"./packages/server/src/*.{ts,js}": [
|
"./packages/server/src/*.{ts,js}": [
|
||||||
"eslint --fix -c '.eslintrc.server.js'"
|
"eslint --fix"
|
||||||
],
|
],
|
||||||
"*.{css,scss,sass}": " stylelint --fix --formatter verbose --allow-empty-input"
|
"*.{css,scss,sass}": " stylelint --fix --formatter verbose --allow-empty-input"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
node_modules
|
||||||
|
**/.next/**
|
||||||
|
**/_next/**
|
||||||
|
**/dist/**
|
||||||
|
.eslintrc.js
|
||||||
|
./packages/client/src/tiptap/wrappers/mind/mind-elixir/iconfont/iconfont.js
|
||||||
|
./packages/client/public/viewer.min.js
|
|
@ -1,19 +1,31 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
parser: '@typescript-eslint/parser',
|
parser: '@typescript-eslint/parser',
|
||||||
plugins: ['@typescript-eslint', 'react-hooks'],
|
plugins: ['@typescript-eslint', 'react-hooks', 'simple-import-sort', 'prettier'],
|
||||||
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
|
extends: [
|
||||||
|
'eslint:recommended',
|
||||||
|
'plugin:react/recommended',
|
||||||
|
'plugin:@typescript-eslint/recommended',
|
||||||
|
'plugin:prettier/recommended',
|
||||||
|
],
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
files: ['*.ts', '*.tsx', '.js', '.jsx'],
|
files: ['*.ts', '*.tsx', '.js', '.jsx'],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
project: ['./packages/client/tsconfig.json'],
|
project: ['./packages/client/tsconfig.json'],
|
||||||
|
sourceType: 'module',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
settings: {
|
settings: {
|
||||||
react: {
|
'react': {
|
||||||
version: 'detect',
|
version: 'detect',
|
||||||
},
|
},
|
||||||
|
'import/resolver': {
|
||||||
|
node: {
|
||||||
|
paths: ['src'],
|
||||||
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
es6: true,
|
es6: true,
|
||||||
|
@ -40,6 +52,12 @@ module.exports = {
|
||||||
'react/prop-types': 0,
|
'react/prop-types': 0,
|
||||||
'testing-library/no-unnecessary-act': 0,
|
'testing-library/no-unnecessary-act': 0,
|
||||||
'react/react-in-jsx-scope': 0,
|
'react/react-in-jsx-scope': 0,
|
||||||
|
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
|
||||||
|
'react/react-in-jsx-scope': 'off',
|
||||||
|
'react/prop-types': 'off',
|
||||||
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||||
|
'simple-import-sort/imports': 'error',
|
||||||
|
'simple-import-sort/exports': 'error',
|
||||||
},
|
},
|
||||||
ignorePatterns: ['dist/', 'node_modules', 'scripts', 'examples'],
|
ignorePatterns: ['dist/', 'node_modules', 'scripts', 'examples'],
|
||||||
};
|
};
|
|
@ -94,6 +94,15 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "17.0.13",
|
"@types/node": "17.0.13",
|
||||||
"@types/react": "17.0.38",
|
"@types/react": "17.0.38",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
||||||
|
"@typescript-eslint/parser": "^5.21.0",
|
||||||
|
"eslint": "^8.14.0",
|
||||||
|
"eslint-config-prettier": "^8.5.0",
|
||||||
|
"eslint-plugin-import": "^2.26.0",
|
||||||
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
|
"eslint-plugin-react": "^7.29.4",
|
||||||
|
"eslint-plugin-react-hooks": "^4.5.0",
|
||||||
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
||||||
"typescript": "4.5.5"
|
"typescript": "4.5.5"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Space, Typography } from '@douyinfe/semi-ui';
|
|
||||||
import { IconLikeHeart } from '@douyinfe/semi-icons';
|
import { IconLikeHeart } from '@douyinfe/semi-icons';
|
||||||
|
import { Space, Typography } from '@douyinfe/semi-ui';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React, { useEffect, useRef } from 'react';
|
|
||||||
import { Banner as SemiBanner } from '@douyinfe/semi-ui';
|
|
||||||
import { IconClose } from '@douyinfe/semi-icons';
|
import { IconClose } from '@douyinfe/semi-icons';
|
||||||
|
import { Banner as SemiBanner } from '@douyinfe/semi-ui';
|
||||||
import { BannerProps } from '@douyinfe/semi-ui/banner';
|
import { BannerProps } from '@douyinfe/semi-ui/banner';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import React, { useEffect, useRef } from 'react';
|
||||||
|
|
||||||
interface IProps extends BannerProps {
|
interface IProps extends BannerProps {
|
||||||
duration?: number;
|
duration?: number;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React from 'react';
|
|
||||||
import { Spin, Typography } from '@douyinfe/semi-ui';
|
import { Spin, Typography } from '@douyinfe/semi-ui';
|
||||||
import { Empty } from 'illustrations/empty';
|
import { Empty } from 'illustrations/empty';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import { LoadingWrap } from './loading';
|
import { LoadingWrap } from './loading';
|
||||||
|
|
||||||
type RenderProps = React.ReactNode | (() => React.ReactNode);
|
type RenderProps = React.ReactNode | (() => React.ReactNode);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { useEffect, useRef } from 'react';
|
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import React, { useEffect, useRef } from 'react';
|
||||||
|
|
||||||
// interface IProps {
|
// interface IProps {
|
||||||
// loading: boolean;
|
// loading: boolean;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from 'react';
|
|
||||||
import { Button } from '@douyinfe/semi-ui';
|
import { Button } from '@douyinfe/semi-ui';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
|
||||||
import { useQuery } from 'hooks/use-query';
|
|
||||||
import { DocumentCreator as DocumenCreatorForm } from 'components/document/create';
|
import { DocumentCreator as DocumenCreatorForm } from 'components/document/create';
|
||||||
|
import { useQuery } from 'hooks/use-query';
|
||||||
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
onCreateDocument?: () => void;
|
onCreateDocument?: () => void;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import React, { useCallback } from 'react';
|
import { IconMore, IconPlus, IconStar } from '@douyinfe/semi-icons';
|
||||||
import { Dropdown, Button, Typography, Space } from '@douyinfe/semi-ui';
|
import { Button, Dropdown, Space, Typography } from '@douyinfe/semi-ui';
|
||||||
import { IconMore, IconStar, IconPlus } from '@douyinfe/semi-icons';
|
|
||||||
import { DocumentLinkCopyer } from 'components/document/link';
|
|
||||||
import { DocumentDeletor } from 'components/document/delete';
|
|
||||||
import { DocumentCreator } from 'components/document/create';
|
import { DocumentCreator } from 'components/document/create';
|
||||||
|
import { DocumentDeletor } from 'components/document/delete';
|
||||||
|
import { DocumentLinkCopyer } from 'components/document/link';
|
||||||
import { DocumentStar } from 'components/document/star';
|
import { DocumentStar } from 'components/document/star';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import React, { useCallback } from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
wikiId: string;
|
wikiId: string;
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
import type { IDocument } from '@think/domains';
|
|
||||||
import { useCallback } from 'react';
|
|
||||||
import Router from 'next/router';
|
|
||||||
import Link from 'next/link';
|
|
||||||
import { Button, Space, Typography, Tooltip, Avatar, Skeleton } from '@douyinfe/semi-ui';
|
|
||||||
import { IconEdit, IconUser } from '@douyinfe/semi-icons';
|
import { IconEdit, IconUser } from '@douyinfe/semi-icons';
|
||||||
import { LocaleTime } from 'components/locale-time';
|
import { Avatar, Button, Skeleton, Space, Tooltip, Typography } from '@douyinfe/semi-ui';
|
||||||
import { IconDocument } from 'components/icons/IconDocument';
|
import type { IDocument } from '@think/domains';
|
||||||
import { DocumentShare } from 'components/document/share';
|
import { DocumentShare } from 'components/document/share';
|
||||||
import { DocumentStar } from 'components/document/star';
|
import { DocumentStar } from 'components/document/star';
|
||||||
|
import { IconDocument } from 'components/icons/IconDocument';
|
||||||
|
import { LocaleTime } from 'components/locale-time';
|
||||||
|
import Link from 'next/link';
|
||||||
|
import Router from 'next/router';
|
||||||
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
import React, { useEffect, useState } from 'react';
|
import { IconDelete, IconUserAdd } from '@douyinfe/semi-icons';
|
||||||
import {
|
import {
|
||||||
Button,
|
|
||||||
Modal,
|
|
||||||
Spin,
|
|
||||||
Input,
|
|
||||||
Typography,
|
|
||||||
Tooltip,
|
|
||||||
Table,
|
|
||||||
Tabs,
|
|
||||||
TabPane,
|
|
||||||
Checkbox,
|
|
||||||
Toast,
|
|
||||||
Popconfirm,
|
|
||||||
AvatarGroup,
|
|
||||||
Avatar,
|
Avatar,
|
||||||
|
AvatarGroup,
|
||||||
|
Button,
|
||||||
|
Checkbox,
|
||||||
|
Input,
|
||||||
|
Modal,
|
||||||
|
Popconfirm,
|
||||||
|
Spin,
|
||||||
|
Table,
|
||||||
|
TabPane,
|
||||||
|
Tabs,
|
||||||
|
Toast,
|
||||||
|
Tooltip,
|
||||||
|
Typography,
|
||||||
} from '@douyinfe/semi-ui';
|
} from '@douyinfe/semi-ui';
|
||||||
import { IconUserAdd, IconDelete } from '@douyinfe/semi-icons';
|
|
||||||
import { useUser } from 'data/user';
|
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
|
||||||
import { useCollaborationDocument } from 'data/document';
|
|
||||||
import { DataRender } from 'components/data-render';
|
import { DataRender } from 'components/data-render';
|
||||||
import { DocumentLinkCopyer } from 'components/document/link';
|
import { DocumentLinkCopyer } from 'components/document/link';
|
||||||
|
import { useCollaborationDocument } from 'data/document';
|
||||||
|
import { useUser } from 'data/user';
|
||||||
import { event, JOIN_USER } from 'event';
|
import { event, JOIN_USER } from 'event';
|
||||||
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import React, { useEffect, useState } from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
wikiId: string;
|
wikiId: string;
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import React from 'react';
|
|
||||||
import type { IComment, IUser } from '@think/domains';
|
|
||||||
import { Avatar, Typography, Space, Popconfirm, Skeleton } from '@douyinfe/semi-ui';
|
|
||||||
import { IconUser } from '@douyinfe/semi-icons';
|
import { IconUser } from '@douyinfe/semi-icons';
|
||||||
|
import { Avatar, Popconfirm, Skeleton, Space, Typography } from '@douyinfe/semi-ui';
|
||||||
|
import type { IComment, IUser } from '@think/domains';
|
||||||
import { LocaleTime } from 'components/locale-time';
|
import { LocaleTime } from 'components/locale-time';
|
||||||
import { useUser } from 'data/user';
|
import { useUser } from 'data/user';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
|
||||||
import type { IComment } from '@think/domains';
|
import type { IComment } from '@think/domains';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import { CommentItem } from './Item';
|
import { CommentItem } from './Item';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import React, { useRef, useState } from 'react';
|
import { Avatar, Banner, Button, Pagination, Space, Typography } from '@douyinfe/semi-ui';
|
||||||
import { Avatar, Button, Space, Typography, Banner, Pagination } from '@douyinfe/semi-ui';
|
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
|
||||||
import { CommentKit, CommentMenuBar, useEditor, EditorContent } from 'tiptap/editor';
|
|
||||||
import { DataRender } from 'components/data-render';
|
import { DataRender } from 'components/data-render';
|
||||||
import { useUser } from 'data/user';
|
|
||||||
import { useComments } from 'data/comment';
|
import { useComments } from 'data/comment';
|
||||||
|
import { useUser } from 'data/user';
|
||||||
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import React, { useRef, useState } from 'react';
|
||||||
|
import { CommentKit, CommentMenuBar, EditorContent, useEditor } from 'tiptap/editor';
|
||||||
|
|
||||||
import { Comments } from './comments';
|
import { Comments } from './comments';
|
||||||
import { CommentItemPlaceholder } from './comments/Item';
|
import { CommentItemPlaceholder } from './comments/Item';
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import { Dispatch, SetStateAction, useCallback, useEffect, useState } from 'react';
|
import { Checkbox, Modal, TabPane, Tabs } from '@douyinfe/semi-ui';
|
||||||
import Router from 'next/router';
|
|
||||||
import { Modal, Tabs, TabPane, Checkbox } from '@douyinfe/semi-ui';
|
|
||||||
import { useCreateDocument } from 'data/document';
|
|
||||||
import { usePublicTemplates, useOwnTemplates } from 'data/template';
|
|
||||||
import { TemplateList } from 'components/template/list';
|
|
||||||
import { TemplateCardEmpty } from 'components/template/card';
|
import { TemplateCardEmpty } from 'components/template/card';
|
||||||
|
import { TemplateList } from 'components/template/list';
|
||||||
|
import { useCreateDocument } from 'data/document';
|
||||||
|
import { useOwnTemplates, usePublicTemplates } from 'data/template';
|
||||||
|
import Router from 'next/router';
|
||||||
|
import { Dispatch, SetStateAction, useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React, { useCallback } from 'react';
|
|
||||||
import Router from 'next/router';
|
|
||||||
import { Typography, Space, Modal } from '@douyinfe/semi-ui';
|
|
||||||
import { IconDelete } from '@douyinfe/semi-icons';
|
import { IconDelete } from '@douyinfe/semi-icons';
|
||||||
|
import { Modal, Space, Typography } from '@douyinfe/semi-ui';
|
||||||
import { useDeleteDocument } from 'data/document';
|
import { useDeleteDocument } from 'data/document';
|
||||||
import { triggerRefreshTocs } from 'event';
|
import { triggerRefreshTocs } from 'event';
|
||||||
|
import Router from 'next/router';
|
||||||
|
import React, { useCallback } from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
wikiId: string;
|
wikiId: string;
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
import Router from 'next/router';
|
import { IAuthority, ILoginUser } from '@think/domains';
|
||||||
import React, { useEffect, useState, useRef } from 'react';
|
|
||||||
import cls from 'classnames';
|
import cls from 'classnames';
|
||||||
import { ILoginUser, IAuthority } from '@think/domains';
|
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
|
||||||
import { findMentions } from 'tiptap/prose-utils';
|
|
||||||
import { useCollaborationDocument } from 'data/document';
|
import { useCollaborationDocument } from 'data/document';
|
||||||
import { event, triggerChangeDocumentTitle, triggerJoinUser, USE_DOCUMENT_VERSION } from 'event';
|
import { event, triggerChangeDocumentTitle, triggerJoinUser, USE_DOCUMENT_VERSION } from 'event';
|
||||||
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import Router from 'next/router';
|
||||||
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
import { CollaborationEditor, ICollaborationRefProps } from 'tiptap/editor';
|
import { CollaborationEditor, ICollaborationRefProps } from 'tiptap/editor';
|
||||||
import { DocumentUserSetting } from './users';
|
import { findMentions } from 'tiptap/prose-utils';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
import { DocumentUserSetting } from './users';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
user: ILoginUser;
|
user: ILoginUser;
|
||||||
|
|
|
@ -1,23 +1,24 @@
|
||||||
import Router from 'next/router';
|
import { IconArticle, IconChevronLeft } from '@douyinfe/semi-icons';
|
||||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
import { Button, Nav, Popover, Skeleton, Space, Spin, Tooltip, Typography } from '@douyinfe/semi-ui';
|
||||||
import { Nav, Skeleton, Typography, Space, Button, Tooltip, Spin, Popover } from '@douyinfe/semi-ui';
|
|
||||||
import { IconChevronLeft, IconArticle } from '@douyinfe/semi-icons';
|
|
||||||
import { useUser } from 'data/user';
|
|
||||||
import { useDocumentDetail } from 'data/document';
|
|
||||||
import { useWindowSize } from 'hooks/use-window-size';
|
|
||||||
import { SecureDocumentIllustration } from 'illustrations/secure-document';
|
|
||||||
import { Seo } from 'components/seo';
|
|
||||||
import { Theme } from 'components/theme';
|
|
||||||
import { DataRender } from 'components/data-render';
|
import { DataRender } from 'components/data-render';
|
||||||
|
import { Divider } from 'components/divider';
|
||||||
|
import { DocumentCollaboration } from 'components/document/collaboration';
|
||||||
import { DocumentShare } from 'components/document/share';
|
import { DocumentShare } from 'components/document/share';
|
||||||
import { DocumentStar } from 'components/document/star';
|
import { DocumentStar } from 'components/document/star';
|
||||||
import { DocumentCollaboration } from 'components/document/collaboration';
|
|
||||||
import { DocumentStyle } from 'components/document/style';
|
import { DocumentStyle } from 'components/document/style';
|
||||||
import { DocumentVersion } from 'components/document/version';
|
import { DocumentVersion } from 'components/document/version';
|
||||||
|
import { Seo } from 'components/seo';
|
||||||
|
import { Theme } from 'components/theme';
|
||||||
import { User } from 'components/user';
|
import { User } from 'components/user';
|
||||||
import { Divider } from 'components/divider';
|
import { useDocumentDetail } from 'data/document';
|
||||||
|
import { useUser } from 'data/user';
|
||||||
|
import { CHANGE_DOCUMENT_TITLE, event, triggerUseDocumentVersion } from 'event';
|
||||||
import { useDocumentStyle } from 'hooks/use-document-style';
|
import { useDocumentStyle } from 'hooks/use-document-style';
|
||||||
import { event, CHANGE_DOCUMENT_TITLE, triggerUseDocumentVersion } from 'event';
|
import { useWindowSize } from 'hooks/use-window-size';
|
||||||
|
import { SecureDocumentIllustration } from 'illustrations/secure-document';
|
||||||
|
import Router from 'next/router';
|
||||||
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
import { Editor } from './editor';
|
import { Editor } from './editor';
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useMemo } from 'react';
|
import { Checkbox, Modal, Table, Typography } from '@douyinfe/semi-ui';
|
||||||
import { Modal, Typography, Table, Checkbox } from '@douyinfe/semi-ui';
|
|
||||||
import { IAuthority, IUser } from '@think/domains';
|
import { IAuthority, IUser } from '@think/domains';
|
||||||
import { DocAuth } from 'data/document';
|
import { DocAuth } from 'data/document';
|
||||||
|
import React, { useMemo } from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React, { useCallback } from 'react';
|
|
||||||
import { Typography, Space } from '@douyinfe/semi-ui';
|
|
||||||
import { IconLink } from '@douyinfe/semi-icons';
|
import { IconLink } from '@douyinfe/semi-icons';
|
||||||
|
import { Space, Typography } from '@douyinfe/semi-ui';
|
||||||
import { copy } from 'helpers/copy';
|
import { copy } from 'helpers/copy';
|
||||||
import { buildUrl } from 'helpers/url';
|
import { buildUrl } from 'helpers/url';
|
||||||
|
import React, { useCallback } from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
wikiId: string;
|
wikiId: string;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from 'react';
|
|
||||||
import { Space, Avatar } from '@douyinfe/semi-ui';
|
|
||||||
import { LocaleTime } from 'components/locale-time';
|
|
||||||
import { IconUser } from '@douyinfe/semi-icons';
|
import { IconUser } from '@douyinfe/semi-icons';
|
||||||
|
import { Avatar, Space } from '@douyinfe/semi-ui';
|
||||||
import { IDocument } from '@think/domains';
|
import { IDocument } from '@think/domains';
|
||||||
|
import { LocaleTime } from 'components/locale-time';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
document: IDocument;
|
document: IDocument;
|
||||||
|
|
|
@ -1,24 +1,25 @@
|
||||||
|
import { IconArticle, IconEdit } from '@douyinfe/semi-icons';
|
||||||
|
import { BackTop, Button, Layout, Nav, Popover, Skeleton, Space, Spin, Tooltip, Typography } from '@douyinfe/semi-ui';
|
||||||
|
import cls from 'classnames';
|
||||||
|
import { DataRender } from 'components/data-render';
|
||||||
|
import { DocumentCollaboration } from 'components/document/collaboration';
|
||||||
|
import { CommentEditor } from 'components/document/comments';
|
||||||
|
import { DocumentShare } from 'components/document/share';
|
||||||
|
import { DocumentStar } from 'components/document/star';
|
||||||
|
import { DocumentStyle } from 'components/document/style';
|
||||||
|
import { DocumentVersion } from 'components/document/version';
|
||||||
|
import { ImageViewer } from 'components/image-viewer';
|
||||||
|
import { Seo } from 'components/seo';
|
||||||
|
import { useDocumentDetail } from 'data/document';
|
||||||
|
import { useUser } from 'data/user';
|
||||||
|
import { triggerJoinUser } from 'event';
|
||||||
|
import { useDocumentStyle } from 'hooks/use-document-style';
|
||||||
|
import { useWindowSize } from 'hooks/use-window-size';
|
||||||
import Router from 'next/router';
|
import Router from 'next/router';
|
||||||
import React, { useCallback, useMemo, useState } from 'react';
|
import React, { useCallback, useMemo, useState } from 'react';
|
||||||
import { createPortal } from 'react-dom';
|
import { createPortal } from 'react-dom';
|
||||||
import cls from 'classnames';
|
|
||||||
import { Layout, Nav, Space, Button, Typography, Skeleton, Tooltip, Popover, BackTop, Spin } from '@douyinfe/semi-ui';
|
|
||||||
import { IconEdit, IconArticle } from '@douyinfe/semi-icons';
|
|
||||||
import { ImageViewer } from 'components/image-viewer';
|
|
||||||
import { Seo } from 'components/seo';
|
|
||||||
import { DataRender } from 'components/data-render';
|
|
||||||
import { DocumentShare } from 'components/document/share';
|
|
||||||
import { DocumentStar } from 'components/document/star';
|
|
||||||
import { DocumentCollaboration } from 'components/document/collaboration';
|
|
||||||
import { DocumentStyle } from 'components/document/style';
|
|
||||||
import { DocumentVersion } from 'components/document/version';
|
|
||||||
import { CommentEditor } from 'components/document/comments';
|
|
||||||
import { useDocumentStyle } from 'hooks/use-document-style';
|
|
||||||
import { useWindowSize } from 'hooks/use-window-size';
|
|
||||||
import { useUser } from 'data/user';
|
|
||||||
import { useDocumentDetail } from 'data/document';
|
|
||||||
import { triggerJoinUser } from 'event';
|
|
||||||
import { CollaborationEditor } from 'tiptap/editor';
|
import { CollaborationEditor } from 'tiptap/editor';
|
||||||
|
|
||||||
import { Author } from './author';
|
import { Author } from './author';
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
|
|
|
@ -1,35 +1,36 @@
|
||||||
import React, { useMemo, useRef, useCallback } from 'react';
|
import { IconArticle } from '@douyinfe/semi-icons';
|
||||||
import { createPortal } from 'react-dom';
|
|
||||||
import cls from 'classnames';
|
|
||||||
import {
|
import {
|
||||||
|
BackTop,
|
||||||
|
Breadcrumb,
|
||||||
|
Button,
|
||||||
|
Form,
|
||||||
Layout,
|
Layout,
|
||||||
Nav,
|
Nav,
|
||||||
Space,
|
|
||||||
Button,
|
|
||||||
Typography,
|
|
||||||
Skeleton,
|
|
||||||
Popover,
|
Popover,
|
||||||
Breadcrumb,
|
Skeleton,
|
||||||
BackTop,
|
Space,
|
||||||
Form,
|
Typography,
|
||||||
} from '@douyinfe/semi-ui';
|
} from '@douyinfe/semi-ui';
|
||||||
import { FormApi } from '@douyinfe/semi-ui/lib/es/form';
|
import { FormApi } from '@douyinfe/semi-ui/lib/es/form';
|
||||||
import { IconArticle } from '@douyinfe/semi-icons';
|
import cls from 'classnames';
|
||||||
import Link from 'next/link';
|
|
||||||
import { Seo } from 'components/seo';
|
|
||||||
import { LogoImage, LogoText } from 'components/logo';
|
|
||||||
import { DataRender } from 'components/data-render';
|
import { DataRender } from 'components/data-render';
|
||||||
import { DocumentStyle } from 'components/document/style';
|
import { DocumentStyle } from 'components/document/style';
|
||||||
import { User } from 'components/user';
|
|
||||||
import { Theme } from 'components/theme';
|
|
||||||
import { ImageViewer } from 'components/image-viewer';
|
import { ImageViewer } from 'components/image-viewer';
|
||||||
import { useDocumentStyle } from 'hooks/use-document-style';
|
import { LogoImage, LogoText } from 'components/logo';
|
||||||
|
import { Seo } from 'components/seo';
|
||||||
|
import { Theme } from 'components/theme';
|
||||||
|
import { User } from 'components/user';
|
||||||
import { usePublicDocument } from 'data/document';
|
import { usePublicDocument } from 'data/document';
|
||||||
|
import { useDocumentStyle } from 'hooks/use-document-style';
|
||||||
|
import { useWindowSize } from 'hooks/use-window-size';
|
||||||
|
import Link from 'next/link';
|
||||||
|
import React, { useCallback, useMemo, useRef } from 'react';
|
||||||
|
import { createPortal } from 'react-dom';
|
||||||
import { DocumentSkeleton } from 'tiptap/components/skeleton';
|
import { DocumentSkeleton } from 'tiptap/components/skeleton';
|
||||||
import { CollaborationEditor } from 'tiptap/editor';
|
import { CollaborationEditor } from 'tiptap/editor';
|
||||||
|
|
||||||
import { Author } from '../author';
|
import { Author } from '../author';
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
import { useWindowSize } from 'hooks/use-window-size';
|
|
||||||
|
|
||||||
const { Header, Content } = Layout;
|
const { Header, Content } = Layout;
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import React, { useMemo, useState, useEffect } from 'react';
|
|
||||||
import { Button, Modal, Input, Typography, Toast } from '@douyinfe/semi-ui';
|
|
||||||
import { IconLink } from '@douyinfe/semi-icons';
|
import { IconLink } from '@douyinfe/semi-icons';
|
||||||
|
import { Button, Input, Modal, Toast, Typography } from '@douyinfe/semi-ui';
|
||||||
import { isPublicDocument } from '@think/domains';
|
import { isPublicDocument } from '@think/domains';
|
||||||
import { getDocumentShareURL } from 'helpers/url';
|
|
||||||
import { ShareIllustration } from 'illustrations/share';
|
|
||||||
import { DataRender } from 'components/data-render';
|
import { DataRender } from 'components/data-render';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
|
||||||
import { useDocumentDetail } from 'data/document';
|
import { useDocumentDetail } from 'data/document';
|
||||||
|
import { getDocumentShareURL } from 'helpers/url';
|
||||||
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import { ShareIllustration } from 'illustrations/share';
|
||||||
|
import React, { useEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
documentId: string;
|
documentId: string;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
|
||||||
import { Tooltip, Button } from '@douyinfe/semi-ui';
|
|
||||||
import { IconStar } from '@douyinfe/semi-icons';
|
import { IconStar } from '@douyinfe/semi-icons';
|
||||||
|
import { Button, Tooltip } from '@douyinfe/semi-ui';
|
||||||
import { useDocumentStar } from 'data/document';
|
import { useDocumentStar } from 'data/document';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
documentId: string;
|
documentId: string;
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import React from 'react';
|
|
||||||
import { RadioGroup, Radio, Typography, Slider, Popover, Button } from '@douyinfe/semi-ui';
|
|
||||||
import { IconArticle } from '@douyinfe/semi-icons';
|
import { IconArticle } from '@douyinfe/semi-icons';
|
||||||
import { useWindowSize } from 'hooks/use-window-size';
|
import { Button, Popover, Radio, RadioGroup, Slider, Typography } from '@douyinfe/semi-ui';
|
||||||
import { useDocumentStyle } from 'hooks/use-document-style';
|
import { useDocumentStyle } from 'hooks/use-document-style';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import { useWindowSize } from 'hooks/use-window-size';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
import React, { useState, useEffect, useCallback } from 'react';
|
|
||||||
import { Button, Modal, Typography, Layout, Nav } from '@douyinfe/semi-ui';
|
|
||||||
import { IconChevronLeft } from '@douyinfe/semi-icons';
|
import { IconChevronLeft } from '@douyinfe/semi-icons';
|
||||||
import { useEditor, EditorContent } from '@tiptap/react';
|
import { Button, Layout, Modal, Nav, Typography } from '@douyinfe/semi-ui';
|
||||||
|
import { EditorContent, useEditor } from '@tiptap/react';
|
||||||
import cls from 'classnames';
|
import cls from 'classnames';
|
||||||
import { CollaborationKit } from 'tiptap/editor';
|
|
||||||
import { safeJSONParse } from 'helpers/json';
|
|
||||||
import { DataRender } from 'components/data-render';
|
import { DataRender } from 'components/data-render';
|
||||||
import { LocaleTime } from 'components/locale-time';
|
import { LocaleTime } from 'components/locale-time';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
|
||||||
import { useDocumentVersion } from 'data/document';
|
import { useDocumentVersion } from 'data/document';
|
||||||
|
import { safeJSONParse } from 'helpers/json';
|
||||||
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import React, { useCallback, useEffect, useState } from 'react';
|
||||||
|
import { CollaborationKit } from 'tiptap/editor';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
import { Popover, SideSheet, Typography } from '@douyinfe/semi-ui';
|
||||||
import { Popover, Typography, SideSheet } from '@douyinfe/semi-ui';
|
|
||||||
import { EXPRESSIONES, GESTURES, SYMBOLS, OBJECTS, ACTIVITIES, SKY_WEATHER } from './constants';
|
|
||||||
import { createKeysLocalStorageLRUCache } from 'helpers/lru-cache';
|
import { createKeysLocalStorageLRUCache } from 'helpers/lru-cache';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
import styles from './index.module.scss';
|
|
||||||
import { useWindowSize } from 'hooks/use-window-size';
|
import { useWindowSize } from 'hooks/use-window-size';
|
||||||
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
|
import { ACTIVITIES, EXPRESSIONES, GESTURES, OBJECTS, SKY_WEATHER, SYMBOLS } from './constants';
|
||||||
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const { Title } = Typography;
|
const { Title } = Typography;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
|
||||||
import { Typography } from '@douyinfe/semi-ui';
|
import { Typography } from '@douyinfe/semi-ui';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
illustration?: React.ReactNode;
|
illustration?: React.ReactNode;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React, { useMemo, useState, useCallback } from 'react';
|
|
||||||
import { Typography } from '@douyinfe/semi-ui';
|
import { Typography } from '@douyinfe/semi-ui';
|
||||||
import { debounce } from 'helpers/debounce';
|
import { debounce } from 'helpers/debounce';
|
||||||
|
import React, { useCallback, useMemo, useState } from 'react';
|
||||||
|
|
||||||
import { GridCell } from './grid-cell';
|
import { GridCell } from './grid-cell';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
|
||||||
import { Icon } from '@douyinfe/semi-ui';
|
import { Icon } from '@douyinfe/semi-ui';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
export const IconDocument: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
export const IconDocument: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
|
||||||
import { Icon } from '@douyinfe/semi-ui';
|
import { Icon } from '@douyinfe/semi-ui';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
export const IconDocumentFill: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
export const IconDocumentFill: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
|
||||||
import { Icon } from '@douyinfe/semi-ui';
|
import { Icon } from '@douyinfe/semi-ui';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
export const IconMessage: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
export const IconMessage: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
|
||||||
import { Icon } from '@douyinfe/semi-ui';
|
import { Icon } from '@douyinfe/semi-ui';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
export const IconOverview: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
export const IconOverview: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
|
||||||
import { Icon } from '@douyinfe/semi-ui';
|
import { Icon } from '@douyinfe/semi-ui';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
export const IconSearch: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
export const IconSearch: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
|
||||||
import { Icon } from '@douyinfe/semi-ui';
|
import { Icon } from '@douyinfe/semi-ui';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
export const IconSetting: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
export const IconSetting: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
|
||||||
import { Icon } from '@douyinfe/semi-ui';
|
import { Icon } from '@douyinfe/semi-ui';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
export const IconShare: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
export const IconShare: React.FC<{ style?: React.CSSProperties }> = ({ style = {} }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,61 +1,61 @@
|
||||||
export * from './IconDocument';
|
|
||||||
export * from './IconDocumentFill';
|
|
||||||
export * from './IconMessage';
|
|
||||||
export * from './IconOverview';
|
|
||||||
export * from './IconSetting';
|
|
||||||
export * from './IconShare';
|
|
||||||
export * from './IconLeft';
|
|
||||||
export * from './IconRight';
|
|
||||||
export * from './IconFull';
|
|
||||||
export * from './IconHalf';
|
|
||||||
export * from './IconCenter';
|
|
||||||
export * from './IconFont';
|
|
||||||
export * from './IconTask';
|
|
||||||
export * from './IconLink';
|
|
||||||
export * from './IconClear';
|
|
||||||
export * from './IconImage';
|
|
||||||
export * from './IconMind';
|
|
||||||
export * from './IconZoomIn';
|
|
||||||
export * from './IconZoomOut';
|
|
||||||
export * from './IconTable';
|
|
||||||
export * from './IconCodeBlock';
|
|
||||||
export * from './IconStatus';
|
|
||||||
export * from './IconInfo';
|
|
||||||
export * from './IconEmoji';
|
|
||||||
export * from './IconAddColumnBefore';
|
|
||||||
export * from './IconAddColumnAfter';
|
export * from './IconAddColumnAfter';
|
||||||
export * from './IconDeleteColumn';
|
export * from './IconAddColumnBefore';
|
||||||
export * from './IconAddRowBefore';
|
|
||||||
export * from './IconAddRowAfter';
|
export * from './IconAddRowAfter';
|
||||||
|
export * from './IconAddRowBefore';
|
||||||
|
export * from './IconAttachment';
|
||||||
|
export * from './IconCallout';
|
||||||
|
export * from './IconCenter';
|
||||||
|
export * from './IconClear';
|
||||||
|
export * from './IconCodeBlock';
|
||||||
|
export * from './IconCountdown';
|
||||||
|
export * from './IconDeleteColumn';
|
||||||
export * from './IconDeleteRow';
|
export * from './IconDeleteRow';
|
||||||
export * from './IconDeleteTable';
|
export * from './IconDeleteTable';
|
||||||
export * from './IconMergeCell';
|
export * from './IconDocument';
|
||||||
export * from './IconSplitCell';
|
export * from './IconDocumentFill';
|
||||||
export * from './IconAttachment';
|
export * from './IconDrawBoard';
|
||||||
export * from './IconMath';
|
export * from './IconEmoji';
|
||||||
export * from './IconSearch';
|
export * from './IconFlow';
|
||||||
export * from './IconSearchReplace';
|
export * from './IconFont';
|
||||||
export * from './IconQuote';
|
export * from './IconFull';
|
||||||
export * from './IconHorizontalRule';
|
export * from './IconGlobe';
|
||||||
export * from './IconOrderedList';
|
export * from './IconHalf';
|
||||||
export * from './IconList';
|
|
||||||
export * from './IconHeading1';
|
export * from './IconHeading1';
|
||||||
export * from './IconHeading2';
|
export * from './IconHeading2';
|
||||||
export * from './IconHeading3';
|
export * from './IconHeading3';
|
||||||
export * from './IconTableHeaderRow';
|
export * from './IconHorizontalRule';
|
||||||
export * from './IconTableHeaderColumn';
|
export * from './IconImage';
|
||||||
export * from './IconTableHeaderCell';
|
export * from './IconInfo';
|
||||||
export * from './IconSub';
|
export * from './IconLeft';
|
||||||
export * from './IconSup';
|
export * from './IconLink';
|
||||||
export * from './IconGlobe';
|
export * from './IconList';
|
||||||
export * from './IconCountdown';
|
export * from './IconMath';
|
||||||
export * from './IconDrawBoard';
|
export * from './IconMergeCell';
|
||||||
export * from './IconCallout';
|
export * from './IconMessage';
|
||||||
export * from './IconStructure';
|
export * from './IconMind';
|
||||||
|
export * from './IconMindCenter';
|
||||||
|
export * from './IconMindFull';
|
||||||
export * from './IconMindLeft';
|
export * from './IconMindLeft';
|
||||||
export * from './IconMindRight';
|
export * from './IconMindRight';
|
||||||
export * from './IconMindSide';
|
export * from './IconMindSide';
|
||||||
export * from './IconMindFull';
|
export * from './IconOrderedList';
|
||||||
export * from './IconMindCenter';
|
export * from './IconOverview';
|
||||||
|
export * from './IconQuote';
|
||||||
|
export * from './IconRight';
|
||||||
|
export * from './IconSearch';
|
||||||
|
export * from './IconSearchReplace';
|
||||||
|
export * from './IconSetting';
|
||||||
|
export * from './IconShare';
|
||||||
|
export * from './IconSplitCell';
|
||||||
|
export * from './IconStatus';
|
||||||
|
export * from './IconStructure';
|
||||||
|
export * from './IconSub';
|
||||||
|
export * from './IconSup';
|
||||||
|
export * from './IconTable';
|
||||||
|
export * from './IconTableHeaderCell';
|
||||||
|
export * from './IconTableHeaderColumn';
|
||||||
|
export * from './IconTableHeaderRow';
|
||||||
export * from './IconTableOfContents';
|
export * from './IconTableOfContents';
|
||||||
export * from './IconFlow';
|
export * from './IconTask';
|
||||||
|
export * from './IconZoomIn';
|
||||||
|
export * from './IconZoomOut';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useRef, useState, useEffect } from 'react';
|
|
||||||
import distanceInWords from 'date-fns/formatDistance';
|
|
||||||
import dateFormat from 'date-fns/format';
|
import dateFormat from 'date-fns/format';
|
||||||
|
import distanceInWords from 'date-fns/formatDistance';
|
||||||
import zh from 'date-fns/locale/zh-CN';
|
import zh from 'date-fns/locale/zh-CN';
|
||||||
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
|
|
||||||
let callbacks: Array<() => void> = [];
|
let callbacks: Array<() => void> = [];
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import Link from 'next/link';
|
|
||||||
import { Typography } from '@douyinfe/semi-ui';
|
import { Typography } from '@douyinfe/semi-ui';
|
||||||
|
import Link from 'next/link';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
import React, { useCallback, useEffect } from 'react';
|
import { Badge, Button, Dropdown, Modal, Notification, Pagination, TabPane, Tabs, Typography } from '@douyinfe/semi-ui';
|
||||||
import Link from 'next/link';
|
|
||||||
import { Typography, Dropdown, Badge, Button, Tabs, TabPane, Pagination, Notification, Modal } from '@douyinfe/semi-ui';
|
|
||||||
import { IconMessage } from 'components/icons/IconMessage';
|
|
||||||
import { useAllMessages, useReadMessages, useUnreadMessages } from 'data/message';
|
|
||||||
import { EmptyBoxIllustration } from 'illustrations/empty-box';
|
|
||||||
import { DataRender } from 'components/data-render';
|
import { DataRender } from 'components/data-render';
|
||||||
import { Empty } from 'components/empty';
|
import { Empty } from 'components/empty';
|
||||||
import { Placeholder } from './placeholder';
|
import { IconMessage } from 'components/icons/IconMessage';
|
||||||
import styles from './index.module.scss';
|
import { useAllMessages, useReadMessages, useUnreadMessages } from 'data/message';
|
||||||
import { useUser } from 'data/user';
|
import { useUser } from 'data/user';
|
||||||
import { useWindowSize } from 'hooks/use-window-size';
|
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import { useWindowSize } from 'hooks/use-window-size';
|
||||||
|
import { EmptyBoxIllustration } from 'illustrations/empty-box';
|
||||||
|
import Link from 'next/link';
|
||||||
|
import React, { useCallback, useEffect } from 'react';
|
||||||
|
|
||||||
|
import styles from './index.module.scss';
|
||||||
|
import { Placeholder } from './placeholder';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
const PAGE_SIZE = 6;
|
const PAGE_SIZE = 6;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import React, { useRef, useEffect } from 'react';
|
|
||||||
import cls from 'classnames';
|
import cls from 'classnames';
|
||||||
import { useClickOutside } from 'hooks/use-click-outside';
|
import { useClickOutside } from 'hooks/use-click-outside';
|
||||||
import interact from 'interactjs';
|
import interact from 'interactjs';
|
||||||
|
import React, { useEffect, useRef } from 'react';
|
||||||
|
|
||||||
import styles from './style.module.scss';
|
import styles from './style.module.scss';
|
||||||
|
|
||||||
type ISize = { width: number; height: number };
|
type ISize = { width: number; height: number };
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
import { IconSearch as SemiIconSearch } from '@douyinfe/semi-icons';
|
||||||
|
import { Button, Input, Modal, Spin, Typography } from '@douyinfe/semi-ui';
|
||||||
|
import { IDocument } from '@think/domains';
|
||||||
|
import { DataRender } from 'components/data-render';
|
||||||
|
import { DocumentStar } from 'components/document/star';
|
||||||
|
import { Empty } from 'components/empty';
|
||||||
|
import { IconSearch } from 'components/icons';
|
||||||
|
import { IconDocumentFill } from 'components/icons/IconDocumentFill';
|
||||||
|
import { LocaleTime } from 'components/locale-time';
|
||||||
|
import { useRecentDocuments } from 'data/document';
|
||||||
|
import { useAsyncLoading } from 'hooks/use-async-loading';
|
||||||
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import Router from 'next/router';
|
import Router from 'next/router';
|
||||||
import { Typography, Button, Modal, Input, Spin } from '@douyinfe/semi-ui';
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import { IconSearch as SemiIconSearch } from '@douyinfe/semi-icons';
|
|
||||||
import { IconSearch } from 'components/icons';
|
|
||||||
import { IDocument } from '@think/domains';
|
|
||||||
import { useRecentDocuments } from 'data/document';
|
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
|
||||||
import { useAsyncLoading } from 'hooks/use-async-loading';
|
|
||||||
import { searchDocument } from 'services/document';
|
import { searchDocument } from 'services/document';
|
||||||
import { Empty } from 'components/empty';
|
|
||||||
import { DataRender } from 'components/data-render';
|
|
||||||
import { LocaleTime } from 'components/locale-time';
|
|
||||||
import { DocumentStar } from 'components/document/star';
|
|
||||||
import { IconDocumentFill } from 'components/icons/IconDocumentFill';
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
|
import { IconEdit, IconPlus, IconUser } from '@douyinfe/semi-icons';
|
||||||
|
import { Avatar, Button, Modal, Skeleton, Space, Tooltip, Typography } from '@douyinfe/semi-ui';
|
||||||
import type { ITemplate } from '@think/domains';
|
import type { ITemplate } from '@think/domains';
|
||||||
import { useCallback } from 'react';
|
|
||||||
import cls from 'classnames';
|
import cls from 'classnames';
|
||||||
import Router from 'next/router';
|
|
||||||
import { Button, Space, Typography, Tooltip, Avatar, Skeleton, Modal } from '@douyinfe/semi-ui';
|
|
||||||
import { IconEdit, IconUser, IconPlus } from '@douyinfe/semi-icons';
|
|
||||||
import { IconDocument } from 'components/icons/IconDocument';
|
import { IconDocument } from 'components/icons/IconDocument';
|
||||||
import { TemplateReader } from 'components/template/reader';
|
import { TemplateReader } from 'components/template/reader';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
|
||||||
import { useUser } from 'data/user';
|
import { useUser } from 'data/user';
|
||||||
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import Router from 'next/router';
|
||||||
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
import React, { useMemo, useCallback, useState, useEffect } from 'react';
|
import { IconArticle, IconChevronLeft } from '@douyinfe/semi-icons';
|
||||||
import Router from 'next/router';
|
import { Button, Nav, Popconfirm, Popover, Space, Switch, Tooltip, Typography } from '@douyinfe/semi-ui';
|
||||||
import cls from 'classnames';
|
|
||||||
import { Button, Nav, Space, Typography, Tooltip, Switch, Popover, Popconfirm } from '@douyinfe/semi-ui';
|
|
||||||
import { IconChevronLeft, IconArticle } from '@douyinfe/semi-icons';
|
|
||||||
import { ILoginUser, ITemplate } from '@think/domains';
|
import { ILoginUser, ITemplate } from '@think/domains';
|
||||||
|
import cls from 'classnames';
|
||||||
|
import { DocumentStyle } from 'components/document/style';
|
||||||
import { Theme } from 'components/theme';
|
import { Theme } from 'components/theme';
|
||||||
import { User } from 'components/user';
|
import { User } from 'components/user';
|
||||||
import { DocumentStyle } from 'components/document/style';
|
|
||||||
import { useDocumentStyle } from 'hooks/use-document-style';
|
import { useDocumentStyle } from 'hooks/use-document-style';
|
||||||
import { useWindowSize } from 'hooks/use-window-size';
|
import { useWindowSize } from 'hooks/use-window-size';
|
||||||
|
import Router from 'next/router';
|
||||||
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import { CollaborationEditor } from 'tiptap/editor';
|
import { CollaborationEditor } from 'tiptap/editor';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
import React, { useState, useMemo, useCallback, useEffect } from 'react';
|
import { IconArticle, IconChevronLeft } from '@douyinfe/semi-icons';
|
||||||
import Router from 'next/router';
|
import { Button, Nav, Popconfirm, Popover, Space, Spin, Switch, Tooltip, Typography } from '@douyinfe/semi-ui';
|
||||||
import cls from 'classnames';
|
import cls from 'classnames';
|
||||||
import { Spin, Button, Nav, Space, Typography, Tooltip, Switch, Popover, Popconfirm } from '@douyinfe/semi-ui';
|
|
||||||
import { IconChevronLeft, IconArticle } from '@douyinfe/semi-icons';
|
|
||||||
import { useUser } from 'data/user';
|
|
||||||
import { useTemplate } from 'data/template';
|
|
||||||
import { Seo } from 'components/seo';
|
|
||||||
import { DataRender } from 'components/data-render';
|
import { DataRender } from 'components/data-render';
|
||||||
|
import { DocumentStyle } from 'components/document/style';
|
||||||
|
import { Seo } from 'components/seo';
|
||||||
import { Theme } from 'components/theme';
|
import { Theme } from 'components/theme';
|
||||||
import { User } from 'components/user';
|
import { User } from 'components/user';
|
||||||
import { DocumentStyle } from 'components/document/style';
|
import { useTemplate } from 'data/template';
|
||||||
|
import { useUser } from 'data/user';
|
||||||
import { useDocumentStyle } from 'hooks/use-document-style';
|
import { useDocumentStyle } from 'hooks/use-document-style';
|
||||||
import { useWindowSize } from 'hooks/use-window-size';
|
import { useWindowSize } from 'hooks/use-window-size';
|
||||||
|
import Router from 'next/router';
|
||||||
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import { CollaborationEditor } from 'tiptap/editor';
|
import { CollaborationEditor } from 'tiptap/editor';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React, { useState, useMemo } from 'react';
|
|
||||||
import { List, Pagination } from '@douyinfe/semi-ui';
|
import { List, Pagination } from '@douyinfe/semi-ui';
|
||||||
import { DataRender } from 'components/data-render';
|
import { DataRender } from 'components/data-render';
|
||||||
import { IProps as ITemplateCardProps, TemplateCardPlaceholder, TemplateCard } from 'components/template/card';
|
|
||||||
import { Empty } from 'components/empty';
|
import { Empty } from 'components/empty';
|
||||||
|
import { IProps as ITemplateCardProps, TemplateCard, TemplateCardPlaceholder } from 'components/template/card';
|
||||||
|
import React, { useMemo, useState } from 'react';
|
||||||
|
|
||||||
const grid = {
|
const grid = {
|
||||||
gutter: 16,
|
gutter: 16,
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React from 'react';
|
|
||||||
import { Spin } from '@douyinfe/semi-ui';
|
import { Spin } from '@douyinfe/semi-ui';
|
||||||
import { Seo } from 'components/seo';
|
|
||||||
import { DataRender } from 'components/data-render';
|
import { DataRender } from 'components/data-render';
|
||||||
import { useTemplate } from 'data/template';
|
|
||||||
import { ImageViewer } from 'components/image-viewer';
|
import { ImageViewer } from 'components/image-viewer';
|
||||||
|
import { Seo } from 'components/seo';
|
||||||
|
import { useTemplate } from 'data/template';
|
||||||
|
import React from 'react';
|
||||||
import { ReaderEditor } from 'tiptap/editor';
|
import { ReaderEditor } from 'tiptap/editor';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React from 'react';
|
import { IconMoon, IconSun } from '@douyinfe/semi-icons';
|
||||||
import { Button } from '@douyinfe/semi-ui';
|
import { Button } from '@douyinfe/semi-ui';
|
||||||
import { IconSun, IconMoon } from '@douyinfe/semi-icons';
|
|
||||||
import { useTheme } from 'hooks/use-theme';
|
|
||||||
import { Tooltip } from 'components/tooltip';
|
import { Tooltip } from 'components/tooltip';
|
||||||
|
import { useTheme } from 'hooks/use-theme';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
export const Theme = () => {
|
export const Theme = () => {
|
||||||
const { theme, toggle } = useTheme();
|
const { theme, toggle } = useTheme();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
|
||||||
import { Tooltip as SemiTooltip } from '@douyinfe/semi-ui';
|
import { Tooltip as SemiTooltip } from '@douyinfe/semi-ui';
|
||||||
import { Position } from '@douyinfe/semi-ui/tooltip';
|
import { Position } from '@douyinfe/semi-ui/tooltip';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
content: React.ReactNode;
|
content: React.ReactNode;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
|
||||||
import { Upload as SemiUpload, Button, Toast } from '@douyinfe/semi-ui';
|
|
||||||
import { IconUpload } from '@douyinfe/semi-icons';
|
import { IconUpload } from '@douyinfe/semi-icons';
|
||||||
|
import { Button, Toast, Upload as SemiUpload } from '@douyinfe/semi-ui';
|
||||||
import { useAsyncLoading } from 'hooks/use-async-loading';
|
import { useAsyncLoading } from 'hooks/use-async-loading';
|
||||||
|
import React from 'react';
|
||||||
import { uploadFile } from 'services/file';
|
import { uploadFile } from 'services/file';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import React from 'react';
|
|
||||||
import { Dropdown, Typography, Avatar, Button } from '@douyinfe/semi-ui';
|
|
||||||
import { IconSpin } from '@douyinfe/semi-icons';
|
import { IconSpin } from '@douyinfe/semi-icons';
|
||||||
|
import { Avatar, Button, Dropdown, Typography } from '@douyinfe/semi-ui';
|
||||||
import { useUser } from 'data/user';
|
import { useUser } from 'data/user';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import { UserSetting } from './setting';
|
import { UserSetting } from './setting';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { Dispatch, SetStateAction, useRef, useState, useEffect } from 'react';
|
|
||||||
import { Avatar, Form, Modal, Space } from '@douyinfe/semi-ui';
|
import { Avatar, Form, Modal, Space } from '@douyinfe/semi-ui';
|
||||||
import { FormApi } from '@douyinfe/semi-ui/lib/es/form';
|
import { FormApi } from '@douyinfe/semi-ui/lib/es/form';
|
||||||
import { Upload } from 'components/upload';
|
import { Upload } from 'components/upload';
|
||||||
import { useUser } from 'data/user';
|
import { useUser } from 'data/user';
|
||||||
|
import { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
|
||||||
import { Button } from '@douyinfe/semi-ui';
|
import { Button } from '@douyinfe/semi-ui';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
|
||||||
import { WikiCreator as WikiCreatorForm } from 'components/wiki/create';
|
import { WikiCreator as WikiCreatorForm } from 'components/wiki/create';
|
||||||
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
export const WikiCreator: React.FC = ({ children }) => {
|
export const WikiCreator: React.FC = ({ children }) => {
|
||||||
const [visible, toggleVisible] = useToggle(false);
|
const [visible, toggleVisible] = useToggle(false);
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import React from 'react';
|
|
||||||
import { Dropdown, Button } from '@douyinfe/semi-ui';
|
|
||||||
import { IconChevronDown, IconPlus } from '@douyinfe/semi-icons';
|
import { IconChevronDown, IconPlus } from '@douyinfe/semi-icons';
|
||||||
import { useWindowSize } from 'hooks/use-window-size';
|
import { Button, Dropdown } from '@douyinfe/semi-ui';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
|
||||||
import { useQuery } from 'hooks/use-query';
|
|
||||||
import { WikiCreator } from 'components/wiki/create';
|
|
||||||
import { DocumentCreator } from 'components/document/create';
|
import { DocumentCreator } from 'components/document/create';
|
||||||
|
import { WikiCreator } from 'components/wiki/create';
|
||||||
|
import { useQuery } from 'hooks/use-query';
|
||||||
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import { useWindowSize } from 'hooks/use-window-size';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
onCreateDocument?: () => void;
|
onCreateDocument?: () => void;
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import Link from 'next/link';
|
|
||||||
import { Space, Typography, Avatar, Skeleton } from '@douyinfe/semi-ui';
|
|
||||||
import { IconUser } from '@douyinfe/semi-icons';
|
import { IconUser } from '@douyinfe/semi-icons';
|
||||||
|
import { Avatar, Skeleton, Space, Typography } from '@douyinfe/semi-ui';
|
||||||
import { IWiki } from '@think/domains';
|
import { IWiki } from '@think/domains';
|
||||||
import { LocaleTime } from 'components/locale-time';
|
|
||||||
import { IconDocument } from 'components/icons/IconDocument';
|
import { IconDocument } from 'components/icons/IconDocument';
|
||||||
|
import { LocaleTime } from 'components/locale-time';
|
||||||
import { WikiStar } from 'components/wiki/star';
|
import { WikiStar } from 'components/wiki/star';
|
||||||
|
import Link from 'next/link';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const { Text, Paragraph } = Typography;
|
const { Text, Paragraph } = Typography;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import type { IWiki } from '@think/domains';
|
|
||||||
import { Dispatch, SetStateAction, useRef } from 'react';
|
|
||||||
import Router from 'next/router';
|
|
||||||
import { Form, Modal } from '@douyinfe/semi-ui';
|
import { Form, Modal } from '@douyinfe/semi-ui';
|
||||||
import { FormApi } from '@douyinfe/semi-ui/lib/es/form';
|
import { FormApi } from '@douyinfe/semi-ui/lib/es/form';
|
||||||
|
import type { IWiki } from '@think/domains';
|
||||||
import { ICreateWiki, useOwnWikis } from 'data/wiki';
|
import { ICreateWiki, useOwnWikis } from 'data/wiki';
|
||||||
|
import Router from 'next/router';
|
||||||
|
import { Dispatch, SetStateAction, useRef } from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React, { useCallback } from 'react';
|
|
||||||
import Router from 'next/router';
|
|
||||||
import { Typography, Space, Modal } from '@douyinfe/semi-ui';
|
|
||||||
import { IconDelete } from '@douyinfe/semi-icons';
|
import { IconDelete } from '@douyinfe/semi-icons';
|
||||||
|
import { Modal, Space, Typography } from '@douyinfe/semi-ui';
|
||||||
import { useOwnWikis } from 'data/wiki';
|
import { useOwnWikis } from 'data/wiki';
|
||||||
|
import Router from 'next/router';
|
||||||
|
import React, { useCallback } from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
wikiId: string;
|
wikiId: string;
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import React, { useState, useMemo, useEffect, useCallback } from 'react';
|
|
||||||
import { Transfer, Button, Banner, Typography, RadioGroup, Radio, Toast, Checkbox } from '@douyinfe/semi-ui';
|
|
||||||
import { IconClose } from '@douyinfe/semi-icons';
|
import { IconClose } from '@douyinfe/semi-icons';
|
||||||
import { WIKI_STATUS_LIST, isPublicDocument, isPublicWiki } from '@think/domains';
|
import { Banner, Button, Checkbox, Radio, RadioGroup, Toast, Transfer, Typography } from '@douyinfe/semi-ui';
|
||||||
|
import { isPublicDocument, isPublicWiki, WIKI_STATUS_LIST } from '@think/domains';
|
||||||
|
import { flattenTree2Array } from 'components/wiki/tocs/utils';
|
||||||
import { useWikiDetail, useWikiTocs } from 'data/wiki';
|
import { useWikiDetail, useWikiTocs } from 'data/wiki';
|
||||||
import { buildUrl } from 'helpers/url';
|
import { buildUrl } from 'helpers/url';
|
||||||
import { flattenTree2Array } from 'components/wiki/tocs/utils';
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const { Text, Title } = Typography;
|
const { Text, Title } = Typography;
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import Link from 'next/link';
|
import { Avatar, Skeleton, Space, Typography } from '@douyinfe/semi-ui';
|
||||||
import { Space, Typography, Avatar, Skeleton } from '@douyinfe/semi-ui';
|
|
||||||
import { IWiki } from '@think/domains';
|
import { IWiki } from '@think/domains';
|
||||||
import { LocaleTime } from 'components/locale-time';
|
|
||||||
import { IconDocument } from 'components/icons/IconDocument';
|
import { IconDocument } from 'components/icons/IconDocument';
|
||||||
|
import { LocaleTime } from 'components/locale-time';
|
||||||
import { WikiStar } from 'components/wiki/star';
|
import { WikiStar } from 'components/wiki/star';
|
||||||
|
import Link from 'next/link';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from 'react';
|
|
||||||
import { Skeleton } from '@douyinfe/semi-ui';
|
import { Skeleton } from '@douyinfe/semi-ui';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
export const WorkspacePlaceholder = () => {
|
export const WorkspacePlaceholder = () => {
|
||||||
const placeholder = (
|
const placeholder = (
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { useRef, useEffect, useState } from 'react';
|
import { Button, Form, Toast } from '@douyinfe/semi-ui';
|
||||||
import { Form, Button, Toast } from '@douyinfe/semi-ui';
|
|
||||||
import { FormApi } from '@douyinfe/semi-ui/lib/es/form';
|
import { FormApi } from '@douyinfe/semi-ui/lib/es/form';
|
||||||
import type { IWiki } from '@think/domains';
|
|
||||||
import { WIKI_AVATARS } from '@think/constants';
|
import { WIKI_AVATARS } from '@think/constants';
|
||||||
|
import type { IWiki } from '@think/domains';
|
||||||
import { Upload } from 'components/upload';
|
import { Upload } from 'components/upload';
|
||||||
|
import { useEffect, useRef, useState } from 'react';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
type IUpdateWIKI = Partial<IWiki>;
|
type IUpdateWIKI = Partial<IWiki>;
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import React from 'react';
|
import { TabPane, Tabs } from '@douyinfe/semi-ui';
|
||||||
import { Tabs, TabPane } from '@douyinfe/semi-ui';
|
|
||||||
import { Seo } from 'components/seo';
|
import { Seo } from 'components/seo';
|
||||||
import { useWikiDetail } from 'data/wiki';
|
import { useWikiDetail } from 'data/wiki';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import { Base } from './base';
|
import { Base } from './base';
|
||||||
import { Users } from './users';
|
|
||||||
import { More } from './more';
|
import { More } from './more';
|
||||||
|
import { Users } from './users';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
wikiId: string;
|
wikiId: string;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Button, Banner, Typography } from '@douyinfe/semi-ui';
|
import { Banner, Button, Typography } from '@douyinfe/semi-ui';
|
||||||
import { WorkspaceDeletor } from 'components/wiki/delete';
|
import { WorkspaceDeletor } from 'components/wiki/delete';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useCallback, useState } from 'react';
|
import { Banner, Button, Input, Modal, Select, Space, Typography } from '@douyinfe/semi-ui';
|
||||||
import { Modal, Typography, Button, Input, Space, Select, Banner } from '@douyinfe/semi-ui';
|
|
||||||
import { WIKI_USER_ROLES, WikiUserRole } from '@think/domains';
|
import { WIKI_USER_ROLES, WikiUserRole } from '@think/domains';
|
||||||
import { IWikiUserOpeateData } from 'data/wiki';
|
import { IWikiUserOpeateData } from 'data/wiki';
|
||||||
|
import React, { useCallback, useState } from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { useCallback, useState } from 'react';
|
import { Banner, Button, Modal, Select } from '@douyinfe/semi-ui';
|
||||||
import { Modal, Button, Select, Banner } from '@douyinfe/semi-ui';
|
|
||||||
import { WIKI_USER_ROLES, WikiUserRole } from '@think/domains';
|
import { WIKI_USER_ROLES, WikiUserRole } from '@think/domains';
|
||||||
|
import React, { useCallback, useState } from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
import React, { useState } from 'react';
|
import { IconDelete, IconEdit } from '@douyinfe/semi-icons';
|
||||||
import { Table, Popconfirm, Button } from '@douyinfe/semi-ui';
|
import { Button, Popconfirm, Table } from '@douyinfe/semi-ui';
|
||||||
import { IconEdit, IconDelete } from '@douyinfe/semi-icons';
|
import { getWikiUserRoleText } from '@think/domains';
|
||||||
import { useWikiUsers } from 'data/wiki';
|
|
||||||
import { DataRender } from 'components/data-render';
|
import { DataRender } from 'components/data-render';
|
||||||
import { LocaleTime } from 'components/locale-time';
|
import { LocaleTime } from 'components/locale-time';
|
||||||
import { getWikiUserRoleText } from '@think/domains';
|
import { useWikiUsers } from 'data/wiki';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
import { Placeholder } from './placeholder';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
import { AddUser } from './add';
|
import { AddUser } from './add';
|
||||||
import { EditUser } from './edit';
|
import { EditUser } from './edit';
|
||||||
|
import { Placeholder } from './placeholder';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
wikiId: string;
|
wikiId: string;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Table, Skeleton } from '@douyinfe/semi-ui';
|
import { Skeleton, Table } from '@douyinfe/semi-ui';
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
|
||||||
import { Tooltip, Button } from '@douyinfe/semi-ui';
|
|
||||||
import { IconStar } from '@douyinfe/semi-icons';
|
import { IconStar } from '@douyinfe/semi-icons';
|
||||||
|
import { Button, Tooltip } from '@douyinfe/semi-ui';
|
||||||
import { useWikiStar } from 'data/wiki';
|
import { useWikiStar } from 'data/wiki';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
wikiId: string;
|
wikiId: string;
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
|
import { IconPlus } from '@douyinfe/semi-icons';
|
||||||
|
import { Avatar, Button, Skeleton, Tooltip, Typography } from '@douyinfe/semi-ui';
|
||||||
|
import { isPublicWiki } from '@think/domains';
|
||||||
|
import { DataRender } from 'components/data-render';
|
||||||
|
import { IconDocument, IconGlobe, IconOverview, IconSetting } from 'components/icons';
|
||||||
|
import { findParents } from 'components/wiki/tocs/utils';
|
||||||
|
import { useWikiDetail, useWikiTocs } from 'data/wiki';
|
||||||
|
import { event, REFRESH_TOCS, triggerCreateDocument } from 'event';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { Avatar, Button, Typography, Skeleton, Tooltip } from '@douyinfe/semi-ui';
|
|
||||||
import { IconPlus } from '@douyinfe/semi-icons';
|
import styles from './index.module.scss';
|
||||||
import { isPublicWiki } from '@think/domains';
|
|
||||||
import { useWikiDetail, useWikiTocs } from 'data/wiki';
|
|
||||||
import { findParents } from 'components/wiki/tocs/utils';
|
|
||||||
import { IconDocument, IconSetting, IconOverview, IconGlobe } from 'components/icons';
|
|
||||||
import { DataRender } from 'components/data-render';
|
|
||||||
import { event, REFRESH_TOCS, triggerCreateDocument } from 'event';
|
|
||||||
import { NavItem } from './nav-item';
|
import { NavItem } from './nav-item';
|
||||||
import { Tree } from './tree';
|
import { Tree } from './tree';
|
||||||
import styles from './index.module.scss';
|
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
wikiId: string;
|
wikiId: string;
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import React, { useCallback, useEffect, useState } from 'react';
|
import { Banner, Button, Toast, Tree, Typography } from '@douyinfe/semi-ui';
|
||||||
import { Banner, Tree, Button, Toast, Typography } from '@douyinfe/semi-ui';
|
|
||||||
import { DataRender } from 'components/data-render';
|
import { DataRender } from 'components/data-render';
|
||||||
import { Resizeable } from 'components/resizeable';
|
import { Resizeable } from 'components/resizeable';
|
||||||
import { useWikiTocs } from 'data/wiki';
|
import { useWikiTocs } from 'data/wiki';
|
||||||
|
import React, { useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import type { UrlObject } from 'url';
|
|
||||||
import cls from 'classnames';
|
import cls from 'classnames';
|
||||||
import React from 'react';
|
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
import React from 'react';
|
||||||
|
import type { UrlObject } from 'url';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
import React, { useState, useEffect } from 'react';
|
|
||||||
import { useRouter } from 'next/router';
|
|
||||||
import { Avatar, Typography, Skeleton, Space } from '@douyinfe/semi-ui';
|
|
||||||
import { IconPlus } from '@douyinfe/semi-icons';
|
import { IconPlus } from '@douyinfe/semi-icons';
|
||||||
|
import { Avatar, Skeleton, Space, Typography } from '@douyinfe/semi-ui';
|
||||||
|
import { DataRender } from 'components/data-render';
|
||||||
import { IconOverview } from 'components/icons';
|
import { IconOverview } from 'components/icons';
|
||||||
import { usePublicWikiDetail, usePublicWikiTocs } from 'data/wiki';
|
import { LogoImage, LogoText } from 'components/logo';
|
||||||
import { Seo } from 'components/seo';
|
import { Seo } from 'components/seo';
|
||||||
import { findParents } from 'components/wiki/tocs/utils';
|
import { findParents } from 'components/wiki/tocs/utils';
|
||||||
import { LogoImage, LogoText } from 'components/logo';
|
import { usePublicWikiDetail, usePublicWikiTocs } from 'data/wiki';
|
||||||
import { DataRender } from 'components/data-render';
|
import { useRouter } from 'next/router';
|
||||||
import { Tree } from './tree';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { NavItem } from './nav-item';
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
import { NavItem } from './nav-item';
|
||||||
|
import { Tree } from './tree';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
wikiId: string;
|
wikiId: string;
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import React, { useEffect, useState, useCallback } from 'react';
|
|
||||||
import Link from 'next/link';
|
|
||||||
import { Tree as SemiTree, Button, Typography } from '@douyinfe/semi-ui';
|
|
||||||
import { IconMore, IconPlus } from '@douyinfe/semi-icons';
|
import { IconMore, IconPlus } from '@douyinfe/semi-icons';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
import { Button, Tree as SemiTree, Typography } from '@douyinfe/semi-ui';
|
||||||
import { DocumentActions } from 'components/document/actions';
|
import { DocumentActions } from 'components/document/actions';
|
||||||
import { DocumentCreator as DocumenCreatorForm } from 'components/document/create';
|
import { DocumentCreator as DocumenCreatorForm } from 'components/document/create';
|
||||||
import { event, CREATE_DOCUMENT, triggerCreateDocument } from 'event';
|
import { CREATE_DOCUMENT, event, triggerCreateDocument } from 'event';
|
||||||
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import Link from 'next/link';
|
||||||
|
import React, { useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const Actions = ({ node }) => {
|
const Actions = ({ node }) => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import type { IComment } from '@think/domains';
|
import type { IComment } from '@think/domains';
|
||||||
import React, { useState, useCallback } from 'react';
|
import React, { useCallback, useState } from 'react';
|
||||||
import useSWR from 'swr';
|
|
||||||
import { HttpClient } from 'services/http-client';
|
import { HttpClient } from 'services/http-client';
|
||||||
|
import useSWR from 'swr';
|
||||||
|
|
||||||
export type CreateCommentDto = Pick<IComment, 'parentCommentId' | 'html' | 'replyUserId'>;
|
export type CreateCommentDto = Pick<IComment, 'parentCommentId' | 'html' | 'replyUserId'>;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import type { IUser, IDocument, IWiki, IAuthority } from '@think/domains';
|
import type { IAuthority, IDocument, IUser, IWiki } from '@think/domains';
|
||||||
import useSWR from 'swr';
|
|
||||||
import { useState, useCallback, useEffect } from 'react';
|
|
||||||
import { useAsyncLoading } from 'hooks/use-async-loading';
|
import { useAsyncLoading } from 'hooks/use-async-loading';
|
||||||
import { HttpClient } from 'services/http-client';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
import { getPublicDocumentDetail } from 'services/document';
|
import { getPublicDocumentDetail } from 'services/document';
|
||||||
|
import { HttpClient } from 'services/http-client';
|
||||||
|
import useSWR from 'swr';
|
||||||
|
|
||||||
type ICreateDocument = Partial<Pick<IDocument, 'wikiId' | 'parentDocumentId'>>;
|
type ICreateDocument = Partial<Pick<IDocument, 'wikiId' | 'parentDocumentId'>>;
|
||||||
type IDocumentWithAuth = { document: IDocument; authority: IAuthority };
|
type IDocumentWithAuth = { document: IDocument; authority: IAuthority };
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import type { IMessage } from '@think/domains';
|
import type { IMessage } from '@think/domains';
|
||||||
import React, { useState, useCallback } from 'react';
|
import React, { useCallback, useState } from 'react';
|
||||||
import useSWR from 'swr';
|
|
||||||
import { HttpClient } from 'services/http-client';
|
import { HttpClient } from 'services/http-client';
|
||||||
|
import useSWR from 'swr';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所有消息
|
* 所有消息
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import type { ITemplate } from '@think/domains';
|
import type { ITemplate } from '@think/domains';
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
import useSWR from 'swr';
|
|
||||||
import { HttpClient } from 'services/http-client';
|
import { HttpClient } from 'services/http-client';
|
||||||
|
import useSWR from 'swr';
|
||||||
|
|
||||||
export const usePublicTemplates = () => {
|
export const usePublicTemplates = () => {
|
||||||
const [page, setPage] = useState(1);
|
const [page, setPage] = useState(1);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import type { IUser, ILoginUser } from '@think/domains';
|
import type { ILoginUser, IUser } from '@think/domains';
|
||||||
import useSWR from 'swr';
|
|
||||||
import { useCallback, useEffect } from 'react';
|
|
||||||
import Router, { useRouter } from 'next/router';
|
|
||||||
import { HttpClient } from 'services/http-client';
|
|
||||||
import { getStorage, setStorage } from 'helpers/storage';
|
import { getStorage, setStorage } from 'helpers/storage';
|
||||||
|
import Router, { useRouter } from 'next/router';
|
||||||
|
import { useCallback, useEffect } from 'react';
|
||||||
|
import { HttpClient } from 'services/http-client';
|
||||||
|
import useSWR from 'swr';
|
||||||
|
|
||||||
export const useUser = () => {
|
export const useUser = () => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { CollectType, IDocument, IUser, IWiki, IWikiUser } from '@think/domains';
|
import { CollectType, IDocument, IUser, IWiki, IWikiUser } from '@think/domains';
|
||||||
import useSWR from 'swr';
|
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
import { HttpClient } from 'services/http-client';
|
import { HttpClient } from 'services/http-client';
|
||||||
|
import useSWR from 'swr';
|
||||||
|
|
||||||
export type ICreateWiki = Pick<IWiki, 'name' | 'description'>;
|
export type ICreateWiki = Pick<IWiki, 'name' | 'description'>;
|
||||||
export type IUpdateWiki = Partial<IWiki>;
|
export type IUpdateWiki = Partial<IWiki>;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { IUser, IDocument, IWiki } from '@think/domains';
|
import { IDocument, IUser, IWiki } from '@think/domains';
|
||||||
import { EventEmitter } from 'helpers/event-emitter';
|
import { EventEmitter } from 'helpers/event-emitter';
|
||||||
|
|
||||||
export const event = new EventEmitter();
|
export const event = new EventEmitter();
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import _copy from './copy-to-clipboard';
|
|
||||||
import { Toast } from '@douyinfe/semi-ui';
|
import { Toast } from '@douyinfe/semi-ui';
|
||||||
|
|
||||||
|
import _copy from './copy-to-clipboard';
|
||||||
|
|
||||||
export function copy(text: string | { text: string; format: string }[]) {
|
export function copy(text: string | { text: string; format: string }[]) {
|
||||||
return _copy(text, () => Toast.success('复制成功'));
|
return _copy(text, () => Toast.success('复制成功'));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { safeJSONStringify } from './json';
|
import { safeJSONStringify } from './json';
|
||||||
import { setStorage, getStorage } from './storage';
|
import { getStorage, setStorage } from './storage';
|
||||||
|
|
||||||
class Node {
|
class Node {
|
||||||
public key: string;
|
public key: string;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { useState, useCallback, useEffect, useRef } from 'react';
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
|
|
||||||
type PromiseAction = (...args: any[]) => Promise<any>;
|
type PromiseAction = (...args: any[]) => Promise<any>;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import { getStorage, setStorage } from 'helpers/storage';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import useSWR from 'swr';
|
import useSWR from 'swr';
|
||||||
import { setStorage, getStorage } from 'helpers/storage';
|
|
||||||
|
|
||||||
export enum Width {
|
export enum Width {
|
||||||
'standardWidth' = 'standardWidth',
|
'standardWidth' = 'standardWidth',
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
import { clamp } from 'helpers/clamp';
|
||||||
|
import { getStorage, setStorage } from 'helpers/storage';
|
||||||
|
import { useWindowSize } from 'hooks/use-window-size';
|
||||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
import useSWR from 'swr';
|
import useSWR from 'swr';
|
||||||
import { useWindowSize } from 'hooks/use-window-size';
|
|
||||||
import { setStorage, getStorage } from 'helpers/storage';
|
|
||||||
import { clamp } from 'helpers/clamp';
|
|
||||||
|
|
||||||
const key = 'dragable-menu-width';
|
const key = 'dragable-menu-width';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { useState, useEffect } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
interface Size {
|
interface Size {
|
||||||
width: number | undefined;
|
width: number | undefined;
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import React from 'react';
|
|
||||||
import cls from 'classnames';
|
|
||||||
import { Layout as SemiLayout, Button } from '@douyinfe/semi-ui';
|
|
||||||
import { IconChevronLeft, IconChevronRight } from '@douyinfe/semi-icons';
|
import { IconChevronLeft, IconChevronRight } from '@douyinfe/semi-icons';
|
||||||
import SplitPane from 'react-split-pane';
|
import { Button, Layout as SemiLayout } from '@douyinfe/semi-ui';
|
||||||
|
import cls from 'classnames';
|
||||||
import { useDragableWidth } from 'hooks/use-dragable-width';
|
import { useDragableWidth } from 'hooks/use-dragable-width';
|
||||||
|
import React from 'react';
|
||||||
|
import SplitPane from 'react-split-pane';
|
||||||
|
|
||||||
import { RouterHeader } from '../router-header';
|
import { RouterHeader } from '../router-header';
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import React from 'react';
|
|
||||||
import cls from 'classnames';
|
|
||||||
import { Layout as SemiLayout, Button } from '@douyinfe/semi-ui';
|
|
||||||
import { IconChevronLeft, IconChevronRight } from '@douyinfe/semi-icons';
|
import { IconChevronLeft, IconChevronRight } from '@douyinfe/semi-icons';
|
||||||
import SplitPane from 'react-split-pane';
|
import { Button, Layout as SemiLayout } from '@douyinfe/semi-ui';
|
||||||
|
import cls from 'classnames';
|
||||||
import { useDragableWidth } from 'hooks/use-dragable-width';
|
import { useDragableWidth } from 'hooks/use-dragable-width';
|
||||||
|
import React from 'react';
|
||||||
|
import SplitPane from 'react-split-pane';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const { Sider, Content } = SemiLayout;
|
const { Sider, Content } = SemiLayout;
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
import React from 'react';
|
|
||||||
import { Layout as SemiLayout, Nav, Space, Typography, Dropdown, Button } from '@douyinfe/semi-ui';
|
|
||||||
import { IconMenu } from '@douyinfe/semi-icons';
|
import { IconMenu } from '@douyinfe/semi-icons';
|
||||||
import Router, { useRouter } from 'next/router';
|
import { Button, Dropdown, Layout as SemiLayout, Nav, Space, Typography } from '@douyinfe/semi-ui';
|
||||||
import { User } from 'components/user';
|
|
||||||
import { WikiOrDocumentCreator } from 'components/wiki-or-document-creator';
|
|
||||||
import { LogoImage, LogoText } from 'components/logo';
|
import { LogoImage, LogoText } from 'components/logo';
|
||||||
import { Theme } from 'components/theme';
|
|
||||||
import { Message } from 'components/message';
|
import { Message } from 'components/message';
|
||||||
import { Search } from 'components/search';
|
import { Search } from 'components/search';
|
||||||
import { useWindowSize } from 'hooks/use-window-size';
|
import { Theme } from 'components/theme';
|
||||||
|
import { User } from 'components/user';
|
||||||
|
import { WikiOrDocumentCreator } from 'components/wiki-or-document-creator';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import { useWindowSize } from 'hooks/use-window-size';
|
||||||
|
import Router, { useRouter } from 'next/router';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
import styles from './index.module.scss';
|
||||||
import { Recent, RecentModal } from './recent';
|
import { Recent, RecentModal } from './recent';
|
||||||
import { Wiki, WikiModal } from './wiki';
|
import { Wiki, WikiModal } from './wiki';
|
||||||
import styles from './index.module.scss';
|
|
||||||
|
|
||||||
const { Header: SemiHeader } = SemiLayout;
|
const { Header: SemiHeader } = SemiLayout;
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
import React from 'react';
|
|
||||||
import Link from 'next/link';
|
|
||||||
import { Typography, Space, Dropdown, Tabs, TabPane, Modal } from '@douyinfe/semi-ui';
|
|
||||||
import { IconChevronDown } from '@douyinfe/semi-icons';
|
import { IconChevronDown } from '@douyinfe/semi-icons';
|
||||||
|
import { Dropdown, Modal, Space, TabPane, Tabs, Typography } from '@douyinfe/semi-ui';
|
||||||
|
import { DataRender } from 'components/data-render';
|
||||||
|
import { DocumentStar } from 'components/document/star';
|
||||||
|
import { Empty } from 'components/empty';
|
||||||
|
import { IconDocumentFill } from 'components/icons/IconDocumentFill';
|
||||||
|
import { LocaleTime } from 'components/locale-time';
|
||||||
import { useRecentDocuments } from 'data/document';
|
import { useRecentDocuments } from 'data/document';
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
import { Empty } from 'components/empty';
|
import Link from 'next/link';
|
||||||
import { DataRender } from 'components/data-render';
|
import React from 'react';
|
||||||
import { LocaleTime } from 'components/locale-time';
|
|
||||||
import { DocumentStar } from 'components/document/star';
|
|
||||||
import { IconDocumentFill } from 'components/icons/IconDocumentFill';
|
|
||||||
import { Placeholder } from './placeholder';
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
import { Placeholder } from './placeholder';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
import React from 'react';
|
|
||||||
import { useRouter } from 'next/router';
|
|
||||||
import Link from 'next/link';
|
|
||||||
import { Avatar, Typography, Space, Dropdown, Modal } from '@douyinfe/semi-ui';
|
|
||||||
import { IconChevronDown } from '@douyinfe/semi-icons';
|
import { IconChevronDown } from '@douyinfe/semi-icons';
|
||||||
import { useStaredWikis, useWikiDetail } from 'data/wiki';
|
import { Avatar, Dropdown, Modal, Space, Typography } from '@douyinfe/semi-ui';
|
||||||
import { Empty } from 'components/empty';
|
|
||||||
import { DataRender } from 'components/data-render';
|
import { DataRender } from 'components/data-render';
|
||||||
|
import { Empty } from 'components/empty';
|
||||||
import { WikiStar } from 'components/wiki/star';
|
import { WikiStar } from 'components/wiki/star';
|
||||||
import { Placeholder } from './placeholder';
|
import { useStaredWikis, useWikiDetail } from 'data/wiki';
|
||||||
|
import Link from 'next/link';
|
||||||
|
import { useRouter } from 'next/router';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
import { Placeholder } from './placeholder';
|
||||||
|
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
|
||||||
import { Layout as SemiLayout } from '@douyinfe/semi-ui';
|
import { Layout as SemiLayout } from '@douyinfe/semi-ui';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import { RouterHeader } from '../router-header';
|
import { RouterHeader } from '../router-header';
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
import type { AppProps } from 'next/app';
|
|
||||||
import Head from 'next/head';
|
|
||||||
import React from 'react';
|
|
||||||
import { useTheme } from 'hooks/use-theme';
|
|
||||||
import 'tiptap/fix-match-nodes';
|
import 'tiptap/fix-match-nodes';
|
||||||
import 'viewerjs/dist/viewer.css';
|
import 'viewerjs/dist/viewer.css';
|
||||||
import 'styles/globals.scss';
|
import 'styles/globals.scss';
|
||||||
import 'tiptap/core/styles/index.scss';
|
import 'tiptap/core/styles/index.scss';
|
||||||
|
|
||||||
|
import { useTheme } from 'hooks/use-theme';
|
||||||
|
import type { AppProps } from 'next/app';
|
||||||
|
import Head from 'next/head';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
function MyApp({ Component, pageProps }: AppProps) {
|
function MyApp({ Component, pageProps }: AppProps) {
|
||||||
useTheme();
|
useTheme();
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React, { useRef } from 'react';
|
|
||||||
import { useRouter } from 'next/router';
|
|
||||||
import { SingleColumnLayout } from 'layouts/single-column';
|
|
||||||
import { ICollaborationEditorProps, CollaborationEditor, ICollaborationRefProps } from 'tiptap/editor';
|
|
||||||
import { useUser } from 'data/user';
|
import { useUser } from 'data/user';
|
||||||
|
import { SingleColumnLayout } from 'layouts/single-column';
|
||||||
|
import { useRouter } from 'next/router';
|
||||||
|
import React, { useRef } from 'react';
|
||||||
|
import { CollaborationEditor, ICollaborationEditorProps, ICollaborationRefProps } from 'tiptap/editor';
|
||||||
|
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const $container = useRef<HTMLDivElement>();
|
const $container = useRef<HTMLDivElement>();
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import type { NextPage } from 'next';
|
|
||||||
import React from 'react';
|
|
||||||
import { List, Pagination, Typography } from '@douyinfe/semi-ui';
|
import { List, Pagination, Typography } from '@douyinfe/semi-ui';
|
||||||
import { SingleColumnLayout } from 'layouts/single-column';
|
import { DataRender } from 'components/data-render';
|
||||||
import { useAllPublicWikis } from 'data/wiki';
|
|
||||||
import { Empty } from 'components/empty';
|
import { Empty } from 'components/empty';
|
||||||
import { Seo } from 'components/seo';
|
import { Seo } from 'components/seo';
|
||||||
import { DataRender } from 'components/data-render';
|
import { WikiCard, WikiCardPlaceholder } from 'components/wiki/card';
|
||||||
import { WikiCardPlaceholder, WikiCard } from 'components/wiki/card';
|
import { useAllPublicWikis } from 'data/wiki';
|
||||||
|
import { SingleColumnLayout } from 'layouts/single-column';
|
||||||
|
import type { NextPage } from 'next';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
const grid = {
|
const grid = {
|
||||||
gutter: 16,
|
gutter: 16,
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
import type { NextPage } from 'next';
|
import { Avatar, Button, List, Table, Typography } from '@douyinfe/semi-ui';
|
||||||
import type { IDocument } from '@think/domains';
|
import type { IDocument } from '@think/domains';
|
||||||
|
import { DataRender } from 'components/data-render';
|
||||||
|
import { DocumentActions } from 'components/document/actions';
|
||||||
|
import { Empty } from 'components/empty';
|
||||||
|
import { LocaleTime } from 'components/locale-time';
|
||||||
|
import { Seo } from 'components/seo';
|
||||||
|
import { WikiCreator } from 'components/wiki/create';
|
||||||
|
import { WikiPinCard, WikiPinCardPlaceholder } from 'components/wiki/pin-card';
|
||||||
|
import { useRecentDocuments } from 'data/document';
|
||||||
|
import { useStaredWikis } from 'data/wiki';
|
||||||
|
import { useToggle } from 'hooks/use-toggle';
|
||||||
|
import { SingleColumnLayout } from 'layouts/single-column';
|
||||||
|
import type { NextPage } from 'next';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import { Typography, Button, Table, List, Avatar } from '@douyinfe/semi-ui';
|
|
||||||
import { useToggle } from 'hooks/use-toggle';
|
|
||||||
import { Seo } from 'components/seo';
|
|
||||||
import { DataRender } from 'components/data-render';
|
|
||||||
import { SingleColumnLayout } from 'layouts/single-column';
|
|
||||||
import { WikiCreator } from 'components/wiki/create';
|
|
||||||
import { LocaleTime } from 'components/locale-time';
|
|
||||||
import { DocumentActions } from 'components/document/actions';
|
|
||||||
import { useStaredWikis } from 'data/wiki';
|
|
||||||
import { useRecentDocuments } from 'data/document';
|
|
||||||
import { WikiPinCardPlaceholder, WikiPinCard } from 'components/wiki/pin-card';
|
|
||||||
import { Empty } from 'components/empty';
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const { Title } = Typography;
|
const { Title } = Typography;
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { Button, Form, Layout, Space, Typography } from '@douyinfe/semi-ui';
|
||||||
|
import { Author } from 'components/author';
|
||||||
|
import { LogoImage, LogoText } from 'components/logo';
|
||||||
|
import { Seo } from 'components/seo';
|
||||||
|
import { useUser } from 'data/user';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Form, Button, Layout, Space, Typography } from '@douyinfe/semi-ui';
|
|
||||||
import { useUser } from 'data/user';
|
|
||||||
import { Seo } from 'components/seo';
|
|
||||||
import { LogoImage, LogoText } from 'components/logo';
|
|
||||||
import { Author } from 'components/author';
|
|
||||||
import styles from './index.module.scss';
|
import styles from './index.module.scss';
|
||||||
|
|
||||||
const { Content, Footer } = Layout;
|
const { Content, Footer } = Layout;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue