🚚(frontend) add import path for features/docs tsconfig
To simplify imports, we add the import path @/docs to target ./src/features/docs/. We changed all imports to use this path.
This commit is contained in:
@@ -15,8 +15,8 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import * as Y from 'yjs';
|
import * as Y from 'yjs';
|
||||||
|
|
||||||
import { Box, TextErrors } from '@/components';
|
import { Box, TextErrors } from '@/components';
|
||||||
|
import { Doc } from '@/docs/doc-management';
|
||||||
import { useAuth } from '@/features/auth';
|
import { useAuth } from '@/features/auth';
|
||||||
import { Doc } from '@/features/docs/doc-management';
|
|
||||||
|
|
||||||
import { useUploadFile } from '../hook';
|
import { useUploadFile } from '../hook';
|
||||||
import { useHeadings } from '../hook/useHeadings';
|
import { useHeadings } from '../hook/useHeadings';
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
|
|
||||||
import { isAPIError } from '@/api';
|
import { isAPIError } from '@/api';
|
||||||
import { Box, Text } from '@/components';
|
import { Box, Text } from '@/components';
|
||||||
import { useDocOptions, useDocStore } from '@/features/docs/doc-management/';
|
import { useDocOptions, useDocStore } from '@/docs/doc-management/';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AITransformActions,
|
AITransformActions,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
import { RiDownload2Fill } from 'react-icons/ri';
|
import { RiDownload2Fill } from 'react-icons/ri';
|
||||||
|
|
||||||
import { downloadFile, exportResolveFileUrl } from '@/features/docs/doc-export';
|
import { downloadFile, exportResolveFileUrl } from '@/docs/doc-export';
|
||||||
|
|
||||||
export const FileDownloadButton = ({
|
export const FileDownloadButton = ({
|
||||||
open,
|
open,
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ import * as Y from 'yjs';
|
|||||||
|
|
||||||
import { Box, Text, TextErrors } from '@/components';
|
import { Box, Text, TextErrors } from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { DocHeader, DocVersionHeader } from '@/features/docs/doc-header/';
|
import { DocHeader, DocVersionHeader } from '@/docs/doc-header/';
|
||||||
import {
|
import {
|
||||||
Doc,
|
Doc,
|
||||||
base64ToBlocknoteXmlFragment,
|
base64ToBlocknoteXmlFragment,
|
||||||
useProviderStore,
|
useProviderStore,
|
||||||
} from '@/features/docs/doc-management';
|
} from '@/docs/doc-management';
|
||||||
import { TableContent } from '@/features/docs/doc-table-content/';
|
import { TableContent } from '@/docs/doc-table-content/';
|
||||||
import { Versions, useDocVersion } from '@/features/docs/doc-versioning/';
|
import { Versions, useDocVersion } from '@/docs/doc-versioning/';
|
||||||
import { useResponsiveStore } from '@/stores';
|
import { useResponsiveStore } from '@/stores';
|
||||||
|
|
||||||
import { BlockNoteEditor, BlockNoteEditorVersion } from './BlockNoteEditor';
|
import { BlockNoteEditor, BlockNoteEditorVersion } from './BlockNoteEditor';
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import { useRouter } from 'next/router';
|
|||||||
import { useCallback, useEffect, useRef, useState } from 'react';
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
import * as Y from 'yjs';
|
import * as Y from 'yjs';
|
||||||
|
|
||||||
import { useUpdateDoc } from '@/features/docs/doc-management/';
|
import { useUpdateDoc } from '@/docs/doc-management/';
|
||||||
import { KEY_LIST_DOC_VERSIONS } from '@/features/docs/doc-versioning';
|
import { KEY_LIST_DOC_VERSIONS } from '@/docs/doc-versioning';
|
||||||
import { isFirefox } from '@/utils/userAgent';
|
import { isFirefox } from '@/utils/userAgent';
|
||||||
|
|
||||||
import { toBase64 } from '../utils';
|
import { toBase64 } from '../utils';
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import { css } from 'styled-components';
|
import { css } from 'styled-components';
|
||||||
|
|
||||||
import { Box, Text } from '@/components';
|
import { Box, Text } from '@/components';
|
||||||
import { useEditorStore } from '@/features/docs/doc-editor';
|
import { useEditorStore } from '@/docs/doc-editor';
|
||||||
import { Doc, useTrans } from '@/features/docs/doc-management';
|
import { Doc, useTrans } from '@/docs/doc-management';
|
||||||
|
|
||||||
import { exportCorsResolveFileUrl } from '../api/exportResolveFileUrl';
|
import { exportCorsResolveFileUrl } from '../api/exportResolveFileUrl';
|
||||||
import { TemplatesOrdering, useTemplates } from '../api/useTemplates';
|
import { TemplatesOrdering, useTemplates } from '../api/useTemplates';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
LinkReach,
|
LinkReach,
|
||||||
currentDocRole,
|
currentDocRole,
|
||||||
useTrans,
|
useTrans,
|
||||||
} from '@/features/docs/doc-management';
|
} from '@/docs/doc-management';
|
||||||
import { useResponsiveStore } from '@/stores';
|
import { useResponsiveStore } from '@/stores';
|
||||||
|
|
||||||
import { DocTitle } from './DocTitle';
|
import { DocTitle } from './DocTitle';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
|
|
||||||
import { Text } from '@/components';
|
import { Text } from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { Doc, LinkReach } from '@/features/docs/doc-management';
|
import { Doc, LinkReach } from '@/docs/doc-management';
|
||||||
import { useResponsiveStore } from '@/stores';
|
import { useResponsiveStore } from '@/stores';
|
||||||
|
|
||||||
interface DocTagPublicProps {
|
interface DocTagPublicProps {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
KEY_LIST_DOC,
|
KEY_LIST_DOC,
|
||||||
useTrans,
|
useTrans,
|
||||||
useUpdateDoc,
|
useUpdateDoc,
|
||||||
} from '@/features/docs/doc-management';
|
} from '@/docs/doc-management';
|
||||||
import { useBroadcastStore, useResponsiveStore } from '@/stores';
|
import { useBroadcastStore, useResponsiveStore } from '@/stores';
|
||||||
|
|
||||||
interface DocTitleProps {
|
interface DocTitleProps {
|
||||||
|
|||||||
@@ -17,18 +17,14 @@ import {
|
|||||||
IconOptions,
|
IconOptions,
|
||||||
} from '@/components';
|
} from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { useEditorStore } from '@/features/docs/doc-editor/';
|
import { useEditorStore } from '@/docs/doc-editor/';
|
||||||
import { ModalExport } from '@/features/docs/doc-export/';
|
import { ModalExport } from '@/docs/doc-export/';
|
||||||
import {
|
import { Doc, ModalRemoveDoc, useCopyDocLink } from '@/docs/doc-management';
|
||||||
Doc,
|
import { DocShareModal } from '@/docs/doc-share';
|
||||||
ModalRemoveDoc,
|
|
||||||
useCopyDocLink,
|
|
||||||
} from '@/features/docs/doc-management';
|
|
||||||
import { DocShareModal } from '@/features/docs/doc-share';
|
|
||||||
import {
|
import {
|
||||||
KEY_LIST_DOC_VERSIONS,
|
KEY_LIST_DOC_VERSIONS,
|
||||||
ModalSelectVersion,
|
ModalSelectVersion,
|
||||||
} from '@/features/docs/doc-versioning';
|
} from '@/docs/doc-versioning';
|
||||||
import { useAnalytics } from '@/libs';
|
import { useAnalytics } from '@/libs';
|
||||||
import { useResponsiveStore } from '@/stores';
|
import { useResponsiveStore } from '@/stores';
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
||||||
|
|
||||||
import { APIError, errorCauses, fetchAPI } from '@/api';
|
import { APIError, errorCauses, fetchAPI } from '@/api';
|
||||||
import { Doc, KEY_DOC } from '@/features/docs/doc-management';
|
import { Doc, KEY_DOC } from '@/docs/doc-management';
|
||||||
import { useBroadcastStore } from '@/stores';
|
import { useBroadcastStore } from '@/stores';
|
||||||
|
|
||||||
export type UpdateDocLinkParams = Pick<Doc, 'id'> &
|
export type UpdateDocLinkParams = Pick<Doc, 'id'> &
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { create } from 'zustand';
|
import { create } from 'zustand';
|
||||||
|
|
||||||
import { Doc } from '@/features/docs/doc-management';
|
import { Doc } from '@/docs/doc-management';
|
||||||
|
|
||||||
export interface UseDocStore {
|
export interface UseDocStore {
|
||||||
currentDoc?: Doc;
|
currentDoc?: Doc;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { HocuspocusProvider } from '@hocuspocus/provider';
|
|||||||
import * as Y from 'yjs';
|
import * as Y from 'yjs';
|
||||||
import { create } from 'zustand';
|
import { create } from 'zustand';
|
||||||
|
|
||||||
import { Base64 } from '@/features/docs/doc-management';
|
import { Base64 } from '@/docs/doc-management';
|
||||||
|
|
||||||
export interface UseCollaborationStore {
|
export interface UseCollaborationStore {
|
||||||
createProvider: (
|
createProvider: (
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Box, Icon } from '@/components';
|
import { Box, Icon } from '@/components';
|
||||||
import { QuickSearchItemContent } from '@/components/quick-search/';
|
import { QuickSearchItemContent } from '@/components/quick-search/';
|
||||||
import { Doc } from '@/features/docs/doc-management';
|
import { Doc } from '@/docs/doc-management';
|
||||||
import { SimpleDocItem } from '@/features/docs/docs-grid/';
|
import { SimpleDocItem } from '@/docs/docs-grid/';
|
||||||
import { useResponsiveStore } from '@/stores';
|
import { useResponsiveStore } from '@/stores';
|
||||||
|
|
||||||
type DocSearchItemProps = {
|
type DocSearchItemProps = {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
QuickSearchData,
|
QuickSearchData,
|
||||||
QuickSearchGroup,
|
QuickSearchGroup,
|
||||||
} from '@/components/quick-search';
|
} from '@/components/quick-search';
|
||||||
import { Doc, useInfiniteDocs } from '@/features/docs/doc-management';
|
import { Doc, useInfiniteDocs } from '@/docs/doc-management';
|
||||||
import { useResponsiveStore } from '@/stores';
|
import { useResponsiveStore } from '@/stores';
|
||||||
|
|
||||||
import EmptySearchIcon from '../assets/illustration-docs-empty.png';
|
import EmptySearchIcon from '../assets/illustration-docs-empty.png';
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
||||||
|
|
||||||
import { APIError, errorCauses, fetchAPI } from '@/api';
|
import { APIError, errorCauses, fetchAPI } from '@/api';
|
||||||
import { User } from '@/features/auth';
|
|
||||||
import {
|
import {
|
||||||
Access,
|
Access,
|
||||||
Doc,
|
Doc,
|
||||||
KEY_DOC,
|
KEY_DOC,
|
||||||
KEY_LIST_DOC,
|
KEY_LIST_DOC,
|
||||||
Role,
|
Role,
|
||||||
} from '@/features/docs/doc-management';
|
} from '@/docs/doc-management';
|
||||||
import { KEY_LIST_DOC_ACCESSES } from '@/features/docs/doc-share';
|
import { KEY_LIST_DOC_ACCESSES } from '@/docs/doc-share';
|
||||||
|
import { User } from '@/features/auth';
|
||||||
import { useBroadcastStore } from '@/stores';
|
import { useBroadcastStore } from '@/stores';
|
||||||
|
|
||||||
import { OptionType } from '../types';
|
import { OptionType } from '../types';
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
||||||
|
|
||||||
import { APIError, errorCauses, fetchAPI } from '@/api';
|
import { APIError, errorCauses, fetchAPI } from '@/api';
|
||||||
|
import { Doc, Role } from '@/docs/doc-management';
|
||||||
|
import { Invitation, OptionType } from '@/docs/doc-share/types';
|
||||||
import { User } from '@/features/auth';
|
import { User } from '@/features/auth';
|
||||||
import { Doc, Role } from '@/features/docs/doc-management';
|
|
||||||
import { Invitation, OptionType } from '@/features/docs/doc-share/types';
|
|
||||||
|
|
||||||
import { KEY_LIST_DOC_INVITATIONS } from './useDocInvitations';
|
import { KEY_LIST_DOC_INVITATIONS } from './useDocInvitations';
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import {
|
|||||||
} from '@tanstack/react-query';
|
} from '@tanstack/react-query';
|
||||||
|
|
||||||
import { APIError, errorCauses, fetchAPI } from '@/api';
|
import { APIError, errorCauses, fetchAPI } from '@/api';
|
||||||
import { KEY_DOC, KEY_LIST_DOC } from '@/features/docs/doc-management';
|
import { KEY_DOC, KEY_LIST_DOC } from '@/docs/doc-management';
|
||||||
import { KEY_LIST_USER } from '@/features/docs/doc-share';
|
import { KEY_LIST_USER } from '@/docs/doc-share';
|
||||||
import { useBroadcastStore } from '@/stores';
|
import { useBroadcastStore } from '@/stores';
|
||||||
|
|
||||||
import { KEY_LIST_DOC_ACCESSES } from './useDocAccesses';
|
import { KEY_LIST_DOC_ACCESSES } from './useDocAccesses';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
} from '@tanstack/react-query';
|
} from '@tanstack/react-query';
|
||||||
|
|
||||||
import { APIError, APIList, errorCauses, fetchAPI } from '@/api';
|
import { APIError, APIList, errorCauses, fetchAPI } from '@/api';
|
||||||
import { Access } from '@/features/docs/doc-management';
|
import { Access } from '@/docs/doc-management';
|
||||||
|
|
||||||
export type DocAccessesParam = {
|
export type DocAccessesParam = {
|
||||||
docId: string;
|
docId: string;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
} from '@tanstack/react-query';
|
} from '@tanstack/react-query';
|
||||||
|
|
||||||
import { APIError, APIList, errorCauses, fetchAPI } from '@/api';
|
import { APIError, APIList, errorCauses, fetchAPI } from '@/api';
|
||||||
import { Invitation } from '@/features/docs/doc-share/types';
|
import { Invitation } from '@/docs/doc-share/types';
|
||||||
|
|
||||||
export type DocInvitationsParams = {
|
export type DocInvitationsParams = {
|
||||||
docId: string;
|
docId: string;
|
||||||
|
|||||||
@@ -5,12 +5,7 @@ import {
|
|||||||
} from '@tanstack/react-query';
|
} from '@tanstack/react-query';
|
||||||
|
|
||||||
import { APIError, errorCauses, fetchAPI } from '@/api';
|
import { APIError, errorCauses, fetchAPI } from '@/api';
|
||||||
import {
|
import { Access, KEY_DOC, KEY_LIST_DOC, Role } from '@/docs/doc-management';
|
||||||
Access,
|
|
||||||
KEY_DOC,
|
|
||||||
KEY_LIST_DOC,
|
|
||||||
Role,
|
|
||||||
} from '@/features/docs/doc-management';
|
|
||||||
import { useBroadcastStore } from '@/stores';
|
import { useBroadcastStore } from '@/stores';
|
||||||
|
|
||||||
import { KEY_LIST_DOC_ACCESSES } from './useDocAccesses';
|
import { KEY_LIST_DOC_ACCESSES } from './useDocAccesses';
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import {
|
|||||||
} from '@tanstack/react-query';
|
} from '@tanstack/react-query';
|
||||||
|
|
||||||
import { APIError, errorCauses, fetchAPI } from '@/api';
|
import { APIError, errorCauses, fetchAPI } from '@/api';
|
||||||
import { Role } from '@/features/docs/doc-management';
|
import { Role } from '@/docs/doc-management';
|
||||||
import { Invitation } from '@/features/docs/doc-share/types';
|
import { Invitation } from '@/docs/doc-share/types';
|
||||||
|
|
||||||
import { KEY_LIST_DOC_INVITATIONS } from './useDocInvitations';
|
import { KEY_LIST_DOC_INVITATIONS } from './useDocInvitations';
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { UseQueryOptions, useQuery } from '@tanstack/react-query';
|
import { UseQueryOptions, useQuery } from '@tanstack/react-query';
|
||||||
|
|
||||||
import { APIError, APIList, errorCauses, fetchAPI } from '@/api';
|
import { APIError, APIList, errorCauses, fetchAPI } from '@/api';
|
||||||
|
import { Doc } from '@/docs/doc-management';
|
||||||
import { User } from '@/features/auth';
|
import { User } from '@/features/auth';
|
||||||
import { Doc } from '@/features/docs/doc-management';
|
|
||||||
|
|
||||||
export type UsersParams = {
|
export type UsersParams = {
|
||||||
query: string;
|
query: string;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { css } from 'styled-components';
|
import { css } from 'styled-components';
|
||||||
|
|
||||||
import { DropdownMenu, DropdownMenuOption, Text } from '@/components';
|
import { DropdownMenu, DropdownMenuOption, Text } from '@/components';
|
||||||
import { Role, useTrans } from '@/features/docs/doc-management/';
|
import { Role, useTrans } from '@/docs/doc-management/';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
currentRole: Role;
|
currentRole: Role;
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import {
|
|||||||
IconOptions,
|
IconOptions,
|
||||||
} from '@/components';
|
} from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
|
import { Doc, Role } from '@/docs/doc-management';
|
||||||
import { User } from '@/features/auth';
|
import { User } from '@/features/auth';
|
||||||
import { Doc, Role } from '@/features/docs/doc-management';
|
|
||||||
|
|
||||||
import { useDeleteDocInvitation, useUpdateDocInvitation } from '../api';
|
import { useDeleteDocInvitation, useUpdateDocInvitation } from '../api';
|
||||||
import { Invitation } from '../types';
|
import { Invitation } from '../types';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
IconOptions,
|
IconOptions,
|
||||||
} from '@/components';
|
} from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { Access, Doc, Role } from '@/features/docs/doc-management/';
|
import { Access, Doc, Role } from '@/docs/doc-management/';
|
||||||
import { useResponsiveStore } from '@/stores';
|
import { useResponsiveStore } from '@/stores';
|
||||||
|
|
||||||
import { useDeleteDocAccess, useUpdateDocAccess } from '../api';
|
import { useDeleteDocAccess, useUpdateDocAccess } from '../api';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { LinkReach, LinkRole } from '@/features/docs/doc-management/types';
|
import { LinkReach, LinkRole } from '@/docs/doc-management/types';
|
||||||
|
|
||||||
export const useTranslatedShareSettings = () => {
|
export const useTranslatedShareSettings = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
import { Access, Role } from '@/docs/doc-management';
|
||||||
import { useAuth } from '@/features/auth';
|
import { useAuth } from '@/features/auth';
|
||||||
import { Access, Role } from '@/features/docs/doc-management';
|
|
||||||
|
|
||||||
export const useWhoAmI = (access: Access) => {
|
export const useWhoAmI = (access: Access) => {
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useState } from 'react';
|
|||||||
|
|
||||||
import { BoxButton, Text } from '@/components';
|
import { BoxButton, Text } from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { DocsBlockNoteEditor } from '@/features/docs/doc-editor';
|
import { DocsBlockNoteEditor } from '@/docs/doc-editor';
|
||||||
import { useResponsiveStore } from '@/stores';
|
import { useResponsiveStore } from '@/stores';
|
||||||
|
|
||||||
const leftPaddingMap: { [key: number]: string } = {
|
const leftPaddingMap: { [key: number]: string } = {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { css } from 'styled-components';
|
|||||||
|
|
||||||
import { Box, BoxButton, Icon, Text } from '@/components';
|
import { Box, BoxButton, Icon, Text } from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { useEditorStore, useHeadingStore } from '@/features/docs/doc-editor';
|
import { useEditorStore, useHeadingStore } from '@/docs/doc-editor';
|
||||||
import { MAIN_LAYOUT_ID } from '@/layouts/conf';
|
import { MAIN_LAYOUT_ID } from '@/layouts/conf';
|
||||||
|
|
||||||
import { Heading } from './Heading';
|
import { Heading } from './Heading';
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
base64ToYDoc,
|
base64ToYDoc,
|
||||||
useProviderStore,
|
useProviderStore,
|
||||||
useUpdateDoc,
|
useUpdateDoc,
|
||||||
} from '@/features/docs/doc-management/';
|
} from '@/docs/doc-management/';
|
||||||
|
|
||||||
import { useDocVersion } from '../api';
|
import { useDocVersion } from '../api';
|
||||||
import { KEY_LIST_DOC_VERSIONS } from '../api/useDocVersions';
|
import { KEY_LIST_DOC_VERSIONS } from '../api/useDocVersions';
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import { createGlobalStyle, css } from 'styled-components';
|
import { createGlobalStyle, css } from 'styled-components';
|
||||||
|
|
||||||
import { Box, Icon, Text } from '@/components';
|
import { Box, Icon, Text } from '@/components';
|
||||||
import { DocEditor } from '@/features/docs/doc-editor';
|
import { DocEditor } from '@/docs/doc-editor';
|
||||||
import { Doc } from '@/features/docs/doc-management';
|
import { Doc } from '@/docs/doc-management';
|
||||||
|
|
||||||
import { Versions } from '../types';
|
import { Versions } from '../types';
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useState } from 'react';
|
|||||||
|
|
||||||
import { Box, Text } from '@/components';
|
import { Box, Text } from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { Doc } from '@/features/docs/doc-management';
|
import { Doc } from '@/docs/doc-management';
|
||||||
|
|
||||||
import { Versions } from '../types';
|
import { Versions } from '../types';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
|
|
||||||
import { APIError } from '@/api';
|
import { APIError } from '@/api';
|
||||||
import { Box, BoxButton, InfiniteScroll, Text, TextErrors } from '@/components';
|
import { Box, BoxButton, InfiniteScroll, Text, TextErrors } from '@/components';
|
||||||
import { Doc } from '@/features/docs/doc-management';
|
import { Doc } from '@/docs/doc-management';
|
||||||
import { useDate } from '@/hook';
|
import { useDate } from '@/hook';
|
||||||
|
|
||||||
import { useDocVersionsInfiniteQuery } from '../api/useDocVersions';
|
import { useDocVersionsInfiniteQuery } from '../api/useDocVersions';
|
||||||
|
|||||||
@@ -4,10 +4,7 @@ import { InView } from 'react-intersection-observer';
|
|||||||
import { css } from 'styled-components';
|
import { css } from 'styled-components';
|
||||||
|
|
||||||
import { Box, Card, Text } from '@/components';
|
import { Box, Card, Text } from '@/components';
|
||||||
import {
|
import { DocDefaultFilter, useInfiniteDocs } from '@/docs/doc-management';
|
||||||
DocDefaultFilter,
|
|
||||||
useInfiniteDocs,
|
|
||||||
} from '@/features/docs/doc-management';
|
|
||||||
import { useResponsiveStore } from '@/stores';
|
import { useResponsiveStore } from '@/stores';
|
||||||
|
|
||||||
import { useResponsiveDocGrid } from '../hooks/useResponsiveDocGrid';
|
import { useResponsiveDocGrid } from '../hooks/useResponsiveDocGrid';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
ModalRemoveDoc,
|
ModalRemoveDoc,
|
||||||
useCreateFavoriteDoc,
|
useCreateFavoriteDoc,
|
||||||
useDeleteFavoriteDoc,
|
useDeleteFavoriteDoc,
|
||||||
} from '@/features/docs/doc-management';
|
} from '@/docs/doc-management';
|
||||||
|
|
||||||
interface DocsGridActionsProps {
|
interface DocsGridActionsProps {
|
||||||
doc: Doc;
|
doc: Doc;
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import { css } from 'styled-components';
|
|||||||
|
|
||||||
import { Box, Icon, StyledLink, Text } from '@/components';
|
import { Box, Icon, StyledLink, Text } from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { Doc, LinkReach } from '@/features/docs/doc-management';
|
import { Doc, LinkReach } from '@/docs/doc-management';
|
||||||
import { DocShareModal } from '@/features/docs/doc-share';
|
import { DocShareModal } from '@/docs/doc-share';
|
||||||
import { useResponsiveStore } from '@/stores';
|
import { useResponsiveStore } from '@/stores';
|
||||||
|
|
||||||
import { useResponsiveDocGrid } from '../hooks/useResponsiveDocGrid';
|
import { useResponsiveDocGrid } from '../hooks/useResponsiveDocGrid';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { css } from 'styled-components';
|
|||||||
|
|
||||||
import { Box, Text } from '@/components';
|
import { Box, Text } from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { Doc, useTrans } from '@/features/docs/doc-management';
|
import { Doc, useTrans } from '@/docs/doc-management';
|
||||||
import { useResponsiveStore } from '@/stores';
|
import { useResponsiveStore } from '@/stores';
|
||||||
|
|
||||||
import PinnedDocumentIcon from '../assets/pinned-document.svg';
|
import PinnedDocumentIcon from '../assets/pinned-document.svg';
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import { css } from 'styled-components';
|
|||||||
|
|
||||||
import { Box, SeparatedSection } from '@/components';
|
import { Box, SeparatedSection } from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { useDocStore } from '@/features/docs/doc-management';
|
import { useDocStore } from '@/docs/doc-management';
|
||||||
import { SimpleDocItem } from '@/features/docs/docs-grid';
|
import { SimpleDocItem } from '@/docs/docs-grid';
|
||||||
|
|
||||||
export const LeftPanelDocContent = () => {
|
export const LeftPanelDocContent = () => {
|
||||||
const { currentDoc } = useDocStore();
|
const { currentDoc } = useDocStore();
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import { css } from 'styled-components';
|
|||||||
|
|
||||||
import { Box, StyledLink } from '@/components';
|
import { Box, StyledLink } from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { Doc } from '@/features/docs/doc-management';
|
import { Doc } from '@/docs/doc-management';
|
||||||
import { DocShareModal } from '@/features/docs/doc-share';
|
import { DocShareModal } from '@/docs/doc-share';
|
||||||
import { DocsGridActions, SimpleDocItem } from '@/features/docs/docs-grid';
|
import { DocsGridActions, SimpleDocItem } from '@/docs/docs-grid';
|
||||||
import { useResponsiveStore } from '@/stores';
|
import { useResponsiveStore } from '@/stores';
|
||||||
|
|
||||||
type LeftPanelFavoriteItemProps = {
|
type LeftPanelFavoriteItemProps = {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
|
|
||||||
import { Box, HorizontalSeparator, InfiniteScroll, Text } from '@/components';
|
import { Box, HorizontalSeparator, InfiniteScroll, Text } from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { useInfiniteDocs } from '@/features/docs/doc-management';
|
import { useInfiniteDocs } from '@/docs/doc-management';
|
||||||
|
|
||||||
import { LeftPanelFavoriteItem } from './LeftPanelFavoriteItem';
|
import { LeftPanelFavoriteItem } from './LeftPanelFavoriteItem';
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import { useRouter } from 'next/navigation';
|
|||||||
import { PropsWithChildren } from 'react';
|
import { PropsWithChildren } from 'react';
|
||||||
|
|
||||||
import { Box, Icon, SeparatedSection } from '@/components';
|
import { Box, Icon, SeparatedSection } from '@/components';
|
||||||
|
import { useCreateDoc } from '@/docs/doc-management';
|
||||||
|
import { DocSearchModal } from '@/docs/doc-search';
|
||||||
import { useAuth } from '@/features/auth';
|
import { useAuth } from '@/features/auth';
|
||||||
import { useCreateDoc } from '@/features/docs/doc-management';
|
|
||||||
import { DocSearchModal } from '@/features/docs/doc-search';
|
|
||||||
import { useCmdK } from '@/hook/useCmdK';
|
import { useCmdK } from '@/hook/useCmdK';
|
||||||
|
|
||||||
import { useLeftPanelStore } from '../stores';
|
import { useLeftPanelStore } from '../stores';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { WorkboxPlugin } from 'workbox-core';
|
import { WorkboxPlugin } from 'workbox-core';
|
||||||
|
|
||||||
import { Doc, DocsResponse } from '@/features/docs/doc-management';
|
import { Doc, DocsResponse } from '@/docs/doc-management';
|
||||||
import { LinkReach, LinkRole } from '@/features/docs/doc-management/types';
|
import { LinkReach, LinkRole } from '@/docs/doc-management/types';
|
||||||
|
|
||||||
import { DBRequest, DocsDB } from './DocsDB';
|
import { DBRequest, DocsDB } from './DocsDB';
|
||||||
import { RequestSerializer } from './RequestSerializer';
|
import { RequestSerializer } from './RequestSerializer';
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ import { useRouter } from 'next/router';
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { Box, Text, TextErrors } from '@/components';
|
import { Box, Text, TextErrors } from '@/components';
|
||||||
import { KEY_AUTH, setAuthUrl } from '@/features/auth';
|
import { DocEditor } from '@/docs/doc-editor';
|
||||||
import { DocEditor } from '@/features/docs/doc-editor';
|
|
||||||
import {
|
import {
|
||||||
Doc,
|
Doc,
|
||||||
KEY_DOC,
|
KEY_DOC,
|
||||||
useCollaboration,
|
useCollaboration,
|
||||||
useDoc,
|
useDoc,
|
||||||
useDocStore,
|
useDocStore,
|
||||||
} from '@/features/docs/doc-management/';
|
} from '@/docs/doc-management/';
|
||||||
|
import { KEY_AUTH, setAuthUrl } from '@/features/auth';
|
||||||
import { MainLayout } from '@/layouts';
|
import { MainLayout } from '@/layouts';
|
||||||
import { useBroadcastStore } from '@/stores';
|
import { useBroadcastStore } from '@/stores';
|
||||||
import { NextPageWithLayout } from '@/types/next';
|
import { NextPageWithLayout } from '@/types/next';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { useSearchParams } from 'next/navigation';
|
import { useSearchParams } from 'next/navigation';
|
||||||
import type { ReactElement } from 'react';
|
import type { ReactElement } from 'react';
|
||||||
|
|
||||||
|
import { DocsGrid } from '@/docs/docs-grid';
|
||||||
import { DocDefaultFilter } from '@/features/docs';
|
import { DocDefaultFilter } from '@/features/docs';
|
||||||
import { DocsGrid } from '@/features/docs/docs-grid';
|
|
||||||
import { MainLayout } from '@/layouts';
|
import { MainLayout } from '@/layouts';
|
||||||
import { NextPageWithLayout } from '@/types/next';
|
import { NextPageWithLayout } from '@/types/next';
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"],
|
||||||
|
"@/docs/*": ["./src/features/docs/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
|
|||||||
Reference in New Issue
Block a user