mirror of
https://github.com/gosticks/plane.git
synced 2025-10-16 12:45:33 +00:00
refactor: space app barrel exports (#7573)
* refactor: space app barrel files * chore: rename views layout
This commit is contained in:
parent
3391e8580c
commit
d692db47b2
@ -3,11 +3,13 @@
|
||||
import { observer } from "mobx-react";
|
||||
import useSWR from "swr";
|
||||
// components
|
||||
import { LogoSpinner, PoweredBy } from "@/components/common";
|
||||
import { IssuesNavbarRoot } from "@/components/issues";
|
||||
import { LogoSpinner } from "@/components/common/logo-spinner";
|
||||
import { PoweredBy } from "@/components/common/powered-by";
|
||||
import { SomethingWentWrongError } from "@/components/issues/issue-layouts/error";
|
||||
import { IssuesNavbarRoot } from "@/components/issues/navbar";
|
||||
// hooks
|
||||
import { useIssueFilter, usePublish, usePublishList } from "@/hooks/store";
|
||||
import { usePublish, usePublishList } from "@/hooks/store/publish";
|
||||
import { useIssueFilter } from "@/hooks/store/use-issue-filter";
|
||||
|
||||
type Props = {
|
||||
children: React.ReactNode;
|
||||
|
||||
@ -4,9 +4,11 @@ import { observer } from "mobx-react";
|
||||
import { useSearchParams } from "next/navigation";
|
||||
import useSWR from "swr";
|
||||
// components
|
||||
import { IssuesLayoutsRoot } from "@/components/issues";
|
||||
import { IssuesLayoutsRoot } from "@/components/issues/issue-layouts";
|
||||
// hooks
|
||||
import { usePublish, useLabel, useStates } from "@/hooks/store";
|
||||
import { usePublish } from "@/hooks/store/publish";
|
||||
import { useLabel } from "@/hooks/store/use-label";
|
||||
import { useStates } from "@/hooks/store/use-state";
|
||||
|
||||
type Props = {
|
||||
params: {
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
|
||||
import { observer } from "mobx-react";
|
||||
// components
|
||||
import { UserLoggedIn } from "@/components/account";
|
||||
import { LogoSpinner } from "@/components/common";
|
||||
import { UserLoggedIn } from "@/components/account/user-logged-in";
|
||||
import { LogoSpinner } from "@/components/common/logo-spinner";
|
||||
import { AuthView } from "@/components/views";
|
||||
// hooks
|
||||
import { useUser } from "@/hooks/store";
|
||||
import { useUser } from "@/hooks/store/use-user";
|
||||
|
||||
const HomePage = observer(() => {
|
||||
const { data: currentUser, isAuthenticated, isInitializing } = useUser();
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { FC, ReactNode } from "react";
|
||||
import { ThemeProvider } from "next-themes";
|
||||
// components
|
||||
import { TranslationProvider } from "@plane/i18n";
|
||||
import { InstanceProvider } from "@/lib/instance-provider";
|
||||
@ -15,12 +16,14 @@ export const AppProvider: FC<IAppProvider> = (props) => {
|
||||
const { children } = props;
|
||||
|
||||
return (
|
||||
<StoreProvider>
|
||||
<TranslationProvider>
|
||||
<ToastProvider>
|
||||
<InstanceProvider>{children}</InstanceProvider>
|
||||
</ToastProvider>
|
||||
</TranslationProvider>
|
||||
</StoreProvider>
|
||||
<ThemeProvider themes={["light", "dark"]} defaultTheme="system" enableSystem>
|
||||
<StoreProvider>
|
||||
<TranslationProvider>
|
||||
<ToastProvider>
|
||||
<InstanceProvider>{children}</InstanceProvider>
|
||||
</ToastProvider>
|
||||
</TranslationProvider>
|
||||
</StoreProvider>
|
||||
</ThemeProvider>
|
||||
);
|
||||
};
|
||||
|
||||
@ -3,10 +3,11 @@
|
||||
import { observer } from "mobx-react";
|
||||
import useSWR from "swr";
|
||||
// components
|
||||
import { LogoSpinner, PoweredBy } from "@/components/common";
|
||||
import { LogoSpinner } from "@/components/common/logo-spinner";
|
||||
import { PoweredBy } from "@/components/common/powered-by";
|
||||
import { SomethingWentWrongError } from "@/components/issues/issue-layouts/error";
|
||||
// hooks
|
||||
import { usePublish, usePublishList } from "@/hooks/store";
|
||||
import { usePublish, usePublishList } from "@/hooks/store/publish";
|
||||
// Plane web
|
||||
import { ViewNavbarRoot } from "@/plane-web/components/navbar";
|
||||
import { useView } from "@/plane-web/hooks/store";
|
||||
@ -18,7 +19,7 @@ type Props = {
|
||||
};
|
||||
};
|
||||
|
||||
const IssuesLayout = observer((props: Props) => {
|
||||
const ViewsLayout = observer((props: Props) => {
|
||||
const { children, params } = props;
|
||||
// params
|
||||
const { anchor } = params;
|
||||
@ -61,4 +62,4 @@ const IssuesLayout = observer((props: Props) => {
|
||||
);
|
||||
});
|
||||
|
||||
export default IssuesLayout;
|
||||
export default ViewsLayout;
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
import { observer } from "mobx-react";
|
||||
import { useSearchParams } from "next/navigation";
|
||||
// components
|
||||
import { PoweredBy } from "@/components/common";
|
||||
import { PoweredBy } from "@/components/common/powered-by";
|
||||
// hooks
|
||||
import { usePublish } from "@/hooks/store";
|
||||
import { usePublish } from "@/hooks/store/publish";
|
||||
// plane-web
|
||||
import { ViewLayoutsRoot } from "@/plane-web/components/issue-layouts/root";
|
||||
|
||||
@ -15,7 +15,7 @@ type Props = {
|
||||
};
|
||||
};
|
||||
|
||||
const IssuesPage = observer((props: Props) => {
|
||||
const ViewsPage = observer((props: Props) => {
|
||||
const { params } = props;
|
||||
const { anchor } = params;
|
||||
// params
|
||||
@ -34,4 +34,4 @@ const IssuesPage = observer((props: Props) => {
|
||||
);
|
||||
});
|
||||
|
||||
export default IssuesPage;
|
||||
export default ViewsPage;
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
import { PageNotFound } from "@/components/ui/not-found";
|
||||
import { PublishStore } from "@/store/publish/publish.store";
|
||||
import type { PublishStore } from "@/store/publish/publish.store";
|
||||
|
||||
type Props = {
|
||||
peekId: string | undefined;
|
||||
publishSettings: PublishStore;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export const ViewLayoutsRoot = (props: Props) => <PageNotFound />;
|
||||
export const ViewLayoutsRoot = (_props: Props) => <PageNotFound />;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { PublishStore } from "@/store/publish/publish.store";
|
||||
import type { PublishStore } from "@/store/publish/publish.store";
|
||||
|
||||
type Props = {
|
||||
publishSettings: PublishStore;
|
||||
|
||||
@ -11,14 +11,6 @@ import { SitesAuthService } from "@plane/services";
|
||||
import { IEmailCheckData } from "@plane/types";
|
||||
import { OAuthOptions } from "@plane/ui";
|
||||
// components
|
||||
import {
|
||||
AuthHeader,
|
||||
AuthBanner,
|
||||
AuthEmailForm,
|
||||
AuthUniqueCodeForm,
|
||||
AuthPasswordForm,
|
||||
TermsAndConditions,
|
||||
} from "@/components/account";
|
||||
// helpers
|
||||
import {
|
||||
EAuthenticationErrorCodes,
|
||||
@ -27,7 +19,7 @@ import {
|
||||
authErrorHandler,
|
||||
} from "@/helpers/authentication.helper";
|
||||
// hooks
|
||||
import { useInstance } from "@/hooks/store";
|
||||
import { useInstance } from "@/hooks/store/use-instance";
|
||||
// types
|
||||
import { EAuthModes, EAuthSteps } from "@/types/auth";
|
||||
// assets
|
||||
@ -35,6 +27,13 @@ import GithubLightLogo from "/public/logos/github-black.png";
|
||||
import GithubDarkLogo from "/public/logos/github-dark.svg";
|
||||
import GitlabLogo from "/public/logos/gitlab-logo.svg";
|
||||
import GoogleLogo from "/public/logos/google-logo.svg";
|
||||
// local imports
|
||||
import { TermsAndConditions } from "../terms-and-conditions";
|
||||
import { AuthBanner } from "./auth-banner";
|
||||
import { AuthHeader } from "./auth-header";
|
||||
import { AuthEmailForm } from "./email";
|
||||
import { AuthPasswordForm } from "./password";
|
||||
import { AuthUniqueCodeForm } from "./unique-code";
|
||||
|
||||
const authService = new SitesAuthService();
|
||||
|
||||
|
||||
@ -1,8 +1 @@
|
||||
export * from "./auth-root";
|
||||
|
||||
export * from "./auth-header";
|
||||
export * from "./auth-banner";
|
||||
|
||||
export * from "./email";
|
||||
export * from "./password";
|
||||
export * from "./unique-code";
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
export * from "./auth-forms";
|
||||
export * from "./terms-and-conditions";
|
||||
export * from "./user-logged-in";
|
||||
@ -4,10 +4,10 @@ import { observer } from "mobx-react";
|
||||
import Image from "next/image";
|
||||
import { PlaneLockup } from "@plane/ui";
|
||||
// components
|
||||
import { PoweredBy } from "@/components/common";
|
||||
import { UserAvatar } from "@/components/issues";
|
||||
import { PoweredBy } from "@/components/common/powered-by";
|
||||
import { UserAvatar } from "@/components/issues/navbar/user-avatar";
|
||||
// hooks
|
||||
import { useUser } from "@/hooks/store";
|
||||
import { useUser } from "@/hooks/store/use-user";
|
||||
// assets
|
||||
import UserLoggedInImage from "@/public/user-logged-in.svg";
|
||||
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
export * from "./project-logo";
|
||||
export * from "./logo-spinner";
|
||||
export * from "./powered-by";
|
||||
@ -1 +0,0 @@
|
||||
export * from "./mentions";
|
||||
@ -2,7 +2,8 @@ import { observer } from "mobx-react";
|
||||
// helpers
|
||||
import { cn } from "@plane/utils";
|
||||
// hooks
|
||||
import { useMember, useUser } from "@/hooks/store";
|
||||
import { useMember } from "@/hooks/store/use-member";
|
||||
import { useUser } from "@/hooks/store/use-user";
|
||||
|
||||
type Props = {
|
||||
id: string;
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
export * from "./embeds";
|
||||
export * from "./lite-text-editor";
|
||||
export * from "./rich-text-editor";
|
||||
export * from "./toolbar";
|
||||
@ -3,12 +3,13 @@ import React from "react";
|
||||
import { type EditorRefApi, type ILiteTextEditorProps, LiteTextEditorWithRef, type TFileHandler } from "@plane/editor";
|
||||
import type { MakeOptional } from "@plane/types";
|
||||
import { cn } from "@plane/utils";
|
||||
// components
|
||||
import { EditorMentionsRoot, IssueCommentToolbar } from "@/components/editor";
|
||||
// helpers
|
||||
import { getEditorFileHandlers } from "@/helpers/editor.helper";
|
||||
import { isCommentEmpty } from "@/helpers/string.helper";
|
||||
import { useEditorFlagging } from "@/plane-web/hooks/use-editor-flagging";
|
||||
// local imports
|
||||
import { EditorMentionsRoot } from "./embeds/mentions";
|
||||
import { IssueCommentToolbar } from "./toolbar";
|
||||
|
||||
type LiteTextEditorWrapperProps = MakeOptional<
|
||||
Omit<ILiteTextEditorProps, "fileHandler" | "mentionHandler">,
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
import React, { forwardRef } from "react";
|
||||
// plane imports
|
||||
import { useEditorFlagging } from "ce/hooks/use-editor-flagging";
|
||||
import { EditorRefApi, IRichTextEditorProps, RichTextEditorWithRef, TFileHandler } from "@plane/editor";
|
||||
import { MakeOptional } from "@plane/types";
|
||||
// components
|
||||
import { EditorMentionsRoot } from "@/components/editor";
|
||||
import { type EditorRefApi, type IRichTextEditorProps, RichTextEditorWithRef, type TFileHandler } from "@plane/editor";
|
||||
import type { MakeOptional } from "@plane/types";
|
||||
// helpers
|
||||
import { getEditorFileHandlers } from "@/helpers/editor.helper";
|
||||
// store hooks
|
||||
import { useMember } from "@/hooks/store";
|
||||
// hooks
|
||||
import { useMember } from "@/hooks/store/use-member";
|
||||
// local imports
|
||||
import { EditorMentionsRoot } from "./embeds/mentions";
|
||||
|
||||
type RichTextEditorWrapperProps = MakeOptional<
|
||||
Omit<IRichTextEditorProps, "editable" | "fileHandler" | "mentionHandler">,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
import React, { useEffect, useState, useCallback } from "react";
|
||||
// plane imports
|
||||
import { TOOLBAR_ITEMS, ToolbarMenuItem, EditorRefApi } from "@plane/editor";
|
||||
import { TOOLBAR_ITEMS, type ToolbarMenuItem, type EditorRefApi } from "@plane/editor";
|
||||
import { Button, Tooltip } from "@plane/ui";
|
||||
import { cn } from "@plane/utils";
|
||||
|
||||
|
||||
@ -1 +0,0 @@
|
||||
export * from "./instance-failure-view";
|
||||
@ -5,7 +5,7 @@ import cloneDeep from "lodash/cloneDeep";
|
||||
import { observer } from "mobx-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
// hooks
|
||||
import { useIssueFilter } from "@/hooks/store";
|
||||
import { useIssueFilter } from "@/hooks/store/use-issue-filter";
|
||||
// store
|
||||
import type { TIssueLayout, TIssueQueryFilters } from "@/types/issue";
|
||||
// components
|
||||
|
||||
@ -6,7 +6,7 @@ import { X } from "lucide-react";
|
||||
import { EIconSize } from "@plane/constants";
|
||||
import { StateGroupIcon } from "@plane/ui";
|
||||
// hooks
|
||||
import { useStates } from "@/hooks/store";
|
||||
import { useStates } from "@/hooks/store/use-state";
|
||||
|
||||
type Props = {
|
||||
handleRemove: (val: string) => void;
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
export * from "./dropdown";
|
||||
export * from "./filter-header";
|
||||
export * from "./filter-option";
|
||||
@ -1,11 +1 @@
|
||||
// filters
|
||||
export * from "./root";
|
||||
export * from "./selection";
|
||||
|
||||
// properties
|
||||
export * from "./state";
|
||||
export * from "./priority";
|
||||
export * from "./labels";
|
||||
|
||||
// helpers
|
||||
export * from "./helpers";
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
"use client";
|
||||
|
||||
import React, { useState } from "react";
|
||||
// plane imports
|
||||
import { Loader } from "@plane/ui";
|
||||
// components
|
||||
import { FilterHeader, FilterOption } from "@/components/issues/filters/helpers";
|
||||
// types
|
||||
import { IIssueLabel } from "@/types/issue";
|
||||
import type { IIssueLabel } from "@/types/issue";
|
||||
// local imports
|
||||
import { FilterHeader } from "./helpers/filter-header";
|
||||
import { FilterOption } from "./helpers/filter-option";
|
||||
|
||||
const LabelIcons = ({ color }: { color: string }) => (
|
||||
<span className="h-2.5 w-2.5 rounded-full" style={{ backgroundColor: color }} />
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
|
||||
import React, { useState } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// plane imports
|
||||
import { ISSUE_PRIORITY_FILTERS } from "@plane/constants";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
// ui
|
||||
import { PriorityIcon } from "@plane/ui";
|
||||
// components
|
||||
import { FilterHeader, FilterOption } from "./helpers";
|
||||
// constants
|
||||
// local imports
|
||||
import { FilterHeader } from "./helpers/filter-header";
|
||||
import { FilterOption } from "./helpers/filter-option";
|
||||
|
||||
type Props = {
|
||||
appliedFilters: string[] | null;
|
||||
|
||||
@ -12,7 +12,7 @@ import { FilterSelection } from "@/components/issues/filters/selection";
|
||||
// helpers
|
||||
import { queryParamGenerator } from "@/helpers/query-param-generator";
|
||||
// hooks
|
||||
import { useIssueFilter } from "@/hooks/store";
|
||||
import { useIssueFilter } from "@/hooks/store/use-issue-filter";
|
||||
// types
|
||||
import { TIssueQueryFilters } from "@/types/issue";
|
||||
|
||||
|
||||
@ -4,9 +4,10 @@ import React, { useState } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Search, X } from "lucide-react";
|
||||
// types
|
||||
import { IIssueFilterOptions, TIssueFilterKeys } from "@/types/issue";
|
||||
// components
|
||||
import { FilterPriority, FilterState } from ".";
|
||||
import type { IIssueFilterOptions, TIssueFilterKeys } from "@/types/issue";
|
||||
// local imports
|
||||
import { FilterPriority } from "./priority";
|
||||
import { FilterState } from "./state";
|
||||
|
||||
type Props = {
|
||||
filters: IIssueFilterOptions;
|
||||
|
||||
@ -5,10 +5,11 @@ import { observer } from "mobx-react";
|
||||
// ui
|
||||
import { EIconSize } from "@plane/constants";
|
||||
import { Loader, StateGroupIcon } from "@plane/ui";
|
||||
// components
|
||||
import { FilterHeader, FilterOption } from "@/components/issues/filters/helpers";
|
||||
// hooks
|
||||
import { useStates } from "@/hooks/store";
|
||||
import { useStates } from "@/hooks/store/use-state";
|
||||
// local imports
|
||||
import { FilterHeader } from "./helpers/filter-header";
|
||||
import { FilterOption } from "./helpers/filter-option";
|
||||
|
||||
type Props = {
|
||||
appliedFilters: string[] | null;
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
export * from "./issue-layouts";
|
||||
export * from "./navbar";
|
||||
@ -1,4 +1 @@
|
||||
export * from "./kanban/base-kanban-root";
|
||||
export * from "./list/base-list-root";
|
||||
export * from "./properties";
|
||||
export * from "./root";
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import { observer } from "mobx-react";
|
||||
import { TLoader } from "@plane/types";
|
||||
import { LogoSpinner } from "@/components/common";
|
||||
// plane imports
|
||||
import type { TLoader } from "@plane/types";
|
||||
// components
|
||||
import { LogoSpinner } from "@/components/common/logo-spinner";
|
||||
|
||||
interface Props {
|
||||
children: string | React.ReactNode | React.ReactNode[];
|
||||
|
||||
@ -8,7 +8,7 @@ import { IIssueDisplayProperties } from "@plane/types";
|
||||
// components
|
||||
import { IssueLayoutHOC } from "@/components/issues/issue-layouts/issue-layout-HOC";
|
||||
// hooks
|
||||
import { useIssue } from "@/hooks/store";
|
||||
import { useIssue } from "@/hooks/store/use-issue";
|
||||
|
||||
import { KanBan } from "./default";
|
||||
|
||||
|
||||
@ -3,9 +3,10 @@ import { useParams } from "next/navigation";
|
||||
// plane utils
|
||||
import { cn } from "@plane/utils";
|
||||
// components
|
||||
import { IssueEmojiReactions, IssueVotes } from "@/components/issues/reactions";
|
||||
import { IssueEmojiReactions } from "@/components/issues/reactions/issue-emoji-reactions";
|
||||
import { IssueVotes } from "@/components/issues/reactions/issue-vote-reactions";
|
||||
// hooks
|
||||
import { usePublish } from "@/hooks/store";
|
||||
import { usePublish } from "@/hooks/store/publish";
|
||||
|
||||
type Props = {
|
||||
issueId: string;
|
||||
|
||||
@ -15,7 +15,8 @@ import { WithDisplayPropertiesHOC } from "@/components/issues/issue-layouts/with
|
||||
// helpers
|
||||
import { queryParamGenerator } from "@/helpers/query-param-generator";
|
||||
// hooks
|
||||
import { useIssueDetails, usePublish } from "@/hooks/store";
|
||||
import { usePublish } from "@/hooks/store/publish";
|
||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||
//
|
||||
import { IIssue } from "@/types/issue";
|
||||
import { IssueProperties } from "../properties/all-properties";
|
||||
|
||||
@ -13,7 +13,11 @@ import {
|
||||
TLoader,
|
||||
} from "@plane/types";
|
||||
// hooks
|
||||
import { useMember, useModule, useStates, useLabel, useCycle } from "@/hooks/store";
|
||||
import { useCycle } from "@/hooks/store/use-cycle";
|
||||
import { useLabel } from "@/hooks/store/use-label";
|
||||
import { useMember } from "@/hooks/store/use-member";
|
||||
import { useModule } from "@/hooks/store/use-module";
|
||||
import { useStates } from "@/hooks/store/use-state";
|
||||
//
|
||||
import { getGroupByColumns } from "../utils";
|
||||
// components
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
export * from "./block";
|
||||
export * from "./blocks-list";
|
||||
@ -3,7 +3,7 @@
|
||||
import { MutableRefObject, forwardRef, useCallback, useRef, useState } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
//types
|
||||
import {
|
||||
import type {
|
||||
TGroupedIssues,
|
||||
IIssueDisplayProperties,
|
||||
TSubGroupedIssues,
|
||||
@ -14,8 +14,8 @@ import {
|
||||
import { cn } from "@plane/utils";
|
||||
// hooks
|
||||
import { useIntersectionObserver } from "@/hooks/use-intersection-observer";
|
||||
//
|
||||
import { KanbanIssueBlocksList } from ".";
|
||||
// local imports
|
||||
import { KanbanIssueBlocksList } from "./blocks-list";
|
||||
|
||||
interface IKanbanGroup {
|
||||
groupId: string;
|
||||
|
||||
@ -13,7 +13,11 @@ import {
|
||||
TLoader,
|
||||
} from "@plane/types";
|
||||
// hooks
|
||||
import { useMember, useModule, useStates, useLabel, useCycle } from "@/hooks/store";
|
||||
import { useCycle } from "@/hooks/store/use-cycle";
|
||||
import { useLabel } from "@/hooks/store/use-label";
|
||||
import { useMember } from "@/hooks/store/use-member";
|
||||
import { useModule } from "@/hooks/store/use-module";
|
||||
import { useStates } from "@/hooks/store/use-state";
|
||||
//
|
||||
import { getGroupByColumns } from "../utils";
|
||||
import { KanBan } from "./default";
|
||||
|
||||
@ -6,7 +6,7 @@ import { IIssueDisplayProperties, TGroupedIssues } from "@plane/types";
|
||||
// components
|
||||
import { IssueLayoutHOC } from "@/components/issues/issue-layouts/issue-layout-HOC";
|
||||
// hooks
|
||||
import { useIssue } from "@/hooks/store";
|
||||
import { useIssue } from "@/hooks/store/use-issue";
|
||||
import { List } from "./default";
|
||||
|
||||
type Props = {
|
||||
|
||||
@ -13,7 +13,8 @@ import { cn } from "@plane/utils";
|
||||
// helpers
|
||||
import { queryParamGenerator } from "@/helpers/query-param-generator";
|
||||
// hooks
|
||||
import { useIssueDetails, usePublish } from "@/hooks/store";
|
||||
import { usePublish } from "@/hooks/store/publish";
|
||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||
//
|
||||
import { IssueProperties } from "../properties/all-properties";
|
||||
|
||||
|
||||
@ -11,7 +11,11 @@ import {
|
||||
TLoader,
|
||||
} from "@plane/types";
|
||||
// hooks
|
||||
import { useMember, useModule, useStates, useLabel, useCycle } from "@/hooks/store";
|
||||
import { useCycle } from "@/hooks/store/use-cycle";
|
||||
import { useLabel } from "@/hooks/store/use-label";
|
||||
import { useMember } from "@/hooks/store/use-member";
|
||||
import { useModule } from "@/hooks/store/use-module";
|
||||
import { useStates } from "@/hooks/store/use-state";
|
||||
//
|
||||
import { getGroupByColumns } from "../utils";
|
||||
import { ListGroup } from "./list-group";
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
export * from "./block";
|
||||
export * from "./blocks-list";
|
||||
@ -2,27 +2,23 @@
|
||||
|
||||
import { observer } from "mobx-react";
|
||||
import { Layers, Link, Paperclip } from "lucide-react";
|
||||
// plane types
|
||||
import { IIssueDisplayProperties } from "@plane/types";
|
||||
// plane ui
|
||||
// plane imports
|
||||
import type { IIssueDisplayProperties } from "@plane/types";
|
||||
import { Tooltip } from "@plane/ui";
|
||||
// plane utils
|
||||
import { cn } from "@plane/utils";
|
||||
// components
|
||||
import {
|
||||
IssueBlockDate,
|
||||
IssueBlockLabels,
|
||||
IssueBlockPriority,
|
||||
IssueBlockState,
|
||||
IssueBlockMembers,
|
||||
IssueBlockModules,
|
||||
IssueBlockCycle,
|
||||
} from "@/components/issues";
|
||||
import { WithDisplayPropertiesHOC } from "@/components/issues/issue-layouts/with-display-properties-HOC";
|
||||
// helpers
|
||||
import { getDate } from "@/helpers/date-time.helper";
|
||||
//// hooks
|
||||
import { IIssue } from "@/types/issue";
|
||||
import { IssueBlockCycle } from "./cycle";
|
||||
import { IssueBlockDate } from "./due-date";
|
||||
import { IssueBlockLabels } from "./labels";
|
||||
import { IssueBlockMembers } from "./member";
|
||||
import { IssueBlockModules } from "./modules";
|
||||
import { IssueBlockPriority } from "./priority";
|
||||
import { IssueBlockState } from "./state";
|
||||
|
||||
export interface IIssueProperties {
|
||||
issue: IIssue;
|
||||
|
||||
@ -8,7 +8,7 @@ import { cn } from "@plane/utils";
|
||||
import { renderFormattedDate } from "@/helpers/date-time.helper";
|
||||
import { shouldHighlightIssueDueDate } from "@/helpers/issue.helper";
|
||||
// hooks
|
||||
import { useStates } from "@/hooks/store";
|
||||
import { useStates } from "@/hooks/store/use-state";
|
||||
|
||||
type Props = {
|
||||
due_date: string | undefined;
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
export * from "./due-date";
|
||||
export * from "./labels";
|
||||
export * from "./priority";
|
||||
export * from "./state";
|
||||
export * from "./cycle";
|
||||
export * from "./member";
|
||||
export * from "./modules";
|
||||
export * from "./all-properties";
|
||||
@ -2,8 +2,10 @@
|
||||
|
||||
import { observer } from "mobx-react";
|
||||
import { Tags } from "lucide-react";
|
||||
// plane imports
|
||||
import { Tooltip } from "@plane/ui";
|
||||
import { useLabel } from "@/hooks/store";
|
||||
// hooks
|
||||
import { useLabel } from "@/hooks/store/use-label";
|
||||
|
||||
type Props = {
|
||||
labelIds: string[];
|
||||
|
||||
@ -6,7 +6,7 @@ import { StateGroupIcon, Tooltip } from "@plane/ui";
|
||||
// plane utils
|
||||
import { cn } from "@plane/utils";
|
||||
//hooks
|
||||
import { useStates } from "@/hooks/store";
|
||||
import { useStates } from "@/hooks/store/use-state";
|
||||
|
||||
type Props = {
|
||||
stateId: string | undefined;
|
||||
|
||||
@ -4,15 +4,18 @@ import { FC, useEffect } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import useSWR from "swr";
|
||||
// components
|
||||
import { IssueKanbanLayoutRoot, IssuesListLayoutRoot } from "@/components/issues";
|
||||
import { IssueAppliedFilters } from "@/components/issues/filters/applied-filters/root";
|
||||
import { IssuePeekOverview } from "@/components/issues/peek-overview";
|
||||
// hooks
|
||||
import { useIssue, useIssueDetails, useIssueFilter } from "@/hooks/store";
|
||||
import { useIssue } from "@/hooks/store/use-issue";
|
||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||
import { useIssueFilter } from "@/hooks/store/use-issue-filter";
|
||||
// store
|
||||
import { PublishStore } from "@/store/publish/publish.store";
|
||||
// assets
|
||||
import type { PublishStore } from "@/store/publish/publish.store";
|
||||
// local imports
|
||||
import { SomethingWentWrongError } from "./error";
|
||||
import { IssueKanbanLayoutRoot } from "./kanban/base-kanban-root";
|
||||
import { IssuesListLayoutRoot } from "./list/base-list-root";
|
||||
|
||||
type Props = {
|
||||
peekId: string | undefined;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { ReactNode } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { IIssueDisplayProperties } from "@plane/types";
|
||||
// plane imports
|
||||
import type { IIssueDisplayProperties } from "@plane/types";
|
||||
|
||||
interface IWithDisplayPropertiesHOC {
|
||||
displayProperties: IIssueDisplayProperties;
|
||||
|
||||
@ -4,17 +4,21 @@ import { useEffect, FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
// components
|
||||
import { IssuesLayoutSelection, NavbarTheme, UserAvatar } from "@/components/issues";
|
||||
import { IssueFiltersDropdown } from "@/components/issues/filters";
|
||||
// helpers
|
||||
import { queryParamGenerator } from "@/helpers/query-param-generator";
|
||||
// hooks
|
||||
import { useIssueFilter, useIssueDetails } from "@/hooks/store";
|
||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||
import { useIssueFilter } from "@/hooks/store/use-issue-filter";
|
||||
import useIsInIframe from "@/hooks/use-is-in-iframe";
|
||||
// store
|
||||
import { PublishStore } from "@/store/publish/publish.store";
|
||||
import type { PublishStore } from "@/store/publish/publish.store";
|
||||
// types
|
||||
import { TIssueLayout } from "@/types/issue";
|
||||
import type { TIssueLayout } from "@/types/issue";
|
||||
// local imports
|
||||
import { IssuesLayoutSelection } from "./layout-selection";
|
||||
import { NavbarTheme } from "./theme";
|
||||
import { UserAvatar } from "./user-avatar";
|
||||
|
||||
export type NavbarControlsProps = {
|
||||
publishSettings: PublishStore;
|
||||
|
||||
@ -1,5 +1 @@
|
||||
export * from "./controls";
|
||||
export * from "./layout-selection";
|
||||
export * from "./root";
|
||||
export * from "./theme";
|
||||
export * from "./user-avatar";
|
||||
|
||||
@ -11,7 +11,7 @@ import { Tooltip } from "@plane/ui";
|
||||
// helpers
|
||||
import { queryParamGenerator } from "@/helpers/query-param-generator";
|
||||
// hooks
|
||||
import { useIssueFilter } from "@/hooks/store";
|
||||
import { useIssueFilter } from "@/hooks/store/use-issue-filter";
|
||||
// mobx
|
||||
import { TIssueLayout } from "@/types/issue";
|
||||
import { IssueLayoutIcon } from "./layout-icon";
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
"use client";
|
||||
|
||||
import { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Briefcase } from "lucide-react";
|
||||
// components
|
||||
import { ProjectLogo } from "@/components/common";
|
||||
import { NavbarControls } from "@/components/issues";
|
||||
import { ProjectLogo } from "@/components/common/project-logo";
|
||||
// store
|
||||
import { PublishStore } from "@/store/publish/publish.store";
|
||||
import type { PublishStore } from "@/store/publish/publish.store";
|
||||
// local imports
|
||||
import { NavbarControls } from "./controls";
|
||||
|
||||
type Props = {
|
||||
publishSettings: PublishStore;
|
||||
|
||||
@ -15,7 +15,7 @@ import { getFileURL } from "@plane/utils";
|
||||
// helpers
|
||||
import { queryParamGenerator } from "@/helpers/query-param-generator";
|
||||
// hooks
|
||||
import { useUser } from "@/hooks/store";
|
||||
import { useUser } from "@/hooks/store/use-user";
|
||||
|
||||
const authService = new AuthService();
|
||||
|
||||
|
||||
@ -11,7 +11,9 @@ import { TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// editor components
|
||||
import { LiteTextEditor } from "@/components/editor/lite-text-editor";
|
||||
// hooks
|
||||
import { useIssueDetails, usePublish, useUser } from "@/hooks/store";
|
||||
import { usePublish } from "@/hooks/store/publish";
|
||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||
import { useUser } from "@/hooks/store/use-user";
|
||||
// services
|
||||
const fileService = new SitesFileService();
|
||||
|
||||
|
||||
@ -8,12 +8,14 @@ import { EditorRefApi } from "@plane/editor";
|
||||
import { TIssuePublicComment } from "@plane/types";
|
||||
import { getFileURL } from "@plane/utils";
|
||||
// components
|
||||
import { LiteTextEditor } from "@/components/editor";
|
||||
import { CommentReactions } from "@/components/issues/peek-overview";
|
||||
import { LiteTextEditor } from "@/components/editor/lite-text-editor";
|
||||
import { CommentReactions } from "@/components/issues/peek-overview/comment/comment-reactions";
|
||||
// helpers
|
||||
import { timeAgo } from "@/helpers/date-time.helper";
|
||||
// hooks
|
||||
import { useIssueDetails, usePublish, useUser } from "@/hooks/store";
|
||||
import { usePublish } from "@/hooks/store/publish";
|
||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||
import { useUser } from "@/hooks/store/use-user";
|
||||
import useIsInIframe from "@/hooks/use-is-in-iframe";
|
||||
|
||||
type Props = {
|
||||
|
||||
@ -12,7 +12,8 @@ import { ReactionSelector } from "@/components/ui";
|
||||
import { groupReactions, renderEmoji } from "@/helpers/emoji.helper";
|
||||
import { queryParamGenerator } from "@/helpers/query-param-generator";
|
||||
// hooks
|
||||
import { useIssueDetails, useUser } from "@/hooks/store";
|
||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||
import { useUser } from "@/hooks/store/use-user";
|
||||
import useIsInIframe from "@/hooks/use-is-in-iframe";
|
||||
|
||||
type Props = {
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
export * from "./add-comment";
|
||||
export * from "./comment-detail-card";
|
||||
export * from "./comment-reactions";
|
||||
@ -1,16 +1,15 @@
|
||||
"use client";
|
||||
|
||||
import { observer } from "mobx-react";
|
||||
// components
|
||||
// plane imports
|
||||
import { Loader } from "@plane/ui";
|
||||
import {
|
||||
PeekOverviewHeader,
|
||||
PeekOverviewIssueActivity,
|
||||
PeekOverviewIssueDetails,
|
||||
PeekOverviewIssueProperties,
|
||||
} from "@/components/issues/peek-overview";
|
||||
// types
|
||||
import { IIssue } from "@/types/issue";
|
||||
import type { IIssue } from "@/types/issue";
|
||||
// local imports
|
||||
import { PeekOverviewHeader } from "./header";
|
||||
import { PeekOverviewIssueActivity } from "./issue-activity";
|
||||
import { PeekOverviewIssueDetails } from "./issue-details";
|
||||
import { PeekOverviewIssueProperties } from "./issue-properties";
|
||||
|
||||
type Props = {
|
||||
anchor: string;
|
||||
|
||||
@ -9,7 +9,7 @@ import { CenterPanelIcon, FullScreenPanelIcon, setToast, SidePanelIcon, TOAST_TY
|
||||
// helpers
|
||||
import { copyTextToClipboard } from "@/helpers/string.helper";
|
||||
// hooks
|
||||
import { useIssueDetails } from "@/hooks/store";
|
||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||
import useClipboardWritePermission from "@/hooks/use-clipboard-write-permission";
|
||||
// types
|
||||
import { IIssue, IPeekMode } from "@/types/issue";
|
||||
|
||||
@ -1,9 +1 @@
|
||||
export * from "./comment";
|
||||
export * from "./full-screen-peek-view";
|
||||
export * from "./header";
|
||||
export * from "./issue-activity";
|
||||
export * from "./issue-details";
|
||||
export * from "./issue-properties";
|
||||
export * from "./layout";
|
||||
export * from "./side-peek-view";
|
||||
export * from "./issue-reaction";
|
||||
|
||||
@ -4,12 +4,16 @@ import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
// plane imports
|
||||
import { Button } from "@plane/ui";
|
||||
// components
|
||||
import { CommentCard, AddComment } from "@/components/issues/peek-overview";
|
||||
import { AddComment } from "@/components/issues/peek-overview/comment/add-comment";
|
||||
import { CommentCard } from "@/components/issues/peek-overview/comment/comment-detail-card";
|
||||
import { Icon } from "@/components/ui";
|
||||
// hooks
|
||||
import { useIssueDetails, usePublish, useUser } from "@/hooks/store";
|
||||
import { usePublish } from "@/hooks/store/publish";
|
||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||
import { useUser } from "@/hooks/store/use-user";
|
||||
import useIsInIframe from "@/hooks/use-is-in-iframe";
|
||||
// types
|
||||
import { IIssue } from "@/types/issue";
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
import { observer } from "mobx-react";
|
||||
// components
|
||||
import { RichTextEditor } from "@/components/editor";
|
||||
import { IssueReactions } from "@/components/issues/peek-overview";
|
||||
import { usePublish } from "@/hooks/store";
|
||||
// plane imports
|
||||
import { RichTextEditor } from "@/components/editor/rich-text-editor";
|
||||
import { usePublish } from "@/hooks/store/publish";
|
||||
// types
|
||||
import { IIssue } from "@/types/issue";
|
||||
// local imports
|
||||
import { IssueReactions } from "./issue-reaction";
|
||||
|
||||
type Props = {
|
||||
anchor: string;
|
||||
|
||||
@ -14,7 +14,8 @@ import { renderFormattedDate } from "@/helpers/date-time.helper";
|
||||
import { shouldHighlightIssueDueDate } from "@/helpers/issue.helper";
|
||||
import { copyTextToClipboard, addSpaceIfCamelCase } from "@/helpers/string.helper";
|
||||
// hooks
|
||||
import { usePublish, useStates } from "@/hooks/store";
|
||||
import { usePublish } from "@/hooks/store/publish";
|
||||
import { useStates } from "@/hooks/store/use-state";
|
||||
// types
|
||||
import { IIssue, IPeekMode } from "@/types/issue";
|
||||
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
import { observer } from "mobx-react";
|
||||
import { IssueEmojiReactions, IssueVotes } from "@/components/issues/reactions";
|
||||
// components
|
||||
import { IssueEmojiReactions } from "@/components/issues/reactions/issue-emoji-reactions";
|
||||
import { IssueVotes } from "@/components/issues/reactions/issue-vote-reactions";
|
||||
// hooks
|
||||
import { usePublish } from "@/hooks/store";
|
||||
import { usePublish } from "@/hooks/store/publish";
|
||||
import useIsInIframe from "@/hooks/use-is-in-iframe";
|
||||
|
||||
type Props = {
|
||||
|
||||
@ -4,10 +4,11 @@ import { FC, Fragment, useEffect, useState } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import { Dialog, Transition } from "@headlessui/react";
|
||||
// components
|
||||
import { FullScreenPeekView, SidePeekView } from "@/components/issues/peek-overview";
|
||||
// hooks
|
||||
import { useIssueDetails } from "@/hooks/store";
|
||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||
// local imports
|
||||
import { FullScreenPeekView } from "./full-screen-peek-view";
|
||||
import { SidePeekView } from "./side-peek-view";
|
||||
|
||||
type TIssuePeekOverview = {
|
||||
anchor: string;
|
||||
|
||||
@ -1,18 +1,17 @@
|
||||
"use client";
|
||||
|
||||
import { observer } from "mobx-react";
|
||||
// components
|
||||
// plane imports
|
||||
import { Loader } from "@plane/ui";
|
||||
import {
|
||||
PeekOverviewHeader,
|
||||
PeekOverviewIssueActivity,
|
||||
PeekOverviewIssueDetails,
|
||||
PeekOverviewIssueProperties,
|
||||
} from "@/components/issues/peek-overview";
|
||||
// store hooks
|
||||
import { usePublish } from "@/hooks/store";
|
||||
import { usePublish } from "@/hooks/store/publish";
|
||||
// types
|
||||
import { IIssue } from "@/types/issue";
|
||||
// local imports
|
||||
import { PeekOverviewHeader } from "./header";
|
||||
import { PeekOverviewIssueActivity } from "./issue-activity";
|
||||
import { PeekOverviewIssueDetails } from "./issue-details";
|
||||
import { PeekOverviewIssueProperties } from "./issue-properties";
|
||||
|
||||
type Props = {
|
||||
anchor: string;
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
export * from "./issue-emoji-reactions";
|
||||
export * from "./issue-vote-reactions";
|
||||
@ -9,7 +9,8 @@ import { ReactionSelector } from "@/components/ui";
|
||||
import { groupReactions, renderEmoji } from "@/helpers/emoji.helper";
|
||||
import { queryParamGenerator } from "@/helpers/query-param-generator";
|
||||
// hooks
|
||||
import { useIssueDetails, useUser } from "@/hooks/store";
|
||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||
import { useUser } from "@/hooks/store/use-user";
|
||||
|
||||
type IssueEmojiReactionsProps = {
|
||||
anchor: string;
|
||||
|
||||
@ -9,7 +9,8 @@ import { cn } from "@plane/utils";
|
||||
// helpers
|
||||
import { queryParamGenerator } from "@/helpers/query-param-generator";
|
||||
// hooks
|
||||
import { useIssueDetails, useUser } from "@/hooks/store";
|
||||
import { useIssueDetails } from "@/hooks/store/use-issue-details";
|
||||
import { useUser } from "@/hooks/store/use-user";
|
||||
import useIsInIframe from "@/hooks/use-is-in-iframe";
|
||||
|
||||
type TIssueVotes = {
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
|
||||
import React from "react";
|
||||
import Image from "next/image";
|
||||
// ui
|
||||
// images
|
||||
import Image404 from "@/public/404.svg";
|
||||
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
"use client";
|
||||
|
||||
// components
|
||||
import { AuthRoot } from "@/components/account";
|
||||
import { PoweredBy } from "@/components/common";
|
||||
import { AuthRoot } from "@/components/account/auth-forms";
|
||||
import { PoweredBy } from "@/components/common/powered-by";
|
||||
// local imports
|
||||
import { AuthHeader } from "./header";
|
||||
|
||||
export const AuthView = () => (
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
export * from "./publish";
|
||||
export * from "./use-instance";
|
||||
export * from "./use-issue";
|
||||
export * from "./use-user";
|
||||
export * from "./use-user-profile";
|
||||
export * from "./use-issue-details";
|
||||
export * from "./use-issue-filter";
|
||||
export * from "./use-state";
|
||||
export * from "./use-label";
|
||||
export * from "./use-cycle";
|
||||
export * from "./use-module";
|
||||
export * from "./use-member";
|
||||
@ -2,7 +2,7 @@ import { useContext } from "react";
|
||||
// lib
|
||||
import { StoreContext } from "@/lib/store-provider";
|
||||
// store
|
||||
import { IPublishListStore } from "@/store/publish/publish_list.store";
|
||||
import type { IPublishListStore } from "@/store/publish/publish_list.store";
|
||||
|
||||
export const usePublishList = (): IPublishListStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
||||
@ -2,7 +2,7 @@ import { useContext } from "react";
|
||||
// lib
|
||||
import { StoreContext } from "@/lib/store-provider";
|
||||
// store
|
||||
import { PublishStore } from "@/store/publish/publish.store";
|
||||
import type { PublishStore } from "@/store/publish/publish.store";
|
||||
|
||||
export const usePublish = (anchor: string): PublishStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
||||
@ -2,7 +2,7 @@ import { useContext } from "react";
|
||||
// lib
|
||||
import { StoreContext } from "@/lib/store-provider";
|
||||
// store
|
||||
import { ICycleStore } from "@/store/cycle.store";
|
||||
import type { ICycleStore } from "@/store/cycle.store";
|
||||
|
||||
export const useCycle = (): ICycleStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
||||
@ -2,7 +2,7 @@ import { useContext } from "react";
|
||||
// lib
|
||||
import { StoreContext } from "@/lib/store-provider";
|
||||
// store
|
||||
import { IInstanceStore } from "@/store/instance.store";
|
||||
import type { IInstanceStore } from "@/store/instance.store";
|
||||
|
||||
export const useInstance = (): IInstanceStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
||||
@ -2,7 +2,7 @@ import { useContext } from "react";
|
||||
// lib
|
||||
import { StoreContext } from "@/lib/store-provider";
|
||||
// store
|
||||
import { IIssueDetailStore } from "@/store/issue-detail.store";
|
||||
import type { IIssueDetailStore } from "@/store/issue-detail.store";
|
||||
|
||||
export const useIssueDetails = (): IIssueDetailStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
||||
@ -2,7 +2,7 @@ import { useContext } from "react";
|
||||
// lib
|
||||
import { StoreContext } from "@/lib/store-provider";
|
||||
// store
|
||||
import { IIssueFilterStore } from "@/store/issue-filters.store";
|
||||
import type { IIssueFilterStore } from "@/store/issue-filters.store";
|
||||
|
||||
export const useIssueFilter = (): IIssueFilterStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
||||
@ -2,7 +2,7 @@ import { useContext } from "react";
|
||||
// lib
|
||||
import { StoreContext } from "@/lib/store-provider";
|
||||
// store
|
||||
import { IIssueStore } from "@/store/issue.store";
|
||||
import type { IIssueStore } from "@/store/issue.store";
|
||||
|
||||
export const useIssue = (): IIssueStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
||||
@ -2,7 +2,7 @@ import { useContext } from "react";
|
||||
// lib
|
||||
import { StoreContext } from "@/lib/store-provider";
|
||||
// store
|
||||
import { IIssueLabelStore } from "@/store/label.store";
|
||||
import type { IIssueLabelStore } from "@/store/label.store";
|
||||
|
||||
export const useLabel = (): IIssueLabelStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
||||
@ -2,7 +2,7 @@ import { useContext } from "react";
|
||||
// lib
|
||||
import { StoreContext } from "@/lib/store-provider";
|
||||
// store
|
||||
import { IIssueMemberStore } from "@/store/members.store";
|
||||
import type { IIssueMemberStore } from "@/store/members.store";
|
||||
|
||||
export const useMember = (): IIssueMemberStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
||||
@ -2,7 +2,7 @@ import { useContext } from "react";
|
||||
// lib
|
||||
import { StoreContext } from "@/lib/store-provider";
|
||||
// store
|
||||
import { IIssueModuleStore } from "@/store/module.store";
|
||||
import type { IIssueModuleStore } from "@/store/module.store";
|
||||
|
||||
export const useModule = (): IIssueModuleStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
||||
@ -2,7 +2,7 @@ import { useContext } from "react";
|
||||
// lib
|
||||
import { StoreContext } from "@/lib/store-provider";
|
||||
// store
|
||||
import { IStateStore } from "@/store/state.store";
|
||||
import type { IStateStore } from "@/store/state.store";
|
||||
|
||||
export const useStates = (): IStateStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
||||
@ -2,7 +2,7 @@ import { useContext } from "react";
|
||||
// lib
|
||||
import { StoreContext } from "@/lib/store-provider";
|
||||
// store
|
||||
import { IProfileStore } from "@/store/profile.store";
|
||||
import type { IProfileStore } from "@/store/profile.store";
|
||||
|
||||
export const useUserProfile = (): IProfileStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
||||
@ -2,7 +2,7 @@ import { useContext } from "react";
|
||||
// lib
|
||||
import { StoreContext } from "@/lib/store-provider";
|
||||
// store
|
||||
import { IUserStore } from "@/store/user.store";
|
||||
import type { IUserStore } from "@/store/user.store";
|
||||
|
||||
export const useUser = (): IUserStore => {
|
||||
const context = useContext(StoreContext);
|
||||
|
||||
@ -8,10 +8,11 @@ import { useTheme } from "next-themes";
|
||||
import useSWR from "swr";
|
||||
import { SPACE_BASE_PATH } from "@plane/constants";
|
||||
// components
|
||||
import { LogoSpinner } from "@/components/common";
|
||||
import { InstanceFailureView } from "@/components/instance";
|
||||
import { LogoSpinner } from "@/components/common/logo-spinner";
|
||||
import { InstanceFailureView } from "@/components/instance/instance-failure-view";
|
||||
// hooks
|
||||
import { useInstance, useUser } from "@/hooks/store";
|
||||
import { useInstance } from "@/hooks/store/use-instance";
|
||||
import { useUser } from "@/hooks/store/use-user";
|
||||
// assets
|
||||
import PlaneBackgroundPatternDark from "@/public/auth/background-pattern-dark.svg";
|
||||
import PlaneBackgroundPattern from "@/public/auth/background-pattern.svg";
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { ReactNode, createContext } from "react";
|
||||
import { ThemeProvider } from "next-themes";
|
||||
// plane web store
|
||||
import { RootStore } from "@/plane-web/store/root.store";
|
||||
|
||||
@ -32,9 +31,5 @@ export const StoreProvider = ({ children, initialState = undefined }: StoreProvi
|
||||
store.hydrate(initialState);
|
||||
}
|
||||
|
||||
return (
|
||||
<ThemeProvider themes={["light", "dark"]} defaultTheme="system" enableSystem>
|
||||
<StoreContext.Provider value={store}>{children}</StoreContext.Provider>
|
||||
</ThemeProvider>
|
||||
);
|
||||
return <StoreContext.Provider value={store}>{children}</StoreContext.Provider>;
|
||||
};
|
||||
|
||||
@ -3,7 +3,7 @@ import { action, makeObservable, observable, runInAction } from "mobx";
|
||||
import { SitesCycleService } from "@plane/services";
|
||||
import { TPublicCycle } from "@/types/cycle";
|
||||
// store
|
||||
import { CoreRootStore } from "./root.store";
|
||||
import type { CoreRootStore } from "./root.store";
|
||||
|
||||
export interface ICycleStore {
|
||||
// observables
|
||||
|
||||
@ -8,7 +8,7 @@ import { computedFn } from "mobx-utils";
|
||||
// plane imports
|
||||
import { ALL_ISSUES } from "@plane/constants";
|
||||
import { SitesIssueService } from "@plane/services";
|
||||
import {
|
||||
import type {
|
||||
TIssueGroupByOptions,
|
||||
TGroupedIssues,
|
||||
TSubGroupedIssues,
|
||||
@ -20,8 +20,8 @@ import {
|
||||
TPaginationData,
|
||||
} from "@plane/types";
|
||||
// types
|
||||
import { IIssue, TIssuesResponse } from "@/types/issue";
|
||||
import { CoreRootStore } from "../root.store";
|
||||
import type { IIssue, TIssuesResponse } from "@/types/issue";
|
||||
import type { CoreRootStore } from "../root.store";
|
||||
// constants
|
||||
// helpers
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import { observable, action, makeObservable, runInAction } from "mobx";
|
||||
import { InstanceService } from "@plane/services";
|
||||
import { IInstance, IInstanceConfig } from "@plane/types";
|
||||
// store
|
||||
import { CoreRootStore } from "@/store/root.store";
|
||||
import type { CoreRootStore } from "@/store/root.store";
|
||||
|
||||
type TError = {
|
||||
status: string;
|
||||
|
||||
@ -7,9 +7,9 @@ import { v4 as uuidv4 } from "uuid";
|
||||
import { SitesFileService, SitesIssueService } from "@plane/services";
|
||||
import { EFileAssetType, TFileSignedURLResponse, TIssuePublicComment } from "@plane/types";
|
||||
// store
|
||||
import { CoreRootStore } from "@/store/root.store";
|
||||
import type { CoreRootStore } from "@/store/root.store";
|
||||
// types
|
||||
import { IIssue, IPeekMode, IVote } from "@/types/issue";
|
||||
import type { IIssue, IPeekMode, IVote } from "@/types/issue";
|
||||
|
||||
export interface IIssueDetailStore {
|
||||
loader: boolean;
|
||||
|
||||
@ -5,11 +5,11 @@ import { action, makeObservable, observable, runInAction } from "mobx";
|
||||
import { computedFn } from "mobx-utils";
|
||||
// plane internal
|
||||
import { ISSUE_DISPLAY_FILTERS_BY_LAYOUT } from "@plane/constants";
|
||||
import { IssuePaginationOptions, TIssueParams } from "@plane/types";
|
||||
import type { IssuePaginationOptions, TIssueParams } from "@plane/types";
|
||||
// store
|
||||
import { CoreRootStore } from "@/store/root.store";
|
||||
import type { CoreRootStore } from "@/store/root.store";
|
||||
// types
|
||||
import {
|
||||
import type {
|
||||
TIssueLayoutOptions,
|
||||
TIssueFilters,
|
||||
TIssueQueryFilters,
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { action, makeObservable, runInAction } from "mobx";
|
||||
// plane imports
|
||||
import { SitesIssueService } from "@plane/services";
|
||||
import { IssuePaginationOptions, TLoader } from "@plane/types";
|
||||
import type { IssuePaginationOptions, TLoader } from "@plane/types";
|
||||
// store
|
||||
import { CoreRootStore } from "@/store/root.store";
|
||||
import type { CoreRootStore } from "@/store/root.store";
|
||||
// types
|
||||
import { BaseIssuesStore, IBaseIssuesStore } from "./helpers/base-issues.store";
|
||||
import { BaseIssuesStore, type IBaseIssuesStore } from "./helpers/base-issues.store";
|
||||
|
||||
export interface IIssueStore extends IBaseIssuesStore {
|
||||
// actions
|
||||
|
||||
@ -2,9 +2,9 @@ import set from "lodash/set";
|
||||
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
||||
// plane imports
|
||||
import { SitesLabelService } from "@plane/services";
|
||||
import { IIssueLabel } from "@plane/types";
|
||||
import type { IIssueLabel } from "@plane/types";
|
||||
// store
|
||||
import { CoreRootStore } from "./root.store";
|
||||
import type { CoreRootStore } from "./root.store";
|
||||
|
||||
export interface IIssueLabelStore {
|
||||
// observables
|
||||
|
||||
@ -2,9 +2,8 @@ import set from "lodash/set";
|
||||
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
||||
// plane imports
|
||||
import { SitesMemberService } from "@plane/services";
|
||||
|
||||
import { TPublicMember } from "@/types/member";
|
||||
import { CoreRootStore } from "./root.store";
|
||||
import type { TPublicMember } from "@/types/member";
|
||||
import type { CoreRootStore } from "./root.store";
|
||||
|
||||
export interface IIssueMemberStore {
|
||||
// observables
|
||||
|
||||
@ -3,9 +3,9 @@ import { action, computed, makeObservable, observable, runInAction } from "mobx"
|
||||
// plane imports
|
||||
import { SitesModuleService } from "@plane/services";
|
||||
// types
|
||||
import { TPublicModule } from "@/types/modules";
|
||||
import type { TPublicModule } from "@/types/modules";
|
||||
// root store
|
||||
import { CoreRootStore } from "./root.store";
|
||||
import type { CoreRootStore } from "./root.store";
|
||||
|
||||
export interface IIssueModuleStore {
|
||||
// observables
|
||||
|
||||
@ -4,7 +4,7 @@ import { action, makeObservable, observable, runInAction } from "mobx";
|
||||
import { UserService } from "@plane/services";
|
||||
import { EStartOfTheWeek, TUserProfile } from "@plane/types";
|
||||
// store
|
||||
import { CoreRootStore } from "@/store/root.store";
|
||||
import type { CoreRootStore } from "@/store/root.store";
|
||||
|
||||
type TError = {
|
||||
status: string;
|
||||
|
||||
@ -8,7 +8,7 @@ import {
|
||||
TProjectPublishViewProps,
|
||||
} from "@plane/types";
|
||||
// store
|
||||
import { CoreRootStore } from "../root.store";
|
||||
import type { CoreRootStore } from "../root.store";
|
||||
|
||||
export interface IPublishStore extends TProjectPublishSettings {
|
||||
// computed
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user